I have successfully configured the Raspberry Pi with raspbian (dedicated debian/linux) to work as a sound generator for Akai EWI USB.
Raspbian was installed as described in
http://www.raspberrypi.org/downloads
I have performed initial configuration so, that sound is output through the headphones jack.
Because I have a RPi 2.0 B, with 512 MB of RAM, I have disabled swap, by adding
"exit 0" at the begining of the /sbin/dphys-swapfile utility (to avoid fast wear of the SD card).
Then I have updated packages and installed the fluidsynth.
I have also downloaded the alto_saxophone soundfont (it was available somewhere in the sfpack format, so I converted it to the sf2) and put in into the
/home/pi/synth folder
In my RPi SD I have modified the /etc/rc.local so, that it starts synthesizer:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
(
cd /home/pi/synth
./start
)
exit 0
The /home/pi/synth/start file has the following content:
#!/bin/sh
/usr/bin/fluidsynth -r 48000 -z 256 -c 4 -m alsa_seq -g 2 -p hw:1,0,0 -a alsa -s -i -o shell.port=12345 &
/bin/sleep 2
/bin/nc localhost 12345 < fluid.conf
/usr/bin/aconnect 20 128
The /home/pi/synth/fluid.conf has the following content:
router_begin note
router_chan 1 16 1 0
router_par1 0 127 1 0
router_par2 0 127 0 127
router_end
router_begin cc
router_chan 1 16 1 0
router_par1 2 2 1 5
router_par2 0 127 1 0
router_end
router_begin cc
router_chan 1 16 1 0
router_par1 34 34 1 5
router_par2 0 127 1 0
router_end
load alto_saxophone.sf2
select 15 1 0 3
In the above I assume, that EWI USB is visible as MIDI client 20, and fluidsynth is visible as MIDI client 128
(below is th output of "aconnect -i" and "aconnect -o" in my system):
pi@raspberrypi ~ $ aconnect -i
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'EWI-USB' [type=kernel]
0 'EWI-USB MIDI 1 '
pi@raspberrypi ~ $ aconnect -i
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
pi@raspberrypi ~ $ aconnect -i
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 20: 'E-MU Xboard49' [type=kernel]
0 'E-MU Xboard49 MIDI 1'
I also assume that my EWI USB is configured to send MIDI notes in the 15th channel.
If your system/EWI is configured in a different way, you may need to modify
the "aconnect 20 128" and "select 15 1 0 3" lines.
The presented configuration of fluidsynth router assures translation of the breath control to the volume, which allows to continuously modify the note volume.
The RPi configured in that way does not need neither keyboard, nor display, nor network connection. You can simply plug EWI USB to the USB port and headphones (or amp cable) to the audio output, and after powerup it is ready to play ;-).
--
Regards,
Wojtek
PS. There is a website which proposes probably better configuration of RPi for operation with Akai EWI USB:
http://wiki.joanillo.org/index.php/EWI-USB_amb_la_Raspberry_Pi
My setup is simply "minimalistic"...