From: David Olofson <david@olofson.net>
To: alsa-devel@lists.sourceforge.net
Subject: Re: sequencer: handling non-registered parameter numbers....
Date: Sun, 15 Jun 2003 20:52:05 +0200 [thread overview]
Message-ID: <200306152052.05435.david@olofson.net> (raw)
In-Reply-To: <3EEC9BC6.5090603@folkwang-hochschule.de>
On Sunday 15 June 2003 18.16, Joern Nettingsmeier wrote:
[...]
> /*{SND_SEQ_EVENT_NONREGPARAM, extra_decode_nrpn},*/
> /*{SND_SEQ_EVENT_REGPARAM, extra_decode_rpn},*/
> };
>
> which makes me think it might not yet be implemented....
I'm using NRPNs to control the mixer in the current development
version of Audiality, and they appear to be working just fine, and
just like one would expect.
> any hints or fine manuals around ?
Do you need one? :-)
What you get is plain <control, value> tuples, and that's all there is
to it. (Well, it's all I *want* anyway, as I don't want to do stuff
that's outside the MIDI spec...)
Here's some code, which isn't heavily tested, but does seem to do the
job:
static void alsaseq_read(struct A_device *dev, unsigned frames)
{
int more = 1;
snd_seq_event_t *ev;
ALSASEQ_data *d = (ALSASEQ_data *) dev->driver_data;
dev->read_ms->time = aev_timer;
while(more)
{
more = snd_seq_event_input(d->seq_handle, &ev);
if(more < 0)
break;
switch (ev->type)
{
case SND_SEQ_EVENT_CONTROLLER:
dev->read_ms->control(
ev->data.control.channel,
ev->data.control.param,
ev->data.control.value);
break;
case SND_SEQ_EVENT_NONREGPARAM:
dev->read_ms->nrpn(ev->data.control.channel,
ev->data.control.param,
ev->data.control.value);
break;
...
case SND_SEQ_EVENT_PITCHBEND:
dev->read_ms->bend(ev->data.control.channel,
ev->data.control.value);
break;
}
snd_seq_free_event(ev);
}
}
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -'
--- http://olofson.net --- http://www.reologica.se ---
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
next prev parent reply other threads:[~2003-06-15 18:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-15 16:16 sequencer: handling non-registered parameter numbers Joern Nettingsmeier
2003-06-15 18:52 ` David Olofson [this message]
2003-06-16 7:51 ` Joern Nettingsmeier
2003-06-16 8:25 ` David Olofson
2003-06-16 8:29 ` Jaroslav Kysela
2003-06-16 8:41 ` David Olofson
2003-06-16 8:57 ` Jaroslav Kysela
2003-06-16 9:10 ` David Olofson
2003-06-16 15:05 ` David Olofson
2003-06-16 9:40 ` Joern Nettingsmeier
2003-06-16 9:55 ` Jaroslav Kysela
2003-06-16 11:19 ` Jaroslav Kysela
2003-06-16 12:01 ` Paul Davis
2003-06-16 15:28 ` David Olofson
2003-06-16 16:03 ` Jaroslav Kysela
2003-06-16 16:28 ` Paul Davis
2003-06-18 13:41 ` David Olofson
2003-06-16 15:31 ` Joern Nettingsmeier
2003-06-16 15:46 ` Joern Nettingsmeier
2003-06-16 16:04 ` Jaroslav Kysela
2003-06-19 9:17 ` Joern Nettingsmeier
2003-06-15 18:59 ` Paul Davis
2003-06-16 7:59 ` Joern Nettingsmeier
2003-06-16 12:03 ` Paul Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200306152052.05435.david@olofson.net \
--to=david@olofson.net \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.