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

Hercules P32 mapping and Controls JS library #1054

Merged
merged 103 commits into from Jan 20, 2017

Conversation

Be-ing
Copy link
Contributor

@Be-ing Be-ing commented Nov 25, 2016

This PR contains both a mapping for the Hercules P32 controller and a new JavaScript library to make mapping development easier. I'd like feedback on both. Documentation for the P32 functionality is on
the wiki. I have started documenting the library inline with the code. Later, I'll move the library documentation to the wiki, but I think it should stay inline while this PR is being reviewed. Please ask questions about the code so I know what to document. :) Look at the P32-specific code for examples of how to use the library. Almost all functionality in the P32 mapping uses the library, except in some cases where it would be overcomplicated. If you have ideas of how to make the library more generally useful for different controllers, please comment.

The library is everything in Hercules-P32-scripts.js above var P32 = {};. For now, I think it should stay there. If anyone else wants to use it, feel free to copy and paste it into your own mapping. This will allow for rapid changes that don't have to maintain backwards compatibility. Perhaps after several people have used it for different controllers, it may make sense to move it to a separate shared JavaScript file.

The library depends on two functions from Lodash, merge and assign. I made a custom build of Lodash including only those two functions. If you want to use the library yourself, you'll have to include the new lodash.mixxx.js file with your XML file.

The library is not compatible with Mixxx 2.0 because it takes advantage of functionality introduced by PR #919. I have made a Mixxx 2.0 compatible version of the P32 mapping that is functionally identical to this on a separate branch.

contains initial commit of JS library as well, which is used for the
bottom row of buttons and the PFL button

mapped:
browse encoder, load buttons, loop size/tempo encoder, loop size LED
displays, filter/loop move encoder, EQ knobs, PFL buttons, volume
faders, crossfader, sync, cue, play, keylock, quantize

TODO:
make deck toggling work, shift buttons, record button, slip button, pad
grids, effects knobs, and effects buttons
for now, deck toggling can be tested by uncommenting line in
Deck.tempoReset()
same encoder controls loop size, loop activation, and loop moving
forgot to add this to a previous commit
Instead, give each Control has its own group property
Press to select beat jumping size. Using a stepped encoder for the filter did not sound that great and now that the effects are mapped, the filter effect can be used in an effect rack with smooth knobs.
These methods can be useful to override with functions that don't
necessarily deal with sending out MIDI messages.
@sblaisot
Copy link
Member

sblaisot commented Jan 2, 2017

Please add lodash.mixxx.js to windows uninstaller.

@Be-ing Be-ing force-pushed the hercules_p32_mapping_for_2.1 branch from 51b80bf to 73402bf Compare January 3, 2017 20:37
@Be-ing Be-ing mentioned this pull request Jan 4, 2017
@Be-ing
Copy link
Contributor Author

Be-ing commented Jan 6, 2017

I think the EffectUnit ControlContainer is a good example of how this library can be used to manage the complex interaction of multiple layers in various conditions.

<name>Hercules P32 DJ</name>
<author>Be</author>
<description>4-deck mapping for Hercules P32 controller</description>
<forums>http://mixxx.org/forums/viewtopic.php?f=7&amp;t=8132</forums>
Copy link
Member

Choose a reason for hiding this comment

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

Want to add link to the wiki page for it?

@rryan
Copy link
Member

rryan commented Jan 20, 2017

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants