algorithmic-music-exploration / amen

A toolbox for algorithmic remixing, after Echo Nest Remix
BSD 2-Clause "Simplified" License
333 stars 87 forks source link

Feature: Onsets #48

Closed tkell closed 7 years ago

tkell commented 8 years ago

I suspect we can get this with librosa.onset.onset_detect

Cortexelus commented 8 years ago

Onsets make good segments, but the onset times themselves are not the best boundaries.

  1. We want to find the nearest zero-crossing
    • less likely to get clicks when you concatenate
  2. We want to set the segment boundary earlier to include the pre-onset head/attack.
    • less likely to hear next segment in the tail of the first
    • locate by backtracking to point of lower spectral flux
    • observe the various ways (from this IRCAM MuBu paper) image
  3. We may also want to include
    • time of max amplitude (originally in the echonest api)
    • good points to ping-pong loop this segment's samples for an Ableton-style time stretch. Perhaps a period of low spectral flux at least 100ms.

This is my aesthetic opinion from building concatenative synths and playing with librosa's onset_detection

bmcfee commented 8 years ago

@Cortexelus fair points. Have you seen the onset tweaking thread in the librosa issues?

Cortexelus commented 8 years ago

Yeah. A simple backtracking method like the one @kylemcdonald explains is what I was thinking. (But now this time reassignment stuff is new to me and I am exploring it.)

Cortexelus commented 8 years ago

It's useful to include both an onset time and a starting boundary. For example, in a rhythmic concat synth, you may want to start the segment early (pre-onset head) but align its onset time to the beat/pattern grid. This way a lengthy head doesn't mess with the pulse of the pattern (example: reverse cymbals), but you still hear the full head (overlapped with the previous segment's tail)

Cortexelus commented 8 years ago

I summon Tristan Jehan's thesis.

image image

tkell commented 7 years ago

Closed with #95 !