//------------------------------------------------------------------------- // Filename: midiio.hh // Version: $Id: midiio.hh,v 1.1 1999/05/01 17:43:43 erik Exp $ // Copyright: Copyright (C) 1999, Erik Mouw (J.A.K.Mouw@its.tudelft.nl) // Author: Erik Mouw // Description: Linux MIDI device handling functions // Created at: Sun Feb 28 17:26:10 1999 // Modified by: Erik Mouw // Modified at: Sat May 1 18:22:57 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: midiio.hh,v 1.1 1999/05/01 17:43:43 erik Exp $" #ifndef musica_midiio_hh #define musica_midiio_hh class midiIo { private: void init(void); void destroy(void); void seqbuf_dump(); protected: int fd; int midi_dev; char *deviceName; static int defaultChannel; public: midiIo(void); midiIo(const char* device); ~midiIo(void); bool open(void); bool close(void); void noteOn(int key, int velocity, int channel = defaultChannel); void noteOff(int key, int velocity, int channel = defaultChannel); void keyPressure(int key, int pressure, int channel = defaultChannel); void channelPressure(int pressure, int channel = defaultChannel); void pitchBend(int fine, int coarse, int channel = defaultChannel); void controlChange(int controller, int value, int channel = defaultChannel); void programChange(int program, int channel = defaultChannel); }; #endif