Difference between revisions of "MIDI"

From Free Pascal wiki
m (Playing MIDI files: Updated heading)
(Playing MIDI files: alpha sort entries; expand descriptions; fix page link format)
Line 14: Line 14:
  
 
Standard MIDI Files (SMF) contain sound 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.
 
Standard MIDI Files (SMF) contain sound 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.
 
=== Windows ===
 
 
* https://bitbucket.org/avra/ct4laz/downloads/pl_win_midi.zip
 
* [http://breakoutbox.de/pascal/pascal.html#TMidi TMidiInput and TMidiOutput components]
 
* [http://www.delphipages.com/comp/tmidigen-4231.html Alan Warriner TMidiGen components]
 
* https://sourceforge.net/projects/lazprojects/files/LazPlayMidi
 
* [https://torry.net/quicksearchd.php?String=pianoex&Title=Yes PianoEx]
 
  
 
=== Linux ===
 
=== Linux ===
Line 28: Line 20:
  
 
* [[macOS MIDI Player]] Example code for a minimal application to play MIDI and iMelody files.
 
* [[macOS MIDI Player]] Example code for a minimal application to play MIDI and iMelody files.
 +
 +
=== Windows ===
 +
 +
* [http://breakoutbox.de/pascal/pascal.html#TMidi TMidiInput and TMidiOutput components]
 +
* [http://www.delphipages.com/comp/tmidigen-4231.html Alan Warriner TMidiGen components]
 +
* [https://sourceforge.net/projects/lazprojects/files/LazPlayMidi LazPlayMidi] - Lazarus MIDI Player
 +
* [https://torry.net/quicksearchd.php?String=pianoex&Title=Yes PianoEx] - This is a very simple application, which can open MIDI file and simulate play using virtual keyboard: Play Midifile simulating a piano; Support MIDI IN/OUT; Colorful Piano key down; Tracks use different color key. Includes MidiFile, MidiPlayer, MidiIn / MidiOut, PianoKeyboard, PianoTracks / PianoChannels compontents. [Delphi 7]
 +
* https://bitbucket.org/avra/ct4laz/downloads/pl_win_midi.zip
  
 
== External links ==
 
== External links ==

Revision as of 06:08, 2 August 2020

MIDI file format

Standard MIDI Files (SMF) contain all the MIDI instructions to generate notes, control individuals volumes, select instrument sounds, and even control reverb and other effects. The files are typically created by a "MIDI sequencer" (software or hardware) and then played on some kind of MIDI synthesizer.

Unlike digital audio files (.wav, .aiff, etc.) or even compact discs, a MIDI file does not need to capture and store actual sounds. Instead, the MIDI file can be just a list of events which describe the specific steps that a soundcard or other playback device must take to generate certain sounds. This way, MIDI files are very much smaller than digital audio files, and the events are also editable, allowing the music to be rearranged, edited, even composed interactively, if desired.

The format also allows tagging the file and the data in the file with copyright notices and other text "meta-events".

All popular computing platforms can play MIDI files (*.mid) and there are thousands of web sites offering files for sale or even for free. Anyone can make and share a MIDI file, using software that is readily available on smart phones, tablets and computers.

The Standard MIDI File Specification is included in the Complete MIDI 1.0 Detailed Specification document (1996). A number of changes/additions became part of the MIDI 1.0 Specification after the "96.1" publication and should be consulted to have a current understanding of MIDI technology.

Playing MIDI files

Standard MIDI Files (SMF) contain sound 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.

Linux

macOS

  • macOS MIDI Player Example code for a minimal application to play MIDI and iMelody files.

Windows

External links

See also