How to get up and running!


PATH

To get up and running, change the path variable to your sample folder, such as: path = 'C:/mysamplefolder_something_something_something'Your folder will instantly become sample-fodder, which you can then record back through the Sonic Pi GUI.


FREQ_RANGE

This basically just controls the rate at which samples are played back, either from -range to +range, or 0 - +plus range (depending on whether you set "allow_reverse" to be true or not).  Negative values are reverse, so you can end up with some really weird results by keeping the aforementioned on 'true'.

SAMPLE COUNT

You can max this out (as in 'overflow', or supply a larger greater than the number of samples which exist in the folder) without any worries. So if you want them to all trigger, there's no harm in saying '100', '1000', or some unrealistic sample number.

USE RANDOM SEED

This is just an inbuilt function that modulates the pseudo-random values. Sonic Pi's random values are predetermined, so you'll get the same batch of processing every time you hit play, provided you use the same random seed. Likewise, if you change the random seed value, you'll get a new batch of random values, meaning that you'll get a new set of individually-triggered samples.


Whew! This was longer than the actual script, but it's worth it :)

Files

sample_grinder.rb 1.2 kB
2 days ago

Get Sample Grinder

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.