FWIW, i just updated this with some “multi-sampling” options to produce successively bandlimited versions of the input waveform.

(i’d like to add a BL’d wavetable synth to norns.)

5 Likes

Polyphonic Chromatic Sampler

Hey All, I am wondering if a polyphonic chromatic sampling capability has been implemented.

My goal is to record a sample into norms, cross fade the loop for a clean transition as the loop repeats then play the loop back chromatically via a midi keyboard with 4 or more voices of polyphony.

The quintessential demonstration of softcut-based sampling implies this is possible, however my forays into making this so have not been fruitful.

Does anyone have any advice or know if such capability has been developed? Cranes seems to get close to this functionality

This sounds totally possible with softcut. A rough, completely untested sketch:

  • Get your script set up to record a loop, something like softcut study 4. If you need to adjust crossfade time this is controllable per-voice.
  • When you get a midi note-on, calculate the right rate multiplier to pass as the rate for a softcut head. For example if you want A440 to be the same playback speed as your original sample, something like (for a single softcut voice):
m = midi.connect()
m.event = function(data)
  local d = midi.to_msg(data)
  if d.type == "note_on" then
    -- calculate a scaled rate so that midi note number 69 = A440
    -- results in softcut.rate(1, 1.0)
    softcut.rate(1, 2 ^ ((d.note - 69) / 12)))
    softcut.level(1, d.vel / 127)
  elseif d.type == "note_off" then
    softcut.level(1, 0)
    softcut.rate(1, 0)
  end
end
  • Once you’ve got something like that working, then you just need to figure out how you want the polyphonic allocation to work. Something simple without note-stealing might just count the number of active voices and use this to assign which softcut voice you adjust. Fancier polyphonic allocation schemes have probably been implemented in some existing library scripts you could reference, though I don’t know which offhand.
4 Likes

@cncs.lrkr would timber keys accomplish what you need?

I did a thing w/chromatic sample playback by loading a continuous multisample recording into softcut and the playing back via midi keyboard. (see below)

Your use case should be doable (or even directly adaptable from my script) depending on what you mean by crossfading at the end of the loop. As far as I know, each softcut voice can fade in and out at the start/end of the loop, but I don’t think it can self-crossfade (@zebra may have a definitive answer). You might be able to achieve something similar with two voices crossfading the same loop, but I think that would cut your max polyphony to 3.

1 Like

i also made a lib in the we package which is a simple four-voice sample player.

see this and this

4 Likes

not exactly sure i understand this correctly, but each voice does perform crossfading internally (has two R/W heads.)

Oof. My mental model has been off. Thanks for the clarification!

its on me for never putting it clearly enough maybe:

each voice has two heads; during a crossfade, one head fades out from the end of the loop, while the other fades in from the start of the loop.

the fade times can be arbitrarily long within the limits of the buffer size.

a crossfade begins automatically when a head reaches the loop endpoint, or when pos command is received. (fade-in begins at pos argument, which need not be within loop bounds.)

when a position change is requested during a crossfade, the new position change is queued and executed when the fade completes. (queue depth is 1; so additional position requests are discarded.)


so anyway, polyphony is 6. i think in future update we will increase this, while restricting the number of voices that can simultaneously record (varispeed write-with-xfade is several times more expensive than varispeed read.) it is actually easy to try this out “manually” if you want to see how it goes:

  • change the NumVoices enum value here
  • call rec(0) for all voices that you don’t want to record with. (e.g. all of them in a non-live sampler)
  • oh and i guess also the voice count in lua API here
3 Likes

Thanks for the guidance all.

Just to clarify the concept, the end goal is op-1 like sampling where the loop can be cross-faded by a user defined amount to prevent a click when the loop repeats; giving smooth playback if a synth pad was sampled for instance. (if the loop is originally 15 seconds long, with 1 second of cross-fade the loop will then be 14 seconds long)

I think someone asked, but shooting for monotimbral initially; multitimbral should no doubt be the end goal.

Reviewing the sources y’all posted, tehn’s fourwaves sample player seems like a good jumping off point.

Gaining familiarity with this codebase. The function sc.note looks to be where pitch shifting is implemented.

Looks like the task at hand is to write a script around fourwaves to manage live sampling and polyphonic key allocation.

Reviewing softcut, rate control and cross fade are exposed.

I might have missed it - with the assumption of monotimbrality, what is limiting fourwaves to 4 voices?

Can you give some insight on how you got the FH-1 to receive MIDI from the Norns? I just built a Norns shield and I don’t see the FH-1 in Devices > MIDI.

Edit: I’m connected to my FH-1 via a USB - USB cable.

1 Like

You are directly connecting two USB hosts, this won’t work. Indeed both devices are probably trying to supply power to each other and I suspect that in some cases this could be Bad, as in current going somewhere it shouldn’t. This post mentions using an iConnectMidi2 to act as a hub between the two hosts. There are a number of gadgets around which can allow two midi hosts to talk to each other, by acting as a USB device to each host and routing midi packets back and forth.

Yes the iConnectMidi is how I do it - it’s been invaluable . As @csboling suggests there are a ton of options for host to host connectivity - I’d suggest if you do much in the way of midi something like this is an essential tool around the studio

i don’t have much background at all to articulate this clearly or any idea of how it would be done. But, I was wondering if it would be possible to make a cartesian sequencer like the Make Noise Rene that works with the grid in a flexible, intuitive way. I don’t have a rene, but i’ve used similar sequencers in Vcv Rack such as Gridseq and Bene (i think there are a couple more) and i think it would be cool to determine the direction in a more playful performance oriented manner. That’s the kind of thing i imagine when working with the grid, a kind of hands on evolving tactile elastic sort of “living” sequencer. like when i see video of people performing multi-gestural grid presses in cheat codes or loom, i imagine different combos creating different complex results. something where what you play actually has an effect beyond just one note in a pattern or one trigger. This may even already exist in few current scripts, i don’t know.

Loom kind of gets there. I think another cool idea would be a version of Loom with a little more generative aspect. Or a way to morph the patterns note by note while its running. I forget who it was, but i saw someone on instagram do something similar with Teleype and a grid recently. like a kinetic pattern sequencer where triggers bounced off of other notes or rules.

Edit: it was A Scanner Darkly. if someone could recreate this in norns with midi out, i would be very grateful:

Maybe something like Rebounds but with grid functionality. A sequencer where you could set up barriers, like the game “snake” or whatever it’s called, then generate the balls/notes by pressing a pad on the grid and then somehow changing their direction and speed on the grid. Maybe the sequence even degrades over time so you have to constantly generate new notes to keep it running. I don’t want a game, just a playable instrumental sequencer that uses only the grid for all pattern generating/animating/morphing/decaying/travelling/ functions.

you know how Animator has the ability to set loops, similar to MLR? what if you could do that, but also that loop travels around the grid in a path and crosses other loops, where when they interact, a new pattern emerges. i guess something like Borderlands granular where you can overlap audio clips, but in a more automatic, motion-based direction.

this is all over the place, because it’s an abstract idea. like most of my musical ideas, i dont even really know want i want. but i do have a vague abstract idea of what i think would be really cool and useful for more experimental and interesting musical patterns and phrases.

know what i mean? make it happen

2 Likes

Has anyone done a norns port of Marbles? It seems like Shfts and maybe something like less concepts or zellen are close. Turing machine-style sequencers. But even with the grid, I don’t find any of those very playable. It would be really cool to somehow make a marbles script that is somehow grid compatible, but even with just the norns encoders for “deja vu” and x & y, maybe slew and octave or the other marbles functions would be very nice.

I guess I should just learn how to code instead of continuing to put my half assed ideas in here. I’ll look into it

7 Likes

Liking both of the ideas you posted…especially anything that fractures sequences up into non-standard/sliding clock divisions that push norns/grid well into free jazz terrain.

4 Likes

Exactly. I need to figure out how to make these a reality

1 Like

I would really like to be able to use a USB (typing) Keyboard as a quick and dirty midi note input device. Similar to the keyboard midi input that Ableton has. I imagine this is doable, I think of the scrip OscGrid which enables TouchOSC connectivity as I understand it this is done throughway of emulating a grids which runs in the background and then converting Osc Messages to grids serial. I am going to investigate OscGrid and Ocra for its keyboard implementation and see if it leads me anywhere. If anyone has any thoughts or corrections I would appreciate the guidance.

1 Like

Check out the HID demo scripts, by @okyeron, for how to interface with a (typing) keyboard.

6 Likes

??? norns to norns remote tape sharing script ???

so far I’ve got:
curl ifconfig.co
to get public ip, then
sftp -6 we@[<their ip address>]:/

I’ve only gotten it to work with ipv6 (not sure why) which looks like this: 2600:1700:5540:1100:bd0f:b8b4:8136:79d3 and usually changes every ~24 hrs (dynamic IP)

so not too easy to copy off the norns screen, but it could be a maiden REPL operated thing (copy & paste + text it to a friend)

useful / interesting ? could be a cool way to collaborate maybe ?

6 Likes