Skip to content

VCI-100mkII: rewrite with new loop, effect and navigation CO#1293

Closed
sohet wants to merge 24 commits intomixxxdj:masterfrom
sohet:master
Closed

VCI-100mkII: rewrite with new loop, effect and navigation CO#1293
sohet wants to merge 24 commits intomixxxdj:masterfrom
sohet:master

Conversation

@sohet
Copy link
Copy Markdown
Contributor

@sohet sohet commented Jun 25, 2017

Great thanks to Be and Ronso for preparing the new environment!

Copy link
Copy Markdown
Contributor

@Be-ing Be-ing left a comment

Choose a reason for hiding this comment

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

Thanks for continuing to take care of this old controller. :) The use of the new loop, beatjump, and effects controls seems odd in a handful of ways as detailed in comments in the code.

I suggest mapping the bottom row of buttons like the Pioneer DDJ-SB2 mapping. That would require moving or removing the functionality of button 26. I mapped keylock on my first controller mapping but I found that I never actually used it while mixing; I just keep keylock on. Is it really useful to you to have this mapped on your controller? Similarly, the waveform zoom levels are not something I want to adjust while mixing; I have them set how I like then leave them. If you want to keep keylock on the controller, you could move it to shift + button 25 if you remove the waveform zooming.

I have some ideas about how to adjust the effects mapping for this controller. You could use buttons 1 & 2 to switch the top row of buttons (currently only used for hotcues) between different modes. One mode could control the effect enable switches and another could allow choosing the focused effect. You could get the buttons back to hotcue mode by pressing button 1 or 2 again (depending on which was last pressed to activate a layer).

if (n) {
VCI102.parameter(ch, value, VCI102.slot(group, n), "parameter4");
} else {
VCI102.meta(ch, value, group, "super1");
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 did you change this from "mix" (dry/wet)? The superknob is redundant with access to each metaknob.

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.

Since "send" is added to effects that need it (as reverb) by you, I feel dry/wet mix is not necessary any more.

Copy link
Copy Markdown
Contributor

@Be-ing Be-ing Jul 1, 2017

Choose a reason for hiding this comment

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

The dry/wet knob is necessary for controlling the whole chain together. You may want to keep the metaknob of one effect like Filter or Reverb at one position while using the chain and manipulate the metaknobs of other effects. Without the dry/wet knob, you'd have to turn the metaknobs of every effect when mixing the effects in and out, but that does not work well when you want to leave one or more metaknobs in the same position. It also doesn't work well when you are using all 3 effects in a chain, unless you happen to have 3 hands.

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.

You may want to keep the metaknob of one effect like Filter or Reverb at one position while using the chain and manipulate the metaknobs of other effects. Without the dry/wet knob, you'd have to turn the metaknobs of every effect when mixing the effects in and out, but that does not work well when you want to leave one or more metaknobs in the same position.

For this purpose, we have multiple effect units. For example, using one effect unit for variable effects and another unit for constant effects.

It also doesn't work well when you are using all 3 effects in a chain, unless you happen to have 3 hands.

"super1" can also be used for changing 3 effects simultaneously.

I think "mix" and "super1" have pros and cons in controlling the whole effect unit. "mix" can control it with ease and acceptable sound quality, but "super1" can control it with fine adjustments (by changing links from prameters) and better sound quality (mixing wet and dry may degrade the sound).

if (engine.getValue(group, "loop_enabled")) {
engine.setValue(group, "reloop_toggle", 1);
// restore beatloop_size
engine.setValue(group, "beatloop_size", VCI102.loopSize[ch]);
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 are you storing this in a script variable? Mixxx keeps track of this.

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.

I don't want to change beatloop_size (used as default value) while temporary changing loop size on loop. So I save the size at the beginning and restore the size on exit. But now I find "loop_scale" control for temporary change, so rewrite the script.

Copy link
Copy Markdown
Contributor

@Be-ing Be-ing Jul 1, 2017

Choose a reason for hiding this comment

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

loop_scale is not intended for use with beatloops. It only takes into consideration the size of the loop, not the beat positions, so it will create off beat loops with non constant beatgrids.

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.

If you would like to keep this nonstandard behavior, then make it easy for users to change with a boolean variable at the top of the script file. IMO it should default to false.

["loop_enabled", "play", "reverse"].forEach(function(key) {
engine.connectControl(deck, key, VCI102.slip);
});
engine.connectControl(deck, "beatloop_size", beatjumpSize);
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 are you tying these together? They are intentionally separate values. Even if there are not enough controls to manipulate beatjump_size from the controller, users should still be able to set it via mouse or keyboard.

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.

Ok, separate current loop size, beatloop_size and beatjump_size.

engine.setValue(group, "beatloop_size", VCI102.loopSize[ch]);
} else {
VCI102.loopSize[ch] = engine.getValue(group, "beatloop_size");
engine.setValue(group, "beatloop_activate", 1);
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.

beatloop_activate should be reset to 0 or the skin button for it will stay lit.

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.

Add engine.setValue(group, "beatloop_activate", 0). Also add engine.setValue(group, "loop_out", 1) for future possible changes.

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.

Do not add engine.setValue(group, "loop_out", 1) when releasing this button. When a loop is active and loop_out is 1, the loop out point will be continuously adjusted to the play position until loop_out is reset to 0. This is is meant so you can hold down loop_in/loop_out buttons while moving a jog wheel to finely adjust manual loops.

var key, n = engine.getValue(group, "focused_effect");
if (n) {
group = VCI102.slot(group, n);
key = "prev_effect";
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.

prev/next_chain aren't very useful at the moment. In the future (after Mixxx 2.1) I think they'll be revived to cycle through user defined chain presets.

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.

I think effect chain and super knob have been central ideas of Mixxx effect system. Linking parameters of effects various way to one knob is like making an complicated instrument on synthesizer, and controlling such complicated effects by one knob is of great fun. I miss user defined chain presets and want to remain effect chain and super knob till then.

VCI102.fxKnob[ch] = group.slice(0, -1) + "_Effect1]";
VCI102.parameter = function(ch, value, group, key) {
if (VCI102.shift[ch % 2]) {
// link to meta, inverse variants -> none -> direct variants
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.

It doesn't really hurt to have this, but I don't think there's a need to manipulate metaknob linking from a controller. That's meant to be set-and-forget. Mixxx now saves and restores changes the state of metaknob linkings on shutdown/startup.

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.

I know some people using compact controllers like this for preparing tracks at home. For those (including me) mapping editing controls (link to meta, waveform zoom, beats translate, ...) is useful.

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Jun 25, 2017

It is easier to review changes if you split them into smaller commits. The easiest way for you to do this is to work on one change at a time then commit it. Unlike older version control systems, Git works offline, so you can make multiple commits on your computer before pushing them to GitHub for a pull request. If you have modified your code to work on a few unrelated things, you can pick individual changes to stage for a commit, then pick the other changes for the next commit. Using a graphical Git client helps a lot for that. Personally I like Git Cola, but there are others available that you may prefer.

VCI102.reloop = function(ch, midino, value, status, group) {
if (value) {
if (engine.getValue(group, "loop_enabled")) {
engine.setValue(group, "loop_out", 1);
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.

I don't understand why this button is using loop_out. It is unrelated to reloop_toggle. reloop_toggle should be accessible when loops are disabled.

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.

If you want to use a single button for both beatloop_activate and reloop_toggle, I suggest mapping it like I have mapped pushing the loop encoder on the Hercules P32:

  • Push with no loop active: beatloop_activate
  • Push with loop active: reloop_toggle
  • Shift + push with no loop active: reloop_toggle
  • Shift + push with loop active: reloop_andstop

Copy link
Copy Markdown
Contributor Author

@sohet sohet Jul 2, 2017

Choose a reason for hiding this comment

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

This controller sends different messages depending on the shift button. I map VCI102.loop (without shift) and VCI102.reloop (with shift) to the same button 27. So total behavior is,

  • Push with no loop active: beatloop_activate
  • Push with loop active: reloop_toggle
  • Shift + push with no loop active: reloop_toggle
  • Shift + push with loop active: loop_out

Of course I have realized that "loop_out" is intended to be used with "loop_in" for manual loop, but it can be used with "beatloop_activate" (or other beatloop starters) for manual loop. For example,

  • Begin beatloop by "beatloop_activate" with size 8
  • After 5 beats, activate-deactivate "loop_out"
  • Continue to loop with size 5

Though it is not intended use of "loop_out", but works fine at least from Mixxx 1.11 till now. This use of "loop_out" can add manual loop to usual beatloop mapping with minimal cost, I think.

engine.setValue(group, "beatjump_size",
engine.getValue(group, "beatjump_size") * scale);
} else if (engine.getValue(group, "loop_enabled")) {
engine.setValue(group, "loop_scale", scale);
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.

loop_scale is only for manual loops set with loop_in and loop_out which are not mapped on this controller.

@sohet
Copy link
Copy Markdown
Contributor Author

sohet commented Aug 10, 2017

Drastic change of the layout.

  • map effect enabled to button 30-33 (these buttons are originally for effect, but I mapped hotcue to them historically for there was no effect system except flanger)
  • map hotcue to button 23-24 (only hotcue 1 and 2 sorry)
  • map sync to button 25 (just as labeled on the face)

https://www.mixxx.org/wiki/doku.php/vestax_vci-100mkii#mapping_for_mixxx_development

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Sep 26, 2017

FYI, I haven't forgotten about this, but I'm prioritizing getting things together for 2.1 beta. Controller mappings can be merged during the beta period after feature freeze.

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Nov 19, 2017

In case you missed it, we've decided to release Mixxx 2.1 beta on 2017-12-22. I'll get back to reviewing controller mappings to be included in the 2.1 release after the beta is released.

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Dec 23, 2017

I will get to reviewing this soon, but for now I will be taking a break from development and code review for a few days.

@Be-ing Be-ing added this to the 2.1.0 milestone Dec 27, 2017
Copy link
Copy Markdown
Contributor

@Be-ing Be-ing left a comment

Choose a reason for hiding this comment

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

Thanks for updating this. Sorry for the delay reviewing it. Overall it looks good. I made a few comments below. Will you have time to address those comments in the next few days before the 2.1 release and rebase this on the 2.1 branch? If not, we can merge it as it is.

VCI102.parameter(ch, VCI102.slot(group, n), "parameter3", value);
} else {
VCI102.set(VCI102.slot(group, 3), "meta", value);
}
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.

These parameter functions duplicate code. You could have one function and get the parameter number from the MIDI note number. Alternatively, you could create 3 different functions with a for loop.

value -= 27;
} else if (value > 50) {
value = 50;
}
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.

I'm confused what this is doing. Could you explain?

if (value) {
if (engine.getValue(group, "loop_enabled")) {
engine.setValue(group, "loop_out", 1);
engine.setValue(group, "loop_out", 0);
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.

Having loop_out mapped without loop_in seems strange. Maybe you could use reloop_andstop here instead? If you prefer it how it is that is okay though.

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.

loop_out should be set to 1 on button press and set to 0 on button release. That way, when the user holds the button down, the loop out point will move with the play position until they release the button. This allows for setting a new loop out point outside of a loop that is active.

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.

I have just now realized the exact function of "loop_out". Then beginning loop size is irrelevant to manual loop! I will change the code.

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.

This ability to hold down loop_out buttons is new in 2.1 (it was added in #1187).

}
};

VCI102.reloop = function(ch, midino, value, status, group) {
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.

I got quite confused figuring out how this is working. Could you add a comment explaining that this is the loop button with shift?

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.

Some old controllers including VCI-100mkII send messages with different midi numbers depending on shift. So not only VCI102.loop(without shift)-VCI102.reloop(with shift), but also other controls, play-reverse, sync_enabled-quantize, ... can be mapped to same buttons without scripts. You can see them in "Vestax VCI-100MKII.midi.xml".

@sohet
Copy link
Copy Markdown
Contributor Author

sohet commented Mar 26, 2018

Thank you for reviewing. I don't want to change codes at this moment, so only add some comments. How to rebase it on the 2.1 branch?

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Mar 26, 2018

If you haven't done so already, add the upstream repository as a remote:

git remote add upstream https://github.com/mixxxdj/mixxx.git
git fetch upstream

then

git rebase upstream/2.1

@Be-ing Be-ing changed the base branch from master to 2.1 March 26, 2018 12:07
@Be-ing Be-ing changed the base branch from 2.1 to master March 26, 2018 12:07
@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Mar 26, 2018

LGTM, thank you!

@daschuer, I tried rebasing this branch on 2.1 but there are some conflicts. Could you take care of that? I'm not super familiar with resolving rebasing conflicts and don't want to mess up the Git history somehow.

@sohet
Copy link
Copy Markdown
Contributor Author

sohet commented Mar 26, 2018

Sometimes I rebased this branch to Master during this long Pull. And now when I try to rebase it to 2.1, following warnings are shown. How can I resolve it?


First, rewinding head to replay your work on top of it...
Applying: Happy New Year 2018!
Using index info to reconstruct a base tree...
M COPYING
M LICENSE
M build/debian/copyright
M build/wix/LICENSE.rtf
.git/rebase-apply/patch:43: trailing whitespace.
\fs22 Copyright (C) 2001-2018 Mixxx Development Team\par
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: remove NSIS files as we now have completely switched to wix
Applying: also remove nsis patch
Applying: properly update LICENCE and README.md for 2.2
Using index info to reconstruct a base tree...
M LICENSE
M README.md
.git/rebase-apply/patch:44: trailing whitespace.
\pard\qj\ul\b\f0\fs22\lang1036 Mixxx version 2.2, Digital DJ'ing software.\ulnone\b0\fs24\par
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging README.md
Auto-merging LICENSE
Applying: Remove visual studio version from LICENCE
Using index info to reconstruct a base tree...
M LICENSE
.git/rebase-apply/patch:25: trailing whitespace.
On Windows you may receive a copy of the Microsoft Visual Studio runtime libraries. These are distributed only for the purpose of allowing Mixxx to run as per the license agreement for Visual Studio and are copyright of Microsoft.\par
warning: 1 line adds whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging LICENSE
CONFLICT (content): Merge conflict in LICENSE
error: Failed to merge in the changes.
Patch failed at 0005 Remove visual studio version from LICENCE
The copy of the patch that failed is found in: .git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

@Be-ing
Copy link
Copy Markdown
Contributor

Be-ing commented Mar 28, 2018

I rebased this on 2.1 and pushed it directly to that branch. I had to use git rebase -i upstream/2.1 to exclude the commits from the master branch.

@Be-ing Be-ing closed this Mar 28, 2018
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.

3 participants