{"action":"created","issue":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1370","repository_url":"https://api.github.com/repos/samaaron/sonic-pi","labels_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1370/labels{/name}","comments_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1370/comments","events_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1370/events","html_url":"https://github.com/samaaron/sonic-pi/issues/1370","id":174570752,"number":1370,"title":"Rate argument doesn't handle 24bit 48khz files","user":{"login":"Bohrbug","id":6961133,"avatar_url":"https://avatars.githubusercontent.com/u/6961133?v=3","gravatar_id":"","url":"https://api.github.com/users/Bohrbug","html_url":"https://github.com/Bohrbug","followers_url":"https://api.github.com/users/Bohrbug/followers","following_url":"https://api.github.com/users/Bohrbug/following{/other_user}","gists_url":"https://api.github.com/users/Bohrbug/gists{/gist_id}","starred_url":"https://api.github.com/users/Bohrbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bohrbug/subscriptions","organizations_url":"https://api.github.com/users/Bohrbug/orgs","repos_url":"https://api.github.com/users/Bohrbug/repos","events_url":"https://api.github.com/users/Bohrbug/events{/privacy}","received_events_url":"https://api.github.com/users/Bohrbug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-01T16:39:29Z","updated_at":"2016-09-03T11:40:42Z","closed_at":null,"body":"Hi Sam,\r\n\r\nThe following code worked perfectly without the rate argument.\r\nWhen adding the rate argument got the following error:\r\n\r\nRuntime Error: [buffer workspace_t, line 16]\r\nThread death +--> :live_loop_fmt\r\nSonicPi::Studio::StudioCurrentlyRebootingError\r\n\r\nWhen debugging,  the samples itself seemed to be causing the problem. The original where 24 bit / 48 khz.\r\nAfter re-sampling the audio files at 16 bit, 44 khz, everything worked fine with the rate parameter.\r\n\r\n\r\nsamps = \"/users/dagobertsondervan/pisounds/125/\"\r\n\r\nwith_fx :compressor, amp: 1.5, threshold: 0.3  do\r\n  with_fx :reverb, mix: 0.2, room: 0.3 do\r\n    with_fx :distortion, distort: 0.2, amp: 0.8  do\r\n      with_fx :pitch_shift do\r\n        with_fx :slicer , mix: 0.9 , probability: 0.4, phase: 0.125, wave: 1 do\r\n          live_loop :fmt do\r\n            \r\n            sync :clk1\r\n            \r\n            n = choose([16, 16, 16, 8])\r\n            d = choose([1.0, 0.5])\r\n            s =  line(0, 0.5, steps: n).choose\r\n            f = s + (d / n)\r\n            r = choose([1, 1, 1, -1])\r\n            \r\n            \r\n            sample samps, choose([1, 1, 1, 2]) , amp: 0.9,\r\n              beat_stretch: choose([4, 6, 4, 8, 16]), start: s, finish: f, attack: 0, release: 0.4, rate: r\r\n            \r\n            sleep 2.0  / n\r\n          end\r\n        end\r\n      end\r\n    end\r\n  end\r\nend\r\n"},"comment":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/comments/244541756","html_url":"https://github.com/samaaron/sonic-pi/issues/1370#issuecomment-244541756","issue_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1370","id":244541756,"user":{"login":"Bohrbug","id":6961133,"avatar_url":"https://avatars.githubusercontent.com/u/6961133?v=3","gravatar_id":"","url":"https://api.github.com/users/Bohrbug","html_url":"https://github.com/Bohrbug","followers_url":"https://api.github.com/users/Bohrbug/followers","following_url":"https://api.github.com/users/Bohrbug/following{/other_user}","gists_url":"https://api.github.com/users/Bohrbug/gists{/gist_id}","starred_url":"https://api.github.com/users/Bohrbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bohrbug/subscriptions","organizations_url":"https://api.github.com/users/Bohrbug/orgs","repos_url":"https://api.github.com/users/Bohrbug/repos","events_url":"https://api.github.com/users/Bohrbug/events{/privacy}","received_events_url":"https://api.github.com/users/Bohrbug/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T11:40:41Z","updated_at":"2016-09-03T11:40:41Z","body":"Also, it only crashes after evaluating and let it play by itself a minute or two.\r\n"}}
{"actor":{"display_login":"Bohrbug"}}