-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 DJControl Jogvision: First release (all MIDI mapped) #2370
Hercules DJControl Jogvision: First release (all MIDI mapped) #2370
Conversation
Thanks for contibuting! Code looks mostly good to me except for a few small issues. I think removing redundancy could make the code drastically shorter. Pinging @Be-ing, I'm sure he also wants to take a look at this. |
Yes, the first thing that stands out about the code is that only half of it is needed. There's no need to have separate functions for identical features on different decks. You can determine the deck from the MIDI channel or from the "group" parameter passed to the JS function which you'd have to specify in the XML. |
Hi all! |
Hi all! I just pushed a commit with all the suggested changes :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'm not sure why the diff is so broken, did you change the line terminators (DOS/Unix)?
In any case, I reviewed the code and didn't notice major issues. Most of my suggestions are whitespace fixes or replace ==
with type-safe ===
. I'm not sure why you mass-set values in the init
method though.
engine.setParameter("[EffectRack1_EffectUnit1]", "mix", 0.6); | ||
engine.setParameter("[EffectRack1_EffectUnit2]", "mix", 0.6); | ||
engine.setParameter("[QuickEffectRack1_[Channel1]]", "super1", 0.5); | ||
engine.setParameter("[QuickEffectRack1_[Channel2]]", "super1", 0.5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you mass-set these values? I think that this would cause issues if Mixxx gets MIDI hotplug support in the future. If a user accidently disconnects the controller and then reconnects it, this could cause abrupt changes in the audio output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done in the original script to "work around" the limited controls available on the Jogvision (which were built out of the bundle with Serato).
Since there is only one encoder that sends 3 midi signals to control the FX amount (meaning it would affect the level of all 3 effects simultaneously), I figured I could instead configure the fx rack as auto-FX for all 3 buttons and preset the levels to an appropriate amount for each of them.
The same goes for the motion sensor "Air FX", which goes back to 0 by default. In order to use if with the Filter, it needed to be set to the middle position, and it was decided that only the lower range would be used.
There is surely a more practical and elegant ways to do all this for sure, but my coding knowledge are still limited. Any suggestions are much welcomed.
Hi! |
Happy new year to all!! Thanks a lot!!!!! |
Happy New year David! Just tried the new update, and I have to say it works quite well. The only two little things I've noticed are related to the Beat LED:
Not sure if this is a limitation of the current Mixxx state or something that can be modified in your code. |
Hi!
Happy new year!
Well, regarding the beat leads not moving forward... that's weird...
Please, do you best to force Mixxx to reload everyconfig change, because it
works flawlessly since the very beginning of my development-- :(
and for the linked state of synced decks, I simply don't know what to do (I
always thought it should be your responsibility to find the beginning of
the "phrases"/8ths/etc and then try to match them, which would result in a
correct beat_led synchronization, from position 0).
…On Fri, Jan 3, 2020 at 3:49 PM DJ Phatso ***@***.***> wrote:
Happy New year David!
Just tried the new update, and I have to say it works quite well.
The only two little things I've noticed are related to the Beat LED:
- the LED will only move forward when using the jogwheel;
- when the two decks are synced, the two LED are not "linked" to the
same step as they are with other DJ software.
Not sure if this is a limitation of the current Mixxx state or something
that can be modified in your code.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2370?email_source=notifications&email_token=AAE6MGONQWCUWKEULK6WBILQ35F7TA5CNFSM4JRIB22KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIBI46A#issuecomment-570592888>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6MGNGPNYAZBFUQFP54G3Q35F7TANCNFSM4JRIB22A>
.
|
Think you miss read my comment. Forward is fine. Moving backward when using the jogwheel is the problem :-) As for the linked state, I guess we'll have to see what the Mixxx guys have to say about this. Since this is not a common feature, maybe their code just doesn't take LED feedback into consideration. |
Wow, I just thought I missed the point once again ;)
I just can't see the day this driver becomes fully integrated out of the
box with Mixxx!
Thanks a lot, Phatso!!!!!!!
…On Thu, Jan 9, 2020 at 3:13 PM DJ Phatso ***@***.***> wrote:
Think you miss read my comment. Forward is fine. Moving backward when
using the jogwheel is the problem :-)
As for the linked state, I guess we'll have to see what the Mixxx have to
say about this. Since this is not a common feature, maybe their code just
doesn't take LED feedback into consideration.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2370?email_source=notifications&email_token=AAE6MGJYGHMZBZPNYXTZMBLQ44WHNA5CNFSM4JRIB22KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIQNXGY#issuecomment-572578715>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6MGLF2IXWVZOEB77MFZ3Q44WHNANCNFSM4JRIB22A>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a few code-style issues this looks good to me.
By the way, does this mapping use any features that aren't in 2.2? I didn't see any, so I'd suggest you rebase this on 2.2 and target that branch instead. That will allow it to go into 2.2.4. |
Hi! Hope you find it correct! (my knowledge on git is pretty low... :( ) Thanks!!!! |
I think your rebased commits were rejected, you need to use the |
...or you did you forget to remove all lines containing commits that are unrelated to this PR during rebase? |
Hi!
I just pushed another (ultra-little) change:
[david@ubuntu mixxx]$ git commit -a
[Controller_Hercules_DJControl_Jogvision d9dc0f3] Controller: Hercules
DJControl Jogvision some more log trace at shutdown
1 file changed, 2 insertions(+)
[david@ubuntu mixxx]$ git push -v -f
Pushing to https://github.com/perseo22/mixxx.git
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 512 bytes | 0 bytes/s, done.
Total 5 (delta 4), reused 0 (delta 0)
POST git-receive-pack (697 bytes)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/perseo22/mixxx.git
dff8912..d9dc0f3 Controller_Hercules_DJControl_Jogvision ->
Controller_Hercules_DJControl_Jogvision
updating local tracking ref
'refs/remotes/origin/Controller_Hercules_DJControl_Jogvision'
My current branch:
[david@ubuntu mixxx]$ git branch
* Controller_Hercules_DJControl_Jogvision
master
And this is my .git/config:
[david@ubuntu mixxx]$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "upstream"]
url = https://github.com/mixxxdj/mixxx.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
[remote "origin"]
url = https://github.com/perseo22/mixxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote]
pushDefault = origin
[branch "Controller_Hercules_DJControl_Jogvision"]
remote = origin
merge = refs/heads/Controller_Hercules_DJControl_Jogvision
…On Thu, Jan 16, 2020 at 12:11 PM Jan Holthuis ***@***.***> wrote:
I think your rebase commit were rejected, you need to use the -f flag
when pushing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2370?email_source=notifications&email_token=AAE6MGLZ75RJFFAGBHV6MXTQ6A6FRA5CNFSM4JRIB22KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDWEGY#issuecomment-575103515>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6MGK7GJSFAOY3P25F7ZTQ6A6FRANCNFSM4JRIB22A>
.
|
ok ok... I guess that I
" forgot to remove all lines containing commits that are unrelated to this
PR during rebase"
...
You know, I'm a newbie here...
What should a do now? (step-by-step guide would be great... ;)
…On Thu, Jan 16, 2020 at 12:29 PM Jan Holthuis ***@***.***> wrote:
I think your rebased commits were rejected, you need to use the -f flag
when pushing.
...or you did you forget to remove all lines containing commits that are
unrelated to this PR during rebase?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2370?email_source=notifications&email_token=AAE6MGKGQW4GO3WTNN5Z4EDQ6BAH7A5CNFSM4JRIB22KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDXTTQ#issuecomment-575109582>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6MGMVLORVLCZAT5WV67LQ6BAH7ANCNFSM4JRIB22A>
.
|
# First, create a backup in case something goes wrong:
$ git branch -c my-backup-branch
# Next, start an interactive rebase
$ git rebase -i 2.2 Now, a text editor opens. Delete all lines that do not belong to your PR, so that the file only contains these lines:
Then save the file and close the editor. Now, push the changes to the repository: $ git push -f origin Controller_Hercules_DJControl_Jogvision |
No way... :(
[david@ubuntu mixxx]$ git --version
git version 2.7.4
[david@ubuntu mixxx]$ git branch -c my-backup-branch
error: unknown switch `c'
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
...
...
[david@ubuntu mixxx]$ git rebase -i 2.2
fatal: Needed a single revision
invalid upstream 2.2
…On Thu, Jan 16, 2020 at 12:54 PM Jan Holthuis ***@***.***> wrote:
# First, create a backup in case something goes wrong:
$ git branch -c my-backup-branch
# Next, start an interactive rebase
$ git rebase -i 2.2
Now, a text editor opens. Delete all lines that do not belong to your PR,
so that the file only contains these lines:
pick af95a70 Hercules DJControl Jogvision: First release (all MIDI mapped)
pick 9261e96 Hercules DJControl Jogvision: reduced and cleaned the size of the Javascript code
pick 940ef3f Hercules DJControl Jogvision: code cleanup and added orange color to track led
pick 15ec1ef CONTROLLER Hercules_DJControl_Jovision: - Fixed regression not updating the VuMeters - Fixed regression not updating the CUE/MIX buttons
pick dff8912 Controller - Hercules DJControl Jogvision: - Minor code-style changes (use caleCase, use "double quotes" and other if/else styles)
pick d9dc0f3 Controller: Hercules DJControl Jogvision some more log trace at shutdown
Now, push the changes to the repository:
$ git push origin -f Controller_Hercules_DJControl_Jogvision
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2370?email_source=notifications&email_token=AAE6MGOGPWK6N5Z27JSCJBDQ6BDGTA5CNFSM4JRIB22KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDZWFI#issuecomment-575118101>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE6MGIXXDWN6FU7E4RHTDDQ6BDGTANCNFSM4JRIB22A>
.
|
@perseo22 Ok, your git version is almost 4 years old, so the first command is slightly different: # Create backup branch
$ git checkout -b my-backup-branch
# Switch back to original branch
$ git checkout Controller_Hercules_DJControl_Jogvision Also, it looks like you added multiple remotes to you repository, so that git doesn't know if it should use the git branch
Assuming that you have a remote $ git rebase -i origin/2.2 |
- Fixed regression not updating the VuMeters - Fixed regression not updating the CUE/MIX buttons
- Minor code-style changes (use caleCase, use "double quotes" and other if/else styles)
some more log trace at shutdown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this looks mostly good. It's a bit unfortunate that this changes effect settings in init()
because you might have multiple controllers attached, but maybe this provides better UX for users that would otherwise wonder why the effects don't work properly. Not sure.
@Be-ing Any comments?
engine.stopTimer(ledRotationTimer); | ||
ledRotationTimer = 0; | ||
} | ||
//Set all LED states to off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//Set all LED states to off | |
// Set all LED states to off |
and added beatNax variable declaration at the beginning
- Added jogwheel outer led movement when scratch and back/forward spin
Fixed minor code standards
Fixed an ancient bug using "beatjumpSize" instead of "beatjump_size" (shame on me...)
Modified the outer jog led (spin) leds to use a better algorithm (borrowed from the 'Pioneer-DDJ-SX-scripts.js' mapping)
- Changed jogwheel outer led movement based on playposition (much better!) - Added a user variable to set or not some effects at ini - Minor code convention corrections
Hi all! |
…rd) and fix leads positions, what allows backward led activation!! (didn't have that working previously)
Hi!
|
Point number 1 (the LED will only move forward when using the jogwheel) solved in v. 1.11 ;) |
v1.12 Added "alternate" beat leds mode Changed "follow" beats led algorithm with a better/more elegant version
Cleanup (deletion of unused function DJCJV.beatInactive)
Added unused button combo "shift-<MULTI FX>" to do a 'beats_translate_curpos' (align deck's beat_grid to current playposition)
Added "shift"+AIRFX to do a high pass (apart from the default low pass)
Fixed a variables being declared but never used
added better beat_active matching
Hi @Holzhaus , everything ok? |
Reset shift-"Loop ON", to do what Hercules wanted it to be: select FX2 for given channel. Now, the loop creation is done with "MODE"+"Loop ON" combo (here, MODE key works like "SHIFT" key ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Added a "beatDetection" variable to use old school one (way better beat match, but no song position relative)
Hi @Holzhaus ! Could you please take a look at the latest push I did to this mapping? Thanks a lot in advance!! |
Please open a new Pull Request, then we can do a proper review. |
Hercules DJControl Jogvision fully (I hope!) mapped.
https://www.mixxx.org/wiki/doku.php/hercules_dj_control_jogvision
A job mainly from DJ Phatso, with contributions by Kerrick Staley and me, David TV (aka perseo22, aka hasses1.07)