mixxx icon indicating copy to clipboard operation
mixxx copied to clipboard

make script.deckFromGroup(group) also filter deck from effect groups like [EqualizerRack1_[ChannelN]_Effect1]

Open mixxxbot opened this issue 2 years ago • 9 comments

Reported by: fkbreitl Date: 2020-10-15T10:27:37Z Status: Confirmed Importance: Wishlist Launchpad Issue: lp1899947 Tags: controllers


The Javascript helper function for controller mappings script.deckFromGroup(group) fails for [EqualizerRack1_[ChannelN]_Effect1].

This group is needed for example to adjust the equalizers: https://github.com/mixxxdj/mixxx/wiki/Mixxxcontrols#eqs-and-filters

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-15T17:02:16Z


That function is made for deck strings only. [EqualizerRack1_[ChannelN]_Effect1] is a effect group.

https://github.com/mixxxdj/mixxx/blob/master/res/controllers/common-controller-scripts.js#L152

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-15T17:04:44Z


What are you tryig to achieve?

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-16T14:15:21Z


Btw you can use the 'parseInt' from script.deckFromGroup(): // isolate 'N' from [ChannelN] sourceDeck = parseInt(group.substring(8,9));

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: fkbreitl Date: 2020-10-16T15:32:46Z


I am extending my controller mapping to four decks. Therefore I need to know from which Channel a command was sent. It would be nice if I could use script.deckFromGroup() not only for deck strings. I think replacing the if statement by

    // Extract deck number from the group text
    deck = group.match("Channel.")[0].substring(7);

should fix this. Would you like me to try it out and write a PR?

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-16T18:40:05Z


Why don't you use midi-components? it has a handler for deck switches.

That way you'd also have an up-to-date maaping that could be merged into Mixxx.

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: fkbreitl Date: 2020-10-16T19:17:46Z


Because it didn't work when I tried it and because of its complexity I didn't know how to debug it.

Anyway, you can set this to won't fix if you don't like to fixing it. But the bug is valid, because the function should do what its name "deckFromGroup()" suggests. It also would be useful and the fix is easy.

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-16T20:27:39Z


Sure, if you want to extend script.deckFromGroup() to filter decks from effect control groups (and others) go ahead!

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: ronso0 Date: 2020-10-16T20:28:45Z


maybe you should check https://mixxx.zulipchat.com/#narrow/stream/113295-controller-mapping/topic/C.2B.2B.20controller.20system.20refactoring

mixxxbot avatar Aug 23 '22 02:08 mixxxbot

Commented by: fkbreitl Date: 2020-10-17T08:14:55Z


Thank you, I have created https://github.com/mixxxdj/mixxx/pull/3178.

mixxxbot avatar Aug 23 '22 02:08 mixxxbot