Skip to content

update Hercules P32 mapping#1200

Merged
daschuer merged 40 commits intomixxxdj:masterfrom
Be-ing:hercules_p32_mapping_for_2.1
Sep 17, 2017
Merged

update Hercules P32 mapping#1200
daschuer merged 40 commits intomixxxdj:masterfrom
Be-ing:hercules_p32_mapping_for_2.1

Conversation

@Be-ing
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing commented Feb 27, 2017

@Be-ing Be-ing changed the title update Hercules P32 mapping for beatloop_size and beatjump_size update Hercules P32 mapping Mar 12, 2017
Be-ing added 19 commits March 13, 2017 18:22
following the redesign of Deere, effect unit assignment buttons are
associated with decks
now that Components supports shift + effectFocusButton to toggle EffectUnits
Now that they do not adjust beatloop_size out of sync with the actual
loop size
I got confused many times because the encoders are labelled
symmetrically but nothing else on the controller is. So make the entire
deck asymmetrical.
and remove reloop CO which was removed from PR mixxxdj#1187
beatloop_toggle no longer deactivates loops
now that loop_move_forward/backward have been removed
@Be-ing Be-ing mentioned this pull request May 25, 2017
3 tasks
@daschuer
Copy link
Copy Markdown
Member

Who is able to review this?

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented May 26, 2017

Wiki page has been updated.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jun 1, 2017

Ready for merge? It would be nice if Hercules could test all the new features with a master build.

Comment thread res/controllers/Hercules-P32-scripts.js Outdated
this.alignBeats.send(P32.padColors.blue);

this.enableEffectUnitButtons = new components.ComponentContainer(); //fii
this.enableEffectUnitButtons[1] = new components.EffectAssignmentButton({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps create these in a loop?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A loop would require some math for calculating the second byte of the MIDI messages, which I think is a bit overcomplicated when there are only 4 iterations. Sometimes it's easier to just copy & paste.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternative to math:

this.enableEffectUnitButtons = _.map([0x40, 0x41, 0x3c, 0x3d], function(midi, index) {
    return new components.EffectAssignmentButton({
        midi: [0x90 + channel, midi],
        effectUnit: index + 1,
        group: this.currentDeck,
        on: P32.padColors.blue,
        off: P32.padColors.red,
    });
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use Lodash for this, standard Array.prototype.map works.

Comment thread res/controllers/Hercules-P32-scripts.js Outdated
}, true);
} else { // right turn
engine.setValue(this.currentDeck, 'beatjump_1_forward', 1);
engine.beginTimer(200, function () {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this timer necessary here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the button on screen lights up. Thanks for the reminder about this. I'll factor this out into a common function for common-controller-scripts.js.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why delayed by 200ms? I trust the the code is necessary actually and I think I've had to do it as well - at least setting something to 1 and then back to 0 immediately without delay.

Would definitely be nice to have factored out, thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The delay is so the skin button lights up briefly. If it is set to 1 then immediately back to 0 there is no response on screen. For this particular case, there are no skin buttons that light up with beatjump_1_forward, so it doesn't really make a difference. But for buttons like eject it does make a difference.

Comment thread res/controllers/Hercules-P32-scripts.js Outdated
engine.setValue(this.currentDeck, 'eject', 0);
}, true);
}
engine.setValue(this.currentDeck, 'eject', value / 127);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer triggerControl?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I realized that wasn't appropriate here because there is a button up event... although, thinking about it again, this implementation requires that the Load button is released before the Shift button, which is the problem I solved for Components Buttons in #1271. I think I'll refactor this to use Components.

Comment thread res/controllers/midi-components-0.0.js Outdated
engine.setValue(this.group, 'play', 0);
} else {
engine.setValue(this.group, 'eject', 1);
engine.beginTimer(225, function () {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use new triggerControl here?

Be-ing added 5 commits July 3, 2017 17:27
also rearrange the code from top to bottom in order of how the
controller is arranged
By default, the mapping is mirrored like the encoders' labels
The LED displays on the controller can show a maximum of 64.
@Be-ing Be-ing force-pushed the hercules_p32_mapping_for_2.1 branch from ceb2ab3 to 8ebe756 Compare July 4, 2017 00:18
@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Jul 28, 2017

Ready for merge?

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Sep 9, 2017

Ping. Ready for merge? The mapping in master has been broken for some time now with API changes to the Components library.

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Sep 17, 2017

Is there any reason this has not been merged?

@daschuer
Copy link
Copy Markdown
Member

Should I just merge this now, so we can wait for feedback in the beta phase?

@Be-ing
Copy link
Copy Markdown
Contributor Author

Be-ing commented Sep 17, 2017

Yes. Evidently no one is going to give feedback until this is merged.

@daschuer
Copy link
Copy Markdown
Member

Ok, thank you for the work.

@daschuer daschuer merged commit 96bfb41 into mixxxdj:master Sep 17, 2017
@Be-ing Be-ing deleted the hercules_p32_mapping_for_2.1 branch September 26, 2017 16:27
@Be-ing Be-ing restored the hercules_p32_mapping_for_2.1 branch September 26, 2017 16:27
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.

3 participants