sequencer.h

来自「一个很好的c++ midi解码算法,不依赖于任何平台.」· C头文件 代码 · 共 86 行

H
86
字号
/* *  sequencer.h *  Copyright (C) 1998,1999 SAKAI Katsuya * *  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 */#ifndef __SEQUENCER_H_#define __SEQUENCER_H_#include <stdio.h> // #include <iostream.h>#include <sys/types.h>#include "config.h"class Sequencer {public:  Sequencer(){ _seqbuf=NULL; flagOpen=0; numberOfDevice=0; seqstart=0;}  virtual int open(char *, int);  virtual int close();  virtual int checkMidiDevice();  virtual int NumOfDevice();  virtual void AllNoteOff(u_char dev);  virtual void reset();  virtual void sync();  virtual int getCtrlRate();  virtual void startTimer();  virtual void stopTimer();  virtual void waitTime(u_long);  virtual void MidiOut(u_char, char);  void seqbuf_dump();  void seqbuf_clear();  virtual void midiEvent1(u_char port, u_char ev, u_char para1);  virtual void midiEvent2(u_char port, u_char ev, u_char para1, u_char para2);  virtual void send_exclusive(u_char port, u_char *ex, int len);  virtual void metaEvent(u_char type, int len, char *data);#ifdef RUNNING_ST  virtual void clearStatus(u_char dev);#endif  void set_timebase(int);  virtual void set_tempo(u_long);  u_long show_tempo();  int show_timebase();protected:  virtual void seq_midiout(u_char dev, u_char dat);  virtual void seq_waittime(u_long);  u_long tempo; // timebase/min  int timebase;  u_long ctrlrate;  double CurrentTime;  u_long LastTick;  int seqfd;  int numberOfDevice;  u_char seqstart;  u_char flagOpen;  u_char *_seqbuf;  int _seqbuflen;  int _seqbufptr;#ifdef RUNNING_ST  u_char LastStatus[16];#endif  u_char LastOutputPort;  virtual void changePort(u_char , u_char);  // serial connection};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?