JellyJamPreserve is a Raspberry Pi project using Jack Timemachine (http://plugin.org.uk/timemachine/) to record audio in a studio.
JellyJamPreserve is a Raspberry Pi project that uses jack_capture
to record audio on the toggle of a switch. It continuously records audio into a 5 minute circular buffer, and when the switch is turned on the buffer is dumped to a file and it starts recording audio to the file until the switch is turned off. This way you can preserve any cool improvisations by recording sounds from the past!
In other words, if you turn the switch on at 1:05 pm and turn it off at 1:30 pm you will have an audio file with a recording from 1:00 pm to 1:30 pm. If you come up with an amazing riff while playing your guitar just turn on the switch and keep playing.
Install Raspberry Pi OS and make sure you can log into the Raspberry Pi. The instructions below are for Debian version: 11 (bullseye).
$ sudo raspi-config
-> 7 Advanced Options [enter]
-> A1 Expand Filesystem [enter]
Create the file /etc/modprobe.d/alsa-base.conf
and add:
# This sets the index value of the cards but doesn't reorder.
options snd_usb_audio index=0
options snd_bcm2835 index=1
# Does the reordering.
options snd slots=snd_usb_audio,snd_bcm2835
You can verify the order using the aplay
command. After a reboot the USB card should appear as card 0:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Device [C-Media USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
...
jackd
and jack_capture
$ sudo apt-get update
$ sudo apt-get install jackd jack-capture tmux
Log out and log in again.
/dev/gpiomem
$ sudo apt-get install rpi-update
$ sudo rpi-update
$ sudo apt-get install python3 python3-pip
$ sudo pip3 install python-osc
$ sudo pip3 install RPi.GPIO
$ git clone https://github.com/robertodealmeida/jellyjampreserve.git
And to have it start at boot:
$ crontab -e
By adding this line:
@reboot /home/pi/jellyjampreserve/start.sh >> /home/pi/jellyjampreserve.log 2>&1
The script will start the Jack daemon, jack_capture
, and a Python script that listens for events from the switch and starts/stops jack_capture
.
Here's how I did it, slightly different from the Fritzing diagram:
There are many ways to get the recordings from the Pi. You can have Dropbox or Syncthing running in the Pi to automatically synchronize the files with another machine. I prefer to just use scp
in Linux (in Windows you can use WinSCP).