Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

slicer

records up to 30 seconds of stereo audio, detects transients, and maps the results to MIDI notes starting at C1. up to 10 slices per recording, each independently configurable as one-shot or gated. polyphonic.

norns


controls

K2          start recording
K3          stop recording
E2          select slice
E3          toggle oneshot / gated for selected slice

MIDI

C1  (36)    slice 1
C#1 (37)    slice 2
D1  (38)    slice 3
...

note velocity maps to amplitude. retriggering a note while it's playing restarts from the slice head. gated slices release on note-off with a short fade; one-shots play to the end regardless.


display

while recording, a progress bar shows elapsed time against the 30s maximum. after recording stops, transient analysis runs automatically — the screen shows each slice as a segment of the full waveform. the selected slice is highlighted. active slices fill in during playback, with a scrolling cursor showing position within the slice. the last-triggered MIDI note is shown in the upper right.


transient detection

after recording stops, the engine mixes the stereo signal to mono, computes a short-window RMS envelope (~10ms windows, 50% hop), and finds local peaks in the positive first derivative. the 10 strongest peaks are kept and re-sorted by position to form slice boundaries. slices shorter than 10ms are discarded. if no transients are detected the entire recording becomes one slice. the first slice starts at the first detected transient — no leading silence.


requirements

  • norns (any hardware variant)
  • MIDI device connected to port 1

install

via maiden:

;install https://github.com/manifoldcuriosity/slicer

or copy the slicer/ folder to ~/dust/code/slicer/


notes

system reverb is disabled on load for dry sample playback. recording auto-stops at 30 seconds if K3 is not pressed. pressing K2 while slices are loaded clears and re-records.

About

norns script: records audio, detects transients, maps slices to MIDI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages