Lines Matching refs:chn
415 static int find_voice(int dev, int chn, int note) in find_voice() argument
420 key = (chn << 8) | (note + 1); in find_voice()
427 static int alloc_voice(int dev, int chn, int note) in alloc_voice() argument
432 key = (chn << 8) | (note + 1); in alloc_voice()
434 voice = synth_devs[dev]->alloc_voice(dev, chn, note, in alloc_voice()
446 #define chn event_rec[3] in seq_chn_voice_event() macro
462 voice = find_voice(dev, chn, note); in seq_chn_voice_event()
480 voice = alloc_voice(dev, chn, note); in seq_chn_voice_event()
483 voice = chn; in seq_chn_voice_event()
492 if (chn == 9) in seq_chn_voice_event()
495 synth_devs[dev]->chn_info[chn].pgm_num = 128 + note; in seq_chn_voice_event()
497 synth_devs[dev]->setup_voice(dev, voice, chn); in seq_chn_voice_event()
504 voice = chn; in seq_chn_voice_event()
510 voice = chn; in seq_chn_voice_event()
518 #undef chn in seq_chn_voice_event()
528 unsigned char chn = event_rec[3]; in seq_chn_common_event() local
546 if (chn > 15) in seq_chn_common_event()
549 synth_devs[dev]->chn_info[chn].pgm_num = p1; in seq_chn_common_event()
551 synth_devs[dev]->set_instr(dev, chn, p1); in seq_chn_common_event()
554 synth_devs[dev]->set_instr(dev, chn, p1); in seq_chn_common_event()
561 if (chn > 15 || p1 > 127) in seq_chn_common_event()
564 synth_devs[dev]->chn_info[chn].controllers[p1] = w14 & 0x7f; in seq_chn_common_event()
567 synth_devs[dev]->chn_info[chn].controllers[p1 + 32] = 0; in seq_chn_common_event()
577 chn_info[chn].controllers[p1 & ~32] & 0x7f) << 7) in seq_chn_common_event()
579 chn_info[chn].controllers[p1 | 32] & 0x7f); in seq_chn_common_event()
584 key = ((int) chn << 8); in seq_chn_common_event()
591 synth_devs[dev]->controller(dev, chn, p1, w14); in seq_chn_common_event()
594 synth_devs[dev]->controller(dev, chn, p1, w14); in seq_chn_common_event()
600 if (chn > 15) in seq_chn_common_event()
603 synth_devs[dev]->chn_info[chn].bender_value = w14; in seq_chn_common_event()
610 key = (chn << 8); in seq_chn_common_event()
617 synth_devs[dev]->bender(dev, chn, w14); in seq_chn_common_event()
620 synth_devs[dev]->bender(dev, chn, w14); in seq_chn_common_event()
924 int chn; in setup_mode2() local
929 for (chn = 0; chn < 16; chn++) in setup_mode2()
931 synth_devs[dev]->chn_info[chn].pgm_num = 0; in setup_mode2()
933 synth_devs[dev]->chn_info[chn].controllers,0); in setup_mode2()
934 synth_devs[dev]->chn_info[chn].bender_value = (1 << 7); /* Neutral */ in setup_mode2()
935 synth_devs[dev]->chn_info[chn].bender_range = 200; in setup_mode2()
1227 int chn; in seq_reset() local
1246 for (chn = 0; chn < 16; chn++) in seq_reset()
1251 synth_devs[i]->controller(i, chn, 123, 0); /* All notes off */ in seq_reset()
1252 synth_devs[i]->controller(i, chn, 121, 0); /* Reset all ctl */ in seq_reset()
1253 synth_devs[i]->bender(i, chn, 1 << 13); /* Bender off */ in seq_reset()
1270 for (chn = 0; chn < 16; chn++) in seq_reset()
1272 midi_outc(i, (unsigned char) (0xb0 + (chn & 0x0f))); /* control change */ in seq_reset()