Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #372214 > unrolled thread

Waveform interpolation

Started bybitrex <bitrex@de.lete.earthlink.net>
First post2015-08-09 15:02 -0400
Last post2015-08-12 10:18 +0100
Articles 20 on this page of 51 — 22 participants

Back to article view | Back to sci.electronics.design


Contents

  Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-09 15:02 -0400
    Re: Waveform interpolation Ilya Kalistru <stebanoid@gmail.com> - 2015-08-09 12:12 -0700
    Re: Waveform interpolation Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-08-09 20:36 +0100
      Re: Waveform interpolation Robert Baer <robertbaer@localnet.com> - 2015-08-11 13:33 -0700
        Re: Waveform interpolation Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-08-11 22:29 +0100
        Re: Waveform interpolation spope33@speedymail.org (Steve Pope) - 2015-08-12 05:14 +0000
    Re: Waveform interpolation rickman <gnuarm@gmail.com> - 2015-08-09 15:40 -0400
    Re: Waveform interpolation "John Miles, KE5FX" <jmiles@gmail.com> - 2015-08-09 13:05 -0700
      Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-09 16:17 -0400
        Re: Waveform interpolation Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-08-10 11:13 +0100
          Re: Waveform interpolation Clifford Heath <no.spam@please.net> - 2015-08-11 09:51 +1000
            Re: Waveform interpolation Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-08-11 08:26 +0100
              Re: Waveform interpolation piglet <erichpwagner@hotmail.com> - 2015-08-11 09:13 +0100
                Re: Waveform interpolation Robert Baer <robertbaer@localnet.com> - 2015-08-11 13:51 -0700
                  Re: Waveform interpolation Clifford Heath <no.spam@please.net> - 2015-08-12 10:11 +1000
      Re: Waveform interpolation rev.11d.meow@gmail.com - 2015-08-09 14:14 -0700
        Re: Waveform interpolation "John Miles, KE5FX" <jmiles@gmail.com> - 2015-08-09 17:15 -0700
          Re: Waveform interpolation rev.11d.meow@gmail.com - 2015-08-09 17:34 -0700
        Re: Waveform interpolation Robert Baer <robertbaer@localnet.com> - 2015-08-11 13:39 -0700
          Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 21:27 -0700
            Re: Waveform interpolation DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-12 00:52 -0400
              Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 23:01 -0700
      Re: Waveform interpolation Robert Baer <robertbaer@localnet.com> - 2015-08-11 13:34 -0700
        Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 21:31 -0700
          Re: Waveform interpolation DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-12 00:54 -0400
            Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 22:59 -0700
    Re: Waveform interpolation Les Cargill <lcargill99@comcast.com> - 2015-08-09 16:12 -0500
    Re: Waveform interpolation John Larkin <jlarkin@highlandtechnology.com> - 2015-08-09 14:36 -0700
      Re: Waveform interpolation John Larkin <jlarkin@highlandtechnology.com> - 2015-08-09 14:41 -0700
        Re: Waveform interpolation Les Cargill <lcargill99@comcast.com> - 2015-08-09 17:36 -0500
          Re: Waveform interpolation robert bristow-johnson <rbj@audioimagination.com> - 2015-08-09 21:25 -0400
            Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-09 22:09 -0400
        Re: Waveform interpolation David Brown <david.brown@hesbynett.no> - 2015-08-10 09:26 +0200
          Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-10 06:58 -0400
            Re: Waveform interpolation David Brown <david.brown@hesbynett.no> - 2015-08-10 14:31 +0200
              Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-10 09:45 -0400
                Re: Waveform interpolation krw <krw@nowhere.com> - 2015-08-10 12:53 -0400
            Re: Waveform interpolation spope33@speedymail.org (Steve Pope) - 2015-08-10 20:20 +0000
              Re: Waveform interpolation DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2015-08-10 16:35 -0400
              Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 23:03 -0700
    Re: Waveform interpolation whit3rd <whit3rd@gmail.com> - 2015-08-09 22:56 -0700
      Re: Waveform interpolation Rev. 11D Meow! <rev.11d.meow@gmail.com> - 2015-08-11 22:57 -0700
      Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-12 06:54 -0400
        Re: Waveform interpolation whit3rd <whit3rd@gmail.com> - 2015-08-12 13:05 -0700
    Re: Waveform interpolation glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-08-10 06:45 +0000
      Re: Waveform interpolation bitrex <bitrex@de.lete.earthlink.net> - 2015-08-10 07:10 -0400
    Re: Waveform interpolation Jasen Betts <jasen@xnet.co.nz> - 2015-08-10 08:16 +0000
    Re: Waveform interpolation "David Eather" <eather@tpg.com.au> - 2015-08-11 14:15 +1000
      Re: Waveform interpolation Randy Yates <yates@digitalsignallabs.com> - 2015-08-11 09:30 -0400
    Re: Waveform interpolation Robert Baer <robertbaer@localnet.com> - 2015-08-11 13:30 -0700
      Re: Waveform interpolation Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-08-12 10:18 +0100

Page 1 of 3  [1] 2 3  Next page →


#372214 — Waveform interpolation

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-09 15:02 -0400
SubjectWaveform interpolation
Message-ID<55c7a3de$0$29180$4c5ecfc7@frugalusenet.com>
Suppose I have some sampled signal data in a ROM on a microcontroller or 
something, and I'm reading it out to a DAC.  Let's say that for some 
reason, I'd like to begin reading this data at some random position, go 
for a while, and then stop at a random stopping point and jump to 
another random position in the ROM and continue reading, and so on, to 
obtain pseudorandom variations on the waveform data.

What sort of interpolation algorithm might be appropriate to use in a 
situation like this to smooth the discontinuity between the two jump points?

[toc] | [next] | [standalone]


#372215

FromIlya Kalistru <stebanoid@gmail.com>
Date2015-08-09 12:12 -0700
Message-ID<0853a036-87d4-49c5-800f-f097424c1db4@googlegroups.com>
In reply to#372214
Any low pass filter?

[toc] | [prev] | [next] | [standalone]


#372217

FromMartin Brown <|||newspam|||@nezumi.demon.co.uk>
Date2015-08-09 20:36 +0100
Message-ID<mq8a4k$k08$1@speranza.aioe.org>
In reply to#372214
On 09/08/2015 20:02, bitrex wrote:

> Suppose I have some sampled signal data in a ROM on a microcontroller or
> something, and I'm reading it out to a DAC.  Let's say that for some
> reason, I'd like to begin reading this data at some random position, go
> for a while, and then stop at a random stopping point and jump to
> another random position in the ROM and continue reading, and so on, to
> obtain pseudorandom variations on the waveform data.

Does it have to be random to random position? Zero crossing and in the 
same direction will get you something that the ear can barely hear.

> What sort of interpolation algorithm might be appropriate to use in a
> situation like this to smooth the discontinuity between the two jump
> points?

Force the wavefrom jump to be at a zero crossing and pick up from a zero 
crossing with the same sign gradient.

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#372591

FromRobert Baer <robertbaer@localnet.com>
Date2015-08-11 13:33 -0700
Message-ID<1_syx.30009$2J4.22714@fx02.iad>
In reply to#372217
Martin Brown wrote:
> On 09/08/2015 20:02, bitrex wrote:
>
>> Suppose I have some sampled signal data in a ROM on a microcontroller or
>> something, and I'm reading it out to a DAC. Let's say that for some
>> reason, I'd like to begin reading this data at some random position, go
>> for a while, and then stop at a random stopping point and jump to
>> another random position in the ROM and continue reading, and so on, to
>> obtain pseudorandom variations on the waveform data.
>
> Does it have to be random to random position? Zero crossing and in the
> same direction will get you something that the ear can barely hear.
>
>> What sort of interpolation algorithm might be appropriate to use in a
>> situation like this to smooth the discontinuity between the two jump
>> points?
>
> Force the wavefrom jump to be at a zero crossing and pick up from a zero
> crossing with the same sign gradient.
>
   Slope calculation needed, then; how many points before,and after?
   How much time (eg: compute power) available between nominal look-up rate?

[toc] | [prev] | [next] | [standalone]


#372603

FromMartin Brown <|||newspam|||@nezumi.demon.co.uk>
Date2015-08-11 22:29 +0100
Message-ID<mqdpf6$i2r$1@speranza.aioe.org>
In reply to#372591
On 11/08/2015 21:33, Robert Baer wrote:
> Martin Brown wrote:
>> On 09/08/2015 20:02, bitrex wrote:
>>
>>> Suppose I have some sampled signal data in a ROM on a microcontroller or
>>> something, and I'm reading it out to a DAC. Let's say that for some
>>> reason, I'd like to begin reading this data at some random position, go
>>> for a while, and then stop at a random stopping point and jump to
>>> another random position in the ROM and continue reading, and so on, to
>>> obtain pseudorandom variations on the waveform data.
>>
>> Does it have to be random to random position? Zero crossing and in the
>> same direction will get you something that the ear can barely hear.
>>
>>> What sort of interpolation algorithm might be appropriate to use in a
>>> situation like this to smooth the discontinuity between the two jump
>>> points?
>>
>> Force the wavefrom jump to be at a zero crossing and pick up from a zero
>> crossing with the same sign gradient.
>>
>    Slope calculation needed, then; how many points before,and after?
>    How much time (eg: compute power) available between nominal look-up
> rate?

Nearest neighbour forward difference will be good enough.
Avoiding any severe discontinuities will make the transition inaudible.

(apart from the differing signal content)

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#372662

Fromspope33@speedymail.org (Steve Pope)
Date2015-08-12 05:14 +0000
Message-ID<mqeknk$6m4$1@blue-new.rahul.net>
In reply to#372591
Robert Baer  <robertbaer@localnet.com> wrote:

>   Slope calculation needed, then; how many points before,and after?
>   How much time (eg: compute power) available between nominal look-up rate?

Let's see, a 7.5 ips, 2 track, 1/4", tape slice would perform a decent, 
yet rapid, cross- fade at about  45 degree angle.  You don't want to 
make it shallower than that, as the left-to-right swish starts being 
audible.  The tracks are about 1/10" wide, so I'm going to say ... 
75 Hz per inch, 750 Hz per 1/10", or about 0.05 * Nyquist.

This may fall under that category of useless trivia, but hey.


Steve

[toc] | [prev] | [next] | [standalone]


#372218

Fromrickman <gnuarm@gmail.com>
Date2015-08-09 15:40 -0400
Message-ID<mq8a87$3pp$2@dont-email.me>
In reply to#372214
On 8/9/2015 3:02 PM, bitrex wrote:
> Suppose I have some sampled signal data in a ROM on a microcontroller or
> something, and I'm reading it out to a DAC.  Let's say that for some
> reason, I'd like to begin reading this data at some random position, go
> for a while, and then stop at a random stopping point and jump to
> another random position in the ROM and continue reading, and so on, to
> obtain pseudorandom variations on the waveform data.
>
> What sort of interpolation algorithm might be appropriate to use in a
> situation like this to smooth the discontinuity between the two jump
> points?

What Martin said, or you can use a fade-in, fade-out perhaps, or a 
cross-fade where the two fades work at the same time.

I think the answer to this question depends greatly on the waveform and 
its use.

-- 

Rick

[toc] | [prev] | [next] | [standalone]


#372219

From"John Miles, KE5FX" <jmiles@gmail.com>
Date2015-08-09 13:05 -0700
Message-ID<50ea15b6-e71b-499f-8237-085130306076@googlegroups.com>
In reply to#372214
On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
> What sort of interpolation algorithm might be appropriate to use in a 
> situation like this to smooth the discontinuity between the two jump points?

You won't be able to jump at random samples, just at the zero crossings.  If you jump around randomly, the output data will no longer represent samples of a band-limited signal, and no postfiltering process can remove the influence of the jumps.

If you really have to support arbitrary branches, the best approach is probably to continue reading from both the original and destination points and blend the data gradually.

-- john, KE5FX

[toc] | [prev] | [next] | [standalone]


#372220

Frombitrex <bitrex@de.lete.earthlink.net>
Date2015-08-09 16:17 -0400
Message-ID<55c7b54c$0$29233$4c5ecfc7@frugalusenet.com>
In reply to#372219
On 8/9/2015 4:05 PM, John Miles, KE5FX wrote:
> On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
>> What sort of interpolation algorithm might be appropriate to use in a
>> situation like this to smooth the discontinuity between the two jump points?
>
> You won't be able to jump at random samples, just at the zero crossings.  If you jump around randomly, the output data will no longer represent samples of a band-limited signal, and no postfiltering process can remove the influence of the jumps.
>
> If you really have to support arbitrary branches, the best approach is probably to continue reading from both the original and destination points and blend the data gradually.
>
> -- john, KE5FX
>

Yes.  I could try the former, but then I guess I'd need to store 
metadata on where the zero crossings are.  I'd like to do this on a 
little 8 bit microcontroller, and space is kind of limited.  And the 
metadata would have to be regenerated if I were ever to change the 
original data.

Could the latter approach work on a processor with limited resources?

[toc] | [prev] | [next] | [standalone]


#372293

FromMartin Brown <|||newspam|||@nezumi.demon.co.uk>
Date2015-08-10 11:13 +0100
Message-ID<mq9tgt$v8j$1@speranza.aioe.org>
In reply to#372220
On 09/08/2015 21:17, bitrex wrote:
> On 8/9/2015 4:05 PM, John Miles, KE5FX wrote:
>> On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
>>> What sort of interpolation algorithm might be appropriate to use in a
>>> situation like this to smooth the discontinuity between the two jump
>>> points?
>>
>> You won't be able to jump at random samples, just at the zero
>> crossings.  If you jump around randomly, the output data will no
>> longer represent samples of a band-limited signal, and no
>> postfiltering process can remove the influence of the jumps.
>>
>> If you really have to support arbitrary branches, the best approach is
>> probably to continue reading from both the original and destination
>> points and blend the data gradually.

>
> Yes.  I could try the former, but then I guess I'd need to store
> metadata on where the zero crossings are.  I'd like to do this on a
> little 8 bit microcontroller, and space is kind of limited.  And the
> metadata would have to be regenerated if I were ever to change the
> original data.

Unless the thing is very slow clock rate you can afford to switch stream 
at/near a zero and run along the new source waveform until you reach a 
suitable position. Provided the CPU has some spare capacity available 
this shouldn't be too hard without storing metadata.
>
> Could the latter approach work on a processor with limited resources?

Or as someone else suggested fade one out and the other in over a number 
of samples comparable with a few wavelengths.

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#372395

FromClifford Heath <no.spam@please.net>
Date2015-08-11 09:51 +1000
Message-ID<TMayx.27732$bg4.22417@fx29.iad>
In reply to#372293
On 10/08/15 20:13, Martin Brown wrote:
> On 09/08/2015 21:17, bitrex wrote:
>> On 8/9/2015 4:05 PM, John Miles, KE5FX wrote:
>>> On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
>>>> What sort of interpolation algorithm might be appropriate to use in a
>>>> situation like this to smooth the discontinuity between the two jump
>>>> points?
>>>
>>> You won't be able to jump at random samples, just at the zero
>>> crossings.  If you jump around randomly, the output data will no
>>> longer represent samples of a band-limited signal, and no
>>> postfiltering process can remove the influence of the jumps.
>>>
>>> If you really have to support arbitrary branches, the best approach is
>>> probably to continue reading from both the original and destination
>>> points and blend the data gradually.
>
>>
>> Yes.  I could try the former, but then I guess I'd need to store
>> metadata on where the zero crossings are.  I'd like to do this on a
>> little 8 bit microcontroller, and space is kind of limited.  And the
>> metadata would have to be regenerated if I were ever to change the
>> original data.
>
> Unless the thing is very slow clock rate you can afford to switch stream
> at/near a zero and run along the new source waveform until you reach a
> suitable position. Provided the CPU has some spare capacity available
> this shouldn't be too hard without storing metadata.
>>
>> Could the latter approach work on a processor with limited resources?
>
> Or as someone else suggested fade one out and the other in over a number
> of samples comparable with a few wavelengths.

Any artefacts of the cross fade would cluster around 1/(cross-fade-time) 
in Hz, so pick a time and LPF away the artefacts. There's probably some 
cross-fade curve that minimises the effect, but that'll also depend on 
the LPF filter characteristics.

I expect that's how frequency-shifters work, am I wrong?

[toc] | [prev] | [next] | [standalone]


#372431

FromMartin Brown <|||newspam|||@nezumi.demon.co.uk>
Date2015-08-11 08:26 +0100
Message-ID<mqc830$eme$1@speranza.aioe.org>
In reply to#372395
On 11/08/2015 00:51, Clifford Heath wrote:
> On 10/08/15 20:13, Martin Brown wrote:
>>
>> Or as someone else suggested fade one out and the other in over a number
>> of samples comparable with a few wavelengths.
>
> Any artefacts of the cross fade would cluster around 1/(cross-fade-time)
> in Hz, so pick a time and LPF away the artefacts. There's probably some
> cross-fade curve that minimises the effect, but that'll also depend on
> the LPF filter characteristics.
>
> I expect that's how frequency-shifters work, am I wrong?

Frequency shifters generally work by buffering the signal and resampling 
it at a slilghtly higher or lower rate to shift the frequency using a 
kernel that is typically 5 or 7 samples long.

Choice of interpolation kernel affects the artefacts introduced.

A truncated sinc function with a gaussian taper is typical.

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#372435

Frompiglet <erichpwagner@hotmail.com>
Date2015-08-11 09:13 +0100
Message-ID<mqcan8$h12$1@dont-email.me>
In reply to#372431
On 11/08/2015 08:26, Martin Brown wrote:
> Frequency shifters generally work by buffering the signal and resampling
> it at a slilghtly higher or lower rate to shift the frequency using a
> kernel that is typically 5 or 7 samples long.

Or in analog-land by multiplying with the shift frequency and phasing 
out the unwanted sideband. As in RF SSB generation.

piglet

[toc] | [prev] | [next] | [standalone]


#372594

FromRobert Baer <robertbaer@localnet.com>
Date2015-08-11 13:51 -0700
Message-ID<sftyx.36249$1E5.11940@fx03.iad>
In reply to#372435
piglet wrote:
> On 11/08/2015 08:26, Martin Brown wrote:
>> Frequency shifters generally work by buffering the signal and resampling
>> it at a slilghtly higher or lower rate to shift the frequency using a
>> kernel that is typically 5 or 7 samples long.
>
> Or in analog-land by multiplying with the shift frequency and phasing
> out the unwanted sideband. As in RF SSB generation.
>
> piglet
>
   Commonly done in the past, with not unreasonable results (depends on 
who the observer is).
   The commercial Darth Vader voice was done that way, i think.
   Often, i think, the SSB trick is easier and better.

[toc] | [prev] | [next] | [standalone]


#372634

FromClifford Heath <no.spam@please.net>
Date2015-08-12 10:11 +1000
Message-ID<S9wyx.52959$VN5.37876@fx14.iad>
In reply to#372594
On 12/08/15 06:51, Robert Baer wrote:
> piglet wrote:
>> On 11/08/2015 08:26, Martin Brown wrote:
>>> Frequency shifters generally work by buffering the signal and resampling
>>> it at a slilghtly higher or lower rate to shift the frequency using a
>>> kernel that is typically 5 or 7 samples long.
>>
>> Or in analog-land by multiplying with the shift frequency and phasing
>> out the unwanted sideband. As in RF SSB generation.
>>
>> piglet
>>
>    Commonly done in the past, with not unreasonable results (depends on
> who the observer is).
>    The commercial Darth Vader voice was done that way, i think.
>    Often, i think, the SSB trick is easier and better.

Adding a frequency offset upsets all the harmonics.
That's not the kind of frequency shifting that Martin and I were talking 
about.

[toc] | [prev] | [next] | [standalone]


#372229

Fromrev.11d.meow@gmail.com
Date2015-08-09 14:14 -0700
Message-ID<5d1dd0c0-800f-4130-95ab-59022f32609b@googlegroups.com>
In reply to#372219
On Sunday, August 9, 2015 at 1:05:22 PM UTC-7, John Miles, KE5FX wrote:
> On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
> > What sort of interpolation algorithm might be appropriate to use in a 
> > situation like this to smooth the discontinuity between the two jump points?
> 
> You won't be able to jump at random samples, just at the zero crossings.  If you jump around randomly, the output data will no longer represent samples of a band-limited signal, and no postfiltering process can remove the influence of the jumps.
> 
> If you really have to support arbitrary branches, the best approach is probably to continue reading from both the original and destination points and blend the data gradually.
> 


This is one of the topics that fascinates me most.

The Zero-Crossing cut & splice always works. But what about those cases when the waveform crosses Zero, but it happens Between Sample Capture for the actual Zero-Crossing in time?

.
.
.
t-3 sample = 0.31
t-2 sample = 0.23
t-1 sample = 0.14
Zero-Crossing's zero point is not in the sample data!
t0 sample = -0.02
t1 sample = -0.25
t2 sample = -0.37
.
.
.

Also, how does one calculate the time for a given list of arbitrary Sine wave frequencies for one full cycle to where all oscillators Cross-Zero in true unison again together? For example 100 Hz, SQR(2)*100 Hz, and 200 Hz starting in-phase at zero-crossing.

How many seconds does it take for all three tones to cross zero together when all start in-phase at the zero crossing origin? I know you have to multiply all three together and take out common factors if any, but then how to get it to duration in seconds or instead of number of cycles. My brain must be fried in this area as it is coming up a total blank, sorry.

[toc] | [prev] | [next] | [standalone]


#372252

From"John Miles, KE5FX" <jmiles@gmail.com>
Date2015-08-09 17:15 -0700
Message-ID<0d6a743d-4795-4dfd-a3ce-5eb74728fdd8@googlegroups.com>
In reply to#372229
On Sunday, August 9, 2015 at 2:14:24 PM UTC-7, rev.11...@gmail.com wrote:
> This is one of the topics that fascinates me most.
> 
> The Zero-Crossing cut & splice always works. But what about those cases when the waveform crosses Zero, but it happens Between Sample Capture for the actual Zero-Crossing in time?

This can definitely be a problem.  Splicing at the zero crossing doesn't guarantee the absence of artifacts, it just minimizes some obvious ones.  Ideally you'd match the slope of the waveform as well as the level, but even that doesn't guarantee that the transition will "sound" good in the frequency domain.

The problem is similar to the motivation behind windows in discrete Fourier transforms.  An overlapped FFT performs a crossfade between two blocks of data, essentially, in an attempt to maintain the fiction that the individual blocks were infinite in length.  It's not enough just to choose block boundaries at zero crossings.

> How many seconds does it take for all three tones to cross zero together when all start in-phase at the zero crossing origin? I know you have to multiply all three together and take out common factors if any, but then how to get it to duration in seconds or instead of number of cycles. My brain must be fried in this area as it is coming up a total blank, sorry.

They'll coincide at the least common multiple of their periods.  E.g., 3 Hz and 6 Hz would coincide after 1/3 second, but 3 Hz and 7 Hz, both being prime, will coincide after 1/((1/3) * (1/7)) = 21 seconds.  This would have to be quantized to the sample rate in your example, of course, since an exact LCM doesn't exist.

-- john, KE5FX

[toc] | [prev] | [next] | [standalone]


#372255

Fromrev.11d.meow@gmail.com
Date2015-08-09 17:34 -0700
Message-ID<f7da478f-a8cc-4bf2-a247-afbb9b7d47b1@googlegroups.com>
In reply to#372252
On Sunday, August 9, 2015 at 5:15:58 PM UTC-7, John Miles, KE5FX wrote:
> 
> They'll coincide at the least common multiple of their periods.  E.g., 3 Hz and 6 Hz would coincide after 1/3 second, but 3 Hz and 7 Hz, both being prime, will coincide after 1/((1/3) * (1/7)) = 21 seconds.  This would have to be quantized to the sample rate in your example, of course, since an exact LCM doesn't exist.
> 
> -- john, KE5FX

Thanks, I've been doing it backwards which means not well at all...

[toc] | [prev] | [next] | [standalone]


#372593

FromRobert Baer <robertbaer@localnet.com>
Date2015-08-11 13:39 -0700
Message-ID<Z3tyx.30997$g72.1104@fx12.iad>
In reply to#372229
rev.11d.meow@gmail.com wrote:
> On Sunday, August 9, 2015 at 1:05:22 PM UTC-7, John Miles, KE5FX wrote:
>> On Sunday, August 9, 2015 at 12:02:59 PM UTC-7, bitrex wrote:
>>> What sort of interpolation algorithm might be appropriate to use in a
>>> situation like this to smooth the discontinuity between the two jump points?
>>
>> You won't be able to jump at random samples, just at the zero crossings.  If you jump around randomly, the output data will no longer represent samples of a band-limited signal, and no postfiltering process can remove the influence of the jumps.
>>
>> If you really have to support arbitrary branches, the best approach is probably to continue reading from both the original and destination points and blend the data gradually.
>>
>
>
> This is one of the topics that fascinates me most.
>
> The Zero-Crossing cut&  splice always works. But what about those cases when the waveform crosses Zero, but it happens Between Sample Capture for the actual Zero-Crossing in time?
>
> .
> .
> .
> t-3 sample = 0.31
> t-2 sample = 0.23
> t-1 sample = 0.14
> Zero-Crossing's zero point is not in the sample data!
> t0 sample = -0.02
> t1 sample = -0.25
> t2 sample = -0.37
> .
> .
> .
>
> Also, how does one calculate the time for a given list of arbitrary Sine wave frequencies for one full cycle to where all oscillators Cross-Zero in true unison again together? For example 100 Hz, SQR(2)*100 Hz, and 200 Hz starting in-phase at zero-crossing.
>
> How many seconds does it take for all three tones to cross zero together when all start in-phase at the zero crossing origin? I know you have to multiply all three together and take out common factors if any, but then how to get it to duration in seconds or instead of number of cycles. My brain must be fried in this area as it is coming up a total blank, sorry.
   Zero crossing cut and splice CANNOT "always work".
   (Baer) fur eggzample, first waveform was going negative from some 
(unknown) positive value, and the second waveform happens to go positive 
from some (unknown) negative value. MAJOR glitch!
   There ain't no symple solution.
   Other than GURrowl at it.

[toc] | [prev] | [next] | [standalone]


#372658

FromRev. 11D Meow! <rev.11d.meow@gmail.com>
Date2015-08-11 21:27 -0700
Message-ID<8lilsa9sb3a5mb7c0lrhgqlahra60kp1bm@4ax.com>
In reply to#372593
On Tue, 11 Aug 2015 13:39:22 -0700, Robert Baer
<robertbaer@localnet.com> wrote:
>   There ain't no symple solution.
>   Other than GURrowl at it.

Best answer yet, Thanks    :)

Can I steal your "GURrowl" for laterl appropriatations?

It pretty much lays-it-on-the-line for pretty much everything these
days. 

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | sci.electronics.design


csiph-web