openAVproductions / openAV-Luppp

Luppp is a live performance tool, created by OpenAV productions.
http://openavproductions.com/luppp
GNU General Public License v3.0
258 stars 44 forks source link

Cleanup #216

Closed georgkrause closed 6 years ago

georgkrause commented 6 years ago

Did some cleanup on my BPM-Stuff and tried to standartise workflow by using the TimeManager::setBpmZeroOne function to do the calculation if possible.

Question: Why do we need this detour across the logic function?

jack->getLogic()->setBpmZeroOne( value );

We could also do

jack->getTimeManager()->setBpmZeroOne( value );

which seems to be more direct for me. The midi-function is the only place where the Logic::setBpm Function is called and could be removed. This way all tempo related stuff could be removed from Logic, which simplifies the design from my point of view.

georgkrause commented 6 years ago

@harryhaaren thanks for merging, but maybe you could also answer the questions :)

harryhaaren commented 6 years ago

Sorry - missed the questions when doing the merge, thanks for the ping.

The Logic and GridLogic classes represent the entire application logic. Think of them as the official version of the application state - hence any updates to state should go trough it.

If we bypass the Logic classes, the official values aren't updated. In the long term, I'd like to have all the events go thought the logic classes, and controller updater class be hooked in behind the logic interfaces.

Hope that makes sense!

georgkrause commented 6 years ago

Yes, is clear. Thanks!