diff options
Diffstat (limited to 'apps/plugins/midi/sequencer.c')
-rw-r--r-- | apps/plugins/midi/sequencer.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index f97cac0130..307643e4e5 100644 --- a/apps/plugins/midi/sequencer.c +++ b/apps/plugins/midi/sequencer.c | |||
@@ -219,11 +219,11 @@ inline void pressNote(int ch, int note, int vol) | |||
219 | } | 219 | } |
220 | if (a == MAX_VOICES) | 220 | if (a == MAX_VOICES) |
221 | { | 221 | { |
222 | // printf("\nVoice kill"); | 222 | // midi_debug("\nVoice kill"); |
223 | // printf("\nToo many voices playing at once. No more left"); | 223 | // midi_debug("\nToo many voices playing at once. No more left"); |
224 | // printf("\nVOICE DUMP: "); | 224 | // midi_debug("\nVOICE DUMP: "); |
225 | // for(a=0; a<48; a++) | 225 | // for(a=0; a<48; a++) |
226 | // printf("\n#%d Ch=%d Note=%d curRate=%d curOffset=%d curPoint=%d targetOffset=%d", a, voices[a].ch, voices[a].note, voices[a].curRate, voices[a].curOffset, voices[a].curPoint, voices[a].targetOffset); | 226 | // midi_debug("\n#%d Ch=%d Note=%d curRate=%d curOffset=%d curPoint=%d targetOffset=%d", a, voices[a].ch, voices[a].note, voices[a].curRate, voices[a].curOffset, voices[a].curPoint, voices[a].targetOffset); |
227 | lastKill++; | 227 | lastKill++; |
228 | if (lastKill == MAX_VOICES) | 228 | if (lastKill == MAX_VOICES) |
229 | lastKill = 0; | 229 | lastKill = 0; |
@@ -258,13 +258,13 @@ inline void pressNote(int ch, int note, int vol) | |||
258 | if (drumSet[note] != NULL) | 258 | if (drumSet[note] != NULL) |
259 | { | 259 | { |
260 | if (note < 35) | 260 | if (note < 35) |
261 | printf("NOTE LESS THAN 35, AND A DRUM PATCH EXISTS FOR THIS? WHAT THE HELL?"); | 261 | midi_debug("NOTE LESS THAN 35, AND A DRUM PATCH EXISTS FOR THIS? WHAT THE HELL?"); |
262 | 262 | ||
263 | struct GWaveform * wf = drumSet[note]->waveforms[0]; | 263 | struct GWaveform * wf = drumSet[note]->waveforms[0]; |
264 | voices[a].wf = wf; | 264 | voices[a].wf = wf; |
265 | voices[a].delta = (((gustable[note]<<FRACTSIZE) / wf->rootFreq) * wf->sampRate / SAMPLE_RATE); | 265 | voices[a].delta = (((gustable[note]<<FRACTSIZE) / wf->rootFreq) * wf->sampRate / SAMPLE_RATE); |
266 | if (wf->mode & 28) | 266 | if (wf->mode & 28) |
267 | // printf("\nWoah, a drum patch has a loop. Stripping the loop..."); | 267 | // midi_debug("\nWoah, a drum patch has a loop. Stripping the loop..."); |
268 | wf->mode = wf->mode & (255-28); | 268 | wf->mode = wf->mode & (255-28); |
269 | 269 | ||
270 | /* Turn it on */ | 270 | /* Turn it on */ |
@@ -273,7 +273,7 @@ inline void pressNote(int ch, int note, int vol) | |||
273 | 273 | ||
274 | } else | 274 | } else |
275 | { | 275 | { |
276 | /* printf("\nWarning: drum %d does not have a patch defined... Ignoring it", note); */ | 276 | /* midi_debug("\nWarning: drum %d does not have a patch defined... Ignoring it", note); */ |
277 | } | 277 | } |
278 | } | 278 | } |
279 | } | 279 | } |
@@ -322,7 +322,7 @@ static void sendEvent(struct Event * ev) | |||
322 | if(chLastCtrlMSB[status_low] == REG_PITCHBEND_MSB && | 322 | if(chLastCtrlMSB[status_low] == REG_PITCHBEND_MSB && |
323 | chLastCtrlLSB[status_low] == REG_PITCHBEND_LSB) | 323 | chLastCtrlLSB[status_low] == REG_PITCHBEND_LSB) |
324 | { | 324 | { |
325 | // printf("Pitch bend depth set to %d\n", d2); | 325 | // midi_debug("Pitch bend depth set to %d\n", d2); |
326 | chPBDepth[status_low] = d2; | 326 | chPBDepth[status_low] = d2; |
327 | } | 327 | } |
328 | return; | 328 | return; |
@@ -403,10 +403,10 @@ int tick(void) | |||
403 | struct Track * tr = mf->tracks[a]; | 403 | struct Track * tr = mf->tracks[a]; |
404 | 404 | ||
405 | if (tr == NULL) | 405 | if (tr == NULL) |
406 | printf("NULL TRACK: %d", a); | 406 | midi_debug("NULL TRACK: %d", a); |
407 | 407 | ||
408 | //BIG DEBUG STATEMENT | 408 | //BIG DEBUG STATEMENT |
409 | //printf("\nTrack %2d, Event = %4d of %4d, Delta = %5d, Next = %4d", a, tr->pos, tr->numEvents, tr->delta, getEvent(tr, tr->pos)->delta); | 409 | //midi_debug("\nTrack %2d, Event = %4d of %4d, Delta = %5d, Next = %4d", a, tr->pos, tr->numEvents, tr->delta, getEvent(tr, tr->pos)->delta); |
410 | 410 | ||
411 | if (tr != NULL && (tr->pos < tr->numEvents)) | 411 | if (tr != NULL && (tr->pos < tr->numEvents)) |
412 | { | 412 | { |
@@ -421,7 +421,7 @@ int tick(void) | |||
421 | sendEvent(e); | 421 | sendEvent(e); |
422 | if ((e->status&0xF0) == MIDI_PRGM) | 422 | if ((e->status&0xF0) == MIDI_PRGM) |
423 | { | 423 | { |
424 | /* printf("\nPatch Event, patch[%d] ==> %d", e->status&0xF, e->d1); */ | 424 | /* midi_debug("\nPatch Event, patch[%d] ==> %d", e->status&0xF, e->d1); */ |
425 | } | 425 | } |
426 | } | 426 | } |
427 | else | 427 | else |
@@ -429,7 +429,7 @@ int tick(void) | |||
429 | if (e->d1 == 0x51) | 429 | if (e->d1 == 0x51) |
430 | { | 430 | { |
431 | tempo = (((short)e->evData[0])<<16)|(((short)e->evData[1])<<8)|(e->evData[2]); | 431 | tempo = (((short)e->evData[0])<<16)|(((short)e->evData[1])<<8)|(e->evData[2]); |
432 | /* printf("\nMeta-Event: Tempo Set = %d", tempo); */ | 432 | /* midi_debug("\nMeta-Event: Tempo Set = %d", tempo); */ |
433 | bpm=mf->div*1000000/tempo; | 433 | bpm=mf->div*1000000/tempo; |
434 | number_of_samples=SAMPLE_RATE/bpm; | 434 | number_of_samples=SAMPLE_RATE/bpm; |
435 | 435 | ||