Polyphonic subtractive synthesizer


Moln is a script showcasing a rudimentary polyphonic synth built using the R engine.


Norns with R engine installed in the ~/dust/code/r folder
MIDI device
Grid (64/128/256) (optional)
Arc (optional)



  • ENC1 adjusts main output level.
  • ENC2 changes filter cutoff.
  • ENC3 changes filter resonance.
  • KEY2 momentary toggles fine parameter control.
  • KEY3 triggers a random note.
  • MIDI device plays notes.
  • GRID plays notes too.
  • ARC changes filter cutoff (ENC1) and filter resonance (ENC2).

More parameters are available. Details in README

Note: Moln is built from general purpose R modules making it a performance intensive script. Polyphony has been lowered from 4 to 3 voices for v1.1.0 due to performance issues/CPU-spikyness. Initiatives have been taken to optimize the linux kernel used for norns. I expect to be able to raise polyphony again in the future (Polyphony is easily changed by editing a constant in the script).


Moln v1.1.1


@jah i love your intense low-fi screen interfaces


R engine has been moved from we repo to:

I’ve updated the Moln script which now assumes R engine is installed in ~/dust/code/r folder


this is a great sounding engine!

1 Like

tried this tonight, and love it!
sounds really good, and its very playable. :slight_smile:

1 Like

Sounds awesome!
How are pitches laid out on Grid? It’s different that EarthSea and we’ll tuned to itself but I can’t figure it out.

1 Like


For 16 columns wide grids this is used:

(this is from an addition by @ppqq to the old hello gong script)

For 8 columns wide:

which is the same but padded 4 cols to right.

I’m mostly using an external MIDI device (the OP-1) to play this script, though.


I’m seeing ~ 15% CPU with a CM3+. I like the harmonics at high filter resonances.

FYI. The CPU% reported in the norns UI is an average of all cores. Scsynth runs on one core and IIRC Moln used ~40% with 3 voice polyphony. The problematic bit, though, is CPU utilization spikes that cause xruns to happen, which is why I currently keep this script at a low default polyphony. These kinds of spikes occur due to various reasons. They have have in experimental tests been mitigated by @rick_monster ie. by changing linux cpu_governor to performance and lowering the priority for USB devices. These kinds of optimizations may end up in a future norns kernel, but it was too early to include them for norns 2.0.

hey, second day norns/grid owner. tried Moln but sadly it’s quiet as a mouse. i checked and r engine seems to be installed. any pointers?


engine: an Engine_R

command entry: [ 0, new, ss ]

command entry: [ 1, delete, s ]

command entry: [ 2, connect, ss ]

command entry: [ 3, disconnect, ss ]

command entry: [ 4, set, sf ]

command entry: [ 5, bulkset, s ]

command entry: [ 6, newmacro, ss ]

command entry: [ 7, deletemacro, s ]

command entry: [ 8, macroset, sf ]

command entry: [ 9, polloutput, is ]

command entry: [ 10, pollvisual, is ]

command entry: [ 11, pollclear, i ]

command entry: [ 12, readsample, ss ]

command entry: [ 13, trace, i ]



















ERROR: module input reference "SoundOut/Left" does not conform to module input syntax ([ModuleName]*[InputName])

ERROR: module input reference "SoundOut/Right" does not conform to module input syntax ([ModuleName]*[InputName])

ERROR: module input reference "SoundOut/Left" does not conform to module input syntax ([ModuleName]*[InputName])

ERROR: module input reference "SoundOut/Right" does not conform to module input syntax ([ModuleName]*[InputName])

ERROR: module input reference "SoundOut/Left" does not conform to module input syntax ([ModuleName]*[InputName])

ERROR: module input reference "SoundOut/Right" does not conform to module input syntax ([ModuleName]*[InputName])

Maybe try updating R?

it’s up to date according to Maiden, did you see my edit with the log?

sorry, totally new to this.

I did see, but i think i misunderstood! It looks like Moln needs to be updated for new R syntax. This is likely a very easy fix, I’ll take a look at the Moln code now.

edit: @vicimity, if you look at the sc REPL in maiden, it shows that the delimiter for inputs changed from / to *. I am about to PR a fix, but if you just want to use moln now, it’s a simple change.

change the connect_modules function in moln.lua to…

local function connect_modules()
  R.engine.poly_connect("FreqGate/Frequency", "OscA*FM", POLYPHONY)
  R.engine.poly_connect("FreqGate/Frequency", "OscB*FM", POLYPHONY)
  R.engine.poly_connect("FreqGate/Gate", "Env*Gate", POLYPHONY)
  R.engine.poly_connect("LFO/Out", "OscA*PWM", POLYPHONY)
  R.engine.poly_connect("LFO/Out", "OscB*PWM", POLYPHONY)
  R.engine.poly_connect("Env/Out", "Amp*Lin", POLYPHONY)
  R.engine.poly_connect("Env/Out", "Filter*FM", POLYPHONY)
  R.engine.poly_connect("OscA/Out", "Filter*In", POLYPHONY)
  R.engine.poly_connect("OscB/Out", "Filter*In", POLYPHONY)
  R.engine.poly_connect("Filter/Out", "Amp*In", POLYPHONY)

  for voicenum=1, POLYPHONY do
    engine.connect("Amp"..voicenum.."/Out", "SoundOut*Left")
    engine.connect("Amp"..voicenum.."/Out", "SoundOut*Right")

And restart your norns :smiley:


thank you. helped me out of the comfort zone and into the learning zone.

Hi, sorry late response, did this resolve your issue?

I believe I made the / -> * fix backwards compatible so / would still work.

I’ll check it out and get back to you.
(I might’ve broken something else recently)

By the way - if this doesn’t work check out the new script collection where a moln version with a UI update resides.

I havent published this here on lines yet since there is a bug sometimes affecting the other scripts in the collection. but the moln version in there should work well.


i did the replacement in the code manually and it seems to work just fine now.


Yeah, I apparently managed to break backwards compatibility in a recent large scale refactoring. I fixed that now in a new commit.

Anyhow, you might wanna look at the new roar version of moln - it has a bit refined UI (you can reach all params in script mode by paging back and forth).

1 Like

The version of Moln availible on Maiden is giving me this error when I try to change certain parameters:

/home/we/norns/lua/core/params/control.lua:75: attempt to perform arithmetic on a nil value (field 'quantum')
stack traceback:
	/home/we/norns/lua/core/params/control.lua:75: in function 'core/params/'
	/home/we/norns/lua/core/paramset.lua:266: in function 'core/'
	/home/we/norns/lua/core/menu/params.lua:291: in function 'core/menu/params.enc'
	/home/we/norns/lua/core/menu.lua:112: in function 'core/encoders.callback'
	/home/we/norns/lua/core/encoders.lua:60: in function 'core/encoders

I then tried using the code from Roar. A-RNG a B-RNG work along with E>FIL.

Otherwise, I get the same error:

/home/we/norns/lua/core/params/control.lua:75: attempt to perform arithmetic on a nil value (field 'quantum')
stack traceback:
	/home/we/norns/lua/core/params/control.lua:75: in function 'core/params/'
	/home/we/norns/lua/core/paramset.lua:266: in function 'core/'
	/home/we/dust/code/roar/lib/common.lua:345: in field 'enc'
	/home/we/dust/code/roar/moln.lua:194: in function 'core/encoders.callback'
	/home/we/norns/lua/core/encoders.lua:60: in function 'core/encode

I’m running norns v200712.

Edit: version.

Hmm, thanks. I will check this out when I’m back near my norns (monday…)