{"action":"created","comment":{"url":"https://api.github.com/repos/supercollider/supercollider/pulls/comments/64993263","id":64993263,"diff_hunk":"@@ -6210,7 +6210,7 @@ void TGrains_next(TGrains *unit, int inNumSamples)\n \t\t\t\tif (grain->chan >= (int)numOutputs) grain->chan -= numOutputs;\n \t\t\t} else {\n \t\t\t\tgrain->chan = 0;\n-\t\t\t\tpan = sc_wrap(pan * 0.5f + 0.5f, 0.f, 1.f);\n+\t\t\t\tpan = sc_clip(pan * 0.5f + 0.5f, 0.f, 1.f);","path":"server/plugins/DelayUGens.cpp","position":5,"original_position":5,"commit_id":"1b43e0d1c9a70d921b288b0a989653d8a6ae47c4","original_commit_id":"1b43e0d1c9a70d921b288b0a989653d8a6ae47c4","user":{"login":"timblechmann","id":792880,"avatar_url":"https://avatars.githubusercontent.com/u/792880?v=3","gravatar_id":"","url":"https://api.github.com/users/timblechmann","html_url":"https://github.com/timblechmann","followers_url":"https://api.github.com/users/timblechmann/followers","following_url":"https://api.github.com/users/timblechmann/following{/other_user}","gists_url":"https://api.github.com/users/timblechmann/gists{/gist_id}","starred_url":"https://api.github.com/users/timblechmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timblechmann/subscriptions","organizations_url":"https://api.github.com/users/timblechmann/orgs","repos_url":"https://api.github.com/users/timblechmann/repos","events_url":"https://api.github.com/users/timblechmann/events{/privacy}","received_events_url":"https://api.github.com/users/timblechmann/received_events","type":"User","site_admin":false},"body":"2-channel should clip, but more than 2 channel should wrap (line 6204)?\r\n\r\nit is both inconsistent and may break existing pieces, relying on the behavior. maybe the documentation should reflect the wrap-around? ","created_at":"2016-05-28T19:55:57Z","updated_at":"2016-05-28T19:55:57Z","html_url":"https://github.com/supercollider/supercollider/pull/2136#discussion_r64993263","pull_request_url":"https://api.github.com/repos/supercollider/supercollider/pulls/2136","_links":{"self":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/comments/64993263"},"html":{"href":"https://github.com/supercollider/supercollider/pull/2136#discussion_r64993263"},"pull_request":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/2136"}}},"pull_request":{"url":"https://api.github.com/repos/supercollider/supercollider/pulls/2136","id":71810031,"html_url":"https://github.com/supercollider/supercollider/pull/2136","diff_url":"https://github.com/supercollider/supercollider/pull/2136.diff","patch_url":"https://github.com/supercollider/supercollider/pull/2136.patch","issue_url":"https://api.github.com/repos/supercollider/supercollider/issues/2136","number":2136,"state":"open","locked":false,"title":"Fix documentation and behavior of TGrains when numChannels = 2","user":{"login":"snappizz","id":1211064,"avatar_url":"https://avatars.githubusercontent.com/u/1211064?v=3","gravatar_id":"","url":"https://api.github.com/users/snappizz","html_url":"https://github.com/snappizz","followers_url":"https://api.github.com/users/snappizz/followers","following_url":"https://api.github.com/users/snappizz/following{/other_user}","gists_url":"https://api.github.com/users/snappizz/gists{/gist_id}","starred_url":"https://api.github.com/users/snappizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snappizz/subscriptions","organizations_url":"https://api.github.com/users/snappizz/orgs","repos_url":"https://api.github.com/users/snappizz/repos","events_url":"https://api.github.com/users/snappizz/events{/privacy}","received_events_url":"https://api.github.com/users/snappizz/received_events","type":"User","site_admin":false},"body":"The pan argument to TGrains has two problems, originally reported for [TGrains2 in sc3-plugins](https://github.com/supercollider/sc3-plugins/issues/81). One of them is a documentation issue, which says that it behaves like PanAz. The intended behavior is more like GrainBuf, which behaves like Pan2 when the number of channels is 2, and like PanAz for 3 or more channels.\r\n\r\nFurthermore, the math of the pan argument is not a correct emulation of Pan2. Here is a crude way to visualize the problem, by plotting a pan from -2 to 2:\r\n\r\n    b = Buffer.read(s, Platform.resourceDir +/+ \"sounds/a11wlk01.wav\");\r\n    { Pan2.ar(SinOsc.ar(440), Line.kr(-2, 2, 1)) }.plot(1.0)\r\n    { TGrains.ar(2, Impulse.ar(100), b, dur: 0.01, pan: Line.kr(-2, 2, 1)) }.plot(1.0)\r\n\r\nTGrains wraps around at +-1. Pan2 clips.\r\n\r\nThis fixes both problems. I also couldn't resist fixing a typo in GrainBuf.","created_at":"2016-05-28T19:36:34Z","updated_at":"2016-05-28T19:55:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"671fbf4693a7b5766cb1dfef1a740ccdd13cdbcf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/supercollider/supercollider/pulls/2136/commits","review_comments_url":"https://api.github.com/repos/supercollider/supercollider/pulls/2136/comments","review_comment_url":"https://api.github.com/repos/supercollider/supercollider/pulls/comments{/number}","comments_url":"https://api.github.com/repos/supercollider/supercollider/issues/2136/comments","statuses_url":"https://api.github.com/repos/supercollider/supercollider/statuses/1b43e0d1c9a70d921b288b0a989653d8a6ae47c4","head":{"label":"snappizz:tgrains-fix","ref":"tgrains-fix","sha":"1b43e0d1c9a70d921b288b0a989653d8a6ae47c4","user":{"login":"snappizz","id":1211064,"avatar_url":"https://avatars.githubusercontent.com/u/1211064?v=3","gravatar_id":"","url":"https://api.github.com/users/snappizz","html_url":"https://github.com/snappizz","followers_url":"https://api.github.com/users/snappizz/followers","following_url":"https://api.github.com/users/snappizz/following{/other_user}","gists_url":"https://api.github.com/users/snappizz/gists{/gist_id}","starred_url":"https://api.github.com/users/snappizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snappizz/subscriptions","organizations_url":"https://api.github.com/users/snappizz/orgs","repos_url":"https://api.github.com/users/snappizz/repos","events_url":"https://api.github.com/users/snappizz/events{/privacy}","received_events_url":"https://api.github.com/users/snappizz/received_events","type":"User","site_admin":false},"repo":{"id":47520933,"name":"supercollider","full_name":"snappizz/supercollider","owner":{"login":"snappizz","id":1211064,"avatar_url":"https://avatars.githubusercontent.com/u/1211064?v=3","gravatar_id":"","url":"https://api.github.com/users/snappizz","html_url":"https://github.com/snappizz","followers_url":"https://api.github.com/users/snappizz/followers","following_url":"https://api.github.com/users/snappizz/following{/other_user}","gists_url":"https://api.github.com/users/snappizz/gists{/gist_id}","starred_url":"https://api.github.com/users/snappizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snappizz/subscriptions","organizations_url":"https://api.github.com/users/snappizz/orgs","repos_url":"https://api.github.com/users/snappizz/repos","events_url":"https://api.github.com/users/snappizz/events{/privacy}","received_events_url":"https://api.github.com/users/snappizz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snappizz/supercollider","description":"A programming language for real time audio synthesis and algorithmic composition","fork":true,"url":"https://api.github.com/repos/snappizz/supercollider","forks_url":"https://api.github.com/repos/snappizz/supercollider/forks","keys_url":"https://api.github.com/repos/snappizz/supercollider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snappizz/supercollider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snappizz/supercollider/teams","hooks_url":"https://api.github.com/repos/snappizz/supercollider/hooks","issue_events_url":"https://api.github.com/repos/snappizz/supercollider/issues/events{/number}","events_url":"https://api.github.com/repos/snappizz/supercollider/events","assignees_url":"https://api.github.com/repos/snappizz/supercollider/assignees{/user}","branches_url":"https://api.github.com/repos/snappizz/supercollider/branches{/branch}","tags_url":"https://api.github.com/repos/snappizz/supercollider/tags","blobs_url":"https://api.github.com/repos/snappizz/supercollider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snappizz/supercollider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snappizz/supercollider/git/refs{/sha}","trees_url":"https://api.github.com/repos/snappizz/supercollider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snappizz/supercollider/statuses/{sha}","languages_url":"https://api.github.com/repos/snappizz/supercollider/languages","stargazers_url":"https://api.github.com/repos/snappizz/supercollider/stargazers","contributors_url":"https://api.github.com/repos/snappizz/supercollider/contributors","subscribers_url":"https://api.github.com/repos/snappizz/supercollider/subscribers","subscription_url":"https://api.github.com/repos/snappizz/supercollider/subscription","commits_url":"https://api.github.com/repos/snappizz/supercollider/commits{/sha}","git_commits_url":"https://api.github.com/repos/snappizz/supercollider/git/commits{/sha}","comments_url":"https://api.github.com/repos/snappizz/supercollider/comments{/number}","issue_comment_url":"https://api.github.com/repos/snappizz/supercollider/issues/comments{/number}","contents_url":"https://api.github.com/repos/snappizz/supercollider/contents/{+path}","compare_url":"https://api.github.com/repos/snappizz/supercollider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snappizz/supercollider/merges","archive_url":"https://api.github.com/repos/snappizz/supercollider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snappizz/supercollider/downloads","issues_url":"https://api.github.com/repos/snappizz/supercollider/issues{/number}","pulls_url":"https://api.github.com/repos/snappizz/supercollider/pulls{/number}","milestones_url":"https://api.github.com/repos/snappizz/supercollider/milestones{/number}","notifications_url":"https://api.github.com/repos/snappizz/supercollider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snappizz/supercollider/labels{/name}","releases_url":"https://api.github.com/repos/snappizz/supercollider/releases{/id}","deployments_url":"https://api.github.com/repos/snappizz/supercollider/deployments","created_at":"2015-12-07T01:00:39Z","updated_at":"2016-03-22T02:27:36Z","pushed_at":"2016-05-28T19:33:39Z","git_url":"git://github.com/snappizz/supercollider.git","ssh_url":"git@github.com:snappizz/supercollider.git","clone_url":"https://github.com/snappizz/supercollider.git","svn_url":"https://github.com/snappizz/supercollider","homepage":"supercollider.github.io","size":143267,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"supercollider:master","ref":"master","sha":"850ce3d838cfb250901207df536ff381ce438650","user":{"login":"supercollider","id":1706741,"avatar_url":"https://avatars.githubusercontent.com/u/1706741?v=3","gravatar_id":"","url":"https://api.github.com/users/supercollider","html_url":"https://github.com/supercollider","followers_url":"https://api.github.com/users/supercollider/followers","following_url":"https://api.github.com/users/supercollider/following{/other_user}","gists_url":"https://api.github.com/users/supercollider/gists{/gist_id}","starred_url":"https://api.github.com/users/supercollider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supercollider/subscriptions","organizations_url":"https://api.github.com/users/supercollider/orgs","repos_url":"https://api.github.com/users/supercollider/repos","events_url":"https://api.github.com/users/supercollider/events{/privacy}","received_events_url":"https://api.github.com/users/supercollider/received_events","type":"Organization","site_admin":false},"repo":{"id":4228314,"name":"supercollider","full_name":"supercollider/supercollider","owner":{"login":"supercollider","id":1706741,"avatar_url":"https://avatars.githubusercontent.com/u/1706741?v=3","gravatar_id":"","url":"https://api.github.com/users/supercollider","html_url":"https://github.com/supercollider","followers_url":"https://api.github.com/users/supercollider/followers","following_url":"https://api.github.com/users/supercollider/following{/other_user}","gists_url":"https://api.github.com/users/supercollider/gists{/gist_id}","starred_url":"https://api.github.com/users/supercollider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supercollider/subscriptions","organizations_url":"https://api.github.com/users/supercollider/orgs","repos_url":"https://api.github.com/users/supercollider/repos","events_url":"https://api.github.com/users/supercollider/events{/privacy}","received_events_url":"https://api.github.com/users/supercollider/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/supercollider/supercollider","description":"A programming language for real time audio synthesis and algorithmic composition.","fork":false,"url":"https://api.github.com/repos/supercollider/supercollider","forks_url":"https://api.github.com/repos/supercollider/supercollider/forks","keys_url":"https://api.github.com/repos/supercollider/supercollider/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supercollider/supercollider/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supercollider/supercollider/teams","hooks_url":"https://api.github.com/repos/supercollider/supercollider/hooks","issue_events_url":"https://api.github.com/repos/supercollider/supercollider/issues/events{/number}","events_url":"https://api.github.com/repos/supercollider/supercollider/events","assignees_url":"https://api.github.com/repos/supercollider/supercollider/assignees{/user}","branches_url":"https://api.github.com/repos/supercollider/supercollider/branches{/branch}","tags_url":"https://api.github.com/repos/supercollider/supercollider/tags","blobs_url":"https://api.github.com/repos/supercollider/supercollider/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supercollider/supercollider/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supercollider/supercollider/git/refs{/sha}","trees_url":"https://api.github.com/repos/supercollider/supercollider/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supercollider/supercollider/statuses/{sha}","languages_url":"https://api.github.com/repos/supercollider/supercollider/languages","stargazers_url":"https://api.github.com/repos/supercollider/supercollider/stargazers","contributors_url":"https://api.github.com/repos/supercollider/supercollider/contributors","subscribers_url":"https://api.github.com/repos/supercollider/supercollider/subscribers","subscription_url":"https://api.github.com/repos/supercollider/supercollider/subscription","commits_url":"https://api.github.com/repos/supercollider/supercollider/commits{/sha}","git_commits_url":"https://api.github.com/repos/supercollider/supercollider/git/commits{/sha}","comments_url":"https://api.github.com/repos/supercollider/supercollider/comments{/number}","issue_comment_url":"https://api.github.com/repos/supercollider/supercollider/issues/comments{/number}","contents_url":"https://api.github.com/repos/supercollider/supercollider/contents/{+path}","compare_url":"https://api.github.com/repos/supercollider/supercollider/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supercollider/supercollider/merges","archive_url":"https://api.github.com/repos/supercollider/supercollider/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supercollider/supercollider/downloads","issues_url":"https://api.github.com/repos/supercollider/supercollider/issues{/number}","pulls_url":"https://api.github.com/repos/supercollider/supercollider/pulls{/number}","milestones_url":"https://api.github.com/repos/supercollider/supercollider/milestones{/number}","notifications_url":"https://api.github.com/repos/supercollider/supercollider/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supercollider/supercollider/labels{/name}","releases_url":"https://api.github.com/repos/supercollider/supercollider/releases{/id}","deployments_url":"https://api.github.com/repos/supercollider/supercollider/deployments","created_at":"2012-05-04T19:24:51Z","updated_at":"2016-05-27T02:32:42Z","pushed_at":"2016-05-28T19:36:34Z","git_url":"git://github.com/supercollider/supercollider.git","ssh_url":"git@github.com:supercollider/supercollider.git","clone_url":"https://github.com/supercollider/supercollider.git","svn_url":"https://github.com/supercollider/supercollider","homepage":"http://supercollider.github.io","size":171566,"stargazers_count":1051,"watchers_count":1051,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"open_issues_count":442,"forks":227,"open_issues":442,"watchers":1051,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/2136"},"html":{"href":"https://github.com/supercollider/supercollider/pull/2136"},"issue":{"href":"https://api.github.com/repos/supercollider/supercollider/issues/2136"},"comments":{"href":"https://api.github.com/repos/supercollider/supercollider/issues/2136/comments"},"review_comments":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/2136/comments"},"review_comment":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/supercollider/supercollider/pulls/2136/commits"},"statuses":{"href":"https://api.github.com/repos/supercollider/supercollider/statuses/1b43e0d1c9a70d921b288b0a989653d8a6ae47c4"}}}}
{"actor":{"display_login":"timblechmann"}}