Jo
Is there any way to play with your code without building a hardware samplerbox first?
Maybe on a Windows or a Linux PC?
Don.
Jo
Is there any way to play with your code without building a hardware samplerbox first?
Maybe on a Windows or a Linux PC?
Don.
Yes, you can test it on a Raspberry Pi without any SamplerBox hardware.
The Samplerbox hardware only adds buttons, 7-segment display, MIDI in via serial, and input/output connectors at the rear of the enclosure.
But you can test the code without this hardware.
And yes, you can also use it on a PC Windows / Linux. It's not documented yet, but you can install https://github.com/josephernest/SamplerBox on a PC.
You just need a little experience with Python in order to install the missing Python modules that are required for SamplerBox.
Have a try and tell me how it works.
The dependencies are a bit hard to install, so i made a portable version with all the libraries.
Here is the link:
portableSamplerBox.rar
Instructions:
Install python 2.7
https://www.python.org/downloads/
Extract portableSamplerBox anywhere on your computer
Launch getaudioid.bat
It will display your audio id, get the one you want.
Modify samplerBox\samplerBox\samplerbox.py
AUDIO_DEVICE_ID = 3 with your audio ID
Launch samplerBox.bat
Waw Remi, this is very cool!
A few remarks:
Your portable version already includes Python, so no need to install install Python before, is it correct?
In samplerBox\samplerBox\samplerbox.py
, you have set AUDIO_DEVICE_ID = 7
, maybe you should set = 0
as a default value when someone opens your package?
pause
as last line of getaudioid.bat
so that we can read the devices before the window is closedNice idea!
You still need to have python installed as it needs a DLL (Python27.dll)
Oups ^^ I forgot about AUDIO_DEVICE_ID
I will remake a new version (and add instructions on how to do it on your own) since using samplerBox on windows is really neat !
Thanks for this - I'm testing some things out before building an actual box. Few questions:
How do you change patches without having buttons? I've been just exiting the software, renaming the one I want to be #0, and restarting. Is there anyway to change?
I'm not using a keyboard; I'm using a drum pad since that's the application I'd be using it. I'm a drummer and play an acoustic set with a small electronic pad that has build in sounds. But that pad has both usb and midi outputs so I'm considering a samplerbox to expand the sound options I have.
thanks!
I tried to run your code on a Mac (I have MacPorts installed and created the missing packages for dependencies), but I experienced one tiny problem.
The part with
sounddevice.OutputStream(device=AUDIO_DEVICE_ID, ...)
doesn't seem to work or at least I don't know how to define AUDIO_DEVICE_ID (If I set it to None, then the part which prints the number complains). If I remove that part, everything starts working. It took me a while to test individual parts to try to diagnose why I wasn't getting any sound.
It might be nice to package samplerbox, so that 'port install samplerbox' would work out of the box, but I'm not sure about the best way to handle the configuration.