Norns: studies

absolutely there will be. for now, Engine_TestSine.sc is the highly minimal example used in this first lua study.

8 Likes

Is it wednesday yet? Wednesdays are the new fridays.

3 Likes

https://monome.org/docs/norns/study-2/

15 Likes

Neat. BTW, typo: ā€œappreciate the refence docsā€. Are the docs also online, or should I go to github?

thanks for the catch, fixed. do feel free to PR any changes via github if you want

1 Like

I will figure out how to github at some point :slight_smile:

There is another typo.

ā€œscreen.move(0,40) moves the current position to (x,y) = (0,40) in pixels. the top right of the screen is (0,0). as you move right x is increasing, and as you move down y is increasing.ā€

Prolly meant Top Left.

Edit: these studies are amazing, and thank you!!!

2 Likes

fixed! thank you @ppqq for the PR

2 Likes

Perhaps another typo:
ā€œfor example, we may want to different modes or pages, such as:ā€
Shouldn’t this be:
ā€œfor example, we may want to have different modes or pages, such as:ā€
?

Also, as I am not yet familiar with guthub, nor do I have yet a norns:
is there a way to read the he reference docs that live on norns under http://norns.local/doc?

Welcome to github :wink: https://github.com/monome/norns/tree/master/doc

granted they’re in HTML and not rendered…

@tehn tried to jump on that typo from @wolfgangschaltung and got some permission errors from git. Just a heads up

ERROR: Permission to monome/docs.git denied to atomboyd.

Thanks, but as I wrote, I am not familiar at all with github. Which document you pointed to is the reference doc and how do I open it?

1 Like

You could download the zip file folder from Git:



And then open them locally from the unzipped folder in your web browser:



Anything with a .html file ending should auto load in whatever default browser you use.

6 Likes

Got it, thank you very much!

2 Likes

Not sure whether the following should be asked here, or in Norns: help or in Norns: dust, but as I encountered it in both studies (and as I do not yet have a norns):
The engines used in the studies (TestSine and PolyPerc) seem to require their pitches be defined in Hertz values only.

On the danger of coming across as lazy (or showing that I have missed something), I have to admit I assumed that all norns engines also offer a way to define their pitches in note values (be it as e.g. C3 or as e.g. 60). I guess I can write a Lua function that converts e.g. integer numbers into Hz values, but it strikes me as odd having to do that in a musical instrument.

P.S.
Study 2 starts by saying that engine PolySub will be used, but the example actually uses PolyPerc. Is this intentional?

Typo in study 2:
ā€œtables are created with curly brackets. above, nothing is am empty table, drumzzz is a table with 8 elements.ā€
ā€œā€¦an empty tableā€¦ā€

Hmmm… seems like it’s a couple wednesdays away from grids. midi. sync. OSC, HID.

I’d like to figure out how to get OSC messages doing something.

I’ve got a TouchOSC template I’m working on to emulate a grid. Maiden shows me OSC messages recieved, but beyond that I’m not sure what I need to do to tell the script to do something with the OSC message. Ideally I’d like the script to believe it’s just getting messages from a grid.

Any quick pointers?

we’re working on a set of musical helper functions— so yes you won’t need to do it by hand.

by in the meantime, here’s a midi to hz function:

function midi_to_hz(note)
  return (440 / 32) * (2 ^ ((note - 9) / 12))
end

throw this in your script, then use:

engine.hz(midi_to_hz(60))

to play middle c

ps. functions are covered next week

8 Likes

Here is some code I worked out the other day. Change the IP address and port as needed.

-- turning a knob moves a 
-- number randomly around 
-- the screen
-- and sends OSC

require 'osc'

engine.name = 'TestSine'

local value="turn a knob"
local speed=0

function init()
  engine.amp(0.2)
end

-- screen redraw function
function redraw()
  -- clear screen
  screen.clear()
  screen.move(math.random(0,120),math.random(0,50))
  screen.text(value)
  screen.update()
end

function enc(n,delta)
  value = n
  osc.send({'192.168.1.10',6000},'/goto/prev/',{n})
  engine.amp(0.2)
  engine.hz(n*delta*400)
  redraw()
end

function key(n,z)
  value = n 
  osc.send({'192.168.1.10',6000},'/goto/next/',{n})
  engine.hz(n*20)
  engine.amp(0.5)
  redraw()
end
1 Like

And whoops I see now you were more interested in doing something with received OSC messages. Check out the OSC docs for osc.event(from, path, args) See: http://norns.local/doc/modules/osc.html

Yup - i’ve been banging my head against those docs for awhile and trying to make sense of it.

Still trying to wrap my head around lua

1 Like