Raspberry Pi based Mellotron Emulator


10 posts
by Khorus » Sat Nov 03, 2012 2:28 am
Hello all,

After playing around with my Pi for a while, I decided to try to do a Mellotron (the famous keyboard that made Genesis and Yes sound like they did).

I'm happy to report that the Pi is very capable to act as a basic sampler playback machine! I used Raspbian and FluidSynth. Tweaked the parameters until I had a perfectly playable synth/sampler. There's no noticable latency and it plays great.

I posted a short video on YouTube: http://www.youtube.com/watch?v=mftY3sngEzk

Cheers!

Marc Girard
bluaudio.org
Posts: 4
Joined: Sat Nov 03, 2012 2:19 am
by mhelin » Sat Nov 03, 2012 9:40 am
Hello,
Great stuff! Expect the output sound quality to improve after the I2S DAC's and codecs are available with the ALSA support, though in Mellotron emulation the sound quality isn't measurable by SNR.

So how did you actually set up the parameters? From the video the latency look to be well in control. Did you really use the internal PWM PCM output or some external USB audio device?
Posts: 99
Joined: Wed Oct 17, 2012 7:18 pm
by Khorus » Sun Nov 04, 2012 2:10 pm
That's why I choose to do a Mellotron emulator... The sounds are from the 60's and the "crapiness" of the Pi's audio output kind of adds to the whole thing! :) I'd like to have a better digital to analog stage/output for sure but that was mainly a research project to see if the Pi could do that job well, without too much latency. I'm happy to report that it's very capable!

To answer your question, I used the standard audio jack output. You don't see it much in the video but the Pi is on top of the small black PC that's there for recording the Pi's output... What you hear in the video is the true, unprocessed output of the Pi.

Thanks for the nice words!

Marc Girard
bluaudio.org
Posts: 4
Joined: Sat Nov 03, 2012 2:19 am
by toxibunny » Sun Nov 04, 2012 4:21 pm
Hiya marc, is there any way to slow down/speed up sample playback to get the different notes, or do you just have a separate sample for each note?
note: I may or may not know what I'm talking about...
Posts: 999
Joined: Thu Aug 18, 2011 9:21 pm
by Khorus » Tue Nov 06, 2012 2:33 pm
Both options are available. I have the full notes mapped because I wanted it to be as close to the original as possible. But with 256K of RAM, sometimes, we'll have to cut down of the samples number!

I've been thinking about a Wurzliter Electric Piano done with the Pi, I'll certainly use few samples per note as there's more velocities to be added and such...

Marc Girard
Bluaudio.org
Posts: 4
Joined: Sat Nov 03, 2012 2:19 am
by helander » Wed Nov 07, 2012 12:11 am
Would it possible for you to share the details of your setup. Did you use jackd or just plain alsa? Your fluidsynth command line? Any other setup, e.g. alsa configuration, Rasbian version, kernel modules loaded?

Thanks

Lars
Posts: 3
Joined: Sat Jul 28, 2012 9:33 am
by Khorus » Wed Nov 21, 2012 1:51 am
Hello all,

Here's a little update about my "TronPi" project. I reformatted my SD Card and used ArchLinux instead of Raspbian. It was a little bit more trouble to make it work but on the positive side: The TronPi now boots in 15 seconds flat... (Twice as fast as Raspbian!).

I will post my FluidSynth command line for those who wants to know about it, I'm still tweaking the thing, it changes all the time! So far it looks something like: fluidsynth -a alsa -m alsa_raw -o midi.alsa.device=hw:1 -o audio.periods=3 -f fluidsynth.conf soundfont.sf2

That's pretty much it for the news, lemme know if it works out for you... I'd like to add some kind of swtiches to change sounds and some better soundcard for better/louder output. Cheers!

Marc Girard
bluaudio.org
Posts: 4
Joined: Sat Nov 03, 2012 2:19 am
by sneilan » Wed Jun 12, 2013 2:07 am
How big was your soundfont? Also, what was in your fluidsynth.cnf file?

When I run fluidsynth on my raspberry pi model B with arch linux arm, I get terrible warbly, cracking sounds. I think it's because the cpu usage is ~60% all the time when fluidsynth is running.
Posts: 2
Joined: Thu May 30, 2013 11:49 am
by Because » Tue Feb 04, 2014 3:54 pm
Hi! I'm very impressed by the youtube demo of Pi Mellotron. Is there any way of downloading SD image? I'm new to raspberry and linux, and love the sounds. Thanx in advance!
Posts: 1
Joined: Tue Feb 04, 2014 3:48 pm
by sneilan » Tue Feb 04, 2014 4:53 pm
Yes, I would love to download the SD image too
Posts: 2
Joined: Thu May 30, 2013 11:49 am