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, 5, 3, 12, 8], # 0 001-01-00-00 Time = 5/8, Click = 12, NoteQ = 8
]
}),
# Track #2 ...
MIDI::Track->new({
'type' => 'MTrk',
'events' => [ # 44 events.
# 0 001-01-00-00 Time = 5/8, Click = 12, 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-02-00-00 Off: C3
['note_on', 0, 0, 62, 100], # 240 001-02-00-00 On: D3
['note_off', 240, 0, 62, 127], # 480 001-03-00-00 Off: D3
['note_on', 0, 0, 64, 100], # 480 001-03-00-00 On: E3
['note_off', 240, 0, 64, 127], # 720 001-04-00-00 Off: E3
['note_on', 0, 0, 65, 100], # 720 001-04-00-00 On: F3
['note_off', 240, 0, 65, 127], # 960 001-05-00-00 Off: F3
['note_on', 0, 0, 67, 100], # 960 001-05-00-00 On: G3
['note_off', 240, 0, 67, 127], # 1200 002-01-00-00 Off: G3
['note_on', 0, 0, 69, 100], # 1200 002-01-00-00 On: A3
['note_off', 240, 0, 69, 127], # 1440 002-02-00-00 Off: A3
['note_on', 0, 0, 71, 100], # 1440 002-02-00-00 On: B3
['note_off', 240, 0, 71, 127], # 1680 002-03-00-00 Off: B3
['note_on', 0, 0, 72, 100], # 1680 002-03-00-00 On: C4
['note_off', 240, 0, 72, 127], # 1920 002-04-00-00 Off: C4
['note_on', 0, 0, 74, 100], # 1920 002-04-00-00 On: D4
['note_off', 240, 0, 74, 127], # 2160 002-05-00-00 Off: D4
['note_on', 0, 0, 76, 100], # 2160 002-05-00-00 On: E4
['note_off', 240, 0, 76, 127], # 2400 003-01-00-00 Off: E4
['note_on', 0, 0, 76, 100], # 2400 003-01-00-00 On: E4
['note_off', 240, 0, 76, 127], # 2640 003-02-00-00 Off: E4
['note_on', 0, 0, 74, 100], # 2640 003-02-00-00 On: D4
['note_off', 240, 0, 74, 127], # 2880 003-03-00-00 Off: D4
['note_on', 0, 0, 72, 100], # 2880 003-03-00-00 On: C4
['note_off', 240, 0, 72, 127], # 3120 003-04-00-00 Off: C4
['note_on', 0, 0, 71, 100], # 3120 003-04-00-00 On: B3
['note_off', 240, 0, 71, 127], # 3360 003-05-00-00 Off: B3
['note_on', 0, 0, 69, 100], # 3360 003-05-00-00 On: A3
['note_off', 240, 0, 69, 127], # 3600 004-01-00-00 Off: A3
['note_on', 0, 0, 67, 100], # 3600 004-01-00-00 On: G3
['note_off', 240, 0, 67, 127], # 3840 004-02-00-00 Off: G3
['note_on', 0, 0, 65, 100], # 3840 004-02-00-00 On: F3
['note_off', 240, 0, 65, 127], # 4080 004-03-00-00 Off: F3
['note_on', 0, 0, 64, 100], # 4080 004-03-00-00 On: E3
['note_off', 240, 0, 64, 127], # 4320 004-04-00-00 Off: E3
['note_on', 0, 0, 62, 100], # 4320 004-04-00-00 On: D3
['note_off', 240, 0, 62, 127], # 4560 004-05-00-00 Off: D3
['note_on', 0, 0, 60, 100], # 4560 004-05-00-00 On: C3
['note_off', 240, 0, 60, 127], # 4800 005-01-00-00 Off: C3
]
}),
]
});