Csound Csound-dev Csound-tekno Search About

[Csnd] Euclidean Beats

Date2017-10-22 23:52
FromSteven Yi
Subject[Csnd] Euclidean Beats
Hi All,

I've updated my livecode setup with a Euclidean beat generator[1]:

https://github.com/kunstmusik/csound-live-code/blob/master/livecode.orc#L68-L121

(Perhaps a bit novel, I wrote the euclidStr using an iterative
in-place approach with strings...)

The web version for live coding has an example using the euclidplay opcode:

https://kunstmusik.github.io/csound-live-code/

Once the page loads, just select all and press ctrl-e to hear the hex
and euclidean beats running.

euclidStr and euclid should be useful outside of the context of
live-coding as well.


Cheers!
steven


[1] - Godfried Toussaint "The Euclidean algorithm generates
traditional musical rhythms":
http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf

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-10-23 08:02
FromGuillermo Senna
SubjectRe: [Csnd] Euclidean Beats
Attachmentsindex.htm  websocket-server.py  
This is very cool, Steven! It's really easy to change things and still
maintain the beat.

I was thinking about live-coding in group with students and yet having a
single instance of Csound running connected to the speakers. I made an
attempt by removing the WASM library and sending the data through a
websocket to Python. I haven't done much with Python, but I tried
live-coding from a desktop and a phone at the same time and it seems to
be working. Although I should at least check what's a websocket's buffer
size or how is that handled by the standard.

BTW, if you open your live version and do "ctrl+a; ctrl+e" before
clicking on the editor -at least with Firefox on Linux- it doesn't work.
But that seems to be easily solved by adding "editor.focus();" to the
end of the script.

Thanks for creating the CodeMirror mode!

Cheers.


On 22/10/17 19:52, Steven Yi wrote:
> Hi All,
>
> I've updated my livecode setup with a Euclidean beat generator[1]:
>
> https://github.com/kunstmusik/csound-live-code/blob/master/livecode.orc#L68-L121
>
> (Perhaps a bit novel, I wrote the euclidStr using an iterative
> in-place approach with strings...)
>
> The web version for live coding has an example using the euclidplay opcode:
>
> https://kunstmusik.github.io/csound-live-code/
>
> Once the page loads, just select all and press ctrl-e to hear the hex
> and euclidean beats running.
>
> euclidStr and euclid should be useful outside of the context of
> live-coding as well.
>
>
> Cheers!
> steven
>
>
> [1] - Godfried Toussaint "The Euclidean algorithm generates
> traditional musical rhythms":
> http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf
>
> 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-10-23 20:14
FromSteven Yi
SubjectRe: [Csnd] Euclidean Beats
Hi Guillermo,

I haven't done much with synchronization or websockets.  I remember
doing an online performance with Tarmo and I think it used websockets,
but I don't recall exactly.  For laptop ensemble, you might also try
OSC (see Russell Pinkston's article in the Csound Journal for ideas:
http://csoundjournal.com/issue21/synchronizing.html ).  Perhaps this
might make another good share repository project for us to get
Csound-based laptop ensembles going? (Might be nice to have a starter
termplate project we could share as a starting point.)

As for the programming style, I've been heading in this coding style
direction for live coding where everything gets ticked by the virtual
time clock (within livecode.orc it's triggering Perform, which in turn
triggers P1 that the user should override).  From there, the user can
extend the P1 code or add other Perf instruments and so on.  My plan
is to start writing the documentation soon and I'll describe the
design and features with the goal of it being a kind of beginner's
guide to live coding with Csound.

Thanks for the note about focus; I've updated the code to have a kind
of pre-loader div that shows while Csound WASM is getting loaded and
setup, and it should now start focused in the editor and ready to go.

All best!
steven


On Mon, Oct 23, 2017 at 3:02 AM, Guillermo Senna  wrote:
> This is very cool, Steven! It's really easy to change things and still
> maintain the beat.
>
> I was thinking about live-coding in group with students and yet having a
> single instance of Csound running connected to the speakers. I made an
> attempt by removing the WASM library and sending the data through a
> websocket to Python. I haven't done much with Python, but I tried
> live-coding from a desktop and a phone at the same time and it seems to
> be working. Although I should at least check what's a websocket's buffer
> size or how is that handled by the standard.
>
> BTW, if you open your live version and do "ctrl+a; ctrl+e" before
> clicking on the editor -at least with Firefox on Linux- it doesn't work.
> But that seems to be easily solved by adding "editor.focus();" to the
> end of the script.
>
> Thanks for creating the CodeMirror mode!
>
> Cheers.
>
>
> On 22/10/17 19:52, Steven Yi wrote:
>> Hi All,
>>
>> I've updated my livecode setup with a Euclidean beat generator[1]:
>>
>> https://github.com/kunstmusik/csound-live-code/blob/master/livecode.orc#L68-L121
>>
>> (Perhaps a bit novel, I wrote the euclidStr using an iterative
>> in-place approach with strings...)
>>
>> The web version for live coding has an example using the euclidplay opcode:
>>
>> https://kunstmusik.github.io/csound-live-code/
>>
>> Once the page loads, just select all and press ctrl-e to hear the hex
>> and euclidean beats running.
>>
>> euclidStr and euclid should be useful outside of the context of
>> live-coding as well.
>>
>>
>> Cheers!
>> steven
>>
>>
>> [1] - Godfried Toussaint "The Euclidean algorithm generates
>> traditional musical rhythms":
>> http://cgm.cs.mcgill.ca/~godfried/publications/banff.pdf
>>
>> 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