MIDI::Opus->new({
'format' => 1,
'ticks' => 480,
'tracks' => [ # 2 tracks...
# Track #1 ...
MIDI::Track->new({
'type' => 'MTrk',
'events' => [ # 2 events.
['set_tempo', 0, 500000], # 0 001-01-00-00 Tempo: q = 120
['time_signature', 0, 7, 2, 24, 8], # 0 001-01-00-00 Time = 7/4, Click = 24, NoteQ = 8
]
}),
# Track #2 ...
MIDI::Track->new({
'type' => 'MTrk',
'events' => [ # 44 events.
# 0 001-01-00-00 Time = 7/4, Click = 24, NoteQ = 8
['track_name', 0, ''], # 0 001-01-00-00
['patch_change', 0, 0, 0], # 0 001-01-00-00 Channel 1, patch = Acoustic Grand
['control_change', 0, 0, 7, 100], # 0 001-01-00-00 Main Volume = 100
['control_change', 0, 0, 10, 64], # 0 001-01-00-00 Pan = 64
['note_on', 0, 0, 60, 100], # 0 001-01-00-00 On: C3
['note_off', 240, 0, 60, 127], # 240 001-01-08-00 Off: C3
['note_on', 0, 0, 62, 100], # 240 001-01-08-00 On: D3
['note_off', 240, 0, 62, 127], # 480 001-02-00-00 Off: D3
['note_on', 0, 0, 64, 100], # 480 001-02-00-00 On: E3
['note_off', 240, 0, 64, 127], # 720 001-02-08-00 Off: E3
['note_on', 0, 0, 65, 100], # 720 001-02-08-00 On: F3
['note_off', 240, 0, 65, 127], # 960 001-03-00-00 Off: F3
['note_on', 0, 0, 67, 100], # 960 001-03-00-00 On: G3
['note_off', 240, 0, 67, 127], # 1200 001-03-08-00 Off: G3
['note_on', 0, 0, 69, 100], # 1200 001-03-08-00 On: A3
['note_off', 240, 0, 69, 127], # 1440 001-04-00-00 Off: A3
['note_on', 0, 0, 71, 100], # 1440 001-04-00-00 On: B3
['note_off', 240, 0, 71, 127], # 1680 001-04-08-00 Off: B3
['note_on', 0, 0, 72, 100], # 1680 001-04-08-00 On: C4
['note_off', 240, 0, 72, 127], # 1920 001-05-00-00 Off: C4
['note_on', 0, 0, 74, 100], # 1920 001-05-00-00 On: D4
['note_off', 240, 0, 74, 127], # 2160 001-05-08-00 Off: D4
['note_on', 0, 0, 76, 100], # 2160 001-05-08-00 On: E4
['note_off', 240, 0, 76, 127], # 2400 001-06-00-00 Off: E4
['note_on', 0, 0, 76, 100], # 2400 001-06-00-00 On: E4
['note_off', 240, 0, 76, 127], # 2640 001-06-08-00 Off: E4
['note_on', 0, 0, 74, 100], # 2640 001-06-08-00 On: D4
['note_off', 240, 0, 74, 127], # 2880 001-07-00-00 Off: D4
['note_on', 0, 0, 72, 100], # 2880 001-07-00-00 On: C4
['note_off', 240, 0, 72, 127], # 3120 001-07-08-00 Off: C4
['note_on', 0, 0, 71, 100], # 3120 001-07-08-00 On: B3
['note_off', 240, 0, 71, 127], # 3360 002-01-00-00 Off: B3
['note_on', 0, 0, 69, 100], # 3360 002-01-00-00 On: A3
['note_off', 240, 0, 69, 127], # 3600 002-01-08-00 Off: A3
['note_on', 0, 0, 67, 100], # 3600 002-01-08-00 On: G3
['note_off', 240, 0, 67, 127], # 3840 002-02-00-00 Off: G3
['note_on', 0, 0, 65, 100], # 3840 002-02-00-00 On: F3
['note_off', 240, 0, 65, 127], # 4080 002-02-08-00 Off: F3
['note_on', 0, 0, 64, 100], # 4080 002-02-08-00 On: E3
['note_off', 240, 0, 64, 127], # 4320 002-03-00-00 Off: E3
['note_on', 0, 0, 62, 100], # 4320 002-03-00-00 On: D3
['note_off', 240, 0, 62, 127], # 4560 002-03-08-00 Off: D3
['note_on', 0, 0, 60, 100], # 4560 002-03-08-00 On: C3
['note_off', 240, 0, 60, 127], # 4800 002-04-00-00 Off: C3
]
}),
]
});