Skip to content

Commit

Permalink
update examples/midi/midifile-play.ck
Browse files Browse the repository at this point in the history
  • Loading branch information
gewang committed Oct 12, 2024
1 parent c617a1a commit eeedd5a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/midi/midifile-play.ck
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ if( !min.open(filename) ) me.exit();
cherr <= "----------" <= IO.newline();
cherr <= "MIDI file: " <= IO.newline()
<= " |- " <= filename <= IO.newline()
<= " |- contains " <= min.numTracks() <= " tracks" <= IO.newline();
<= " |- contains " <= min.numTracks() <= " tracks" <= IO.newline()
<= " |- TPQ: " <= min.tpq() <= IO.newline()
<= " |- BPM: " <= min.bpm() <= IO.newline();
// print
cherr <= "----------" <= IO.newline();
cherr <= "playing..." <= IO.newline();
Expand Down Expand Up @@ -82,7 +84,7 @@ fun void doTrack( int track, float speed )
(v+1)%s.size() => v;

// log
cherr <= "NOTE ON track:" <= track <= " pitch:" <= msg.data2 <=" velocity:" <= msg.data3 <= IO.newline();
cherr <= "NOTE ON track:" <= track <= " pitch:" <= msg.data2 <=" velocity:" <= msg.data3 <= " when: " <= msg.when/ms <= IO.newline();
}
// other messages
else
Expand Down

0 comments on commit eeedd5a

Please sign in to comment.