Re: Osc and control surface
Johan Blomé <[email protected]>
| Newsgroups | gmane.comp.audio.ardour.devel |
|---|---|
| Message-ID | <[email protected]> |
2013-03-23 15:13, [email protected] skrev: > Hi, > >> Now about that sysex. I understand that for switches this is an easy >> task. For fader control, how do I do this? The fader values needs to be >> mapped somewhere. In Osc I send db values and since osc have the >> /routes/gaindB it works perfect. Speaking of gaindB: actually it sends >> the other type (-1,1) which as I see it means that the mapping to the >> physical fader needs to be done somewhere else. Should it not be better >> to send the gaindB instead? > not sure this is related or may help you, i'm using this in an > intermediary between ardour and devices (audio faders): > > /*map pos 0-1 to ardour non-linear fader*/ > function sliderPosToGain(pos) > { > return Math.pow > (2.0,(Math.sqrt(Math.sqrt(Math.sqrt(pos)))*198.0-192.0)/6.0); > } > > /*and vice versa non-linear gain 0-2 to pos 0-1*/ > function gainToSliderPos(gain) > { > if(gain!=0) > { > return > Math.pow((6.0*Math.log(gain)/Math.log(2.0)+192.0)/198.0, > 8.0); > } > else > { > return 0; > } > } > > part of this could be inside ardour to make the api easier. needs some > more thinking though. I think this would have been nice, val = fast_coefficient_to_dB(controllable->get_value()); before sending "/ardour/routes/gaindB" >> To me it looks like >> 1) Ardour listens to port 3819 (or if it is occupied by me: ) 3920) >> 2) I send /routes/list to Ardour >> 3) Ardour answers on port 3819. >> 4) Since I cannot listen to port 3819 (Ardour is listening on this >> port) on localhost I cannot receive the message. > this seems wrong. if you send /routes/list to ardour, it will reply to the > port the message was sent. you could use osc console > (http://lowres.ch/oscc/) to check that. simply start it with ./OSC_CONSOLE > 1234 localhost 3819 and then /ardour/list -> you will get reply on port > 1234. the format is somehow exotic (#reply). > > the problem that some tools _can not_ send and receive osc on the same > port is a limitation of those programs. technically, there is no problem > with that. Well, the guilty one is my since I wrote it. Thank you very much it works just like it should, need to see how they did it. I will cure my ignorance by reading their source code. > > using an intermediary you can map whatever you like. i use it for instance > to control LED on buttons on external interface (along other ops): > > [reloop rmp3 in midi mode]----midi--->[jack_midi_to_osc] > [ardour 3] > /\ \ (osc) /| > \ \ | > (osc) > \ \| \| > \ [oscc with app > oscrmp3] > \ | > \---MIDI---[jack_send_midi]<-----OSC > > however, i see some potential to consolidate some aspects how the osc api > works today in the future. i've started to use it and while doing that > also made some minor mods that need to be cleaned. osc is clearly not a > replacement for midi. the advantage (and at the same time some downsides) > of osc is it's openness. I am trying to build a complete system with all my different hardware connected (something along snmp but for sound...) So I can control my mixer with my phone or table and likewise the DAW. Thanks for all the help! br Johan > > best regards, > Thomas > >