aboutsummaryrefslogtreecommitdiff
path: root/dssi/src
diff options
context:
space:
mode:
authorJamie Bullock <postlude@users.sourceforge.net>2006-03-29 19:38:55 +0000
committerJamie Bullock <postlude@users.sourceforge.net>2006-03-29 19:38:55 +0000
commit91493ec59eabeadbeb00a386beee48638bef3886 (patch)
treea9d23f24b667f9776bd59a9c8203d0a1b361121c /dssi/src
parent663c469714563dba91513be079abe54c69a88a9a (diff)
Added key and channel aftertouch support.
svn path=/trunk/externals/postlude/; revision=4812
Diffstat (limited to 'dssi/src')
-rw-r--r--dssi/src/dssi~.c14
-rw-r--r--dssi/src/dssi~.h4
2 files changed, 17 insertions, 1 deletions
diff --git a/dssi/src/dssi~.c b/dssi/src/dssi~.c
index 9dd6af4..f50989c 100644
--- a/dssi/src/dssi~.c
+++ b/dssi/src/dssi~.c
@@ -1250,6 +1250,16 @@ static void MIDIbuf(int type, int chan, int param, int val, t_dssi_tilde *x){
x->midiEventBuf[x->bufWriteIndex].data.control.param = 0;
x->midiEventBuf[x->bufWriteIndex].data.control.value = val;
break;
+ case SND_SEQ_EVENT_CHANPRESS:
+ x->midiEventBuf[x->bufWriteIndex].data.control.channel = chan;
+ x->midiEventBuf[x->bufWriteIndex].data.control.param = 0;
+ x->midiEventBuf[x->bufWriteIndex].data.control.value = val;
+ break;
+ case SND_SEQ_EVENT_KEYPRESS:
+ x->midiEventBuf[x->bufWriteIndex].data.note.channel = chan;
+ x->midiEventBuf[x->bufWriteIndex].data.note.note = param;
+ x->midiEventBuf[x->bufWriteIndex].data.note.velocity = val;
+ break;
case SND_SEQ_EVENT_PGMCHANGE:
x->instances[chan].pendingBankMSB = (param - 1) / 128;
x->instances[chan].pendingBankLSB = (param - 1) % 128;
@@ -1295,6 +1305,10 @@ static void dssi_tilde_list(t_dssi_tilde *x, t_symbol *s, int argc, t_atom *argv
break;
case ASCII_b: ev_type = SND_SEQ_EVENT_PITCHBEND;
break;
+ case ASCII_t: ev_type = SND_SEQ_EVENT_CHANPRESS;
+ break;
+ case ASCII_a: ev_type = SND_SEQ_EVENT_KEYPRESS;
+ break;
}
#if DEBUG
post("initial midi NOTE:, arg1 = %d, arg2 = %d, arg3 = %d, arg4 = %d",ev_type,chan,param,val);
diff --git a/dssi/src/dssi~.h b/dssi/src/dssi~.h
index 9a4084e..3c16995 100644
--- a/dssi/src/dssi~.h
+++ b/dssi/src/dssi~.h
@@ -41,7 +41,7 @@
#define DX7_DUMP_SIZE_BULK 4096+8
-#define VERSION 0.93
+#define VERSION 0.94
#define EVENT_BUFSIZE 1024
#define OSC_BASE_MAX 1024
#define TYPE_STRING_SIZE 20 /* Max size of event type string (must be two more bytes than needed) */
@@ -50,6 +50,8 @@
#define ASCII_p 112
#define ASCII_c 99
#define ASCII_b 98
+#define ASCII_t 116
+#define ASCII_a 97
#define LOADGUI 1 /* FIX: depracate this */
#define DEBUG 0