On August 28, 2013 07:25:33 PM Florian Jung wrote:
> Hi,
> 
> can you please explain me what
> 
> addPortCtrlEvents, MidiPort, MidiCtrlVal etc
> 
> are for? I don't understand why we need to keep a list of PortCtrlEvents :/
> 
> I hope you can help me,
> 
> Greetings
> flo

Each MidiPort has a "MidiCtrlValListList* _controller" member.

This list holds all midi controller values, SEPARATE from but 
 identical to each part's event list.

The purpose of the list is to speed up retrieval of controller values
 during SEEK (FF or REW of cursor).

If instead SEEK had to weed through hundreds of different types of events 
 in each part's event list looking for controller events, that could slow 
 things down. 
So these separate lists are kept.

When controller values are entered, like via the pianoroll controller graphs, 
 the events are added to the part's event list just like notes as usual, 
 but these events are ALSO added to these MidiPort controller lists.

The purpose of the addPortCtrlEvents() functions is to ensure, 
 during certain operations, that the values in these lists are 
 up to date - the values are copied directly from the part event lists.

For example: Suppose you change a midi track's output port or channel.
Now the MidiPort's controller list is holding STALE invalid values from 
 some other previous track's part. 
So addPortCtrlEvents() is called to update the MidiPort's controller list
 directly from the track part's event list.
Note that there is a corresponding removePortCtrlEvents() which
 is sometimes called before addPortCtrlEvents() is called, especially 
 in this example of changing a track's output port or channel.

HTH
Tim.

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer

Reply via email to