mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 11:06:32 +01:00
* introduced dependency: libsmf-1.2
* extracted Interface from SMF: StandardMIDIFile * first implementation of StandardMIDIFile based on libsmf that passes basic test git-svn-id: svn://localhost/ardour2/branches/3.0@4529 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
567f37f8eb
commit
947077c12e
7 changed files with 318 additions and 9 deletions
|
|
@ -24,11 +24,11 @@ SMFTest::takeFiveTest ()
|
|||
uint8_t* buf = NULL;
|
||||
int ret;
|
||||
while ((ret = smf.read_event(&delta_t, &size, &buf)) >= 0) {
|
||||
cerr << "read smf event type " << int(buf[0]) << endl;
|
||||
ev.set(buf, size, 0.0);
|
||||
time += delta_t;
|
||||
|
||||
if (ret > 0) { // didn't skip (meta) event
|
||||
cerr << "read smf event type " << hex << int(buf[0]) << endl;
|
||||
// make ev.time absolute time in frames
|
||||
ev.time() = time * frames_per_beat / (double)smf.ppqn();
|
||||
ev.set_event_type(type_map->midi_event_type(buf[0]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue