Add control for AutoDJ status

Bug #1166095 reported by Florian Wagner on 2013-04-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Medium
Daniel Schürmann

Bug Description

Yesterday I looked at adding a binding in my MIDI controller mapping for AutoDJ. I've found the "toggle_autodj" control which most of the time will turn AutoDJ on/off if used with setValue (not always: if there are no songs in the AutoDJ queue it will do nothing).

But there seems to be no control that signals AutoDJ status and thus no way to use engine.connectControl to get notified (for binding an LED on the controller, for example). That would be important because AutoDJ will turn of by itself when it runs out of songs. That would be nice to display on the controller.

Changed in mixxx:
status: New → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
importance: Undecided → Medium
tags: added: autodj
Daniel Schürmann (daschuer) wrote :

The attached patch introduces a new Control Object as toggle button similar to "[Channel1]", "play":
"[AutoDJ]", "enabled"

We can consider to entirely remove "toggle_autodj" later.

Florian Wagner (wagnerflo) wrote :

This is great! I'll test the patch as soon as possible, which sadly won't be before the weekend.

RJ Skerry-Ryan (rryan) wrote :

Hey Daniel -- the patch looks good except I think the

+ connect(m_pCOEnabledAutoDJ, SIGNAL(valueChanged(double)),
+ this, SLOT(enableAutoDJCo(double)));

should be to the COTM not the CO.

Daniel Schürmann (daschuer) wrote :

Thank your RJ.

Yes, I was not sure.

What do think about removing the "toggle_autodj"?
If someone is already using it, is easy to change.
Where should I commit it?

jus (jus) wrote :

If this change goes into 1.11, let's not forget to adjust the keyboard mappings as we currently use "toggle_autodj" there.

Daniel Schürmann (daschuer) wrote :

I am pro committing to 1.11.1.
Currently it supports both control objects, but I am in favor to remove "toggle_autodj" because it is redundant and it was in no release version yet.

So I will change existing mappings, learning wizards and keyboard shortcuts.

What do you think?

I think toggle should stay -- otherwise how can you toggle AutoDJ with a
single button?

On Fri, Apr 12, 2013 at 5:12 AM, Daniel Schürmann <
<email address hidden>> wrote:

> I am pro committing to 1.11.1.
> Currently it supports both control objects, but I am in favor to remove
> "toggle_autodj" because it is redundant and it was in no release version
> yet.
>
> So I will change existing mappings, learning wizards and keyboard
> shortcuts.
>
> What do you think?
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1166095
>
> Title:
> Add control for AutoDJ status
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1166095/+subscriptions
>

Florian Wagner (wagnerflo) wrote :

By setting it to the negation of the value the control currently has? In Midi-/Javascript terms "engine.setValue(group, name, !engine.getValue(group, name))".

Daniel Schürmann (daschuer) wrote :

Committed to lp:mixxx/1.11 revision 3816 as proposed in #6

Changed in mixxx:
status: In Progress → Fix Committed
milestone: none → 1.11.0
Daniel Schürmann (daschuer) wrote :

Oh I am sorry, I have not read #7 and #8 before #9.

"[AutoDJ]", "enabled" behaves exactly like "toggle_autodj" when setting from midi mapping or keyboard, because it has setButtonMode(ControlPushButton::TOGGLE)
The only difference is that it reflects the current "enabled" state of the AutoDJ.
and when you use setValue from script there is no toggle function.
Florians example is correct.

So it was save to me to delete toggle_autodj.

RJ Skerry-Ryan (rryan) wrote :

Gotcha -- I misunderstood. Thanks!

On Fri, Apr 12, 2013 at 11:46 AM, Daniel Schürmann <
<email address hidden>> wrote:

> Oh I am sorry, I have not read #7 and #8 before #9.
>
> "[AutoDJ]", "enabled" behaves exactly like "toggle_autodj" when setting
> from midi mapping or keyboard, because it has
> setButtonMode(ControlPushButton::TOGGLE)
> The only difference is that it reflects the current "enabled" state of the
> AutoDJ.
> and when you use setValue from script there is no toggle function.
> Florians example is correct.
>
> So it was save to me to delete toggle_autodj.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1166095
>
> Title:
> Add control for AutoDJ status
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1166095/+subscriptions
>

Florian Wagner (wagnerflo) wrote :

I've tested revision 3818 of the mixxx/1.11 branch in regard to this functionality and found it to be working as expected!

Thanks again.

Daniel Schürmann (daschuer) wrote :

Thank you for re-testing!

RJ Skerry-Ryan (rryan) on 2013-05-09
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers