I tried to run sclang manually

it looks like you have two sclangs running (“unable to bind UDP socket” stuff); that will block further attempts to debug. use ~/norns/stop.sh or manually kill sclang, scsynth processes.

based on the class include path stuff, it also looks like you might need to nuke sclang_config.yaml, which i believe is in ~/.config/SuperCollider but could be misremembering (http://doc.sccode.org/Classes/LanguageConfig.html)

we are still working out the setup for SC paths in 2.0 (down to very minor concerns now.) at the moment, i would nuke that .yaml and then make symlinks to ~/dust, to ~/norns/sc/core, and to ~norns/sc/engines in ~/.local/share/SuperCollider/Extensions.

(with the understanding that these paths will change in near future)

(for now, don’t install or use norns/sc/ directly or norns/sc/norns_config.sc in particular, sorry)

[ed.] actually i think using these will be fine now. due to a quirk in SC’s language path config system, you may have to cycle sclang once before the change “takes.”

1 Like

Thanks for your reply. I tried to simply ./stop.sh and then ./start.sh but I did not see the messages I used to receive in the console when stopping the scripts manually (I mean with the 1.x version of Norns).

I totally understand that things are still changing, it’s probably better if I wait until 2.0 is released. I was trying to install the dev 2.0 only for the reasons mentioned here Norns: Development and keep on developing my script but that can wait :slight_smile:

Yeah. I had some weird issues after installing Network manager on my Norns 2.0-beta install attempt. Hence switching to 1.xx to have something more stable to test. I might do a separate sd with a 2.0 Beta to try and figure this out(I feel like I’ve become a small expert on every newbie problem there is with setting up norns on a rPi :wink: )

Still need to do some more testing on 1.xx to make sure everything works properly as well.

1 Like

fundamental point of architecture:
start.sh simply wrap stdio for matron and sclang processes in websockets so maiden can use them. if you want to see their IO on the terminal, just run the processes directly

cd ~/norns
./waf
./build/matron/matron

and maybe in another shell session,

sclang

depending on your environment you may also need export JACK_NO_AUDIO_RESERVATION=1 (before running sclang)

or, of course, use maiden and the normal launch sequence - maiden’s REPL tabs will show you sclang and matron output, including the UDP and classpath errors like the ones you just posted. ( you could i suppose roll your own websocket interface - a step i am about to write up in the scripting thread for another user - though this is not really a “first step” kind of manouver.)

you can definitely use the dev branch right now but it may take some fiddling. i appreciate seeing the issues people run into as it helps prioritize what changes to make on the dev branch. i’d like it to always be working “out of the box”, but it’s not always easy to do this esp. during the work week (tehn and i have both been travelling) and espeially not for all DIY environments. (at minimum we would probably have to add some small script to clean up the SC paths - which, yes, should be done, but isn’t top priority given that end-user updates will require something different.)

at the moment, any pull from norns:dev will likely involve some fiddling with SC classpaths, so be warned.

i do think it’s worth taking the step ASAP since 2.0 has so many improvements for stability, performance, and functionality - network manager, new kernel, new audio framework.

cleaning up device handling (the topic of contention above) is high priority for 2.1, 2.x, along with other crusty parts of matron (cairo threading, coroutines for lua functions that block.)


small, kinda pedantic point:

i see sclang, scsynth, supernova, and supercollider used above in ways that are sometimes accurate, and sometimes misleadingly interchangeable. to make it clear in case you are new to SC:

sclang - the process that runs the “supercollider language” interpreter and REPL. typically sends/receives OSC on port 57121. sclang is a multi-paradigm language which uses both compiled classes and runtime evaluation - currently on norns we only allow execution of code in classes, but this may change.

scsynth - one of the two supercollider “audio server” implementations. jack client with single-threaded audio processing. typically on port 57120. sends/receives a customized dialect of OSC - “server commands” can be strings or 32-bit integer IDs. it has a very minimal DSP graph language consisting of, effectively, opcodes and connections. we used scsynth on norns to begin with, and recently switched back to it.

supernova - a newer, alternate implementation of the supercollider audio server. API is mostly identical, but uses multiple DSP threads. we switched to supernova on norns at one point, to take advantage of parallel processing for polyphonic stuff. but ultimately we found too many stability problems that seemed related to DSP worker thread scheduling on ARM, and for 2.0 we are switching back (to scsynth) and managing core load differently (with multiple audio processes.) if you are using a different environment from monome norns (in particular, something based on x86) then it might be desirable to use supernova - the norns SC environment can support either, with minimal changes to the Crone.startBoot and Crone.finishBoot methods ([https://github.com/monome/norns/blob/dev/sc/core/Crone.sc#L67])

supercollider should normally be used to reference the combined system of sclang plus one of the server implementations.

its possible to run a SC server process by itself and do all synth management with low-level server commands, but we don’t do this on norns - you need to put in quite a bit of work to develop a client that can build synthdefs for example.

3 Likes

Luckily I still have a SD runnning the previous Norns 1.x and with all my scripts, and it’s working great, glad you could install it as well :slight_smile:

1 Like

Thanks @zebra for this detailed explanation. I will try again tomorrow.

might be slightly unrelated, but does anyone have a good macOS tool that makes an .img file of an SD card?

check out “ApplePi-Baker”…easy to use…

3 Likes

apologies, i glossed over this bit of your post.

we say this in the update instructions for 2.0 beta, but it bears emphasis: use the serial port to perform the update, not ssh. otherwise you are changing network stuff while using the network and things will get borked (hey, i’m not the linux expert, sorry.) rebooting after the update is also recommended.

2 Likes

I don’t believe we have a way to do this on RasPi without wiring up connections to the UART pins. Is that correct?

ah, right. yeah i guess that’s true. in norns we have a usb<->serial converter built in and wired up to UART pins (gpio 14/15 iirc). highly recommend doing the equivalent if you wanna use stock rpi as norns - not only for development, but because some users have already created scripts that use the serial port to talk to other devices directly from lua. (IOW: norns-as-serial-device is a supported use case for monome-norns; if you want your raspi-norns to be 100% compatible, you must also support this.)

if you use our config.txt then uart login is already enabled. if you are developing screen/audio hats then seems good to leave those pins available.

i suppose an alternative (for updates, debugging network, &c) is just to plug in a keyboard and display. sorry i haven’t caught up on how the framebuffer management is being handled atm.

on that note, i’m aware there is an open issue here for selecting framebuffer used by norns:
[ https://github.com/monome/norns/issues/749 ]

we would prefer that this be by matron argument rather than env variable. this is a simple change, but i can’t test it myself. i’d like someone here to make it and/or test a feature branch if i push one.
[in fact @okyeron i’ll just do that right now and see if it works for you]

That’s my fb issue - so I’m happy to test anything for that. :slight_smile: The env variable thing was just a shot in the dark suggestion - wanst really sure if that was the right way to go or not. Had not thought of it being a matron argument.

EDIT - I may not be able to test that until late tonight or the weekend.

But yeah - for the networking stuff I’ve had a keyboard and HDMI monitor plugged in for when it gets dropped or reset (or at the minimum the HDMI so I can see boot information)

I’ve not exposed the UART pins on my norns dac-board (hat) but I may do that in a future revision.

2 Likes

New question - Can anyone suggest a good guide for cross-compiling a RasPi image on MacOS?

(Or should I just use this: https://www.raspberrypi.org/documentation/linux/kernel/building.md – or maybe not as that’s linux specific or needs Virtualbox)

I’ve used this https://github.com/RPi-Distro/pi-gen to generate images in the past in a linux VM (running on macOS via VMware Fusion)

I remember fiddling with the scripts in various stages to strip things down but I did manage to get bootable images out without too much work.

@okyeron or anyone interested, framebuf select feature is here (provisionally):

would love to see if this works for you (no rush)

3 Likes

I exposed the I2c ports (for a future audio board even if I’m not using this Norns on RPi for audio :slight_smile: ) on mine but not the UART. The install of Norns 1.x went well with ssh, so… anyway, I don’t have a hdmi display, i can get a small one maybe, it’s only for this use. I wonder if it’s possible to display the console on the ssd 1322.

I think the cmdline.txt setting for fbcon=map:01 would get you there?

https://www.mjmwired.net/kernel/Documentation/fb/fbcon.txt#94

1 Like

Oh yes, I remember this command, it’s the one you use for testing the display in your instructions, thanks. Well, I’ll try then :slight_smile:

yes, but i think i wasn’t clear - the 2.0 update makes fundamental changes to the networking system itself, which never happened in 1.x. this is one reason i recommend the update - wifi is much more reliable and this makes all other development tasks easier.

anyways, you definitely want some way of logging into the device without networking. whatever works for your hardware. i’d go with a standard usb->serial dongle into the UART pins - but that’s just me. (i would think this would be a useful step to take even if you don’t care about being functionally compatible with monome-norns.)

btw i edited my post above - pulling dev should be OK now without manual classpath fiddling, but you may have to cycle sclang (or just reboot) to get the correct classpaths - this is a quirk in how SC stores language configs. you may also get some ignorable warnings about missing paths (like ~/norns/sc/abstractions)

1 Like

Is this the same kind of cable used to flash ansible and trilogy modules?