Skip to content

Fluidsynth harmonium instrument running on Raspberry pi

Notifications You must be signed in to change notification settings

ledlaux/harmoniumid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 

Repository files navigation

Harmonium on Fluidsynth

In search for the best free sounding harmonium virtual instrument i found N'hyra Virakah recorded harmonium in Decent sampler format: https://www.youtube.com/watch?v=6j1xUndPMio&t=785s

Then the idea arose to try to convert this Decent sampler preset for use with the Fluidsynth.

Instructions:

  1. Download free harmonium Decent sampler preset from N'hyra Virakah patreon page
    https://www.patreon.com/posts/indian-harmonium-90825095

  2. Convert the preset to SFZ format with DSconverter by Eodowd
    https://github.com/eodowd/ds2sfz

  3. Convert SFZ file to SF2 soundfont
    You can use Sforzando or Polyphone apps to do that

Thats it!

Now you can load this instrument in to the Fluidsynth and play it. To make a portable harmonium instrument to exercise with headphones you can use it with Android Fluidsynth app and midi keyboard connected to your phone.

This instrument has some additional settings which can be asigned to midi keyboard: volume (CC 7), sustain (CC 64), reverb (CC 91), chorus (CC 93)

A prototype of Harmoniumid on Raspberry pi zero w

I had a raspberry pi zero laying around so next idea came to test this instrument on it, and it worked wonderfully!

document_5845933467518374742.mp4

You will need:

  • Raspberry pi zero w (or other Raspberry pi) with power adapter or powerbank

  • Usb hub

  • Any compact usb soundcard or hdmi vga adapter cable with audio out (I could not make raspbery pi audio out to work with my adapter cable so used the sound card. Maybe with different cable it will work, try it. Than will be no need for a usb hub)

  • 3.5mm audio cable to connect to speakers if needed

  • Microusb to usb cable adapter (otg cable)

  • Midi keyboard

For this project M-audio Keystation Mini 32 MK3 is perfect because it is compact, not expensive, the key range is enough, also you can edit velocity and midi cc on the device itself.

Instructions:

  1. Install Raspbian Lite OS in headless mode with SSH (instruction could be found in internet)

  2. Updade the system
    sudo apt update

  3. edit /boot/config.txt to disable raspbery pi default sound card
    put dtparam=audio=off

  4. Add user pi to audio group
    usermod -a -G audio pi

  5. Adjust your default soundcard in alsa configuration file sudo nano /etc/asound.conf
    defaults.pcm.card 1
    defaults.ctl.card 1

  6. Install Fluidsynth
    sudo apt-get install fluidsynth

  7. Copy your converted SF2 soundfont file to the raspberry pi home directory

  8. Copy script harmoniumid.sh file to home directory /home/pi
    It is simple script which starts Fluidsynth with harmonium soundfont and your midi keyboard

  • Adjust the buffer size with -z parameter (minimal i could use without audio distortion and much of latency on this device was 160)
  • Adjust gain with -g parameter
  1. Test midi keyboard connection to get a device number
    amidi -l

  2. Adjust midi device number in harmoniumid.sh file
    nano ./harmoniumid.sh
    midi.alsa.device=hw:2,0
    give execute permission to your script: chmod +x /home/pi/harmoniumid.sh

  3. Add ./harmoniumid.sh to your ~/bashrc file to start instrument on boot

  4. Make raspbery pi sd card read-only with raspi-config settings

  5. Restart and enjoy!

PS. Loading of the instrument can take up to 1 minute, because of the raspbery pi zero booting time. You can make it load little faster by some tweaks (disabling bluetooth in /boot/config.txt and other).

Send your thanks to N'hyra Virakah for a great harmonium recording and programming!

https://www.patreon.com/nhyravirakah

About

Fluidsynth harmonium instrument running on Raspberry pi

Topics

Resources

Stars

Watchers

Forks

Languages