OK, so the metronome situation is a real mess.  Here's what we have so 
far... I think:

* A single metronome Instrument is created by the sequencer 
(AlsaDriver.cpp:793 etc) on the first ALSA device, channel 9.  This 
is then sync'd with the GUI in the usual syncDevices business.  The 
GUI only sees it as an Instrument with id zero, it doesn't know which 
channel it's on or any of that stuff.

* The mmappers retrieve the Instrument from the metronome object in 
the studio and use it to write the metronome segment.  The pitch, 
duration and velocities come from the document configuration.

* Meanwhile, in the .rg file, we have: (1) the document configuration, 
which can specify device, channel, pitch, velocities and duration; 
(2) a <metronome> element in the studio, which can specify 
instrument, percussion flag, msb, lsb, program and pitch.  From (1), 
the pitch, velocities and duration are used (and shown to the user 
for editing); the device and channel are not.  From (2), the 
instrument is used, if given, while the bank, program and pitch 
information are not.

It looks as though the general tendency is towards using the device 
and channel rather than the instrument, and using the document 
configuration rather than the metronome object in the studio.  But we 
need to resolve to do one or the other.  Options:

(a) switch to using device/channel/document config: stop writing the 
instrument id for the metronome in the mmapper, and write 
device/channel instead.  Somehow modify the sequencer code so that it 
can play the metronome events without having an instrument id 
(remember that in this scheme, there is not necessarily any 
instrument corresponding to the user's preferred device/channel).  
Remove the metronome object from the studio, remove the metronome 
instrument from AlsaDriver, remove the metronome element from the .rg 
XML.  Possible alternative: keep the metronome instrument in 
AlsaDriver and make the sequencer fiddle with its device/channel info 
when it needs to play a metronome event -- I think that might be even 
uglier though.

(b) revert to using the metronome-in-studio.  Change the GUI so that 
the user selects device and instrument for the metronome rather than 
selecting device and channel.  (This way they get to choose the 
program too, which I guess they don't the other way.)  Move the 
pitch/velocity/duration information from the document config into the 
metronome object in the studio.  Drop the metronome stuff from the 
document config in RG file, and keep the metronome element instead.  
(We should still lose the percussion-flag/msb/lsb/program from the 
metronome element -- they've never been used.)

So, which?  Or are there other possibilities?  I _think_ I have a 
preference but I'll keep it in reserve for the moment.


Chris



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to