seq.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #define SEQ_HAVE_PANEL
  2. class seq_base : public player_base
  3. {
  4. protected:
  5. int seq_cmd_start(DWORD cflags);
  6. void seq_cmd_stop();
  7. virtual ~seq_base();
  8. //OVERRIDE ME
  9. virtual void seq_shortmsg(DWORD msg)=0;
  10. virtual void seq_sysex(BYTE*,UINT)=0;
  11. virtual int seq_play_start() {return 1;}
  12. virtual void seq_play_stop() {}
  13. seq_base();
  14. private:
  15. virtual int gettime();
  16. virtual int settime(int);
  17. virtual void unpause();
  18. virtual void pause();
  19. DWORD preprocess(DWORD e);
  20. void send_sysex(int n);
  21. // void reset_ins();
  22. UINT do_sysex(UINT src,UINT tm);
  23. BOOL do_ctrl(DWORD e);
  24. void reset();
  25. int note_state(int ch,int note);
  26. void note_on(int ch,int note);
  27. void note_off(int ch,int note);
  28. UINT do_seek(DWORD n,DWORD p);
  29. void thread();
  30. DWORD get_time();
  31. void get_ins(UINT c);
  32. static DWORD WINAPI seq_trd(void* p);
  33. static void sysexfunc(seq_base* cb,BYTE* s,UINT sz);
  34. MIDI_file* mf;
  35. bool kill,paused;
  36. CSysexMap* smap;
  37. int pan,vol;
  38. UINT seek_to,n_events;
  39. MIDI_EVENT* events;
  40. UINT c_loop,loop_start;
  41. BYTE notes[256];
  42. BYTE ctrl_tab[16][128];
  43. BYTE ins_tab[16];
  44. DWORD tm_ofs,p_time;
  45. HANDLE hTrd;
  46. DWORD ins_set;
  47. #ifdef SEQ_HAVE_PANEL
  48. HWND hCtrl;
  49. float tempo;
  50. BOOL novol,noins;
  51. DWORD last_time_ms;
  52. double last_time_ret;
  53. CRITICAL_SECTION tm_sec;
  54. DWORD mute_mask;
  55. bool initialized;
  56. static BOOL CALLBACK CtrlProc(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);
  57. void do_msg(UINT msg,WPARAM wp,LPARAM lp);
  58. void set_mute(UINT ch,BOOL st);
  59. #endif
  60. };