PHP code example of tmont / midiparser
1. Go to this page and download the library: Download tmont/midiparser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tmont / midiparser example snippets
use Tmont\Midi\Parsing\FileParser;
use Tmont\Midi\Reporting\TextFormatter;
use Tmont\Midi\Reporting\Printer;
//create a new file parser
$parser = new FileParser();
//replace this path with the path to an actual MIDI file
$parser->load('/path/to/midi/file.mid');
//create a Printer object
$printer = new Printer(new TextFormatter(), $parser);
//output the parse result
$printer->printAll();