{"action":"created","issue":{"url":"https://api.github.com/repos/csound/manual/issues/101","repository_url":"https://api.github.com/repos/csound/manual","labels_url":"https://api.github.com/repos/csound/manual/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/csound/manual/issues/101/comments","events_url":"https://api.github.com/repos/csound/manual/issues/101/events","html_url":"https://github.com/csound/manual/issues/101","id":170222560,"number":101,"title":"p-field values are not always copied at initialization of a user-defined opcode","user":{"login":"glocq","id":16959183,"avatar_url":"https://avatars.githubusercontent.com/u/16959183?v=3","gravatar_id":"","url":"https://api.github.com/users/glocq","html_url":"https://github.com/glocq","followers_url":"https://api.github.com/users/glocq/followers","following_url":"https://api.github.com/users/glocq/following{/other_user}","gists_url":"https://api.github.com/users/glocq/gists{/gist_id}","starred_url":"https://api.github.com/users/glocq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glocq/subscriptions","organizations_url":"https://api.github.com/users/glocq/orgs","repos_url":"https://api.github.com/users/glocq/repos","events_url":"https://api.github.com/users/glocq/events{/privacy}","received_events_url":"https://api.github.com/users/glocq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/csound/manual/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"kunstmusik","id":1622139,"avatar_url":"https://avatars.githubusercontent.com/u/1622139?v=3","gravatar_id":"","url":"https://api.github.com/users/kunstmusik","html_url":"https://github.com/kunstmusik","followers_url":"https://api.github.com/users/kunstmusik/followers","following_url":"https://api.github.com/users/kunstmusik/following{/other_user}","gists_url":"https://api.github.com/users/kunstmusik/gists{/gist_id}","starred_url":"https://api.github.com/users/kunstmusik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunstmusik/subscriptions","organizations_url":"https://api.github.com/users/kunstmusik/orgs","repos_url":"https://api.github.com/users/kunstmusik/repos","events_url":"https://api.github.com/users/kunstmusik/events{/privacy}","received_events_url":"https://api.github.com/users/kunstmusik/received_events","type":"User","site_admin":false},"assignees":[{"login":"kunstmusik","id":1622139,"avatar_url":"https://avatars.githubusercontent.com/u/1622139?v=3","gravatar_id":"","url":"https://api.github.com/users/kunstmusik","html_url":"https://github.com/kunstmusik","followers_url":"https://api.github.com/users/kunstmusik/followers","following_url":"https://api.github.com/users/kunstmusik/following{/other_user}","gists_url":"https://api.github.com/users/kunstmusik/gists{/gist_id}","starred_url":"https://api.github.com/users/kunstmusik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kunstmusik/subscriptions","organizations_url":"https://api.github.com/users/kunstmusik/orgs","repos_url":"https://api.github.com/users/kunstmusik/repos","events_url":"https://api.github.com/users/kunstmusik/events{/privacy}","received_events_url":"https://api.github.com/users/kunstmusik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-08-09T17:20:21Z","updated_at":"2016-10-01T23:38:58Z","closed_at":null,"body":"According to [this page of the manual](https://csound.github.io/docs/manual/opcode.html), if a user-defined opcode is used in an instrument, \"all p-fields\" of the instrument \"are automatically copied at initialization\" of the opcode.\r\n\r\nHowever, if some p-fields in the score are not *directly* used by an instrument, they will be ignored (with a warning) - as long as no higher p-field is directly used. So if some p-field is used by a UDO inside an instrument only, it will simply be ignored. I think this is worth mentioning.\r\n\r\nHere is an example:\r\n\r\n```\r\n<CsoundSynthesizer>\r\n<CsOptions>\r\n-odac\r\n</CsOptions>\r\n<CsInstruments>\r\n\r\n\r\nopcode Celesta, a, 0\r\naenv    transeg     0, 0.007, -4, 1, p3-0.007, -4, 0\r\nasig    oscils      0dbfs, p4, 0\r\n        xout        aenv*asig\r\nendop\r\n\r\n\r\ninstr 1\r\n// The following line is a workaround, uncommenting it allows p4 to be passed to the UDO\r\n// iuseless = p4\r\nasig    Celesta\r\n        outs        asig, asig\r\nendin\r\n\r\n\r\n</CsInstruments>\r\n<CsScore>\r\ni1 0 2 440\r\n</CsScore>\r\n</CsoundSynthesizer>\r\n```"},"comment":{"url":"https://api.github.com/repos/csound/manual/issues/comments/250944357","html_url":"https://github.com/csound/manual/issues/101#issuecomment-250944357","issue_url":"https://api.github.com/repos/csound/manual/issues/101","id":250944357,"user":{"login":"vlazzarini","id":6033815,"avatar_url":"https://avatars.githubusercontent.com/u/6033815?v=3","gravatar_id":"","url":"https://api.github.com/users/vlazzarini","html_url":"https://github.com/vlazzarini","followers_url":"https://api.github.com/users/vlazzarini/followers","following_url":"https://api.github.com/users/vlazzarini/following{/other_user}","gists_url":"https://api.github.com/users/vlazzarini/gists{/gist_id}","starred_url":"https://api.github.com/users/vlazzarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlazzarini/subscriptions","organizations_url":"https://api.github.com/users/vlazzarini/orgs","repos_url":"https://api.github.com/users/vlazzarini/repos","events_url":"https://api.github.com/users/vlazzarini/events{/privacy}","received_events_url":"https://api.github.com/users/vlazzarini/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T23:38:58Z","updated_at":"2016-10-01T23:38:58Z","body":"It should say \"all pfields defined in the calling instrument\""}}
{"actor":{"display_login":"vlazzarini"}}