< Back to IRCAM Forum

Extracting multiple segments out of a bpf with markers

Hi all,
I just began to work with the new brilliant OMScoreTools library by K. Haddad, and I’m trying to extract multiple segments (to be stored in a bpf-lib) out of a bpf, with markers generated with the voice->bpf-markers object. Unfortunately, I still have not found a way to do this, and my attempt with bpf-extract (see patch) is not functioning properly. Is there a way to achieve this task, maybe with a much simpler solution? Thanks for your kind attention.
Best regards,
Francesco Vitale
01-voice-bpf.omp (32.8 KB)

Dear Francesco,

Just opened your patch. Can you describe what you are trying to do? Do you need just some selected markers? I cannot locate your choice. You can of course describe it in a drawing (a concise MWE example would be helpful).

Best
K

Dear Karim,
here’s the patch with the final result I’d need to get. As you can see from the bpf-lib, the original bpf has been cut into segments according to the markers. What I’d need do to is to do this cutting automatically with a loop or a lambda. Let me know if it’s still unclear.
01-voice-bpf.omp (56.7 KB)

Dear Francesco,

Ok now i get it. You were nearly close to the solution. The problem comes from bpf-extract that which slices the bpf and reinit the first x point to 0.

Here you are:
01-voice-bpf-francesco.omp (35.5 KB)

Best
K

Dear Karim,
thanks, that’s perfect. Your solution explains in the best way the bpf-extract behavior, which I found somewhat obscure. Thanks again.
Francesco

Dear Karim,
one last question. I’m working right now with onset markers generated by a chord-seq, instead of a voice object, because the rhythm quantization in voice doesn’t allow me to build more fluid patterns with multiple accelerando and rallentando. So my question is: could you please show me in a patch how to use the markers of a bpf-lib (not generated by the voice->bpf-markers) to segment an arbitrary curve? Here’s a little patch with an example.Thanks in advance for your precious help.

Dear Francesco,

One rule to follow is, always give an MWE example (ie Minimum Working example…)
I broke down your bpfs in order to see how this works (sinus with multiple points is very difficult to see therefore to control.) Anyhow this simple example shows you that this is easiest than the former problem. Here you are:

bpf-slicer-2 2.omp (24.6 KB)

Best
K

Dear Karim,
pardon me for the unnecessary complexity of the example, that maybe was the same reason which prevented me from finding the simple solution that you gave me. The MWE rule is something one should always follow, but I got carried away by the potentialities of the chord-seq onset markers, which can be describe rhythms way more complex than the voice markers! Thanks again for all.
Best,
Francesco

1 Like