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).
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.
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")
end
end
By the way - if this doesn’t work check out the new https://github.com/antonhornquist/roar 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.
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).
The version of Moln availible on Maiden is giving me this error when I try to change certain parameters:
lua:
/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/control.delta'
/home/we/norns/lua/core/paramset.lua:266: in function 'core/paramset.delta'
/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/control.delta'
/home/we/norns/lua/core/paramset.lua:266: in function 'core/paramset.delta'
/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