# piano_player **Repository Path**: iOSDevLog/piano_player ## Basic Information - **Project Name**: piano_player - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-05 - **Last Updated**: 2025-02-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Midifile: C++ MIDI file parsing library =======================================  ## Piano ``` make all ./piano music/v3.mid ``` [](https://travis-ci.org/craigsapp/midifile) [](https://ci.appveyor.com/project/craigsapp/midifile) Midifile is a library of C++ classes for reading/writing Standard MIDI files. The library consists of 6 classes:
MidiFile | The main interface for dealing with MIDI files. The MidiFile class appears as a two dimensional array of MidiEvents: the first dimension is a list of tracks, and the second dimension is a list of MidiEvents. |
MidiEventList | A data structure that manages the list of MidiEvents for a MIDI file track. |
MidiEvent | The primary storage unit for MidiMessages in a MidiFile. The class consists of a tick timestamp (delta or absolute) and a vector of MIDI message bytes (or Standard MIDI File meta messages). |
MidiMessage | The base class for MidiEvents. This is a STL vector of unsigned bytes representing a MIDI (or meta) message. |
Binasc | A helper class for MidiFile that allows reading/writing of MIDI files in an ASCII format describing the bytes of the binary Standard MIDI Files. |
Options | A optional convenience class used for parsing command-line options in the example programs. This class can be removed from the library since it is not needed for using the MidiFile class. |
TPQ: 120 TRACKS: 3 TICK DELTA TRACK MIDI MESSAGE ____________________________________ 0 0 1 90 48 40 0 0 2 90 30 40 0 0 0 ff 2f 0 120 120 1 80 48 40 120 0 2 80 30 40 120 0 2 90 3c 40 120 0 1 90 48 40 240 120 2 80 3c 40 240 0 1 80 48 40 240 0 2 90 40 40 240 0 1 90 4f 40 360 120 2 80 40 40 360 0 1 80 4f 40 360 0 1 90 4f 40 360 0 2 90 3c 40 480 120 2 80 3c 40 480 0 1 80 4f 40 480 0 2 90 41 40 480 0 1 90 51 40 600 120 2 80 41 40 600 0 1 80 51 40 600 0 1 90 51 40 600 0 2 90 3c 40 720 120 1 80 51 40 720 0 2 80 3c 40 720 0 2 90 40 40 720 0 1 90 4f 40 840 120 2 80 40 40 840 0 2 90 3c 40 960 120 2 80 3c 40 960 0 1 80 4f 40 960 0 2 90 3e 40 960 0 1 90 4d 40 1080 120 1 80 4d 40 1080 0 2 80 3e 40 1080 0 2 90 3b 40 1080 0 1 90 4d 40 1200 120 1 80 4d 40 1200 0 2 80 3b 40 1200 0 2 90 3c 40 1200 0 1 90 4c 40 1320 120 1 80 4c 40 1320 0 2 80 3c 40 1320 0 1 90 4c 40 1320 0 2 90 39 40 1440 120 1 80 4c 40 1440 0 2 80 39 40 1440 0 1 90 4a 40 1440 0 2 90 35 40 1560 120 1 80 4a 40 1560 0 2 80 35 40 1560 0 2 90 37 40 1560 0 1 90 4a 40 1680 120 1 80 4a 40 1680 0 2 80 37 40 1680 0 2 90 30 40 1680 0 1 90 48 40 1920 240 1 80 48 40 1920 0 2 80 30 40 1920 0 1 ff 2f 0 1920 0 2 ff 2f 0MIDI file writing example -------------------------- Below is an example program to create a MIDI file. This program will generate a random sequence of notes and append them to the end of the track. By default a `MidiFile` object contains a single track and will be written as a type-0 MIDI file unless more tracks are added. After adding notes to the track, it must be sorted into time sequence before being written to a file. ``` cpp #include "MidiFile.h" #include "Options.h" #include