root/trunk/libjdkmidi/trunk/include/jdkmidi/filereadmultitrack.h

Revision 552, 3.2 kB (checked in by jeffk@…, 8 months ago)

formatting fixed

Line 
1/*
2 *  libjdkmidi-2004 C++ Class Library for MIDI
3 *
4 *  Copyright (C) 2004  J.D. Koftinoff Software, Ltd.
5 *  www.jdkoftinoff.com
6 *  jeffk@jdkoftinoff.com
7 *
8 *  *** RELEASED UNDER THE GNU GENERAL PUBLIC LICENSE (GPL) April 27, 2004 ***
9 *
10 *  This program is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License as published by
12 *  the Free Software Foundation; either version 2 of the License, or
13 *  (at your option) any later version.
14 *
15 *  This program is distributed in the hope that it will be useful,
16 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *  GNU General Public License for more details.
19 *
20 *  You should have received a copy of the GNU General Public License
21 *  along with this program; if not, write to the Free Software
22 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23*/
24/*
25** Copyright 1986 to 1998 By J.D. Koftinoff Software, Ltd.
26**
27** All rights reserved.
28**
29** No one may duplicate this source code in any form for any reason
30** without the written permission given by J.D. Koftinoff Software, Ltd.
31**
32*/
33
34#ifndef JDKMIDI_FILEREADMULTITRACK_H
35#define JDKMIDI_FILEREADMULTITRACK_H
36
37#include "jdkmidi/midi.h"
38#include "jdkmidi/msg.h"
39#include "jdkmidi/sysex.h"
40#include "jdkmidi/file.h"
41#include "jdkmidi/fileread.h"
42#include "jdkmidi/multitrack.h"
43
44namespace jdkmidi
45{
46  class MIDIFileReadMultiTrack : public MIDIFileEvents
47  {
48    public:
49      MIDIFileReadMultiTrack ( MIDIMultiTrack *mlttrk );
50     
51      virtual ~MIDIFileReadMultiTrack();
52     
53     
54//
55// The possible events in a MIDI Files
56//
57
58      virtual void    mf_sysex ( MIDIClockTime time, const MIDISystemExclusive &ex );
59     
60      virtual void    mf_arbitrary ( MIDIClockTime time, int len, unsigned char *data );
61      virtual void    mf_metamisc ( MIDIClockTime time, int, int, unsigned char *  );
62      virtual void    mf_seqnum ( MIDIClockTime time, int );
63      virtual void    mf_smpte ( MIDIClockTime time, int, int, int, int, int );
64      virtual void    mf_timesig ( MIDIClockTime time, int, int, int, int );
65      virtual void    mf_tempo ( MIDIClockTime time, unsigned long tempo );
66      virtual void    mf_keysig ( MIDIClockTime time, int, int );
67      virtual void    mf_sqspecific ( MIDIClockTime time, int, unsigned char * );
68      virtual void    mf_text ( MIDIClockTime time, int, int, unsigned char * );
69      virtual void    mf_eot ( MIDIClockTime time );
70     
71//
72// the following methods are to be overridden for your specific purpose
73//
74
75      virtual void    mf_error ( const char * );
76     
77      virtual void    mf_starttrack ( int trk );
78      virtual void    mf_endtrack ( int trk );
79      virtual void    mf_header ( int, int, int );
80     
81//
82// Higher level dispatch functions
83//
84
85      virtual void    ChanMessage ( const MIDITimedMessage &msg );
86     
87    protected:
88   
89      void AddEventToMultiTrack (
90        const MIDITimedMessage &msg,
91        MIDISystemExclusive *sysex,
92        int dest_track
93      );
94     
95      MIDIMultiTrack *multitrack;
96      int cur_track;
97     
98      int the_format;
99      int num_tracks;
100      int division;
101     
102  };
103 
104}
105
106
107#endif
Note: See TracBrowser for help on using the browser.