aboutsummaryrefslogtreecommitdiff
path: root/desiredata
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2009-05-25 16:36:52 +0000
committerN.N. <matju@users.sourceforge.net>2009-05-25 16:36:52 +0000
commita59713aca6638c4e62b0300776b1f6f75d7f9915 (patch)
tree5858986d80b49a808ef1b4814688348d0695945f /desiredata
parent08f677e7b5ffb28aaf8b041020addc9e8837b8c1 (diff)
reformat
svn path=/trunk/; revision=11501
Diffstat (limited to 'desiredata')
-rw-r--r--desiredata/src/s_midi_alsa.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/desiredata/src/s_midi_alsa.c b/desiredata/src/s_midi_alsa.c
index 894d7200..559b4a1b 100644
--- a/desiredata/src/s_midi_alsa.c
+++ b/desiredata/src/s_midi_alsa.c
@@ -121,25 +121,17 @@ void sys_alsa_do_open_midi(int nmidiin, int *midiinvec, int nmidiout, int *midio
return;
}
-#define md_msglen(x) (((x)<0xC0)?2:((x)<0xE0)?1:((x)<0xF0)?2:\
- ((x)==0xF2)?2:((x)<0xF4)?1:0)
-
void sys_alsa_putmidimess(int portno, int a, int b, int c) {
int channel = a&15;
snd_seq_event_t ev;
snd_seq_ev_clear(&ev);
if (portno >= 0 && portno < alsa_nmidiout) {
- if (a >= 224) { // pitchbend
- snd_seq_ev_set_pitchbend(&ev,channel,CombineBytes(b,c));
- } else if (a >= 208) { // touch
- snd_seq_ev_set_chanpress(&ev,channel,b);
- } else if (a >= 192) { // program
- snd_seq_ev_set_pgmchange(&ev,channel,b);
- } else if (a >= 176) { // controller
- snd_seq_ev_set_controller(&ev,channel,b,c);
- } else if (a >= 160) { // polytouch
- snd_seq_ev_set_keypress(&ev,channel,b,c);
- } else if (a >= 144) { // note
+ if (a >= 224) snd_seq_ev_set_pitchbend(&ev,channel,CombineBytes(b,c));
+ else if (a >= 208) snd_seq_ev_set_chanpress(&ev,channel,b); // touch
+ else if (a >= 192) snd_seq_ev_set_pgmchange(&ev,channel,b);
+ else if (a >= 176) snd_seq_ev_set_controller(&ev,channel,b,c);
+ else if (a >= 160) snd_seq_ev_set_keypress(&ev,channel,b,c);// polytouch
+ else if (a >= 144) { // note
channel = a-144;
if (c) snd_seq_ev_set_noteon(&ev,channel,b,c);
else snd_seq_ev_set_noteoff(&ev,channel,b,c);