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

src/jdkmidi_midi.cpp

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 
00035 #include "jdkmidi/world.h"
00036 
00037 #include "jdkmidi/midi.h"
00038 
00039 namespace jdkmidi
00040 {
00041   
00042   
00043   const signed char lut_msglen[16] =
00044   {
00045     0,0,0,0,0,0,0,0,
00046     3,  // 0x80=note off, 3 bytes
00047     3,  // 0x90=note on, 3 bytes
00048     3,  // 0xa0=poly pressure, 3 bytes
00049     3,  // 0xb0=control change, 3 bytes
00050     2,  // 0xc0=program change, 2 bytes
00051     2,  // 0xd0=channel pressure, 2 bytes
00052     3,  // 0xe0=pitch bend, 3 bytes
00053     -1  // 0xf0=other things. may vary.
00054   };
00055   
00056   const signed char lut_sysmsglen[16] =
00057   {
00058     -1, // 0xf0=sysex start. may vary
00059     2,  // 0xf1=MIDI Time Code. 2 bytes
00060     3,  // 0xf2=MIDI Song position. 3 bytes
00061     2,  // 0xf3=MIDI Song Select. 2 bytes.
00062     0,  // 0xf4=undefined
00063     0,  // 0xf5=undefined
00064     1,  // 0xf6=TUNE Request
00065     0,  // 0xf7=sysex end.
00066     1,  // 0xf8=timing clock. 1 byte
00067     1,  // 0xf9=proposed measure end?
00068     1,  // 0xfa=start. 1 byte
00069     1,  // 0xfb=continue. 1 byte
00070     1,  // 0xfc=stop. 1 byte
00071     0,  // 0xfd=undefined
00072     1,  // 0xfe=active sensing. 1 byte
00073     3 // 0xff= not reset, but a META-EVENT, which is always 3 bytes
00074   };
00075   
00076   
00077   const bool  lut_is_white[12] =
00078   {
00079 //
00080 //  C C#  D D#  E    F F# G G# A A# B
00081 //
00082     1,0,  1,0,  1,   1,0, 1,0, 1,0, 1
00083   };
00084   
00085   
00086   
00087 }