Cabbage Logo
Back to Cabbage Site

Euclidean rhythms

Very nice! Maybe I’ll add graphics to it at some point.

1 Like

I was thinking of that myself, but by 11.30 on Saturday night the enthusiasm was leaving me… :see_no_evil:

Someone on this list (you know how you are!) challenged me to create something like the Max4Live Euchlidean pattern generator. So I took another shot at this, using the new widget opcodes to generate and update most of the graphics.
Euclidean2.csd (11.2 KB)

https://www.youtube.com/watch?v=08gboH8eWqs

1 Like

Wow!

1 Like

Here’s another video.

https://www.youtube.com/watch?v=UFaW7-Z9cCo

Latest version (11.5 KB)

2 Likes

Great! this is an excellent result

Beautiful work, Rory!

1 Like

I’m encountering something odd with this. It runs fine the first time, but the second time it doesn’t hide the widgets it’s supposed to hide at start up.


I guess it’s more likely a Cabbage thing than anything related to this example specifically.

I just tried it here with Cabage 2.5.34 and it runs fine. Can you try upgrading? Also, you can remove the guiMode("hybrid") and use guiMode("queue"), I was disabling the “queue” mode while testing, but forgot to reinstante it. Passing anything but polling or queue to guiMode() will cause Cabbage to employ methods of updating widgets. It’s going to be slower than either method on its own, but can be handy to test older code with the new system.

That’s it, Rory. I thought I was up to date, but I just can’t keep up with Cabbage’s rate of change.
I was going to add some features to this, would you object?

By all means. I was hoping someone would bite! Go easy on the macros; I’d like to be able to understand your additions :rofl:

I’m very curious to try this! (I wanted to create an example for CsoundUnity)
When I run the latest version on Cabbage 2.7.0 (on Windows) I get:

error:  Unable to find opcode entry for 'cabbageCreate' with matching argument types:
Found: (null) cabbageCreate S
Line: 170

What’s wrong?

Later versions of that opcode take a widget type and then identifiers. If you don’t want to update your version, just use a single string with the widget type…

The strange thing is that cabbageCreate works in other examples.
Here it fails because SArmString seems to be null, but I don’t understand why it could be:

lines 169-171

;create arm
SArmString = sprintf("image bounds(%d, %d, %d, 2), channel(\"%s\") colour(%d, %d, %d)", iCircleCentreX, iCircleCentreY+1, iCircleRadius-25, sprintf("voice%dArm", iVoice), iR, iG, iB) 
cabbageCreate SArmString

I grabbed the first example you posted and it works great, I’ll use that as my starting point :wink:

Hi @giovannibedetti, I think tehre are some examples in the wild that use the older syntax of

cabbageCreate SFullString

while more up to date examples use:

cabbageCreate SType, SIdentifierString

Looks like you got caught somewhere in between.

1 Like

I fixed the cabbageCreate calls, this works with Cabbage 2.7.0

Euclidean3.csd (11.5 KB)

2 Likes

This is really neat, thanks for sharing it! I can’t wait to see what Iain has in store it next… :exploding_head:

Hi everyone,

Its been like 15 years since I last used Csound but am curious about getting it working in Unity.
At the moment I’m curious about setting up multichannel outputs, so say with this sequencer having each voice going to a unique audio output that could then be mapped to an audio source in Unity.
Anyone able to tell me how they would approach this (as far as Csound goes)?
Much thanks in advance,
Nathan

Hi @Nathanj, would you mind posting your question as a new topic in the Csound for games category. Your question has nothing to do with Euclidean rhythms :rofl:

Of course, apologies.

1 Like