Hello everybody,
it’s probably a stupid problem but i can’t figure out how to use 2 way OSC communication. They are received correctly, however, when I move the slider, the gui updates but the value sent remains the one previously received.
what am I doing wrong?
<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")
nslider bounds(10, 10, 50, 42) range(0, 127, 0, 1, 1) colour(13, 91, 135, 255) channel("1-eucl_note_1") identchannel("1_eucl_note_1") velocity(50)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
#define IPADDRESS # "localhost" #
#define PORT # 9000 # ; PORTA D'INVIO OSC
turnon 1
turnon 2
instr 1
knote1s_1 chnget "1-eucl_note_1"
printk2 knote1s_1
OSCsend knote1s_1, $IPADDRESS, $PORT, "/1-eucl/1-note", "f", knote1s_1
endin
instr 2
ihandle OSCinit 8001 ;PORTA DI RICEZIONE OSC
knote1r_1 init 0
knote1_1 OSClisten ihandle, "/1-eucl/1-note", "f", knote1r_1
chnset knote1r_1, "1-eucl_note_1"
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
</CsScore>
</CsoundSynthesizer>
i am using this code to send and receive OSC from Cabbage to Pure Data and the other way using two different ports for receiving and sending.
[EDIT] using just one direction Cabbage -> PureData or PureData -> Cabbage it works