Jump to content

Tutorials/MIDI on Linux: Difference between revisions

From KDE UserBase Wiki
Plcl (talk | contribs)
created MIDI on Linux tutorial
 
Claus chr (talk | contribs)
Marked this version for translation
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:I18n/Language Navigation Bar|Tutorials/MIDI on Linux}}
<languages />
<translate>
<!--T:1-->
__TOC__
{{OutdatedPage}}


MIDI is a set of technologies related to musical data description and transmission, but not a digital audio format. To use most MIDI software on Linux, like on any other operating system, a MIDI synthesizer is required.
<!--T:24-->
{{Info|MIDI is a set of technologies related to musical data description and transmission, but not a digital audio format. To use most MIDI software on Linux, like on any other operating system, a MIDI synthesizer is required.}}


A MIDI synthesizer converts MIDI events into sound. The synthesizer can be an external hardware device, or integrated into a sound card. It may also be a software synthesizer, ie a program.
<!--T:2-->
A MIDI synthesizer converts MIDI events into sound. The synthesizer can be an external hardware device, or integrated into a sound card. It may also be a software synthesizer, i.e. a program.


There are MIDI files with the .MID extension, containing music in MIDI data format. One way to explain it is in culinary terms. Listening music on a Compact Disc is similar to eating in a restaurant, and MP3 would be comparable to fast food. In addition, a MIDI file is like a recipe: you have to get the proper ingredients and use cooking utensils. Instead of oven, pots and pans you will be using MIDI synthesizers. Like any good geek and Linux user, you will want to change the recipe and ingredients. Then do it! In [[KMid2]] you can open the "channels" window and switch the piano for a guitar or whatever you prefer.
<!--T:3-->
There are MIDI files with the .MID extension, containing music in MIDI data format. One way to explain it is in culinary terms. Listening to music on a Compact Disc is similar to eating in a restaurant, and MP3 would be comparable to fast food. In addition, a MIDI file is like a recipe: you have to get the proper ingredients and use cooking utensils. Instead of oven, pots and pans you will be using MIDI synthesizers. Like any good geek and Linux user, you will want to change the recipe and ingredients. Then do it! In [[Special:myLanguage/KMid2|KMid]] you can open the "channels" window and switch the piano for a guitar or whatever you prefer.


==External MIDI Synthesizers==
==External MIDI Synthesizers== <!--T:4-->


They are musical instruments that can be connected to the computer, or to other instruments through MIDI cables. To do this, your computer must have a MIDI interface. There are sound cards with MIDI interfaces, and also USB adapters supported by ALSA with the corresponding kernel module. There are even MIDI instruments that can be connected directly to your computer via USB. In any case, you should check that the MIDI interface model is supported by ALSA at the following address: http://www.alsa-project.org/main/index.php/Matrix:Main
<!--T:5-->
These are musical instruments that can be connected to the computer, or to other instruments through MIDI cables. To do this, your computer must have a MIDI interface. There are sound cards with MIDI interfaces, and also USB adapters supported by '''ALSA''' with the corresponding kernel module. There are even MIDI instruments that can be connected directly to your computer via USB. In any case, you should check that the MIDI interface model is supported by '''ALSA''' at [http://www.alsa-project.org/main/index.php/Matrix:Main the ALSA project site]


<!--T:6-->
In summary, this option will need:
In summary, this option will need:
<!--T:7-->
* MIDI Interface
* MIDI Interface
* ALSA Driver for the MIDI interface
* ALSA Driver for the MIDI interface
* MIDI Cables  
* MIDI Cables  


==Hardware Synthesizer Sound Cards==
==Hardware Synthesizer Sound Cards== <!--T:8-->


Some sound cards, such as the ones manufactured by Creative Labs (SB AWE, Sound Blaster Live! and Audigy) have a MIDI synthesizer using wave-table sound samples as a synthesis method. These samples are being loaded into the sound card before using MIDI software, preferably at system boot. If you own one of these cards:
<!--T:9-->
Some sound cards, such as the ones manufactured by ''Creative Labs'' (SB AWE, Sound Blaster Live! and Audigy) have a MIDI synthesizer using wave-table sound samples as a synthesis method. These samples are being loaded into the sound card before using MIDI software, preferably at system boot. If you own one of these cards:


* In addition to ALSA, also install the software package "awesfx" which includes the sound samples loader, ALSA scripts and udev rules to automatically load on system boot.
<!--T:10-->
* Install SoundFont files provided by the manufacturer or other alternative SF2 files in /usr/share/sounds/sf2.
* In addition to ALSA, also install the software package '''awesfx''' which includes the sound samples loader, ALSA scripts and udev rules to automatically load on system boot.
* Edit the configuration file /etc/sysconfig/sound. On the value for the key "SOUNDFONT_FILES", provide the name of one or several SF2 files that must be loaded on system startup. The file names and locations may vary from one distribution to another, these instructions apply to openSUSE.
* Install '''SoundFont files''' provided by the manufacturer or other alternative SF2 files in /usr/share/sounds/sf2.
* Edit the configuration file /etc/sysconfig/sound. On the value for the key <menuchoice>SOUNDFONT_FILES</menuchoice>, provide the name of one or several SF2 files that must be loaded on system startup. The file names and locations may vary from one distribution to another, these instructions apply to ''openSUSE''.


SoundFont files can also be loaded manually. Read the manual of "asfxload" for more information.  
<!--T:11-->
'''SoundFont files'''can also be loaded manually. Read the manual of '''asfxload''' for more information.  


==Software Synthesizers==
==Software Synthesizers== <!--T:12-->


The classic software synthesizer for Linux is [http://timidity.sf.net TiMidity++], but the latest release is from 2004. It requires sound samples in GUS or SF2 format. It can be used independently as a player, but if you want to use it in conjunction with other ALSA sequencer compatible programs, you must provide the "-iA" option, for example:
<!--T:13-->
The classic software synthesizer for Linux is [http://timidity.sf.net TiMidity++], but the latest release is from 2004. It requires sound samples in ''GUS'' or ''SF2'' format. It can be used independently as a player, but if you want to use it in conjunction with other ALSA sequencer compatible programs, you must provide the "-iA" option, for example:


$ timidity -iA
<!--T:14-->
{{Input|1= timidity -iA}}


Another software synthesizer, with modern and modular design and active maintenance is [http://www.fluidsynth.org FluidSynth]. It uses sound samples in SF2 format, and has a friendly graphic interface called [http://qsynth.sf.net QSynth]. You can also run it from the command line, for example:
<!--T:15-->
Another software synthesizer, with modern and modular design and active maintenance is [http://www.fluidsynth.org FluidSynth]. It uses sound samples in ''SF2'' format, and has a friendly graphic interface called [http://qsynth.sf.net QSynth]. You can also run it from the command line, for example:


$ fluidsynth -a alsa /usr/share/sound/sf2/soundfont.sf2  
<!--T:16-->
{{Input|1= fluidsynth -a alsa /usr/share/sound/sf2/soundfont.sf2 }}


<!--T:17-->
or:
or:


$ fluidsynth -a pulseaudio /usr/share/sound/sf2/soundfont.sf2  
<!--T:18-->
{{Input|1= fluidsynth -a pulseaudio /usr/share/sound/sf2/soundfont.sf2 }}


<!--T:19-->
The graphical configuration of [http://qsynth.sf.net QSynth] is quite simple. See the following example [http://qsynth.sourceforge.net/qsynth-screenshots.html screenshots].
The graphical configuration of [http://qsynth.sf.net QSynth] is quite simple. See the following example [http://qsynth.sourceforge.net/qsynth-screenshots.html screenshots].


==SoundFont Files==
==SoundFont Files== <!--T:20-->


<!--T:21-->
These files represent the fish, meat and vegetables in your MIDI recipe. Here are some recommendations.
These files represent the fish, meat and vegetables in your MIDI recipe. Here are some recommendations.


<!--T:22-->
* SoundFonts Collections: [http://www.hammersound.net http://www.hammersound.net]
* SoundFonts Collections: [http://www.hammersound.net http://www.hammersound.net]
* [http://www.schristiancollins.com/generaluser.php General User GS], by S.Christian Collins.  
* [http://www.schristiancollins.com/generaluser.php General User GS], by S.Christian Collins.  
::Available at [http://packman.links2linux.de/package/GeneralUser/ packman repositories] for openSUSE.  
**Available at [http://packman.links2linux.de/package/GeneralUser/ packman repositories] for openSUSE.  
* FluidR3. A big, high quality SoundFont.  
* FluidR3. A big, high quality SoundFont.  
::Available for openSUSE [http://jftp.medozas.de  packaged by Jan Engelhardt].  
**Available for openSUSE [http://jftp.medozas.de  packaged by Jan Engelhardt].  
::There is also a [http://packages.debian.org/sid/fluid-soundfont-gs Debian package].
**There is also a [http://packages.debian.org/sid/fluid-soundfont-gs Debian package].
 
<!--T:23-->
[[Category:Multimedia]]
[[Category:Tutorials]]
 
</translate>

Latest revision as of 09:12, 23 January 2022

Page is outdated

This page is outdated: Please help us to cleanup parts that are no longer true and add missing information

Information

MIDI is a set of technologies related to musical data description and transmission, but not a digital audio format. To use most MIDI software on Linux, like on any other operating system, a MIDI synthesizer is required.


A MIDI synthesizer converts MIDI events into sound. The synthesizer can be an external hardware device, or integrated into a sound card. It may also be a software synthesizer, i.e. a program.

There are MIDI files with the .MID extension, containing music in MIDI data format. One way to explain it is in culinary terms. Listening to music on a Compact Disc is similar to eating in a restaurant, and MP3 would be comparable to fast food. In addition, a MIDI file is like a recipe: you have to get the proper ingredients and use cooking utensils. Instead of oven, pots and pans you will be using MIDI synthesizers. Like any good geek and Linux user, you will want to change the recipe and ingredients. Then do it! In KMid you can open the "channels" window and switch the piano for a guitar or whatever you prefer.

External MIDI Synthesizers

These are musical instruments that can be connected to the computer, or to other instruments through MIDI cables. To do this, your computer must have a MIDI interface. There are sound cards with MIDI interfaces, and also USB adapters supported by ALSA with the corresponding kernel module. There are even MIDI instruments that can be connected directly to your computer via USB. In any case, you should check that the MIDI interface model is supported by ALSA at the ALSA project site

In summary, this option will need:

  • MIDI Interface
  • ALSA Driver for the MIDI interface
  • MIDI Cables

Hardware Synthesizer Sound Cards

Some sound cards, such as the ones manufactured by Creative Labs (SB AWE, Sound Blaster Live! and Audigy) have a MIDI synthesizer using wave-table sound samples as a synthesis method. These samples are being loaded into the sound card before using MIDI software, preferably at system boot. If you own one of these cards:

  • In addition to ALSA, also install the software package awesfx which includes the sound samples loader, ALSA scripts and udev rules to automatically load on system boot.
  • Install SoundFont files provided by the manufacturer or other alternative SF2 files in /usr/share/sounds/sf2.
  • Edit the configuration file /etc/sysconfig/sound. On the value for the key SOUNDFONT_FILES, provide the name of one or several SF2 files that must be loaded on system startup. The file names and locations may vary from one distribution to another, these instructions apply to openSUSE.

SoundFont filescan also be loaded manually. Read the manual of asfxload for more information.

Software Synthesizers

The classic software synthesizer for Linux is TiMidity++, but the latest release is from 2004. It requires sound samples in GUS or SF2 format. It can be used independently as a player, but if you want to use it in conjunction with other ALSA sequencer compatible programs, you must provide the "-iA" option, for example:

timidity -iA

Another software synthesizer, with modern and modular design and active maintenance is FluidSynth. It uses sound samples in SF2 format, and has a friendly graphic interface called QSynth. You can also run it from the command line, for example:

fluidsynth -a alsa /usr/share/sound/sf2/soundfont.sf2

or:

fluidsynth -a pulseaudio /usr/share/sound/sf2/soundfont.sf2

The graphical configuration of QSynth is quite simple. See the following example screenshots.

SoundFont Files

These files represent the fish, meat and vegetables in your MIDI recipe. Here are some recommendations.