test-midi-files
v1.0.9
Published
A framework for producing test MIDI files
Downloads
25
Maintainers
Readme
test-midi-files
A framework for producing test MIDI files
See also:
Before use
Please run npm install
to make sure all dependencies are up to date.
Playing/viewing MIDI files
node index.js <filename.mid> [<midi-out port> | print | inspect | base64]
e.g.:node index.js midi/test-c-major-scale.mid
-- play MIDI file to the default MIDI-Out port.node index.js midi/test-c-major-scale.mid "Microsoft GS Wavetable Synth"
-- play MIDI file to the specified MIDI-Out port.node index.js midi/test-c-major-scale.mid print
-- print MIDI file contents.node index.js midi/test-c-major-scale.mid inspect
-- same as print
, but also outputs the data offset within the MIDI file.node index.js midi/test-c-major-scale.mid base64
-- output the MIDI file binary data in Base64
format.
Playing MIDI files in browser
Open index.html
Creating your own test
Copy code/test-c-major-scale.js
or your favorite test in the code
directory.
Make changes using the API documented at https://jazz-soft.net/doc/JZZ/midifile.html to suit your test case.
Run node code/your-test-name.js
, it will create a MIDI file with the same name in the midi
directory.
If you believe your test will be useful for others, please check it into this repository!
MIDI 2.0 files
Experimental support.
See the code2
and midi2
directories.
Using as library in your own project
npm install test-midi-files --save
const TEST = require('test-midi-files');
//...
Test files
- test-c-major-scale.mid
- test-empty.mid
- test-silence-all-notes-off.mid
- test-silence-end-of-track.mid
- test-silence-text-metaevent.mid
- test-all-gm-percussion.mid
- test-all-gm-sounds.mid
- test-all-gm2-sounds.mid
- test-all-gs-sounds.mid
- test-all-microsoft-gs-wavetable-synth-sounds.mid
- test-all-xg-sounds.mid
- test-gm2-doggy-78-00-38-4c.mid
- test-gm2-doggy-79-01-7b.mid
- test-gs-doggy-01-00-7b.mid
- test-xg-doggy-40-00-30.mid
- test-xg-doggy-7e-00-00-54.mid
- test-2-tracks-type-0.mid
- test-2-tracks-type-1.mid
- test-2-tracks-type-2.mid
- test-control-00-20-bank-select.mid
- test-control-40-damper.mid
- test-control-41-portamento.mid
- test-control-54-portamento-control.mid
- test-control-7c-omni-mode-off.mid
- test-control-7d-omni-mode-on.mid
- test-control-7e-mono-mode-on.mid
- test-control-7f-poly-mode-on.mid
- test-multichannel-chords-0.mid
- test-multichannel-chords-1.mid
- test-multichannel-chords-2.mid
- test-multichannel-chords-3.mid
- test-note-on-velocity.mid
- test-rpn-00-00-pitch-bend-range.mid
- test-rpn-00-01-fine-tuning.mid
- test-rpn-00-02-coarse-tuning.mid
- test-rpn-00-05-modulation-depth-range.mid
- test-running-status-metaevent.mid
- test-running-status-sysex.mid
- test-smpte-offset.mid
- test-sysex-7e-06-01-id-request.mid
- test-sysex-7e-09-01-gm1-enable.mid
- test-sysex-7e-09-02-gm-disable.mid
- test-sysex-7e-09-03-gm2-enable.mid
- test-sysex-7f-04-03-master-fine-tuning.mid
- test-sysex-7f-04-04-master-coarse-tuning.mid
- test-sysex-7x-08-0x-scale-tuning.mid
- test-sysex-gs-40-1x-15-drum-part-change.mid
- test-sysex-gs-40-1x-4x-scale-tuning.mid
- test-track-length.mid
- test-karaoke-kar.mid
- test-non-midi-track.mid
- test-vlq-2-byte.mid
- test-vlq-3-byte.mid
- test-vlq-4-byte.mid
- test-corrupt-file-extra-byte.mid
- test-corrupt-file-missing-byte.mid
- test-illegal-message-all.mid
- test-illegal-message-f1-xx.mid
- test-illegal-message-f2-xx-xx.mid
- test-illegal-message-f3-xx.mid
- test-illegal-message-f4.mid
- test-illegal-message-f5.mid
- test-illegal-message-f6.mid
- test-illegal-message-f8.mid
- test-illegal-message-f9.mid
- test-illegal-message-fa.mid
- test-illegal-message-fb.mid
- test-illegal-message-fc.mid
- test-illegal-message-fd.mid
- test-illegal-message-fe.mid
- test-empty-file.mid
- test-not-a-midi-file.mid
- test-syx-7e-06-01-id-request.syx
- test-c-major-scale-m1-g0.midi2
- test-c-major-scale-m1-g1.midi2
- test-c-major-scale-m2-g0.midi2
- test-c-major-scale-m2-g1.midi2
- test-data.midi2
- test-empty.midi2
- test-minimal.midi2
- test-no-header.midi2
- test-out-of-order-data.midi2
- test-out-of-order-sysex.midi2
- test-out-of-order-text.midi2
- test-text-message.midi2
- test-gm2-doggy-78-00-38-4c.midi2
- test-gm2-doggy-79-01-7b.midi2
- test-gs-doggy-01-00-7b.midi2
- test-xg-doggy-40-00-30.midi2
- test-xg-doggy-7e-00-00-54.midi2
- test-empty-file.midi2
- test-not-a-midi-file.midi2
More to come...
NOTE: not every MIDI message is understood by every MIDI device!