this is a confusing example (because it’s an array of polls) but: https://github.com/monome/dust/blob/master/scripts/tehn/mlr.lua#L328

i’ll explain polls in week 5’s study

1 Like

I saw local TRACKS = 4 up at the top of the code and had a brief moment of excitement about more MLR tracks … is the CPU powerful enough to handle this?

we’re working on it, and changing the TRACKS var will not auto-magically increase the number… there’s more plumbing beyond that

2 Likes

Hey, it’s fathers day: if I can be a father, anything is possible.

4 Likes

Thanks for directing me to that snippet. It helped and I have my poll working now. Thank You! Looking forward to the next few norns studies.

@markeats did you manage to make any progress on this? I was considering adding the same, but so far only wanted to add a midi_to_hz function.

Yep, been apart from norns for a few days but should get that integrated this week. Nearly-done version is on the musicutil branch of my fork if you’re curious in the meantime.

2 Likes

So let’s say i’m starting a new script.

Is there a way to list available engines?

typing report_engines() on the command line will show you a list.
more useful info: https://github.com/monome/norns/blob/master/readme-script.md

3 Likes

Ok cool. Thanks for that link. But where is this function listed in the docs? I suppose I should actually read the README files, eh :slight_smile:

FWIW - i thought I looked thru all the docs http://norns.local/doc, but didn’t find it.

Also FWIW - I can’t find a bunch of the functions on the page you linked in the documentation.

1 Like

right. that doc is a bit out of date. i opened an issue on GH; feel free to pile observations on there.

What’s the best way of sending midi note on and note off messages when using metro? I’m trying to adapt the 16sliders sequencer to send note on an note off messages but if I put both messages in the callback the sound is too short. Is there any way to specify functions which happen at the beginning of the metro callback and at the end? I’m probably missing something simple here.

Is there a way to save the contents of a table (array) to a file to be recalled later? I know it’s implemented in the parameter section, but I have a sequence that I’d like to save for recall later. How can I write the contents to file?

These?

  Log.post (txt)    post message to log, timestamped 
  Log.get (index)    get log message at index, with timestamp (seconds old)

Although it’s unclear if you can “get” an index

@carltesta, Ive not looked at this explicitly , but just some thoughts

so you want to view the metro as something that gives you a ‘timeline’,of an interval you specified when you created it (e.g. 100ms , 1s , whatever) , so this gives you a ‘resolution’
so basically you should independently count(*) to decide when to send the note off
(for a simple case that might be as easy as 1, but for a complex sequencer you might track individual notes on/off)

(*) count in a sequencer = position in the sequence.

Im not sure if parameters are going to cover ‘complex types’ , like a table which is a set of values.
but no worries, Lua has complete file io that you can use see here
note: file io is not to be done in a high priority thread, but i guess for matron this is a non-issue since SC is doing all the DSP, but still be careful of writing large files.

1 Like

i’m going to cover file saving (for non-parameter, likely table types) in a later study. in the meantime check out any basic lua file io (as @TheTechnobear suggests)

in general googling anything related to lua will work on norns!

4 Likes

Not sure if this is a bug (for the dev thread) or what.

From Maiden - I created a new script and forgot to add “.lua” at the end. From there I could not run script or do anything else - including rename the file

So i then needed to jump over to my FTP app (Transmit) and rename the file.

I can’t seem to find a way to consistently create a spacing of a single pixel when editing the screen. I’m working on a base-4 number system along the lines of the image I’ve attached but something like this leads to an issue I’ve been trying to solve for hours:

for n=1,4 do
screen.line_rel(0,-1)
screen.move_rel(2,0)

This results in single pixels with a gap of two pixels, but changing screen.mov to (1,0) results in a solid line.

Any help would be appreciated!

@tyler we’ve done a big set of fixes with screen drawing which will be included in this friday’s update. if you want to get a head start, connect to norns via screen/ssh and cd norns; git pull while connected to a network with internet.

2 Likes

@tehn the git pull was successful, but I can’t seem to find a list of changes. Since I assume the changelog will be included in Friday’s update, can you share what changes were made with screen drawing?

(or point me the right direction if I’m missing a log in the git pull somewhere…)