Lines Matching refs:note

28 static int note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
29 static int note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev);
30 static int set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev);
99 return note_off_event(dp, 0, q->n.chn, q->n.note, q->n.vel, ev);
102 return note_on_event(dp, 0, q->n.chn, q->n.note, q->n.vel, ev);
110 q->n.chn, 0, q->n.note, ev);
181 return note_on_event(dp, q->v.dev, q->v.chn, q->v.note, q->v.parm, ev);
184 return note_off_event(dp, q->v.dev, q->v.chn, q->v.note, q->v.parm, ev);
188 q->v.chn, q->v.note, q->v.parm, ev);
264 * process note-on event for OSS synth
267 * Accept note 255 as volume change.
271 * Use key-pressure if note >= 128
274 note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
286 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);
290 if (note == 255 && info->ch[ch].note >= 0) {
294 /* set volume to zero -- note off */
304 return set_note_event(dp, dev, type, ch, info->ch[ch].note, vel, ev);
305 } else if (note >= 128)
308 if (note != info->ch[ch].note && info->ch[ch].note >= 0)
309 /* note changed - note off at beginning */
310 set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEOFF, ch, info->ch[ch].note, 0, ev);
312 info->ch[ch].note = note;
314 if (vel) /* non-zero velocity - start the note now */
315 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);
320 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);
323 if (note >= 128) /* key pressure: shifted by 128 */
324 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_KEYPRESS, ch, note - 128, vel, ev);
325 else /* normal note-on event */
326 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);
332 * process note-off event for OSS synth
335 note_off_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, struct snd_seq_event *ev)
347 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev);
351 if (info->ch[ch].note >= 0) {
352 note = info->ch[ch].note;
354 info->ch[ch].note = -1;
355 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEOFF, ch, note, vel, ev);
362 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEOFF, ch, note, vel, ev);
369 * create a note event
372 set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev)
379 ev->data.note.channel = ch;
380 ev->data.note.note = note;
381 ev->data.note.velocity = vel;