Using pisound to do a SamplerBox

Sorry in advance for my dummy question.
I would like to transform my new pisound into a SamplerBox
Basically: something connected to a MIDI keyboard that play sample sounds stored on the disk or on a USB key.
I’m very new on music software and I would appreciate any pointer or help on doing this.

I haven’t tried this yet, but perhaps you could be able to download the samplerbox image, run the pisound command and off you go. Can’t test this right now because I don’t have a spare SD card here.
You could also make a simple Pd patch to do the same, but samplerbox is def. more plug&play.

Thanks for your answer.
So I’ve tried to install pisound on the top of samplerbox.
pisound check works like expected but samplerbox don’t work with pisound :frowning:
I’ve got an error message “Invalid audio device #2” (#2 is the device number of pisound card).
The message comes from the Python script here. It probably means that Python sounddevice.OutputStream function can’t open pisound.
Because samplerbox is just a tool to play WAV samples, I’ve related the issue to the one described in this forum here.
But the work around proposed (update .asoundrc) don’t work.

Any idea to allow pisound to play WAV samples ?

It probably can’t open Pisound device because it’s attempting to use the unsupported 44.1kHz rate. Maybe it could be reworked to use 48kHz instead, or maybe there’s some way to use get the ALSA’s resampling plugin to work with sampler box, but I’m not sure how to go about it.

Thanks for answer.
I’ve tried to replace samplerate=44100 by samplerate=48000 in the samplerbox Python script.
No error message now but no sound output from pisound :cry:

If somebody have an idea to do the same thing even without samplebox scripts, let me know.

Hi @llaske, are you using the latest, more advanced SamplerBox image (zip file here: Or the original script (

Hi Alex,
I’ve used the SamplerBox image - so presumably the latest image.

I actually don’t own a pisound (I want one!) so I can’t test this for you unfortunately. Would you be able to post the console output?

Just FYI the latest image is built from this repository, not Joseph Ernest’s one (website is a little misleading!) just in case this helps debug at your end –

I like this project but you can make a sample with pure data very easily

I’m not familiar with pure data, if you’ve got links or tips to explain how to do that, do not hesitate

hi llaske
for fun i built SamplerBox from the README and it works perfectly with pisound
i had to choose in the audio device 3 and it sounds wonderful

Let me know if i can help you get it running it was pretty easy – everything is done via

sudo apt-get install xxxxxxx —for the python packes and pip install


@llaske thanks for your great initiative!
@Patrick_Pagano could you please specify a bit more how you did the integration of Samplerbox on the Pisound? Thanks a lot!

1 Like

We are going to be rolling it out pre-installed via very soon
PM me and i’ll help you



Hi, the file to modify is:
If anyone wants to do that you can do it through: nano in the directory: cd SamplerBox

1 Like

Hi Patrick. Did this ever get pre-installed? If not is it still going to be? Just got my pisound and thinking to try this soon.

No, not yet the focus has been on pure data

1 Like

OK, thanks for the reply! Will have a go at installing it myself so…

It’s super easy if you follow the directions for manual install you can get it running without having to reformat your whole pi so let me know if you need help

maybe someone could lend me a hand… I just followed the manual install instructions, but I cant get sound… my midi-keyboard is connected to the midi-in from the pisound and I have tried every combination in the samplerbox-settings with AUDIO_DEVICE_ID set to 1 or 3, and USE_SERIALPORT_MIDI set to True or False, but no sound all the time.

When I start, it looks like this:

    pi@raspberrypi:~/SamplerBox $ python
    Opened audio device #3
    Opened MIDI: pisound 20:0
    Preset loading: 0 (0 Saw)
    Preset loaded: 0

When I start Pianoteq, I have sound. Anyone knows what I’m missing?

hello @phil, there are several versions of SamplerBox, all of them based on John’s first one.
I recommend you to use this one: as Hans is continuously working on it and doing improvements.
I am running it on a Rpi3B with Pisound. You will have to disable ALSA mixer / GPIO / serialport midi. Another important thing already said in this thread is that you will have to adjust SamplerBox to work at 48kHz. Change the samplerate in the code.
Give it a try and ask me if you have any question.