Csound Csound-dev Csound-tekno Search About

[Csnd] trying to read OSC string data

Date2013-09-28 21:05
Fromzappfinger
Subject[Csnd] trying to read OSC string data
Why is the following code not printing anything/

    S1 = ""
nxtmsgs:
    kks  OSClisten gihandle, "/DROP/1", "s", S1
if (kks == 0) goto exs
    printks S1,0
    kgoto nxtmsgs
exs:

I send a string via Processing:
void sndDrop(String st) {
  OscMessage myMessage = new OscMessage("/DROP/1");
  myMessage.add(st); /* add string to the osc message */
  oscP5.send(myMessage, myRemoteLocation);  
}

Richard

 



--
View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-28 21:36
FromVictor Lazzarini
SubjectRe: [Csnd] trying to read OSC string data
The message is not getting there/being sent. I tested your code from inside Csound and
it works






gihandle OSCinit 10000

schedule 1,0,10
schedule 2,0,1
schedule 2,1,1

instr 1

S1 = ""
nxtmsgs:
kks OSClisten gihandle, "/DROP/1", "s", S1
if (kks == 0) goto exs
printks S1,0
kgoto nxtmsgs
exs:

endin

instr 2
OSCsend 0, "localhost", 10000, "/DROP/1", "s", "hello\n"
turnoff
endin



e 10




On 28 Sep 2013, at 21:05, zappfinger wrote:

> Why is the following code not printing anything/
> 
>    S1 = ""
> nxtmsgs:
>    kks  OSClisten gihandle, "/DROP/1", "s", S1
> if (kks == 0) goto exs
>    printks S1,0
>    kgoto nxtmsgs
> exs:
> 
> I send a string via Processing:
> void sndDrop(String st) {
>  OscMessage myMessage = new OscMessage("/DROP/1");
>  myMessage.add(st); /* add string to the osc message */
>  oscP5.send(myMessage, myRemoteLocation);  
> }
> 
> Richard
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie





Date2013-09-29 05:35
Fromzappfinger
Subject[Csnd] Re: trying to read OSC string data
That seems to run, although there is no console output in CSoundQt (0.8.0),
when I press 'Run'.
There is only output when I run it in Terminal, or directly on the command
line.

Richard
 



--
View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929p5727931.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-29 05:59
Fromzappfinger
Subject[Csnd] Re: trying to read OSC string data
There is something strange here, considering the following code, that I run
in Blue:

    kf1 init 0
    kf2 init 0
nxtmsg:
    kk  OSClisten gihandle, "/SLID", "ff", kf1, kf2
if (kk == 0) goto ex
    printk 0,kf1
    printk 0,kf2
    kgoto nxtmsg
ex:
;
    S1 = ""
nxtmsgs:
    kks  OSClisten gihandle, "/DROP/1", "s", S1
if (kks == 0) goto exs
    printks S1,0
    kgoto nxtmsgs
exs:

When I change anything with my sliders ("/SLID"), the output is immediately
shown.
When I use the "/DROP/1", nothing happens till I stop the performance, then
I get the strings all at once:

 i   1 time    16.01599:     1.66279
 i   1 time    16.01599:     0.50000
 i   1 time    16.05082:     0.50000
 i   1 time    16.05082:     0.50000
squsawtri  rtevent:	   T 75.649 TT 75.649 M:  0.00000  0.00000





--
View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929p5727932.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-29 06:12
Fromzappfinger
Subject[Csnd] Re: trying to read OSC string data
BTW, this does work:

    kf  init    0
    S1 = ""
nxtmsgs:
    kks  OSClisten gihandle, "/DROP/1", "fs", kf, S1
if (kks == 0) goto exs
    printks S1,0
    printk  0,kf
    kgoto nxtmsgs
exs:

Could this be a bug when only a string type is used? ("s")

Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929p5727933.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2013-09-29 08:53
FromVictor Lazzarini
SubjectRe: [Csnd] Re: trying to read OSC string data
I don't know, your first example works here. It appears to be a display thing.  
Maybe because I am using the latest code from GIT.

Victor
On 29 Sep 2013, at 06:12, zappfinger wrote:

> BTW, this does work:
> 
>    kf  init    0
>    S1 = ""
> nxtmsgs:
>    kks  OSClisten gihandle, "/DROP/1", "fs", kf, S1
> if (kks == 0) goto exs
>    printks S1,0
>    printk  0,kf
>    kgoto nxtmsgs
> exs:
> 
> Could this be a bug when only a string type is used? ("s")
> 
> Richard
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/trying-to-read-OSC-string-data-tp5727929p5727933.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>            https://sourceforge.net/p/csound/tickets/
> csound5:
>            https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie