Piwip

piwip

a sampler that works in realtime.

piwip

my goal here was to make a sampler that plays back samples of an instrument while playing an instrument. that way, i can have a “autotune” for my bad trumpet playing - e.g. turning off the monitor and sequencing with the notes i’m trying to play.

future directions:

  • add crow support
  • fix bugs

Requirements

  • midi input (optional, use built-in harmonizer instead)
  • audio input
  • norns

Documentation

  • K2 arms recording
  • K3 forces recording
  • K1+K2 toggles monitor
  • E1 activates presets
  • E2/E3 trims sample

quick start:

  • sampling: plug in midi keyboard and audio source. turn E1 to “sampler”. press K2 to arm or K3 to directly record. then play audio. now you can play it back on your midi source.
  • random harmony: turn E1 to “follower”. change harmonizer -> probability to 100%. change the scale and root note to your preference. then press K2 to arm and play a sound through the input…

there are a number of customizable parameters in the global menu. currently there are two presets (E1 toggles):

  • “sampler”: generic sampler. record once and then midi notes are shifted by a constant amount (relative to middle c).
  • “follower”: sample in realtime. playing midi during recording will try to play notes near the leading edge, using a realtime pitch-detector to correctly pitch shift.

i’m sure there are other interesting combos. here is a quick rundown of some parameters:

  • recording->rec thresh: lower to more easily trigger recording when armed
  • recording->silence to stop: recording after armed stops after this much silence
  • playback->min recorded: is the amount recorded before note playback is possible
  • playback->playback reference: determines how pitch adjustment works
  • playback->live follow: starts notes behind the latest sample
  • playback->keep armed: re-arms recording if recorded stops
  • playback->only play during rec: sequenced notes only emit during recording
  • playback->midi during rec: use to disable midi during recording
  • playback->notes start at 0: start notes at 0 or from where they last were

Download

v0.3.0 - https://github.com/schollz/piwip/archive/v0.3.0.zip

56 Likes

Looking forward to trying this on all manner of things, instruments and otherwise.

1 Like

really gorgeous demo and waveform implementation!! excellent work, as always! very excited to see what folks do with this one :slight_smile:

2 Likes

thanks @dan_derks for the kind words.

@DoS i look forward to seeing your tries!

i think there is potential for cool weird vocal effects with this. haven’t explored that yet.

here’s one more demo showing the “sampler” mode (the second preset of the current two presets). “sampler” mode behaves like a classic sampler. pitch-shifting is relative to middle-c (although you can change pitch detection to “median” to automatically pitch it if its a single note). sample one note and then play the sample after recording and tweak the start/end points.

8 Likes

Definitely - that was where I was thinking of heading quite soon.

2 Likes

Didn’t get a chance to try it but damn, @infinitedigits you’re on fire! If this could work with Crow one could enter a very wild territory :eyes:

2 Likes

thanks @bereenondo

i’ll look into adding crow. i don’t use any other monome stuff so i’ll be programming in the dark on that :grinning: :new_moon:

currently i’m working on adding an auto-harmonizer. that will help to make the midi keyboard optional and might make vocal/instrument stuff more interesting.

happy to engage other ideas of where to take this script!

7 Likes

I’d love to see crow support too. Something simple like crow input 2 for pitch, then I could re sequence a live recording sequence :exploding_head:

1 Like

@infinitedigits
so…trying to go for a test drive…but i can’t seem to get out of the driveway.
:stuck_out_tongue:
i hooked up an OP-1 and sampled a Tetrax.
i see the audio being recorded but the waveform is grayed out.
(it doesn’t look bright like your vid)
couldn’t get any MIDI.

hooked up a Beatstep Pro to simplify things and still no MIDI from the keyboard.
i went to the MAP in the parameters to see what it would learn and it was coming up with CC messages like it should.

also…
getting to samples and follower with E1 one seems a bit glitchy.
sometimes it just wouldn’t display which setting i was on.

it would also sometimes just start recording when i started the script.
(is it supposed to do that?)

this pandemic is doing wonders for creative scripting. i’m thankful for people being locked inside for months in this case

2 Likes

Amazing, thank you so much.

You’re unstoppable!! Brilliant stuff again

Can’t wait for it to appear in maiden. I’m sure it another gem!

You don’t have wait for it to appear in Maiden you know, there’s still the “old school” way of importing scripts into Norns :wink: https://monome.org/docs/norns/fileshare/

Yeah I know, but I try to avoid that:)

1 Like

@kveye i think it should be in maiden? it was merged earlier today.

@cosmicsoundexplorer the crow doesn’t seem too bad to do, will get into it!

@JHC, @LT6J, @encephalitislethargi thanks for the kind words :smiley:

@SPIKE yeah i realized that this script requires a little more kung fu than my others. let me see if i can get you out on the road :slight_smile:

the waveform is normally grayed out (my videos had boosted contrast), so when you play a note you should see your note travel through the waveform in a bright pattern.

on the op-1 the midi is weird, and seems to work (for me) only after going out of synth mode and then back into synth mode. can you try that if you’re using the op-1 midi?

if you are in “sampler” mode the midi during recording is turned off. if you aren’t in any mode, double check the midi during rec and make sure it is yes. also check that only play during rec is no. this should make sure you get midi emission no matter what.

since you have an op-1 an easy test is to do the following. plug in the audio and midi from op-1 into norns. record one bar on the op-1 with a note from any engine. have that play indefinetly. switch to a synth (like pulse) where you can turn the volume all the way off. now you should be able to play the midi (with only audio from your pre-recorded material) and the midi should activate the samples.

hmu if its still troublesome.

i’ve noticed its a bit sensitive on the norns shield to get it to move one space between modes. i could hook it up to something like K1+K3 instead to switch modes too.

2 Likes

Getting strong The Messina vibes :eyes: excited to try this out !!

3 Likes

Your scripts are really something special, I gotta say! Gonna use this on voice when I’m back home.

1 Like

v0.2: added random harmonizer

you no longer need midi input. you can turn on the “harmonizer” which emits random notes from a set scale/root using your current sample. here’s an example (randomizer is the first 15 seconds):

changelog

  • feature: randomized harmonies added
  • feature: add volume control (in parameters and K1+E1)
  • ui: group parameters
9 Likes

How do I use a midikeyboard with this wonderful script? Have connected my keystep via usb, but nothing happens. What are I’m misding?

1 Like