seamless .wav loop

Having trouble with LMMS? Ask about it here.
Hi,

is it possible in LMMS to repeat a .wav Loop seamless in the Sample-Track editor?
I have always spaces between the Loops.

Thx
DiViNiTY
The short answer: yes! ;)

I've experimented a few times with guitar samples and it's quite possible. However there is no automatic function like there is to create seamless textures in the GIMP. Still, it isn't too hard to make a sample play seamless, so please bear with me.

If your sample is shorter than the time it takes to play one loop, you will always have a gap - but then, if the BPM is right, there should be a gap.
So basically the problems you could have are:
- when the sample starts or ends, you hear a clicking noise
- when the sample is longer than the loop, you hear the new loop starting while the sample is still playing
- the BPM does not match the speed of the sample at all

The last case is the hardest to solve - if you don't know the proper BPM of your sample, you will have to do some experimenting / tweaking. I usually prefer to simply let LMMS loop one bar in the Song-Editor and play with the BPM till the rhythm starts making sense. Sometimes the BPM of the sample has been mangled, like when you inproperly load a sample from 48000Hz as 44100Hz; it then plays at 91.9% of its normal speed, so 120 bpm would become 110 BPM.

When the BPM is right, only the two above problems should concern you - and they're easy to solve. All you really need is to use a volume envelope - something to determine how the volume of the sample behaves each time it's played. The volume envelope can be found in each plugin. Simply open the instrument by double-clicking on its label; beneath the volume, panning and pitch knob area, there is a small bar with the items Plugin, ENV/LFO, Func, FX and MIDI. The item or tab ENV/LFO is the one you need. In it are two areas, one for the envelope and one for LFO. The above is the envelope. The knob right to the graph labled Amt determines the influence of the envelope - by default, its set not to influence the file.

To get into every detail of the workings of the envelope would require too much space and effort - for additional information you could visit the LMMS wiki paragraph about the ENV/LFO tab. The most important two things for a seamless .wav loop are the way it starts and ends; the attack time, hold time and sustain/decay time are most important for those.
- To get rid of the click when a sample starts, set the attack time to something like .05 (but be sure to tweak it for each sample individually).
- To make sure the sample is tuned down before a new loop starts, first turn down decay, and release completely, sustain up completely, and tweak Hold till the sample is just too short; then tweak decay till you find the point you want the sample to be absolutely silent.
- To have a it of murmur to cross the gap between two loops/samples, turn down sustain; sustain is the influence of the volume (exactly like Amt does) from the point where the sample decays. So a small value for sustain means that the sample plays largely like it normally would; a full value for sustain means it does exactly what the envelope says (provided Amt is full too, that is).
- To have a sample overlap the next loop partially, use Release and make sure Hold and Decay are long enough.

Now your sample starts cleanly and ends cleanly - together with the right BPM, it should be seamless now!

In retrospect it doesn't look as easy as I thought it would though, but nevertheless when you get the hang of tweaking envelopes, you'll love it. And then even more when you find out there are Cutoff and Resonance envelopes inside the ENV/LFO tab too.. ;) Hope this helps!