nah, sorry. we’re using Pitch.kr supercollider UGen, which does autocorrelation stuff internally, and at no point exposes the magnitude spectrum directly. (i think if you peek at the FFT buffer used by Pitch.kr it will be the weighted autocorrelation of the power-spectral-density… or something.)
[random edit, 2 years later: my supposition was totally wrong, the algo does indeed appear to be AMDF or something, but is computed entirely in time domain.)

some day i would like to add a phase-vocoder component to crone that is analogous to the softcut component.

(i won’t have time to do anything like that until after this summer at least.)

for purposes of spectrum visualization on a small screen it would likely make more sense to use a coarser FFT anyway (compared to what is needed for good pitch tracking,) or (even better) a polyphase analysis filterbank.

a 128-point FFT with mag spectrum could be added to SC pretty easily… but our poll system is farily primitive so getting those values into lua is also not trivial.[*]

another (medium-term) task on my plate is replacing crone <-> matron IPC with shared memory or something else, more efficient than UDP for things like this, or for buffer waveform thumbnails… with supercollider we are limited to OSC transport and working with arrays there is a bit cumbersome and not super efficient.

[*] that said, there is actually a “waveform” poll type which currently isn’t being used for anything. it’s designed for 128-byte arrays since that matches the norns screen size… so, go for it if you want!

4 Likes

For what it is worth there is a strong desire to expose basic project management within maiden such that folks don’t immediately have to jump into the deep end with ssh and git directly…

As others have already hinted in various threads work is underway to bring functionality much like @its_your_bedtime library script directly into maiden.

UPDATE: It is also worth noting that if one can successfully use http://norns.local to connect to maiden then ssh we@norns.local should also work (instead of typing in the IP address directly)

5 Likes

@zebra no problem, I’ll be keeping an eye out for progress on this, maybe even contribute to this feature. Updated the polling scheme, it’s a lot faster now too.

@ngwese Oh! thanks I will update with norns.local, lots cleaner. If maiden gets the ability to push/pull repositories I will update that step.

Added a tutorial for midi receive and send, although I never managed to get midi send to work properly, could anyone give me a hand with the example 7, the m.note_on method does not seem to be working for me?

Sending needs a colon instead of a dot

midi_signal:note_on(60,127)

1 Like

this is amazing

i’ll give some feedback when i have time to review and test properly

1 Like

for ppl really familiar with object oriented programming the colons thing in lua makes tons of sense, but I could see how that could get totally confusing for beginners. I wonder if this could/should be more standardised for the core library stuff. maybe that’s been brought up already.

Great stuff taking this on!

Just one small thing I noticed – I believe norns redraw is limited to 15fps (it definitely was in v1, haven’t tested in v2).

you sir, legend!!!

A post was merged into an existing topic: Norns: scripting

this is beautiful, thank you!

Oh, I’ll fix that. But I would love to see a definite answer, perhaps in a documentation somewhere?

Updated with an example of OSC receiver.

OSC

In Maiden, look at the eight example file of this tutorial.

  • Navigate to the eight example with code > tutorial > 8_osc.lua.
  • Send it to the device by clicking on the play button to the top right of the Maiden window.
  • Send osc to the device by addressing norns.local at port 10111.
  • Look at the incoming data.

To recieve the osc signal, you need to connect to the osc interface with osc.event = on_osc_event, and give it a method to get the event, like on_osc_event(path, args, from), the from parameter is an array including the ip and port.

5 Likes

could you do one on midi clock in/out? :wink: and thank you so much for taking the time to do this! :raised_hands:

I’ve just looked at the implementation, I think I can make a simple implementation for the tutorial, but it’s a bit more involved than the rest of the midi example. I’m thinking about making it its own example file. Stay tuned :slight_smile:

edit: @sno Nevermind, that was easier than I thought, I will add it to the current tutorial shortly!

5 Likes

Added a grid example(video)!

Grid

In Maiden, look at the ninth example file of this tutorial.

  • Connect a Monome grid device, and select it in SYSTEM > GRID.
  • Navigate to the ninth example with code > tutorial > 9_grid.lua.
  • Send it to the device by clicking on the play button to the top right of the Maiden window.
  • Touch a button on the grid and watch it light up on the Norns.
  • Move the light across the monome by turning the knobs on the Norns.
  • Change the brightness by pressing the buttons on the Norns.

To communicate with the grid, you need to connect to the grid with g = grid.connect(), and give it a method to get the key event, like g.key = on_grid_key. The led(x,y,brightness) method allows you to toggle LEDs.

g:all(0)
g:led(1,2,15)
g:refresh()
9 Likes

thanks for this, i’m very interested in Norns, this will get me thinking more clearly.
Cheers

amazing work, thank you so much! :pray:

@sno Fwiw I have a simple midi clock example using 2.0 syntax here

But many of the older scripts (from Norns 1.x) use the beatclock library which handles clock a bit more abstractly.

2 Likes

thanks for sharing @okyeron! I’m very new to this kind of language so the tutorials help a lot :slight_smile:

1 Like

shouldn’t this be 1.0 / 15

for 15 fps? (since metro time is in seconds, as an interval?)