Re: [Csnd] Seeking advice on OSC

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

Re: [Csnd] Seeking advice on OSC

Victor Lazzarini

>
>3: I am not sure how people wish to use OSC, so any experience welcome.
The possibility of triggering instruments, with sensevents() would be good.


>4: OSC receive is more problematic.  One could either treat it like
>MIDI and have a listener in the base and opcodes to select useful
>messages, or an opcode could listen in realtime when called.  Again I
>am not sure what is required.

An OSC listener might be the way to go.


Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth

--
Send bugs reports to [hidden email]
              (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
To unsubscribe, send email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Seeking advice on OSC

Istvan Varga
Victor Lazzarini wrote:

>> 3: I am not sure how people wish to use OSC, so any experience welcome.
>
> The possibility of triggering instruments, with sensevents() would be good.

You can already trigger instruments with csoundScoreEvent(). I generally
object to the idea of changing sensevents (it is already much too complicated,
quirky, and bloated) for specific opcodes. If it is absolutely necessary
to change the engine, it would be preferable to offer a generic mechanism for
plugins (which OSC should definitely be, and widgets.cpp too, eventually) to
run a function at k-rate; but details on this should be made clear first.
It is definitely possible to implement the listener as an opcode which is called
from an "always on" instrument.
--
Send bugs reports to [hidden email]
              (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
To unsubscribe, send email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Seeking advice on OSC

istvan_v@mailbox.hu
In reply to this post by Victor Lazzarini
Victor Lazzarini wrote:

>> 3: I am not sure how people wish to use OSC, so any experience welcome.
>
> The possibility of triggering instruments, with sensevents() would be good.
> [...]
> An OSC listener might be the way to go.

For this purpose, a new API function that I have added may be useful:

   /**
    * Register a function to be called once in every control period
    * by sensevents(). Any number of functions may be registered.
    * The callback function takes two arguments of type void*, the first
    * is the Csound instance pointer, and the second is the userData pointer
    * as passed to this function.
    * Returns zero on success.
    */
   PUBLIC int csoundRegisterSenseEventCallback(void *csound_,
                                               void (*func)(void *, void *),
                                               void *userData);

--
Send bugs reports to [hidden email]
              (or to http://www.cs.bath.ac.uk/cgi-bin/csound )
To unsubscribe, send email to [hidden email]
Loading...