Extracting the parameters assigned CC Value in code


#1

I have searched the posts and cannot find any reference.
Within the objects code with assigned parameters etc, what I am looking for is a way to access the parameters assigned CC value in the object with the parameter in it, is it even possible ?
I know we can get the parameters value for example "param_name", but is there something like "CC_param_name" that will give the assigned CC value ?

Thanx.
:thinking:


#2

can you give some more details? what object are you talking about specifically? usually the cc assignment is done by the user or the creator of the objects, but can be changed with a right click on the dial for example (midi cc menu)


#3

So when I assign a midi cc to a parameter like as follows..

When I am working on the code in the object, is there a way to refer to the CC value I have assigned, for example with the above toggle, maybe when the toggle is high, it will send the CC value out of an output. I can easily do a wrokaround by adding an attribute spinner or something similar and set it up so you select the CC value with that, but if I am already assigning a CC value, is there somewhere I can access it in the code without a workaround like I describe.
Just trying to simplify, cleanup and be more efficient with my coding without having more than needed.


#4

No, its not possible.

the CC mapping is used to generate code (done in Java), so the board has no knowledge of this mapping.
note: parameter mapping is changing in the next version, I'm not sure if this may or may not alter for that release... I'll take a look when I start looking at it in September.

What are you trying to achieve? perhaps there is a different way to achieve the result you are after?

generally, I don't use CC mapping, I prefer to do the mapping within the patch, so either
a) map midi/in/cc to inlets
b) map midi/in/cc to modsource, then use modsource to parameter

(a) is my preferred route, but sometimes there are not inlets where I need them, and if I'm too lazy to create an object variant, I use (b)

if I want to get really flexible I'll use midi/in/cc any ... and which allows changing of the CC mapping to parameter mapping dynamically. quite handy if you want to use 'modes' , say 4 CC which depending on mode change different parameters.

one of the reasons, I prefer this route (over midi CC assign) is that it makes adding support for gpio/in/analog (e.g. for my axocontrol) to my patches trivial


#5

I guess to make a long story short, I have created the following object..

Its the "cc" spinner as a work around that I added where I select the CC value that I assigned to the "trig" toggle, I was just wanting to get rid of the spinner if I could access the CC value assigned to the toggle. No worries, this will have to do for now.
Thanks..
:grin:


#6

Oh, I should have explained, the object sends midi data out through thje UART serial port and I need to send the CC data byte.


#7

no but you can 'reverse the problem'... which is what i was suggesting... (and I do in practice)
dont use assign at all, only use the CC spinner, then you can update the trig toggle based on the midi/in/cc any
that way you dont potentially 'misconfigure' and have the midi assign different to the spinner.
(assuming you need the trig toggle in case your using the axo UI)

well thats what I would do anyway... but as you say its a pretty small thing really.


#8

Thanks TB, I'll look into it, I guess there are quite a few objects extracting CC any from midi signals, just a mater of finding the right code for it.
:grin: