75 |
|
|
76 |
switch (ev->type) { |
switch (ev->type) { |
77 |
case SND_SEQ_EVENT_CONTROLLER: |
case SND_SEQ_EVENT_CONTROLLER: |
78 |
fprintf(stderr, "Control event on Channel %2d: %5d \n", |
// fprintf(stderr, "Control event on Channel %2d: num=%5d val=%5d \n", |
79 |
ev->data.control.channel, ev->data.control.value); |
// ev->data.control.channel, ev->data.control.param, ev->data.control.value); |
80 |
|
|
81 |
|
pAudioThread->ProcessContinuousController(ev->data.control.channel, ev->data.control.param, ev->data.control.value); |
82 |
|
|
83 |
break; |
break; |
84 |
|
|
85 |
case SND_SEQ_EVENT_PITCHBEND: |
case SND_SEQ_EVENT_PITCHBEND: |
86 |
fprintf(stderr, "Pitchbender event on Channel %2d: %5d \n", |
// fprintf(stderr, "Pitchbender event on Channel %2d: %5d \n", |
87 |
ev->data.control.channel, ev->data.control.value); |
// ev->data.control.channel, ev->data.control.value); |
88 |
break; |
break; |
89 |
|
|
90 |
case SND_SEQ_EVENT_NOTEON: |
case SND_SEQ_EVENT_NOTEON: |
91 |
fprintf(stderr, "Note On event on Channel %2d: note=%5d velocity=%d \n", |
//fprintf(stderr, "Note On event on Channel %2d: note=%5d velocity=%d \n", |
92 |
ev->data.control.channel, ev->data.note.note, ev->data.note.velocity); |
// ev->data.control.channel, ev->data.note.note, ev->data.note.velocity); |
93 |
if (ev->data.note.velocity != 0) { |
if (ev->data.note.velocity != 0) { |
94 |
pAudioThread->ProcessNoteOn(ev->data.note.note, ev->data.note.velocity); |
pAudioThread->ProcessNoteOn(ev->data.note.note, ev->data.note.velocity); |
95 |
} |
} |
99 |
break; |
break; |
100 |
|
|
101 |
case SND_SEQ_EVENT_NOTEOFF: |
case SND_SEQ_EVENT_NOTEOFF: |
102 |
fprintf(stderr, "Note Off event on Channel %2d: note=%5d velocity=%d \n", |
//fprintf(stderr, "Note Off event on Channel %2d: note=%5d velocity=%d \n", |
103 |
ev->data.control.channel, ev->data.note.note, ev->data.note.velocity); |
// ev->data.control.channel, ev->data.note.note, ev->data.note.velocity); |
104 |
pAudioThread->ProcessNoteOff(ev->data.note.note, ev->data.note.velocity); |
pAudioThread->ProcessNoteOff(ev->data.note.note, ev->data.note.velocity); |
105 |
break; |
break; |
106 |
} |
} |
109 |
} // end of if(poll...) |
} // end of if(poll...) |
110 |
} // end of while |
} // end of while |
111 |
} |
} |
112 |
|
|