• Home
  • Raw
  • Download

Lines Matching refs:ev

215 	snd_seq_event_t ev;  in metronome_note()  local
216 snd_seq_ev_clear(&ev); in metronome_note()
217 snd_seq_ev_set_note(&ev, metronome_channel, note, metronome_velocity, 1); in metronome_note()
218 snd_seq_ev_schedule_tick(&ev, queue, 0, tick); in metronome_note()
219 snd_seq_ev_set_source(&ev, port_count); in metronome_note()
220 snd_seq_ev_set_subs(&ev); in metronome_note()
221 snd_seq_event_output(seq, &ev); in metronome_note()
226 snd_seq_event_t ev; in metronome_echo() local
227 snd_seq_ev_clear(&ev); in metronome_echo()
228 ev.type = SND_SEQ_EVENT_USR0; in metronome_echo()
229 snd_seq_ev_schedule_tick(&ev, queue, 0, tick); in metronome_echo()
230 snd_seq_ev_set_source(&ev, port_count); in metronome_echo()
231 snd_seq_ev_set_dest(&ev, client, port_count); in metronome_echo()
232 snd_seq_event_output(seq, &ev); in metronome_echo()
251 snd_seq_event_t ev; in metronome_set_program() local
253 snd_seq_ev_clear(&ev); in metronome_set_program()
254 snd_seq_ev_set_pgmchange(&ev, metronome_channel, metronome_program); in metronome_set_program()
255 snd_seq_ev_set_source(&ev, port_count); in metronome_set_program()
256 snd_seq_ev_set_subs(&ev); in metronome_set_program()
257 snd_seq_event_output(seq, &ev); in metronome_set_program()
422 static void delta_time(struct smf_track *track, const snd_seq_event_t *ev) in delta_time() argument
424 int diff = ev->time.tick - track->last_tick; in delta_time()
428 track->last_tick = ev->time.tick; in delta_time()
456 static void record_event(const snd_seq_event_t *ev) in record_event() argument
462 if (ev->queue != queue || !snd_seq_ev_is_tick(ev)) in record_event()
466 i = ev->dest.port; in record_event()
468 if (ev->type == SND_SEQ_EVENT_USR0) in record_event()
469 metronome_pattern(ev->time.tick); in record_event()
474 if (snd_seq_ev_is_channel_type(ev)) in record_event()
475 i += 1 + (ev->data.note.channel & 0xf); in record_event()
481 switch (ev->type) { in record_event()
483 delta_time(track, ev); in record_event()
484 command(track, MIDI_CMD_NOTE_ON | (ev->data.note.channel & 0xf)); in record_event()
485 add_byte(track, ev->data.note.note & 0x7f); in record_event()
486 add_byte(track, ev->data.note.velocity & 0x7f); in record_event()
489 delta_time(track, ev); in record_event()
490 command(track, MIDI_CMD_NOTE_OFF | (ev->data.note.channel & 0xf)); in record_event()
491 add_byte(track, ev->data.note.note & 0x7f); in record_event()
492 add_byte(track, ev->data.note.velocity & 0x7f); in record_event()
495 delta_time(track, ev); in record_event()
496 command(track, MIDI_CMD_NOTE_PRESSURE | (ev->data.note.channel & 0xf)); in record_event()
497 add_byte(track, ev->data.note.note & 0x7f); in record_event()
498 add_byte(track, ev->data.note.velocity & 0x7f); in record_event()
501 delta_time(track, ev); in record_event()
502 command(track, MIDI_CMD_CONTROL | (ev->data.control.channel & 0xf)); in record_event()
503 add_byte(track, ev->data.control.param & 0x7f); in record_event()
504 add_byte(track, ev->data.control.value & 0x7f); in record_event()
507 delta_time(track, ev); in record_event()
508 command(track, MIDI_CMD_PGM_CHANGE | (ev->data.control.channel & 0xf)); in record_event()
509 add_byte(track, ev->data.control.value & 0x7f); in record_event()
512 delta_time(track, ev); in record_event()
513 command(track, MIDI_CMD_CHANNEL_PRESSURE | (ev->data.control.channel & 0xf)); in record_event()
514 add_byte(track, ev->data.control.value & 0x7f); in record_event()
517 delta_time(track, ev); in record_event()
518 command(track, MIDI_CMD_BENDER | (ev->data.control.channel & 0xf)); in record_event()
519 add_byte(track, (ev->data.control.value + 8192) & 0x7f); in record_event()
520 add_byte(track, ((ev->data.control.value + 8192) >> 7) & 0x7f); in record_event()
524 delta_time(track, ev); in record_event()
525 command(track, MIDI_CMD_CONTROL | (ev->data.control.channel & 0xf)); in record_event()
526 add_byte(track, ev->data.control.param & 0x7f); in record_event()
527 add_byte(track, (ev->data.control.value >> 7) & 0x7f); in record_event()
528 if ((ev->data.control.param & 0x7f) < 0x20) { in record_event()
529 delta_time(track, ev); in record_event()
531 add_byte(track, (ev->data.control.param & 0x7f) + 0x20); in record_event()
532 add_byte(track, ev->data.control.value & 0x7f); in record_event()
536 delta_time(track, ev); in record_event()
537 command(track, MIDI_CMD_CONTROL | (ev->data.control.channel & 0xf)); in record_event()
539 add_byte(track, ev->data.control.param & 0x7f); in record_event()
540 delta_time(track, ev); in record_event()
542 add_byte(track, (ev->data.control.param >> 7) & 0x7f); in record_event()
543 delta_time(track, ev); in record_event()
545 add_byte(track, (ev->data.control.value >> 7) & 0x7f); in record_event()
546 delta_time(track, ev); in record_event()
548 add_byte(track, ev->data.control.value & 0x7f); in record_event()
551 delta_time(track, ev); in record_event()
552 command(track, MIDI_CMD_CONTROL | (ev->data.control.channel & 0xf)); in record_event()
554 add_byte(track, ev->data.control.param & 0x7f); in record_event()
555 delta_time(track, ev); in record_event()
557 add_byte(track, (ev->data.control.param >> 7) & 0x7f); in record_event()
558 delta_time(track, ev); in record_event()
560 add_byte(track, (ev->data.control.value >> 7) & 0x7f); in record_event()
561 delta_time(track, ev); in record_event()
563 add_byte(track, ev->data.control.value & 0x7f); in record_event()
578 if (ev->data.ext.len == 0) in record_event()
580 delta_time(track, ev); in record_event()
581 if (*(unsigned char*)ev->data.ext.ptr == 0xf0) in record_event()
585 var_value(track, ev->data.ext.len - i); in record_event()
586 for (; i < ev->data.ext.len; ++i) in record_event()
587 add_byte(track, ((unsigned char*)ev->data.ext.ptr)[i]); in record_event()