< Back to IRCAM Forum

OM example help needed

Greetings,

I want to do something similar to Figure 10 in this example from a paper for DAFx-06 by Jean Bresson :

http://papers.dafx.ca/proceedings/papers/p_325.pdf

I understand what the format-stretch object does, but I don’t know how to construct it.

Any advice, or suggestions how to do the same thing (“Variable time-stretching: matching sound segments with a rhythm”) ?

Best regards,

Dave Phillips

Hi Dave

What you want to generate is a flat list of pairs (t1 v) (t2 v) where t1 and t2 are the bounds of every successive segment in the sound and v is a stretch value, computed as a ratio between the length of the segment (t2 - t1) and the targetted duration after stretch (= duration of the corresponding note in the score).

The tricky part might be the iteration over the pairs of markers. There are several way of doing it: you can for instance use a ‘onlist’ iterator in omloop and use the first two elements at each iteration.

I will post a patch if you want, when I have some time to make it.

All best
Jean

Thanks for your reply, Jean. I will try to create the function from your description, but if you have time to post a patch I would appreciate it.

Best regards,

Dave Phillips

Dear Jean Bresson,

I’m actually having the exact same question, and can’t come up with the solution so far, even with your description. If you’d had the time, I’d appreciate it a lot, if you could post a patch!

All the best
Philipp

Dear Philipp,

The link above:

is not working. So can you show us what is it all about, maybe we can help.

Best
K

Dear Karim,

thanks for the quick reply!

I’ll put a screenshot of the patch here attached. Would be lovely, if you could help!

Best
Philipp

Thanx Philipp,

Ok, just got the article. Will read it and see if i can get the goal of the treatment here.
One thing is not very clear to me: the correspondence between the transients markers and the rhythm. In principle this should have the same number or not ? Which proportions are used overall, those of the VOICE’s rhythm scaled to the entire sound length or adjusted to it’s real duration?

What do you want to do personally here? maybe we can just add manually markers, not transient necessary, and use time-stretch factors to each segment of the sound. This is more clear to me, no?

Best
K

Hello Karim,

I assume that the markers and the rhythm should have the same number. In regard to the second question: I think (correct me if wrong) the goal here is to have the sound scaled to the length and proportions of the VOICE’s rhythm. So in the example, the fourth transient marker would be on beat 2 and so on.

I’m personally interested in two things: one, to match the transients of a sound to a precisely notated rhythm.
The other thing: to match the transients of one sound to the transients of another sound file (which I could do with the patch here, after transforming the markers of the second sound to a rhythm in a VOICE object).

I guess it would work manually, but if there is a way to do it like in the patch it would be very convenient.

Best
Philipp

Dear Philipp,

Ok, i see now more clearly. I will prepare this and send you an example for the 2 cases:
sound against VOICE
sound against sound

See you soon then

best
K

Dear Karim,

that’s fantastic, thanks so much!
I’m looking forward!

Best
Philipp

Dear Philipp,

Well here it is and i hope this is the correct approach for sound markers controlled by a VOICE’s rhythm:

The example:
supervp_example.zip (999.5 KB)

The trick is to have from point to point fixed values so we do not interpolate at each point,

The sound to sound example, will not do using the transient detection of course, since the number of these will depend on the nature of these sounds, and there are no chances (unless very lucky :slight_smile: ) to have the same number of segments. I will figure out an example using manual markers. Let’s hope this will be a nice example (to do…)

Best
K

Hi,

Here is a sound/sound stretch example (the first soundfile is the sane used in example one):

The patch:
soundSoundastretch.zip (1.2 MB)

Best
K

Dear Karim,

thanks so much!!! That was an amazing help!

All the best
Philipp