Overview

What is it

An open-source audio sampler DYI project based on the Raspberry Pi with the following goals: This has been extended with, amongst others: It is NOT the original SamplerBox by Joseph Ernest, though it is based on it.
So please find all docs, downloads and forum on this site (see sidebar menu) as both versions unintentionly became uncompatible as time past by.

Start

Quick start

See Glenn's site for an easy start to build one with quality soundcard and a nice display.
For other options next might get you going: The rest of this site will give extensive information of all the options/usage and ways to tweak/extend.
In order to keep it a bit readable, lots of extra info is "hidden" in links or clickable images. So if at first glance you didn't find what you're looking for, keep on clicking !

FAQ

..is not 42, but rather: sufficient power supply for your setup

The raspberry specs define the power needed for the PI with some small extras.
If you attach a midi keyboard, a soundcard, a display or whatever you like to add, please remember these may drain power outside "small extras" range.
"My professional keyboard XYZ doesn't seem to work with samplerbox" is recurring question, which has been resolved with power in a lot of cases. But also weird distortions, volume fluctuations, "clicks and plops", weird characters on displays may be caused by unsufficient power.
One of the reasons for the wide range of side effects: if the PI suffers from power shortage, it will limit the cpu speed - because it is not crucial for a lot of applications. But it is killing for samplerbox, as this is real time audio.
Checking this first may save you a lot of time.

Please see Obtaining samples for info on creating new, where/how to look as well as for editing the ones you want to use. At the bottom of that page I've included some search hints for a kick start.

audio waveform png from SeekPNG.com Features of samplerbox (loop, backtracks, release samples and more) rely on extensions of the wav format, unsupported by mp3. So the internal format must adhere to wav standards.
...but mentioned features are optional, so if I don't use them that's no stopper...
You're right, but:
Converting of mp3 samples to wav format on load time will be possible, but would add to memory usage and sample load time. So this is trade off between convenience when making sample sets or convenience and resources at run time.
On top of that I expect confusion = questions on the forum "I can't get this feature working".
Converting samples is easy and hey: it's DIY and free.

Confused I know of four published/documented ones and will explain/link to those in order of appearance:
  1. The one that started all: Joseph's version. It has a downloadable image with source code on GitHub, as well as a forum.
  2. Next came my fork, with documentation you are reading now plus downloadable image, source code on GitHub and dedicated forum.
  3. After that came Erik's fork which he called "samplerbox2" with needed components on his documentation site.
  4. Fourth in line was Alex with a downloadable image, documentation on readthedocs and source code on GitHub.
    Alex's and Joseph's versions are referred to on the Facebook page.
NoSound That's not OK, but some more diagnose information is needed as it usually works.
Items you might check (you may have to start in debug mode): If you still can't find it, refer to the for help.
You may have found a bug, please describe your observations, even the ones seeming unrelated.

brokenusb
Samplerbox logic is: use attached USB stick/drive and if not present, use the internal space. The presence and contents of USB device is checked at startup and with the "new usb" GUI button.

The image is limited in size to ease distribution with a small samples partition, only fit for a limited demo/test.
You can enlarge this partition and subsequently store your samples there, avoiding a USB stick/drive. Enlarging within the samplerbox is explained in the build page. But you can use your PC too using your favorite disk partioning program. Filesystemtype must not be changed!

Filling/changing the contents can be done via either:
- Inserting the SD in a PC and mount the last partition to do your things..
- Starting the box normally
    - Remount the "/samples" in rw mode directory see Commandline access and debugging.
    - Access the box via an sftp program (= using the ssh-protocol) and do your things..
    - Remount "/samples" in ro mode or reboot - anyway, don't just poweroff in rw mode!

Please read about multi timbral devices in "More info".
If you own a keyboard with drumpad sending on the drumchannel=10 and which be reprogrammed to use the master channel, you can keep this pad as part of the master keyboard by using the Keyboards with drumpads technique. This can be handy if you want to use the pads as controller buttons - but do read the referred paragraph and 2 subsequent paragraphs as it is a bit complex.
In general you can always stop via "all-notes-off" controller button if you've defined that (you should!).
Having said that: possible causes of this behaviour might be:
Distortion Usually this is because of input volume of DAC being too high. In general input WAV's should never be louder than -6dB. However: Other items having impact: Bottom line: a safer value would be -12dB. If your editor does not show dB's: -6dB usually shows as 50% or 0.5, -12dB shows as 25% or 0.25 etcetera.
Adapting all WAV's is tedious, so you'd better use the %%gain or %gain parameters. I prefer %gain as these issues are sample related.
The box has a peak limiter implemented, which can be turned on to make life easier. However it's still recommend to tune the volume reasonably well as continuous limiting will negatively impact sound quality - it's meant for peaks only.

Please also read Controlling the volume as input volume is not the only link in the chain.
Next FAQ about clicks&plops closely relates to distortion.
This can be either be plain distortion (see previous FAQ) or CPU issues.
CPU issues can arise when playing very fast (much note-on/off - think of the multiplication of notes when using autochord and/or chorus).
The table in Effects & audio filters gives a full overview of the effects and related CPU impact.
Please note that new versions are developed on PI3B+/PI4 without testing on lower hardware versions.
Also note there is a relation with setting blocksize to a low value (see the "sample rate" FAQ).
Last but not least: using GPIO (e.g. the hardware buttons) hijacks CPU cycles; it is advised to operate the buttons during silence.
Latency As a rule of thumb, the latency between different musicians who want to play together should be <25-30ms. Even without any electronics, there will always be some latency as the speed of sound is relatively low. The latency of two (acoustic) musicians standing 5m away from each other would be already 5m / 343 m/s = 0.0145s = 14.5ms.
Samplerbox adds 10-14msecs to this when using the distributed image with its default values.
The "variable part" 0-3+ msecs is due to speed of play and usage of (auto)chord, chorus, release length and play mode.
The "fixed part" of 10+ msecs can sometimes be optimized depending on the DAC and the way you play: Some considerations as there is more than above internal technique:
Usually your home router will recognize samplerbox, so just the name "samplerbox" should give connection.
However sometimes the host name is not honoured, or samplerbox got another address while the cached name still points to the old address (you name it, it will happen..).
First, you need to know the router's address. In a terminal / command prompt, do "ifconfig" on Linux or "ipconfig" on Windows, and you will find something like:
Default Gateway : 192.168.1.1
You can use the tool nmap (available both on Linux with "apt install" and on Windows here). Replace the last number of the default gateway by 0 and use nmap like this:
nmap 192.168.1.0/24
This will make nmap scanning the network for machines in the range 192.168.1.0 to 192.168.1.254.
Along with your other computers, it will display if the samplerbox Pi has been found, along with its IP address.

Creative Commons BY-SA 3.0 Joseph, see credits, started it under Creative Commons BY-SA 3.0.
Wikipedia translates the text to a diagram.
As for my additions, I added the Beerware license as a commercial purpose is allowed :-)

To start of with the donations:
This is strictly a hobby project for me and since I have a steady day-time job there is no need for donations.
But still many thanks for considering it !
Cooporate

Other contributions are very welcome and may have various appearances:

You can use the for communication. Since you can supply your mailaddress there, we can even start a mailexchange via the normal way. For spam reduction I don't want my mailaddress on the site - that's all.

And obviously, GitHub was made for exchange.

NoInfo It may be covered in the links of the "Quick start" above (maybe dig a layer deeper).
You can also try the More info page .. plus the rest of this site.
If you're still stuck, please refer to the for help.

Creative Commons BY-SA 3.0


Play with: Midi-controllers

Connect native MIDI with: USB midi interface


Produce audio with: USB Audio interface

Videos

The box in a specific setup

DIY in its purest form

Impressive test=demo