Skip to content

Commit

Permalink
Added data test
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Feb 8, 2024
1 parent 2ba98f9 commit 5307197
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const TEST = require('test-midi-files');
- [**test-c-major-scale-m1-g1.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-c-major-scale-m1-g1.midi2)
- [**test-c-major-scale-m2-g0.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-c-major-scale-m2-g0.midi2)
- [**test-c-major-scale-m2-g1.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-c-major-scale-m2-g1.midi2)
- [**test-data.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-data.midi2)
- [**test-empty.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-empty.midi2)
- [**test-minimal.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-minimal.midi2)
- [**test-no-header.midi2**](https://github.com/jazz-soft/test-midi-files/raw/main/midi2/test-no-header.midi2)
Expand Down
16 changes: 16 additions & 0 deletions code2/test-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var TEST = require('..');
var JZZ = require('jzz');
require('jzz-midi-smf')(JZZ);

var clip = new JZZ.MIDI.Clip();
clip.header
.umpClipName(0, 'MIDI2 Data')
.umpCopyright(0, 'https:/jazz-soft.net')
.umpMetadata(0, 'Testing MIDI2 8-bit data message.\n');
clip
.gr(0).umpMetadata('This file contains 8-bit data. No sound.')
.umpData('This is a 8-bit data that requires several UMP packets...')
.umpMetadata('Thank you!');

TEST.write(clip);
TEST.play(clip);
Binary file added midi2/test-data.midi2
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"author": "jazz-soft (https://jazz-soft.net)",
"dependencies": {
"jzz": "^1.7.8",
"jzz": "^1.7.9",
"jzz-gui-player": "^1.7.0",
"jzz-midi-gear": "^1.3.2",
"jzz-midi-gm": "^1.3.5",
Expand Down

0 comments on commit 5307197

Please sign in to comment.