Discussion:
[music-dsp] Best way to do sine hard sync?
Tobias Münzer
2014-02-25 14:53:30 UTC
Permalink
Hi,

I would like to implement a hard-synced sine oscillator in my synth and
I am wondering which is the best way to do so.
I read the paper 'Generation of bandlimited sync transitions for sine
waveforms' by Vadim Zavalishin which compares several approaches.
Are there any better ways then the 'frequency shifting method' described
in the paper? (Better in terms of less aliasing, faster,..)

Thanks a lot

Best Regards
Tobias
robert bristow-johnson
2014-02-25 15:25:41 UTC
Permalink
On 2/25/14 9:53 AM, Tobias Münzer wrote:
> I would like to implement a hard-synced sine oscillator in my synth
> and I am wondering which is the best way to do so.
> I read the paper 'Generation of bandlimited sync transitions for sine
> waveforms' by Vadim Zavalishin which compares several approaches.
> Are there any better ways then the 'frequency shifting method'
> described in the paper? (Better in terms of less aliasing, faster,..)
>

is it another oscillator that you're syncing to? or are you trying to
sync to a general quasi-periodic waveform?

and then, how hard is the sync? are you trying to do multiple cycles of
the sine and then have a discontinuity as it snaps back in sync with the
side-chain waveform? if so, that doesn't sound very "bandlimited" to me.

in either case, i would use a simple wavetable and phase-accumulator for
the sine wave oscillator. and then derive the phase increment from the
other waveform. if the waveform is simple, or if it's another
oscillator and you already have the specified frequency, then this
should not be hard. but if you *don't* have the parameters of the other
waveform, you have to *get* them, and that sounds sorta like "pitch
detection" to me.

so, is your synced sine oscillator running alongside of another
oscillator that you, yourself are running? or is it running alongside
of an input waveform from somewhere else?


> Thanks a lot

FWIW.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Ross Bencina
2014-02-25 19:48:58 UTC
Permalink
On 26/02/2014 2:25 AM, robert bristow-johnson wrote:
> are you trying to do multiple cycles of the sine and then have a
> discontinuity as it snaps back in sync with the side-chain waveform? if
> so, that doesn't sound very "bandlimited" to me.

As I understand it, the question is now to make such snap-back band limited.

The approach that I am familiar with is the "corrective grains" approach
(AKA BLIT/BLEP/BLAMP etc) where you basically run a granulator that
generates grains that cancel the aliasing caused by the phase
discontinuity. The exact grain needed is dependent on the derivatives of
the signal (doable for sine waves). The original paper for this
technique is Eli Brandt (2001), "Hard sync without aliasing", Proc. ICMC
2001.: http://www.cs.cmu.edu/~eli/L/icmc01/hardsync.html

I have not read Vadim's paper so I am not familiar with the alternatives.

Ross.
robert bristow-johnson
2014-02-25 23:12:30 UTC
Permalink
On 2/25/14 2:48 PM, Ross Bencina wrote:
> On 26/02/2014 2:25 AM, robert bristow-johnson wrote:
>> are you trying to do multiple cycles of the sine and then have a
>> discontinuity as it snaps back in sync with the side-chain waveform? if
>> so, that doesn't sound very "bandlimited" to me.
>
> As I understand it, the question is now to make such snap-back band
> limited.

so that's the same issue with regular saw-sync or square-sync, but with
the sine instead.

> The approach that I am familiar with is the "corrective grains"
> approach (AKA BLIT/BLEP/BLAMP etc) where you basically run a
> granulator that generates grains that cancel the aliasing caused by
> the phase discontinuity. The exact grain needed is dependent on the
> derivatives of the signal (doable for sine waves). The original paper
> for this technique is Eli Brandt (2001), "Hard sync without aliasing",
> Proc. ICMC 2001.: http://www.cs.cmu.edu/~eli/L/icmc01/hardsync.html

yup that was the BLIT stuff, i think, so a sawtooth is the integral if
this BandLimited Impulse Train (with a little DC added).

> I have not read Vadim's paper so I am not familiar with the alternatives.

you can, pretty cleanly, if you have a lotta memory available to the
oscillator, have a family of curves that would replace the 2 or 4
samples immediately adjacent and both sides of the beginning of the
synced oscillator cycle. you need a family of curves because the of the
different states the sine wave would be in when you begin to "snap" the
phase back. if the curve tables have enough points, you can linearly
interpolate.

if this was a synced saw, you would need only one "snapback" curve
because the only difference, i think, would be just a scaler applied to
curve depending on the state of the saw wave.

exactly what the curve (and siblings) would be, mathematically, is not
something i will spell out. we all get to purvey our own particular
pixie dust (like some of us have for good old-fashioned bandlimited
interpolation between samples that might be burned into a chip like an
AD1890).

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Marco Lo Monaco
2014-02-26 09:03:33 UTC
Permalink
>> yup that was the BLIT stuff, i think, so a sawtooth is the integral if
this BandLimited Impulse Train (with a little DC added).

Ahaha, funny! Did you set sarcasm mode = on? :)))

Ciao Robert

Marco
robert bristow-johnson
2014-02-26 14:15:40 UTC
Permalink
On 2/26/14 4:03 AM, Marco Lo Monaco wrote:
>>> yup that was the BLIT stuff, i think, so a sawtooth is the integral if
> this BandLimited Impulse Train (with a little DC added).
>
> Ahaha, funny! Did you set sarcasm mode = on? :)))
>

i guess i hadn't. a bandlimited sawtooth is not the integral of a BLIT
(with a touch of DC)??


--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Sampo Syreeni
2014-02-26 14:28:47 UTC
Permalink
On 2014-02-26, robert bristow-johnson wrote:

> On 2/26/14 4:03 AM, Marco Lo Monaco wrote:
>>>> yup that was the BLIT stuff, i think, so a sawtooth is the integral if
>> this BandLimited Impulse Train (with a little DC added).
>>
>> Ahaha, funny! Did you set sarcasm mode = on? :)))
>>
>
> i guess i hadn't. a bandlimited sawtooth is not the integral of a BLIT
> (with a touch of DC)??

When you integrate a single impulse, you get a step. When you integrate
a series of two impulses, one positive and one negative, you get a
rectangular pulse. Integrating a series of such pairs, suitably
constructed, buys you all rectangular waveforms in bandlimited form.
Triangles are integrated squares with a variable amount of DC, sawtooths
are the limiting case of those where you've made one of the slopes of
the triangle infinitely fast, that is the underlying rectangular
waveform has very uneven duty cycle while the area under the negative
and positive halfcycles is still equal (that's one way to approach a
delta/an impulse). In all cases you'll probably be using a leaky
integrator, so getting rid of the DC, because otherwise you risk blowing
up the integrator state.
--
Sampo Syreeni, aka decoy - ***@iki.fi, http://decoy.iki.fi/front
+358-40-3255353, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
robert bristow-johnson
2014-02-26 14:41:51 UTC
Permalink
On 2/26/14 9:28 AM, Sampo Syreeni wrote:
> On 2014-02-26, robert bristow-johnson wrote:
>
>> On 2/26/14 4:03 AM, Marco Lo Monaco wrote:
>>>>> yup that was the BLIT stuff, i think, so a sawtooth is the
>>>>> integral if this BandLimited Impulse Train (with a little DC added).
>>>
>>> Ahaha, funny! Did you set sarcasm mode = on? :)))
>>>
>>
>> i guess i hadn't. a bandlimited sawtooth is not the integral of a
>> BLIT (with a touch of DC)??
>
> When you integrate a single impulse, you get a step. When you
> integrate a series of two impulses, one positive and one negative, you
> get a rectangular pulse. Integrating a series of such pairs, suitably
> constructed, buys you all rectangular waveforms in bandlimited form.
> Triangles are integrated squares with a variable amount of DC,
> sawtooths are the limiting case of those where you've made one of the
> slopes of the triangle infinitely fast, that is the underlying
> rectangular waveform has very uneven duty cycle while the area under
> the negative and positive halfcycles is still equal (that's one way to
> approach a delta/an impulse). In all cases you'll probably be using a
> leaky integrator, so getting rid of the DC, because otherwise you risk
> blowing up the integrator state.

so, i'll repeat the question: a bandlimited sawtooth is not the
integral of {a BLIT with a touch of DC}?

i don't mean triangles or square waves, just a simple alias-suppressed
saw, derived from BLIT.

(so when you differentiate an unbandlimited saw, you have *pairs* of
impulses per cycle?

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
STEFFAN DIEDRICHSEN
2014-02-26 15:06:52 UTC
Permalink
It is.
The DC offset defines the slope and the impulse is the reset, if sgn(DC offset) * sgn (impulse) == -1.

Of course, a leaky integrator, like Sampo suggested, is helpful to suppress accumulated precision errors.

Best,

Steffan



On 26 Feb 2014, at 15:41, robert bristow-johnson <***@audioimagination.com> wrote:

> so, i'll repeat the question: a bandlimited sawtooth is not the integral of {a BLIT with a touch of DC}?
Tobias Münzer
2014-02-26 15:36:10 UTC
Permalink
Am 26.02.2014 15:15, schrieb robert bristow-johnson:
> On 2/26/14 4:03 AM, Marco Lo Monaco wrote:
>>>> yup that was the BLIT stuff, i think, so a sawtooth is the integral if
>> this BandLimited Impulse Train (with a little DC added).
>>
>> Ahaha, funny! Did you set sarcasm mode = on? :)))
>>
>
> i guess i hadn't. a bandlimited sawtooth is not the integral of a
> BLIT (with a touch of DC)??
>
>
Yes, it is. If you differentiate a sawtooth you get DC + a negative
impulse train.
Marco Lo Monaco
2014-02-26 15:49:55 UTC
Permalink
Yes it is. And it is true even in analog domain...if you only could have
dirac pulse realized on a circuit :)
Mathematically and in continuous time they are the same: it is the basic
starting concept of BLIT (see also Stilson paper)
Hope to have helped...and sorry if I misunderstood your words Robert :-)

M.

-----Messaggio originale-----
Da: music-dsp-***@music.columbia.edu
[mailto:music-dsp-***@music.columbia.edu] Per conto di robert
bristow-johnson
Inviato: mercoledì 26 febbraio 2014 15:16
A: music-***@music.columbia.edu
Oggetto: Re: [music-dsp] R: Best way to do sine hard sync?

On 2/26/14 4:03 AM, Marco Lo Monaco wrote:
>>> yup that was the BLIT stuff, i think, so a sawtooth is the integral
>>> if
> this BandLimited Impulse Train (with a little DC added).
>
> Ahaha, funny! Did you set sarcasm mode = on? :)))
>

i guess i hadn't. a bandlimited sawtooth is not the integral of a BLIT
(with a touch of DC)??


--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp
robert bristow-johnson
2014-02-26 16:44:03 UTC
Permalink
On 2/26/14 10:49 AM, Marco Lo Monaco wrote:
> Yes it is. And it is true even in analog domain...if you only could have
> dirac pulse realized on a circuit :)
> Mathematically and in continuous time they are the same: it is the basic
> starting concept of BLIT (see also Stilson paper)
> Hope to have helped...and sorry if I misunderstood your words Robert :-)

well, i was wondering if i misunderstood something, which happens often.

just to be clear: while i *have* implemented some alias-suppressed saws
and squares (with adjustable duty cycles) and an alias-suppressed sync
saw, i have never implemented any BLIT or BLEP or BLAP or whatever. i
have only read about them.

if memory available to the oscillator is no problem, then i would
synthesize *any* periodic or quasi-periodic waveform with wavetable
synthesis and interpolate (crossfade) between wavetables. that includes
these sync saws or sync squares or sync whatever. but sometimes the
hardware one must work in does *not* have very much memory (like a
half-dozen registers at most), and then you have to do this
algorithmically. at this point i gotta keep my mouth shut.

but if you're doing this in a plugin or with a general-purpose CPU, i
wouldn't bother with any of this BLIT or BLAP stuff. or some other
algorithmic approach. i would just do it with wavetables and
interpolate. to define the wavetables to be sufficiently bandlimited,
you might need to write a few MATLAB scripts.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Marco Lo Monaco
2014-02-26 17:37:05 UTC
Permalink
Agreed 100%.
Moreover in my experience BLIT with leaky integrators fails on frequency
modulations, other approach like BLIT-SWS are more complicated but if memory
is not an issue wavetable is the choice.

BTW a smarter approach is needed for hardsync because a user request is to
change at processtime continuously the slave frequency and of course it
looks unfeasible to tabulate samples for all possible hardsync ratios (even
if you have a lot lot of memory sounds like an overkill to me).

BLIT BLEP BLAMP sounds like a quote from Mel Brook's "Space balls" :)

M.

-----Messaggio originale-----
Da: music-dsp-***@music.columbia.edu
[mailto:music-dsp-***@music.columbia.edu] Per conto di robert
bristow-johnson
Inviato: mercoledì 26 febbraio 2014 17:44
A: A discussion list for music-related DSP
Oggetto: Re: [music-dsp] R: R: Best way to do sine hard sync?

On 2/26/14 10:49 AM, Marco Lo Monaco wrote:
> Yes it is. And it is true even in analog domain...if you only could
> have dirac pulse realized on a circuit :) Mathematically and in
> continuous time they are the same: it is the basic starting concept of
> BLIT (see also Stilson paper) Hope to have helped...and sorry if I
> misunderstood your words Robert :-)

well, i was wondering if i misunderstood something, which happens often.

just to be clear: while i *have* implemented some alias-suppressed saws and
squares (with adjustable duty cycles) and an alias-suppressed sync saw, i
have never implemented any BLIT or BLEP or BLAP or whatever. i have only
read about them.

if memory available to the oscillator is no problem, then i would synthesize
*any* periodic or quasi-periodic waveform with wavetable synthesis and
interpolate (crossfade) between wavetables. that includes these sync saws
or sync squares or sync whatever. but sometimes the hardware one must work
in does *not* have very much memory (like a half-dozen registers at most),
and then you have to do this algorithmically. at this point i gotta keep my
mouth shut.

but if you're doing this in a plugin or with a general-purpose CPU, i
wouldn't bother with any of this BLIT or BLAP stuff. or some other
algorithmic approach. i would just do it with wavetables and interpolate.
to define the wavetables to be sufficiently bandlimited, you might need to
write a few MATLAB scripts.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."



--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp
robert bristow-johnson
2014-02-26 18:15:02 UTC
Permalink
On 2/26/14 12:37 PM, Marco Lo Monaco wrote:
> Moreover in my experience BLIT with leaky integrators fails on frequency
> modulations,

i can imagine why. it's sorta like how some IIR filter topologies fail
with coefficient modulation.

this is another reason that i am a proponent of wavetable synthesis in
all contexts where memory resources allow. wavetable synthesis is more
like a basic FIR filter: nothing to blow up when parameters are modulated.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Marco Lo Monaco
2014-02-26 18:55:36 UTC
Permalink
Actually I can do a filter with time varying filter at audio rate with _NO_
glithces or artifacts, stable (essentially behaving like an analog one).
The point is that the BLIT harmonic content changes in modulation (because
you have to cut harmonics as you are sweeping hi) and that results in spikes
in amplitudes that are before the integrator (so the BLIT itself in
modulation clicks and pops). Since freq change could not happen at perfect
zerocrossings this effect is unavoidable (unless keeping the same harmonic
content for BLIT thus aliasing in sweeps which is awful to hear). Also
trying to change freq at zero crossing fails as your freq reaches high
values where periods are of a handful of samples.

M.

-----Messaggio originale-----
Da: music-dsp-***@music.columbia.edu
[mailto:music-dsp-***@music.columbia.edu] Per conto di robert
bristow-johnson
Inviato: mercoledì 26 febbraio 2014 19:15
A: A discussion list for music-related DSP
Oggetto: Re: [music-dsp] R: R: R: Best way to do sine hard sync?

On 2/26/14 12:37 PM, Marco Lo Monaco wrote:
> Moreover in my experience BLIT with leaky integrators fails on
> frequency modulations,

i can imagine why. it's sorta like how some IIR filter topologies fail with
coefficient modulation.

this is another reason that i am a proponent of wavetable synthesis in all
contexts where memory resources allow. wavetable synthesis is more like a
basic FIR filter: nothing to blow up when parameters are modulated.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
robert bristow-johnson
2014-02-26 19:27:57 UTC
Permalink
On 2/26/14 1:55 PM, Marco Lo Monaco wrote:
> Actually I can do a filter with time varying filter at audio rate with _NO_
> glithces or artifacts, stable (essentially behaving like an analog one).

you're not the only one that can do that. but, with an IIR, there are
problems that arise and must be dealt with. it's because of the feedback.

> The point is that the BLIT harmonic content changes in modulation (because
> you have to cut harmonics as you are sweeping hi)

that is the case with wavetable or non-BLIT-like methods, but i don't
see this at all with BLIT. the single BLI is bandlimited sufficiently
below Nyquist and it doesn't matter if there is one BLI or a BLIT at a
high rate or low rate as long as you overlap and add them correctly.
there remains no harmonics above Nyquist, no matter how many bandlimited
impulses that find themselves in your output.

and the integrator will not introduce new frequency components, since it
is only a filter.

but the integrator has feedback. to keep the short-term DC of the
integrator output from blowing up, for every positive value going in,
there must be an equal negative value. but, when a parameter changes,
that might not be the case and similar to a TIIR filter (which is a form
of FIR like a moving-average filter) you might be stuck with a turd in
the integrator that will not go away because the anti-turd never gets in
there and integrated because of the parameter change. and, especially
if it is not leaky (or not very leaky), it *never* forgets.

> and that results in spikes
> in amplitudes that are before the integrator (so the BLIT itself in
> modulation clicks and pops). Since freq change could not happen at perfect
> zerocrossings this effect is unavoidable (unless keeping the same harmonic
> content for BLIT thus aliasing in sweeps which is awful to hear). Also
> trying to change freq at zero crossing fails as your freq reaches high
> values where periods are of a handful of samples.

i don't really see it working that way. a BLIT oscillator should not be
designed around zero-crossings and such. in fact, i don't think any
"linear" process should be designed around zero-crossings. i *might*
design a pitch shifter or a time scaler using zero-crossings, but not a
linear process. and, since there might be a lot more than a single pair
of zero-crossings per cycle, i almost never pay any attention to them;
they cannot be depended on.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Marco Lo Monaco
2014-02-26 20:08:28 UTC
Permalink
I dont think in literature exist proofs of timevarying filter at audio rate
with no artifacts: afaik there is the minimum norm class and other
techniques to understand the minimum requirements for a topology to be
changed at every N sample minimum. If I am wrong I would love to have the
details and read the papers.
Yes I am talking about IIR and feedback of course and I have no problem
actually in converting any analog network changing at audio rate (thus
modulation of filter parameters etc). In my case I used a simple leaky
integrator time varying at audio rate tuned with the cutoff proportional to
the BLIT freq.

If you use BLI to make it periodic you need the SWS approach which contains
aliasing (creating a grain of a BLI which is windowed [thus aliasing],
something similar to Julius resampling TIIR method).

If you want no aliasing in BLIT you must use DSF or sincM who suffer of what
I already explained.

Using non-leaky integrators (ideal) leads to what you say (basically
roundoff errors which are never forgot) and AFAIK no one uses them.

Bottom line: yes you can use BLIT but to avoid all the annoying side-effects
you must take into account hacks that produce some aliasing which to me
sounds a fail, because theoretically the method is clean and robust. So if I
must have aliasing and fix all the side effects, to me it's better to switch
to a set of wavetable approach with some acceptable aliasing, which is easy
to modulate.

Talking about the zero-crossing was an possible hack only because BLIT has
NO aliasing if you use DSF/sincM, but you have clicks. It's not needed if
you use BLIT-SWS but you have aliasing and much smoothed clicks (for free
due to windowing).

Maybe not so clearly told, but I am in a rush cooking for my babies :)

Ciao

Marco


-----Messaggio originale-----
Da: music-dsp-***@music.columbia.edu
[mailto:music-dsp-***@music.columbia.edu] Per conto di robert
bristow-johnson
Inviato: mercoledì 26 febbraio 2014 20:28
A: A discussion list for music-related DSP
Oggetto: Re: [music-dsp] R: R: R: R: Best way to do sine hard sync?

On 2/26/14 1:55 PM, Marco Lo Monaco wrote:
> Actually I can do a filter with time varying filter at audio rate with
> _NO_ glithces or artifacts, stable (essentially behaving like an analog
one).

you're not the only one that can do that. but, with an IIR, there are
problems that arise and must be dealt with. it's because of the feedback.

> The point is that the BLIT harmonic content changes in modulation
> (because you have to cut harmonics as you are sweeping hi)

that is the case with wavetable or non-BLIT-like methods, but i don't see
this at all with BLIT. the single BLI is bandlimited sufficiently below
Nyquist and it doesn't matter if there is one BLI or a BLIT at a high rate
or low rate as long as you overlap and add them correctly.
there remains no harmonics above Nyquist, no matter how many bandlimited
impulses that find themselves in your output.

and the integrator will not introduce new frequency components, since it is
only a filter.

but the integrator has feedback. to keep the short-term DC of the
integrator output from blowing up, for every positive value going in, there
must be an equal negative value. but, when a parameter changes, that might
not be the case and similar to a TIIR filter (which is a form of FIR like a
moving-average filter) you might be stuck with a turd in the integrator that
will not go away because the anti-turd never gets in there and integrated
because of the parameter change. and, especially if it is not leaky (or not
very leaky), it *never* forgets.

> and that results in spikes
> in amplitudes that are before the integrator (so the BLIT itself in
> modulation clicks and pops). Since freq change could not happen at
> perfect zerocrossings this effect is unavoidable (unless keeping the
> same harmonic content for BLIT thus aliasing in sweeps which is awful
> to hear). Also trying to change freq at zero crossing fails as your
> freq reaches high values where periods are of a handful of samples.

i don't really see it working that way. a BLIT oscillator should not be
designed around zero-crossings and such. in fact, i don't think any
"linear" process should be designed around zero-crossings. i *might* design
a pitch shifter or a time scaler using zero-crossings, but not a linear
process. and, since there might be a lot more than a single pair of
zero-crossings per cycle, i almost never pay any attention to them; they
cannot be depended on.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
robert bristow-johnson
2014-02-26 21:42:00 UTC
Permalink
On 2/26/14 3:08 PM, Marco Lo Monaco wrote:
> Yes I am talking about IIR and feedback of course and I have no problem
> actually in converting any analog network changing at audio rate (thus
> modulation of filter parameters etc). In my case I used a simple leaky
> integrator time varying at audio rate tuned with the cutoff proportional to
> the BLIT freq.

not quite sure what is meant here, but i'm not drilling further.

> If you use BLI to make it periodic you need the SWS approach which contains
> aliasing (creating a grain of a BLI which is windowed [thus aliasing],
> something similar to Julius resampling TIIR method).
>

TIIR and resampling might both be JOS, but otherwise they're not the
same thing. resampling is Julius and Gossett and TIIR is Julius and Wang.

if memory is no problem, you can have a whole bunch of windowed sincs
stored in a table with different fractional delays ready to
rock-n-roll. if the window is good (like a Kaiser) and the length is
long enough (i think 16 samples is pretty good), i don't think there is
a practical aliasing issue at all. a grain that is a windowed sinc need
not have *any* practical aliasing issues at all. and if you have enough
windowed sincs at various fractional delays, you can construct a BLIT of
any fundamental frequency.

because of what i know about resampling (for sample rate conversion and
for fractional delay filters), if the windowed sinc was 32 samples long
and you had a version of it at 512 different equally-spaced fractional
delays and you linearly interpolated between two adjacent windowed
sincs, any aliasing issues are down 120 dB. i don't worry about -120 dB
in a music synthesis alg. i still think that a BLI that is 16 samples
long and at, maybe, 64 different fractional delays, will be more than
good enough using linear interpolation.


> If you want no aliasing in BLIT you must use DSF or sincM who suffer of what
> I already explained.
>

sorry, i'm clueless about the alfabet soup. i know "BLIT" and i know
"sinc".

> Using non-leaky integrators (ideal) leads to what you say (basically
> roundoff errors which are never forgot) and AFAIK no one uses them.

noise shaping deals with roundoff errors.

> Bottom line: yes you can use BLIT but to avoid all the annoying side-effects
> you must take into account hacks that produce some aliasing which to me
> sounds a fail, because theoretically the method is clean and robust. So if I
> must have aliasing and fix all the side effects, to me it's better to switch
> to a set of wavetable approach with some acceptable aliasing, which is easy
> to modulate.
>
> Talking about the zero-crossing was an possible hack only because BLIT has
> NO aliasing if you use DSF/sincM, but you have clicks. It's not needed if
> you use BLIT-SWS but you have aliasing and much smoothed clicks (for free
> due to windowing).
>
> Maybe not so clearly told, but I am in a rush cooking for my babies :)
>

take care of your kids. i'm doing similarly (but my baby is now 14
years old).


--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Rod Selfridge
2014-02-26 21:52:59 UTC
Permalink
> Date: Wed, 26 Feb 2014 16:42:00 -0500
> From: ***@audioimagination.com
> To: music-***@music.columbia.edu
> Subject: Re: [music-dsp] R: R: R: R: R: Best way to do sine hard sync?
>
> On 2/26/14 3:08 PM, Marco Lo Monaco wrote:
> > Yes I am talking about IIR and feedback of course and I have no problem
> > actually in converting any analog network changing at audio rate (thus
> > modulation of filter parameters etc). In my case I used a simple leaky
> > integrator time varying at audio rate tuned with the cutoff proportional to
> > the BLIT freq.
>
> not quite sure what is meant here, but i'm not drilling further.
>
> > If you use BLI to make it periodic you need the SWS approach which contains
> > aliasing (creating a grain of a BLI which is windowed [thus aliasing],
> > something similar to Julius resampling TIIR method).
> >
>
> TIIR and resampling might both be JOS, but otherwise they're not the
> same thing. resampling is Julius and Gossett and TIIR is Julius and Wang.
>
> if memory is no problem, you can have a whole bunch of windowed sincs
> stored in a table with different fractional delays ready to
> rock-n-roll. if the window is good (like a Kaiser) and the length is
> long enough (i think 16 samples is pretty good), i don't think there is
> a practical aliasing issue at all. a grain that is a windowed sinc need
> not have *any* practical aliasing issues at all. and if you have enough
> windowed sincs at various fractional delays, you can construct a BLIT of
> any fundamental frequency.
>
> because of what i know about resampling (for sample rate conversion and
> for fractional delay filters), if the windowed sinc was 32 samples long
> and you had a version of it at 512 different equally-spaced fractional
> delays and you linearly interpolated between two adjacent windowed
> sincs, any aliasing issues are down 120 dB. i don't worry about -120 dB
> in a music synthesis alg. i still think that a BLI that is 16 samples
> long and at, maybe, 64 different fractional delays, will be more than
> good enough using linear interpolation.
>
>
> > If you want no aliasing in BLIT you must use DSF or sincM who suffer of what
> > I already explained.
> >
>
> sorry, i'm clueless about the alfabet soup. i know "BLIT" and i know
> "sinc".
>
> > Using non-leaky integrators (ideal) leads to what you say (basically
> > roundoff errors which are never forgot) and AFAIK no one uses them.
>
> noise shaping deals with roundoff errors.
>
> > Bottom line: yes you can use BLIT but to avoid all the annoying side-effects
> > you must take into account hacks that produce some aliasing which to me
> > sounds a fail, because theoretically the method is clean and robust. So if I
> > must have aliasing and fix all the side effects, to me it's better to switch
> > to a set of wavetable approach with some acceptable aliasing, which is easy
> > to modulate.
> >
> > Talking about the zero-crossing was an possible hack only because BLIT has
> > NO aliasing if you use DSF/sincM, but you have clicks. It's not needed if
> > you use BLIT-SWS but you have aliasing and much smoothed clicks (for free
> > due to windowing).
> >
> > Maybe not so clearly told, but I am in a rush cooking for my babies :)
> >
>
> take care of your kids. i'm doing similarly (but my baby is now 14
> years old).
>
>
> --
>
> r b-j ***@audioimagination.com
>
> "Imagination is more important than knowledge."
>
>
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
Theo Verelst
2014-02-26 23:20:26 UTC
Permalink
Hi

Whilst among other things trying to re-remaster some of the nice music
tracks I've listen to since they came out, I've found out my
"collectors" Abba CDs in spite of being pretty well corrected to sound
ok, except for quite dreadfully compressed, sounded like someone had
been dubbing in other tracks of voices and instruments.

After some listening and experiments, I devised a trick to for the
moment erase that effect for most tracks, so I put this in a little youtube:

http://www.youtube.com/watch?v=5snh9UvAno4&feature=youtu.be

By no means feel obliged to look/listen at/to it, I wouldn't consider it
recommended reading for all people at all, but some may find it a bit
interesting. It's recorded with camera microphones and unedited.

Maybe there should be some rules to allow relevant science or testing
tracks to be shared with interested people. Since I don't know how much
would be allowed, it's hard to put up 96/24 flac files with examples,
even though I'm sure the results would interest some people! On my
rather neutral monitoring I can get pretty close to an upgraded
listening experience, as compared with good HiFis and new, quality
albums being played on them. A CD player and a contemporary consumer
HiFi set don't get that far at all, as far as I know, hopefully some
things can change for the better in that direction.

T.V.
Peter S
2014-02-26 23:36:59 UTC
Permalink
Hello Theo,

On 27/02/2014, Theo Verelst <***@theover.org> wrote:

> http://www.youtube.com/watch?v=5snh9UvAno4&feature=youtu.be

May I ask what kind of software do you use at 0:18? I couldn't
recognize it. What are those graph processors actually doing, and what
is their role for this example? Could you give a screenshot of them?
Sorry I just quickly glanced through the vid, and haven't fully
understood it.

> Since I don't know how much
> would be allowed, it's hard to put up 96/24 flac files with examples,
> even though I'm sure the results would interest some people!

If you have something intersting, I'm sure many of us would listen.

-Peter
Peter S
2014-02-27 09:30:17 UTC
Permalink
Checked the video again, so seems like you have some signal (music),
then you process that through some modular graph processor (maybe
something FFT-based?), plus (?) some hardware processor(s) (reverb?),
and then the two signals differ in the 2-4k range.

I'm not sure, what's that supposed to mean? Without more details, I'm
afraid it's not clear.

Anyways the graph looks interesting, I'd be curious what software that
is and what it does.

-Peter
Theo Verelst
2014-02-27 10:05:57 UTC
Permalink
The big graphs of signal processing are for things like mid-frequency
averaging, mid-low subbands tuning, sample spoiling removal,
low-frequency decompression, reverse CD equalization, and more than a
few other mastering effect corrections. If that doesn't mean anything to
you, fine, it has to do with standard signal processing in (as far as I
know) all A grade studio recordings. A while ago I've made a page about
(a part of) my processing steps of that kind, that you'll be able to
find back on this list or probably via Google.

That work isn't finished, various CDs and High Resolution materials I
have require yet more work to undo the effects I don't want or to
emphasize the things I want to hear on my monitors.

The small subject I've mentioned is a correction of a FFT-related
messing with the master tape or what it was people have used, and it is
executed by LADSPA effects running on 192kHz/32bit fl. p. on Linux.

Essentially the FFT based program "Jamin" uses the FFT bin filtering to
"carve out" only frequencies between 2 and 4 kHz, and it is followed by
a bank of 10 8th order filters, doing a 1/10 octave band filtering each,
ranging from 2 to 4 kHz. The result of that is summed (by adding the
signals in "Jack"), and compressed, phase inverted, and volume
controlled down to a very small (say -50 dBr) component which is added
to the remastered tracks I was playing.

T.
Peter S
2014-02-27 11:04:56 UTC
Permalink
Okay, so in a nutshell you are doing de-mastering and re-mastering on
a track (if I understand correctly).

It's still not clear, what is the conclusion from all this?

- Peter
Richard Dobson
2014-02-28 09:20:14 UTC
Permalink
Seems to me this is just replacing one sort of "messing" with another.
8th-order filters! The use of the word "correction" is interesting.
Apart from obvious true/false things such as digital clipping, it seems
to me that very little in musical audio can, in any scientific
deterministic way, be called either "correct" or "incorrect". It is like
seasoning with salt and pepper (or ketchup) - a matter of taste and
judgement. I cook with very little salt, so most shop-bought and even
some restaurant-bought foods taste too salty to me. Whereas most people
add salt, at least, before even tasting it. But I cannot say that my
amount of salt is "correct", or for that matter incorrect. And as for
added sugar, that is a whole other problem. Salt = EQ, and sugar =
reverb. Compression is probably MSG.

Yet even the modern fad for "death by compression", in the "loudness
wars" is ostensibly a "correct" commercial decision. As recording
purists we may not like it, but can't really argue about correctness or
otherwise. Clearly you have every right to season or otherwise transform
your music library in whatever way you choose, for your own listening
pleasure. People have done that with hifi tone controls (and even those
silly EQ controls) since amplifiers were invented. But calling it a
process of "correction" is so far an undocumented and (at least on the
basis of the video) an evidentially unsupported concept. Looking at FFT
displays is fun, and likewise comparing one form of measurement with
another, but is relatively uninformative in the absence of being able to
hear the before and after and make what inevitably will be an aesthetic
value judgement.


Richard Dobson


On 27/02/2014 10:05, Theo Verelst wrote:
>
> The big graphs of signal processing are for things like mid-frequency
> averaging, mid-low subbands tuning, sample spoiling removal,
> low-frequency decompression, reverse CD equalization, and more than a
> few other mastering effect corrections. If that doesn't mean anything to
> you, fine, it has to do with standard signal processing in (as far as I
> know) all A grade studio recordings. A while ago I've made a page about
> (a part of) my processing steps of that kind, that you'll be able to
> find back on this list or probably via Google.
>
> That work isn't finished, various CDs and High Resolution materials I
> have require yet more work to undo the effects I don't want or to
> emphasize the things I want to hear on my monitors.
>
> The small subject I've mentioned is a correction of a FFT-related
> messing with the master tape or what it was people have used, and it is
> executed by LADSPA effects running on 192kHz/32bit fl. p. on Linux.
>
> Essentially the FFT based program "Jamin" uses the FFT bin filtering to
> "carve out" only frequencies between 2 and 4 kHz, and it is followed by
> a bank of 10 8th order filters, doing a 1/10 octave band filtering each,
> ranging from 2 to 4 kHz. The result of that is summed (by adding the
> signals in "Jack"), and compressed, phase inverted, and volume
> controlled down to a very small (say -50 dBr) component which is added
> to the remastered tracks I was playing.
>
Sampo Syreeni
2014-02-28 10:47:07 UTC
Permalink
On 2014-02-28, Richard Dobson wrote:

> Apart from obvious true/false things such as digital clipping, it
> seems to me that very little in musical audio can, in any scientific
> deterministice way, be called either "correct" or "incorrect".

I'd argue even for clipping in some cases. Judiciously used it's just
another waveshaper, with nice, crunchy qualities.

> Yet even the modern fad for "death by compression", in the "loudness
> wars" is ostensibly a "correct" commercial decision.

Not to mention, it's impossible to "correct" something like that. The
trouble is, nowadays compression is not just a mostly-transparent
afterthought used to fit the dynamics into a limited channel and applied
in an open loop manner. It's part of the aesthetics of the music, which
feeds back so that the music itself is made to be compressed. The effect
is the same as with Gregorian chant: if you somehow managed to
deconvolve out the whole massive reverb, you wouldn't be left with a
more correct version, but something which was never intended to be
played except as the excitation to the instrument that is the space.

> As recording purists we may not like it, but can't really argue about
> correctness or otherwise. Clearly you have every right to season or
> otherwise transform your music library in whatever way you choose, for
> your own listening pleasure. People have done that with hifi tone
> controls (and even those silly EQ controls) since amplifiers were
> invented.

You're going to be adding a lot of unknowns and distortion sources to
the mix, however, if you start with blind processing of whatever comes
out of a modern studio. I can just barely agree with the idea of
automatic mastering to some kind of a tonal template, but going the
other way around I think mostly just leads to unpleasant surprises and a
lot of crud which is difficult to avoid without going back at least to
the final pre-mastering mix, or perhaps as far as the original
composition.

I also believe the examples Theo's given earlier lend some perceptual
support to my point. Despite lots of clever processing, the end result
at least to me just seems hazier than the original.
--
Sampo Syreeni, aka decoy - ***@iki.fi, http://decoy.iki.fi/front
+358-40-3255353, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
Emanuel Landeholm
2014-03-06 17:53:37 UTC
Permalink
Continuing off topic...

On "correction"; it's an interesting philosophical concept. I listen to
lots of audio books, and the program material comes with all kinds of
problems. Noise, too low volume due to spurious noise+peak-limiting, too
much dynamics etc. My typical listening device is my laptop's internal
speaker which doesn't play very loud (nor well), so too low volume is often
a problem.

I have been thinking about a processing chain that might solve some of
these issues.

1) Steep filter to isolate speech (100-4k?).
2) Noise gate
3) Some kind of "crystalizer" for extra "crunch"/contrast
4) Compression
5) Amplification to 0 - -3 dBFS

What do you think?

cheers,
Emanuel


On Fri, Feb 28, 2014 at 11:47 AM, Sampo Syreeni <***@iki.fi> wrote:

> On 2014-02-28, Richard Dobson wrote:
>
> Apart from obvious true/false things such as digital clipping, it seems
>> to me that very little in musical audio can, in any scientific
>> deterministice way, be called either "correct" or "incorrect".
>>
>
> I'd argue even for clipping in some cases. Judiciously used it's just
> another waveshaper, with nice, crunchy qualities.
>
>
> Yet even the modern fad for "death by compression", in the "loudness
>> wars" is ostensibly a "correct" commercial decision.
>>
>
> Not to mention, it's impossible to "correct" something like that. The
> trouble is, nowadays compression is not just a mostly-transparent
> afterthought used to fit the dynamics into a limited channel and applied in
> an open loop manner. It's part of the aesthetics of the music, which feeds
> back so that the music itself is made to be compressed. The effect is the
> same as with Gregorian chant: if you somehow managed to deconvolve out the
> whole massive reverb, you wouldn't be left with a more correct version, but
> something which was never intended to be played except as the excitation to
> the instrument that is the space.
>
>
> As recording purists we may not like it, but can't really argue about
>> correctness or otherwise. Clearly you have every right to season or
>> otherwise transform your music library in whatever way you choose, for your
>> own listening pleasure. People have done that with hifi tone controls (and
>> even those silly EQ controls) since amplifiers were invented.
>>
>
> You're going to be adding a lot of unknowns and distortion sources to the
> mix, however, if you start with blind processing of whatever comes out of a
> modern studio. I can just barely agree with the idea of automatic mastering
> to some kind of a tonal template, but going the other way around I think
> mostly just leads to unpleasant surprises and a lot of crud which is
> difficult to avoid without going back at least to the final pre-mastering
> mix, or perhaps as far as the original composition.
>
> I also believe the examples Theo's given earlier lend some perceptual
> support to my point. Despite lots of clever processing, the end result at
> least to me just seems hazier than the original.
> --
> Sampo Syreeni, aka decoy - ***@iki.fi, http://decoy.iki.fi/front
> +358-40-3255353, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
Theo Verelst
2014-03-06 19:52:38 UTC
Permalink
Emanuel Landeholm wrote:
> Continuing off topic...
>
> On "correction"; it's an interesting philosophical concept. I listen to
> lots of audio books, and the program material comes with all kinds of
> problems....

Of course that's an ancient problem. Tube tape recorders with crystal
microphones already had those types of problems, and of course it
depends on how and where you're listening, and how well certain
processing can work on the amps and speakers you happen to be using.
Like it is certainly possible to limit, pretty easy to give a little
straight amplification (if the player you use allows it), and, well
equalizers and "tone controls" have been around for a long time ! So why
not some digital versions of those, that shouldn't be a problem.

Choosing the right filter kinds, controlling phase issues and loudness
(short an long term, for when the materials are played on a potent
stereo system) control, and preserving the intended feel of the
recording are also important, and is where A grade recordings/records
can teach us a lot. I am also a fan of being as neutral as possible, as
in the more High Fidelity, the nicer, and I go pretty far with that,
also spec-wise. Natural amplification with as little as possible
distortion, sampling errors, and built-in limitations (like "tuned"
2-way systems, which often is produced form without people noticing) has
the advantage to be able to listen to a track or mix "as it is".

If neutrality also persists over a large dynamic range (which is the
case with my monitoring), it is possible the check out the Loudness
Curve sensitivities in well made tracks/mixes: at low volume it should
sound normal, and at loud volume the ratios of mid to high and low don't
suddenly sound like, euhm, "new" recordings..

Of course you can say "my monitors are norm" without every checking them
out with accurate test signals or measurement- and studio- microphones,
well fine, but chances are you're not going to get a lot of audio tasks
done if you're not honest with your monitoring. It could be you're going
to produce pathetic pieces of test music which sound divine to you, but
not to others.

And most of all, as soon as you alter mixes, you're responsible for your
listeners or even clients, down the line: are the demands for hearing
damage warnings still properly active in the tracks you process, is the
maker of the artwork on you tracks still satisfied when you have
processed their materials, and they are put on CD or the radio?

I have meant to repair materials, back to the state of the original
masters, with the proper Dolby settings on the tape they were made on.

Sometimes, I play with the A-grade studio ticks I know thus far, which
add two main things: a dimension (a "length") to parts of the sound,
which has as effect that the "shears" along walls and so on are well
behaved (as compared to say a Zoom H3 recording of the news-reader), and
the second thing is a by-product of a FFT-equalization, applied in
dynamic sense which adds Loudness insensitivity to the material, making
a track work better at lower and higher volumes.

If a track or mix is good (again..) I find it fun to play with pro
studio effects (of old) like Lexicon to see how well artificial
reverberation or other methods to create a nice full sound with hold up
when the track or mix is send through it, such as the ABBA example. So
then of course on a system which doesn't choke on the first warmth, and
doesn't kill all spatial information into dog food, it is fun game to
listen to, and a good (and difficult) signal test. By product of the
Lexicon effect unit responding well to a production is that usually it
will as a consequence also work good on a live amplification system (a
decent PA I mean not some piece of plastic on a wobbly pole).

T.
Emanuel Landeholm
2014-03-06 20:05:56 UTC
Permalink
> Choosing the right filter kinds, controlling phase issues and loudness
> (short an long term, for when the materials are played on a potent stereo
> system) control, and preserving the intended feel of the recording are also
> important, and is where A grade recordings/records can teach us a lot. I am
> also a fan of being as neutral as possible, as in the more High Fidelity,
> the nicer, and I go pretty far with that, also spec-wise. Natural
> amplification with as little as possible distortion, sampling errors, and
> built-in limitations (like "tuned" 2-way systems, which often is produced
> form without people noticing) has the advantage to be able to listen to a
> track or mix "as it is".


I think our goals part ways here. When listening to audio books via my
laptop speaker I'm not at all interested in "neutrality" or fidelity. I
just want the "text" conveniently delivered to the language processing part
of my brain. Substrate independence if you will. My goal is to spend a
minimum amount of energy on concentrating to pick up what the narrator
says. I don't need dynamics. For instance, I prefer a compressed and
amplified version of whispered speech (I have done listening tests) to
barely audible but "neutrally" rendered speech.

cheers,


On Thu, Mar 6, 2014 at 8:52 PM, Theo Verelst <***@theover.org> wrote:

> Emanuel Landeholm wrote:
>
>> Continuing off topic...
>>
>> On "correction"; it's an interesting philosophical concept. I listen to
>> lots of audio books, and the program material comes with all kinds of
>> problems....
>>
>
> Of course that's an ancient problem. Tube tape recorders with crystal
> microphones already had those types of problems, and of course it depends
> on how and where you're listening, and how well certain processing can work
> on the amps and speakers you happen to be using. Like it is certainly
> possible to limit, pretty easy to give a little straight amplification (if
> the player you use allows it), and, well equalizers and "tone controls"
> have been around for a long time ! So why not some digital versions of
> those, that shouldn't be a problem.
>
> Choosing the right filter kinds, controlling phase issues and loudness
> (short an long term, for when the materials are played on a potent stereo
> system) control, and preserving the intended feel of the recording are also
> important, and is where A grade recordings/records can teach us a lot. I am
> also a fan of being as neutral as possible, as in the more High Fidelity,
> the nicer, and I go pretty far with that, also spec-wise. Natural
> amplification with as little as possible distortion, sampling errors, and
> built-in limitations (like "tuned" 2-way systems, which often is produced
> form without people noticing) has the advantage to be able to listen to a
> track or mix "as it is".
>
> If neutrality also persists over a large dynamic range (which is the case
> with my monitoring), it is possible the check out the Loudness Curve
> sensitivities in well made tracks/mixes: at low volume it should sound
> normal, and at loud volume the ratios of mid to high and low don't suddenly
> sound like, euhm, "new" recordings..
>
> Of course you can say "my monitors are norm" without every checking them
> out with accurate test signals or measurement- and studio- microphones,
> well fine, but chances are you're not going to get a lot of audio tasks
> done if you're not honest with your monitoring. It could be you're going to
> produce pathetic pieces of test music which sound divine to you, but not to
> others.
>
> And most of all, as soon as you alter mixes, you're responsible for your
> listeners or even clients, down the line: are the demands for hearing
> damage warnings still properly active in the tracks you process, is the
> maker of the artwork on you tracks still satisfied when you have processed
> their materials, and they are put on CD or the radio?
>
> I have meant to repair materials, back to the state of the original
> masters, with the proper Dolby settings on the tape they were made on.
>
> Sometimes, I play with the A-grade studio ticks I know thus far, which add
> two main things: a dimension (a "length") to parts of the sound, which has
> as effect that the "shears" along walls and so on are well behaved (as
> compared to say a Zoom H3 recording of the news-reader), and the second
> thing is a by-product of a FFT-equalization, applied in dynamic sense which
> adds Loudness insensitivity to the material, making a track work better at
> lower and higher volumes.
>
> If a track or mix is good (again..) I find it fun to play with pro studio
> effects (of old) like Lexicon to see how well artificial reverberation or
> other methods to create a nice full sound with hold up when the track or
> mix is send through it, such as the ABBA example. So then of course on a
> system which doesn't choke on the first warmth, and doesn't kill all
> spatial information into dog food, it is fun game to listen to, and a good
> (and difficult) signal test. By product of the Lexicon effect unit
> responding well to a production is that usually it will as a consequence
> also work good on a live amplification system (a decent PA I mean not some
> piece of plastic on a wobbly pole).
>
> T.
>
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
Charles Z Henry
2014-03-06 22:53:54 UTC
Permalink
On Thu, Mar 6, 2014 at 11:53 AM, Emanuel Landeholm <
***@gmail.com> wrote:

> Continuing off topic...
>
> On "correction"; it's an interesting philosophical concept. I listen to
> lots of audio books, and the program material comes with all kinds of
> problems. Noise, too low volume due to spurious noise+peak-limiting, too
> much dynamics etc. My typical listening device is my laptop's internal
> speaker which doesn't play very loud (nor well), so too low volume is often
> a problem.
>

> I have been thinking about a processing chain that might solve some of
> these issues.
>
> 1) Steep filter to isolate speech (100-4k?).
>

Not a great idea over all. You might just mangle the audio a bit more. It
loses some temporal qualities when filtered too much. Listening to speech
relies a lot on temporal cues that you want to keep intact.

A broad filter with that much bandwidth would probably be negligible
however. The wider the bandwidth, the shorter the filter.


> 2) Noise gate
>

Probably a good idea to precede compression. You don't want to use the
noise gate after compression anyway.


> 3) Some kind of "crystalizer" for extra "crunch"/contrast
>

I'd advise not. It's just about vocal clarity. Enhancing speech features
would be inconsistent and not necessarily helpful.


> 4) Compression
>

Here you go. Definitely needed. Speech has a lot of pops, clicks, and
rarely a consistent volume level. You should definitely do something to
expand the lower volume levels and reduce the volume of sibilant and
percussive sounds.


> 5) Amplification to 0 - -3 dBFS
>

Scaling to full-scale by peak value is also important. If the result is
too soft in rms terms, you may apply an all-pass filter to shift the phases
and reduce the peaks. It's probably not necessary though.

I can't say what processing has already been done on your audio books.
Enhancing speech quality is a non-trivial problem--but if the engineers
have done an unsatisfying job, it can't hurt to tweak it to your tastes,
right?

Best,
Chuck


> What do you think?
>
> cheers,
> Emanuel
>
>
>
Peter S
2014-03-07 00:10:29 UTC
Permalink
On 06/03/2014, Charles Z Henry <***@gmail.com> wrote:

>> 1) Steep filter to isolate speech (100-4k?).
>>
>
> Not a great idea over all. You might just mangle the audio a bit more. It
> loses some temporal qualities when filtered too much. Listening to speech
> relies a lot on temporal cues that you want to keep intact.

I think probably he meant a multiband processor, using crossover
filters to isolate and process the important region (100-4k), and then
combine that with the rest of the (unprocessed) spectrum. At least
that's how I imagined it. Losing the high frequency formants above 4k
would decrease intelligibility a lot.

- Peter
Ethan Duni
2014-03-07 00:55:45 UTC
Permalink
> Losing the high frequency formants above 4k would decrease
intelligibility a lot.

Nah, band limiting speech to 4kHz has only a small impact on
intelligibility, at least in clean conditions. That's why telephony has
used (at best) 4kHz bandwidth since forever - most of us have never made an
actual live phone call with more than maybe 3.75kHz bandwidth (if that -
closer to 3kHz is common), and we all seem to be able to converse without
much issue. You can get higher bandwidths on over-the-top VOIP systems
(Skype, etc.) but in that case the higher latency often cancels out any
advantage of higher bandwidth in conversing, IMHO.

But one thing that increasing bandwidth definitely helps is fatigue. Our
brains have to do much less work to make sense of speech signals with
higher bandwidth (especially in noise), so we fatigue faster when we're
listening to speech with significantly reduced bandwidth. I guess this
happens because higher-level parts of the brain have to get involved in
order to resolve ambiguities (i.e., "did he just say 'cap' or 'cat?'" It's
probably clear from context, but not directly from the acoustic cues coming
out of the cochlea - meaning some higher level cognitive power has to be
expended to resolve the issue).

Anyway for something like an audiobook, where the idea is to listen for
long stretches of time and with minimal fatigue, I definitely agree that
bandwidth beyond 4kHz is indicated. It won't make it particularly more
intelligible, but it will make it more pleasant and relaxing to listen to.
And it's not like there's a big premium on reducing bandwidth like there is
in telephony, so why not?

That said you probably do still want to isolate the 4kHz band and process
it separately, since the structure of speech tends to be different in the
upper bandwidths (voicing tails off, time resolution becomes much more
important, etc.).

E


On Thu, Mar 6, 2014 at 4:10 PM, Peter S <***@gmail.com>wrote:

> On 06/03/2014, Charles Z Henry <***@gmail.com> wrote:
>
> >> 1) Steep filter to isolate speech (100-4k?).
> >>
> >
> > Not a great idea over all. You might just mangle the audio a bit more.
> It
> > loses some temporal qualities when filtered too much. Listening to
> speech
> > relies a lot on temporal cues that you want to keep intact.
>
> I think probably he meant a multiband processor, using crossover
> filters to isolate and process the important region (100-4k), and then
> combine that with the rest of the (unprocessed) spectrum. At least
> that's how I imagined it. Losing the high frequency formants above 4k
> would decrease intelligibility a lot.
>
> - Peter
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
Theo Verelst
2014-02-27 23:33:59 UTC
Permalink
Thinking a bit about the theoretical generalities involved in the
problem, it might be a good idea to imagine a few of the main "rules" in
the sampling domain, with the problem of limited bandwidth.

To know the exact phase of a sine wave in the sample domain it is at
least theoretically possible for instance to use proper sinc
interpolation, or long averaging of positive and negative halves or
something if you have a very long signal, and get good results, wthout
having to deal with aliasing or additional difficulties.

Frequency modulation, which is what happens when the "to be synced with"
signal changes from one frequency to another is theoretically not
limited in bandwidth, so that gives accruacy (aliasing) problems when
the change is fast. It could be there are mooth ways to define a sine
wave going from frequency to another, by fading in and out, which is
better behaved, but at any rate it pays to make an explicit model about
what the input signal actually behaves like, what you (have to) do to
bandwidth limit the input signal, and then explicitly chose for which
approximation you chose, and preferably how many samples 9and
computations !) it will take to get to the desired accuracy, or aliasing
is going to make a big mess of error estimates and tracking stability
guarantees.

Short resample filter with good bandwidth limiting aren't necessarily
accurate for find accurate frequency (may take a long number of samples,
or anyhow a longer sinc window). f course numerical stability for all
input signal is important, but if there are many changes of the input
signal in relative small number of samples, it may be necessary to use
considerable upsampling to be a bit sure of the resulting accuracy.

Of course all kinds of definitions are possible to do amplitude,
frequency and phase measurement, even for a sine sample with no DC
errors. A pure sine wave which is given to be of fixed frequency and
amplitude and perfectly equi-distant sampled with near infinite vertical
resolution, can be perfectly reconstructed, and then amplitude, phase
and frequency can be measured to any accuracy, so the phase at all
samples and the (fixed) frequency *can* be know at any sample or even in
between. So that's reassuring, no guesses or implicit accuracy
considerations needed.

Without all too much perfect reconstruction, you could try out some sort
of inversion where you use some form of iteration to estimate phase,
amplitude, and frequency of a sine wave running through N samples, until
you have a good idea how the test function A*sin(f*t+phi) can match some
number of samples you've got as the given samples representing the sine
wave to be measured. It might be you get multiple solutions, and I don't
know if you can guarantee error bounds. It may work though, but of
course as soon as the sine wave which needs to have it's frequency and
phase synced to (maybe the amplitude is a given ?) starts to change, the
iteration becomes harder (longer), and you need somehow to define
another test function to fit through the found samples, and a transition
morph from test function a to b (maybe you know the character of the
phase changes).

Some heuristic way may sound easier, but it may fail! And of course you
also need to figure out some way to make sure the phase/frequency
detection doesn't mess up too bad in the face of an input signal with
noise or errors, that may be hard, depending on what generates your
input sine wave, to which you want to synchronize. It's much easier of
you simply know the frequency, amplitude and phase of the input signal
somehow, a sort of Phase Locked Loop in the digital domain is even
trickier than in the analog domain, and might cost considerable delay
(integration to make the loop stable in the long run) to do right.

T.
robert bristow-johnson
2014-02-27 23:50:32 UTC
Permalink
On 2/27/14 6:33 PM, Theo Verelst wrote:
> Frequency modulation, which is what happens when the "to be synced
> with" signal changes from one frequency to another is theoretically
> not limited in bandwidth,

the issue is that, however you try to model it, the result of a
hard-sync oscillator is still periodic, for a fixed frequency ratio, and
quasi-periodic if that frequency ratio is swept. that periodic function
has harmonics that go on forever and we only need the ones that are
below 10 to 20 kHz.

> so that gives accruacy (aliasing) problems when the change is fast.

the aliasing problem isn't essentially about accuracy, as a property of
the sample values coming out. it is about harmonic overtones folding
over to non-harmonic frequencies and sounding like digital dog
excrement. so the issue is how to not do that. at least to some
perceptual extent. and this can be mitigated by somehow smoothing the
"flyback" on the edges. a "perfect" solution might have to be
algorithmic or the use of a lot of wavetables (with a little bit of
crossfading between them).

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Marco Lo Monaco
2014-02-26 22:11:49 UTC
Permalink
>TIIR and resampling might both be JOS, but otherwise they're not the same
thing. resampling is Julius and Gossett and TIIR is Julius and Wang.

Oh man. It was a long time ago that I looked on TIIR and I have been more
used to JOS resampling in the last years. I basically confused the idea of
TIIR with the windowed (truncated in mind) band limited impulse. 8-O Sorry!

>>if memory is no problem, you can have a whole bunch of windowed sincs
stored in a table with different fractional delays ready to rock-n-roll. if
the window is good (like a Kaiser) and the length is long enough (i think 16
>>samples is pretty good), i don't think there is a practical aliasing issue
at all. a grain that is a windowed sinc need not have *any* practical
aliasing issues at all. and if you have enough windowed sincs at various
fractional delays, >>you can construct a BLIT of any fundamental frequency.

>>because of what i know about resampling (for sample rate conversion and
for fractional delay filters), if the windowed sinc was 32 samples long and
you had a version of it at 512 different equally-spaced fractional delays
and >>you linearly interpolated between two adjacent windowed sincs, any
aliasing issues are down 120 dB. i don't worry about -120 dB in a music
synthesis alg. i still think that a BLI that is 16 samples long and at,
maybe, 64 different >>fractional delays, will be more than good enough using
linear interpolation.

That is BLIT-SWS: windowed sinc linearly interpolated. So we are clear on
this and agree on everything. Just know that at the beginning I was on the
quest of perfect algo for zero-alias, so accepting it even (if reduced) to
me was a turn off (but I am a perfectionist so apologies :D ).

>> If you want no aliasing in BLIT you must use DSF or sincM who suffer
>> of what I already explained.

sorry, i'm clueless about the alfabet soup. i know "BLIT" and i know
"sinc".

DSF is the Discrete Sumation Formulae (originally by Moorer I guess) and
sincM(x) = sin(pi x)/M sin(pi x/M): both provide a periodic pulse train
bandlimited (NO ALIAS).

>> Using non-leaky integrators (ideal) leads to what you say (basically
>> roundoff errors which are never forgot) and AFAIK no one uses them.

>noise shaping deals with roundoff errors.

Yes but...I dont follow you here (I intended no one uses ideal integrators
in BLIT). Ideal integration to me means the simple running sum as a trivial
example: so a running sum of past values has roundoff errors that at some
point will blow the integrator up. More generally DC gain is infinite in
integrators so any roundoff resulting in DC can be amplified infinitely.
That's why everybody uses leaky ones, and the TRI/SAW/SQR waveforms are not
"textbook-like".


>take care of your kids. i'm doing similarly (but my baby is now 14 years
old).

Thanks, same to you.

If you are interested in the subject I suggest to read the Stilson paper
about BLIT (if you haven't yet). I have basically explained in this thread
my experience in implementing all his techniques.
https://ccrma.stanford.edu/~stilti/papers/blit.pdf

Marco
Tobias Münzer
2014-02-26 10:51:40 UTC
Permalink
Hi thanks a lot for your answers,

25/02/2014 20:48, Ross Bencina wrote:
> The approach that I am familiar with is the "corrective grains"
> approach (AKA BLIT/BLEP/BLAMP etc) where you basically run a
> granulator that generates grains that cancel the aliasing caused by
> the phase discontinuity. The exact grain needed is dependent on the
> derivatives of the signal (doable for sine waves). The original paper
> for this technique is Eli Brandt (2001), "Hard sync without aliasing",
> Proc. ICMC 2001.: http://www.cs.cmu.edu/~eli/L/icmc01/hardsync.html

as far as I know the usual hard sync approaches (Blep, Blit,
Miniblep....) do not work for sine waves.
The reason is, that unlike saw or square waveforms that generate first
order discontinuities when synced,
sine waveforms generate infinite order discontinuities. This is
mentioned in Vadim Zavalishin (2009), "Generation of bandlimited sync
transitionsfor sine waveforms".

If this is not true and there is a suitable 'grain' for sine waves, do
you have any information on how to calculate it?


26/02/2014 10:02 Marco Lo Monaco wrote:
> following Ross advice one of the drawback that you will have to deal is the
> CPU usage at high master frequencies. Placing in an overlap and add fashion
> a grain is very convenient at low freqs but not so much at high. More over
> you will have to deal with some sort of DC offsets on the way (OLAdding the
> minBLEP grain - which is min-phase and not zero-phase and you should
> consider also some sort of look-ahead - with small hopsizes and maybe for
> short times because you are under a frequency master modulation will result
> in unpredictable offsets over your sin.
> Unfortunately Eli Brandts does not face this problem in the paper.

Thanks for the advice I will keep this in mind

regards
Tobias
Richard Dobson
2014-02-26 11:17:29 UTC
Permalink
I have an almost embarrassing question on this subject. Having lead far
too sheltered a life, I have never ~knowingly~ heard analog hard sync,
only this or that digital emulation; partly as I have never owned an
analog synth. So - is there an example file anywhere with the sampled
(with suitably ultra-high sr) waveform from an analog synth doing hard
sync? What does the real thing actually look like?

Richard Dobson
Risto Holopainen
2014-02-26 13:54:35 UTC
Permalink
Here's some examples made with a eurorack modular. The master oscillator is the tiptop Z3000 and the slave is an intellijel rubicon. The sine output of the slave oscillator is always in the right channel and the modulating output of the master oscillator is in the left channel throughout.
1) a sweep of the master frequency while the slave remains fixed.http://ristoid.net/sndex/hardsync_master_sweep.wav
2) the slave oscillator is swept while the master is fixed.http://ristoid.net/sndex/hardsync_slave_sweep.wav
Now, for my part, I find soft sync much more useful. I don't know what attempts there have been to do soft sync in digital oscillators, if anyone knows I'd be interested.
So here are a few examples of soft sync with the same setup.
3) The difference here from the previous example is that the master's sawtooth output is used. Here the master frequency is swept again.http://ristoid.net/sndex/softsync_master_sweep.wav
4) Similarly with the slave frequency swept.http://ristoid.net/sndex/softsync_slave_sweep.wav
5) Finally, keeping both frequencies fixed, the amount of modulation is increased from none to maximum and back to nothing. http://ristoid.net/sndex/softsync_amount_sweep.wav
When it comes to programming hard sync, I would use oversampling. I'm not saying that you should, I'm just lazy enough to do it the easy way.


Risto Holopainen

>
> I have an almost embarrassing question on this subject. Having lead far
> too sheltered a life, I have never ~knowingly~ heard analog hard sync,
> only this or that digital emulation; partly as I have never owned an
> analog synth. So - is there an example file anywhere with the sampled
> (with suitably ultra-high sr) waveform from an analog synth doing hard
> sync? What does the real thing actually look like?
>
> Richard Dobson
>
gwenhwyfaer
2014-02-26 15:45:27 UTC
Permalink
On 26/02/2014, Risto Holopainen <***@hotmail.com> wrote:
> When it comes to programming hard sync, I would use oversampling. I'm not
> saying that you should, I'm just lazy enough to do it the easy way.

You need to oversample a *lot* to chase away aliasing, though. The
Alesis Fusion - and its descendant, the M-Audio Venom, does the same -
does hard sync naively, by resetting the slave oscillator's phase to 0
every time the master crosses from negative to positive... only it
doesn't oversample at all and does the comparison on sample
boundaries, with the result that hard sync sounds *lousy* on the
Fusion. I've done a couple of experiments which appear to suggest that
the aliasing caused by this is *far* worse than that caused by not
bandlimiting the actual discontinuity - for example, by using a
"hidden master oscillator" (actually a fractional multiplier of the
phase counter) to read from a wavetable corrected only to the
frequency of the slave. In fact, you can bandlimit the discontinuity
as much as you please, and it'll *still* sound awful, because you're
essentially randomising the pitch of the oscillator. Worse, even if
your slave is running at exactly the same frequency as its master,
you'll STILL get random glitches in the sound as its phase is reset to
exactly 0 when the master's phase is some tiny fraction greater than
0.

And the sad thing is, there's no justification for it. In the Venom,
for example, you're always syncing to oscillator 1 - which means that
you know the frequency ratio between the two oscillators. Moreover,
you're syncing against a known waveform - which means you also know
when exactly that waveform will cross from negative to positive.
Therefore, when your slave detects that it did, rather than resetting
itself to 0, it can reset itself to the difference between the actual
phase of the master and the phase at which the master would have
crossed 0, multiplied by the slave:master frequency ratio. For
sawtooth and pulse waves, of course, that's particularly simple -
there's only one zero-crossing per cycle, and if you make sure that
zero-crossing is always at the point where the phase is 0, you can use
the carry of the master's phase accumulator to detect sync, then
multiply the master's current phase by the slave:master ratio and set
the slave's phase to that. And lo! - no more random-frequency-wibbling
alias. *Then* you can start worrying about how to bandlimit the
slave's phase.

Sorry for going on at length about something that is surely obvious to
everyone else here (I know nowt about owt) but it really bugs me - and
clearly it wasn't obvious to Alesis when they designed the Fusion. And
in fairness, the Fusion could sync to itss noise generator or an
arbitrary signal coming into the audio inputs (can any other VA do
this? Nord Modular, perhaps?) at which point the naive approach is the
best you can do without either intepolating between input samples
(which needs division) or upping the input sample rate - but even so,
99% of the time the Fusion is still syncing to another oscillator
whose frequency and waveform it necessarily knows. And there's just no
excuse for the Venom.

*spent and tremulous, returns to hiding under desk*
gwenhwyfaer
2014-02-26 15:50:09 UTC
Permalink
"bandlimit the slave's phase" -> "bandlimit the slave's output". oops.

and I do know how to spell interpolation, honest.
Tobias Münzer
2014-02-26 15:50:36 UTC
Permalink
Yes,

an easy fix to avoid this kind of phase jitter is to add the fractional
part of the master oscillator after the zero crossing to the slave.
Basically: Do not reset the slave to zero, but to the fractional rest of
the master.

There is still a lot of aliasing if you don't band limit the transition
thou...

Am 26.02.2014 16:45, schrieb gwenhwyfaer:
> On 26/02/2014, Risto Holopainen <***@hotmail.com> wrote:
>> When it comes to programming hard sync, I would use oversampling. I'm not
>> saying that you should, I'm just lazy enough to do it the easy way.
> You need to oversample a *lot* to chase away aliasing, though. The
> Alesis Fusion - and its descendant, the M-Audio Venom, does the same -
> does hard sync naively, by resetting the slave oscillator's phase to 0
> every time the master crosses from negative to positive... only it
> doesn't oversample at all and does the comparison on sample
> boundaries, with the result that hard sync sounds *lousy* on the
> Fusion. I've done a couple of experiments which appear to suggest that
> the aliasing caused by this is *far* worse than that caused by not
> bandlimiting the actual discontinuity - for example, by using a
> "hidden master oscillator" (actually a fractional multiplier of the
> phase counter) to read from a wavetable corrected only to the
> frequency of the slave. In fact, you can bandlimit the discontinuity
> as much as you please, and it'll *still* sound awful, because you're
> essentially randomising the pitch of the oscillator. Worse, even if
> your slave is running at exactly the same frequency as its master,
> you'll STILL get random glitches in the sound as its phase is reset to
> exactly 0 when the master's phase is some tiny fraction greater than
> 0.
>
> And the sad thing is, there's no justification for it. In the Venom,
> for example, you're always syncing to oscillator 1 - which means that
> you know the frequency ratio between the two oscillators. Moreover,
> you're syncing against a known waveform - which means you also know
> when exactly that waveform will cross from negative to positive.
> Therefore, when your slave detects that it did, rather than resetting
> itself to 0, it can reset itself to the difference between the actual
> phase of the master and the phase at which the master would have
> crossed 0, multiplied by the slave:master frequency ratio. For
> sawtooth and pulse waves, of course, that's particularly simple -
> there's only one zero-crossing per cycle, and if you make sure that
> zero-crossing is always at the point where the phase is 0, you can use
> the carry of the master's phase accumulator to detect sync, then
> multiply the master's current phase by the slave:master ratio and set
> the slave's phase to that. And lo! - no more random-frequency-wibbling
> alias. *Then* you can start worrying about how to bandlimit the
> slave's phase.
>
> Sorry for going on at length about something that is surely obvious to
> everyone else here (I know nowt about owt) but it really bugs me - and
> clearly it wasn't obvious to Alesis when they designed the Fusion. And
> in fairness, the Fusion could sync to itss noise generator or an
> arbitrary signal coming into the audio inputs (can any other VA do
> this? Nord Modular, perhaps?) at which point the naive approach is the
> best you can do without either intepolating between input samples
> (which needs division) or upping the input sample rate - but even so,
> 99% of the time the Fusion is still syncing to another oscillator
> whose frequency and waveform it necessarily knows. And there's just no
> excuse for the Venom.
>
> *spent and tremulous, returns to hiding under desk*
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
robert bristow-johnson
2014-02-26 16:07:41 UTC
Permalink
On 2/26/14 10:50 AM, Tobias Münzer wrote:
>
> an easy fix to avoid this kind of phase jitter is to add the
> fractional part of the master oscillator after the zero crossing to
> the slave.
> Basically: Do not reset the slave to zero, but to the fractional rest
> of the master.
>

the simplest thing, if you want the slave perfectly locked to the
master, is to derive both master and slave phase from the very same
phase accumulator. there might be scaling and wrap around, but that
should be easy.

for a slave doing a sine, i wonder what you would expect to hear as the
master/slave frequency ratio changes. while i have heard sync saws and
sync squares, i don't think i ever heard a sync sine and it would seem
to me to go from no harmonics to lotsa harmonics pretty abruptly. once
all those harmonics are in, i wonder if it would matter much that the
basic waveform was a sine or something else.

--

r b-j ***@audioimagination.com

"Imagination is more important than knowledge."
Tobias Münzer
2014-02-26 16:13:42 UTC
Permalink
robert bristow-johnson:
>
> for a slave doing a sine, i wonder what you would expect to hear as
> the master/slave frequency ratio changes. while i have heard sync
> saws and sync squares, i don't think i ever heard a sync sine and it
> would seem to me to go from no harmonics to lotsa harmonics pretty
> abruptly. once all those harmonics are in, i wonder if it would
> matter much that the basic waveform was a sine or something else.
>
Pretty much. The transition is not as abrupt as one might think. And if
the slave frequency is a multiple of the master you of course get a sine.
So it is a rise and fall of harmonic richness when sweeping the slave
frequency.

There is a VST that implements sine hardsync .. it is unfortunately
quite complicated to adjust the parameters, but maybe you can get an
impression of the sound: http://www.krakli.com/krakli-cygnus/
gwenhwyfaer
2014-02-26 16:42:04 UTC
Permalink
On 26/02/2014, robert bristow-johnson <***@audioimagination.com> wrote:
> the simplest thing, if you want the slave perfectly locked to the
> master, is to derive both master and slave phase from the very same
> phase accumulator. there might be scaling and wrap around, but that
> should be easy.

I think that's how most VAs do it, isn't it? Especially the "hidden
master" variety (eg. Nova family, AN1x) - but maybe others? I only
know that the Alesis family don't.

> for a slave doing a sine, i wonder what you would expect to hear as the
> master/slave frequency ratio changes. while i have heard sync saws and
> sync squares, i don't think i ever heard a sync sine and it would seem
> to me to go from no harmonics to lotsa harmonics pretty abruptly.

Pretty much - and it limits the usefulness of sweeping it, because of
the "lumpiness" of the transition. I remember listening to a
comparison between the OB8's sawtooth sync and the Andromeda's
(someone was doing a comparative review) and noticing that lumpiness
in the A6 too - turns out that if you reset a sawtooth to its centre
point, it sounds lumpy when swept, whereas if you reset it to its most
negative point it sounds consistent and rippy and like hard sync is
*supposed* to sound. :) But it's still useful for adding new waveforms
to the analogue palette.
gwenhwyfaer
2014-02-26 16:26:42 UTC
Permalink
I thought about that, but it's still wrong for every case but the
master and slave having a 1:1 frequency ratio. Hence the need to
multiply by the m:s ratio as well. (And of course, the slave should be
bandlimited according to its frequency; that pretty much goes without
saying. Which makes it all the more frustrating in the Fusion, because
its VA oscillators don't really alias much at all otherwise.)

On 26/02/2014, Tobias Münzer <***@gmail.com> wrote:
> Yes,
>
> an easy fix to avoid this kind of phase jitter is to add the fractional
> part of the master oscillator after the zero crossing to the slave.
> Basically: Do not reset the slave to zero, but to the fractional rest of
> the master.
>
> There is still a lot of aliasing if you don't band limit the transition
> thou...
>
> Am 26.02.2014 16:45, schrieb gwenhwyfaer:
>> On 26/02/2014, Risto Holopainen <***@hotmail.com> wrote:
>>> When it comes to programming hard sync, I would use oversampling. I'm
>>> not
>>> saying that you should, I'm just lazy enough to do it the easy way.
>> You need to oversample a *lot* to chase away aliasing, though. The
>> Alesis Fusion - and its descendant, the M-Audio Venom, does the same -
>> does hard sync naively, by resetting the slave oscillator's phase to 0
>> every time the master crosses from negative to positive... only it
>> doesn't oversample at all and does the comparison on sample
>> boundaries, with the result that hard sync sounds *lousy* on the
>> Fusion. I've done a couple of experiments which appear to suggest that
>> the aliasing caused by this is *far* worse than that caused by not
>> bandlimiting the actual discontinuity - for example, by using a
>> "hidden master oscillator" (actually a fractional multiplier of the
>> phase counter) to read from a wavetable corrected only to the
>> frequency of the slave. In fact, you can bandlimit the discontinuity
>> as much as you please, and it'll *still* sound awful, because you're
>> essentially randomising the pitch of the oscillator. Worse, even if
>> your slave is running at exactly the same frequency as its master,
>> you'll STILL get random glitches in the sound as its phase is reset to
>> exactly 0 when the master's phase is some tiny fraction greater than
>> 0.
>>
>> And the sad thing is, there's no justification for it. In the Venom,
>> for example, you're always syncing to oscillator 1 - which means that
>> you know the frequency ratio between the two oscillators. Moreover,
>> you're syncing against a known waveform - which means you also know
>> when exactly that waveform will cross from negative to positive.
>> Therefore, when your slave detects that it did, rather than resetting
>> itself to 0, it can reset itself to the difference between the actual
>> phase of the master and the phase at which the master would have
>> crossed 0, multiplied by the slave:master frequency ratio. For
>> sawtooth and pulse waves, of course, that's particularly simple -
>> there's only one zero-crossing per cycle, and if you make sure that
>> zero-crossing is always at the point where the phase is 0, you can use
>> the carry of the master's phase accumulator to detect sync, then
>> multiply the master's current phase by the slave:master ratio and set
>> the slave's phase to that. And lo! - no more random-frequency-wibbling
>> alias. *Then* you can start worrying about how to bandlimit the
>> slave's phase.
>>
>> Sorry for going on at length about something that is surely obvious to
>> everyone else here (I know nowt about owt) but it really bugs me - and
>> clearly it wasn't obvious to Alesis when they designed the Fusion. And
>> in fairness, the Fusion could sync to itss noise generator or an
>> arbitrary signal coming into the audio inputs (can any other VA do
>> this? Nord Modular, perhaps?) at which point the naive approach is the
>> best you can do without either intepolating between input samples
>> (which needs division) or upping the input sample rate - but even so,
>> 99% of the time the Fusion is still syncing to another oscillator
>> whose frequency and waveform it necessarily knows. And there's just no
>> excuse for the Venom.
>>
>> *spent and tremulous, returns to hiding under desk*
>> --
>> dupswapdrop -- the music-dsp mailing list and website:
>> subscription info, FAQ, source code archive, list archive, book reviews,
>> dsp links
>> http://music.columbia.edu/cmc/music-dsp
>> http://music.columbia.edu/mailman/listinfo/music-dsp
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp
> links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
gwenhwyfaer
2014-02-26 16:55:59 UTC
Permalink
On 26/02/2014, Risto Holopainen <***@hotmail.com> wrote:
> Now, for my part, I find soft sync much more useful. I don't know what
> attempts there have been to do soft sync in digital oscillators, if anyone
> knows I'd be interested.

Nobody agrees on whether soft sync is "knock the waveform into
reverse" (the Alesis Ion did that, and within the limitations of
Alesis' sync implementation generally it did sound interesting) or
"only sync if the slave is within a threshold", which is what your
samples sound like (I don't know if any synth does that). But you'd
think both would be easy (once you've conquered the bandlimiting
problem) on a phase-accumulator based synth: the first example
negates the phase increment on sync; and the second only resets the
slave's phase if it's lower than the threshold (where both are
fractions), so turn the threshold up to 100% and it becomes hard sync.
But both require master and slave to have independent phase
accumulators, and as rbj mentions it's much easier in digital land to
simply derive the slave's phase straight from the master's.
Marco Lo Monaco
2014-02-26 09:02:05 UTC
Permalink
Hello Tobias,
following Ross advice one of the drawback that you will have to deal is the
CPU usage at high master frequencies. Placing in an overlap and add fashion
a grain is very convenient at low freqs but not so much at high. More over
you will have to deal with some sort of DC offsets on the way (OLAdding the
minBLEP grain - which is min-phase and not zero-phase and you should
consider also some sort of look-ahead - with small hopsizes and maybe for
short times because you are under a frequency master modulation will result
in unpredictable offsets over your sin.
Unfortunately Eli Brandts does not face this problem in the paper.

Hard-sync is hard so expect aliasing to be reduced but not completely
eliminated.

Ciao

Marco

-----Messaggio originale-----
Da: music-dsp-***@music.columbia.edu
[mailto:music-dsp-***@music.columbia.edu] Per conto di Ross Bencina
Inviato: martedì 25 febbraio 2014 20:49
A: A discussion list for music-related DSP
Oggetto: Re: [music-dsp] Best way to do sine hard sync?

On 26/02/2014 2:25 AM, robert bristow-johnson wrote:
> are you trying to do multiple cycles of the sine and then have a
> discontinuity as it snaps back in sync with the side-chain waveform?
> if so, that doesn't sound very "bandlimited" to me.

As I understand it, the question is now to make such snap-back band limited.

The approach that I am familiar with is the "corrective grains" approach
(AKA BLIT/BLEP/BLAMP etc) where you basically run a granulator that
generates grains that cancel the aliasing caused by the phase discontinuity.
The exact grain needed is dependent on the derivatives of the signal (doable
for sine waves). The original paper for this technique is Eli Brandt (2001),
"Hard sync without aliasing", Proc. ICMC
2001.: http://www.cs.cmu.edu/~eli/L/icmc01/hardsync.html

I have not read Vadim's paper so I am not familiar with the alternatives.

Ross.
Marco Lo Monaco
2014-03-11 00:02:23 UTC
Permalink
Hello Tobias,
You should also have a look at the BLOO method, explained in this thread a
long time ago
http://music.columbia.edu/pipermail/music-dsp/2009-june/067853.html
That thread is quite long and the discussion pretty animated but you could
get some new ideas from the the paper of George at the link
http://s1gnals.blogspot.it/2008/12/bloo_6897.html and look for additonal
interpretations of in in the thread itself.

Hope to have helped

Marco

> -----Messaggio originale-----
> Da: music-dsp-***@music.columbia.edu [mailto:music-dsp-
> ***@music.columbia.edu] Per conto di Tobias Münzer
> Inviato: martedì 25 febbraio 2014 15:54
> A: music-***@music.columbia.edu
> Oggetto: [music-dsp] Best way to do sine hard sync?
>
> Hi,
>
> I would like to implement a hard-synced sine oscillator in my synth and I
am
> wondering which is the best way to do so.
> I read the paper 'Generation of bandlimited sync transitions for sine
> waveforms' by Vadim Zavalishin which compares several approaches.
> Are there any better ways then the 'frequency shifting method' described
in
> the paper? (Better in terms of less aliasing, faster,..)
>
> Thanks a lot
>
> Best Regards
> Tobias
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
dsp
> links http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
David Lowenfels
2014-03-21 04:24:56 UTC
Permalink
FYI Emanuel Landeholm also had a cool method using windows to suppress aliasing. It sounded pretty good to my ear, though I never did any spectral
measurements. It works with any slave oscillator waveform, including sine. I implemented it in PD with a Kaiser-Bessel window for an extra parameter of control.

http://music.columbia.edu/pipermail/music-dsp/2001-October/045626.html
http://dl.dropbox.com/u/285841/hardsync.tar.bz2

-David

On Mar 10, 2014, at 5:02 PM, Marco Lo Monaco <***@teletu.it> wrote:

> Hello Tobias,
> You should also have a look at the BLOO method, explained in this thread a
> long time ago
> http://music.columbia.edu/pipermail/music-dsp/2009-june/067853.html
> That thread is quite long and the discussion pretty animated but you could
> get some new ideas from the the paper of George at the link
> http://s1gnals.blogspot.it/2008/12/bloo_6897.html and look for additonal
> interpretations of in in the thread itself.
>
> Hope to have helped
>
> Marco
>
>> -----Messaggio originale-----
>> Da: music-dsp-***@music.columbia.edu [mailto:music-dsp-
>> ***@music.columbia.edu] Per conto di Tobias Münzer
>> Inviato: martedì 25 febbraio 2014 15:54
>> A: music-***@music.columbia.edu
>> Oggetto: [music-dsp] Best way to do sine hard sync?
>>
>> Hi,
>>
>> I would like to implement a hard-synced sine oscillator in my synth and I
> am
>> wondering which is the best way to do so.
>> I read the paper 'Generation of bandlimited sync transitions for sine
>> waveforms' by Vadim Zavalishin which compares several approaches.
>> Are there any better ways then the 'frequency shifting method' described
> in
>> the paper? (Better in terms of less aliasing, faster,..)
>>
>> Thanks a lot
>>
>> Best Regards
>> Tobias
>> --
>> dupswapdrop -- the music-dsp mailing list and website:
>> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp
>> links http://music.columbia.edu/cmc/music-dsp
>> http://music.columbia.edu/mailman/listinfo/music-dsp
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
Emanuel Landeholm
2014-03-21 12:26:45 UTC
Permalink
>
> FYI Emanuel Landeholm also had a cool method using windows to suppress
> aliasing. It sounded pretty good to my ear, though I never did any spectral
> measurements. It works with any slave oscillator waveform, including sine.
> I implemented it in PD with a Kaiser-Bessel window for an extra parameter
> of control.


Actually, don't download hardsync.tar.bz2! :-) It's buggy and has lots of
confusing dependencies. The description I posted to the list of the process
is correct, but the reference implementation is not... I'm
debugging/refactoring it right now (haven't touched the code since, what,
2001?). I'll keep you guys posted.

Also, David Lowenfels, would you like to share your pd implementation?

cheers,
Emanuel



On Fri, Mar 21, 2014 at 5:24 AM, David Lowenfels
<***@gmail.com>wrote:

> FYI Emanuel Landeholm also had a cool method using windows to suppress
> aliasing. It sounded pretty good to my ear, though I never did any spectral
> measurements. It works with any slave oscillator waveform, including sine.
> I implemented it in PD with a Kaiser-Bessel window for an extra parameter
> of control.
>
> http://music.columbia.edu/pipermail/music-dsp/2001-October/045626.html
> http://dl.dropbox.com/u/285841/hardsync.tar.bz2
>
> -David
>
> On Mar 10, 2014, at 5:02 PM, Marco Lo Monaco <***@teletu.it>
> wrote:
>
> > Hello Tobias,
> > You should also have a look at the BLOO method, explained in this thread
> a
> > long time ago
> > http://music.columbia.edu/pipermail/music-dsp/2009-june/067853.html
> > That thread is quite long and the discussion pretty animated but you
> could
> > get some new ideas from the the paper of George at the link
> > http://s1gnals.blogspot.it/2008/12/bloo_6897.html and look for additonal
> > interpretations of in in the thread itself.
> >
> > Hope to have helped
> >
> > Marco
> >
> >> -----Messaggio originale-----
> >> Da: music-dsp-***@music.columbia.edu [mailto:music-dsp-
> >> ***@music.columbia.edu] Per conto di Tobias Münzer
> >> Inviato: martedì 25 febbraio 2014 15:54
> >> A: music-***@music.columbia.edu
> >> Oggetto: [music-dsp] Best way to do sine hard sync?
> >>
> >> Hi,
> >>
> >> I would like to implement a hard-synced sine oscillator in my synth and
> I
> > am
> >> wondering which is the best way to do so.
> >> I read the paper 'Generation of bandlimited sync transitions for sine
> >> waveforms' by Vadim Zavalishin which compares several approaches.
> >> Are there any better ways then the 'frequency shifting method' described
> > in
> >> the paper? (Better in terms of less aliasing, faster,..)
> >>
> >> Thanks a lot
> >>
> >> Best Regards
> >> Tobias
> >> --
> >> dupswapdrop -- the music-dsp mailing list and website:
> >> subscription info, FAQ, source code archive, list archive, book reviews,
> > dsp
> >> links http://music.columbia.edu/cmc/music-dsp
> >> http://music.columbia.edu/mailman/listinfo/music-dsp
> >
> > --
> > dupswapdrop -- the music-dsp mailing list and website:
> > subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> > http://music.columbia.edu/cmc/music-dsp
> > http://music.columbia.edu/mailman/listinfo/music-dsp
>
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
David Lowenfels
2014-03-21 21:28:51 UTC
Permalink
On Mar 21, 2014, at 5:26 AM, Emanuel Landeholm <***@gmail.com> wrote:
> Also, David Lowenfels, would you like to share your pd implementation?

Sure. I was able to dust it off and get it running, but there are some external dependencies which I need to remove in order to make it portable. It will take me a few days to clean it up.

I played around with it this morning, and there is some audible aliasing in the higher octave, especially when using the more rectangular-ish shaped windows (which is no big surprise). Oversampling would help for sure.

My patch uses an envelope follower on a drum loop to modulate the master/slave ratio.
It does sound pretty cool with a sine wave, kind of like one of those plastic whirly tubes.

-David
Emanuel Landeholm
2014-03-23 21:29:32 UTC
Permalink
Re. my hard sync implementation.

I have fixed two serious bugs and I also removed all external dependencies.
The download link is:

https://www.dropbox.com/s/f15usnkv6f19iq9/hardsync2014.tar.bz2

All the hard sync logic is contained in the main function. My hard sync
uses two relatively independent slave oscillators. The slave oscillators
can actually run at different rates and they can also be different
waveforms. I included band unlimited versions of sinusoid, triangular,
sawtooth and square functions. They all work fine, but aliasing is quite
prominent in the square waveform. Master and slave rates can be set
independently, but you have to watch out for DC when master frequency >
slave frequency.

cheers,
E


On Fri, Mar 21, 2014 at 10:28 PM, David Lowenfels <***@gmail.com
> wrote:

> On Mar 21, 2014, at 5:26 AM, Emanuel Landeholm <
> ***@gmail.com> wrote:
> > Also, David Lowenfels, would you like to share your pd implementation?
>
> Sure. I was able to dust it off and get it running, but there are some
> external dependencies which I need to remove in order to make it portable.
> It will take me a few days to clean it up.
>
> I played around with it this morning, and there is some audible aliasing
> in the higher octave, especially when using the more rectangular-ish shaped
> windows (which is no big surprise). Oversampling would help for sure.
>
> My patch uses an envelope follower on a drum loop to modulate the
> master/slave ratio.
> It does sound pretty cool with a sine wave, kind of like one of those
> plastic whirly tubes.
>
> -David
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews,
> dsp links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>
Thilo Köhler
2014-03-11 19:41:52 UTC
Permalink
Hello !

What I would do (in this particular order):

1. Band pass filter from 60Hz - 12kHz
to remove DC and low freq rumbling,
If you want to optimize for Laptop speakers, you could raise the 60Hz to
200-500).
The high cut is not necessary, but speech doesnt really require much more
and you can remove eventualy high freq noise.
After the filtering, you have only speech relevant frequencies in your signal.

2. Auto leveling compressor
*Slow* dynamic compression to raise everything to a certain volume level.

3. Multi band compressor
This will make the speech more crisp and better intelligable.
Because it is multi band, you dont need a seperate EQ or anything.
You can control the timbre with the multi bands.

4. Limiter
To push the signal to a maximum loudness, limit all the remaining peaks
and boost the signal to 0db. That should make your signal about 2x louder.

Done!
Stay away from gating or denoising. Your brain can filter noise better
than DSP, and you are looking for a DSP chain that works well on
random material. Gating/Denoising is only satisfying if the dose if very well
balanced, which cannot be done on random material.

Regards,

Thilo

On 07.03.2014, you wrote:
> Send music-dsp mailing list submissions to
> music-***@music.columbia.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://music.columbia.edu/mailman/listinfo/music-dsp
> or, via email, send a message with subject or body 'help' to
> music-dsp-***@music.columbia.edu
>
> You can reach the person managing the list at
> music-dsp-***@music.columbia.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of music-dsp digest..."
>
>
> Today's Topics:
>
> 1. Re: Mastering correction by FFT-based filtering followed by 1
> octave or 1/10 octave equalizer (Charles Z Henry)
> 2. Re: Mastering correction by FFT-based filtering followed by 1
> octave or 1/10 octave equalizer (Peter S)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 6 Mar 2014 16:53:54 -0600
> From: Charles Z Henry <***@gmail.com>
> To: A discussion list for music-related DSP
> <music-***@music.columbia.edu>
> Subject: Re: [music-dsp] Mastering correction by FFT-based filtering
> followed by 1 octave or 1/10 octave equalizer
> Message-ID:
> <CAPfmNOF9LcnnQSy4Q5DnE1JhbwhPT=***@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Thu, Mar 6, 2014 at 11:53 AM, Emanuel Landeholm <
>***@gmail.com> wrote:
>
>> Continuing off topic...
>>
>> On "correction"; it's an interesting philosophical concept. I listen to
>> lots of audio books, and the program material comes with all kinds of
>> problems. Noise, too low volume due to spurious noise+peak-limiting, too
>> much dynamics etc. My typical listening device is my laptop's internal
>> speaker which doesn't play very loud (nor well), so too low volume is often
>> a problem.
>>
>
>> I have been thinking about a processing chain that might solve some of
>> these issues.
>>
>> 1) Steep filter to isolate speech (100-4k?).
>>
>
> Not a great idea over all. You might just mangle the audio a bit more. It
> loses some temporal qualities when filtered too much. Listening to speech
> relies a lot on temporal cues that you want to keep intact.
>
> A broad filter with that much bandwidth would probably be negligible
> however. The wider the bandwidth, the shorter the filter.
>
>
>> 2) Noise gate
>>
>
> Probably a good idea to precede compression. You don't want to use the
> noise gate after compression anyway.
>
>
>> 3) Some kind of "crystalizer" for extra "crunch"/contrast
>>
>
> I'd advise not. It's just about vocal clarity. Enhancing speech features
> would be inconsistent and not necessarily helpful.
>
>
>> 4) Compression
>>
>
> Here you go. Definitely needed. Speech has a lot of pops, clicks, and
> rarely a consistent volume level. You should definitely do something to
> expand the lower volume levels and reduce the volume of sibilant and
> percussive sounds.
>
>
>> 5) Amplification to 0 - -3 dBFS
>>
>
> Scaling to full-scale by peak value is also important. If the result is
> too soft in rms terms, you may apply an all-pass filter to shift the phases
> and reduce the peaks. It's probably not necessary though.
>
> I can't say what processing has already been done on your audio books.
> Enhancing speech quality is a non-trivial problem--but if the engineers
> have done an unsatisfying job, it can't hurt to tweak it to your tastes,
> right?
>
> Best,
> Chuck
>
>
>> What do you think?
>>
>> cheers,
>> Emanuel
>>
>>
>>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 7 Mar 2014 01:10:29 +0100
> From: Peter S <***@gmail.com>
> To: A discussion list for music-related DSP
> <music-***@music.columbia.edu>
> Subject: Re: [music-dsp] Mastering correction by FFT-based filtering
> followed by 1 octave or 1/10 octave equalizer
> Message-ID:
> <CAM=gyjaSyjiTnfDZnxtGcMLNWNFKZ7TP_-V6583m9k+***@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 06/03/2014, Charles Z Henry <***@gmail.com> wrote:
>
>>> 1) Steep filter to isolate speech (100-4k?).
>>>
>>
>> Not a great idea over all. You might just mangle the audio a bit more. It
>> loses some temporal qualities when filtered too much. Listening to speech
>> relies a lot on temporal cues that you want to keep intact.
>
> I think probably he meant a multiband processor, using crossover
> filters to isolate and process the important region (100-4k), and then
> combine that with the rest of the (unprocessed) spectrum. At least
> that's how I imagined it. Losing the high frequency formants above 4k
> would decrease intelligibility a lot.
>
> - Peter
>
>
> ------------------------------
>
> --
> dupswapdrop -- the music-dsp mailing list and website: subscription info,
> FAQ, source code archive, list archive, book reviews, dsp links
> http://music.columbia.edu/cmc/music-dsp http://music.columbia.edu/mailman/listinfo/music-dsp
>
> End of music-dsp Digest, Vol 123, Issue 18
> ******************************************
>

Regards,

Thilo Koehler
--
Frank Sheeran
2014-03-27 14:55:01 UTC
Permalink
>
Emanuel Landeholm
2014-03-28 07:54:32 UTC
Permalink
Frank Sheeran,

>
Loading...