Hi,
I've made a fork of Samplerbox that adds two new features:
- Support for randomizing samples
- Support for 16x2 display's via I2C.
You can find the fork here: https://github.com/dhilowitz/SamplerBox
Randomizing samples
You can now have multiple versions of the same sample. In order to specify an alternate version of the same sample, you number them and specify the %seq
keyword. For example, let's say you have a sample set that contains three versions of A3 as follows:
A1-1.wav
A1-2.wav
A1-3.wav
A1-4.wav
B1-1.wav
...
You would specify a definition.txt that looks like this:
%notename-%seq.wav
Each time the note A1 is hit, SamplerBox will choose randomly between the different A1 samples (making sure not to repeat any two consecutively).
16x2 Display with backpack
This code works with Hitachi HD44780 16x2 displays with PCF8574 backpack. These are super cheap ($6.00, including shipping) on eBay. In order to get this to work, you have to set the bus address in the I2C_16x2DISPLAY_ADDR variable of samplerbox.py. The address differs depending on which version of the backpack you have: If you have the PCF8574T, the default I2C bus address is 0x27. If you have the PCF8574AT the default I2C bus address is 0x3F.
A handy set of utilities called I2CTools are used to probe the I2C bus. These can be installed with:
sudo apt-get install i2c-tools
You can figure out the bus address for your device by doing this:
sudo i2cdetect -r 0
Reference about these displays: