//------------------------------------------------------------------------- // Filename: channel2device.hh // Version: $Id: channel2device.hh,v 1.1.2.1 1999/06/09 10:14:03 erik Exp $ // Copyright: Copyright (C) 1999, Erik Mouw (J.A.K.Mouw@its.tudelft.nl) // Author: Erik Mouw // Description: Map channels to devices (drum channel 9 --> SB AWE) // Created at: Sat Jun 5 13:21:39 1999 // Modified by: Erik Mouw // Modified at: Wed Jun 9 12:01:17 1999 //------------------------------------------------------------------------- // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // #ident "$Id: channel2device.hh,v 1.1.2.1 1999/06/09 10:14:03 erik Exp $" #ifndef musica_channel2device_hh #define musica_channel2device_hh #include "mididevice.hh" class midiChannel2Device : virtual public midiDevice { protected: midiDevice *deviceMap[numMidiChannels]; public: midiChannel2Device(const char *theName); virtual ~midiChannel2Device(void); void setDevice(int channel, midiDevice *device); void setAllDevices(midiDevice *device); midiDevice *getDevice(int channel); // fill in virtual functions virtual bool open(void); virtual bool close(void); virtual void noteOn(int channel, int key, int velocity); virtual void noteOff(int channel, int key, int velocity); virtual void keyPressure(int channel, int key, int pressure); virtual void channelPressure(int channel, int pressure); virtual void pitchBend(int channel, int fine, int coarse); virtual void controlChange(int channel, int controller, int value); virtual void programChange(int channel, int program); virtual void allNoteOff(void); virtual void systemReset(void); }; #endif