Difference between revisions of "Midi"

From VideoLAN Wiki
Jump to navigation Jump to search
m (→‎Linux: Ubuntu version updated)
 
(25 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{wikipedia|Musical_Instrument_Digital_Interface#MIDI_file_formats|Midi files}}
+
{{wikipedia|Musical_Instrument_Digital_Interface#Standard MIDI files|label1=Midi files}}
{{Module|name=fluidsynth|type=Codec|description=SMF files playback through fluidsynth library|first_version=0.9.0}}
+
{{Module|name=smf|type=Demux|description=Standard MIDI Files|first_version=0.9.0}}
 +
Standard MIDI Files (SMF) contain sounds events that indicate the notes and instruments in a musical performance, but do not include the digital waveform of the audio.
 +
They usually have the extension <tt>.mid</tt> or <tt>.midi</tt>.
 +
To play a MIDI file, software has to synthesize the music, which usually requires reading digital samples of musical instruments from a large file.
  
Standard MIDI File (SMF) are instrumental musical files carrying sounds events that can be played back with a sound font.
+
== Play .mid (MIDI) files in VLC ==
 +
{{Module|name=fluidsynth|type=Codec|description=MIDI synthesis with the FluidSynth library|first_version=0.9.0 (Linux)|first_version=0.9.0 (Linux)<br />1.1.0 (Windows)|last_version=3.0.x (Windows)|os=Linux}}
  
== Play .midi files in VLC ==
+
{{VLC}} can play Standard MIDI File (.MID) and RIFF MIDI (.RMI) files since version 0.9.0.
{{VLC}} can play MIDI since VLC 0.9.0 on most platforms and 1.1.0 on Windows.
+
 
 +
Windows binary builds included MIDI support only in versions {{VLC}} from 1.1.0 through 2.0.8. Starting from version 2.1.0, support was dropped due to [https://trac.videolan.org/vlc/ticket/9486 security issues]. It was re-activated in VLC 3.0.0.
  
 
=== SoundFonts file ===
 
=== SoundFonts file ===
To playback those .midi files, you need a SoundFont file: .sf2.
+
To playback MIDI files, you need a [[wikipedia:SoundFont|SoundFont]] file (with extension <tt>.sf2</tt>).
 +
You can download them from either of these two places:
  
You can download them here:
+
* http://www.schristiancollins.com/generaluser.php
 +
* http://sourceforge.net/apps/trac/fluidsynth/wiki/SoundFont
  
* http://www.schristiancollins.com/generaluser.php
+
=== Configure SoundFont in VLC ===
* http://fluidsynth.resonance.org/trac/wiki/SoundFont
+
You need to open VLC's preferences. The preferences window has two display modes called '''Simple''' and '''All'''. Choose the display mode called '''All''', then go to '''Input/Codecs''' > '''Audio codecs''' > '''FluidSynth'''. Then select the .sf2 file with '''Browse''' button and save the preferences with '''Save''' button.
 +
 
 +
=== Linux ===
 +
If the '''FluidSynth''' codec is not shown in VLC's preferences, you have to install it as well as sound fonts.
 +
E.g. on [[Ubuntu]] 18.04 and derivatives it is in the '''vlc-plugin-fluidsynth''' package, while the '''fluid-soundfont-gs''' and '''fluid-soundfont-gm''' packages install some sound fonts in <code>/usr/share/sounds/sf2</code>.
 +
 
 +
[[Category:Container]]

Latest revision as of 10:50, 21 March 2019

Module: smf
Type Demux
First VLC version 0.9.0
Last VLC version -
Operating system(s) all
Description Standard MIDI Files
Shortcut(s) -

Standard MIDI Files (SMF) contain sounds events that indicate the notes and instruments in a musical performance, but do not include the digital waveform of the audio. They usually have the extension .mid or .midi. To play a MIDI file, software has to synthesize the music, which usually requires reading digital samples of musical instruments from a large file.

Play .mid (MIDI) files in VLC

Module: fluidsynth
Type Codec
First VLC version 0.9.0 (Linux)
1.1.0 (Windows)
Last VLC version 3.0.x (Windows)
Operating system(s) Linux
Description MIDI synthesis with the FluidSynth library
Shortcut(s) -

VLC media player can play Standard MIDI File (.MID) and RIFF MIDI (.RMI) files since version 0.9.0.

Windows binary builds included MIDI support only in versions VLC media player from 1.1.0 through 2.0.8. Starting from version 2.1.0, support was dropped due to security issues. It was re-activated in VLC 3.0.0.

SoundFonts file

To playback MIDI files, you need a SoundFont file (with extension .sf2). You can download them from either of these two places:

Configure SoundFont in VLC

You need to open VLC's preferences. The preferences window has two display modes called Simple and All. Choose the display mode called All, then go to Input/Codecs > Audio codecs > FluidSynth. Then select the .sf2 file with Browse button and save the preferences with Save button.

Linux

If the FluidSynth codec is not shown in VLC's preferences, you have to install it as well as sound fonts. E.g. on Ubuntu 18.04 and derivatives it is in the vlc-plugin-fluidsynth package, while the fluid-soundfont-gs and fluid-soundfont-gm packages install some sound fonts in /usr/share/sounds/sf2.