1
1
mirror of https://github.com/wader/fq.git synced 2024-11-25 05:55:43 +03:00
fq/format/midi/testdata
twystd 9c7f7f961a midi: fixes for PR comments:
- Renamed 'tracks' section to 'content' (cf. https://github.com/wader/fq/pull/1004#discussion_r1746651234)
- Removed 'validation only' errors (cf. https://github.com/wader/fq/pull/1004#issuecomment-2333464662)
- Decoded MThd divisions field with SMPTE timecode
2024-09-06 15:41:57 -07:00
..
events midi: cleaned up and simplied event decoding logic 2024-09-01 16:41:38 -07:00
fuzz midi: restructured event decoding to decode length and struct fields (cf. https://github.com/wader/fq/pull/1004#discussion_r1737105173) 2024-09-01 16:41:26 -07:00
midi midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
format-0.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
format-1.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
format-2.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
help_midi.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
key-changes.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
keys.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
Makefile midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
metaevents.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
midievents.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
notes.fqtest midi: simplifed and cleaned up MIDI 'fq' tests: 2024-09-01 16:41:38 -07:00
README.md midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
reference.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
reference.mid midi: simplifed and cleaned up MIDI 'fq' tests: 2024-09-01 16:41:38 -07:00
smpte-timecode.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
sysex.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
tempo.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
trackname.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00
unknown-chunks.fqtest midi: fixes for PR comments: 2024-09-06 15:41:57 -07:00

NOTES

MIDI files

The test and example MIDI files are located in the testdata/midi folder.

  1. reference.mid Reference MIDI file for testing/development only (it is not a valid MIDI file), with two tracks:
  • Track 0: empty track with only an end-of-track event
  • Track 1: instrument track with sequential examples of all decoded MIDI events
  1. format-0.mid Basic MIDI format 0 test file. Contains a single track with only a track name and end-of-track events.

  2. format-1.mid Basic MIDI format 1 test file. Contains two tracks, each with only a track name and end-of-track events.

  3. format-2.mid Basic MIDI format 2 test file. Contains two tracks, each with only a track name and end-of-track events.

  4. smpte-timecode.mid MIDI format 0 test file with an SMPTE timecode for the divisions field.

  5. empty.mid Empty MIDI file to verify MIDI decoder handles empty files.

  6. key_signatures.mid

Test file with all supported MIDI key signatures.

  1. notes.mid

Test file with all supported MIDI notes.

  1. unknown-chunks.mid

Test file with 'alien' chunks interleaved with the MTrk track chunks.

  1. invalid-MThd-length.mid

Test file with invalid MThd chunk length.

  1. invalid-MTrk-length.mid

Test file with invalid MTrk chunk length.

  1. twinkle.mid

Sample valid MIDI file for the example queries in the help.

MIDI event files

MIDI files with a single event for development and debugging are located in the testdata/events folder.

Meta events

  1. sequence-number.mid
00 ff 00 02 00 17

delta: 0
sequence number: 23
  1. text.mid
00 ff 01 0d 54 68 69 73 20 61 6e 64 20 54 68 61 74

delta: 0
text: This and That
  1. copyright.mid
00 ff 02 04 54 68 65 6d

delta: 0
copyright: Them
  1. track_name.mid
00 ff 03 0f 41 63 6f 75 73 74 69 63 20 47 75 69 74 61 72

delta: 0
track name: Acoustic Guitar

  1. instrument_name.mid
00 ff 04 0a 44 69 64 67 65 72 69 64 6f 6f

delta: 0
instrument: Didgeridoo
  1. lyric.mid
00 ff 05 08 4c 61 2d 6c 61 2d 6c 61

delta: 0
lyric: La-la-la
  1. marker.mid
00 ff 06 0f 48 65 72 65 20 42 65 20 44 72 61 67 6f 6e 73

delta: 0
marker: Here Be Dragons
  1. cuepoint.mid
00 ff 07 0c 4d 6f 72 65 20 63 6f 77 62 65 6c 6c

delta: 0
cue: More cowbell
  1. program_name.mid
00 ff 08 06 45 73 63 61 70 65

delta: 0
program: Escape
  1. device_name.mid
00 ff 09 08 54 68 65 54 68 69 6e 67

delta: 00
device: TheThing
  1. midi-channel-prefix.mid
00 ff 20 01 0d

delta: 00
MIDI channel prefix: 13
  1. midi-port.mid
00 ff 21 01 70

delta: 00
MIDI port: 112
  1. tempo.mid
00 ff 51 03 07 a1 20

delta: 0
tempo: 500000
  1. smpte-offset.mid
00 ff 54 05 4d 2d 3b 07 27

delta: 0
framerate: 25
hour:      13
minute:    45
second:    59
frames:     7
fractions: 39
  1. time-signature.mid
00 ff 58 04 04 02 18 08 

delta: 0
numerator:   4 
denominator: 4
ticks_per_click: 24
thirty_seconds_per_quarter: 8 
  1. key-signature.mid
00 ff 59 02 00 01 

delta: 0
key: A minor
  1. end-of-track.mid
00 ff 2f 00

delta: 0
  1. sequencer-specific-event
00 ff 7f 06 00 00 3b 3a 4c 5e

delta: 0
manufacturer: 00 00 3b (Mark Of The Unicorn (MOTU))
data:         3a 4c 5e

MIDI events

  1. note-off.mid
00 81 70 60      40 71 48

delta: 0         delta: 64
channel: 1
note: 112 (E8)   note: 113 (F8)
velocity: 96     velocity: 72
  1. note-on.mid
00 92 30 48      40 32 48

delta: 0         delta: 64
channel: 0
note: 48 (C3)    note: 50 (D3)
velocity: 72     velocity: 72
  1. polyphonic-pressure.mid
00 a0 64         40 48

delta: 0         delta: 64
channel: 0
pressure: 100    pressure: 72
  1. controller.mid
00 b0 20 21      40 20 22

delta: 0         delta: 64
channel: 0
controller: 32   controller: 32
value: 33        value: 34
  1. program-change.mid
00 c0 19         40 20

delta: 0         delta: 64
channel: 0
program: 25      program: 32
  1. channel-pressure.mid
00 d0 07         40 48

delta: 0         delta: 64
channel: 0
pressure: 7      pressure: 72
  1. pitch-bend.mid
00 e5 40 00    20 60 00       40 20 00
             
delta: 0       delta: 32      delta: 64
channel: 5
bend: 0        bend: 4096     bend: -4096

System Exclusive events

  1. sysex-message.mid
00 f0 05 7e 00 09 01 f7

delta: 0
manufacturer: 7e (Non-RealTime Extensions)
data: 00 09 01
  1. sysex-continuation.mid
00 f0 03 43 01 23           00 f7 06 45 67 89 ab cd ef    00 f7 04 01 23 45 f7

delta: 0                    delta: 0                      delta: 0
manufacturer: 43 (Yamaha)   data: 45 67 89 ab cd ef       data: 01 23 45
data: 01 23
  1. sysex-escape.mid
00 f7 02 f3 01

delta: 0
data: f3 01