Lines Matching refs:ev
84 struct snd_seq_event *ev, in snd_midi_process_event() argument
91 if (ev == NULL || chanset == NULL) { in snd_midi_process_event()
98 if (snd_seq_ev_is_channel_type(ev)) { in snd_midi_process_event()
99 dest_channel = ev->data.note.channel; in snd_midi_process_event()
111 if (ev->type == SNDRV_SEQ_EVENT_NOTE) in snd_midi_process_event()
116 if (ev->type == SNDRV_SEQ_EVENT_NOTEON && ev->data.note.velocity == 0) in snd_midi_process_event()
117 ev->type = SNDRV_SEQ_EVENT_NOTEOFF; in snd_midi_process_event()
120 if (ev->type == SNDRV_SEQ_EVENT_NOTEON || in snd_midi_process_event()
121 ev->type == SNDRV_SEQ_EVENT_NOTEOFF || in snd_midi_process_event()
122 ev->type == SNDRV_SEQ_EVENT_KEYPRESS) { in snd_midi_process_event()
123 if (ev->data.note.note >= 128) in snd_midi_process_event()
127 switch (ev->type) { in snd_midi_process_event()
129 if (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON) { in snd_midi_process_event()
131 ops->note_off(drv, ev->data.note.note, 0, chan); in snd_midi_process_event()
133 chan->note[ev->data.note.note] = SNDRV_MIDI_NOTE_ON; in snd_midi_process_event()
135 ops->note_on(drv, ev->data.note.note, ev->data.note.velocity, chan); in snd_midi_process_event()
138 if (! (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON)) in snd_midi_process_event()
141 note_off(ops, drv, chan, ev->data.note.note, ev->data.note.velocity); in snd_midi_process_event()
145 ops->key_press(drv, ev->data.note.note, ev->data.note.velocity, chan); in snd_midi_process_event()
149 ev->data.control.param, ev->data.control.value); in snd_midi_process_event()
152 chan->midi_program = ev->data.control.value; in snd_midi_process_event()
155 chan->midi_pitchbend = ev->data.control.value; in snd_midi_process_event()
160 chan->midi_pressure = ev->data.control.value; in snd_midi_process_event()
166 if (ev->data.control.param < 32) { in snd_midi_process_event()
168 chan->control[ev->data.control.param + 32] = in snd_midi_process_event()
169 ev->data.control.value & 0x7f; in snd_midi_process_event()
171 ev->data.control.param, in snd_midi_process_event()
172 ((ev->data.control.value>>7) & 0x7f)); in snd_midi_process_event()
175 ev->data.control.param, in snd_midi_process_event()
176 ev->data.control.value); in snd_midi_process_event()
182 = (ev->data.control.value >> 7) & 0x7f; in snd_midi_process_event()
184 = ev->data.control.value & 0x7f; in snd_midi_process_event()
186 = (ev->data.control.param >> 7) & 0x7f; in snd_midi_process_event()
188 = ev->data.control.param & 0x7f; in snd_midi_process_event()
195 = (ev->data.control.value >> 7) & 0x7f; in snd_midi_process_event()
197 = ev->data.control.value & 0x7f; in snd_midi_process_event()
199 = (ev->data.control.param >> 7) & 0x7f; in snd_midi_process_event()
201 = ev->data.control.param & 0x7f; in snd_midi_process_event()
205 if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE) { in snd_midi_process_event()
208 len = snd_seq_expand_var_event(ev, sizeof(sysexbuf), sysexbuf, 1, 0); in snd_midi_process_event()