Canorus  0.0
seqlib.h
Go to the documentation of this file.
1 /*
2  * File: seqlib.h
3  *
4  * Copyright (C) 1999-2003 Steve Ratcliffe
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  *
16  * ---------
17  * This file is a set of interfaces to provide a little
18  * higher level view of the sequencer. It is mainly experimental
19  * to investigate new approaches. If successful they will be proposed
20  * as additions/replacements to the existing seq lib.
21  *
22  *
23  *
24  */
25 #if HAVE_ALSA_ASOUNDLIB_H
26 #include <alsa/asoundlib.h>
27 #else
28 #include <sys/asoundlib.h>
29 #endif
30 
31 typedef struct seq_context seq_context_t;
32 
36 int seq_new_port(seq_context_t *ctxp);
37 void seq_destroy_port(seq_context_t *cxtp, int port);
38 int seq_connect_add(seq_context_t *ctxp, int client, int port);
39 int seq_init_tempo(seq_context_t *ctxp, int resolution, int tempo,
40  int realtime);
41 void seq_set_queue(seq_context_t *ctxp, int q);
42 int seq_sendto(seq_context_t *ctxp, snd_seq_event_t *ev, int client, int port);
43 snd_seq_addr_t * seq_dev_addr(seq_context_t *ctxp, int dev);
44 void seq_start_timer(seq_context_t *ctxp);
45 void seq_stop_timer(seq_context_t *ctxp);
46 void seq_control_timer(seq_context_t *ctxp, int onoff);
47 int seq_write(seq_context_t *ctxp, snd_seq_event_t *ep);
48 void *seq_handle(seq_context_t *ctxp);
49 
50 void seq_midi_event_init(seq_context_t *ctxp, snd_seq_event_t *ep,
51  unsigned long time, int devchan);
52 void seq_midi_note(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note,
53  int vel, int length);
54 void seq_midi_note_on(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note,
55  int vel, int length);
56 void seq_midi_note_off(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note,
57  int vel, int length);
58 void seq_midi_keypress(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note,
59  int value);
60 void seq_midi_control(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int control,
61  int value);
62 void seq_midi_program(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int program);
63 void seq_midi_chanpress(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan,
64  int pressure);
65 void seq_midi_pitchbend(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int bend);
66 void seq_midi_tempo(seq_context_t *ctxp, snd_seq_event_t *ep, int tempo);
67 void seq_midi_sysex(seq_context_t *ctxp, snd_seq_event_t *ep, int status,
68  unsigned char *data, int length);
69 void seq_midi_echo(seq_context_t *ctxp, unsigned long time);
int seq_sendto(seq_context_t *ctxp, snd_seq_event_t *ev, int client, int port)
void seq_midi_keypress(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note, int value)
void seq_free_context(seq_context_t *cxtp)
int seq_new_port(seq_context_t *ctxp)
void seq_midi_echo(seq_context_t *ctxp, unsigned long time)
void seq_midi_control(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int control, int value)
int seq_write(seq_context_t *ctxp, snd_seq_event_t *ep)
seq_context_t * seq_create_context()
void seq_stop_timer(seq_context_t *ctxp)
int seq_connect_add(seq_context_t *ctxp, int client, int port)
void seq_start_timer(seq_context_t *ctxp)
void seq_destroy_port(seq_context_t *cxtp, int port)
void seq_midi_program(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int program)
void seq_set_queue(seq_context_t *ctxp, int q)
int seq_init_tempo(seq_context_t *ctxp, int resolution, int tempo, int realtime)
seq_context_t * seq_new_client(seq_context_t *ctxp)
void seq_midi_note_on(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note, int vel, int length)
void seq_midi_note_off(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note, int vel, int length)
Definition: seqpriv.h:26
void seq_midi_event_init(seq_context_t *ctxp, snd_seq_event_t *ep, unsigned long time, int devchan)
void seq_midi_chanpress(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int pressure)
void seq_midi_note(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int note, int vel, int length)
snd_seq_addr_t * seq_dev_addr(seq_context_t *ctxp, int dev)
void * seq_handle(seq_context_t *ctxp)
void seq_midi_pitchbend(seq_context_t *ctxp, snd_seq_event_t *ep, int devchan, int bend)
void seq_control_timer(seq_context_t *ctxp, int onoff)
void seq_midi_tempo(seq_context_t *ctxp, snd_seq_event_t *ep, int tempo)
int client
Definition: seqpriv.h:28
void seq_midi_sysex(seq_context_t *ctxp, snd_seq_event_t *ep, int status, unsigned char *data, int length)