2 terminatorX - realtime audio scratching software
3 Copyright (C) 2002 Arthur Peters
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 Description: Header to tX_midiin.cc
23 Changes (Alexander König <alex@lisas.de>:
24 - Default Constructor for tX_midievents
25 - new handlers for destroy and remove binding events
29 #define _tx_midiin_h 1
46 int number; // note # or controller #
48 float value; // controller value or note velocity
49 bool is_noteon; // note on or off?
51 bool type_matches( const tX_midievent& other ) const
53 return channel == other.channel && type == other.type && number == other.number;
62 tX_midievent() : channel(0), type(NONE), number(0), value(0.0), is_noteon(false) {}
66 #ifdef USE_ALSA_MIDI_IN
68 #include <alsa/asoundlib.h>
73 snd_seq_t *ALSASeqHandle;
74 tX_midievent last_event;
87 void configure_bindings( vtt_class* );
89 const tX_midievent& get_last_event()
96 class midi_binding_gui
99 midi_binding_gui( GtkTreeModel* _model, tX_midiin* _midi );
104 GtkWidget *parameter_treeview;
105 GtkWidget *midi_event_info;
106 GtkWidget *bind_button;
112 tX_midievent last_event;
114 static void window_closed( GtkWidget *widget, gpointer _this );
115 static void unbind_clicked( GtkButton *button, gpointer _this );
116 static void bind_clicked( GtkButton *button, gpointer _this );
117 static void close_clicked( GtkButton *button, gpointer _this );
118 static gint timer( gpointer _this );
127 #endif // USE_ALSA_MIDI_IN
129 #endif // ndef _tx_midiin_h