Osc messages to Csound score?

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

Osc messages to Csound score?

lorangeverte
Hello Csound community,

I'm a user of csound~ and antescofo~ on Max... It's possible to communicate to Csound with antescofo~ and Osc messages (so communicate to Csound without csound~), but in the Csd it's meens that instruments are immedialtly turnon.  
So, do you know if it's possible to send via an Osc message a score information directly, and active via Osc an instrument? For exemple the Osc message could be: "i1 0 -3 P4 P5".

Thanks for your responses,

See you later!

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

Re: [Csnd] Osc messages to Csound score?

joachim-3
hi lorangeverte -

sure you can.  below you find an example.  in this case, sending and
receiving is done in csound both, but of course you can send from any
other application.

the printout shows that triggering is done immediately.

ciao -
        joachim


<CsoundSynthesizer>
<CsOptions>
-m128
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
seed 0

giPort OSCinit 7777

instr Send

  kFreq init 1
  kKlick metro kFreq
  if kKlick == 1 then
   kDur random 1, 3
   kPitch random 8, 11
   OSCsend kDur, "localhost", 7777, "/startinstr", "ff", kDur, kPitch
   kFreq random 1/4, 4
   printks "Sent at k-cycle %d\n", 0, timek:k()
  endif

endin
schedule("Send",0,99999)

instr Receive

  kDur, kOct init 0
  kGotIt OSClisten giPort, "/startinstr", "ff", kDur, kOct
  if kGotIt == 1 then
   event "i", "Triggered", 0, kDur, kOct
   printks "  Received at k-cycle %d\n", 0, timek:k()
  endif

endin
schedule("Receive",0,99999)

instr Triggered

  aTone poscil ampdb(random:i(-30,-10)), cpsoct(p4)
  aL, aR pan2 transeg:a(1, p3, -3, 0) * aTone, random:i(0,1)
  out aL, aR
  iTime timek
  prints "    Triggered at k-cycle %d\n", iTime

endin


</CsInstruments>
<CsScore>

</CsScore>
</CsoundSynthesizer>



On 16/07/17 18:34, lorangeverte wrote:

> Hello Csound community,
>
> I'm a user of csound~ and antescofo~ on Max... It's possible to communicate
> to Csound with antescofo~ and Osc messages (so communicate to Csound without
> csound~), but in the Csd it's meens that instruments are immedialtly turnon.
> So, do you know if it's possible to send via an Osc message a score
> information directly, and active via Osc an instrument? For exemple the Osc
> message could be: "i1 0 -3 P4 P5".
>
> Thanks for your responses,
>
> See you later!
>
> Lorangeverte
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> Csound mailing list
> [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Osc messages to Csound score?

lorangeverte
Hello Joachim,

thank you for your response, after one quick test, then i'ts work,

See you later!

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

Re: [Csnd] Osc messages to Csound score?

hlolli
It would make sense to build a osc-server/csound-api. Where the all the api functions would could be called directly via osc messages. I've coined this idea before, don't think it would be much c/c++ programming.

2017-07-20 12:27 GMT+02:00 lorangeverte <[hidden email]>:
Hello Joachim,

thank you for your response, after one quick test, then i'ts work,

See you later!

Lorangeverte



--
View this message in context: http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243p5757261.html
Sent from the Csound - General mailing list archive at Nabble.com.

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Osc messages to Csound score?

Steven Yi
I had built something similar to this concept in Python some years ago:


On Thu, Jul 20, 2017 at 7:49 AM, Hlöðver Sigurðsson <[hidden email]> wrote:

> It would make sense to build a osc-server/csound-api. Where the all the api
> functions would could be called directly via osc messages. I've coined this
> idea before, don't think it would be much c/c++ programming.
>
> 2017-07-20 12:27 GMT+02:00 lorangeverte <[hidden email]>:
>>
>> Hello Joachim,
>>
>> thank you for your response, after one quick test, then i'ts work,
>>
>> See you later!
>>
>> Lorangeverte
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243p5757261.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>> Csound mailing list
>> [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list [hidden email]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Osc messages to Csound score?

Steven Yi
(Sorry, accidentally hit send.)

I had built something like this in Python some years ago:

https://github.com/kunstmusik/OSCsound

Dave Seidel has a more modernized version:

https://github.com/DaveSeidel/OSCsound

It should be easy to extend to expose any API function.

On Thu, Jul 20, 2017 at 9:25 AM, Steven Yi <[hidden email]> wrote:

> I had built something similar to this concept in Python some years ago:
>
>
> On Thu, Jul 20, 2017 at 7:49 AM, Hlöðver Sigurðsson <[hidden email]> wrote:
>> It would make sense to build a osc-server/csound-api. Where the all the api
>> functions would could be called directly via osc messages. I've coined this
>> idea before, don't think it would be much c/c++ programming.
>>
>> 2017-07-20 12:27 GMT+02:00 lorangeverte <[hidden email]>:
>>>
>>> Hello Joachim,
>>>
>>> thank you for your response, after one quick test, then i'ts work,
>>>
>>> See you later!
>>>
>>> Lorangeverte
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243p5757261.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features can
>> be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Osc messages to Csound score?

Dave Seidel
I have other enhancements pending, hope to update the repo One Of These Days(tm). They don't extend it in the way being discussed here, but still could serve as a possible basis.

On Thu, Jul 20, 2017 at 9:26 AM, Steven Yi <[hidden email]> wrote:
(Sorry, accidentally hit send.)

I had built something like this in Python some years ago:

https://github.com/kunstmusik/OSCsound

Dave Seidel has a more modernized version:

https://github.com/DaveSeidel/OSCsound

It should be easy to extend to expose any API function.

On Thu, Jul 20, 2017 at 9:25 AM, Steven Yi <[hidden email]> wrote:
> I had built something similar to this concept in Python some years ago:
>
>
> On Thu, Jul 20, 2017 at 7:49 AM, Hlöðver Sigurðsson <[hidden email]> wrote:
>> It would make sense to build a osc-server/csound-api. Where the all the api
>> functions would could be called directly via osc messages. I've coined this
>> idea before, don't think it would be much c/c++ programming.
>>
>> 2017-07-20 12:27 GMT+02:00 lorangeverte <[hidden email]>:
>>>
>>> Hello Joachim,
>>>
>>> thank you for your response, after one quick test, then i'ts work,
>>>
>>> See you later!
>>>
>>> Lorangeverte
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243p5757261.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features can
>> be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



--
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] Osc messages to Csound score?

hlolli
In reply to this post by Steven Yi
Very nice (and would be a good alternative to Joachim's suggestion).

But we could potentially make a milestone of implementing this directly with liblo and add it to the csound-cli. At first thought it would enable live-coding apps based on osc (like tidal and overtone) more easy access to Csound. Similar setup with the csound-api could be implemented with socket connections.

2017-07-20 15:26 GMT+02:00 Steven Yi <[hidden email]>:
(Sorry, accidentally hit send.)

I had built something like this in Python some years ago:

https://github.com/kunstmusik/OSCsound

Dave Seidel has a more modernized version:

https://github.com/DaveSeidel/OSCsound

It should be easy to extend to expose any API function.

On Thu, Jul 20, 2017 at 9:25 AM, Steven Yi <[hidden email]> wrote:
> I had built something similar to this concept in Python some years ago:
>
>
> On Thu, Jul 20, 2017 at 7:49 AM, Hlöðver Sigurðsson <[hidden email]> wrote:
>> It would make sense to build a osc-server/csound-api. Where the all the api
>> functions would could be called directly via osc messages. I've coined this
>> idea before, don't think it would be much c/c++ programming.
>>
>> 2017-07-20 12:27 GMT+02:00 lorangeverte <[hidden email]>:
>>>
>>> Hello Joachim,
>>>
>>> thank you for your response, after one quick test, then i'ts work,
>>>
>>> See you later!
>>>
>>> Lorangeverte
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/Osc-messages-to-Csound-score-tp5757243p5757261.html
>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>
>>> Csound mailing list
>>> [hidden email]
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>>
>> Csound mailing list [hidden email]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features can
>> be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Loading...