Norns: help

norns

#694

overhauling the tape UI now! everyone will be happy I think


#695

norns’s documentation says “Use the cable and power supply provided.” (for charging norns’s internal battery).

Is it safe to use any other non-broken USB cable for charging, or does it have to fulfill certain criteria (if yes, which)?


#696

Is there information on using HID with norns? I did a supercollider tutorial where you controlled x and y values with a mouse and was wondering if it’s similar. Also found this, but Brian mentioned a norns HID class, so I’m not sure if it’ll work: http://doc.sccode.org/Guides/Working_with_HID.html


#697

Once MIDI controllers are set up while using a script, are they persisted? Don’t have any knob controllers to try with yet.

EDIT: Nevermind - I see in one of the videos that assigning a CC value presents a save/load menu.


#698

low-quality or extra-long USB cables may suffer from voltage drop if the wire gauge is very low. generally this isn’t a problem, but with very high current draw the cable could heat up a bit. the cables we ship are very high quality.

i regularly use other cables without issues, however. but it’s important i disclose this possible issue.

@Jonny there is a lua HID class that hasn’t been updated to the new device discovery system. we’re working on it.


#699

Thanks! I’d like to buy a shorter cable than the one supplied with norns. Is there any specific “key word” or manufacturer I should look for when browsing online stores to make sure I get a suitable cable?


#700

Hi,

i have a first generation 128 (external ps, walnut enclosure)
I’m assuming this will work with norns, but wanted to double check before ordering.

thank you.
-c


#701

this took me a long time to get around to but the wifi nub still doesn’t work. when I try to serial in I just get a cursor and can’t type anything. any ideas?


#702

Hi All - norns arrived a couple of days ago - and so the journey begins, and having much fun with it - working my way through the studies - as not a coder. A quick question if I may, re the behaviour of the key - specifically key 3 but I assume they are the same. I extended the study 1 exercise to randomly set a new frequency on each key 3 press but I noted I’m getting 2 sounds - 1 for the down press (and if I hold it - the frequency selected stays the same) and 1 for when I let go - the up press if you like. Getting the frequency to print out, and that confirmed the ‘2’ sounds - so is this what we would expect? - just checking.


#703

Sounds like it’s working as expected. If you only want it to change on a “down press”, it’s an simple change/fix.
To filter out the release of a key, you can check for the state in your keys function.

function key(n, z)
  if n == 3 and z == 1 then
    do some stuff here
  end
end

z is the keys state, and will be either 1 for pressed or 0 for not pressed.


#704

Excellent - thanks for tip!


#705

I’m trying to implement ratcheting for Kria Ack script, is there any simple solution for delaying note? using os.sleep seems to pause execution of rest of the script


#706

use a metro. see study 3

basically set a time to elapse, and a callback function to do whatever action you need.

generally norns scripting needs to be considered in terms of functions. anything time-based has to be associated with a metronome waiting and then calling the function.

somewhat like DEL in teletype. it just queues an an action (function) for future execution.

here’s a quick example:

m = metro.alloc()
m.time = 1
m.count = 1
m.callback = function() print("hello from the future") end
m:start()

(we have a PR on the way to condense the syntax for all of this)

you can re-use m also. reassign the time, call start again, change the callback function. it’s all fine.

so

m.callback = function() print("do something else")
m:start()

#707

Is there a (built-in) way to return the current number of iterations of a counter?


#708

yes, 1-based stage number is an optional argument to the metro callback.


#709

Oh! Is that what stage means? (I’ll try this when I get home)


#710

i just had great luck rsyncing! lovely stuff.


#711

circling back on this today… Am I misunderstanding? - Should the stage value increment for each callback?

with the following it just prints 1*

function init()
  counter = metro.alloc()
  counter.callback = count
  counter.time = 1/2 -- interval
  counter.count = -1 -- run how long
  counter:start()
end
function count()
  print(counter.stage)
end

*Actually, this is acting strangely. First time I ran it, stage was nil, then I assigned it to a value from start() and now it seems to be a persistent global at whatever the last value was. i.e. stage does not default to 1 (?)


#712
local k
  
function init() 
   k = metro.alloc()  
   k.callback = tst
   k:start(1)
end

function tst(stage)
   print("Hello " .. stage)
end

#713

Oooh thanks. You gotta pass stage to the callback, eh? Doh.