Newbe needing help patching a 3 position switch/option

midi

#1

Hello folks

I'm struggling to patch a 3 position switch via midi cc from my minilouge.
I've been feeding 3 osc waveforms into a mux and want to use the 3pos wave switch to toggle between the 3 but can so far only manage 2.. i'm picking up the 3 positions on a ctrl/dial _
and can get a 2 positions with a toggle, I have tried a few things, not sure if i need some maths or I'm misunderstanding the mux?
Could someone please give me an example of how I can do this?
Thanks,
A


#2

Sounds like you need some maths objects. The mux will respond to 0, 1 and 2 for the three options. You need to find out what values the switch is sending and adjust them to fit.

So, I guess the switch sends a cc? Use a midi in cc object and connect it to a disp dial object and see what values it's spitting out and go from there.


#3

You could also try using the radio switch buttons. If you assign them to midi cc(right click on the radio button and select cc number), they will be automatically scaled to the amount of selections of the radio. If the radios buttons has 4 it will be autoscaled to 4 and so on.


#4

Hi, thanks for your response, it is CC and i'm going from 64.00 to 32.00 to 0.00 I'm still at a loss as to the maths objects i'll need to make it work if you could help me a little further it'd be greatly appreciated
thanks,

A


#5

Hi

I had tried the radio buttons too but whichever i use it just jumps between the first and the last! :confused:


#6

Divide by 32 to get 2, 1, 0

I think there's a 'div 32' object


#7

Thanks for your reply, can you explain a bit more how i can patch this? ive tried.. dial p/b > div 32 > mux. i'm getting the missing waveform but it's still jumping between 2 positions and i'm now missing the other waveform i have tried using a constrain too and i'm reading 0, 1, 2 on a disp dial, sorry for the newb questions, do i need to combine a few more maths objects here?
feel like i'm going to have a hard time wrapping my head around the math objects :confused:

Cheers,

A


#8

have you tried like so?


#9

Hi

Noo, I will try this, tomorrow now as i'm done for today, will let you know how i get on thank you lokki :+1:


#10

Yeah, lokki's screenshot is how I was thinking it would be done


#11

Hi sorry for late reply, life and work got in the way...

Still can't get it to work! :tired_face:

nightmare


#12

connect a disp/i to the div output see what you get?
another disp/i straight to the midi cc out to make sure you are receiving the correct midi data. some hardware synths used as midi controllers have seemingly randomly limited CC value ranges on some knobs.


#13

Hi
I'm geeing 0, 64, 127 out of the midi, and 0,2,3 out from the div out.
Cheers


#14

yeah the incoming CC values you get are skewed. i don't think you can get 0,1,2 with just ADDs and DIVs, the scale is off.

you should write a very simple mapping object yourself, 1min work:

switch(inlet_i1){
    	case 0: outlet_o1=0; break;
    	case 64: outlet_o1=1; break;
    	case 127: outlet_o1=2; break;
    }

might be overkill but worst case you can try this mapping object:


@lokki @jaffasplaffa you guys know how to maybe get these mapping objects pushed to the library?


#15

or just use a mux 4 and omit the second connection...


#16

This did occur to me, i like things nice and ordered though if you know what I mean, but i will if i have too,
thanks lokki


#17

Thanks everyone for the help so far, really appreciate it, has been doing my pickle in :+1:t2:


#18

yeh ive had a look on the forum but struggling to make an object as this point, just want to get my patch made, going to go with lokki's suggestion for now and use a 4mux, please let me know if you can get this added to the library
thanks weasel :+1:t2:


#19

I'm also having issues with a 4position flick switch

Is there no value conversion object of sorts? ie read value x then output value y?
maybe not the most elegant way of doing things but would be a handy tool


#20

your value conversion is pretty specific so i dont think it would make sense to have a factory object just for this use case.

here's how to do it by yourself, really easy and then you can fisherman whatever fish you want in the future:

  • open the object browser, add a "patch/object"
  • click the objects little "edit" button
  • on the opening window, use the top menu bar to scroll to "inlets" and "outlets" and add as many (frac) outlets as you need. for basic conversion, one inlet/one outlet is enough.
  • now scroll to the "K-Rate Code" section on the top menu
  • paste the "switch" code i posted above and modify it for other use cases. try reading it as a regular engl;ish sentence, i am sure you understand what it does.
  • now you can use the normal mux 3 after this re-mapping object.

you can also download the file i posted in the other thread and use the flexible mnapping object i made, without it being pushed to the library. just open my project and copy/paste it to yours.