[JosephErnest] wanted a cost-effective alternative to the commercially available MIDI samplers and expanders on the market. He also wanted to avoid being tethered to a computer all the time. His solution is the SamplerBox, a standalone drop-and-play sampler that costs less than 100 euros to make. Simply insert an SD card with your sample set in WAV format, boot it up, and play it through your keyboard or MIDI controller to your heart’s content!
[JosephErnest] used a Raspberry Pi 2 in the SamplerBox because it provided higher performance. He wasn’t thrilled with the sound quality of its built-in soundcard, so he installed a USB DAC PCM2704 (an older model, but any USB DAC will do) to output the audio. He also installed a USB card reader to make switching SD cards containing sampler sets easier while keeping the Pi 2’s own microUSB card exclusively for the OS and software. Both a DIN MIDI connector and USB are included as MIDI inputs in the design. If you only plan to use a USB, the MIDI connector can be omitted from the build. The software is written in Python and cython which allows the Pi 2 to have over 128-voice polyphony. Users can also create their own sample sets to use with the SamplerBox. Preset changes can be made on the fly. All we need to rock out are some music lessons!
[via Reddit]
I don’t think I’ve ever seen a schematic done in MSPaint before. Eh, whatever works, I guess…
I really like it. Cool!
Why does it need the USB DAC?
Can’t you use the audio output of the raspi?
the default analog (not HDMI) audio jack on the pi is notoriously noisy. it is recommended if you want good analog audio you use a USB Soundcard.
Yeah, Justin is right. Analog audio on RPi has a really bad DAC, it sounds okay if you only want to sound a warning sound or something. But anything else: buy a cheap USB Soundcard!
If you want *really* low noise, there was a recent article on SPDIF for the Teensy.
Still gotta convert, amplify and send to transducers somehow. SPDIF is just an interchange.
Or take a look at these guys for hi quality audio out from your Pi
http://iqaudio.com/
Well, i am sorry, but i think this is only a game… What is the delay time ?? it is the key. Real time is the most important issue for a musician. Besides, this project is only a raspberry with an enclosure and something more. Sorry
A game? Lol you probably haven’t tested it :)
The code is optimized for low latency : the latency is lower than when I use a PC + DAW + piano VST with a profesionnal audio interface.
Look at this video (thanks @huskypop for this video), it shows the low latency better than all our words :)
https://www.youtube.com/watch?v=u965qqNJqQM
You can clearly hear the delay on the video, between the noise of the key and the sound of the piano. So I am septic… Have you a reel value of the time latency ? (key detection + sound generation + driver latency). For a musicien you need less than 10 ms.
you probably haven’t tried it. i did. the latency is really good.
Perhaps if you play keyboards, but I want a solution for playing drum, and the latency have to be really shorter than for playing piano.
You can add a short code “latency=low” , change bit and lower polyphony. I was able to achieve around 35-40ms. I used it as a drum trigger.
WHAT size sample file I can upload to SD card ,it can support stereo Samples
You can load sample-sets up to 1 GB (with a little headroom for minimal OS, so it is more something like ~900MB).
Yes, stereo samples supported.