Let's talk about [Stretch], baby

Official support for: livelab.dk
RELATED
PRODUCTS

Post

ohm wrote:it will do sample based time stretching (to fill the gaps between slices when lowering the tempo below the original).
ohm wrote:BR 034: if you change the attack, hold and decay parameters so that the sum exceeds 100% in relative mode you are stretching, that's how I implemented it! If you are not the only one confused by this I'll seriously consider a different approach (like adding a "stretch" parameter or something).
After a fair bit of investigation [using LS 145 beta 4.2], here's my 2p.

At the moment I find it difficult to understand the inter-relation between the AHD values and stretching, especially when changing the AHD values.

In my view the AHD envelope should be treated independently of stretching.

The AHD envelope determines how the sound is shaped and allows you to tailor the volume envelope. Notice that the sum of these 3 values should not exceed the duration of the original sound (whether expressed in ms or %). I personally do not think that these three parameters should be used to stretch the sound (by setting the sum of AHD to be more than 100%. Rather they should be used to fade-in, shorten and fade-out the sound.

Then, after the sound's volume envelope has been shaped, you can stretch the sound as needed. The stretching uses only the ratio between the sound's tempo and the host tempo and changes the duration of the sound using the time-stretching algorithm. The durations of the AHD stages are also scaled proportionately (and, I guess could be time-stretched individually)

Here's a (theoretical) example, have a look at these pix:
Image
Big pic:
http://img444.imageshack.us/img444/8353 ... tch5um.png
- the first pic is my original sound, lasting about 1120ms, from a loop at 120 bpm
- I want to fade it in, shorten it a little, then fade it out, ending up with the second pic,
- the percentages shown are relative to the original sound- now I have the sound sounding how I want,
- my song tempo is 100bpm, so I need to stretch the sound, the timestretching algorithm will change its duration from 100ms to 1200ms,
- the times of the AHD phases are increase proportionally,
- the percentages shown are relative to the shaped (and stretched) sound envelope

Does this make any sense? I may be talking rubbish, if so, please say so.

I realise that this might mean a bit of rework, but it seems that it would make the use of AHD settings and [Stretch] easy to understand.
DarkStar, ... Interesting, if true
Inspired by ...

Post

Simon - I think developers are lucky to have you as a beta tester.

I'm surprised developers don't give you free copies of their software just to try and get your loyalty because most products I see that you really begin to like start profiting from your involvement.

Regards
Caleb
Happiness is the hidden behind the obvious.

Post

:blush:
:oops:
DarkStar, ... Interesting, if true
Inspired by ...

Post

I understand what you are trying to say darkstar, but from my point of view, the problem is more into understanding, just like you said, than in it's implementation. I don't know how do you guys use liveslice, but my main usage is for slicing beats, and sometimes instrument loops or sequencing individual samples. In last beta version, you are stretching when changing Hold parameter, changing attack is like it used to be, and decay works if hold parameter in small. Decay just makes sound fade out, and if it's too long, it will play material stretched.

If i'm wrong, correct me, please...

Post

"Lets talk about stretch for now to the people at home or in the crowd
It keeps coming up anyhow
Don't decoy, avoid, or make void the topic
Cuz that ain't gonna stop it" (copyright salt'n'pepa)

I tend to agree with you Darkstar. It would be more logical (at least more familiar) if the stretching had it's own parameter, and easier in the case you describe where you are happy with the envelope as it is but would simply like to stretch the sound.
There's one major issue though: the reason why I chose to have the durations of the AHD relative to the original duration is that I want the stretch to happen in the decay stage of the envelope.
The stretch algo. repeats the tail of each slice in a ping pong loop and it just sounds best if it's faded out. It only works on percussive material but on the other hand: it's the only way to stretch drums without adding weird chorusing and general crappyness to the sound.
So I want this looping to be faded out, but I'd like to avoid hard coding an envelope that would fade out the pingpong loop automatically - someone might want to use the stuttering loop sound as an effect, and a fixed envelope for the loop would limit the duration (maximum stretch)
To summerize: when you stretch percussive material (using ping pong loops) you usually don't want the sum of the "attack" and "hold" stages to exceed the original duration.
Now I could have the attack and hold durations be relative to the original slice and the decay be relative the the stretched duration, but that's just confusing!

I don't have to make big changes to implement a new "stretch" parameter, and limit the duration of events to the original duration of the slice multiplied with the value of the stretch parameter.

To make this work however, I'd have to automatically adjust the hold and decay behind the scenes so that the decay would never exceed the original duration. Most users would not like to hear the stretching so it's a good compromise. I can always add "stutter", and "general fuckupper" parameters for us glitch fans ;-)
Also: having a separate "stretch" will be more open if I decide to add standard time stretching algos in the future (DIRAC or soundtouch for instance), as these algorithms stretch the whole sample, not just the tail, so I could keep the loop completely intact.

One more question related to the new AHD: I could change the behavior of the AHD envelope so that the values would always be relative to the slice duration (for simplicity). However I often find it very handy to specify an absolute duration so that all events are exactly 100ms with an attack of exactly 2ms etc. But then what if 3 events in a track have an original duration of only 70ms. ? Before stretching was implemented I recalculated the values of the AHD parameters to keep the original envelope shape, but the events were only 70 ms. long.
There are two good solutions to this:
one would be to add an "auto" mode to the stretch parameter so that it would automatically grow if events exceeded the maximum duration.
Another is to have the parameter slider stop when you reach the maximum duration - this would indicate that if you want more duration, you need to go to the stretch parameter and change it. If the slice is 70 ms and you have: A:10ms, H: 50ms, then the release can't go any higher than 10ms.

Finally I've decided to add two modes of auto stretch: one only looks at the relation between the loop tempo and the song tempo, the other stretches the audio to fill all gaps in the track (I found that I often do this manually when rearranging)
http://www.livelab.dk - slice up your life

Post

Ohm, thanks for the detailed response - I'll need to think through it (and play with today's beta release).
;)
DarkStar, ... Interesting, if true
Inspired by ...

Post

OK, some Questions first: How much Stretching ?

Q 006:
[LS 1.4.5 beta4_3]
First of all, if my loop tempo is the same as the host tempo, why does [stretch] change the waveform displays and [AHD] values? I would think that they would not change.

Q 007:
[LS 1.4.5 beta4_3]
Secondly, it looks like [Stretch] always sets the [A] value to 0ms and the [H] value to
80% of {Edited} a 90% scale (that is 72%).
Is this right?

Q 008:
[LS 1.4.5 beta4_3]
Thirdly, the loop tempo is 120bpm and the host tempo 108 bpm (90% of loop)
The event's [AHD] envelope was 1%, 96% 3% (= 1 beat)

I stretched it and the envelope values changed to 0ms, 80% of 90% and 19% of 600%.
This = 0% +72% + 114% = 186%.

I would think that the duration should be 11% longer (as 120/108 = 1.11)
What am I misunderstanding?
Last edited by DarkStar on Fri Feb 09, 2007 1:39 pm, edited 1 time in total.

Post

I know the figures seem a bit off, the values are chosen because I thought it sounded better this way. I might have over exagerated the overlap.
I'm using an logarithmic fade, so in the last part of the decay, the volume is almost inaudible, and if the durations were exact, you'd hear gaps, and avoiding gaps is what the stretching is all about.
The reason for the 90% hold is to lower the volume before the sound starts looping.
I can see why it's confusing, and here's what I am considering:
Instead of changing the attack and hold values I'll keep the current values as they are. Then simply set the decay to fill the gaps. I'll make some behind the scenes ajustments to get the sound I want without confusing the GUI side of things.

The alternative is to add that stretch parameter and have the relative durations of the attack, hold and decay be relative to the stretched duration, then fix the hold and decay "behind the scenes" to make it sound as natural as possible.
http://www.livelab.dk - slice up your life

Post

ohm wrote: The alternative is to add that stretch parameter and have the relative durations of the attack, hold and decay be relative to the stretched duration, then fix the hold and decay "behind the scenes" to make it sound as natural as possible.
This alternative looks quite nice! Seems less 'confused' (though I'm getting more and more used to the way stretch is presently implemented :wink: )

Post

I've added the stretch parameter, and it works very well. I've still to limit the relative duration to 100% so that if you make the decay longer the hold value is made shorter automatically (like when moving a point in an envelope). P.S. yes you will have volume envelopes, it's just not a priority right now :-)
So far it can only stretch as in "make the duration longer than the original" it can't make the duration shorter. I'm not sure if this is desirable. It's a very simple change to enable this it's more of a question of terminology: when you read the term "stretch" do you expect it to be able to "compress" the duration as well as stretching it?
http://www.livelab.dk - slice up your life

Post

Cool for the stretch parameter :)
Actually, IMHO, making the duration shorter by stretching is obvious when you have to do so for whole loops etc. but for a slice (which by definition, can be likened to 'one-shot sample'), making the duration shorter can merely be done by decreasing the decay parameter?
Therefore, maybe there's no need for the stretch function to 'make the duration shorter'?

Ohm, do you remember the stretch button function we discussed a few weeks ago? Will it be possible for you to implement it in the next version :oops: ?:
ohm wrote:
GilJ wrote: BR3/ The Stretch button is no more a toggle button
-> Is it still possible to continue using the stretch button as in older version (I.E. re-pitch, with RMB on stretch button for example?)
good idea, RMB on stretch it is then.
I agree that there's an idea in having it a toggle button, so that once stretch is activated, it will automatically stretch to follow the project tempo.
Cheers,
GilJ.

Post

Ohm, I've been testing LiveSlice v145b6, but there are a few functions that seem rather confused or 'unnatural' to me concerning the famous stretch function :wink:

I think that the simplest way for me to expose the issue, is to explain what I consider as 'natural':
I don't know if the stretch & AHD parameters should be correlated?
I expect that the AHD should operate 'after' the stretch function of an event:
Event --> Stretching (+ or -) --> AHD on the stretched sample

By the way, I don't really understand why changing the Attack parameter for instance, changes the length of the event?
If the event is 200ms long, the Attack parameter shouldn't affect its duration, but in a certain way, only the 'volume', should it?
IMO, the only parameters which should affect the size of the events should be: H, D, Pitch and Stretch.

Don't know... may be I'm missing something quite important here? :help:

Thanks in advance for helping me light up my thoughts :wink:


Cheers,
GilJ.

Post

GilJ, thanks for your comments.

The attack parameter will only affect the duration if it's in "absolute" mode. I can see why this is confusing, so I'll definately change it.
The idea was that, when operating in "absolute" mode you'd get exactly the duration you input. So if you set attack to 10ms, hold to 80 ms and release to 10ms you'd get events of 100ms, even if some slices were shorter.
I agree though, that to keep things simple I have to break the link between the AHD and the stretching.
I'll simply limit the values of the AHD parameters so the duration cannot exeed the (stretched) duration of the original slice.
To simplify further I'll make the "absolute" and "relative" setting "global" for all three envelope parameters, so you can't have abslute attack, while keeping the hold and decay relative to the stretched duration.

Don't worry - the actual implementation will be simpler than the above explanation :-)
http://www.livelab.dk - slice up your life

Post

Cool Ohm, the explanation was clear and quite precise :)
Waiting impatiently for the new (more) 'ergonomical' version :wink:

Cheers,
GilJ.

Post

Ok it's done. Changing AHD no longer affects the duration. But I'm not quite sure what to do if you set, let's say the attack parameter so the duration exceeds the duration of the original slice (stretched and pitched). First I tried simply not to allow the attack to go higher than a certain value, but that was kind'a annoying because if you needed 20ms of attack on all events you'd tire of having to go and change the hold parameter to "make room".
On the other hand: when I automatically lowered the hold and decay parameters to make room, this got annoying too, because I'd suddenly be changing the attack while just adding a smoother decay.
I'm gonna try this: Require CTRL to be held down to enable the automatic AHD adjustments, with an option in "settings" to enable this behavior by default.
http://www.livelab.dk - slice up your life

Locked

Return to “Livelab.dk”