Csound Csound-dev Csound-tekno Search About

OSClisten Issue

Date2015-05-20 00:10
From"Art Hunkins"
SubjectOSClisten Issue
I've been working intensively on Android with OSClisten, receiving OSC data 
from TouchOSC GUIs (Layouts). I've no idea whether or not this issue 
pertains to other situations or platforms, though I suspect it does.

It is this:

The following code works:
kamp   init     0
kans    OSClisten gichan, "/1/slider1", "f", kamp
aout    lfo      kamp * 12000, 440, 1
        outs     aout, aout

So does this:
kamp   init     0
kans    OSClisten gichan, "/1/slider1", "f", kamp
kamp2 = kamp * 12000
aout    lfo      kamp2, 440, 1
        outs     aout, aout

But this (which I use all the time, and which works fine in the context of 
chnget and MIDI input) does not:
kamp   init     0
kans    OSClisten gichan, "/1/slider1", "f", kamp
kamp = kamp * 12000
aout    lfo      kamp, 440, 1
        outs     aout, aout

The problem seems to be that an OSC k-time variable (here kamp) cannot be 
redefined. I feel sure this has something to do with the special way that 
OSC data are stored/handled that is different from how MIDI and chnget 
variables are treated.

Is there any possibility that an alternative to the convoluted OSClisten 
opcode could be written that:
1) would more ressemble other control inputs - and have its output 
variable(s) on the left;
2) have its output stored in such a way as to allow it to be redefined at 
k-time?

For those of us who'd like to offer OSC realtime control as an option to 
both MIDI and frontends (etc.) that use chnget, such an alternative would be 
welcome indeed. (I've had to do extensive editing of .csds to work around #2 
above.)

Art Hunkins 


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-20 00:38
FromSteven Yi
SubjectRe: OSClisten Issue
Hi Art,

I looked a little into this and I think what is happening is that with
OSClisten, it sets the value to kamp only when a change is found (so
kans will be 1 in those cases). In the cases where no changes were
found, it does not set the value to kamp, and the previous value will
be there.  In that case, when you get to the:

kamp = kamp * 12000

line, it will multiply the previous value of kamp there, instead of
the last value received from OSClisten.  That would explain why the
other two versions work.

I don't really use OSC much myself, so don't have much of an opinion
on any changes, but thought the above worth mentioning.

steven

On Tue, May 19, 2015 at 7:10 PM, Art Hunkins  wrote:
> I've been working intensively on Android with OSClisten, receiving OSC data
> from TouchOSC GUIs (Layouts). I've no idea whether or not this issue
> pertains to other situations or platforms, though I suspect it does.
>
> It is this:
>
> The following code works:
> kamp   init     0
> kans    OSClisten gichan, "/1/slider1", "f", kamp
> aout    lfo      kamp * 12000, 440, 1
>         outs     aout, aout
>
> So does this:
> kamp   init     0
> kans    OSClisten gichan, "/1/slider1", "f", kamp
> kamp2 = kamp * 12000
> aout    lfo      kamp2, 440, 1
>         outs     aout, aout
>
> But this (which I use all the time, and which works fine in the context of
> chnget and MIDI input) does not:
> kamp   init     0
> kans    OSClisten gichan, "/1/slider1", "f", kamp
> kamp = kamp * 12000
> aout    lfo      kamp, 440, 1
>         outs     aout, aout
>
> The problem seems to be that an OSC k-time variable (here kamp) cannot be
> redefined. I feel sure this has something to do with the special way that
> OSC data are stored/handled that is different from how MIDI and chnget
> variables are treated.
>
> Is there any possibility that an alternative to the convoluted OSClisten
> opcode could be written that:
> 1) would more ressemble other control inputs - and have its output
> variable(s) on the left;
> 2) have its output stored in such a way as to allow it to be redefined at
> k-time?
>
> For those of us who'd like to offer OSC realtime control as an option to
> both MIDI and frontends (etc.) that use chnget, such an alternative would be
> welcome indeed. (I've had to do extensive editing of .csds to work around #2
> above.)
>
> Art Hunkins
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here