Lines Matching defs:chan
312 static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan,
322 if (voice->chan == chan && voice->note == note) {
333 struct snd_midi_channel *chan,
343 if (voice->chan == chan) {
363 if (voice->chan)
375 att += snd_opl4_volume_table[voice->chan->gm_volume & 0x7f];
376 att += snd_opl4_volume_table[voice->chan->gm_expression & 0x7f];
392 if (!voice->chan->drum_channel)
393 pan += (voice->chan->control[MIDI_CTL_MSB_PAN] - 0x40) >> 3;
408 if (voice->chan->drum_channel)
411 * (voice->chan->control[MIDI_CTL_VIBRATO_DEPTH] & 0x7f);
422 struct snd_midi_channel *chan = voice->chan;
425 note = chan->drum_channel ? 60 : voice->note;
432 if (!chan->drum_channel)
433 pitch += chan->gm_rpn_coarse_tuning;
434 pitch += chan->gm_rpn_fine_tuning >> 7;
435 pitch += chan->midi_pitchbend * chan->gm_rpn_pitch_bend_range / 0x2000;
482 void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_channel *chan)
492 i = chan->drum_channel ? 0x80 : (chan->midi_program & 0x7f);
508 voice[i]->chan = chan;
563 void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_channel *chan)
567 snd_opl4_do_for_note(opl4, note, chan, snd_opl4_voice_off);
578 void snd_opl4_terminate_note(void *private_data, int note, struct snd_midi_channel *chan)
582 snd_opl4_do_for_note(opl4, note, chan, snd_opl4_terminate_voice);
585 void snd_opl4_control(void *private_data, int type, struct snd_midi_channel *chan)
591 chan->control[MIDI_CTL_VIBRATO_DEPTH] = chan->control[MIDI_CTL_MSB_MODWHEEL];
592 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
595 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
598 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pan);
601 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_volume);
607 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_vibrato_depth);
619 snd_opl4_do_for_channel(opl4, chan, snd_opl4_update_pitch);