{"action":"created","issue":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/732","labels_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/732/comments","events_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/732/events","html_url":"https://github.com/samaaron/sonic-pi/pull/732","id":110816643,"number":732,"title":"[POC] Set sustain based on the note's duration.","user":{"login":"ctford","id":121563,"avatar_url":"https://avatars.githubusercontent.com/u/121563?v=3","gravatar_id":"","url":"https://api.github.com/users/ctford","html_url":"https://github.com/ctford","followers_url":"https://api.github.com/users/ctford/followers","following_url":"https://api.github.com/users/ctford/following{/other_user}","gists_url":"https://api.github.com/users/ctford/gists{/gist_id}","starred_url":"https://api.github.com/users/ctford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctford/subscriptions","organizations_url":"https://api.github.com/users/ctford/orgs","repos_url":"https://api.github.com/users/ctford/repos","events_url":"https://api.github.com/users/ctford/events{/privacy}","received_events_url":"https://api.github.com/users/ctford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-10T21:01:04Z","updated_at":"2015-10-12T17:52:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/samaaron/sonic-pi/pulls/732","html_url":"https://github.com/samaaron/sonic-pi/pull/732","diff_url":"https://github.com/samaaron/sonic-pi/pull/732.diff","patch_url":"https://github.com/samaaron/sonic-pi/pull/732.patch"},"body":"An experiment in making it convenient to play melodies containing notes of different lengths. This works by setting a virtual parameter `:duration`, which is used to work out how long `:sustain` should be. Without this, it's awkward to:\r\n  * Vary the sustain between notes of the same pattern.\r\n  * Calculate the correct sustain, which depends on how long the attack, decay and release are.\r\n\r\nWithout this patch, I found that short notes often bled into one another. With this patch, the following sounds relatively crisp:\r\n\r\n    live_loop :melody do\r\n      with_synth :blade do\r\n        play_pattern_timed(scale(:C, :minor), [0.75, 0.5, 0.125, 0.125], release: 0.2)\r\n      end\r\n    end\r\n\r\nThis is only a proof-of-concept, and would need to be refined and toughened if it were to be adopted."},"comment":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/comments/147474264","html_url":"https://github.com/samaaron/sonic-pi/pull/732#issuecomment-147474264","issue_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/732","id":147474264,"user":{"login":"ctford","id":121563,"avatar_url":"https://avatars.githubusercontent.com/u/121563?v=3","gravatar_id":"","url":"https://api.github.com/users/ctford","html_url":"https://github.com/ctford","followers_url":"https://api.github.com/users/ctford/followers","following_url":"https://api.github.com/users/ctford/following{/other_user}","gists_url":"https://api.github.com/users/ctford/gists{/gist_id}","starred_url":"https://api.github.com/users/ctford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctford/subscriptions","organizations_url":"https://api.github.com/users/ctford/orgs","repos_url":"https://api.github.com/users/ctford/repos","events_url":"https://api.github.com/users/ctford/events{/privacy}","received_events_url":"https://api.github.com/users/ctford/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T17:52:08Z","updated_at":"2015-10-12T17:52:08Z","body":"I like the idea of unifying sample and synth behaviour. That the two are implemented differently under the hood isn't of relevance to the Sonic Pilot, so it feels right to align their behaviour as much as possible."}}