Now that Sonic Pi can play in the web (yay!🌟️) it would be super nice to be able to reference external URLs for loading custom samples. For instance, that would make any code with custom samples instantly shareable. Also, it would allow for custom samples in collaborative editing environments like Flok (although Sonic Pi is not integrated in Flok yet).
I imagine writing the following code:
sample "https://raw.githubusercontent.com/tidalcycles/Dirt-Samples/master/sd/rytm-01-classic.wav"
and Sonic Pi downloading the sample and using it.
I also imagine that the url could point to a .json file specifying a list of audio file urls. That way, I wouldn't need to specify the samples one by one of a sample pack consisting of, say, 300 samples, and I could add more sounds to the pack without needing to change the Sonic Pi code.
What I imagine doing is for example
sample "https://example.com/sample-pack.json" rand_i(300)
Which would select one of the samples of my pack.
Now that Sonic Pi can play in the web (yay!🌟️) it would be super nice to be able to reference external URLs for loading custom samples. For instance, that would make any code with custom samples instantly shareable. Also, it would allow for custom samples in collaborative editing environments like Flok (although Sonic Pi is not integrated in Flok yet).
I imagine writing the following code:
sample "https://raw.githubusercontent.com/tidalcycles/Dirt-Samples/master/sd/rytm-01-classic.wav"and Sonic Pi downloading the sample and using it.
I also imagine that the url could point to a .json file specifying a list of audio file urls. That way, I wouldn't need to specify the samples one by one of a sample pack consisting of, say, 300 samples, and I could add more sounds to the pack without needing to change the Sonic Pi code.
What I imagine doing is for example
sample "https://example.com/sample-pack.json" rand_i(300)Which would select one of the samples of my pack.