jdkmidi class library documentation

Copyright © 2004 J.D. Koftinoff Software, Ltd.

Released under the GNU General Public License (GPL)




Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

include/jdkmidi/filereadmultitrack.h

Go to the documentation of this file.
00001 /*
00002  *  libjdkmidi-2004 C++ Class Library for MIDI
00003  *
00004  *  Copyright (C) 2004  J.D. Koftinoff Software, Ltd.
00005  *  www.jdkoftinoff.com
00006  *  jeffk@jdkoftinoff.com
00007  *
00008  *  *** RELEASED UNDER THE GNU GENERAL PUBLIC LICENSE (GPL) April 27, 2004 ***
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 /*
00025 **  Copyright 1986 to 1998 By J.D. Koftinoff Software, Ltd.
00026 **
00027 **  All rights reserved.
00028 **
00029 **  No one may duplicate this source code in any form for any reason
00030 **  without the written permission given by J.D. Koftinoff Software, Ltd.
00031 **
00032 */
00033 
00034 #ifndef _JDKMIDI_FILEREADMULTITRACK_H
00035 #define _JDKMIDI_FILEREADMULTITRACK_H
00036 
00037 #include "jdkmidi/midi.h"
00038 #include "jdkmidi/msg.h"
00039 #include "jdkmidi/sysex.h"
00040 #include "jdkmidi/file.h"
00041 #include "jdkmidi/fileread.h"
00042 #include "jdkmidi/multitrack.h"
00043 
00044 namespace jdkmidi
00045 {
00046   class MIDIFileReadMultiTrack : public MIDIFileEvents 
00047     {
00048     public:
00049       MIDIFileReadMultiTrack( MIDIMultiTrack *mlttrk );
00050       
00051       virtual ~MIDIFileReadMultiTrack();
00052       
00053       
00054 //
00055 // The possible events in a MIDI Files
00056 //
00057       
00058       virtual void    mf_sysex( MIDIClockTime time, const MIDISystemExclusive &ex );
00059       
00060       virtual void    mf_arbitrary( MIDIClockTime time, int len, unsigned char *data );
00061       virtual void    mf_metamisc( MIDIClockTime time, int, int, unsigned char *  );
00062       virtual void    mf_seqnum( MIDIClockTime time, int );
00063       virtual void    mf_smpte( MIDIClockTime time, int, int, int, int, int );
00064       virtual void    mf_timesig( MIDIClockTime time, int, int, int, int );
00065       virtual void    mf_tempo( MIDIClockTime time, unsigned long tempo );
00066       virtual void    mf_keysig(MIDIClockTime time, int, int );
00067       virtual void    mf_sqspecific( MIDIClockTime time, int, unsigned char * );
00068       virtual void    mf_text( MIDIClockTime time, int, int, unsigned char * );
00069       virtual void    mf_eot( MIDIClockTime time );
00070       
00071 //
00072 // the following methods are to be overridden for your specific purpose
00073 //
00074       
00075       virtual void    mf_error( char * );
00076       
00077       virtual void    mf_starttrack( int trk );
00078       virtual void    mf_endtrack( int trk );
00079       virtual void    mf_header( int, int, int );
00080       
00081 //
00082 // Higher level dispatch functions
00083 //
00084       
00085       virtual void    ChanMessage( const MIDITimedMessage &msg );
00086       
00087     protected:
00088       
00089       void AddEventToMultiTrack( 
00090         const MIDITimedMessage &msg, 
00091         MIDISystemExclusive *sysex, 
00092         int dest_track 
00093         );
00094       
00095       MIDIMultiTrack *multitrack;
00096       int cur_track;
00097       
00098       int the_format;
00099       int num_tracks;
00100       int division;
00101       
00102     }; 
00103   
00104 }
00105 
00106 
00107 #endif