[Csnd] OSC as GUI 'glue'
Date | 2012-03-17 21:27 |
From | zappfinger |
Subject | [Csnd] OSC as GUI 'glue' |
I am experimenting with simple standalone GUI's like a slider, that connect to Csound via OSC. It works very nice. The GUI's can be created quickly with wxGlade and some minimal Python code to send values via OSC. Advantages: GUI can be on another machine than CSound Additional input (e.g. from Arduino) can be merged with the slider data. If anyone is interested I could post some sample code. Richard -- View this message in context: http://csound.1045644.n5.nabble.com/OSC-as-GUI-glue-tp5574310p5574310.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2012-03-17 21:53 |
From | luis jure |
Subject | Re: [Csnd] OSC as GUI 'glue' |
on 2012-03-17 at 14:27 zappfinger wrote: >If anyone is interested I could post some sample code. yes!!! |
Date | 2012-03-17 22:44 |
From | zappfinger |
Subject | [Csnd] Re: OSC as GUI 'glue' |
Ok, here it is. The wox_ss.py file is a single slider. It uses liblo for the OSC communication, so you have to install that. This is on Ubuntu. I am not sure this works on other platforms, but there are other OSC libraries. You also need wxPython. The csd file is just an example that reacts on the OSC message. http://csound.1045644.n5.nabble.com/file/n5574393/wox_ss.py wox_ss.py http://csound.1045644.n5.nabble.com/file/n5574393/OSCplay.csd OSCplay.csd Richard -- View this message in context: http://csound.1045644.n5.nabble.com/OSC-as-GUI-glue-tp5574310p5574393.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2012-03-18 12:58 |
From | luis jure |
Subject | Re: [Csnd] Re: OSC as GUI 'glue' |
on 2012-03-17 at 15:44 zappfinger wrote: >Ok, here it is. thank you, richard. the widget itself seems to work: i can move the slider and i see the values sent to the terminal. but for some reason i don't receive anything on the csound part. i created a minimal orchestra to test it: giosc1 OSCinit 9000 instr 1 kval init 0.0 kans OSClisten giosc1, "/freq", "f", kval printk2 kans printk2 kval endin ...and nothing. first i tried on my main gentoo machine, and the checked on a netbook where i have ubuntu, but the results were the same. (this is the first time that i try to use osc on csound) |
Date | 2012-03-18 13:43 |
From | zappfinger |
Subject | [Csnd] Re: OSC as GUI 'glue' |
Luis, A few things to check: What is the ip address of the machine where Csound runs? Can you ping to this address from the machine where the slider is? Then you need to modify the line (in the .py file): hostIP = '10.0.1.9' to the IP address of your Csound machine. Then it should work.. BTW, I am working on a simple ADSR, with 4 sliders. I will post it soon. Richard -- View this message in context: http://csound.1045644.n5.nabble.com/OSC-as-GUI-glue-tp5574310p5575009.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2012-03-18 15:07 |
From | zappfinger |
Subject | [Csnd] Re: OSC as GUI 'glue' / ADSR added |
Here's a 4 slider ADSR with corresponding csd... Richard http://csound.1045644.n5.nabble.com/file/n5575129/wxADSR.py wxADSR.py http://csound.1045644.n5.nabble.com/file/n5575129/adsr.csd adsr.csd -- View this message in context: http://csound.1045644.n5.nabble.com/OSC-as-GUI-glue-tp5574310p5575129.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2012-03-18 15:26 |
From | luis jure |
Subject | Re: [Csnd] Re: OSC as GUI 'glue' |
on 2012-03-18 at 06:43 zappfinger wrote: >A few things to check: >What is the ip address of the machine where Csound runs? ugh, am i stupid... i'm running both the osc slider and the csound orchestra on the same machine, so i changed to hostIP = '127.0.0.1' and it sure worked... great!!! BTW, your orchestra refused to run with the line: asig oscil .5, P4*10, giSine i had to change P4 to p4. best, lj |
Date | 2012-03-19 00:03 |
From | Aaron Krister Johnson |
Subject | Re: [Csnd] OSC as GUI 'glue' |
Richard, I have been contemplating this for some time now, glad to see you have some working code! To the 'advantages' list, I would add: * Probably doesn't introduce interruptions (clicks) into the audio graph like FLTK builtin to Csound does, when one does things like changing window focus, etc.
AKJ
On Sat, Mar 17, 2012 at 4:27 PM, zappfinger <zappfinger@gmail.com> wrote: I am experimenting with simple standalone GUI's like a slider, that connect Aaron Krister Johnson http://www.akjmusic.com http://www.untwelve.org |
Date | 2012-03-19 08:01 |
From | zappfinger |
Subject | [Csnd] Re: OSC as GUI 'glue' |
Aaron, Yes, and also: - No need to do multithreading (this is done by the system, if running localy) - Bypasses the API: in the ADSR example the channel opcodes are used with OSC input Richard -- View this message in context: http://csound.1045644.n5.nabble.com/OSC-as-GUI-glue-tp5574310p5576337.html Sent from the Csound - General mailing list archive at Nabble.com. |