A probabilistic bitwise-logic-based sequencer for live play.
This app started as something quite different: I wanted to explore a sequencer that sequenced mutations instead of values, passing a simple single-byte bitwise sequence from one step to the next. I wound up stripping all the sequencing out and focusing on making a UI for working with bit-based sequences. I then added some simple probabilistic aspects to mitigate the repetitiveness of the 8-bit phrasing, and it started to show some nice sweet spots.
Requirements
Just norns.
Documentation
UI is split into two pages: GATES and NOTES
GATES for each step are generated by combining two bytes with the chosen bitwise operator.
NOTES for each step are calculated by constructing a 4 bit value out of the current bit for each of 4 bytes (by default one for each power of 2, configurable in params).
All controls can have randomness, set with K1+E2. By default, randomness uses the āstabilityā more - for any byte, the randomness level is the likelihood that bit will flip when it is the current one. No randomness means no change, half randomness means equal likelihood it will flip or not, full randomness actually means it will ALWAYS flip (so, not really randomā¦sorryā¦). You can also choose the legacy ātriggerā probability mode in params, in which randomness is the likelihood a ā1ā bit wonāt actually trigger when current. For the operator the probability chooses between the op and its logical inverse in both modes.
Randomness can be ālockedā (disabled) globally by rotating E1 clockwise while holding K1. Unlock by rotating counter-clockwise.
ALL PAGES
k1: exit
e1: select page
[+ k1]: Lock random
e2: select control
[+ k1]: Set randomness
GATES PAGE controls
OPERATOR:
k2 [+ k1]: and [nand]
k3 [+ k1]: or [xor]
e3: l/r rotate both
[+ k1]:[oposite directions]
GATE BYTE:
k3 [+ k1]: not [reflect TODO]
e3: l/r rotate
[+ k1]: l/r shift
[+ k2]: +/- value
[+ k1 k2]: +/- upper nibble
NOTES PAGE controls
Each BIT SEQUENCE BYTE
k2 [+ k1]: not [momentary]
k3 [ + k1]: reflect [momentary]
e3: l/r rotate
[+ k1]: l/r shift
[+ k2]: +/- value
[+ k1 k2]: +/- upper nibble
Download
from maiden type ;install https://github.com/eethann/bitwise
Demos / Examples
Full demo to come, but hereās a quick video of some (recent) features:
Thanks for the kind birthday wishes! I just pushed an update to the script that cleans the code up a little, adds a few parameters, and changes the default way probability works. The default is now an ASR-like probability: the likelihood a given bit is to flip when itās encountered. The UI may be a little counterintuitive at first - it shows the ārandomnessā of any given byte (shown as a low alpha āwater levelā to use @SPIKEās term).
By default, randomness is 0, and you increase randomness to make it more likely that bits will flip in that byte as the clock ticks. At 50% you basically have total chance, greater than 50% bits tend toward flipping (100% they will always invert). At 0 the byte is in essence ālockedā.
Iāll update the docs and try to get to a first tutorial sometime in the near future (may be about a week or soā¦workā¦)
Ps. also added a div parameter to increase or decrease pulse divisions relative to the clock.
took me a few mins to understand the randomness control.
soā¦each row on each page can have a kinda āwater levelā of randomness by holding K1 and turning K2.
very cool!
i might have found a
under Parameters/Notes
if you change the base note it jumps to 0 and 127 unless you hold K3.
alsoā¦it just stops making noiz at that point.
andā¦i just discovered the main screen of the script just goes blank.
i was able to recover just by clearing the script so it wasnāt a hard crash.
here is what maiden displayed:
Summary
metro_stop(): pthread_cancel() failed; error:
specified thread does not exist
lua:
/home/we/norns/lua/core/clock.lua:65: /home/we/norns/lua/lib/musicutil.lua:565: attempt to perform arithmetic on a nil value (local ānote_numā)
stack traceback:
[C]: in function āerrorā
/home/we/norns/lua/core/clock.lua:65: in function ācore/clock.resumeā
a few requests.
can you have the Base Note display as a MIDI Note?
(as in C1 or A#2 or the like)
Thanks for the detailed feedback, @SPIKE ! Iām actually planning to work on MIDI next, so will check out that bug asap, work on adding midi note display, and midi out right away. Start/stop might take a little longer but are definitely also on my to-do list.
Follow-up:
I just pushed some updates addressing some of your items:
the crash when updating base_note should be fixed
the base note param now shows note name and octave BUT the octave appears off (note num 24 is shown as C0)
I added a really rudimentary MIDI out. It just uses device 1 on channel 1, but seems to basically work.
I also added a param for ālock current stateā that does the same thing as the enc1+k1 combo, so one can map the lock action to a MIDI controller (stopgap till weāve got full grid supportā¦)
Let me know if youāre still seeing any of those issues or those features donāt work as expected!
Update:
There was an issue with the MIDI notes used in the MIDI out implementation. I just pushed a quick fix to the branch and tested it, seems like itās working as expected now. MIDI start/stop implementation in the works.