Skip to content

Instantly share code, notes, and snippets.

@nickstanish
Created January 14, 2014 18:22
Show Gist options
  • Save nickstanish/8423074 to your computer and use it in GitHub Desktop.
Save nickstanish/8423074 to your computer and use it in GitHub Desktop.
Setting up timidity for use with unimidi in ruby on a raspberry pi. Please read all of it before you proceed. This is the exact steps I took, but do so at your own risk.
> sudo apt-get install timidity
> sudo apt-get install fluid-soundfont-gm fluid-soundfont-gs
[edit] /etc/timidity/timidity.cfg for these changes
*************************************************************
## If you have a slow CPU, uncomment these:
opt EFresamp=d #disable resampling
opt EFvlpf=d #disable VLPF
opt EFreverb=d #disable reverb
opt EFchorus=d #disable chorus
opt EFdelay=d #disable delay
opt anti-alias=d #disable sample anti-aliasing
# opt EWPVSETOZ #disable all Midi Controls
# opt p32a #default to 32 voices with auto reduction
# opt s32kHz #default sample frequency to 32kHz
opt fast-decay #fast decay notes
# By default, try to use the instrument patches from freepats:
# source /etc/timidity/freepats.cfg
soundfont /usr/share/sounds/sf2/FluidR3_GM.sf2
**********************************************************************
> cat /proc/asound/cards
count number of items. I get 1 on pi which corresponds to the index below
> sudo modprobe snd-virmidi index=1
but we want it to do this automatically on startup
and we do this so that the os will allow virtual midi output to timidity
-----the next group didnt seem to work:
> sudo nano /etc/rc.conf
> MODULES=(snd-virmidi)
> sudo nano /etc/modprobe.d/virmidi.conf
> options snd-virmidi index=1
> sudo nano /etc/default/timidity
> TIM_ALSASEQ=true
> aconnect -ol
find first virtual raw midi: 20:0
find first timidity: 128:0
---also didnt seem to work:
> sudo crontab -e
add:
> @reboot aconnect 20:0 128:0
> /dev/null 2>&1 # for logging I believe instead of mailing log
save and reboot
[timidity should start automatically and be connected to first virtual port]
----> module loading and connect didn't seem to work
// timidity started automatically
// but still need to connect since that didnt seem to work
> sudo modprobe snd-virmidi index=1
> aconnect -ol
> aconnect 20:0 128:0
> rvm use ruby --default
[gem install unimidi, micromidi]
--Done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment