tmont / midiparser
MIDI 解析库
1.1.0
2014-01-22 08:37 UTC
Requires (Dev)
- pdepend/pdepend: 1.1.0
- phpdocumentor/phpdocumentor: 2.*
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-09-24 00:41:35 UTC
README
在以下协议下授权 WTFPL
安装
要求
- PHP >= 5.3.0
使用方法
如果您克隆了仓库,您可以通过运行 ant sample
来运行示例脚本,该脚本位于 ./sample/test.php,这将生成一个HTML报告。
以下片段是生成纯文本报告的示例。
require_once 'vendor/autoload.php'; 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();
解析器使用
如果您想对数据进行更多控制,您可以直接使用解析器。请参阅打印音符示例脚本,了解如何进行此操作。
开发
# install dependencies composer install # run tests vendor/bin/phpunit