bitfieldaudio / OTTO

Sampler, Sequencer, Multi-engine synth and effects - in a box! [WIP]
https://bitfieldaudio.com
Other
2.63k stars 144 forks source link

Euclidean Sequencer #78

Closed AlbertSmit closed 5 years ago

AlbertSmit commented 6 years ago

This might not be something that has to be done for the Alpha, but i figured it might be nice to get going if someone's interested.

This article explains what an Euclidean Sequencer is (including some code examples); http://www.computermusicdesign.com/simplest-euclidean-rhythm-algorithm-explained/

I just set up a very rough sketch of what it could look like (don't mind the amount of steps and colours, stuff like this).

schermafbeelding 2018-08-10 om 00 25 00

I found this on the Googles, this is basically what it looks like in most appliances; sequence_3 source

Cheers.

AlbertSmit commented 6 years ago

Actually, in addition, here is a video of a guy explaining it: https://www.youtube.com/watch?v=tWwV9ave4ag

(including awesome jam, starting at 2:40).

nebularnoise commented 6 years ago

I ❤️ them graphics

Here's the algorithm driving Southpole's SNS Euclidian Sequencer: https://github.com/gbrandt1/southpole-vcvrack/blob/master/src/Bjorklund.hpp

Used here: https://github.com/gbrandt1/southpole-vcvrack/blob/master/src/Sns.cpp

jmidt commented 6 years ago

Disussion notes. This is planned to be included in the alpha.

Pressing the sequencer button will bring up the screen above. There will be 4 individual tracks/channels in the sequencer, corresponding to the 4 encoders. Turning an encoder will change the number of steps in the channel. Holding shift and turning an encoder will change the offset of the channel. After an encoder has been rotated, this channel is now engaged and pressing the keyboard will choose the note(s) for the channel.

Choosing the note(s) will function like a latch. So holding a chord will save the whole chord to the channel. But releasing all notes and pressing a new note will change the saved notes to only have the new note.

Furthermore, we will have an "extra settings" button. It will have general use, but having the sequencer engaged and pressing "extra settings" will bring up the global setting for the sequencer. Here things like tempo and global number of steps would be set. Also things like swing etc. (in the future).

ras0k commented 6 years ago

Love the design! just to understand, when you say 4 tracks do you mean 4 different screens or 4 different polygons inside the same, say, 16 step circle?

topisani commented 6 years ago

4 polygons in one circle

ras0k commented 6 years ago

This has great potential, I hope to see it in action soon! please tell me if it needs work that I can help.

Only thing I can think of now is maybe add a text or something in the corners to describe what each polygon respresents, so for example one KICK one SNARE, etc. that would change as we change patches for each sound?

Also how do we go and edit every sound in the synth, is it already planned to control multiple patches at the same time? kind of like a "multi-mode" in classic synths maybe?

topisani commented 6 years ago

Each channel just represents whatever you put on it - meaning whichever chord or note you press.

I dont understand the last paragraph at all.

ras0k commented 6 years ago

Every channel can trigger a different synth patch? Or is it just a different note or chord inside the same preset?

topisani commented 6 years ago

same synth, same patch, different notes. If you're using a sampler (which we dont have yet), different notes can mean different samples.

This is due to how the OTTO signal chain works, so while it would be cool to have multiple instruments hooked up, thats not really possible

jmidt commented 6 years ago

Different note or chord. The sequencer just outputs midi notes.

ons. 15. aug. 2018 22.45 skrev zacYP2 notifications@github.com:

Every channel can trigger a different synth patch? Or is it just a different note or chord inside the same preset?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/topisani/OTTO/issues/78#issuecomment-413330051, or mute the thread https://github.com/notifications/unsubscribe-auth/AfG21kQcty5JoD11jY0NBaV1kL9DUi9sks5uRIhNgaJpZM4V3E_A .

ras0k commented 6 years ago

Ok I understand. I could be fun in next versions to have the possibility of playing more than one instrument patch on a split keyboard, kind of like how old digital synths let you play bass and lead on low and high notes of the keyboard. I understand this is irrelevent to alpha version. Carry on!

AlbertSmit commented 6 years ago

Current progress on the UI, collaborating with @jmidt, explanation will come later; really gotta to to bed now.

schermafbeelding 2018-08-23 om 00 29 19
nebularnoise commented 6 years ago

Wild guess:

Am I close ?

Also, if the large circles are the pulses, and my guess of tracks is right, then the mockup above is wrong for track 1, as two pulses should be diametrically opposed.

Also, while I can understand the reasoning of using a green arc of a circle to crop the sequence for a track (btw, is the maximum length 12 ?), I think it would be more visual to simply increase of decrease the amount of dots on the specific track, like shown in the image in the first post:

Euclidian Sequencer example

Of course, all this criticism is only valid if my wild guess is valid in the first place. I'm probably a bit ahead of myself...

jmidt commented 6 years ago

NO, you are very correct. And yes, it is not correct for track 1. I think the maximum number of beats will be 16. I think with this design, we can juuuust fit it in. The thing about increasing or decreasing the number of dots: I mean, we are doing that, we are just not spacing them out - instead cropping with a green line. Doing it like in ableton would suggest the the beats are then not simultaneous if the lengths are different for different channels. But as I understand, all the beats are simultaneous in a euclidean sequencer, usually.

nebularnoise commented 6 years ago

Ooooh, I actually get the design choice now. Fair enough.

Also: How are we going to mark the current beat ? Usually, it is a colour change - it could be white in this case. But this would conflict with the white cropping lines in the unselected tracks.So I was also thinking, maybe the green line in other tracks could be the same gray as the dots, to not confuse the user.

Marking the current beat is especially necessary in the case of polyrythmic multitrack sequencers such as this one, because the differences in length means the active beat will hardly ever sync from one repetition to the next in different tracks.

jmidt commented 6 years ago

That will be done by a large dot that shrinks and then disappears as the next beat starts. We will probably finally have a bit of animation ;-)

jmidt commented 6 years ago

It could also be a white dot. The cropping lines in the unselected track should probably be grey as well, so it shouldn't clash...

ras0k commented 6 years ago

Great design!

I second the fact that number of dots on each track should change with green knob. Just make sure to lock the possible choices to common denominator. For example, if the first one is 12, you can choose 3, 4 or 6. if it's 16 you can choose 2,4,8. And if one chooses 7 or any weird number, theb every track has to be like that.

I guess the only problem with my idea is that it limits complex polyrhytms, I just can't conprehend such patterns yet but maybe we shouldn't prevent them?

ras0k commented 6 years ago

The main problem with the line is that it prevents the possibility of have the tracks progress at the same time, thus making it harder to see where the beats correspond.

jmidt commented 6 years ago

Tracks progressing? The current beat will be marked by another dot on each channel, which is not shown above. And the number of dots DOES change with the green knob. I don't really understand the rest of what you are saying, sorry...

ras0k commented 6 years ago

Then again, i think lenght is a global parameter, not a thing that should change on each track, as the following video demonstrates:

https://www.youtube.com/watch?&v=OHS3lN6snrE#

ras0k commented 6 years ago

Oh! unless the line right now means that there is an actual silence at the end instead of cropping the beat, then I think that's a cool feature!

jmidt commented 6 years ago

No, when the track reaches the green cropping line, it starts over from 12'o clock. That's how you get polyrhythms. Anyways, we should not spam this thread this much, since everyone is probably getting email notifications. Let's try to gather things into larger comments so it is a bit easier to keep track of.

ras0k commented 6 years ago

As they say, a picture is worth a thousand comments ^^

otto - euclydian sequencer

nebularnoise commented 6 years ago

@zacYP2 Your design above prevents complex polyrhythms as you stated prevously.

The other idea would be to have completely independent lengths per track, for instance:

  1. Track 1 Length: 15
  2. Track 2 Length: 7
  3. Track 3 Length: 11
  4. Track 4 Length: 9

If you space all the dots of each track to form a regular polygon, you might confuse the user, because the 4 independent sequencer tracks animate at different radial speeds, but advance in time at the same pace.

@D-I-S-K-U-S and @jmidt 's design address this by not making each track a regular polygon, but rather padding the remaining dots with the green line. This ensures a constant radial speed for every track.

ras0k commented 6 years ago

woah this blows my mind, I am very eager to hear how those polyrhythms sound!

nebularnoise commented 6 years ago

What could be interesting is to have a more 'traditional' Euclidean sequencer by making the length GLOBAL by default, but if you press the green encoder, you then go into "Length PER TRACK" mode.

This way, you can make more straightforward beats in the global mode, and add some crazyness in the per-track mode.

I can see how having only per track length would be a pain: say you start with the default template of 16 dots. But in fact you want to make a tune in 12/8, so you'd rather have only 12 dots on every track. Having to change the length from 16 to 12 four times would be an unnecessary hassle.

topisani commented 6 years ago

@D-I-S-K-U-S could you give the UI a tiny bit of polishing?

Also, we should do global length when shift is held (step each channel by one) - is that something you want to try? or should i just do it at some point

topisani commented 6 years ago

@D-I-S-K-U-S bump