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

Reloop mixage addition #1

Merged
merged 13 commits into from
Nov 12, 2023
Merged

Conversation

gqzomer
Copy link
Collaborator

@gqzomer gqzomer commented Aug 30, 2023

General

  • Replaced lists with dictionaries to store channel variables
  • Changed the default jog scroll speed to 2, so it also works properly when a track is playing
  • Added global ON, OFF, DOWN, variables to improve code readability
  • Rewritten init so al bindings and engine connections are set in a foreachloop in preparation for the addition of deck 3 & 4
  • Rewritten shutdown so disconnecting all connections is done in foreach loops
  • Added Channel2 to the connectionMap and changed the connectControlsToFunctions function to make sure the connections for Channel1 are properly disconnected. Previously Channel2 would overwrite the connections for Channel1 causing Channel1 to never be properly disconnected. There probably is a cleaner way to do this by adding more entries to the function arrays but I took a quick and easy solution.
  • Changed the toggleLED function so it also accepts true to turn on a LED
  • Simplified the scroll and scratch toggle by combining the functions
  • Removed a bug that caused scratching to continue as long as the jogwheel was being turned even though the top of the jogwheel was no longer being touched. Apparently the engine.isScratching status takes a while to be updated therefor I opted for the use of a custom Mixage.scratching parameter.
  • Implemented the script.deckFromGroup(group) function were applicable.
  • Reduced the amount of hardcoded midi controls and moved them to the xml were possible

XML keybinds

  • Added all possible midi commands for the buttons to xml if the midi is currently unbound the <key> is empty
  • Added comments to each control to make mapping easier
  • Changed the order of controls to the order used in the reloop manual. Grouped per channel
  • Bound the shift + and - buttons to beats_translate_earlier and beats_translate_later
  • Bound the shift load buttons to MoveLeft and MoveRight
  • The jogwheel and scratch and scroll toggle now also work in shift mode, this is to accommodate the setting of a manual loop in and loop out point
  • Bound the master key to sync_master, it currently doesn’t actually set the sync master but this will probably handle setting and unsetting the master deck in the future. Because of this I also removed the sync_leader function from the JS
  • Added output for LED control of the beats_translate_earlier beats_translate_later rate_temp_up and rate_temp_down

LEDs

  • Added a number of LEDS to the ledmap (loop, fx_sel, vu_meter)
  • Added LED output bindings for the +/- buttons (rate_temp_up/down and adjust_beatgrid_up/down) in the xml
  • Added new LED behavior to the FX Select and Loop buttons
    • The FX select button is lit when an effect slot is currently selected for a deck
    • The loop button flashes in time with the beat if a loop is currently active
  • Removed sync_master from the ledmap to make room for the fx select

Library

  • Split up the large handleLibrary function into smaller separate functions and bind them to the relevant buttons directly
  • The library now minimizes/maximizes when the Traxx button is doublepressed (0.4 sec delay)
  • Removed the load current track and play function when a load button is pressed in shift mode and bind them to MoveLeft and MoveRight. This way folders can be opened and closed in the library view
  • The automaximize library function remains unchanged

FX

  • Changed the behaviour of most buttons associated with the effects
    • FX on: if no effectunit is currently activated for the deck activates the corresponding effect unit (so channel1 corresponds to effectUnit1). If any effectUnits are active for the deck disable them all.
    • FX sel: changes the current selected effectslot for the corresponding effect unit (so channel1 corresponds to effectUnit1)
    • Dry/Wet turn: controls the effectUnit dry/wet mix when no effectSlot is selected. Cycles through the effects if an effectSlot is selected
    • Dry/Wet press: toggles the selected effectSlot on or off, if no slot is selected turns all effectSlots in the unit off
    • Dry/wet shift: controls the pan of the master channel (unchanged)
    • Amount: controls the super1 for the effect unit if no effectSlot is selected, if a effectSlot is selected controls the meta of that slot
  • Amount (shift): controls the low/high pass filter for the corresponding channel
  • Added soft takeovers for the meta, super1 and filter to prevent sudden level jumps when switching between the modes

I'm curious what your thoughts are on these changes. To be honest the list is more extensive than I originally thought. If you have any suggestions or further improvements please let me know. I'll update the manual when the mappings are finalized and merged into the reloop_mixage branch.

I'm still thinking of adding a binding on the press of the length button. I suppose clearing any existing loop points is in line with the original control scheme but what do you think. Adding a quantize binding somewhere could also be quite handy but I have yet to find a location that makes sense.

@gqzomer
Copy link
Collaborator Author

gqzomer commented Sep 16, 2023

After doing some preparation mixing with these bindings I found it annoying that the faders and equalizer nobs did not work when shift was enabled (I use shift lock). I made some changes in the XML mapping so the volume faders, equalizer nobs and rate adjustment also work when shift is enabled. Potentially some of these controls could be bound to other functions when shift is enabled but I have yet to find a control that is useful and intuitive. So for now I bound them to their default function

@gqzomer
Copy link
Collaborator Author

gqzomer commented Sep 22, 2023

Last week I stumbled upon a dj controller that allowed the user to adjust the loop in and loop out positions with the jog wheel. I really liked this functionality so I decided to add it to the reloop mapping as well. To make this work with the reloop I made some small adjustments to how the loop in and loop out buttons work and changed the way the LEDs behave. I added a clear loop functionality to the mapping while I was at it.

Loop section

  • The behaviour of the loop and reloop buttons remains unchanged.
  • changed behavior of the loop in and loop out button they both work in the same way but affect the loop start/end respectively. For readability I described the functionality of the loop in button below
    • sets the loop start point if none has been set or no loop is currently active
    • if a loop in point has been defined activates adjustment of the loop start point with the jog wheel
    • while in loop adjust mode press the loop in button again to exit the loop adjustment
    • while in loop adjust mode pressing the loop out button switches adjustment over to the loop out point
    • loop adjustment is exited if either of the following buttons is pressed (shift, scroll toggle, scratch toggle)
    • note adjustment of the loop in and out points is only possible if a loop in and out point has been set
  • Pressing the beat move exits the current loop and clears the loop in and out points on the current track

LEDs

  • Removed the beat indicator from the loop button, if a loop is active both the loop and reloop buttons are now lit
  • The reloop button now flashes slowly if the reloop function is available (loop in and out points set on a track) but no loop is currently active
  • when entering the loop adjust for a loop in or out point the respective button flashes rapidly to indicate the adjustment mode is active.

Hopefully you haven't started reviewing yet as I think these changes really add to the functionality of the mapping

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Oct 5, 2023

I really like your changes! I did not look at the code, but hey, it could only have gotten better ;) I tested with Mixxx 2.3.5.

The good - What I like:

  • Double-clicking to maximize the library works well.
  • The effect toggling + selecting is well thought out and the Quick-Effect still works with Shift+Filter.
  • The loop LEDs make sense now.

The bad - Some functionality I could not get to work:

  • Enabling loop adjustment mode / Adjusting loops with the jog wheel (Not sure if this is very intuitive btw.)
  • Library handling did not work for me. Previously you could navigate to the left side and scroll crates etc.

The ugly - Bugs?:

  • Sync (Shift+Master) can't be turned off again on both decks.
  • The reloop LEDs do not flash for me.
  • Right beat length adjustment is inverted (left turn is more, right turn is less)
  • Right beat move is inverted (left turn moves right, right turn moves left)
  • Pressing dry/wet when no effect is selected with the cursor turns all effects off. Should probably be a a toggle? Makes no sense to me that way.

How do you enable Shift-Lock btw?

EDIT: Code looks much better. I also like that you put more functionality into the XML and commented it according to the manual! Please make sure the code conforms to the Mixxx JS style. You need to lint it before we can push it to the PR, else the checks will fail. This is also necessary for the manual, which would also need updating. But let's fix / talk about the supposed bugs before...

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 6, 2023

Thank you for taking the time to test the changes. I'm glad to hear you liked most of them and I'm eager to iron out any bugs or improve the mapping based on your suggestions. I cannot reproduce all the issues you have with the mappings so I'll adress them all as best as I can.

Right beat length adjustment is inverted (left turn is more, right turn is less)
Right beat move is inverted (left turn moves right, right turn moves left)

First things first let's make sure our controllers are an exact match because I cannot reproduce some of the issues you mentioned. While the controllers in the Reloop Mixage series are very similar there could be some differences in the midi signals that are sent which cause the issues.

My current setup is as follows

  • Mixxx 2.3.6 on Fedora 38
  • Reloop Mixage IE MK2
  • Controller running firmware version 1
    • you can check this following the steps described in chapter 6.1 in the manual in short
      • disconnect the usb
      • reconnect the usb while holding the right shift button
      • the version number is displayed in binary on the right cue buttons
      • for me only the play button lights up indicating version 1
  • Shift lock enabled (should be a switch on controller right next to midi channel select switch)

My controller send the following signals for the functions you mentioned you can easily check this by starting mixxx in controller debug mode mixxx --controllerDebug on linux or <path to mixxx.exe> --controllerDebug on windows

  • Loop length (T5)
    • Channel1 (left)
      • left turn (towards minus) ctrl 0x20, val 0x3F
      • right turn (towards plus) ctrl 0x20, val 0x41
    • Channel2 (right)
      • left turn (towards minus) ctrl 0x22, val 0x3F
      • right turn (towards plus) ctrl 0x22, val 0x41
  • Beat move (T5 Shift)
    • Channel1 (left)
      • left turn (towards minus) ctrl 0x5F, val 0x3F
      • right turn (towards plus) ctrl 0x5F, val 0x41
    • Channel2 (right)
      • left turn (towards minus) ctrl 0x61, val 0x3F
      • right turn (towards plus) ctrl 0x61, val 0x41
  • Traxx move (T20) should scroll through tracks
    • left turn (towards left deck) ctrl 0x1F, val 0x3F
    • right turn (towards right deck) ctrl 0x1F, val 0x41
  • Traxx move shift (T20 shift) should scroll through the left pane crates ect.
    • left turn (towards left deck) ctrl 0x5E, val 0x3F
    • right turn (towards right deck) ctrl 0x5E, val 0x41

EDIT: I checked chapter 7.2 in the manual which contains the midi signals and did find any difference between the different reloop mixage controllers. So im curious what your output is for these buttons. Can you also double check that you are using the xml file from this repo?

As to your other points

Sync (Shift+Master) can't be turned off again on both decks.

This is expected behaviour for now, I removed the syncmaster function you wrote and replaced it with a direct xml mapping to set the sync master. Since the syncmaster functionality is supposed to be fixed in mixxx 2.4 I thought the direct xml mapping would be enough and would also handle the toggeling of the master deck. I will test this with the beta release later to see if this is indeed the case.

EDIT: after installing the 2.4.0 beta the sync_master is replaced by sync_leader and is indeed working as expected. A simple xml binding is all that is needed to correctly switch the sync_leader, sync_master still works but is logged as deprecated in the terminal

The reloop LEDs do not flash for me.

Right now a flashing timer is started once a track has been loaded or a loop is exited. The flashing will not activate if no loop in or loop out point are found on the track. If working correctly the reloop LED should be blinking with an interval of 1 second. It works on my side by sending an on off signal to ctrl 0x06 for channel1 and ctrl 0x14 for channel 2.

Pressing dry/wet when no effect is selected with the cursor turns all effects off. Should probably be a a toggle? Makes no sense to me that way.

I still unsure what would be a logical binding for the dry/wet press when no effect is selected. I thought about using it to clear the entire effect rack but opted to use it to disable all effects in stead. A toggle could be possible but I'm unsure how this should work. should it only toggle the effects that are currently on? or should it toggle all effects regardless of state? or should it turn all effects off first and then all on again on the second press? If you have any suggestions please let me know. I think it might be interesting to look at loading effect presets that should be added in version 2.4 and bind that to the press or press + turn.

How do you enable Shift-Lock btw?

As mentioned earlier there should be a switch on the back of your controller labeled SHIFT LOCK. Can you retest the mapping with it enabled, I'm curious if some functionality (like the loop adjust) works for you with it enabled. Anyway its a good reminder to test the controller with it both enabled and disabled to make sure all controls are intuitive in both modes. Using the loop adjust mode without shift lock requires you to hold the shift button continuously while adjusting the loop start and end points (right now the mode is exited once the shift button is released).

Please make sure the code conforms to the Mixxx JS style.

I'm using eslint in my IDE so the code should conform to spec, if not please let me know. I suggest we fix all the issues and make further changes to the mapping before making changes to the manual. Based on you feedback some bindings still need some tweaking.

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Oct 10, 2023

  • I am using Mixxx 2.3.5 on Fedora 38.
  • I have the Reloop Mixage Interface Edition, not the MK2. The device name is displayed as "Reloop Mixage IE".
  • My firmware version is 5 as displayed in binary from the buttons (0101 left-to-right).
  • I've downloaded the files from this PR by viewing them and then getting the raw file. The Loop LEDs work differently, so I think I've put the right files into the Mixxx directory.

MIDI signals are the same:

  • Loop length (T5)
    • Channel1 (left)
      left turn (towards minus) ctrl 0x20, val 0x3F
      right turn (towards plus) ctrl 0x20, val 0x41
    • Channel2 (right)
      left turn (towards minus) ctrl 0x22, val 0x3F
      right turn (towards plus) ctrl 0x22, val 0x41
  • Beat move (T5 Shift)
    • Channel1 (left)
      left turn (towards minus) ctrl 0x5F, val 0x3F
      right turn (towards plus) ctrl 0x5F, val 0x41
    • Channel2 (right)
      left turn (towards minus) ctrl 0x61, val 0x3F
      right turn (towards plus) ctrl 0x61, val 0x41
  • Traxx move (T20) should scroll through tracks
    left turn (towards left deck) ctrl 0x1F, val 0x3F
    right turn (towards right deck) ctrl 0x1F, val 0x41
  • Traxx move shift (T20 shift) should scroll through the left pane crates ect.
    left turn (towards left deck) ctrl 0x5E, val 0x3F
    right turn (towards right deck) ctrl 0x5E, val 0x41

@HorstBaerbel
Copy link
Owner

...The Channel 2 beat length/move is still the wrong way 'round though...

Sync (Shift+Master) can't be turned off again on both decks.

This is expected behaviour for now, I removed the syncmaster function you wrote and replaced it with a direct xml mapping to set the sync master. Since the syncmaster functionality is supposed to be fixed in mixxx 2.4 I thought the direct xml mapping would be enough and would also handle the toggeling of the master deck. I will test this with the beta release later to see if this is indeed the case.

EDIT: after installing the 2.4.0 beta the sync_master is replaced by sync_leader and is indeed working as expected. A simple xml binding is all that is needed to correctly switch the sync_leader, sync_master still works but is logged as deprecated in the terminal

Good to hear!

The reloop LEDs do not flash for me.

Right now a flashing timer is started once a track has been loaded or a loop is exited. The flashing will not activate if no loop in or loop out point are found on the track. If working correctly the reloop LED should be blinking with an interval of 1 second. It works on my side by sending an on off signal to ctrl 0x06 for channel1 and ctrl 0x14 for channel 2.

It works now, I have no idea why... :)

Pressing dry/wet when no effect is selected with the cursor turns all effects off. Should probably be a a toggle? Makes no sense to me that way.

I still unsure what would be a logical binding for the dry/wet press when no effect is selected. I thought about using it to clear the entire effect rack but opted to use it to disable all effects in stead. A toggle could be possible but I'm unsure how this should work. should it only toggle the effects that are currently on? or should it toggle all effects regardless of state? or should it turn all effects off first and then all on again on the second press? If you have any suggestions please let me know. I think it might be interesting to look at loading effect presets that should be added in version 2.4 and bind that to the press or press + turn.

Toggle the stuff that has been enabled on/off or just leave it out completely. It makes no sense otherwise imo. You've just set up your effect, accidentally press dry/wet at any point and you have to do it all again. Also there's FX ON which can disable/enable the rack too (well, soft of, but has the same effect).
Scrolling the effect presets would be a much better option imo!

How do you enable Shift-Lock btw?

As mentioned earlier there should be a switch on the back of your controller labeled SHIFT LOCK. Can you retest the mapping with it enabled, I'm curious if some functionality (like the loop adjust) works for you with it enabled. Anyway its a good reminder to test the controller with it both enabled and disabled to make sure all controls are intuitive in both modes. Using the loop adjust mode without shift lock requires you to hold the shift button continuously while adjusting the loop start and end points (right now the mode is exited once the shift button is released).

With shift-lock (and only with shift-lock) the adjust loop functionality seem to do something, but it makes not much sense to me. If you want to set loops you can set the the loop in/out point arbitrarily with IN/OUT or turn on quantizing. I don't like that the controller seemingly behaves differently depending on shift-lock being set. Also now you can't set loop in/out points when inside a loop. Is that normal Mixxx behaviour?
Can't we map the adjust-loop functionality enable to something else or hide it behind a config switch in the JS file?

Please make sure the code conforms to the Mixxx JS style.

I'm using eslint in my IDE so the code should conform to spec, if not please let me know. I suggest we fix all the issues and make further changes to the mapping before making changes to the manual. Based on you feedback some bindings still need some tweaking.

Very good!

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 10, 2023

...The Channel 2 beat length/move is still the wrong way 'round though...

I'm confused, if we have the same midi outputs when turning the loop length the mapping should also work exactly the same regards of model or firmware. Channel2 can only be inverted if either you controller sends different signals then mine for Channel2 or the legends on our controllers differ (which based on the manuals and the picture of your controller in the MixxxReloopMixageMappings repo are the same).

I went back and tested your original mapping from the reloop_mixage branch and found that using those mappings the Channel2 beat length/move was the wrong way round for me. looking at the code it is clear why in the Mixage.handleBeatMoveLength and Mixage.handleBeatMove you explicitly invert the direction for channel2

var unitNr = control === 0x20 ? 1 : 2;
var direction = unitNr === 1 ? 1 : -1;
var diff = (value - 64);
var loopScale = direction * diff > 0 ? "loop_double" : "loop_halve";
engine.setValue("[Channel" + unitNr + "]", loopScale, true);

I rewrote and simplified this code and also removed the inversion since it seemed unnecessary for the controller

var diff = (value - 64);
var loopScale = diff > 0 ? "loop_double" : "loop_halve";
engine.setValue(group, loopScale, true);

So either your controller sends different midi outputs for Channel2 for turning T5; or we have a different understanding of what turning T5 in a specific direction should do. In my case I expect the loop to shorten and the beatmove to move to an earlier part of the track when turning towards minus (left). I expect the inverse when I turn towards the plus side (right). Or there is some other setting in Mixxx that is different for us that is causing this behaviour.

With shift-lock (and only with shift-lock) the adjust loop functionality seem to do something, but it makes not much sense to me. If you want to set loops you can set the the loop in/out point arbitrarily with IN/OUT or turn on quantizing.

I added the functionality after seeing it in youtube video using another controller, I thought it could be useful. You are right that you can set the loop in and out point arbitrarily when quantize is disabled. However, this does not allow you to gradually change the loop in and out points during playback of the loop. the loop adjust with the jog wheel also allows finer adjustments of loop point that you have already set

I don't like that the controller seemingly behaves differently depending on shift-lock being set.

I bound different actions to the shift press 0x7F and the shift release 0x00. Currently the loop adjustment mode is exited on shift release. The only difference is that with shift-lock enabled only a 0x7F signal is when you enable shift and only a 0x00 signal is send when you disable shift. while with shift-lock disabled a press 0x7F and release 0x00 signal is send with every shift press just as a regular button. So for the loop adjustment to work without shift lock you need to press and hold the shift button down while adjusting using the jog wheel. as soon as you release shift the adjustment mode is exited. I agree that this behaviour needs changing as it currently is not working intuitively with shiftlock disabled

Also now you can't set loop in/out points when inside a loop. Is that normal Mixxx behaviour?

This is not normal Mixxx behaviour but a limitation caused by adding the loop adjust on double press. Otherwise you would set loop in and out points everytime you enter the loop adjustment mode. they should work normally when outside a loop, alternatively you can always clear the currently loop to set new loop in/out points using T5 Shift press.

Can't we map the adjust-loop functionality enable to something else or hide it behind a config switch in the JS file?

This is certainly an option, if you have a good suggestion just let met know

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Oct 10, 2023

I think I've solved the riddle. I've replaced the broken encoder on the right LENGTH knob. Its switches must send the open-close sequence in reverse order. probably everything is fine with your JS. Sorry, I had not realized that until now 🙈

@HorstBaerbel
Copy link
Owner

With shift-lock (and only with shift-lock) the adjust loop functionality seem to do something, but it makes not much sense to me. If you want to set loops you can set the the loop in/out point arbitrarily with IN/OUT or turn on quantizing.

I added the functionality after seeing it in youtube video using another controller, I thought it could be useful. You are right that you can set the loop in and out point arbitrarily when quantize is disabled. However, this does not allow you to gradually change the loop in and out points during playback of the loop. the loop adjust with the jog wheel also allows finer adjustments of loop point that you have already set

I don't like that the controller seemingly behaves differently depending on shift-lock being set.

I bound different actions to the shift press 0x7F and the shift release 0x00. Currently the loop adjustment mode is exited on shift release. The only difference is that with shift-lock enabled only a 0x7F signal is when you enable shift and only a 0x00 signal is send when you disable shift. while with shift-lock disabled a press 0x7F and release 0x00 signal is send with every shift press just as a regular button. So for the loop adjustment to work without shift lock you need to press and hold the shift button down while adjusting using the jog wheel. as soon as you release shift the adjustment mode is exited. I agree that this behaviour needs changing as it currently is not working intuitively with shiftlock disabled

Also now you can't set loop in/out points when inside a loop. Is that normal Mixxx behaviour?

This is not normal Mixxx behaviour but a limitation caused by adding the loop adjust on double press. Otherwise you would set loop in and out points everytime you enter the loop adjustment mode. they should work normally when outside a loop, alternatively you can always clear the currently loop to set new loop in/out points using T5 Shift press.

I'm not an advanced DJ, but I'd rather have intuitive, standard features, than something that might be practical for some, but modifies standard Mixxx behaviour. Also the Mixxx people were quite reluctant to my changes that were not standard, and I understand their reasoning, so I hid them behind a switch in the JS. I'd prefer to do this with the adjust loop feature too, or find a way to make enabling it less intrusive.
Having config switches displayed in the controller settings page might be a good idea. A feature request for Mixx maybe?

Can't we map the adjust-loop functionality enable to something else or hide it behind a config switch in the JS file?

This is certainly an option, if you have a good suggestion just let met know

Maybe SHIFT + pressing LENGTH to toggle the loop adjustment would be an idea? It feels more intuitive to me. Or SHIFT +pressing both loop IN/OUT buttons at the same time. But that is harder to code and maybe a bit error prone.

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 10, 2023

Alright that explains the difference between the behavior of our controllers. I replaced some LEDS on mine to a different colors so my MK2 also isn't standard. But this is good news, it means that there are no apparent differences in the MIDI signals between the Mixage CE, IE and IE MK2 (which is just a simplified IE).

Library handling did not work for me. Previously you could navigate to the left side and scroll crates etc.

It wasn't clear to me if this issues still persist for you, rotating the Traxx knob with shift enabled allows me to navigate through the sidepane. you should also be able to open and close folders in the sidepane by pressing the shift load buttons to open (right) and close (left) filesystem folders. If so we can start improving the mapping.

To do

  • stop the reloop flashing when a track is ejected
  • rewrite the loop adjust to allow setting loop points while a loop is active
    • bind the activate loop adjust to shift T5 (length knob) in shift mode
    • find a new location for clearloop function (currently bound to T5 shift)
  • remove the mixage.stopLoopAdjust from shift release
  • rework the dry/wet press when no effect is selected, see also the considerations
  • thoroughly test the mapping with both shift lock enabled and disabled

nice to haves

  • refactor the Mixage.connectionMap and Mixage.connectControlsToFunctions to reduce redundant code script.bindConnections might be interesting here
  • refactor engine.setValue(group, control, !engine.getValue(group, control)); to script.toggleControl(group, control) where applicable
  • might be interesting to look further in /usr/share/mixxx/controllers/common-controller-scripts.js for other refactor possibilities.

considerations

  • There is an implementation for brake and soft start present in the common-controller-scripts.js the functions script.brake and script.softStart might be interesting to bind somewhere around the jog wheel in shift mode
  • with the release mixxx 2.4 being so close we might opt to rewrite the mapping to take advantage of its new features.
    • the sync_leader only works in the new version
    • cycling through the effect presets is only available in the new version. It includes some really nice presets like echo out.
    • I mentioned it earlier but the Mixage has a midi channel switch on the back. If we adjust the final mapping accordingly we can add support for this feature. allowing users to control 4 decks with 2 controllers or by switching the channel of one controller on the fly.

Let me know if i missed something

@HorstBaerbel
Copy link
Owner

Library handling did not work for me. Previously you could navigate to the left side and scroll crates etc.

It wasn't clear to me if this issues still persist for you, rotating the Traxx knob with shift enabled allows me to navigate through the sidepane. you should also be able to open and close folders in the sidepane by pressing the shift load buttons to open (right) and close (left) filesystem folders. If so we can start improving the mapping.

Works.

  * bind the activate loop adjust to shift T5 (length knob) in shift mode
  * find a new location for clearloop function (currently bound to T5 shift)

I wasn't aware of clearloop. It is also nice to have, but not essential imo. What about the non-shift LENGTH press for clearloop and SHIFT+LENGTH press for adjust?

* There is an implementation for brake and soft start present in the `common-controller-scripts.js` the functions `script.brake` and  `script.softStart` might be interesting to bind somewhere around the jog wheel in shift mode

If that improves scrolling / scratching I'm all for it.

* with the release mixxx 2.4 being so close we might opt to rewrite the mapping to take advantage of its new features.
  * the sync_leader only works in the new version

Good feature though.

  * cycling through the effect presets is only available in the new version. It includes some really nice presets like echo out.

Great feature. I like the effect preset idea.

  * I mentioned it earlier but the Mixage has a midi channel switch on the back. If we adjust the final mapping accordingly we can add support for this feature. allowing users to control 4 decks with 2 controllers or by switching the channel of one controller on the fly.

I like all the 2.4 functionality, but could we, to finally get this out the door, only do some cleanup and just release this mapping with 2.3 and then work on an improved mapping in the 2.4 branch? Not sure when 2.4 will come out and arrive in distros...

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 12, 2023

I wasn't aware of clearloop. It is also nice to have, but not essential imo. What about the non-shift LENGTH press for clearloop and SHIFT+LENGTH press for adjust?

Yeah that should be easy enough to implement to distinguish between a short press for clear loop and a long press when adjusting the beatjump size. I'll will start working on the implementation

If that improves scrolling / scratching I'm all for it.

brake and soft start are not related to scrolling and scratching. Instead they are a stylized way to start (soft start) or stop (brake) playback for a track based on record players. A simple example can be found in this video. You can easily test this for yourself by using the script.brake and script.softStart directly in a xml mapping. My plan is to bind them to the scratch toggle + play/pause button press.

I like all the 2.4 functionality, but could we, to finally get this out the door, only do some cleanup and just release this mapping with 2.3 and then work on an improved mapping in the 2.4 branch? Not sure when 2.4 will come out and arrive in distros...

I agree with getting the mapping merged into the main branch as soon as possible. Sadly it seems 2.3 window has already past since the 2.3.6 release is the final maintenance release before 2.4. I'm afraid the 2.4.1 release will be the first release where we can get the mapping included as the 2.4 beta is already available with the stable release around the corner (august was the planned release date. Might as well include the new 2.4 features, unless there is a way to get the mapping added to previous stable releases.

@HorstBaerbel
Copy link
Owner

Well, alright then. I fear we'll have to rebase on 2.4 then. Should we just still merge this in to the 2.3 branch / same PR?

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 13, 2023

Well, alright then. I fear we'll have to rebase on 2.4 then.

As far as I have tested thus far this shouldn't be to much work. They have added support for ES6 in 2.4 but its unclear to me if it is expected that new mappings are writting in ES6. If that is the case we may have to refactor some code. If not not we just have to implement the new 2.4 features which are.

  • loading of effect chain presets using the chain_selector control which works similar to the effect_selector control already implemented in the current mapping (bind to dry/wet press + turn, when no effect is selected).
  • replacing the sync_master in the xml mapping with sync_leader

Should we just still merge this in to the 2.3 branch / same PR?

I'll leave this up to you but it might be worth asking in the pull request if this makes sense, especially since the code has been completely refactored since then, or if it is just better to create a new pull request for 2.4. In any case your current pull request is over a year old so bumping it with a question might be a good idea.

Before we can merge to 2.3 there we still need to fix the following issues

  • rewrite the loop adjust (currently working on this)
  • replace the sync_master which is not working in 2.3 with something useful like quantize
  • change the behavior of the dry/wet press when no effect is selected to toggle all racks on/off or maybe clear the effect rack (maybe you can work on this if you want to)
  • stop the reloop flashing when a track is ejected (a bit more work to fix in 2.3 due to a bug with loop_end_position which doesn't return -1 if no track is loaded)

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 16, 2023

I have rewritten the loop adjust slightly and rebound some functionality.

  • loop adjust mode is now entered through SHIFT + LENGTH press
  • loop adjust mode can be exited by pressing SHIFT + LENGTH or by pressing the scratch or scroll toggle buttons
  • the flashing button indicates which point is adjusted
    • when loop adjust mode is entered both the loop in and loop out button are flashing.
    • with both flashing both start and end points are moved at the same time moving the entire loop
    • pressing the loop in or loop out button selects which point will be adjusted.
    • pressing the loop in button while the loop in point is already being adjusted switches the adjustment back to start and end point. The same is true for the loop out button
  • pressing the LENGTH button shortly will clear the loop
  • pressing the LENGTH button while turning still adjusts beatjump size

I saw your reply on the pull request on the main branch, I hope we get a reply soon. In the mean time I might start implementing the 2.4 features into the mapping. I was thinking about binding cycling effect presets to press + turn of the dry/wet no matter which effect slot is selected (not sure if this will work intuitively with the current effect_meta control). Pressing the dry/wet when no slot is selected can then toggle all effects in a preset on or off. Lastly we can bind the dry/wet mix mode toggle to a SHIFT + PRESS of the dry/wet button.

Anyway I'm curious if the reworked loop adjustment mode makes more sense to you.

@HorstBaerbel
Copy link
Owner

Came back from a vacation today. Will check out the changes in the next days 👍

@gqzomer
Copy link
Collaborator Author

gqzomer commented Oct 29, 2023

I have added support for the new features in 2.4 and refactored the code in the process. A quick overview of the changes

Effects

  • added support for the new chain presets these can now be set for both the EffectUnit and the QuickEffectRack1
  • a preset can be loaded in an EffectUnit by pressing the dry/wet knob and rotating it, regardless of if an effectslot is selected
  • pressing the dry/wet knob when no Effectslot is selected will toggle all effects in the unit or or off
  • I removed the pan functionality from the dry/wet knob in shift mode as it doesn't make sense with the new 2.4 features (balance is now available in the QuickEffectRack1)
    • instead the effect in the QuickEffectRack1_[Channelx] unit can be changed by rotating the dry/wet nob is shift mode
    • pressing the dry/wet knob in shift mode toggles the QuickEffectRack1_[Channelx] on or off
  • The blinking of reloop LED is now disabled on eject and enabled again after exiting loop adjust mode

Other controls

  • pressing the play button while the scratch toggle (disc) button is being held will brake or soft start the deck respectively
  • touching the wheel in scroll or loop adjustment mode now affects scroll/adjustment speed. While the top is touched adjustments are made 3 times faster than when only the edge is touched. this allows for faster or more fine grained adjustment as needed

refactoring

  • Implemented script.toggleControl where applicable
  • reworked the Mixage.connectControlsToFunctions function to handle a dictionary with only controls to reduce the size of Mixage.connectionMap
  • changed the order of functions and objects to statics, internal functions, mapped functions
  • removed deprecated controls like VuMeter and sync_master replaced them with their new counterparts
  • the Mixage.blinkLED now uses the [App],indicator_250ms internally syncing the flashing of the loop leds with the cue and play flashing in Mixxx

These changes make the mapping incompatible with previous mixxx version so you need to compile mixxx 2.4 locally to test these changes. I'm really curious as to what you think of the new changes and additions and if everything makes sense and no bugs are present. I consider the mapping mostly done apart from 2 small considerations

  • I'm not sure the control I've have bound to the plus and minus buttons in shift mode (beats_translate_earlier and beats_translate_later) are all that useful. I'm thinking binding them to adjusting the key or a stronger variant of rate_temp_up and rate_temp_down might be more useful. what do you think
  • You mentioned earlier that the double press to minimize and maximize the library works well enough for you. If that is the case we might opt to remove the auto maximize feature completely (this also allows the removal of the Mixage.handleTraxTurn function) , but again I'm curious about what you think.

In any case I suggest we do some minor changes and bugfixes and work towards creating a new pull request to get this mapping included in the main branch. We might still be able to get it included in the 2.4 release but I am unsure if they are willing to change to scope of the release at this time. maybe we can open a new topic on the Mixxx forums as you did for the initial version of this mapping to get peoples opinion and find any potential bugs. In any case I'm eager to get this mapping in the hands of other Mixage users and hope we can get it merged soon.

@HorstBaerbel
Copy link
Owner

I failed to build Mixxx 2.4 on Fedora due to missing dependencies. Installing the beta from an RPM package does not work either, again, due to dependencies. I'll wait until a 2.4.0 is released.

@HorstBaerbel
Copy link
Owner

I'll at least check out the changes from #9f76150.

Btw did you know that you can:

  • Display the jog wheel touch sensitivity by holding the right play button when turning the deck on
  • Light up all LEDs by holding the left >< button when turning the deck on
    ?

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 9, 2023

I failed to build Mixxx 2.4 on Fedora due to missing dependencies. Installing the beta from an RPM package does not work either, again, due to dependencies. I'll wait until a 2.4.0 is released.

I also had some trouble getting mixxx to build initially on Fedora since the information I could find is not completely up to date. I have already compiled it on two different fedora Installations so I can provide you with the steps I took. Let me know if the following steps work for you.

  1. enable the RPMFusion package repository.
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm 
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  1. install build dependencies
sudo dnf install gcc-c++ ccache ninja-build
sudo dnf builddep mixxx --allowerasing
sudo dnf install guidelines-support-library-devel qt5-qtdeclarative-devel qt5-qtquickcontrols qt5-qtquickcontrols2 gtest gtest-devel google-benchmark-devel gmock gmock-devel
  1. clone mixxx repo and checkout 2.4 branch
$ git clone https://github.com/mixxxdj/mixxx.git
$ cd mixxx
$ git checkout 2.4
  1. build mixxx following the instructions
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
  1. Once the build is complete open the mixxx binary in the build folder

Display the jog wheel touch sensitivity by holding the right play button when turning the deck on

No I did accidentally find this mode but didn't know what it did. Not sure if it has any practical use on my MK2 as it doesn't have the jog sensitivty control on the back controller like the MK1. Still nice to know what it is supposed to be doing

Light up all LEDs by holding the left >< button when turning the deck on

Yes I used this when I replaced the yellow LEDs on the play buttons for orange LEDs to test if I had soldered them in correctly.

In the meantime I have finished making a numbered svg schematic of the controller which we can include on the manual page to describe what each button does. I will include it in the manual repo somewhere soon.

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Nov 9, 2023

I have rewritten the loop adjust slightly and rebound some functionality.

* loop adjust mode is now entered through SHIFT + LENGTH press

* loop adjust mode can be exited by pressing SHIFT + LENGTH or by pressing the scratch or scroll toggle buttons

* the flashing button indicates which point is adjusted
  
  * when loop adjust mode is entered both the loop in and loop out button are flashing.
  * with both flashing both start and end points are moved at the same time moving the entire loop
  * pressing the loop in or loop out button selects which point will be adjusted.
  * pressing the loop in button while the loop in point is already being adjusted switches the adjustment back to start and end point. The same is true for the loop out button

* pressing the LENGTH button shortly will clear the loop

* pressing the LENGTH button while turning still adjusts beatjump size

Anyway I'm curious if the reworked loop adjustment mode makes more sense to you.

These work nicely and do not interfere. Like it!

@HorstBaerbel
Copy link
Owner

* a preset can be loaded in an `EffectUnit` by pressing the dry/wet knob and rotating it, regardless of if an effectslot is selected

Works. Cool. Need to look into how to building them

* pressing the dry/wet knob when no Effectslot is selected will toggle all effects in the unit or or off

The problem is that when you've only enable 1 or 2 of the effects in the rack all get disabled, but also all get enabled again. This might not be what you want. Don't you think a better solution (much more effort maybe) would be to store the effects on disabling and enable only the stored effects? When a user enables an effect through the UI in the meantime, pressing dry/wet will disable all again.

* I removed the pan functionality from the dry/wet knob in shift mode as it doesn't make sense with the new 2.4 features (balance is now available in the `QuickEffectRack1`)

Should be enough imo

  * instead the effect in the `QuickEffectRack1_[Channelx]`  unit can be changed by rotating the dry/wet nob is shift mode
  * pressing the dry/wet knob in shift mode toggles the `QuickEffectRack1_[Channelx]` on or off

Works for me and is coherent

* The blinking of reloop LED is now disabled on eject and enabled again after exiting loop adjust mode

Works

* pressing the play button while the scratch toggle (disc) button is being held will brake or soft start the deck respectively

After that scratch is enabled. Should that be the case?

* touching the wheel in scroll or loop adjustment mode now affects scroll/adjustment speed. While the top is touched adjustments are made 3 times faster than when only the edge is touched. this allows for faster or more fine grained adjustment as needed

Works nicely

* I'm not sure the control I've have bound to the plus and minus buttons in shift mode (`beats_translate_earlier` and `beats_translate_later`) are all that useful. I'm thinking binding them to adjusting the key or a stronger variant of `rate_temp_up` and `rate_temp_down` might be more useful. what do you think

For me the buttons are still nudging the deck. Anything like "rate_temp_up" might be bad, because then the speed slider is still sitting where it was before. I find that counter-intuitive. Not sure what else to map them to though...

* You mentioned earlier that the double press to minimize and maximize the library works well enough for you. If that is the case we might opt to remove the auto maximize feature completely (this also allows the removal of the `Mixage.handleTraxTurn` function) , but again I'm curious about what you think.

Do that. Might simplify the code a bit.

@HorstBaerbel
Copy link
Owner

In any case I suggest we do some minor changes and bugfixes and work towards creating a new pull request to get this mapping included in the main branch. We might still be able to get it included in the 2.4 release but I am unsure if they are willing to change to scope of the release at this time. maybe we can open a new topic on the Mixxx forums as you did for the initial version of this mapping to get peoples opinion and find any potential bugs. In any case I'm eager to get this mapping in the hands of other Mixage users and hope we can get it merged soon.

I like it very much as-is. So I have no objections to merging it. Not sure what we should do with the Mixxx PR though. Also we need to update the manual with the new functionality.

@HorstBaerbel
Copy link
Owner

I've also rewired my replacement encoder, so the LENGTH button works the correct way 'round ;)

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 10, 2023

Ah so you were able to get 2.4 to compile with the missing dependecies installed.

The problem is that when you've only enable 1 or 2 of the effects in the rack all get disabled, but also all get enabled again. This might not be what you want. Don't you think a better solution (much more effort maybe) would be to store the effects on disabling and enable only the stored effects? When a user enables an effect through the UI in the meantime, pressing dry/wet will disable all again.

fair point the current implementation has its limits and drawbacks. We could store the states for each effect unit in an object when the button is pressed and any unit is active. This saved state can then be loaded again when the button is pressed when no unit is active. Still not sure how we combine this with the new effect presents though, by default an effect preset that is loaded has all units disabled. Should the toggle then enable all units in that preset? It wouldn't make sense to load a previous toggle state when a preset is loaded. I'm curious what you think, I'll look into changing the current behaviour.

After that scratch is enabled. Should that be the case?

In the current implementation yes, as I thought it wouldn't matter much. But it might be better to implement a long/short press detection to avoid changing the scratch state. I'll start working on it.

For me the buttons are still nudging the deck. Anything like "rate_temp_up" might be bad, because then the speed slider is still sitting where it was before. I find that counter-intuitive. Not sure what else to map them to though...

rate_temp_up and rate_temp_down are the engine controls that nudge the deck. I thought about either mapping these buttons in shift mode to a stronger nudge (if that even exists) or map them to increase or decrease the key of a song.

I like it very much as-is. So I have no objections to merging it. Not sure what we should do with the Mixxx PR though.

I would suggest merging the changes into the reloop_mixage branch and creating a new pull request where we reference the old pull request when I'm done with the adjustments mentioned above. I opened 2 issues recently and the team is very quick to respond to new items. A new pull request might give us more momentum to get it merged.

Also we need to update the manual with the new functionality.

I started adding your old manual to the 2.4 branch of your mixxx/manual repo. I created a schematic of the controller aswell and added it to the repo so it is easier to explain what buttons do. Sadly .rst files are not my forte so maybe you can work on updating the manual to reflect the new mapping? I can help were needed.

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Nov 10, 2023

Ah so you were able to get 2.4 to compile with the missing dependecies installed.

Thanks for the detailed instructions!

The problem is that when you've only enable 1 or 2 of the effects in the rack all get disabled, but also all get enabled again. This might not be what you want. Don't you think a better solution (much more effort maybe) would be to store the effects on disabling and enable only the stored effects? When a user enables an effect through the UI in the meantime, pressing dry/wet will disable all again.

fair point the current implementation has its limits and drawbacks. We could store the states for each effect unit in an object when the button is pressed and any unit is active. This saved state can then be loaded again when the button is pressed when no unit is active. Still not sure how we combine this with the new effect presents though, by default an effect preset that is loaded has all units disabled. Should the toggle then enable all units in that preset? It wouldn't make sense to load a previous toggle state when a preset is loaded. I'm curious what you think, I'll look into changing the current behaviour.

If the default is that new presets have all effects disabled, keep that behaviour by clearing the saved state when preset are changed or an effect is toggled "by hand" / through the UI.

After that scratch is enabled. Should that be the case?

In the current implementation yes, as I thought it wouldn't matter much. But it might be better to implement a long/short press detection to avoid changing the scratch state. I'll start working on it.

I think it is better to not change scratch mode when the play button is pressed while the scratch button is pressed aka a soft start is executed.

For me the buttons are still nudging the deck. Anything like "rate_temp_up" might be bad, because then the speed slider is still sitting where it was before. I find that counter-intuitive. Not sure what else to map them to though...

rate_temp_up and rate_temp_down are the engine controls that nudge the deck. I thought about either mapping these buttons in shift mode to a stronger nudge (if that even exists) or map them to increase or decrease the key of a song.

I'm not sure what you mean by increase/decrease key. I don't know such a control in Mixxx. I would not do anything that changes the speed permanently, because of it breaking the speed controls.

I like it very much as-is. So I have no objections to merging it. Not sure what we should do with the Mixxx PR though.

I would suggest merging the changes into the reloop_mixage branch and creating a new pull request where we reference the old pull request when I'm done with the adjustments mentioned above. I opened 2 issues recently and the team is very quick to respond to new items. A new pull request might give us more momentum to get it merged.

Yeah, nobody is responding to my request. I'm a bit disappointed. They could have integrated the mapping months ago and we could have updated it. I answered to all their request, but nothing came of it. Frustrating.

Also we need to update the manual with the new functionality.

I started adding your old manual to the 2.4 branch of your mixxx/manual repo. I created a schematic of the controller aswell and added it to the repo so it is easier to explain what buttons do. Sadly .rst files are not my forte so maybe you can work on updating the manual to reflect the new mapping? I can help were needed.

Yeah RSTs do suck. I can not put it otherwise. I can update the manual when we've opened the new PR.

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Nov 10, 2023

I've updated the 2.4 branch in this fork. When you're done you can just merge this PR and copy the files to the 2.4 branch as you did with the manual already. Tell me when you're done. I'll update the manual, create new PRs on mixxx:2.4 and manual:2.4 and close the older two, mentioning the new ones.

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 10, 2023

I removed the automaximize feature and fixed a bug with the reloop LED in the process. loading a track without a loop present should now correctly stop the blinking of the reloop led.

I think it is better to not change scratch mode when the play button is pressed while the scratch button is pressed aka a soft start is executed.

Should be fixed with the latest commit, any presses that are held longer than 400ms do not change the scratch state.

If the default is that new presets have all effects disabled, keep that behavior by clearing the saved state when preset are changed or an effect is toggled "by hand" / through the UI.

Clearing the save state would mean there is no quick way to toggle all effects in a loaded preset on. I think having the option to do so would be really valuable. Setting the save state to match the effect preset that has just been loaded seems logical but might be difficult to track. I'll see what I can do as this also requires an engine connection that I can hook into to make it work. In any case implementing the save states will take some time compared to the other quick fixes. I'll let you know when it is done.

I'm not sure what you mean by increase/decrease key.

Increasing or decreasing the key of a song changes its pitch but does not affect playback speed. You can change the key of a song by pressing the up and down arrows next to the music note on a deck
image

@HorstBaerbel
Copy link
Owner

I removed the automaximize feature and fixed a bug with the reloop LED in the process. loading a track without a loop present should now correctly stop the blinking of the reloop led.

👍

I think it is better to not change scratch mode when the play button is pressed while the scratch button is pressed aka a soft start is executed.

Should be fixed with the latest commit, any presses that are held longer than 400ms do not change the scratch state.

👍

If the default is that new presets have all effects disabled, keep that behavior by clearing the saved state when preset are changed or an effect is toggled "by hand" / through the UI.

Clearing the save state would mean there is no quick way to toggle all effects in a loaded preset on. I think having the option to do so would be really valuable. Setting the save state to match the effect preset that has just been loaded seems logical but might be difficult to track. I'll see what I can do as this also requires an engine connection that I can hook into to make it work. In any case implementing the save states will take some time compared to the other quick fixes. I'll let you know when it is done.

  • New preset loaded, all effects off. You press the knob, all effects on, you press the knob again, all effects off <-- ok
  • You turn one effect off because you don't want it. You press the knob, all effects turn off, you press the knob again, all effects run on again <-- I'd be mad
  • You select a new preset, all effects off again (default) <-- ok

I'd suggest to implement it as a "toggle" operation:
No states are stored for other presets. Just one, current state that gets saved when "turning off" and restored when "turning on" and gets discarded when a new preset is loaded in or effects are toggled.
When the user toggles an effect on/off in the GUI clear the state and:

  • If there are still effects enabled and the knob is pressed, the state is saved and the effects turned off. Pressing again gets you back to the previous state
  • If there are no more effects enabled and the knob is pressed all effects are turned on, pressing again gets you back to the previous state

Does that make sense?

I'm not sure what you mean by increase/decrease key.

Increasing or decreasing the key of a song changes its pitch but does not affect playback speed. You can change the key of a song by pressing the up and down arrows next to the music note on a deck image

I seriously HAD NO IDEA THAT EXISTED 🤣 I just knew about keylock.
Yeah. Might totally make sense to map that to shift +/-!

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 10, 2023

I think we agree on how the toggle should work, let me expand your examples. with when I am think about saving the current unit state. but first lets set the rules

  1. pressing the knob when any effect is enabled in the unit will trigger a state save, and turn all effects of.
  2. pressing the knob when no effect is enabled restores the previous save state.
  3. any time a new effect preset set is loaded the save state is set to that preset.
  4. any time a single effect slot is enabled or disabled the save state is set accordingly (this last rule might not even be necessary)

In practice

  • New preset loaded, by default all effects are off. -> save state is set to the preset.
  • You press the knob, all effects in the preset turn on. -> no save
  • You disable one effect you don't like. -> no save
  • You press the knob, all effects turn off -> save state is set, to the preset with one effect disabled
  • you press the knob again, the previous save state with the one effect disabled is restored -> no save
  • you load a new preset -> start again from the top.

Yeah. Might totally make sense to map that to shift +/-!

will do

@HorstBaerbel
Copy link
Owner

I think we agree on how the toggle should work, let me expand your examples. with when I am think about saving the current unit state. but first lets set the rules

1. pressing the knob when any effect is enabled in the unit will trigger a state save, and turn all effects of.

2. pressing the knob when no effect is enabled restores the previous save state.

3. any time a new effect preset set is loaded the save state is set to that preset.

4. any time a single effect slot is enabled or disabled the save state is set accordingly (this last rule might not even be necessary)

In practice

* New preset loaded, by default all effects are off. -> save state is set to the preset.

* You press the knob, all effects in the preset turn on. -> no save

* You disable one effect you don't like. -> no save

* You press the knob, all effects turn off -> save state is set, to the preset with one effect disabled

* you press the knob again, the previous save state with the one effect disabled is restored -> no save

* you load a new preset -> start again from the top.

I think that way it will work, be useful and mostly intuitive 👍

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 11, 2023

I changed the effect toggle control and changed the beats_translate_earlier to pitch_down and beats_translate_later to pitch_up. The previous state of the effect rack is now toggled instead of turning all effects on or off.

After implementing the new effect toggle I discovered I had misremembered the behavior of effect when a new preset is loaded. Instead of all effects in the rack being disabled the meta knobs are set to a saved position. That means that effect slots are not turned on or off when a new preset is loaded. I did already made an implementation to change the save state when a new preset is loaded, so I added them both and let you be the judge of what makes the most sense.

The first implementation

  • On startup before any effects have been toggled, the effect toggle will turn all slots in a unit on
  • when any effect is active and the effect toggle will save the state of the effects and turn them all off
  • when no effect is active the previous state is loaded and applied to the effectunit

The second implementation is the same as the first but has these added effects

  • when a new effect preset is loaded all units in the rack are disabled and save state is set accordingly
  • when the effect toggle is pressed after a preset is loaded all effects in that preset are turned on

You can test both easily with the code I have committed. Currently the loading of new presets does not affect save state or disable any effects, however when you uncomment the code on line 192 you can test the second implementation.

Mixage.fxPresetConnection.push(engine.makeConnection("[EffectRack1_EffectUnit"+deck+"]", "loaded_chain_preset", function(_v, g) { Mixage.getLoadedPresetEffects(g); }));

I'm curious to what you think

@HorstBaerbel
Copy link
Owner

HorstBaerbel commented Nov 12, 2023

I changed the effect toggle control and changed the beats_translate_earlier to pitch_down and beats_translate_later to pitch_up. The previous state of the effect rack is now toggled instead of turning all effects on or off.

Great!

After implementing the new effect toggle I discovered I had misremembered the behavior of effect when a new preset is loaded. Instead of all effects in the rack being disabled the meta knobs are set to a saved position. That means that effect slots are not turned on or off when a new preset is loaded. I did already made an implementation to change the save state when a new preset is loaded, so I added them both and let you be the judge of what makes the most sense.

Ok. If the default behaviour is to keep the enabled effects when switching preset, I'd keep that (so version 1). We should not tinker with Mixxx defaults too much.

For me the effect knob behaviour is unclear btw. I think they get reset to their default value (e.g. balance to center).

EDIT: Small bug. When pressing the The FX SEL button and an effect is selected I can't toggle the effect enable buttons anymore. I have to deselect all effects (press FX SEL multiple times) to be able to toggle again. I'd expect pressing DRY/WET will toggle the selected effect?

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 12, 2023

Ok. If the default behaviour is to keep the enabled effects when switching preset, I'd keep that (so version 1). We should not tinker with Mixxx defaults too much.

yeah lets stick to the defaults I removed the second implementation.

For me the effect knob behaviour is unclear btw. I think they get reset to their default value (e.g. balance to center).

The effect meta position get adjusted to the position that is saved in the preset. The built in presents all have their position saved in the zero or neutral position. You can test this yourself by making a new preset or edit an exisiting one.

EDIT: Small bug. When pressing the The FX SEL button and an effect is selected I can't toggle the effect enable buttons anymore. I have to deselect all effects (press FX SEL multiple times) to be able to toggle again. I'd expect pressing DRY/WET will toggle the selected effect?

good catch I replaced the wrong variable when implementing the toggle. It should be fixed again.

I think the code is ready for a new pull request, a forum post might also be a good idea to get some more people testing the mapping

@HorstBaerbel HorstBaerbel merged commit 70724a4 into reloop_mixage Nov 12, 2023
@HorstBaerbel
Copy link
Owner

PRs are here and here. Please give the manual a check

@gqzomer
Copy link
Collaborator Author

gqzomer commented Nov 13, 2023

I added the complete button layout from the figure I created to the manual, I also corrected some minor errors in the process. The context depend controls of the effect unit might need some additional explanation. I might add that in later

HorstBaerbel pushed a commit that referenced this pull request May 7, 2024
Reformatted code to modern ES6 class structure
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.

2 participants