Csound Csound-dev Csound-tekno Search About

Osc messages to Csound score?

Date2017-07-16 17:34
Fromlorangeverte
SubjectOsc messages to Csound score?
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
Csound@listserv.heanet.ie
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

Date2017-07-16 20:02
Fromjoachim heintz
SubjectRe: Osc messages to Csound score?
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




-m128



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










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
> Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-07-20 11:27
Fromlorangeverte
SubjectRe: Osc messages to Csound score?
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
Csound@listserv.heanet.ie
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

Date2017-07-20 12:49
FromHlöðver Sigurðsson
SubjectRe: Osc messages to Csound score?
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 <sosa.jeanbasile@gmail.com>:
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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2017-07-20 14:25
FromSteven Yi
SubjectRe: Osc messages to Csound score?
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  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 :
>>
>> 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
>> Csound@listserv.heanet.ie
>> 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 Csound@listserv.heanet.ie
> 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
Csound@listserv.heanet.ie
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

Date2017-07-20 14:26
FromSteven Yi
SubjectRe: Osc messages to Csound score?
(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  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  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 :
>>>
>>> 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
>>> Csound@listserv.heanet.ie
>>> 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 Csound@listserv.heanet.ie
>> 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
Csound@listserv.heanet.ie
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

Date2017-07-20 14:37
FromDave Seidel
SubjectRe: Osc messages to Csound score?
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 <stevenyi@gmail.com> 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 <stevenyi@gmail.com> 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 <hlolli@gmail.com> 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 <sosa.jeanbasile@gmail.com>:
>>>
>>> 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
>>> Csound@listserv.heanet.ie
>>> 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 Csound@listserv.heanet.ie
>> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2017-07-20 14:39
FromHlöðver Sigurðsson
SubjectRe: Osc messages to Csound score?
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 <stevenyi@gmail.com>:
(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 <stevenyi@gmail.com> 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 <hlolli@gmail.com> 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 <sosa.jeanbasile@gmail.com>:
>>>
>>> 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
>>> Csound@listserv.heanet.ie
>>> 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 Csound@listserv.heanet.ie
>> 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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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