one quick idea, although is probably more work than it yields benefits:
recording the first buffer to the second buffer.

I discoverd after struggling for 2 hours in creating the perfect touchosc template for Cranes, that Osc does not work this way, and that it needs to be directly implemented in app… So what about an Osc receiver included in Cranes? would it be hard to add to the original script?

oh no! sorry to hear about the speed bump. what you’re proposing should be approachable with brute force, using the osc norns study and seeing where and how certain actions are called in the script.

lemme do a simple refactor on cranes tomorrow that breaks everything into clean functions and i’ll be happy to provide examples of how to target them with osc calls — sound alright?

3 Likes

Definitely! Thanks for your time!

Joining a pics of the layout. The idea would be to have precise push control over pitch offset via some kind of keyboard for +/- 1 octave. Other parts offer volume/voice pitch/filter encoder for lp-hp-cutoff-reso… all per voice. Mostly using cranes for creating chords textures from my modular on the fly.
Would be the perfect tool for suiting my needs.


Would do loop capture and resizing via the norns interface which I find really playable…

4 Likes

ahhh, gotcha – this is cool! it sorta asks for cranes to be more like a mellotron, which requires a slight extension of the script to track offsets for each voice. here’s a WIP refactor.

osc + norns

generally, there are two basic approaches to use OSC with norns – one where the OSC names are hard-coded into the script (for cases where script controls are not mirrored by the PARAMS) and one where you simply address the OSC names of the PARAMS you wish to control (for cases where script controls are all mirrored by the PARAMS).

the WIP refactor I shared roots all the script controls you’re describing into the PARAMS, so we can go with the simpler of the two approaches.

it might be best to share the TouchOSC file here, but basically you can follow these steps to address the PARAMS: https://monome.org/docs/norns/play/#osc

getting OSC names

by navigating to PARAMETERS > MAP, you can see the OSC names for all parameters.

to confirm you’re looking at the right thing, some of the OSC names for cranes are:

  • speed_voice_1 and speed_voice_2: octaves, controlled by your V-Pitch sliders
  • offset_1 and offset_2: semitones, controlled by your keyboard buttons
  • vol_1 and vol_2: levels, controlled by your Level sliders

…and so on for filter, res, panning, etc

sizing

the only wiggly thing is going to be figuring out the right ranges – eg. /param/speed_voice_1 11 should bring voice 1 to 4x speed because the list of speeds is {-4,-2,-1,-0.5,-0.25,0,0.25,0.5,1,2,4} and the 11th item is 4x. ymmv on the best UI config for these cases.

with that in mind, try mapping volume first just to confirm things are working as expected. eg. /param/vol_1 0.2 should set the lvl out voice 1 param to 0.2

hope this helps! lmk where things get weird :slight_smile:

4 Likes

Thanks you so much for your step by step instruction, and for your time.
CRANES LAYOUT.touchosc (1.1 KB)
Here is the layout. Actually only midi cc events are mapped to the layout.
I need to sit down and look after all the elements and informations u gave me… I have absolutely no background in programmation… so it’s a good entry point :slight_smile: Merci encore!

2 Likes

i wipped up a simple lemur osc template for cranes the other day. I will upload it tomorrow, when i’m back at my computer

4 Likes

here’s my little touchosc ipad layout for the WIP script @dan_derks posted above (thanks for that!)
i think it works pretty well!

ATTEMPTED CRANES.touchosc (1.1 KB)

7 Likes

this is cool, thanks for these osc templates! will make the perfect accompaniment to my midi footswitch that i use to trigger recording and buffer clearing. :nerd_face:

2 Likes

Here’s my Lemur Template.
It only has output level, speed, offset, pan and the filter section. Will probably expand it, but don’t know, when I’ll find the time. If anyone has an idea how i can solve the filter selection with the menu item, I’d very much appreciate it.
Cranes.jzml (27.8 KB)

3 Likes

That’s awesome! A bit different from my initial idea (as I really want to be able to manage precisely the common offset of the two voices with just one touch) but it gives a incredible array of control for deep mangling…
As I stated I am really a noob when it comes to script editing… basically, the Wip is a enhanced version of the original script? I need to create a directory for this version in maiden and copy/paste the .lua in it? Then I need to write down the osc parameter that I want to control and address them correctly in the ToucOSC editor, with correct value ranges?
Is that it?

I don’t think it is possible to add custom ranges in in Touch OSC

that’ll work! you can also just drop in the WIP folder through any of the file management options.

yep! if you crack open the one @joe_biomassa posted, you’ll see that the pan slew slider has the OSC name for pan slew on voice 1 correctly entered with a Value Range appropriate to the parameter (i think this is what we’re describing as “custom ranges”, @yghartsyrt) :

from there, it’s just naming UI objects and playing with ideal From / To values :slight_smile:

really stoked on all the custom interfaces!! thank you for sharing them @Fsuchs, @joe_biomassa + @yghartsyrt !

3 Likes

Now i remember, why i ditched the Touch OSC approach @dan_derks. TouchOSC indeed has custom ranges, but it is not possible to have individual response curves for the sliders. Especially with the frequency slider, i wanted to have an exponential response curve ,so i can adjust the lower frequency range with more precision than the upper range.

2 Likes

you could lightly modify cranes to take a linear pitch input for filter FC instead of hz.

e.g. to use a MIDI input for filter cutoff, these lines:

would become something like

    params:add_control("post_filter_fc_"..i,i.." filter cutoff",controlspec.new(0, 127, 'lin', 0.01,127,''))
    params:set_action("post_filter_fc_"..i, function(midi) 
        local hz = musicutil.note_num_to_freq(midi)
        softcut.post_filter_fc(i, hz)
    end)

, also adding local midiutil = require 'midiutil' to the top of the script

(i suppose you may also wish to rename the param to 'post_filter_fc_midi_'..i or something in that case, or even add it as an additional parameter. being aware that changing parameter names / layout will break existing saved presets.)

IMHO linear pitch inputs are generally more useful. next major version of softcut will break API by making all filter cutoff parameters take linear pitch anyways.

3 Likes

YEAHHHHH! It’s working! Thanks to your step by step tutorial and thanks to @joe_biomassa script that i have freely adapt, I can use Crane the way i wanted! thanks again folks!
Here is the layout :
CRANES LAYOUT.touchosc (1.6 KB)

Edit : it works… half working in fact :slight_smile: strangely, the voices offsets, despite the fact that they are reacting correctly to OSC gesture (when touching the appropiate zone, the screen on norns reflect the change) oddly, only one voice is affected. don’t know if this is script related…

3 Likes

whoa! been away from the computer. really happy my little layout was useful! to be honest, i cobbled it up in about 15 minutes lol
and thanks @dan_derks and others, norns (shield in my case) and its community has been truly amazing. i’m slowly getting back into some light coding (last time i did that was maybe when i was 15).

3 Likes

it was! fixed!

super exciting to see all the energy here – thanks for engaging with this script after all this time, y’all :slight_smile:

5 Likes

Cool. Thanks. Will look into that. Still incredibly new to programming outside max, but this sounds like a good first venture.

I’m getting some errors in matron while loading up Cranes.
warning: didn't find SoftCut voice method: post_filter_fc_mod
Should I be worried?

1 Like