< Back to IRCAM Forum

Extracting the onset of every chord-seq in a multi-seq

Hi all,
suppose I have a multi-seq like this:

Here the onset of the first chord-seq is 85590 ms, the onset of the second is 11979 ms, the onset of the third is 0 ms, and so is the onset of the fourth. What I’m looking for is the most efficient way to extract recursively the onset of (the first note of) every chord-seq in a multi-seq. Thanks for your kind attention.
All the best,
Francesco Vitale

Hi Francesco,

Well here you go:

And the patch:
onsets.omp (8.3 KB)

Next time, please do send a patch or an om instance instead of a .png. An image is too hard to compute :slight_smile:
Best
K

Many thanks,
that’s brilliant, as usual. I was exactly looking for a solution that did not involve double loops, like that. Sorry for not having included an .omp, I thought my request was too generic to require one.
All the best,
Francesco

…Of course, if you don’t like loops you always can use a mapcar :slight_smile:

the patch:
onsets 2.omp (10.4 KB)

Best
K

Great! These examples of equivalence or “synonymity” between different programming options have always an instructive value. Thanks again for all.
Best,
Francesco

« Mille viae ducunt homines per saecula Romam Qui Dominum toto quaerere corde volunt. »

:slight_smile:

[Trad: " Tous les chemins mènent à Rome "]

K