Spirals

spirals

A circular sequencer

image

Notes of the selected scale are spread around a circle. Points are drawn by rotating a set amount from the last point while moving outwards slightly and notes are triggered depending on where they land. Patterns repeat and change over time.

If you find any interesting patterns or have ideas of how this can be expanded then let me know!

Requirements

norns
MIDI (optional)
mx.samples (optional)
grid (optional)

Documentation

E1 change current spiral
K2 play / stop current spiral
K3 toggle options
→ E2 change option
→ E3 change value
K1 + K2 toggle lock sequence to the last X number of notes
K1 + K3 toggle scale overlay

grid

spirals supports grid or midigrid to enable you to change current spiral, start/stop the current spiral and lock/unlock the current spiral.

spirals_grid

on the bottom row the left 4 pads change the current spiral, the right most pad starts or stops the current spiral and one in from the right locks and unlocks the current spiral.

the top 6 rows fill up as notes play - the bottom right most lit pad is the most recent note.

press two pads to lock the current spiral to loop between those notes.

Changelog

20210206:

  • Added options screen
  • Added ability to lock the sequence to the last X number of notes
  • Added ability to change root note with a midi input device
  • Added ability to overlay the available notes
  • When resetting the pattern, don’t reset the angle to 0, continue from the last angle

20210208:

  • Added chord mode for midi and audio output
  • Minor bug fixes and display improvements

20210210:

  • Added lfo for rotation parameter

20210217:

  • Added support for multiple spirals! Currently 4 with just the first one playing by default. Some changes to buttons to allow play/stop. There’s a good chance I broke something moving everything around so let me know if you find anything.

20210220:

  • If you have mx.samples installed it can now be used as the audio engine. Change the audio engine parameter and then select an instrument for each spiral. Make sure mx.samples is up to date before using it. If you don’t have it installed, restart after installing to ensure everything goes smoothly. Massive thanks to @infinitedigits for the library and help.

20210221:

  • Added fractional step divisions (.5, .25, .125) for notes every other beat, 4 beats or 8 beats
  • Added rests - set the number of rests and they are spread around the circle in a euclidean style
  • Fixed midi note off

20210226:

  • Added icons to show if currently spiral is playing or stopped and if it is locked

20210420:

  • Don’t enable mx.samples if there are no instruments available

20211003:

  • Added grid support

Download

59 Likes

Updated with some new features including a fancy options screen!

out

22 Likes

wow. that looks beautiful.

Reminds me of this fractal clock:
http://studio.processingtogether.com/sp/pad/iframe/ro.9PXzsGOaaeT-z/latest

1 Like

That’s great! Would it be possible to make 2 spirals? With different tempos and maybe scales too? Or - the ability to switch notes to chords? Just thinking out loud :slight_smile:

1 Like

Ok added a chord mode for midi and engine output. I’m not too sure about crow but if someone has an example or wants to send a pull request then I’ll add it.

It’s just adding the 3rd and 5th in the current scale which I think is right but my music theory knowledge is almost non-existent so let me know if I’ve done something stupid :slightly_smiling_face:.

Multiple spirals might have to wait until I have a bit more time. Just started working on something new :face_with_monocle:

1 Like

Awesome! Thank you for this, I’m running to check how it sounds

@tomw
a bit of a spin with Spirals for last night’s session…
it was controlling Buchla Easel Command.
also running OOOOOO and Cheat Codes 2.

so one of the things i did for last night’s session was to feed the Rotation feature in Spirals a MIDI S&H LFO from a MIDI PAL. seen HERE

would it be possible to add LFOs to the script?

1 Like

Sounds great! I’ve added an lfo for the rotation parameter, you select the frequency for it to run at and every time I place a new point/note its value is added to the rotation setting. There’s also an ‘lfo amount’ which restricts the range of the lfo - at 1.0 the lfo runs from -1 to 1, at 0.5 its -0.5 to 0.5 etc. I think the lfo would be better if it could run slower but having parameters to three decimal places doesn’t seem straight forward.

Let me know what you think.

The yin and yang configuration? (rotation 0.5, lfo 0.1, 0.2Hz)
output

7 Likes

Added multiple spirals :slight_smile:

3 Likes

Wuuuut :smiley: Thx can’t wait to try!

Edit: SIMPLY AWESOME :nerd_face:

Easy to build chord progressions!

hiya, not sure if others have the same problem but I can’t seem to select above ‘midi in device’ in the options page for this. The encoder gets stuck? So can’t change midi out channel or midi out device. Have tried reinstalling the script but persists. Am on the latest update. thanks!

had a quick look and i think its a problem with having mx.samples installed but no instruments downloaded. Can you try downloading an instrument or uninstalling mx.samples? I’ll have a look at cleaning that up later.

If that isn’t the case can you grab the matron output from maiden (connect to the norns in a browser)

ah yes, thanks - uninstalling mx.samples changed the structure of the menu so all accessible now!

Hello! So I think this may be an issue with Mx. Samples. But I’m not entirely sure. When I try and load Spirals I get this error

Code
### SCRIPT ERROR: init
/home/we/dust/code/mx.samples/lib/mx.samples.lua:180: attempt to call a nil value (field 'mxsamples_delay_feedback')
stack traceback:
	/home/we/norns/lua/core/norns.lua:145: in field 'mxsamples_delay_feedback'
	/home/we/dust/code/mx.samples/lib/mx.samples.lua:180: in field 'action'
	/home/we/norns/lua/core/params/control.lua:105: in function 'core/params/control.bang'
	/home/we/norns/lua/core/paramset.lua:448: in function 'core/paramset.bang'
	/home/we/norns/lua/core/paramset.lua:441: in function 'core/paramset.default'
	/home/we/dust/code/spirals/spirals.lua:116: in global 'init'
	/home/we/norns/lua/core/script.lua:109: in function 'core/script.init'
	[C]: in function 'xpcall'
	/home/we/norns/lua/core/norns.lua:146: in field 'try'
	/home/we/norns/lua/core/engine.lua:91: in function </home/we/norns/lua/core/engine.lua:89>
lua: 
/home/we/norns/lua/core/clock.lua:65: /home/we/dust/code/spirals/lib/spiral.lua:270: attempt to compare number with nil
stack traceback:
	[C]: in function 'error'
	/home/we/norns/lua/core/clock.lua:65: in function 'core/clock.resume'

Any ideas what edits I should make to the Mx.Samples or Spirals scripts?

I’m away from my norns this week but if you’ve updated mx.samples and haven’t restarted since then that might be it. Looks like a mismatch between the library and the loaded supercollider engine.

Have you tried turning it off and on again? :wink:

If that doesn’t help let me know and I’ll check it out at the weekend. Don’t think I’ve updated mx.samples in forever.

Same thing for me, I’ve restarted etc. Spirals is on commit fbfb6f2 Don't enable mx.samples if no instruments and Mx.Samples on 9e5a56c bump.

@PedalsandChill, @xmacex looks like there was an mx.samples change which is causing problems with being able to switch between engines in spirals. I’ve made a change so there are 2 scripts in spirals now - a standard one and an mx.samples one. You should get that if you update in maiden.

Let me know if you still have any problems.

3 Likes

sorry about that! I found the problem - mx.samples was getting parameter banged and asking for a nonexistent engine function. I just pushed a fix for it which works still with spirals commit fbfb6f.

Oh perfect, thank you. I’ve ditched my change.

Switching to mx.samples also seems much more snappy then when I last tried (a few months ago) but I might be imagining that.