Endless MIDI Dial - help desperately needed
Has anyone ever succesfully gotten an external midi controller to work a dial endlessly in Max?
What am I missing? Mouse operation works perfectly. I'm at my wit's end ...
By ‘endless’ do you mean you have some kind of 360° dial in the physical world that you can turn continuously in one direction, and a dial
in Max with @clip 0
(‘Clip Dial Values’ turned off in the inspector)?
Your MIDI controller is almost certainly cycling 0–127, and then at the point it considers the “bottom” it jumps back to 0 (or 127 if turning counterclockwise). This is the same behaviour you’ll see in Max if you monitor the dial’s output.
What values would you like to have? Should the endless dial simply allow an infinite increase/decrease in values rather than mapping to a fixed range?
Hi Chris
I am using a Behringer BCR2000 which works perfectly as an endless jog wheel in Traktor. At extents of the dial (0 & 127) output is continually decreased or increased (direction of inc/dec kept). This is the behaviour I want in Max as u suggest "... allow an infinite increase/decrease in values rather than mapping to a fixed range".
If I’ve understood your problem correctly, you need to keep track of how your dial is changing, and filter out the jumps across the break (0/127).
Try the patch below. You’ll probably want to add some mechanism to reset the difference calculator, both so you’re not stuck at -23450 and in case your Max dial and the continuous output gets out of sync.
Thanks for your patch - your help is appreciated. However, although it works well with the mouse, I still cannot achieve the same result via midi using the BCR2000. In other words, I want to have the midi controller replicate the behaviour of the mouse in your patch. As it currently is, when I turn the BCR dial to the right when I reach 127 on the BCR2000 the dial/value in Max stops. I want to be able to continue turning to the right so that the dial/value continues upwards. Obviously the same would apply when turning the BCR dial to the left (ie 0 and downwards).
Hi MIMI2000,
This patch , I think, does what you want (not super elegant, but its a start!), so... there! Hope it helps!
The only problem with it, is that if it is at 0 or 127, and you just click on the dial without changing the value, it will decrease or increase the output value... but controlling it with a knob should not be a problem.
Nick.
Nick’s patch looks like it might help — I misunderstood, sorry, and thought your MIDI controller could turn 360°.
The only question would be whether the BCR2000 continues to output 127 repeatedly once turned to the right (or 0 to the left), or just outputs it once and then is silent. If the latter, you might need to turn on a metro
or something at the extents of the range to keep incrementing/decrementing.
Thanks Nick and Chris,
It works! Thanks so much - I 've spent too long trying to figure that out - my apologies also for the late reply.
However, I have designed custom knobs with jknobman in pictctrl that don't rollover graphically although I would like them to. Do you know if there is a way to do this?
Glad you figured it out! Have you tried the ‘Clip Dial Value’ attribute of pictctrl? Turning it off lets pictctrl flip round. Not sure if that’s exactly what you want.
Hi Chris
I was going to edit my post with something else but you beat me to it. I notice the dial in Nick's patch works with both mouse & midi control. However with my pictctrl knob - midi works & mouse only works 0-360 with clip dial value. If I disable clip value the dial does indeed rollover but the output jumps to zero and increments from there instead of outputting continuous 127s (like the working midi control).
I want my knob to behave like the dial in Nick's patch but want a graphical rollover for my custom knob. Hope that makes sense.
Once again, your help is really appreciated.
Hmmm, I’m not sure I’m entirely clear about your desired behaviour. Do you have a patch you could share?
Or perhaps the exact mechanics might be clearer if you let us know what exactly the dial is controlling. For example, one issue I could see with Nick’s patch is that if you scroll past 127, to say 156, as soon as you move the dial down to 126, your output value jumps from 156 to 126. But it all depends on what you’re doing with the dial output. Similarly that might clarify what you want to see on the dial. If I understand correctly, you hold your BCR2000 dial at 127, and the value continues incrementing, but you want your Max dial to rollover to display 0. That seems counter-intuitive but some more context might help!
Sorry if I didn't explained clearly how I want the dial to work.
It's to control an oscillator (0-10000 Hz).
I want to be able to scroll the dial on the BCR2000 to control this so that when I turn it to the right the oscillator value increases, and when I turn it to the left the value decreases.
The patch allows me to to this with the BCR2000, so it is working.
I want the functionality of the dial in the patch but using my knob & have it graphically rotate and not remain static after reaching 127 and thereafter increasing.
However, with the mouse my custom knob doesn't behave like the dial in the patch & either stops at 127 or jumps back to zero instead of increasing beyond 127.
Do you need to be able to turn the dial
in the patch with your mouse/trackpad? Or is it just there for visual feedback from the physical knob?
If the latter, I would query whether a dial is the best representation here. A number to represent the frequency would make sense, as would mapping the full range of your oscillator to the dial
so its 0–127 extent matches 0–10000. Otherwise, all you have is a spinning dial
that tells you it’s changing, but whose position is meaningless.
If you need to be able to use either the BCR2000 knob, or the dial
in the patch, and you want the patch dial
to spin endlessly, but the physical dial cannot, that might be trickier. You’d probably need to process the output of the Max dial
using a mechanism similar to that in my patch above (which figures out if a jump across the 0/127 break is an increment or a decrement) and process the MIDI input from the BCR2000 with your existing patch (which increments at 127/decrements at 0). I think you should just be able to feed the processed MIDI data into the pictctrl
with the ‘Clip Dial Value’ attribute off and it will output 0–127 as usual.
Hope this helps!
Here’s another example of a kind of jog wheel implementation.
"Do you need to be able to turn the dial in the patch with your mouse/trackpad? Or is it just there for visual feedback from the physical knob?"
Yes - both. I need the mouse & midi controller to turn the dial & have the dial spin like in the real world. (btw BCR2000 does rotate 360° endlessly)
"A number to represent the frequency would make sense, as would mapping the full range of your oscillator to the dial so its 0–127 extent matches 0–10000. Otherwise, all you have is a spinning dial that tells you it’s changing, but whose position is meaningless".
& from your earlier post
"Or perhaps the exact mechanics might be clearer if you let us know what exactly the dial is controlling. For example, one issue I could see with Nick’s patch is that if you scroll past 127, to say 156, as soon as you move the dial down to 126, your output value jumps from 156 to 126"
This is precisely what I am trying to achieve. I don't want the 0-10000 mapped to the extent of the dial, I just need it to rotate endlessly. (I have a number box which gives the output)