back to list

soundfonts and looping

🔗Christopher Bailey <chris@...>

12/11/2007 7:27:04 AM

Why do soundfonts loop, as opposed to doing some kind of random access
granular synthesis? Aren't the '80's over? This is how my [what are
essentially] soundfonts are programmed. The great thing is, you can make
fiarly life-like long tones out of a very short tone --- and you don't hear
any "looping", becase each "loop" is grabbed slightly differently out of the
original sample.

[Non-text portions of this message have been removed]

🔗Joe <tamahome02000@...>

12/11/2007 7:43:55 AM

Also, the padsynth module in zynaddsubfx starts from a random position.

Btw, I just heard of a commercial sampler that became free,
Shortcircuit. It supports VstMidiEvent.detune, if the host will send
it (Cubase microtuner, Fruity Loops, Plogue Bidule).

Joe

--- In MakeMicroMusic@yahoogroups.com, "Christopher Bailey"
<chris@...> wrote:
>
> Why do soundfonts loop, as opposed to doing some kind of random access
> granular synthesis? Aren't the '80's over? This is how my [what are
> essentially] soundfonts are programmed. The great thing is, you can
make
> fiarly life-like long tones out of a very short tone --- and you
don't hear
> any "looping", becase each "loop" is grabbed slightly differently
out of the
> original sample.
>
>
> [Non-text portions of this message have been removed]
>

🔗Carl Lumma <carl@...>

12/11/2007 7:49:13 AM

Christopher Bailey wrote...

>Why do soundfonts loop, as opposed to doing some kind of random access
>granular synthesis?

Not sure what you mean, but granular synthesis is usually a
technique apart from sampling. But the best samples don't loop.

>Aren't the '80's over? This is how my [what are
>essentially] soundfonts are programmed. The great thing is, you can
>make fiarly life-like long tones out of a very short tone --- and you
>don't hear any "looping", becase each "loop" is grabbed slightly
>differently out of the original sample.

How is that granular synthesis?

-Carl

🔗Aaron Krister Johnson <aaron@...>

12/11/2007 8:06:16 AM

--- In MakeMicroMusic@yahoogroups.com, "Christopher Bailey"
<chris@...> wrote:
>
> Why do soundfonts loop, as opposed to doing some kind of random access
> granular synthesis? Aren't the '80's over? This is how my [what are
> essentially] soundfonts are programmed. The great thing is, you can
make
> fiarly life-like long tones out of a very short tone --- and you
don't hear
> any "looping", becase each "loop" is grabbed slightly differently
out of the
> original sample.

I'd love to see the code of how this works...and some explication
through an audio example.

My one question would be--how does the granular synthesis preserve the
wave phase information? for example, let's say your sample has some
gentle low frequency beating...a good loop point might be found that
preserves this effect, the expense being long-term stasis..how would
the granular approach preserve this?

I would imagine what you describe would work well with bowed and wind
instruments, b/c it could capture the randomness of the driving force,
though...maybe that's what you were saying all the time. It would be
CPU intensive when done real-time, though, I would think. Looping is
CPU cheap.

Anyway, show us the code---do you do this in Cmix? Cmix ain't
real-time, though. It could then be translated to CSound, which is
real-time, but in my experience, not as reliable in real-time
mode....SIGH!

-AKJ.

🔗Aaron Krister Johnson <aaron@...>

12/11/2007 4:34:23 PM

--- In MakeMicroMusic@yahoogroups.com, Carl Lumma <carl@...> wrote:
>
> Christopher Bailey wrote...
>
> >Why do soundfonts loop, as opposed to doing some kind of random access
> >granular synthesis?
>
> Not sure what you mean, but granular synthesis is usually a
> technique apart from sampling. But the best samples don't loop.

At some point, for a sustained tone, they have to, unless you use a
technique similar to what Chris might be describing.

> >Aren't the '80's over? This is how my [what are
> >essentially] soundfonts are programmed. The great thing is, you can
> >make fiarly life-like long tones out of a very short tone --- and you
> >don't hear any "looping", becase each "loop" is grabbed slightly
> >differently out of the original sample.
>
> How is that granular synthesis?

I can't speak for him, but I think he means volume enveloping a bunch
of 10ms or so snapshots derived from an instrument sample, and
stringing them together, with a possible ADSR 'performance' envelope
shaping the whole note event. The question I would have is what effect
the grain size would have on pitch, and would the grain size change?

I would love to hear a demonstration of all this, Chris---how would
you, say, 'synthesize' using a sample and grains, a violin?

-AKJ

🔗Carl Lumma <carl@...>

12/11/2007 7:16:56 PM

At 04:34 PM 12/11/2007, you wrote:
>--- In MakeMicroMusic@yahoogroups.com, Carl Lumma <carl@...> wrote:
>>
>> Christopher Bailey wrote...
>>
>> >Why do soundfonts loop, as opposed to doing some kind of random access
>> >granular synthesis?
>>
>> Not sure what you mean, but granular synthesis is usually a
>> technique apart from sampling. But the best samples don't loop.
>
>At some point, for a sustained tone, they have to, unless you use a
>technique similar to what Chris might be describing.

For a piano or any other instrument with natural decay, they don't.

>> >Aren't the '80's over? This is how my [what are
>> >essentially] soundfonts are programmed. The great thing is, you can
>> >make fiarly life-like long tones out of a very short tone --- and you
>> >don't hear any "looping", becase each "loop" is grabbed slightly
>> >differently out of the original sample.
>>
>> How is that granular synthesis?
>
>I can't speak for him, but I think he means volume enveloping a bunch
>of 10ms or so snapshots derived from an instrument sample, and
>stringing them together, with a possible ADSR 'performance' envelope
>shaping the whole note event. The question I would have is what effect
>the grain size would have on pitch, and would the grain size change?

Granular synthesis usually involves simultaneous grains.

-Carl

🔗Aaron Krister Johnson <aaron@...>

12/11/2007 8:24:49 PM

--- In MakeMicroMusic@yahoogroups.com, Carl Lumma <carl@...> wrote:
>
> At 04:34 PM 12/11/2007, you wrote:
> >--- In MakeMicroMusic@yahoogroups.com, Carl Lumma <carl@> wrote:
> >>
> >> Christopher Bailey wrote...
> >>
> >> >Why do soundfonts loop, as opposed to doing some kind of random
access
> >> >granular synthesis?
> >>
> >> Not sure what you mean, but granular synthesis is usually a
> >> technique apart from sampling. But the best samples don't loop.
> >
> >At some point, for a sustained tone, they have to, unless you use a
> >technique similar to what Chris might be describing.
>
> For a piano or any other instrument with natural decay, they don't.

I meant exactly that---'sustained' tone in contrast to 'natural
decay'..I agree the best samples of decaying instruments don't loop.

🔗Carl Lumma <carl@...>

12/11/2007 8:40:57 PM

>> For a piano or any other instrument with natural decay, they don't.
>
>I meant exactly that---'sustained' tone in contrast to 'natural
>decay'..I agree the best samples of decaying instruments don't loop.

Even with strings, the loop points may never appear in most
pieces. Vienna even has sampled scales and figures.

-Carl

🔗Graham Breed <gbreed@...>

12/11/2007 9:12:01 PM

Christopher Bailey wrote:
> Why do soundfonts loop, as opposed to doing some kind of random access
> granular synthesis? Aren't the '80's over? This is how my [what are
> essentially] soundfonts are programmed. The great thing is, you can make
> fiarly life-like long tones out of a very short tone --- and you don't hear
> any "looping", becase each "loop" is grabbed slightly differently out of the
> original sample.

The SoundFont format is very closely tied to the capabilities of the AWE32. According to Wikipedia that came out in 1994, which wasn't long after the 80s. There seem to be updates for things like 24-bit samples, but in the large soundfonts only specify things that an AWE32 could do.

That's good in a way because it means the implementations are simple and give consistent results. The problem of course is that it's not very flexible. If you want to do something an AWE32 couldn't do you'll need a standard instrument definition format. I don't know of any with multiple implementations because the format has to pretty much mirror the implementation.

I found an sfz description here:

http://www.cakewalk.com/DevXchange/sfz.asp

It's similar to the SoundFont model but allows cross-fades. That solves the biggest problem I had with soundfonts. I could hear where the zones changed over because there'd be a different sample. I think you could fake crossfades with key scaling zones but it's more straightforward to have direct support. It also means more samples playing at a time which was a problem way back when.

Graham