Skip to content

Commit

Permalink
Small utils.cpp and big TODO.txt update
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimrm committed Feb 24, 2011
1 parent d31f60f commit 4aabf8d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
10 changes: 5 additions & 5 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ The jdksmidi contains copyrighted data from the following people:

Jeff Koftinoff

* Project Admin
* Developer
* Project Admin, Developer
* Contribution: creation and development of library since 1986
* Address: Canada
* Contact: <[email protected]>
* Web: http://www.jdkoftinoff.com
* Address: Canada

Vadim Madgazin

* Developer
* Contribution: correction and development of library since 2010
* Address: Zelenograd, Russia
* Contact: <[email protected]>
* Web: http://www.vmgames.com
* Address: Zelenograd, Russia

4 changes: 3 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@

2010 October 12: GPL Patches from Vadim Madgazin <vrm@vmgames> accepted into jdksmidi.
http://github.com/vadimrm/jdksmidi
The file CONTRIBUTORS (AUTHORS) is created
The file AUTHORS (CONTRIBUTORS) is created

2011 February 23: Vadim Madgazin's contribution was noted by markers VRM in the code of library.
All markers are removed by author.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ This library was originally a collection of utility functions for MIDI written i
* Tempo calculations
* MIDI Matrix to count note on's and off's and hold pedals to avoid stuck notes and all-notes-off problems when merging midi streams
* SMPTE management and calculations
* MIDI Utilities useful functions

This project now includes copyrighted content from multiple contributors.
Please see the file "AUTHORS" for more information.


27 changes: 24 additions & 3 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,33 @@ Add Windows driver usage examples/tests, sequencer, sysex send/recv

Add Mac OSX driver usage examples/tests, sequencer, sysex send/recv

Add folder with the executable files of examples (win32, Mac, Linux)

Make the simple class, which integrates all needs of "dummy� (for ex. see utils.h)

Rewrite class MIDIMultiTrack as vector<MIDITrack>

Rewrite class MIDITrack as vector<MIDITimedBigMessage>

Rewrite class MIDIMessage as vector<unsigned char> of variable length

Rewrite class MIDISystemExclusive as vector<unsigned char> and rename it into
MIDIVariableLengthData

Add function (into class MIDIManager?):
-the total time of the playback of the music
-the time, which passed from the beginning of the playback
-bool �does continue now the playback of music?�

Remove the (Sequencer) problems:
-in file "t1_after_t0.mid" play first note in track 0, but not play second note in track 1
-in file "t0_after_t1.mid" first note in track 1 sometimes incorrect instrument number:
(default) 1 (Piano) instead of correct 19 (Organ)

Test parser with big collection of complex midi files:
for ex. rewrite midi file and compare result with using xml copy of both files,
see "Midi -> XML" converter on http://en.nemidi.com/converters.html
Note: this service work not correct with midi event types "0xFF 0x21" and "0xF7"

See in code comment labels:
TODO@VRM
TO DO
See in code comment labels: "TODO@VRM" and "TO DO".

12 changes: 10 additions & 2 deletions src/jdksmidi_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void ClipMultiTrack( const MIDIMultiTrack &src, MIDIMultiTrack &dst, double max_
int ev_track;
while ( seq.GetNextEvent( &ev_track, &ev ) )
{
// ignore BeatMarker and other Service messages
if ( ev.IsServiceMsg() )
continue;

dst.GetTrack(ev_track)->PutEvent(ev);

if ( event_time >= max_event_time )
Expand All @@ -124,14 +128,18 @@ void CollapseMultiTrack( const MIDIMultiTrack &src, MIDIMultiTrack &dst )
int ev_track;
while ( seq.GetNextEvent( &ev_track, &ev ) )
{
// ignore all src EndOfTrack messages!
// ignore all src EndOfTrack messages!!
if ( ev.IsDataEnd() )
continue;

// ignore BeatMarker and other Service messages
if ( ev.IsServiceMsg() )
continue;

dst.GetTrack(0)->PutEvent(ev);
}

// set dst EndOfTrack message
// set (single!) dst EndOfTrack message
MIDITimedBigMessage end(ev); // copy time of last src event
end.SetDataEnd();
dst.GetTrack(0)->PutEvent(end);
Expand Down

0 comments on commit 4aabf8d

Please sign in to comment.