https://monome.org/docs/norns/script-reference/#arc

has the commands. it’s very similar to the grid.

for example:

a:all(0) -- clears all
a:led(1, 15, 10) -- turns ring #1 LED #15 to level 10
a:refresh() -- update the ring display

LEDs are numbered starting at 1 due north, clockwise up to 64

segment is indeed in radians. if you define tau like i do in https://github.com/tehn/ash/blob/master/angl.lua you can just treat positions like 0-1 where ranges wrap above/below. or you could do some math and turn it into degrees, etc. let me know where you get stuck

4 Likes

This is super helpful, it was segment/radians that was throwing me. I’m going to make a break-it copy of that script and mess with the arc redraw maths as -1*2pi + .2 clearly works but in my head there’s a big jump from 0 to something; I just need to mess with it and see how you got there.
I’m curious what the metro based refresh of arc is for? We don’t do that for grid. Is it in case someone messes with the value from the param page?
It’s really a pretty small amount of code required to get arc doing it’s thing, I can see me wanting to add this to lots of the other scripts but this raises the issue of merging my hack into their core code. Is there an accepted strategy for this? I’m willing to bet that I’m not the only one making fairly trivial customisations who will want to keep up with the updates that the authors are making.
Thanks!

1 Like

The easiest way is likely through github and forking the script. Then you just have to manage pulling/merging new updates and maintaining your changes.

1 Like

super pedantic but this actually is needed with the grid on certain scripts (loom) and is probably just generally a good idea to set up

2 Likes

Super pedantic is great for stuff like this. It’s only a few line of code, I’d be happy to include it in my future hacky scripts. It’s probably trivial but I wonder what the cpu overhead is if doing polled refresh as well as triggered. You are right that in situation where grid maps to something that could change elsewhere we can’t rely on triggered writes. Mo controllers, mo problems.
On that note, has anyone got any tips on where I should rummage around to allow midi controllers that are not on channel 1. Or, possibly just confirm that it’s not something that I ought to get into. I’ve hacked one script and now have the giddy confidence to take a swing at the os, things could get messy.

Take a look at this thread for some solutions to getting midi setup a bit more friendly.

1 Like

snake_case is a great name!

Also, that’s a really useful resource, even for earlier in the learning process, to help read other people’s code and know, with a bit more detail, what’s going on.

I was wondering if there’s a way to trigger another function at the end of a loop / clip in softcut- a little like an end of cycle trigger? I guess that you can poll position… say in the situation I wanted to loop twice on a section of the buffer then shift the entire loop bracket after the end of the second iteration - what would be best?

currently you have to poll position.

but i’ve been meaning to (re-)add a simple trigger poll on loop ends. (trigger output was available in old ugen format.) no-one had asked for it yet :slight_smile:

this wouldn’t be hard to add if someone wants to take it on.

https://github.com/monome/norns/issues/871

it’s minimal. no actual serial port traffic is produced if led state hasn’t changed

3 Likes

If you happen to be like me and keep accidentally hitting cmd+[ and cmd+] in Maiden, backing out of the page and losing your changes… First you’ll try and edit the aceeditor implementation’s key bindings, then you’ll realise an easier solution is to make an “app” out of maiden using something like https://fluidapp.com . It’s Mac only unfortunately, but it’s saved me a lot of frustration. Plus it looks a lot cleaner without the browser chrome.

1 Like

How heavy of a lift would it be to use softcut to create a short, glitchy “delay” like that found on the Drolo Stammen? I plan to begin the studies in a couple of weeks and am looking for an initial project. Wondering if this would be level 1 or level 30, so to speak.

1 Like

interesting pedal. you can take a look at tunnels to get an idea. some of the modes are not far off and just a matter of tweaking a few params. feel free to just add a mode or two and send a pull request! (I actually have a few more that I just haven’t added to the repo yet - and I need to check out the new filtering)

I think it’s a good initial project. if you’re like me, most of your time will be spent discovering how the various params work together.

2 Likes

A question for the residents of Nornsville, regarding the UI module.
I’d like to get some simple playback icons, for example using:

UI.PlaybackIcon.new(64, 5, 10, 1)
UI.PlaybackIcon:redraw()

I’ve tried putting these directly into function redraw() at the end of my script and also wrapping them into a function first, but I keep getting the error:

attempt to index a nil value (global ‘UI’)

I’m sure I’m probably getting some syntax wrong here, so has anyone got an easy example of using the UI module I could see? I’d be keen to use some of the dials and sliders from there too!

Are you importing the library?

ah no, should I be?!
edit: I cant immediately find where the module would be imported from in the docs… hmm

Yes you’ll need to bring it into the scope - that’s why UI is presently nil in your script.
UI = require 'ui' is what you’re after

2 Likes

riiight ok, yes that makes sense! thank you :slightly_smiling_face:

Or maybe keep it local?
local UI = require 'ui'
:slight_smile:

1 Like

definitely a good idea

2 Likes

Thanks again for the tips, but still a bit puzzled by this…

So I’ve got:

local UI = require 'ui'

then:

local function pbicon()
  UI.PlaybackIcon.new(64, 5, 10, 1)
  UI.PlaybackIcon:redraw()
end  

but when I call:

pbicon()

I get:

stack traceback:
[C]: in function ‘s_rect’
/home/we/norns/lua/core/screen.lua:119: in function ‘core/screen.rect’
/home/we/norns/lua/lib/ui.lua:529: in method ‘redraw’
/home/we/dust/code/loopzilla/loopzilla.lua:41: in upvalue ‘pbicon’
/home/we/dust/code/loopzilla/loopzilla.lua:175: in function ‘redraw’
/home/we/dust/code/loopzilla/loopzilla.lua:81: in field ‘event’
/home/we/norns/lua/core/metro.lua:165: in function </home/we/norns/lua/core/metro.lua:162>