hihi! hope all’s well otherwise! and thank you so much again for your kind words.

are you running the latest norns update 221204 if you hit K2 on the SYSTEM / SELECT / SLEEP screen? there was an issue last year in the norns stack which was resolved that sounds similar.

1 Like

Hi Dan,

Did this update get released? Perhaps I missed it?

Thanks!

1 Like

It looks like the Norns I just received back from factory is running 221214. I made it through the live set (miracle), but it sounds like it has returned and I need to do some updating. When I run the “update” on Norns, it says it is up to date. Any thoughts?

@Localprestige oh! that’s the current release. the bug i mentioned was fixed in 2022 and there’d be a lot of reports if it’d returned.
do you have any steps to reproduce the issue? happy to dig into any reliably wonky zones!

@bharris22 , nothing yet! things have continued to pile up but progress is public. you can load a file directly into cranes via maiden, though.

to load a file into buffer 1 or buffer 2:

softcut.buffer_read_mono(path, start_src, start_dst, dur, ch_src, buffer)
-- path -- replace with the filename, eg. "/home/we/dust/audio/spells.wav"
-- start_src — start of file to read (seconds)
-- start_dst — start of buffer to write into (seconds)
-- dur — how much to read/write (seconds, use -1 for entire file)
-- ch_src — which channel in file to read
-- buffer — which buffer to write into (voice 1 uses '1', 2 uses '2')

bonus: adjust voice x’s end point to match the length of the file:

_ch,_len,_sr = audio.file_info(file)
file_length = _len/_sr
track[x].end_point = file_length

also happy to chat about cheat codes strategies to get where ya wanna go, just lmk!

4 Likes

Thank you very much for the information, Dan!

1 Like

i love cranes!!! thank you so much!

in the spirit of not-being-afraid-to-ask-the-dumb-questions: how can i map the record enable toggle (k2) to a midi controller? and similarly with the ‘clear all buffers’ action. i don’t see an option for it in the mapping options. or am i just missing it??

since i mostly play instruments that need two hands, being able to assign a pedal makes a huge difference.

thank you so much!!

4 Likes

hihi! hope all’s well :slight_smile:
thought this might be a good way to share steps for modifying the script at home!

finding the functions

since the record enable + clear all buffers actions are both tied to keypresses, start by finding where keypresses are defined by searching function key in the script. the key function is standard for all norns scripts – it’s how the system layer reports to the script that a keypress/release has occurred.

key 2 (record)

reading through, here’s key 2’s action:

-- KEY 2
  if n == 2 and z == 1 then
    record()
  end

rad! this means that record() is the function which handles all the recording.

clear all buffers (hold K3 then hold K1)

reading through, here’s the key combo which clears all the buffers:

  -- KEY 1
  -- hold key 1 + key 3 to clear the buffers
  if n == 1 and z == 1 and KEY3_hold == true then
    clear_all()
    KEY1_hold = false

    -- Proposed fix to allow clear and re-record 
    softcut.buffer_clear()
    for i = 1, TRACKS do
      softcut.loop_start(i, 0)
      softcut.position(i, 0)
    end
    softcut.event_phase(phase)

note: if i was writing this script now, i’d put all that stuff inside of the clear_all() function – i learned a lot in 4 years! but we’ll work with this :slight_smile:

make these parameters!

since norns offers MIDI mapping through the stock parameters system, let’s build some parameters to trigger these functions. i think the trigger style binary parameter will probably be best.

if we search for params:add in the script, we can see where parameters are built.
let’s put our two new parameters at the top of our script’s parameters:

-- format: params:add_binary('scripting_id', 'display name', 'behavior')
params:add_binary('rec_flag', 'rec', 'trigger')
params:set_action('rec_flag', function() record() end)

params:add_binary('clear_all', 'clear buffers', 'trigger')
params:set_action('clear_all',
  function()
    -- this is just copied/pasted from our k3+k1 action:
    clear_all()
    KEY1_hold = false

    -- Proposed fix to allow clear and re-record 
    softcut.buffer_clear()
    for i = 1, TRACKS do
      softcut.loop_start(i, 0)
      softcut.position(i, 0)
    end
    softcut.event_phase(phase)
  end
)

closing

and that should do it! a quick re-run of the script should add these parameters and allow you to MIDI map to 'em. while learning how to script can be daunting, learning how to read and search through a script is often a more-approachable first huge win. lmk if you run into any trouble, though – totally happy to help chat through these types of modifications.

20 Likes

wowowow! truly a “teach a person to fish” moment here!

thank you so, so much for taking the time to answer so beautifully and clearly. even a goofball musician like me can make sense of this (i think). and, more importantly, apply it to other scripts as well.

i feel a little sheepish asking this sort of thing since it’s really such a talented and intelligent diy community here. i am just a lowly musician with very limited skills (and time and patience) for programming. i love the norns for its size and flexibility - and for the amazing community of folks.

thank you again!

i’ll let you know how it goes when i get a chance to putter.

you rock!


edit:

is there a way to adjust the fade-in at the beginning of the recording to be able to capture the attack of a sound? i know that in looping algos, there’s a certain amount of tweaking of crossfades etc to allow for the looping of continuous sounds, sometimes at the expense of attack transients. i don’t really understand how some (particularly hardware) loopers seem to be able to manage both…

but if there’s something i can try tweaking in the code, i’m willing to try.

many thanks!

8 Likes

for sure! adjust this line and replace 0.1 with the duration (in seconds) you’d like to try!

to make this action an entry in the parameters menu, navigate to above this line and add these chunks of code:

for i = 1,2 do
  params:add_control(
    "fade_time_"..i, -- id
    "fade time voice "..i, -- name
    controlspec.new(0,1,'lin',0.01,0.1) -- controlspec
  )
  params:set_action(
    "fade_time_"..i, -- id
    function(x) -- what to do with the value (x)?
      -- adjust softcut's fade time for that voice:
      softcut.fade_time(i,x)
    end
  )
end

hope this helps! lmk if there’s anything else you run into!

4 Likes

thank you so much, dan! you are the best!

oh, the beers i owe you…

Just started getting into Cranes and it’s amazingly intuitive. I recorded a live improv just now using only a Microphonic Soundbox and Cranes (+ grid):

3 Likes

Recently received my Norns and cranes was the first script I wanted to try. Running my goofy little eurorack patch into it and some of these sounds are just amazing. I’m so excited to see what other stuff it can do! Incredible script, thank you!

Here’s the video, Norns stuff started after setting up the patch.

1 Like

OK so I think during testing that I found something out about the massive noise burst that sometimes occurs with Cranes. It appears to be a result of one or both of the buffers not clearing fully when you press keys 1 and 3 together. The solution seems to be to just clear the buffers twice to make sure. It was really bothering me, as making loops with Cranes is generally how I relax at the end of the day- the noise detonation was not relaxing at all! I’ll continue to test over the next few days as I’m still not 100% on it.

2 Likes

Hi!
Could it be that it doesn’t work with two launchpad minis connected? Other scripts work normally.

I never had any luck with midigrid and cranes. Having a launchpad connected and running cranes would usually cause the display on my norns shield to freeze, launchpad wouldn’t light up either. That was admittedly with just the one launchpad. Does two give a similar result?

No, the Launchpads remain off and show no signs of life. The script works but is not controllable by the Launchpads.

Are you using the Midigrid mod or the Midigrid code?

1 Like

hmmm, odd! cranes doesn’t do anything with a grid that it wouldn’t also do with the midigrid mod, but i’m curious if this new version helps?

1 Like

As you can well see I load Bloom first and then Awake and it works. With Cranes it doesn’t, but that’s probably me not understanding. The Midigrid library is loaded in the Norns… :frowning:


Should I enter the string related to Midigrid inside Cranes?

Hi,

For some reason when i record on buffer 1 it also records on buffer 2.
How do you manage to avoid that ?
Thanks for your help,
Ben