1. Lower WAV pitch problem

I'm trying to write a routine to lower the pitch of a waveform, by adding a
new sample point between every existing point, each new point being equal to
half the value of the difference between each of the original points, but
it's not working.

I get a wav that's twice as long in duration, quieter, but sounds like still
the same pitch as the original.  If I look at the waveform using a version
of "Cool Edit", it *looks* correctly stretched out doubly, though it doesn't
sound any
lower; and if I use "Cool Edit" to stretch the original, that *does* sound
lower, but *looks* the same as the original (ie, unstretched)!  And none of
the format data appears to be any different, as far as I can see.

Anybody have any idea what I might be doing wrong?

What I did was, I included the following procedure into an old version of
Daryl van den Brink's "WaveEdit":

--<code begins>

-- LOWER THE PITCH OF A SOUND BY 1/2:

-- copy first point in sample to a second, new sequence;

-- then, for every point in the original for which there is a next point,
-- subtract value of current point from next point;
-- take half of the difference;
-- add that value to the value of the lowest of the two points;
-- place that value at the end of the second sequence.

-- copy next point in original sample to second sequence, and
-- repeat above for the next point
-- (the one that was previously the second point)

-- then replace original with new,
-- changing wavelen & ? so it will write & play correctly.

procedure LowerPitch()
integer diff
sequence newWave
newWave = {}

  -- wave is the wave data, wave[1] is for mono
  for n = 1 to wavelen do
    newWave &= wave[1][n]

    if n < wavelen then
       diff = wave[1][n+1] - wave[1][n]
       if diff != 0 then
          newWave &= wave[1][n] + floor(diff / 2)
       else  -- two successive points are the same value, so just copy that
value:
          newWave &= wave[1][n]
       end if
    end if
  end for

  wave[1] = newWave
  wavelen = length(wave[1])

  changeStatus = 1
  refresh()



end procedure

onClick[mnuWaveLowerFrequency]=routine_id("LowerPitch")

--<end code>

Dan Moyer

new topic     » topic index » view message » categorize

2. Re: Lower WAV pitch problem

Bernie,

thanks, but I was making the pitch twice as low so I could later go through
and try to remove every other cycle, so as to have made the pitch lower but
retain the original time duration of the sample (I couldn't figure a good
way to do this for any other pitch change without introducing distortion).
In other words, adding a new point in between every data point should just
have made it 1/2 the pitch but twice as long in time, I thought.  Looking
graphically at the derived wave form, it looks essentially identical to the
original, just "stretched" out in time, without anything which would look
like harmonics.

Dan Moyer


----- Original Message -----
From: "Bernie Ryan" <xotron at bluefrognet.net>
To: "EUforum" <EUforum at topica.com>
Sent: Saturday, May 31, 2003 7:25 AM
Subject: RE: Lower WAV pitch problem


>
>
> Dan:
>    You maybe creating a harmonic of the original.
>    Try changing the original by something other
>    than one half or double which would create a
>    harmonic.
>
> Bernie
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Lower WAV pitch problem

Ricardo,

Ok, it's just an include tacked onto an older version of Daryl's WaveEdit,
but I'll send it all to you privately.

Dan Moyer

----- Original Message -----
From: <rforno at tutopia.com>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Lower WAV pitch problem


>
>
> Dan:
> May I help you by looking at your code to see where it went wrong?
> Regards.
> ----- Original Message -----
> From: Dan Moyer <DANIELMOYER at prodigy.net>
> To: EUforum <EUforum at topica.com>
> Sent: Saturday, May 31, 2003 10:27 PM
> Subject: Re: Lower WAV pitch problem
>
>
> > Bernie,
> >
> > thanks, but I was making the pitch twice as low so I could later go
> through
> > and try to remove every other cycle, so as to have made the pitch lower
> but
> > retain the original time duration of the sample (I couldn't figure a
good
> > way to do this for any other pitch change without introducing
distortion).
> > In other words, adding a new point in between every data point should
just
> > have made it 1/2 the pitch but twice as long in time, I thought.
Looking
> > graphically at the derived wave form, it looks essentially identical to
> the
> > original, just "stretched" out in time, without anything which would
look
> > like harmonics.
> >
> > Dan Moyer
> >
> >
> > ----- Original Message -----
> > From: "Bernie Ryan" <xotron at bluefrognet.net>
> > To: "EUforum" <EUforum at topica.com>
> > Sent: Saturday, May 31, 2003 7:25 AM
> > Subject: RE: Lower WAV pitch problem
> >
> >
> > > Dan:
> > >    You maybe creating a harmonic of the original.
> > >    Try changing the original by something other
> > >    than one half or double which would create a
> > >    harmonic.
> > >
> > > Bernie
> > >
> > >
> > > TOPICA - Start your own email discussion group. FREE!
> > >
> > >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Lower WAV pitch problem

Oh, you're still messing around with that old crappy version of WaveEdit.  
Didn't you say it crashed when the wave is displayed?  I sent you the wrong 
file that time (it was one of my "work in progress" backups).  I'll send you 
a proper working one, but it's a bit embarrasing because it sucked badly.

The code you showed looks fine to me.  It should sound exactly one octave 
lower in pitch. I don't know what you could be doing to double the duration 
and make it's pitch stay the same, but I'd love to find out.  Maybe you 
should listen to it again, because I seriously doubt that it would be the 
same pitch.  Try inserting two samples in between each soriginal sample, to 
make the wave 3 times longer.  This definitely won't sound the same.

This code has not been tested.

procedure LowerPitch()
integer diff1, diff2
sequence newWave
newWave = {}

   -- wave is the wave data, wave[1] is for mono
   for n = 1 to wavelen do
     newWave &= wave[1][n]

     if n < wavelen then
        diff1 = wave[1][n+1] - wave[1][n]
        if diff != 0 then
           newWave &= {wave[1][n] + floor(diff / 3), wave[1][n] + 
floor(diff*2 / 3)}
        else  -- two successive points are the same value, so just copy that 
value:
           newWave &= repeat(wave[1][n], 2)
        end if
     end if
   end for

   wave[1] = newWave
   wavelen = length(wave[1])

   changeStatus = 1
   refresh()

end procedure


regards,
Daryl Van Den Brink

>I'm trying to write a routine to lower the pitch of a waveform, by adding a
>new sample point between every existing point, each new point being equal 
>to
>half the value of the difference between each of the original points, but
>it's not working.
>
>I get a wav that's twice as long in duration, quieter, but sounds like 
>still
>the same pitch as the original.  If I look at the waveform using a version
>of "Cool Edit", it *looks* correctly stretched out doubly, though it 
>doesn't
>sound any
>lower; and if I use "Cool Edit" to stretch the original, that *does* sound
>lower, but *looks* the same as the original (ie, unstretched)!  And none of
>the format data appears to be any different, as far as I can see.
>
>Anybody have any idea what I might be doing wrong?
>
>What I did was, I included the following procedure into an old version of
>Daryl van den Brink's "WaveEdit":
>
>--<code begins>
>
>-- LOWER THE PITCH OF A SOUND BY 1/2:
>
>-- copy first point in sample to a second, new sequence;
>
>-- then, for every point in the original for which there is a next point,
>-- subtract value of current point from next point;
>-- take half of the difference;
>-- add that value to the value of the lowest of the two points;
>-- place that value at the end of the second sequence.
>
>-- copy next point in original sample to second sequence, and
>-- repeat above for the next point
>-- (the one that was previously the second point)
>
>-- then replace original with new,
>-- changing wavelen & ? so it will write & play correctly.
>
>procedure LowerPitch()
>integer diff
>sequence newWave
>newWave = {}
>
>   -- wave is the wave data, wave[1] is for mono
>   for n = 1 to wavelen do
>     newWave &= wave[1][n]
>
>     if n < wavelen then
>        diff = wave[1][n+1] - wave[1][n]
>        if diff != 0 then
>           newWave &= wave[1][n] + floor(diff / 2)
>        else  -- two successive points are the same value, so just copy 
>that
>value:
>           newWave &= wave[1][n]
>        end if
>     end if
>   end for
>
>   wave[1] = newWave
>   wavelen = length(wave[1])
>
>   changeStatus = 1
>   refresh()
>
>
>end procedure
>
>onClick[mnuWaveLowerFrequency]=routine_id("LowerPitch")
>
>--<end code>
>
>Dan Moyer

new topic     » goto parent     » topic index » view message » categorize

5. Re: Lower WAV pitch problem

Daryl,

I think I don't have the problem I thought I had, sigh, see below.

----- Original Message -----
From: <daryl_vdb at hotmail.com>
>
>
> Oh, you're still messing around with that old crappy version of WaveEdit.
> Didn't you say it crashed when the wave is displayed?

Yes, but it doesn't crash if I just open a wav file, & don't try to*select*
any portion of the not yet displayed waveform from the blank screen.  It's a
convenient test platform, since it already opens & saves wav files  :)

>I sent you the wrong
> file that time (it was one of my "work in progress" backups).  I'll send
you
> a proper working one, but it's a bit embarrasing because it sucked badly.

That's ok :)

>
> The code you showed looks fine to me.  It should sound exactly one octave
> lower in pitch.

I figured it should give 1/2 the original frequency, but I didn't know that
was the same as an octave???

>I don't know what you could be doing to double the duration
> and make it's pitch stay the same, but I'd love to find out.

If you wanted to do that on purpose, just put a copy of the existing samples
at the end of the original  :)


>  Maybe you
> should listen to it again, because I seriously doubt that it would be the
> same pitch.

I guess you're right, because I sent the code to Ricardo, and he says
something very similar to what Bernie suggested:  apparently I put so many
"deliberate" harmonics into my original test wave, that when I halved the
whole thing, the result gave an aural illusion of being the same as it was
initially.




>  Try inserting two samples in between each soriginal sample, to
> make the wave 3 times longer.  This definitely won't sound the same.

Thanks, you're right, that *was* clearly lower!

>
> This code has not been tested.
>
> procedure LowerPitch()
> integer diff1, diff2

but no need for diff1,diff2

> sequence newWave
> newWave = {}
>
>    -- wave is the wave data, wave[1] is for mono
>    for n = 1 to wavelen do
>      newWave &= wave[1][n]
>
>      if n < wavelen then
>         diff1 = wave[1][n+1] - wave[1][n]
>         if diff != 0 then
>            newWave &= {wave[1][n] + floor(diff / 3), wave[1][n] +
> floor(diff*2 / 3)}
>         else  -- two successive points are the same value, so just copy
that
> value:
>            newWave &= repeat(wave[1][n], 2)
>         end if
>      end if
>    end for
>
>    wave[1] = newWave
>    wavelen = length(wave[1])
>
>    changeStatus = 1
>    refresh()
>
> end procedure
>
>
> regards,
> Daryl Van Den Brink
>
> >I'm trying to write a routine to lower the pitch of a waveform, by adding
a
> >new sample point between every existing point, each new point being equal
> >to
> >half the value of the difference between each of the original points, but
> >it's not working.
> >
> >I get a wav that's twice as long in duration, quieter, but sounds like
> >still
> >the same pitch as the original.  If I look at the waveform using a
version
> >of "Cool Edit", it *looks* correctly stretched out doubly, though it
> >doesn't
> >sound any
> >lower; and if I use "Cool Edit" to stretch the original, that *does*
sound
> >lower, but *looks* the same as the original (ie, unstretched)!  And none
of
> >the format data appears to be any different, as far as I can see.
> >
> >Anybody have any idea what I might be doing wrong?
> >
> >What I did was, I included the following procedure into an old version of
> >Daryl van den Brink's "WaveEdit":
> >
> >--<code begins>
> >
> >-- LOWER THE PITCH OF A SOUND BY 1/2:
> >
> >-- copy first point in sample to a second, new sequence;
> >
> >-- then, for every point in the original for which there is a next point,
> >-- subtract value of current point from next point;
> >-- take half of the difference;
> >-- add that value to the value of the lowest of the two points;
> >-- place that value at the end of the second sequence.
> >
> >-- copy next point in original sample to second sequence, and
> >-- repeat above for the next point
> >-- (the one that was previously the second point)
> >
> >-- then replace original with new,
> >-- changing wavelen & ? so it will write & play correctly.
> >
> >procedure LowerPitch()
> >integer diff
> >sequence newWave
> >newWave = {}
> >
> >   -- wave is the wave data, wave[1] is for mono
> >   for n = 1 to wavelen do
> >     newWave &= wave[1][n]
> >
> >     if n < wavelen then
> >        diff = wave[1][n+1] - wave[1][n]
> >        if diff != 0 then
> >           newWave &= wave[1][n] + floor(diff / 2)
> >        else  -- two successive points are the same value, so just copy
> >that
> >value:
> >           newWave &= wave[1][n]
> >        end if
> >     end if
> >   end for
> >
> >   wave[1] = newWave
> >   wavelen = length(wave[1])
> >
> >   changeStatus = 1
> >   refresh()
> >
> >
> >end procedure
> >
> >onClick[mnuWaveLowerFrequency]=routine_id("LowerPitch")
> >
> >--<end code>
> >
> >Dan Moyer
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: Lower WAV pitch problem

Bernie,

As Ricardo has now explained to me privately, you're probably right, thanks.
I made my test wave with a bunch of harmonics to begin with, if I hadn't
done that it might not have been a problem.

Dan Moyer

----- Original Message -----
From: "Bernie Ryan" <xotron at bluefrognet.net>
To: "EUforum" <EUforum at topica.com>
Subject: RE: Lower WAV pitch problem


>
>
> Dan:
>    You maybe creating a harmonic of the original.
>    Try changing the original by something other
>    than one half or double which would create a
>    harmonic.
>
> Bernie
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

7. Re: Lower WAV pitch problem

Daryl Van Den Brink wrote:

> I don't know what you could be doing to double the duration
> and make it's pitch stay the same, but I'd love to find out.

This turns out to be solvable, but non-trivial. Sound basically decomposes 
into two types: sound carrying harmonic content, and noise.

First, you chop up the sound into sufficiently small chunks. If you make the 
chunks to small, you don't capture enough harmonic information. If you make 
them too large, you end up getting "pre echo" because you're including 
information that doesn't belong in that timeframe.

To derive the harmonic content, you do a fourier analysis on each chunk. 

To derive noise content, once you decide that a chunk contains noise, you do 
bark banding on it. Noise doesn't have to be pitch shifted in the 
reconstruction.

You also need to look at the volume, so you can build a volume envelope when 
you rebuild the sound.

Now you've got enough information to reconstruct the sound. Take the chunks 
that have harmonic content, and rebuild their harmonics to the new pitch - 
just reverse the fourier process. The noise chunks are rebuilt out of the 
bark bands. Join all the chunks together and recreate the volume envelope to 
match the original sound.

Easy, huh?

Sorry, I don't have the references available. That's the point I threw up my 
hands and decided to try something easier, like herding cats or juggling 
knives... 

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

8. Re: Lower WAV pitch problem

(looking very stupid)  when I suggested just tacking copy of wave onto end
of wave to double duration without pitch shift, I was just considering my
simple wave, not the general & more realistic case, sigh.  <head hits
keyboard: tyughjvbn>

Does fourier analysis yield a set of sine waves which when re-combined yield
the original waveform?

How do you do fourier analysis?  :))

How do you discern noise, just high frequency?

I'm interested in changing human voice samples by lowering pitch, but
thinking to only lower vowel portions of the sample, not sibilance &
explosives (or whatever they're called, like "PoP", "Boom", "Take", etc), so
I'd need to be able to discern them.  I'm getting the impression it's more
like juggling chainsaws than knives :)

Dan Moyer

----- Original Message -----
From: "David Cuny" <dcuny at LANSET.COM>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, June 03, 2003 12:18 AM
Subject: Re: Lower WAV pitch problem


>
>
> Daryl Van Den Brink wrote:
>
> > I don't know what you could be doing to double the duration
> > and make it's pitch stay the same, but I'd love to find out.
>
> This turns out to be solvable, but non-trivial. Sound basically decomposes
> into two types: sound carrying harmonic content, and noise.
>
> First, you chop up the sound into sufficiently small chunks. If you make
the
> chunks to small, you don't capture enough harmonic information. If you
make
> them too large, you end up getting "pre echo" because you're including
> information that doesn't belong in that timeframe.
>
> To derive the harmonic content, you do a fourier analysis on each chunk.
>
> To derive noise content, once you decide that a chunk contains noise, you
do
> bark banding on it. Noise doesn't have to be pitch shifted in the
> reconstruction.
>
> You also need to look at the volume, so you can build a volume envelope
when
> you rebuild the sound.
>
> Now you've got enough information to reconstruct the sound. Take the
chunks
> that have harmonic content, and rebuild their harmonics to the new pitch -
> just reverse the fourier process. The noise chunks are rebuilt out of the
> bark bands. Join all the chunks together and recreate the volume envelope
to
> match the original sound.
>
> Easy, huh?
>
> Sorry, I don't have the references available. That's the point I threw up
my
> hands and decided to try something easier, like herding cats or juggling
> knives...
>
> -- David Cuny
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>

new topic     » goto parent     » topic index » view message » categorize

9. Re: Lower WAV pitch problem

On 3 Jun 2003, at 0:18, David Cuny wrote:

> 
> 
> Daryl Van Den Brink wrote:
> 
> > I don't know what you could be doing to double the duration
> > and make it's pitch stay the same, but I'd love to find out.
> 
> This turns out to be solvable, but non-trivial. Sound basically decomposes
> into
> two types: sound carrying harmonic content, and noise.
> 
> First, you chop up the sound into sufficiently small chunks. If you make the
> chunks to small, you don't capture enough harmonic information. If you make
> them
> too large, you end up getting "pre echo" because you're including information
> that doesn't belong in that timeframe.
> 
> To derive the harmonic content, you do a fourier analysis on each chunk. 
> 
> To derive noise content, once you decide that a chunk contains noise, you do
> bark banding on it. Noise doesn't have to be pitch shifted in the
> reconstruction.
> 
> You also need to look at the volume, so you can build a volume envelope when
> you
> rebuild the sound.
> 
> Now you've got enough information to reconstruct the sound. Take the chunks
> that
> have harmonic content, and rebuild their harmonics to the new pitch - just
> reverse the fourier process. The noise chunks are rebuilt out of the bark
> bands.
> Join all the chunks together and recreate the volume envelope to match the
> original sound.
> 
> Easy, huh?
> 
> Sorry, I don't have the references available. That's the point I threw up my
> hands and decided to try something easier, like herding cats or juggling
> knives... 

The olde method really was to chop at a freq way below audible, but zero-
crossing of the lowest fundamental works nicely, if it is sustained. 
Otherwise, the time-space of the chopping will vary, but may not be 
noticeable. Drop every other chop. Stretch the remaining to fit the original 
space. This works without changing the pitch (other than dropping everything 
an octave), if the chops are the same length, hence the fixed chop 
frequency. Peak levels won't be changed, but percieved volume may, 
because of Fletcher-Munson, etc. As you have discovered, your mileage 
may vary.

Kat

new topic     » goto parent     » topic index » view message » categorize

10. Re: Lower WAV pitch problem

Check out www.dspguide.com.

Dan Moyer wrote:

>
>
>(looking very stupid)  when I suggested just tacking copy of wave onto end
>of wave to double duration without pitch shift, I was just considering my
>simple wave, not the general & more realistic case, sigh.  <head hits
>keyboard: tyughjvbn>
>
>Does fourier analysis yield a set of sine waves which when re-combined yield
>the original waveform?
>
>How do you do fourier analysis?  :))
>
>How do you discern noise, just high frequency?
>
>I'm interested in changing human voice samples by lowering pitch, but
>thinking to only lower vowel portions of the sample, not sibilance &
>explosives (or whatever they're called, like "PoP", "Boom", "Take", etc), so
>I'd need to be able to discern them.  I'm getting the impression it's more
>like juggling chainsaws than knives :)
>
>Dan Moyer
>
>----- Original Message -----
>From: "David Cuny" <dcuny at LANSET.COM>
>To: "EUforum" <EUforum at topica.com>
>Sent: Tuesday, June 03, 2003 12:18 AM
>Subject: Re: Lower WAV pitch problem
>
>
>>Daryl Van Den Brink wrote:
>>
>>    
>>>I don't know what you could be doing to double the duration
>>>and make it's pitch stay the same, but I'd love to find out.
>>>      
>>>
>>This turns out to be solvable, but non-trivial. Sound basically decomposes
>>into two types: sound carrying harmonic content, and noise.
>>
>>First, you chop up the sound into sufficiently small chunks. If you make
>>    
>>
>the
>  
>
>>chunks to small, you don't capture enough harmonic information. If you
>>    
>>
>make
>  
>
>>them too large, you end up getting "pre echo" because you're including
>>information that doesn't belong in that timeframe.
>>
>>To derive the harmonic content, you do a fourier analysis on each chunk.
>>
>>To derive noise content, once you decide that a chunk contains noise, you
>>    
>>
>do
>  
>
>>bark banding on it. Noise doesn't have to be pitch shifted in the
>>reconstruction.
>>
>>You also need to look at the volume, so you can build a volume envelope
>>    
>>
>when
>  
>
>>you rebuild the sound.
>>
>>Now you've got enough information to reconstruct the sound. Take the
>>    
>>
>chunks
>  
>
>>that have harmonic content, and rebuild their harmonics to the new pitch -
>>just reverse the fourier process. The noise chunks are rebuilt out of the
>>bark bands. Join all the chunks together and recreate the volume envelope
>>    
>>
>to
>  
>
>>match the original sound.
>>
>>Easy, huh?
>>
>>Sorry, I don't have the references available. That's the point I threw up
>>    
>>
>my
>  
>
>>hands and decided to try something easier, like herding cats or juggling
<snip>

>
>
-- 
     |\      _,,,---,,_
    /,`.-'`'    -.  ;-;;,_
   |,4-  ) )-,_..;\ (  `'-'
  '---''(_/--'  `-'\_)`-'\_)

new topic     » goto parent     » topic index » view message » categorize

11. Re: Lower WAV pitch problem

Jeeze!!!!  It's even got stuff about neural nets!  Thanks, I'll see if I can
understand any of it :)

Dan Moyer

----- Original Message -----
From: <1evan at sbcglobal.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Lower WAV pitch problem


>
>
> Check out www.dspguide.com.
>
> Dan Moyer wrote:
>
> >
> >(looking very stupid)  when I suggested just tacking copy of wave onto
end
> >of wave to double duration without pitch shift, I was just considering my
> >simple wave, not the general & more realistic case, sigh.  <head hits
> >keyboard: tyughjvbn>
> >
> >Does fourier analysis yield a set of sine waves which when re-combined
yield
> >the original waveform?
> >
> >How do you do fourier analysis?  :))
> >
> >How do you discern noise, just high frequency?
> >
> >I'm interested in changing human voice samples by lowering pitch, but
> >thinking to only lower vowel portions of the sample, not sibilance &
> >explosives (or whatever they're called, like "PoP", "Boom", "Take", etc),
so
> >I'd need to be able to discern them.  I'm getting the impression it's
more
> >like juggling chainsaws than knives :)
> >
> >Dan Moyer
> >
> >----- Original Message -----
> >From: "David Cuny" <dcuny at LANSET.COM>
> >To: "EUforum" <EUforum at topica.com>
> >Sent: Tuesday, June 03, 2003 12:18 AM
> >Subject: Re: Lower WAV pitch problem
> >
> >
> >>Daryl Van Den Brink wrote:
> >>
> >>
> >>>I don't know what you could be doing to double the duration
> >>>and make it's pitch stay the same, but I'd love to find out.
> >>>
> >>>
> >>This turns out to be solvable, but non-trivial. Sound basically
decomposes
> >>into two types: sound carrying harmonic content, and noise.
> >>
> >>First, you chop up the sound into sufficiently small chunks. If you make
> >>
> >>
> >the
> >
> >
> >>chunks to small, you don't capture enough harmonic information. If you
> >>
> >>
> >make
> >
> >
> >>them too large, you end up getting "pre echo" because you're including
> >>information that doesn't belong in that timeframe.
> >>
> >>To derive the harmonic content, you do a fourier analysis on each chunk.
> >>
> >>To derive noise content, once you decide that a chunk contains noise,
you
> >>
> >>
> >do
> >
> >
> >>bark banding on it. Noise doesn't have to be pitch shifted in the
> >>reconstruction.
> >>
> >>You also need to look at the volume, so you can build a volume envelope
> >>
> >>
> >when
> >
> >
> >>you rebuild the sound.
> >>
> >>Now you've got enough information to reconstruct the sound. Take the
> >>
> >>
> >chunks
> >
> >
> >>that have harmonic content, and rebuild their harmonics to the new
pitch -
> >>just reverse the fourier process. The noise chunks are rebuilt out of
the
> >>bark bands. Join all the chunks together and recreate the volume
envelope
> >>
> >>
> >to
> >
> >
> >>match the original sound.
> >>
> >>Easy, huh?
> >>
> >>Sorry, I don't have the references available. That's the point I threw
up
> >>
> >>
> >my
> >
> >
> >>hands and decided to try something easier, like herding cats or juggling
> <snip>
>
> >
> --
>      |\      _,,,---,,_
>     /,`.-'`'    -.  ;-;;,_
>    |,4-  ) )-,_..;\ (  `'-'
>   '---''(_/--'  `-'\_)`-'\_)
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

12. Re: Lower WAV pitch problem

What David Cuny wrote was very interesting, but I don't know anything about 
fourier analysis.  I would love to find out about how to do fourier analysis 
because it would open up a lot of new possibilities (this "changing duration 
without changing pitch" would be just one of them.)

Who knows about fourier analysis, and where can I find more information on 
it?
(OTOH, a google search revealed heaps of information, thanks anyway)

thanks,
Daryl Van Den Brink


>Daryl Van Den Brink wrote:
>
> > I don't know what you could be doing to double the duration
> > and make it's pitch stay the same, but I'd love to find out.
>
>This turns out to be solvable, but non-trivial. Sound basically decomposes
>into two types: sound carrying harmonic content, and noise.
>
>First, you chop up the sound into sufficiently small chunks. If you make 
>the
>chunks to small, you don't capture enough harmonic information. If you make
>them too large, you end up getting "pre echo" because you're including
>information that doesn't belong in that timeframe.
>
>To derive the harmonic content, you do a fourier analysis on each chunk.
>
>To derive noise content, once you decide that a chunk contains noise, you 
>do
>bark banding on it. Noise doesn't have to be pitch shifted in the
>reconstruction.
>
>You also need to look at the volume, so you can build a volume envelope 
>when
>you rebuild the sound.
>
>Now you've got enough information to reconstruct the sound. Take the chunks
>that have harmonic content, and rebuild their harmonics to the new pitch -
>just reverse the fourier process. The noise chunks are rebuilt out of the
>bark bands. Join all the chunks together and recreate the volume envelope 
>to
>match the original sound.
>
>Easy, huh?
>
>Sorry, I don't have the references available. That's the point I threw up 
>my
>hands and decided to try something easier, like herding cats or juggling
>knives...
>
>-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

13. Re: Lower WAV pitch problem

>
>Check out www.dspguide.com.
>

That looks very interesting, I'll check it out

Thanks

new topic     » goto parent     » topic index » view message » categorize

14. Re: Lower WAV pitch problem

On 4 Jun 2003, at 9:16, daryl_vdb at hotmail.com wrote:

 >
 >
 >
 > What David Cuny wrote was very interesting, but I don't know anything about
 > fourier analysis.  I would love to find out about how to do fourier analysis
 > because it would open up a lot of new possibilities (this "changing duration
 > without changing pitch" would be just one of them.)
 >
> Who knows about fourier analysis, and where can I find more information on
 > it?
 > (OTOH, a google search revealed heaps of information, thanks anyway)

I know enough to say you will want to do *fast* fourier analysis, not the long
version. I dunno about now, but way back when, mere mortals could not
buy a puter that would do a long version in real time. See:
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=FFT+analysis
there's some pdf's on how to do it.

Kat

 > thanks,
 > Daryl Van Den Brink
 >
 >
 > >Daryl Van Den Brink wrote:
 > >
 > > > I don't know what you could be doing to double the duration
 > > > and make it's pitch stay the same, but I'd love to find out.
 > >
> >This turns out to be solvable, but non-trivial. Sound basically decomposes
 > >into
 > >two types: sound carrying harmonic content, and noise.
 > >
 > >First, you chop up the sound into sufficiently small chunks. If you make
 > >the
 > >chunks to small, you don't capture enough harmonic information. If you make
 > >them too large, you end up getting "pre echo" because you're including
 > >information that doesn't belong in that timeframe.
 > >
 > >To derive the harmonic content, you do a fourier analysis on each chunk.
 > >
 > >To derive noise content, once you decide that a chunk contains noise, you do
 > >bark banding on it. Noise doesn't have to be pitch shifted in the
 > >reconstruction.
 > >
 > >You also need to look at the volume, so you can build a volume envelope
 > >when
 > >you rebuild the sound.
 > >
 > >Now you've got enough information to reconstruct the sound. Take the chunks
> >that have harmonic content, and rebuild their harmonics to the new pitch -
 > >just
 > >reverse the fourier process. The noise chunks are rebuilt out of the bark
> >bands. Join all the chunks together and recreate the volume envelope to
 > >match
 > >the original sound.
 > >
 > >Easy, huh?
 > >
 > >Sorry, I don't have the references available. That's the point I threw up my
 > >hands and decided to try something easier, like herding cats or juggling
 > >knives...
 > >
 > >-- David Cuny
 >
 >
 >
 > TOPICA - Start your own email discussion group. FREE!
 >
 >
 >
 >

new topic     » goto parent     » topic index » view message » categorize

15. Re: Lower WAV pitch problem

Hello Daryl Van Den Brink:

>  >
>  > Who knows about fourier analysis, and where 
>  > can I find more information on it?

There was mail posted by Robert Craig to this list
in 2001, dec 13, exactly with his EU fft program,
try search on RDS site for this list archive.

Rob was one of the developers of the Fourier
programming language. 
Maybe, he will remember that times and tell us  smile

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view message » categorize

16. Re: Lower WAV pitch problem

Igor Kachan wrote:
> There was mail posted by Robert Craig to this list
> in 2001, dec 13, exactly with his EU fft program,
> try search on RDS site for this list archive.
> 
> Rob was one of the developers of the Fourier
> programming language. 
> Maybe, he will remember that times and tell us  smile

Well Igor, as a retired Russian submariner, I shouldn't tell
you too much smile, but one of the main uses of Fourier was
in submarine detection, i.e. analysing sonar signals.
In the mid-80's the Canadian navy hired a small
15-person company that I worked for to build a
compiler for an FFT machine they had built. It could
do FFT's faster than any other machine in the world.
It was designed from the ground up to do FFT's
using all kinds of parallelism. It had 8 independent pipelines,
and each pipeline had 7 stages. Imagine a factory where
there are 8 assembly lines and 7 workers in stages
on each line - one adds, the next multiplies, etc.

I've forgotten a lot since then, but I know that FFT's
(Fast Fourier Transforms) are important in
converting time-series data into the frequency domain,
i.e. extracting the frequency components from a signal.

Fourier, the programming language was based loosely on Ada,
the language that was trendy in the military back then.
I wasn't too proud of the language. My main fascination
was in compiling mathematical expressions into
machine instructions for this weird and very parallel machine.
It was important to order operations to take advantage of the
pipelines. A simple operation like adding two numbers meant
basically running an FFT but disabling a bunch of stuff.
The machine really wanted to do FFT's, and it wanted
all arrays to be powers of two etc. It was a painful
machine to program. The fact that there was any kind of
high-level language for it was somewhat impressive.

Later we sold a machine and a Fourier compiler
to MIT in the States for "Star Wars" research.

Uh Oh - I can hear the Royal Canadian Mounted Police
riding up to my door to take me away...  smile

Regards,
    Rob Craig
    Rapid Deployment Software
    http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

17. Re: Lower WAV pitch problem

Robert Craig wrote:

[good snip]

> 
> Uh Oh - I can hear the Royal Canadian Mounted Police
> riding up to my door to take me away...  smile
> 

Rob, yes, we were the ferocious enemies.

In the mid-80's I was one of the testers
of some Soviet digital sonar equipment.

Good luck now with EUPHORIA, colleague smile

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu