Advanced mapping for M-Audio Xponent

XML preset files and script files (.js) for MIDI and other controllers.

Moderators: garth, User Customization Moderators

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Thu Feb 16, 2017 3:01 am

I'm having some difficulty getting the effects knobs to soft-takeover in 2.1, and maybe there's a way to code around it, but I'm not sure. In 2.0, setParameter calls could not soft-takeover at all, so I'm already a bit ahead. In my new mapping, there is a pseudo-focus mechanism in place. There are four knobs on each deck that I can wire up to the effect parameters. I'm reserving the fourth knob to always be the wet/dry mix, and the first three to be the parameters.

I had been registering the controls for soft-takeover like this:
Code: Select all
    for(i = 1; i <= 4; i++) {
        // engine.softTakeover("[EffectRack1_EffectUnit" + i + "_Effect1]", "parameter1", true);
        // engine.softTakeover("[EffectRack1_EffectUnit" + i + "_Effect1]", "parameter2", true);
        // engine.softTakeover("[EffectRack1_EffectUnit" + i + "_Effect1]", "parameter3", true);
        engine.softTakeover("[EffectRack1_EffectUnit1_Effect" + i + "]", "parameter1", true);
        engine.softTakeover("[EffectRack1_EffectUnit1_Effect" + i + "]", "parameter2", true);
        engine.softTakeover("[EffectRack1_EffectUnit1_Effect" + i + "]", "parameter3", true);
       
        engine.softTakeover("[EffectRack1_EffectUnit" + i + "]", "mix", true);
    }     


Note: The commented out part is me trying to figure out whether I'm putting the "i" in the right place. EffectRack1 is the only one in existence right now, but the wiki isn't making the difference between EffectUnitX and EffectX totally clear, so I tried both. In either case, what I'm seeing is this. If I move the knobs left, then use the UI to move them right, I get a soft takeover like I want. When I shift my focus to control the second effect, the soft-takeover is lost. As soon as I move a knob, the control jumps to its current position. Now I'm on the second effect, and I can do the same thing. Once the knobs and the UI are in sync, I can move the UI knobs using the mouse, and the physical knobs will do a soft-takeover as expected. As soon as I shift the focus to another effect, the soft-takeover is lost again.

I'm imagining that within Mixxx, it's handling the soft-takeover by remembering the last known position of the physical controls, so while I'm kind of subverting that with my own pseudo-focus system, maybe I need to save and restore the parameters whenever the focus shifts from one effect to the next. Before I tackle that, I'd like to make sure I'm saving the right things though. What ARE the EffectUnit and Effect numbers for the basic four on-screen effects? Is it 1/1, 1/2, 1/3, and 1/4 or is it 1/1, 2/1, 3/1, and 4/1. And why do I get the same behavior no matter which one I make the calls to?

Now here's where things get really weird. I completely commented out my code, and it still does a soft-takeover. I guess 2.1 is enabling that by default for effects parameters, and maybe all of the code I wrote is just not right, or it's being ignored. I don't know. If anyone with inside knowledge sees this, is my proposed save/restore even possible? 2.1 has its own effects focus system now, maybe I'll give that a try in place of my homegrown 2.0 focus system and see if that makes a difference.

Actually, now I'm thinking that something's just come unglued with the 2.1 build I'm running. Things that WERE working aren't now. I'm toggling the "enabled" value for an effect, and the UI doesn't change, although the value returned from the engine is changing. Maybe I'll just leave this part and come back to it later. I'm not confident that what I'm seeing makes sense. I know this part works on 2.0, because that's where I wrote and tested it.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby Be. » Thu Feb 16, 2017 3:25 pm

If you're using a 2.1 build, use the Deere skin. So far the other skins have not been updated for the new effects UI and will confuse you if you try to use them.

EffectUnits are chains and Effects are the individual effects with the chain.

You can find the ControlObjects used by any widget in skins in Developer Mode.

Loading effects is currently in a broken state in the sense that you need to move the metaknob after loading the effect before the metaknob will do anything.

If you want to quickly try the new effects UI, you can map to EffectUnitX_Effect[1-3], meta. I wouldn't recommend duplicating all the effort of handling switching between modes and soft takeover. The EffectUnit in the Components library can do that for you.
I heard FLAC and I haven't gone back.
Protect your hearing with earplugs!

Hear my mixes
User avatar
Be.
Mixxx Developer
 
Posts: 2495
Joined: Tue Jan 06, 2015 1:00 am
Location: Chicago, USA

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Thu Feb 16, 2017 5:24 pm

That's great for 2.1, but I still use 2.0 for my actual gigs, and as far as I know, "Components" is a 2.1-only thing. I'm trying to submit something that can be used for any future 2.0 releases, if such a thing happens, as well as being forward-compatible with 2.1. I may just need to create a 2.1 branch and go all-in on components. Didn't you mention some possible compatibility problems with the Xponent though? It has a goofy way of sending the jog wheel information (a value indicating the speed it's moving rather than its position), and maps the buttons as two separate midi controls (press and release) rather than two different values from the same control.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby Be. » Thu Feb 16, 2017 5:51 pm

There will not be a 2.0.1 release.

You could work with 2.1 separately from your performance install of 2.0 by installing 2.1 to a different location and running it with the --settingsPath command line option to specify a different directory for your 2.1 settings and database.

There was an issue with the Button Component, but I refactored it so you can use it with the Xponent by providing your own components.Button.prototype.isPress function.
I heard FLAC and I haven't gone back.
Protect your hearing with earplugs!

Hear my mixes
User avatar
Be.
Mixxx Developer
 
Posts: 2495
Joined: Tue Jan 06, 2015 1:00 am
Location: Chicago, USA

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Thu Feb 16, 2017 6:06 pm

I'm working with 2.1 on a separate computer from my DJ rig, so that's not a problem. I'm trying to set up a build environment so that I can be more up to date. There doesn't seem to be any Windows "nightly" available right now, so I'm sure I'm out of date.

The Xponent's buttons are strange. They send 0x90 on press, and 0x80 on release... for Channel 1. On Channel 2, it's 0x91 and 0x81. Toggling the "bank" switch on the front of the controller changes those numbers to 0x95/0x85 and 0x96/0x86 for the left and right decks respectively. I'm trying to take advantage of this to make a 4-deck mapping. I'll see what I can work out.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Sat Feb 18, 2017 11:26 pm

I will eventually port all of this to Components, I hope, but I need to get this mapping working on 2.0 first so that I can use it at my gigs. I'm trying to turn this into a 4-deck mapping, which pretty much requires me to turn almost everything into a script-mapping. I'm not having any luck at all getting soft-takeover to work when I switch banks though, and it's not limited to just bank switching either.

I think the underlying soft-takeover logic is my problem here. I have noticed that if I use a knob to set an arbitrary value, and then switch that knob to controlling something else, by bank switching or through my effects "focus" mechanism, I get two different behaviors. If I assign the knob to something else, move it to the right, and use the UI to move the original control to the left, when I switch the knob back to controlling that parameter, I get a soft takeover. If I assign the knob to something else, move it to the right, and use the UI to ALSO move the original control to the right, when I switch the knob back to controlling that parameter, I get an instantaneous takeover.

It all seems to do with whether or not the knob is currently on the same "side" as that control's last move.

I don't know if there's a way around this, honestly. I understand the soft-takeover logic, and I can see why it would work that way. You can't count on getting a signal equal to the current value, so you can't count on watching the parameter pass "through" it, but maybe there's a way to do so with some degree of "tolerance"?

This really limits my ability to complete this 4-deck mapping. I can't count on what any controls have been up to while they were assigned to other controls, or which "side" of the current value they're on. I see this posing a real problem when it comes to the channel rate and volume sliders. While I was controlling decks 3 & 4, I may very well have made an adjustment that puts the physical control on the wrong "side" to do a soft-takeover when I switch back to decks 1 & 2. Channel volume, pregain, and rate are all things that will have a drastic, show-stopping effect if they don't do a soft-takeover. As long as you stick to a 2-deck performance, you should be fine, but you'd need to be very careful not to let any of those vary while in 4-deck mode. What if deck 4 is playing something you're killing the high and mid on, and only letting the low-end through? When you switch back to 1&2, you'd better not touch the low filter knob.

Has anyone gotten around these problems with other 4-deck mappings? What's the strategy?
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Sat Feb 25, 2017 2:42 am

The mapping is almost complete. I've updated the attachments to the first post. There are some bits I'd like to finish with the status of lights when bank switching, but this is a working, complete 4-deck mapping for the Xponent with a lot of new advanced features. I should be submitting a pull request very soon.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Sat Feb 25, 2017 10:51 pm

Things I've learned today:
The Xponent has an unusual and hard to predict set of midi codes that don't always make sense. The "analog" lights (VU Meters, progress meters), seem to be addressed via status 0xB3 (Control, channel 3), but when you throw the bank switch over to "B", they suddenly live on channel 9 instead. Also, channels 3 & 9 seem to allow you to address each LED and fade them up and down individually. I thought I was done with this mapping, and now I just found out that I can dim the buttons. I'm sure I'll think of a use for it.

This means that I can now make some effects more subtle if needed. Maybe I'll make the flashing Sync buttons less bright or something. In some ideal future where the beat detection includes phase I'll use this to blink the sync buttons brighter on the 1s than the other beats. Not now though.

Well... there goes the rest of the evening.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Sun Feb 26, 2017 4:58 pm

I stopped myself from going down the dimmable button rabbit hole, and have submitted a PR for this mapping. I just can't come up with anything else to do with it now. Maybe later. The files on this post have been updated accordingly.
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

Re: Advanced mapping for M-Audio Xponent

Postby MelGrubb » Fri Mar 17, 2017 12:09 am

There's possibly something wrong with me. Maybe I've gotten too emotionally attached to this controller after working on it this long, but I just bought another one. I now have a spare. Has anyone else done this?
MelGrubb
 
Posts: 141
Joined: Tue Apr 27, 2010 12:00 pm

PreviousNext

Return to Controller presets/mappings

Who is online

Users browsing this forum: No registered users and 1 guest