Does this look correct? I get a loud buzz when its turned to 1 in the param menu. Would it be better to just turn the volume of the voices down?

Summary
 function both_enables(x)
  softcut.enable(1,x)
  softcut.enable(2,x)
end

params:add{type = "number", id = "both_enables", name = "enables",
  min=0, max=1, default = 1,
  action = function(x) both_enables(x) end}

well, did you do anything else to set the parameters of those voices, as in the halfsecond lib/example? is this on top of halfsecond?

use enable flag if you want to completely stop/start processing per voice (consume no CPU when off). the param mapping looks plausibly correct, but it is probably not something you want to modulate (hard clicks will occur.)

1 Like

@rdfm you’ll need to set a bunch of default param values. just enabling it will mean it’s in a somewhat unknown state.

1 Like

i’m not sure when this thread was created, stuff merged &c, but i’m seeing a lot of recent reactions to older posts. so, wanted to point out that all my statements before march 2019 refer to a completely different and more limited version of softcut than the current one. specific references to implementation details no longer apply.

see here for current lua syntax to control softcut parameters
[ https://github.com/monome/norns/wiki/syntax-2.0 ]

these map pretty directly to OSC commands understood by the crone audio process:
[ https://github.com/monome/norns/blob/dev/crone/osc-methods.txt ]

4 Likes

Say I wanted to add ‘halfsecond’ or something similar to a script, but didn’t want it to immediately start up, but wanted to be able to selectively turn it on/off.

How would I go about this?

2 Likes

softcut is a lot of fun! excited for some docs on the parameters, but just changing values and commenting things in and out is a little treasure hunt. here is a super minimal multi-tap ping-pong delay based on halfsecond.

brass synth pulse from a repeating ableton clip running into norns

-- multitap delay using softcut

function init_sc()
	audio.level_cut(1.5)
	audio.level_adc_cut(1)
	audio.level_ext_cut(0)

  for i=1,3 do
    softcut.level(i, 1.0)
    softcut.play(i, 1)
  	softcut.rate(i, 1)
  	softcut.position(i, 1 + (.2 * i))
  	softcut.pan(i, -.5 + (.5 * i))
  	softcut.enable(i, 1)
  end
end

function init()
  init_sc()
end

EDIT: just wanted to say this relied on some setup code that half-second had which I didn’t realize I needed. Resetting audio will make this script not work. I’m working on a more sophisticated multi-tap thing right now…will share when that’s finished.

7 Likes

finding some trouble with softcut.buffer_clear() being effective on 190303 – the command doesn’t seem to work as expected (an immediate clear of all buffers). if anyone is able to confirm operator error or otherwise, please lmk!

oh, thank you for reminding me. i think i saw similar behavior last week and forgot to report it. i’ll test again.

3 Likes

@tehn , @dan_derks
yes sorry, looks like arguments to the various clear commands got scrambled. sorry. easy fix

meantime, clear_region looks correct - see if it works for you


pushed softcut-buffer-fixes branch with quick fix for clear command.
will add buffer/write commands while i’m in here (i completely forgot about these), then PR
currently giving a more thorough once-over to the various load commands as well

3 Likes

softcut.buffer_clear_region worked(!, thank you!) but in case it helps, softcut.buffer_clear_region_channel doesn’t seem to have any effect, though it’s accepted as OK

2 Likes

PR with fixes to those issues

also added commands to save softcut buffer to disk. not yet glued to lua but will get round to that next time i sit down with norns HW

5 Likes

I’m trying to expose some softcut parameters (based on halfsecond engine).

When I add:
params:add_separator()
local p = softcut.params()
params:add(p[1].rate)
params:add(p[1].pre_level)
Everything works as expected and I can see/map these 2 parameters within a script with the engine initialised.

Then if I go further and add a few more, it seems to lock up the parameters screen and I cant access it, for example:

`params:add_separator()`
`local p = softcut.params()`
`params:add(p[1].rate)`
`params:add(p[1].pre_level)`
`params:add(p[1].enable)`
`params:add(p[1].filter_lp)`
`params:add(p[1].filter_rq)`

Any thoughts why this might not work? This is pretty much my first attempt at customising stuff, so consider me a total novice :smiley:

I was having the same issue earlier when creating a script based on halfsecond. I was able to scroll to the second cut param but when I changed it the number value wasn’t changing and the audio was unpleasant. Is there more glue needed than what’s in halfsecond that we’re missing?

EDIT - not in front of norns right now but it just occurred to me that maybe it should be

`local p = softcut.params()`
`params:add(p[1].rate)`
`params:add(p[2].pre_level)`
`params:add(p[3].enable`
`params:add(p[4].filter_lp)`
`params:add(p[5].filter_rq)`
2 Likes

I’m on a phone r/n but will look when possible

Meantime, check for warnings about missing voice method


@Molotov, @speakerdamage

i looked. travelling with severely limited internet atm.

the params generated by softcut.params() method (which is a quick hack really) are kinda wonky. step size is not so useful, and the labels are goofy (i added some underscores, will make a minor PR) - but it basically works, i was able to add params for filter fc/rq/mode levels, rec/pre levels, loop/fade times, &c for multiple voices, from the maiden REPL

couple weird ones:

  • position is one that makes no real sense as a parameter.

  • loop points are basically useless because of the gigantic step size - better off making customized params appropriate to whatever the script is doing, and wrapping the lower-level setter methods exposed by softcut.lua module.

  • when i tried to set a param for rec flag some total crazy thing happened, some metro throwing errors, (@tehn is there a global called rec or something?? sorry i lost the error but i’m sure its reproducable)

but there is some weirdness where i can’t actually scroll to the end of the params list if the list is long enough - it neither moves the selection line, nor allows space at the bottom of the screen - which i take to be a bug in menu.lua. :biohazard:

btw @speakerdamage, sorry but the supposition in incorrect, p[1] is all the params for voice 1, p[2] for voice 2, &c.

hope that helps / makes sense

2 Likes

yep, all useful info, thanks! :slight_smile:

How many voices are available?

currently there are 6.

i’m considering a change that might bump it back down (to 4 or 5), in exchange for 1) the ability for record / play heads to cross each other in the same buffer/region without glitching, and 2) more solid per-sample sync between voices for stereo or whatever.

4 Likes

Non-norns owner here…
Just want to confirm that softcut is totally independent from supercollider/crone? and as such could theoretically be compiled outside of the norns ecosystem?

Possibly using lua/c to make a pd external? or even just a little app/daemon to be routed with jack? (Im sure its a non-trivial task to actually do this… but certainly interesting to consider!)

1 Like

yes ! this is possible. when I have some time I’m planning on giving a max external a shot. hosting in jack as-is is also doable.

1 Like

In 2.0 it’s already a standalone application/JACK client :slight_smile:

1 Like