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

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

Open
mixxxbot opened this issue Aug 23, 2022 · 9 comments

Comments

@mixxxbot
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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


What are you tryig to achieve?

@mixxxbot
Copy link
Collaborator Author

mixxxbot commented Aug 23, 2022

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

@mixxxbot
Copy link
Collaborator Author

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


Thank you, I have created #3178.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants