Forums > MaxMSP

intercepting midi controller messages

March 25, 2008 | 4:10 am

Hi all

I was wondering how I could intercept midi messages from my controller. The reason is that I want to control [Sig~] (for pitch shifting in [groove~]) going in the negative and positive. w. my midi controller.

Now,as you all know, I have 0-127 to work with, so I put a [- 63.5] dividing 127 in 2 so I could wonder in the negatives starting at 63.5. (so far, so good)

Now, for slower pitch change in [sig~] I need to be affecting the digits pass the decimal point. Easy, I put a [*0.01] and now my incoming midi messages slowly pitch shift.

BUT THE PROBLEM IS, that I only get tiny range of -0.635 to 0.635 to play with. (of course having only 128 actions)
But what I want is to be going from something like (-200.)to(200.)or more. (Of course I could be using [scale] or [zmap] but then I would get leaps in my pitch shifting which I absolutly want to avoid).

So I figured that I need more actions from my midi "pot". In other words, more knob turns for one unit change. Or again, converting midi messages into the decimals before they get to midiin??

I am completly cluesless as how to solve this problem.

Any help on this would be greatly appreciated.

Thanks in advance

phil


March 25, 2008 | 5:10 am

So you want to go from -200 to 200 smoothly? Isn’t that what line~ is for?

Another option is to use 2 knobs, one for coarse control and one for fine control. For example, make coarse go from -100 to 100 and fine go from -2 to 2 . Then add those values together before sending it to the sig~. But you’d still get jumps when turning the coarse control unless you use line~


March 25, 2008 | 5:25 am

Hi Adam and thanks for the hint.

But no,

What I want is to have an infinite range in the minus and an infinite range in the positive having a unit of 0.01 to do so.(I just gave -200 to 200 as an example). This ridiculessly simple using a [float] and a [*0.01] and controlling it by hand.

But in this situation, it is my endless rotating midi knob that is controlling. So I am stuck in the 0-127 range.

SO Maybe I should repost and ask; Is there a way to have and endless rotating midi knob control an float endlessly ??

What do you suggest?

Thanks again

phil


March 25, 2008 | 6:08 am

On Mar 24, 2008, at 10:25 PM, phil wrote:
> SO Maybe I should repost and ask; Is there a way to have and endless
> rotating midi knob control an float endlessly ??

It can almost certainly be done. What MIDI controller do you have?
What exactly does your midi controller put out?

-C

Chris Muir
cbm@well.com

http://www.xfade.com


March 25, 2008 | 6:17 am

Re-reading myself

I realized that everybody using a midi controller in max can benefit from this quesiton.

It adresses more precisely the issue complete flexibly with a midi knob that is stuck in the range of 0-127.

That’s why we have objects like zmap and scale.(< - greater flexibility). But not cutting it in my situation. I feel solving this one is solving many others.

What do you think?

Cheers

phil


March 25, 2008 | 6:24 am

Hi Chris

I have a Alesis PhotonX 25

The messages in the little screen indicate;
>CC# N (for controller #) Comn N (Value).

But it does not continue past (0-127) if that what you were asking?

thanks

phil


March 25, 2008 | 7:02 am

Quote: Chris Muir wrote on Mon, 24 March 2008 23:08
—————————————————-
> > Is there a way to have and endless
> > rotating midi knob control an float endlessly ??
>
>
> It can almost certainly be done. What MIDI controller do you have?

Now I’m really interested. If you buy the right kind of "endless rotary" controller can it output difference-from-previous-value messages instead of the standard 0-127? That would be really useful… any recommendations? How about the Behringer BCR2000?

Phil, I am thinking if the controller doesn’t support it you are out of luck.


March 25, 2008 | 7:07 am

Quote: Adam Murray wrote on Tue, 25 March 2008 00:02
> Phil, I am thinking if the controller doesn’t support it you are out of luck.
>
And I’m not saying yours doesn’t support it. I don’t know…
If it rotates endlessly maybe there is a setting you can turn on to switch the output format? Did you check your manual?


March 25, 2008 | 7:38 am

On Mar 24, 2008, at 11:24 PM, phil wrote:
> I have a Alesis PhotonX 25
>
> The messages in the little screen indicate;
>> CC# N (for controller #) Comn N (Value).
>
> But it does not continue past (0-127) if that what you were asking?

So what does 360 degree mean in this case? What most rotary encoders
give out is deltas as it moves in a specific direction. For example
the Mackie control sends positive deltas as you turn clockwise, and
negative deltas as you turn anti-clockwise.

If the Alesis 360 knobs simply sends in the range 0-127 you may be out
of luck.

Chris Muir
cbm@well.com

http://www.xfade.com


March 25, 2008 | 4:13 pm

Hi

>So what does 360 degree mean in this case?

They came up w. this to be more user friendly when assigning a knob in an application. Before (when not not endless rota.) ou had to make sure that your know was at 0 (or at minimum if you will) before assigning, or learning. This what to benefit from the full physical range of your knob.
The 360 degree jusst made things easier.

So if mine is (0 -127)maybe I am out of luck. But I was thinking that maybe I could have a work around by having a reset on the incoming message in midi in.

Say every time you you hit the maximum 127 (+1 < - to indicate that you want to continue going up), it would trigger a reset in the incoming [midiin] and give me an extra 127 and so on.

Is there a way to do this?

thanks

phil


March 25, 2008 | 4:21 pm

Quote: philippehughes@hotmail.com wrote on Tue, 25 March 2008 09:13
—————————————————-
> But I was thinking that maybe I could have a work around by having a reset on the incoming message in midi in.
>
> Say every time you you hit the maximum 127 (+1 < - to indicate that you want to continue going up), it would trigger a reset in the incoming [midiin] and give me an extra 127 and so on.
>
> Is there a way to do this?
>

That’s a good idea and I bet it would work. Since the knobs are endless rotation, you should be able to send a CC message from Max to your controller to reset it to 0 (or 127 if you’re going down). Just send the appropriate message to a [ctlout] object.


March 25, 2008 | 4:46 pm

Thanks adam

Out of curiosity, what does CC stand for ??
I will try it and get back to you.

phil


March 25, 2008 | 4:53 pm

Quote: philippehughes@hotmail.com wrote on Tue, 25 March 2008 09:46
—————————————————-
> Out of curiosity, what does CC stand for ??
—————————————————-

CC = continuous controller. Basically any MIDI input that’s not a keyboard key.

It’s misnamed if you ask me, since MIDI knobs and sliders only offer 128 discrete steps.


March 25, 2008 | 5:32 pm

well does your controller output once you reach the max or min ie if you get
to 127 and turn to "128" do you get 127 again or no output?

if you do get output (ie 127 again) what you want is prolly a combination of
[bucket] [< =] [>=] and [accum]

I’d make you a patch to illustrate but i’m at work

good luck

On Tue, Mar 25, 2008 at 11:53 AM, Adam Murray wrote:

>
> Quote: philippehughes@hotmail.com wrote on Tue, 25 March 2008 09:46
> —————————————————-
> > Out of curiosity, what does CC stand for ??
> —————————————————-
>
> CC = continuous controller. Basically any MIDI input that’s not a keyboard
> key.
>
> It’s misnamed if you ask me, since MIDI knobs and sliders only offer 128
> discrete steps.
>
> –
> Adam Murray
> compusition.com
>


March 25, 2008 | 5:33 pm

Thank for the info. I would of thought controller channel ;)

Now I’ve trying w. ctlout but w. no luck, well actually I ‘m not sure since there is no sound that will come out of my controller!

Should I see the changes in my little LCD screen?

I have an E-mu cable for midi in and out to usb. Do I choose , this E-mu when double clicking on ctlout? or do i choose from maxmsp 1.

Last simple question,< - since I never use this E-mu. Does the midiout of the E-mu go into the midiin of the controller?. In other words, does out go w. out and in w. in or is it the other way around.

The reason I ask is because when i put, in to out , not in to in, I get flickering lights on the E-mu as I turn my controller knob, indicating that messages are being sent to my computer. No? I don’t get flickering when midiin is in midiin.
But in both cases, Max is not reacting to the sent messages.

???

phil


March 26, 2008 | 12:09 am

Hi johny 5

> well does your controller output once you reach the max or min ie if you get
to 127 and turn to "128" do you get 127 again or no output?

-My controller outputs 0 as min and 127 as max. It never displays 128.

-would you know if it would typical for a controller w. an LCD screen, to demonstrate the changing "pot" value (as it does when I turn it by hand) when controlled by [ctlout]. Mine doesn’t at the moment.

-Finally, If possible, I am curious and would very much like to see your patch involving bucket etc.

Thanks a lot

phil


March 26, 2008 | 12:33 am

Quote: philippehughes@hotmail.com wrote on Tue, 25 March 2008 17:09
—————————————————-
> -would you know if it would typical for a controller w. an LCD screen, to demonstrate the changing "pot" value (as it does when I turn it by hand) when controlled by [ctlout]. Mine doesn’t at the moment.
>

Yes, I would think so.

I don’t have a controller with endless rotation knobs, but I tried it with my midi controller and messages from Max don’t seem to update the controller. I think my MIDI in port is just pass through on this device. Definitely some devices will be affected by incoming MIDI, but it depends on the device. I have a PodXT I can control from Max, and I see the LCD screen update.

BTW an easy way to play with this is the MIDItester under the Extras menu.

Really, I can’t see the point of a device having endless rotation if it can only send 0-127. There must be some way…


March 26, 2008 | 2:44 am

Quote: Adam Murray wrote on Wed, 26 March 2008 12:33
—————————————————-
> Really, I can’t see the point of a device having endless rotation
> if it can only send 0-127. There must be some way…

It’s actually pretty common (and cheap/frustrating). The idea is that when you switch "scenes" in the controller, the last 0-127 value previously sent from that scene is where the rotary will now start sending from, so you don’t really want the knob to appear to be in some other position. But you still only get 0-127, not true relative messages.

If the controller supports true relative messages, they’ll show up as an option in its message-assignment, you’ll typically see something like "abs" for 0-127 and "rel" for true relative. Then it’s up to the device or software being controlled to interpret those increment/decrement messages, you don’t get continuous values.

It’s also normal for cheaper controllers not to display incoming MIDI values on their LCD displays – the displays respond directly to the hardware controls only.


March 26, 2008 | 5:40 am

Hi Adam

I’ve been at it all night. My photon x 25 controller does not seem to respond at all to the Max messages that i’ve been sending. SO what’s the point of having a MIDI IN on my controller.

I,ve downloaded the manual and it says;

<

Note: If you have another device connected to the photon ‘s MIDI IN port, that device’s MIDI information will be ingnored.>>

SO does Max pass as another device connected to the photon’s MIDI IN port???

Quote;
>BTW an easy way to play with this is the MIDItester under the Extras menu.

-Exactly, so even if the LCD screen does not display does update the incoming max messages, I would see it in Miditester no?

>Definitely some devices will be affected by incoming MIDI,
-Yes definetively, I was able to control a Nord lead keybord from max in the past.

As you said earlier, there must be a way.

Thanks again

phil


March 26, 2008 | 6:29 am

Quote: philippehughes@hotmail.com wrote on Tue, 25 March 2008 22:40
—————————————————-
> My photon x 25 controller does not seem to respond at all to the Max messages that i’ve been sending. SO what’s the point of having a MIDI IN on my controller.

It’s probably just a "pass through", so you can chain multiple devices together and run them through a single MIDI interface.

> Note: If you have another device connected to the photon ‘s MIDI IN port, that device’s MIDI information will be ingnored.>>
>
> SO does Max pass as another device connected to the photon’s MIDI IN port???

Yes, but a MIDI IN port and a direct USB connection to the device may behave differently, if you have a choice.

> so even if the LCD screen does not display does update the incoming max messages, I would see it in Miditester no?

Probably not. When I use the output section to send messages, I get no feedback from inside Max. So on hardware synths I can hear notes play and if the device’s LCD shows incoming CC changes, I can see that. But if the device gives me no feedback then I can’t tell what’s going on.

Sorry man, I know it’s really frustrating :(


March 26, 2008 | 6:44 am

Thanks a million on this one Adam.

You’ve been there throughout! I really appreciate the efforts.

I will try with USB only as you suggest it might react differently.

If not, just for the heck of it , I will have to try it on my friend’s Nord lead.

Because, I am sure that eventually controlling other things (sensors) via midi and this topic adresses a good way for flexibility w. value ranges.

Thanks again

phil


Viewing 21 posts - 1 through 21 (of 21 total)