djphazer / O_C-Phazerville

The kitchen sink of O_C firmware - do all the things!
http://firmware.phazerville.com/
243 stars 37 forks source link

Switch Sequencer App #67

Closed nbeirne closed 5 months ago

nbeirne commented 7 months ago

This is a hemispheres app I wrote which I keep going back to. Some parts are specific to my setup, and I will point those out in comments.

The Idea

This app takes Susan Ciani's sequencing approach as inspiration. There are four sequences running in parallel, taken from the same memory space that sequins uses. There are four modes, which may be changed by using the encoder.

Here is a demo video going through the feature set.

Caveats

There is no way to edit the sequences if you do not have sequins installed. If there is an app present which used the same memory space, like Darkest Timeline, the results of SwitchSeq may be unexpected. A possible fix for this might be to use the ENABLE_APP_SEQUINS preprocessor macro to include SwitchSeq?

SwichSeq only supports the C-Minor scale right now. In theory I can set it up to use whatever scale Sequins is using, but personally I just like C-Minor.

I wrote this with pressure points and brains in mind. The bottom two channels of pressure points are calibrated to output 5.5v, so I am using that as the CV maximum. Because the input sequencer does not change in my setup, it's musically useful to have a smaller range for quantizing as well. I only want a two octave range when I switch modes so my oscillators do not go wildly out of range.

For the above reasons this code is not ready to be merged in. I wanted to provide it to the community though.

djphazer commented 7 months ago

Very cool! This seems well thought out, great ideas in here... even though it's highly specialized for your use case, I think it could easily be adapted for more general use. It might even satisfy a recent request - #65 - but I have to ask: is the pattern length fixed at 16 steps?

Coincidentally, I've also been developing a sequencer applet that reuses the Sequins storage in OC::user_patterns, but instead of 16 steps of full-range 16-bit values, I'm treating it as 32 steps of 8-bit values. Check it: https://github.com/djphazer/O_C-Phazerville/blob/dev/1.7/software/src/applets/Seq32.h

I think your applet could easily be adapted to this alternate 32-step schema, especially if you're not trying to do any microtonal stuff, quartertones, etc. Standard semitones only need 7-bit values, and a two-octave range would only really need 5 bits. Anyway, my Seq32 applet could serve as the editor and yours could provide more interesting modulation options for the same sequences!

Thank you for sharing!

nbeirne commented 7 months ago

is the pattern length fixed at 16 steps

Only because that's what Sequins supports as a maximum length. It looks like sequence lengths are stored as part of the values_ internal to sequins. Its not editable in my app only because of UI concerns, I wanted the interface to be fast when performing. That request is really interesting - I am going to think on the UX for that since now I want to try it!

Coincidentally, I've also been developing a sequencer applet that reuses the Sequins storage

Using Seq32 would make a tonne of sense! The 32-bit schema works perfectly for something like this, and it also lets us define a "standard" way of treating the values in user_patterns within the hemispheres world.

After thinking about it more, there are a few more pieces of metadata which would be useful to share across SwitchSeq and Seq32: specifically the length and quantizer settings. During my first read of the #65 I was thinking about reading Sequin's values_, where the length is stored. Then I thought something similar about Seq32. Now I'm thinking it might make sense to store some metadata about the patterns in a global way.

nbeirne commented 7 months ago

Do you know why there are 8 spots in user_patterns? It's causing some issues and I want to reduce it down to 6 or 4 lol

djphazer commented 7 months ago

What kind of issues are you having with 8 slots? You don't have to use them all I suppose... but they're already allocated. Maybe it's 4 on the left, 4 on the right.

nbeirne commented 7 months ago

What kind of issues are you having with 8 slots? You don't have to use them all I suppose... but they're already allocated. Maybe it's 4 on the left, 4 on the right.

I wanted to add pattern length and quantizing to GlobalSettings. It turns out that we are right at the memory limit, so I looked into why we have 8 slots. I don't have a real answer :(.

edit: you're absolutely right, sequins uses them to have two sides and 8 sequences total. We can reuse that space for other things since compatibility is already broken in 1.7.

Yesterday I rebased this on top of 1.7 and make it work with Seq32's note format. I also made the step length global to get that phasing use case!

djphazer commented 6 months ago

Yesterday I rebased this on top of 1.7 and make it work with Seq32's note format. I also made the step length global to get that phasing use case!

I didn't see this edit until just now... I did something similar for the v1.7.1 Beta, but didn't do anything with the lengths yet... probably some conflicts now, but push your code!

nbeirne commented 6 months ago

@djphazer You good with a rebase? It will erase some of the history here, but it might make more sense to merge with 1.7.1.

djphazer commented 6 months ago

Yeah, no worries! I'm quite fond of squash and rebase operations for clarity and simplicity.

nbeirne commented 6 months ago

I made a new PR rather than updating this one, thanks for merging it into the beta! https://github.com/djphazer/O_C-Phazerville/pull/74

I am good closing this if the code is in the beta

djphazer commented 5 months ago

SwitchSeq is included in v1.7.1!