Accueil > Informatique [computer science] > Linux > Music under Linux

Music under Linux

How to connect a Yamaha CS1X synthesizer to Linux

dimanche 28 avril 2013, par Vincent MAGNIN

My Yamaha CS1X, a synthesizer released in 1996, is linked to an old Ensoniq ES1371 AudioPCI soundcard, via a MIDI cable. This cable has two DIN connectors : the DIN In ("in the soundcard") must be put in the Out Midi port of the CS1X and the DIN Out in the In Midi port.

Concerning the software

- launch qjackctl, without starting the Jack server,
- launch qmidiroute,
- In the connection window of qjackctl, connect (by selecting these ports and pressing "Connect") the Ensoniq port on the left panel (the CS1X in fact) to qmidiroute In on the right.
- Notes played on the CS1X should appear in qmidiroute.
- Launch fluidsynth using the following command : fluidsynth -C no -R no -l -s -a jack -j -r 44100 -g 1 -o audio.periods=2 /usr/share/sounds/sf2/FluidR3_GM.sf2
- In qjackctl, connect the Ensoniq port on the left to fluidsynth on the right panel.
- Play music !

You can use zynaddsubfx the same way, using the command : zynaddsubfx -a

USB/MIDI interface

I have just bought for 38 € a E-MU Xmidi 2x2 USB/MIDI interface to connect my old Yamaha CS1X synthesizer and can report that it works out of the box with Linux Kubuntu 13.04. Note that it comes with a USB cable and a protective cover but without MIDI cables. My decision was based on this page.

This is how it appears in my system :

~$ amidi -l
Dir Device    Name
IO  hw:1,0,0  E-MU Xmidi 2x2 MIDI 1
IO  hw:1,0,1  E-MU Xmidi 2x2 MIDI 2
~$ lsusb
Bus 002 Device 003: ID 041e:3f0f Creative Technology, Ltd

A cheap USB Master Keyboard

If you have no synthesizer, the Miditech Midistart 3 is a cheap (58 €) master keyboard with 49 keys that is plug&play under Linux (tested with Ubuntu 14.10). You have just to plug the USB cable and to use QJackCtl to connect it to a synth software.

No name appears in the USB list :

~$ lsusb
Bus 001 Device 005: ID 2702:2702

But in QJackCtl it appears as "Hua Xing".

Other interesting commands and softwares

- cat /proc/asound/cards : list all your audio cards.
- aplay -l : list all soundcards and digital audio devices.
- vkeybd : a simple virtual keyboard.
- timidity : "TiMidity is a MIDI to WAVE converter that uses Gravis Ultrasound-compatible patch files and/or AoundFonts to generate digital audio data from General MIDI files."
- gmidimonitor
- amidi -l : list all hardware ports
- amidi --dump : print received Midi data as hexadecimal bytes
- aplaymidi -l : list all possible output Midi ports
- aconnect
- LMMS (Linux MultiMedia Studio)
- Rosegarden : a MIDI/audio sequencer with score editing.
- pyo (Python digital signal processing module)
- midiutil (a Python interface for writing multi-track MIDI Files)


- Ted’s Linux MIDI Guide
- Linux MAO, la ressource collaborative francophone sur tout ce qui touche à la Musique Assistée par Ordinateur en Logiciels Libres.
- LinuxMusicians - creating music freely : a forum, in english, where you can find help.
- JOHN MARTIN UNGAR, MAKING MUSIC - Connecting a MIDI keyboard to your Linux system, Linux Magazine, no. 88, pp. 51-55, march 2008.
- A list of USB Midi devices linux friendly : http://alsa.opensrc.org/USBMidiDevices
- MIDI File Format
- How to vocode with audacity : https://www.youtube.com/watch?v=iSNWoJcYARM