{"action":"created","issue":{"url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/66","repository_url":"https://api.github.com/repos/algorithmic-music-exploration/amen","labels_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/66/comments","events_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/66/events","html_url":"https://github.com/algorithmic-music-exploration/amen/issues/66","id":156504813,"number":66,"title":"Deformation architecture","user":{"login":"bmcfee","id":1190540,"avatar_url":"https://avatars.githubusercontent.com/u/1190540?v=3","gravatar_id":"","url":"https://api.github.com/users/bmcfee","html_url":"https://github.com/bmcfee","followers_url":"https://api.github.com/users/bmcfee/followers","following_url":"https://api.github.com/users/bmcfee/following{/other_user}","gists_url":"https://api.github.com/users/bmcfee/gists{/gist_id}","starred_url":"https://api.github.com/users/bmcfee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmcfee/subscriptions","organizations_url":"https://api.github.com/users/bmcfee/orgs","repos_url":"https://api.github.com/users/bmcfee/repos","events_url":"https://api.github.com/users/bmcfee/events{/privacy}","received_events_url":"https://api.github.com/users/bmcfee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-05-24T13:18:24Z","updated_at":"2016-07-17T03:34:51Z","closed_at":null,"body":"How do we want/expect people to manipulate audio within amen?\r\n\r\nThe `synthesize` function is great for re-arranging a clip by timing, but doesn't give us a handle on how to do things like, say, vocal subtraction or time-stretching.\r\n\r\nDo we want to provide an object interface for this kind of thing?  Or just let folks hack functions themselves?  Either way, I think we should not support/allow in-place modification of the audio buffers, since it would either trigger an (expensive) feature analysis or have inconsistent results.\r\n\r\nFor example, a time-stretcher might look something like:\r\n```python\r\nimport pyrubberband as pyrb\r\n\r\ndef amen_time_stretch(audio, rate=1.0):\r\n    y_stretch = pyrb.time_stretch(audio.raw_samples, audio.sample_rate, rate=rate)\r\n    return Audio(raw_samples=y_stretch,\r\n                         sample_rate=sample_rate,\r\n                         analysis_sample_rate=audio.analysis_sample_rate)\r\n```\r\n\r\nThis is pretty simple, but it bothers me that you have to access the `Audio` object's internals directly and propagate them manually.  Maybe that's the only way though?\r\n\r\nMore generally, I could imagine effects that return multiple clips (eg, source separation), so a consistent object interface might be tricky to pull off here."},"comment":{"url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/comments/233163240","html_url":"https://github.com/algorithmic-music-exploration/amen/issues/66#issuecomment-233163240","issue_url":"https://api.github.com/repos/algorithmic-music-exploration/amen/issues/66","id":233163240,"user":{"login":"tkell","id":263128,"avatar_url":"https://avatars.githubusercontent.com/u/263128?v=3","gravatar_id":"","url":"https://api.github.com/users/tkell","html_url":"https://github.com/tkell","followers_url":"https://api.github.com/users/tkell/followers","following_url":"https://api.github.com/users/tkell/following{/other_user}","gists_url":"https://api.github.com/users/tkell/gists{/gist_id}","starred_url":"https://api.github.com/users/tkell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkell/subscriptions","organizations_url":"https://api.github.com/users/tkell/orgs","repos_url":"https://api.github.com/users/tkell/repos","events_url":"https://api.github.com/users/tkell/events{/privacy}","received_events_url":"https://api.github.com/users/tkell/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T03:34:51Z","updated_at":"2016-07-17T03:34:51Z","body":"Two more thoughts:\r\n\r\na)  An Audio object has various methods, like `time_stretch` or `vocal_subtraction`, that returns new Audio objects.\r\nb)  We make objects that do these things to Audio objects - `TimeStretcher`, etc.  They  also return new Audio objects.\r\n\r\nI prefer a), I am pretty sure.  Your thoughts?"}}
{"actor":{"display_login":"tkell"}}