Add control for AutoDJ status

Bug #1166095 reported by Florian Wagner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
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.

Tags: autodj
Changed in mixxx:
status: New → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
importance: Undecided → Medium
tags: added: autodj
Revision history for this message
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.

Revision history for this message
Florian Wagner (wagnerflo) wrote :

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

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 1166095] Re: Add control for AutoDJ status

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
>

Revision history for this message
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))".

Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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
>

Revision history for this message
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.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Thank you for re-testing!

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6982

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.