On 04/26/2014 01:17 AM, Tobias Doerffel wrote: > Ah sorry, forgot to specifically answer your question. Basically > valueAt() of song-global automation pattern will only return what is > set inside this automation pattern. If the user has connected other > automation patterns, values from there won't be reflected in the > song-global automation pattern (but sent to the model upon playback > (via AutomationTrack::play(...)->AutomationPattern::processMidiTime(...)) > so you would have to make deeper changes in order to get the desired > functionality working. > > Proposal for a generic implementation: duplicate > AutomationPattern::isAutomated() to > AutomationPattern::patternsForModel() (or similiar name) which returns > a list of all AutomationPattern (pointers) to which the given > AutomatableModel is connected to. > > Then you can traverse this list, elaborate the position of the > individual AutomationPatterns and using these information retrieve and > calculate the actual value. I'm however unsure where to implement this > functionality, i.e. > > float AutomatableModel::globalAutomationValueAt( const MidiTime& ) > > or > > float AutomationPattern::globalValueAt( const AutomatableModel *, > const MidiTime& ). > > HTH > > Toby
Thanks, this helps. Personally, I think placing this in AutomatableModel probably makes more sense, conceptually... as the function returns "global value of this model"... A lot of this would be simpler if we had just one static tempo track instead of using automations for tempo, though... might be something to consider for the future. ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ LMMS-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmms-devel
