I've just committed some work on making the sequencer use separate ALSA 
ports for the Rosegarden playback devices, so that they can be 
controlled externally using an ALSA connection manager as well as from 
within Rosegarden.

Because this is very experimental, I've committed it to Pedro's old 
multiport branch.  To test it, cvs update -r multiport_recording.  Note 
that this is a branch from somewhere in the 0.9.9 time frame, so it 
lags behind 1.0 in various ways (none relevant to this work).

The principle is pretty simple.  Before, we created a single ALSA 
sequencer port, connected it to everything, and marked each outgoing 
event as intended for a particular recipient.  Now, we create one ALSA 
sequencer port for each "playback device" as shown in the device 
manager, and connect it according to the "connection" shown in the 
device manager.  Changes to the connection from external clients (so 
long as they result in a 1-1 connection mapping) cause the connection 
to be changed in the Rosegarden device manager as well.  I believe this 
is all pretty much as Pedro was suggesting in an email of a few months 
ago -- correct me if I'm wrong.  It seems a natural way for it to work.

I've only given this cursory testing.  In particular I haven't even 
tested the basic normal-use stuff like playing a big multi-device MIDI 
file; I've only tested by connecting things and watching the results on 
connection managers, so far.

Feedback requested, particularly from people who've looked at the 
Rosegarden AlsaDriver code before, or have opinions about the way our 
device management interacts with ALSA.

Three things that definitely aren't working right:

 -- Device renaming.  When you change the name of a device in the device 
dialog, or when you load a RG file with a named device in it, the 
sequencer tries to set the name of the ALSA sequencer port to include 
the new device name.  (AlsaDriver.cpp:915 onwards.)  This doesn't 
appear to work.  Anyone, any ideas?  Is it even possible to rename an 
ALSA sequencer port after creation?

 -- Connections to multiple other clients.  You can now connect a RG 
play device to any number of other ALSA sequencer clients using an 
external connection manager, but RG will only send events to the one it 
thinks it should be sending them to.  It should send events to all of 
them.  Is this as simple as just not bothering to call 
snd_seq_ev_set_dest to set a destination at all on the event, or will 
it need work traversing the subscription graph (surely not!) for each 
event?  I haven't had time to do any messing with this yet.

 -- Device numbers as shown in the port names -- these are the internal 
device numbers, in which the record and playback devices are mixed up, 
so they don't necessarily go contiguously from 1.  Will probably 
change.


Chris


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to