Vejledning/MIDI på Linux

From KDE UserBase Wiki
Revision as of 09:54, 21 November 2010 by Claus chr (talk | contribs) (Importing a new version from external source)

{{Info/da|MIDI er et sæt af teknologier relateret til beskrivelse ov overførsel af musikalske data, men er ikke et digitalt lydformat. For at bruge MIDI-software under Linux kræves en MIDI-synthesizer ligesom under ethvert andet operativsystem.

En MIDI-synthesizer omformer MIDI-begivenheder til lyd. Synthesizeren kan være en ekstern enhed eller være integreret i et lydkort. Det kan også være en software-synthesizer, fx et program.

Der er MIDI-filer med filnavnsendelsen .MID, som indeholder musik i MIDI-dataformat. Det kan forstås ved en kulinarisk sammenligning. At lytte til musik på en cd svarer til at spise på en restaurant og mp3 svarer til fastfood. En MIDI-fil kan så sammenlignes med en opskrift: du skal have de rigtige ingredienser og bruge køkkenudstyr. I stedet for ovn, gryder og pander skal du bruge MIDI-synthesizere. Du vil måske ændre opskrift og ingredienser. Gør det bare! I KMid kan du åbne vinduet "kanaler" og udskifte klaveret med en guitar eller hvad du nu vil.

Eksterne MIDI-synthesizere

Der er musikinstrumenter, som kan forbindes med din computer eller med andre instrumenter igennem MIDI-kabler. Til det formål skal din computer have et MIDT-interface. Der findes lydkort med MIDI-interface og også USB-adaptere, som understøttes af ALSA med det tilsvarende kernemodul. Der er endda MIDI-instrumenter, som kan forbindes direkte til din computer via USB. Under alle omstændigheder bør du tjekke, om et bestemt MIDI-interface understøttes af ALSAALSA-projektets side

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.