yeah, im not getting any xruns on awake

ok thats a lot bigger buffer than im using, the norns is using -p256 , and thats really my target… I want it low latency.

good idea…
what do you plan to use for the UI though?
I think for a backup solution, Id be tempted with a 7-10" touchscreen, with virtual buttons/encoders.
its not ideal, but for a backup, you could ‘struggle thru’ with it, and its small enough to put in a backpack, that it wont be a hassle to take a long ‘just in case’. (you just need to remember to keep the two things sync’d :slight_smile: )

Ive not seen the Norns , but its small form factor is very appealing… so you’d want/need (?) your backup similarly sized?!

what about a lemur app with the OSC

so new kernel = much better

for some reason I still need to set the governor manually (well in .bashrc or similar) even the performance is default.
but now Im generally able to use -p 256 , not as good as norns which appears to be -p 128

I can get that to xrun if I really push it, but i think for normal use its probably ok.

but seems still room for improvement, 69% cpu
what I don’t like the look of, is that almost all of the cpu load is on one core… 64 … other are at 6,4,5.
now given matron is on 26% cpu, the question is… why is it on the same core as scsynth!

interestingly, let it run for bit, and xruns disappear, - why because i can see some of the load move to another core
hmm, time to look at processor affinity i think :wink:

1 Like

I won’t know until it arrives how much I’m relying on that. I’d like to avoid fiddling with menus, and typically like to script one extra midi controller as a simple preset selector to avoid that. But, I don’t want to dogmatically insist that that’s what will happen this time, without at least experiencing norns with the ui as designed.

Same answer, really. I’d certainly expect the backup unit to be less elegant, but how much the form factor matters will depend a lot on how I’m interacting with the hardware to begin with.

(I do have Push 2, though, and if your interface work on that ends up transferable to the original hardware, I could see using that for both configurations, as this approach would support muscle memory better than any touchscreen.)

It’s all very speculative at this point. But I’m excited for the possibilities.

Real quick re: load balancing, thats not what I’ve noticed on norns. With similar usage of scsynth and matron, I get even and dynamic load on multiple cores.

Will attach some real numbers later.

I’m not one of the kernel gurus but don’t think we’re doing anything special w/r/t affinity

1 Like

Hey @ngwese

Just wanted to let you know that I managed to build maiden on my Pi3 last night. I fumbled my way through it, and now it seems to work fine!

1 Like

hmm… interesting… im definitely seeing one core taking the majority of processing with an scsynth
are you seeing multiple scsynth (threads) therefore distributed over multiple cores?

perhaps my test is unfair?
Im using FLIN, and basically just play the first 8 notes at there fastest repo, (at 90bpm, and default settings)

i tried process affinity and it didnt appear to help.

what has helped, is I hadn’t realised the monome grid is setting the states, then calling refresh…
(Id assume that set state was suppose to light the grid immediately, should have checked the code :wink: )
so i was creating a lot of extra midi messages, so usb io… with that fixed, Im now pretty much crackle free at -p256

Ive still got a lot of services running, and i could drop the screen refresh down (currently ive got it at 30fps) , but im not sure they are going to make much difference,.

Im very interested how your getting even load though,
is there perhaps something in scsynth ive got wrong? (using 3.9.3) …
if i look at threads view, then I can see 3 threads, but the bulk of the work (so the 67%) is being done in one… is this normal?

im guessing the xruns are either coming from:

  • io causing interrupts
  • a single thread (so on one core) thats just too heavy

(I can see that scsynth is being given the correct -ve priority so that seems ok)

…if you have details on which versions of the toolchain you used (npm, node, …etc.) i can add that info to the README.

sorry, maybe i was misleading

what i mean by “even” is, matron’s various threads, and scynth’s various threads are correctly assigned to different cores when appropriate (like when total usage cracks 60% or so.)

the single heavy thread is scsynth’s audio callback. audio processing is not multithreaded. (in supernova it is, but supernova doesn’t work on ARM yet.)

to demonstrate, i made flin.lua much heavier by making 10000 calls to math.pow() on each update, and otherwise same situation as you describe (full count of running voices.)
top output looks like this

i don’t get any xruns or other artifacts. i do get xruns / artifacts when scsynth main thread uses more than ~60%, which is a bummer, and would be great to improve this threshold somehow (larger buffer size doesn’t help as much as i’d expect.)

we actually had more problems with IO interrupts using realtime kernel, so dropped it.

(i’m not sure why it looks like scsynth’s audio thread takes up more cpu than any one core. but i assume it is an artifact or subtlety of top’s reporting / update cycle, not reality.)

its also possible to create dense enough OSC -> synth traffic that scsynth’s network thread becomes significant.

so yeah, it would be great if scsynth’s audio proc could be spread out, but for the near future it can’t.

1 Like

thank you very much for this…

ok, from this, Im pretty much seeing the same as you then.
basically, im getting xruns when the main scsynth thread hits a bit over 60%.
(id hoped sc was properly threaded, as this is a painful issue on pd too on these platforms)

my matron threads look about the same, which is good considering this is where my new code is.

I think the only thing I can see is your scsynth is consuming less cpu, so either my supercollider build is not optimised, or im just running different/heavier tests than you.

did you just follow the normal SC build steps for 3.9, or did you add any extra flags?
(did you apply the timer fix… I forgot too :wink: )

anyway, thank you, this has definitely narrowed it down to SC, rather than ‘linux optimisation’.

on the positive side, whilst Im talking about improvements… really the system is performing very well, its smooth and at ‘normal usage’ , no xruns - oh I got maiden running yesterday.
when ive been playing with it (rather than coding :wink: ) , its proving to be a really fun platform.

one question (which apologies im sure you have already answered somewhere)
is there a way to create new synthdefs on the fly? im guessing not from maiden?
but i assume i can thru a remote sc lang.
but then can i interact with these thru lua? create an engine? add new parameters?

there is a post related to converting existing synthdefs reltively rapidly by zebra i think it’s in norns help or dev its not exactly but it’s nice to know we are all getting to the lets make sounds part :slight_smile:

this may get you started

+1 to that :slight_smile:

yeah, the lua side of using SC im familiar with (been playing with that after the first study)

what im quite interested in, is extending the SC side, so new SynthDefs, and i guess in Norns lingo Engines.

but im also interested, can be create these ‘on the fly’…
or what techniques can we explore in this area e.g. pattern defs
(and how is this support or not, by norns… or do we just use the convention sc gui?)

my main draw of SC is its dynamic nature, and I want to explore that, as well as the ‘UI’ interfacing elements of Lua.
(also im sure we at some point need to thing about whats more performant to do on the sc server rather than lua/sclang)

1 Like

Hey it just dawned on me that the pisound has two knobs and one button already so with some creative coding I am relatively sure with a few switches and routes I can solve the dev events stuff

I want to do something similar because I want to load sctweets randomly with lua/buttons and encoder calls so it would require a similar vibe

1 Like

button yes , you can get to via gpio, or simply put script together that sends osc

knobs, are hardware gain… so they are not seen by the OS, so you can’t change their function. not a bad thing, input gain and output gain are very handy almost always

1 Like

I’ve been tracking this thread and reading everything for a few days now, thanks for everything you’ve done !
I haven’t tried to install the Norns ecosystem on a RPI yet but I want to give it a try.
I have an old Monome 256 walnut, and also a Push 2, so I guess one of these options should work.

For the soundcard, I was planning to use an Expert Sleepers ES-8, do you think it would be possible to use an USB soundcard like that ? I use it with another RPi and PureData, but is it quite easy to « connect » the Norns environment and an external soundcard ?
The other option, or additional option I have is a Terminal Tedium Eurorack module, this one has three push buttons and 6 potentiometers, I wonder if Norns could live on this module, at the moment there’s a RPi3b in my build…

2 Likes

Might wanna give this a try this weekend. I’m thinking of using a 2.4" SPI oled, launchpad mini, rme fireface ucx (in class compliant mode) and some ec11 encoders + simple buttons on a breadboard. I’m not great with linux, but okay with Lua :slight_smile:

2 Likes

true. i was hopeful on the input/output knobs – i wonder if i can get a mini arduino but i think piSound uses all the pin, So …

Ive done a full clean build - based on norns-image dev setup

and taken complete notes as I did it.

Note: I don’t take any credit for this, as the write-ups by @tehn & co are great, and cover 99% of it.
but there are a few things i changed on they way, and a few things to note, as we are not putting on norns hardware

UPDATE: I updated the instructions to point out that most can probably just use the stock kernel, Ive tested and it was fine… so Id only build your own kernel if you need to for a specific reason, and you can do it quickly (eg. by cross compiling.

limitations:

  • I’m not repeating things (like how to build a kernel, and steps already in the norns documentation),
  • its not specific , so you need to know a few things like how to specify your sound card in jackd
  • ive not built the norns docs, so that not included

a request, if someone uses this, then please also take notes of any errors, and perhaps format the doc as you go along - so we can each improve it a little :slight_smile:

(@tehn not sure if there is a better place to put it, Ive tried not to rehash whats in the other docs too much, rather refer, exception was where things were perhaps not entirely clear to me … you are of course free to do anything you wish with it)

anyway good news is, seems to be working perfectly with my push2.


some important things, that tripped me over,
and perhaps my be useful comments for norns devs (or not )

  • setup.sh - config/interfaces will overwrite you wifi setup , and hardcode to a static ip address…
    I guess this is the norm for norns, as you can then use the screen to setup wifi (?) , but when you’ve no screen then thats going to be tricky, so id advise against overwriting
    (it caught me out, as i was missing a file required for push2 to launch properly :wink: )

  • rasps-config - localisations = all - dont do it :wink: it takes ages, and you only really need your location…
    obviously norns hardware is international so needs the all , jic

  • norns-image/config/norns-maiden.service
    this refers to maiden.arm, as presumably its being cross compiled, so you need to change this.

  • i2cset I comment these out as they are norns hardware specific and might conflict with your hardware (but probably will be ok)

final note… this is not identical to the norns hardware release
this builds a dev image, which means its the latest (so unsupported?!) code, rather than released code,
the kernel is different/newer (4.14), and we may have different options.
so you cannot compare directly…

ive not tested things like usbsync

sleep , really does just sleep :slight_smile: - it does not do the shutdown I expected.

I think for my personal needs, Im going to add a shutdown and probably restart option, hopefully this can just be a simple lua app, so I dont have to hack matron more than necessary.

anyway I hope this is all helpful to someone…
thanks to the norns team for all the effort,
as i type this i listening to “why?”, to which the answer is “because I can!”

enjoy
Mark

EDIT:
@tehn Ive noticed the wifi.lua and scripts dont appear to be working properly…
is this something worth investigating or a red-herring?
(I dont need it as I can just edit /etc/network/interfaces and all works)
first error is Failed to connect to non-global ctrl_ifname (nil) error: No such file or directory
so looks like ctrl_interface file?
(this is by running ~/norns/wifi.sh scan)
hotspot doesn’t appear to work from the UI, but does appear to work from wifi.sh hotspot

anyway, perhaps this is a red herring so wont waste your time, unless its an issue you hearing about elsewhere

16 Likes