Create a portable synth with a Raspberry Pi (samplerbox)

Create a portable synth with a Raspberry Pi (samplerbox)

samplerbox

Samplerbox (samplerbox.org) is an open hardware / open source synth on a Raspberry Pi.
I’m actually working an a new version with a LCD screen and instrument banks. I also add some modifications from the samplerbox community.

Here are other versions of samplerbox:

This version was made to make it as easy as possible to create instruments / develop new functionalities and to be used outdoors.

This is an unfinished prototype

We are going to :

  • see the needed components
  • Download and copy my samplerbox image
  • Learn how to use it
  • See how to create instrument

 

  • Needed components

    Keep in mind you can reuse any components, no soldering is required
    • LCD Display Shield is a copy of Adafruit LCD shield : Adafruit LCD
    • Most USB-MIDI instruments should works.
    Minimal version
    Portable version
    Speakers version

Installation

  • Download the test version here : samplerBoxLCD (mega)
  • Copy the image (samplerBox.img) on an sdcard (tutorial)

Usage

  • Plug the LCD shield on the Raspberry Pi
  • Plug the USB audio card (pcm2704)
  • Plug your synth
  • Turn on your Raspberry Pi
You can plug and deplug your synth whenever you want, you can even plug multiples USB-midi devices.

You should see your Raspberry Pi started, and 00 Vibraphone should show up on screen.

Here is how to control the screen

  • Menu instrument menu (par défaut)
    • UP/DOWN : Change instrument
    • LEFT/RIGHT : Change menu
    • SELECT : Reload instrument
  • Volume menu
    • UP/DOWN : Change volume
    • LEFT/RIGHT : Change menu
  • Sustain menu
    • UP/DOWN : Enable/Disable sustain
    • LEFT/RIGHT : Change menu
  • Transpose menu
    • UP/DOWN : Transpose 1 octave
    • LEFT/RIGHT : Change menu
  • Quit menu
    • UP/DOWN : Shutdown
    • LEFT/RIGHT : Change menu
    • SELECT : Restart
You can change the volume with any control knob

Copy sounds

  • Plug your Raspberry Pi on Ethernet
  • Search on your network: synth
  • Enter a username : pi
  • Enter a password : a

You should see two folders : samples et software

software folder is where samplerbox and scripts are, inside python folder: you can find samplerbox.py
You can setup and modify samplerbox with samplerbox.py

samples folder is where the samples are.
The name of each instrument starts with a number ,(for example: 11 Pan Flute)

Inside instrument folder , samples are named by there note :for example a#2.wav
If you play an b2 and there is no b2.wav then it will play a#2.wav (for example) faster (with a higher pitch).

  • You don’t need to create all notes to create an functional instrument.
  • Try to create long note first and reduce the length of the note until it sounds right.

You can use Reason NN-XT as an example on how to make samples (especially for the note range)

nnxt

  • Export loop to generate a .wav file in \\synth\samples\number instrument_name\

If you create a new instrument, you need to restart your Raspberry Pi
If you have modify a instrument, press SELECT to reload the instrument
How to make instruments with velocity

Debug mode on terminal

  • Stop samplerbox
    /do/samplerbox/panic
  • Start samplerbox
    /do/samplerbox/check

Issues

  • SD card is not in read-only / optimized as the original version
  • Pop noises can be heard when volume is too high (stay at volume 0.5 for more safety and avoid using too many notes as the same time)
  • Slow down on long samples if played fast
  • Volume can be too low, if speakers are not correctly amplified.
  • When buttons are pressed , this can generate audio glitch
  • Volume button and sustain button are linked
  • Release (time before the note fadeout) can’t be set for each instruments (FADEOUTLENGTH)

Synthetizer usually have 4 parameters : ATTACK / DECAY / SUSTAIN / RELEASE (ADSR)

Notes

Here is what have been added on this version of samplerbox

  • A 16×2 LCD (To choose your instruments, show their name  / set the volume / stop it)
  • If no definition file is used , velocity will be managed by changing volume
  • You can set the volume on your midi controller
  • Some instruments to show how to make them
  • File sharing (samba) to copy / modify samples while testing them

 

Manual Install

(note : The installer is not finished)
(note : There are still issues with samba)

curl -L piget.madnerd.org | sudo bash

  • Setup your Raspberry Pi name

/pi/setup

  1. Name : synth
  2. Password : (choose your own)
  3. Color : (choose your own)
  • Install samplerbox

/pi/install samplerbox

This will install:

  • Python dependencies
  • Samplerbox
  • Create samba file sharing (\\synth\samples and \\synth\software)
  • Install adafruitLCD library

16×2 LCD Display

Add theses line at the end of these files
(note : this will be automate)

Comments are closed.