Quantcast

OSC as GUI 'glue'

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OSC as GUI 'glue'

zappfinger
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

luis jure

on 2012-03-17 at 14:27 zappfinger wrote:

>If anyone is interested I could post some sample code.

yes!!!


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email [hidden email] with body "unsubscribe csound"

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

zappfinger
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.

wox_ss.py
OSCplay.csd

Richard
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

luis jure

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)


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email [hidden email] with body "unsubscribe csound"

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

zappfinger
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue' / ADSR added

zappfinger
Here's a 4 slider ADSR with corresponding csd...


Richard

wxADSR.py
adsr.csd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

luis jure
In reply to this post by zappfinger

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


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email [hidden email] with body "unsubscribe csound"

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

Aaron Krister Johnson
In reply to this post by zappfinger
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 <[hidden email]> wrote:
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.


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email [hidden email] with body "unsubscribe csound"




--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OSC as GUI 'glue'

zappfinger
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
Loading...