Difference between revisions of "MIDI"

From Free Pascal wiki
Jump to navigationJump to search
(→‎Windows: Added more early Delphi component links)
(→‎Windows: More links to Delphi source for MIDI components)
(One intermediate revision by the same user not shown)
Line 20: Line 20:
  
 
* [https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=39981.0;attach=34650 Two_Track_MIDI_Generator_Version_0034_Lazarus_project.zip] from the Forums. See [https://forum.lazarus.freepascal.org/index.php/topic,39981.0.html discussion].
 
* [https://forum.lazarus.freepascal.org/index.php?action=dlattach;topic=39981.0;attach=34650 Two_Track_MIDI_Generator_Version_0034_Lazarus_project.zip] from the Forums. See [https://forum.lazarus.freepascal.org/index.php/topic,39981.0.html discussion].
 +
* The [https://www.un4seen.com BASS audio library] (with BASSMIDI extension enabling the playback of MIDI files and custom event sequences, using SF2 and SFZ soundfonts to provide the sounds, including support for packed soundfonts. MIDI input is also supported) for Linux, macOS and Windows. It is free for non-commercial use.
  
 
=== Linux ===
 
=== Linux ===
Line 29: Line 30:
 
=== Windows ===
 
=== Windows ===
  
 +
* [https://bitbucket.org/h4ndy/midiio-dev/src/default/ Components and functions for MIDI communication for Delphi] (source)
 +
* [https://sourceforge.net/projects/midisequencer/files/src/ MIDI sequencer components to implement MIDI handling for Delphi] (source)
 
* Original Delphi components are MPL licensed and can still be found here:
 
* Original Delphi components are MPL licensed and can still be found here:
 
** https://web.archive.org/web/20120106202644fw_/http://www.wilsonc.demon.co.uk:80/delphi_2006.htm
 
** https://web.archive.org/web/20120106202644fw_/http://www.wilsonc.demon.co.uk:80/delphi_2006.htm

Revision as of 05:56, 2 August 2020

MIDI file format

Musical Instrument Digital Interface (MIDI) is a technical standard that describes a communications protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and related audio devices for playing, editing and recording music.

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.

Cross Platform

Linux

macOS

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

Windows

External links

See also