Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate speeds #966

Closed
wants to merge 68 commits into from
Closed

Alternate speeds #966

wants to merge 68 commits into from

Conversation

plugz
Copy link
Contributor

@plugz plugz commented May 4, 2017

This is basically a redo of #877, which fixes #758, #445, #193.
See #877 for info on the alternateSpeeds deal.

What's more in this PR, is that all the speed-related code is now separated from the Function class.
It is present in the FunctionSpeeds class, and the Speed class.
Speed contains the helper functions (add, toString, etc...) and a speed value.
FunctionSpeeds is the group of {fadeIn, hold, fadeOut} speeds.

This PR could be merge as-is, as it should not break the current version of QLC+, but it breaks the build of QLC+5.

What still needs to be done:

  • fix qmlui build
  • better integrate bpm stuff
  • find a way to use the outerspeed
  • add a "speed override priority" system

plugz added 25 commits September 6, 2016 18:45
 Conflicts:
	engine/src/chaserrunner.h
	engine/src/function.cpp
	engine/src/function.h
	engine/src/rgbmatrix.cpp
	engine/src/scene.cpp
* Chaser: save duration mode
* ChaserStep: fix fromVariant
* FunctionTimings: restore "Duration" loading
Rename timing to speed

Add Function::speeds() and Function::speedsEdit() to get/set speeds

Add -std=c++11 to get the float utils
* Fix merge issues
* Add alternateSpeed* in function implementations
overrideSpeeds is an override of m_speeds
it is not an alternate speed
* RGBMatrix: done
* EFX: todo
* Chaser: todo

also:
* add innerSpeeds/commonSpeeds helpers
* alternateSpeedsEdit now returns a FunctionSpeedsEditProxy
chaser done
sequence todo
* move tempo tests from function_test to functionspeeds_test
* fix speed beatsToMs utils
legacy VCSpeedDialFunction (without alternateSpeedsIdx)
are loaded as inner speeds for chaser, efx and rgbmatrix
@mcallegari
Copy link
Owner

@plugz Hi David, welcome back ! :)

Wow, this is a massive PR and I'm afraid I don't even know where to start reviewing it unless some more documentation is provided.
Most importantly: the more we document the QLC+ engine, the better. So, please document the new methods you added, especially to the Function class.
I can't really understand the difference between speeds / overrideSpeeds / alternateSpeeds / speedsEdit / commonSpeedsEdit.
To fix QLC+ 5, I need to know exactly what I'm doing.

Also, I noticed you removed the totalDuration methods. Those have a precise meaning which is different from 'duration'. Have you checked that all the Show Manager features still work ? For example stretching a Chaser involved totalDuration.
Honestly I don't remember why I placed totalDuration in the Function class, and maybe it can be moved into ShowFunction. In any case we need it.

This for now. Thanks !

plugz added 4 commits May 7, 2017 13:08
In order to be able to use outer speeds,
the elapsed timer should be kept unreseted from
the start of the function.

Add roundTime() and roundBeats() helpers
to keep track of time in the current step.
@plugz
Copy link
Contributor Author

plugz commented May 19, 2017

Hello Massimo,

I had another feature to add in this PR, it's done now.

Wow, this is a massive PR and I'm afraid I don't even know where to start reviewing it unless some more documentation is provided.

I'll now start adding comments everywhere, and I'll try to explain as best as I can here.

To fix QLC+ 5, I need to know exactly what I'm doing.

I might try to fix it myself

Also, I noticed you removed the totalDuration methods. Those have a precise meaning which is different from 'duration'. Have you checked that all the Show Manager features still work ? For example stretching a Chaser involved totalDuration.
Honestly I don't remember why I placed totalDuration in the Function class, and maybe it can be moved into ShowFunction. In any case we need it.

I'm pretty sure I broke the stretch feature, I'll look into it :)

plugz added 23 commits May 22, 2017 08:43
* use Q_GADGET instead of Q_OBJECT macro to allow the use of Q_ENUM
* renameAttribute is public
* old "totalDuration" is now "audioDuration"
* Chaser::totalDuration is renamed to totalRoundDuration
Use EFX innerSpeeds, like it was done before
Restore RGBMatrix::totalDuration() as totalRoundDuration()
* Function: add totalRoundDuration(), formerly totalDuration().
** totalRoundDuration() is the duration of the function
   if run in "one shot" mode.

* Speed: rename switchTempoType to setTempoType to match with
  FunctionSpeeds::setTempType

* Update calls to Function::fadeInSpeed() and friends
@mcallegari mcallegari closed this Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RGB matrix fadein is broken when starting an RGB matrix from a VC slider
2 participants