Sorry about the delay in replying to this.

On Tuesday 21 September 2004 17:18, Douglas McGilvray wrote:
> I think I'm right in saying that the whole composition is converted
> into midi before playing, so the only real-time information
> regarding notes, as they are played, are the midi events.

Broadly true, except that the events are not plain MIDI even at this 
stage -- the MappedEvent class (defined in sound/MappedEvent.h) is 
capable of storing other things besides the contents of a MIDI event.  
Of course, nothing other than MIDI will actually be played to any 
other MIDI device or client -- are you intending for your tracker to 
be a separate process driven via MIDI?

> Accessing 
> the accidental property of the event in the composition would mean
> something along the lines of tracking the transport time and the
> pitch of the note so that the composition could be searched, and
> the information retrieved.

Well, the playback happens in the sequencer process and by this point 
the only events it has access to are the MappedEvents written into 
disc-backed shared-memory segments.  It couldn't search the 
composition even if it wanted to.

A lot of this, obviously, depends on where in the Rosegarden structure 
you actually want to inject your tracking mechanism.

> This, of course, would require a way of ensuring that control
> events are placed around microtonal notes. The simplest way would
> be to scan the composition before playing, in
> RosegardenGUIApp::slotPlay()  perhaps?

Perhaps you might want to look at SegmentMmapper::dump() in 
gui/mmapper.cpp.  That's where the segments in the composition are 
scanned, converted to MappedEvents and dumped into the shared memory 
segment for use by the sequencer process.  That code -- at least in 
RG 0.9.9 and later -- already has some pretty hairy logic to deal 
with triggered segments (Rosegarden's equivalent of macros) which are 
expanded out inline when encountered -- the complication comes partly 
from the fact that this means it's not trivial to know in advance how 
many events we're going to have to write.  This is probably very 
similar to the sort of situation you would have with expanding 
control events on the fly.


Chris


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to