Csound Csound-dev Csound-tekno Search About

sndwarp problem

Date1998-05-13 22:45
FromDavid Boothe
Subjectsndwarp problem
Hello Csounders-

According the documentation on sndwarp::

 "Time and frequency modification are indepentant from one another." 

I have not been able to get this to happen. Changing xtimewarp modifies
time and pitch by the same factor, while changing xresample has no
effect. Compiling the orc/sco files below gives a very good
representation of the original sound file, with silence padding out the
end.  (soundin.599 is a 440 Hz sine wave 65536 samples long in aiff
format), Changing p5 and p6 to .5 creates a sine wave twice as long and
an octave lower. Changing p7 and p8 to .5, or anything else, has no
effect. I have tried it with RT Sound 1.9 (implementing Csound 3.47) and
Winsound 3.477. What am I doing wrong? Thank you for your help.

-dB
 (David M. Boothe, Audio Director 
  Lyrick Studios, Dallas, TX)

--------------
;orc file using soundin.599
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

instr 01

aamp      = p4  ;amplitude scaling of samp
iatim     = p5  ;starting time factor
ibtim     = p6  ;ending time factor
iapch     = p7  ;starting pitch factor
ibpch     = p8  ;ending pitch factor
iwsize    = p9  ;window size in samps
irandw    = p10 ;rand window size bw (in samps)
ioverlap  = p11 ;dens of overlapping windows
ifn1      = 71  ;ftable sound
ifn2      = 81  ;ftable window
ibeg      = 0   ;where to start reading ftable
itimemode = 0   ;make atimewarp scaling factor
atimewarp line  iatim, p3, ibtim	;time scaling
aresample line  iapch, p3, ibpch	;pitch scaling

a1 sndwarp aamp, atimewarp, aresample, ifn1, /
           ibeg, iwsize, irandw, ioverlap, ifn2, itimemode 
out a1
endin

-----------------
;sco file using soundin.599
f71 0	65536 -1  599 0 0 0 ;soundfile
f81 0	512    20 1         ;Hamming Window

;p4	amplitude scaling of samp
;p5	starting time factor
;p6	ending time factor
;p7	starting pitch factor
;p8	ending pitch factor
;p9	window size in samps
;p10	rand window size bw (in samps)
;p11	dens of overlapping windows

;p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
 i1 0  4  1  1  1  1  1  1  0   10
e

Date1998-05-13 23:07
FromRichard Karpen
SubjectRe: sndwarp problem
It looks like your window size is 1 sample long! Try making in 2000 and
then also make the random windowsize something like 200.

Richard Karpen


On Wed, 13 May 1998, David Boothe wrote:

> Hello Csounders-
> 
> According the documentation on sndwarp::
> 
>  "Time and frequency modification are indepentant from one another." 
> 
> I have not been able to get this to happen. Changing xtimewarp modifies
> time and pitch by the same factor, while changing xresample has no
> effect. Compiling the orc/sco files below gives a very good
> representation of the original sound file, with silence padding out the
> end.  (soundin.599 is a 440 Hz sine wave 65536 samples long in aiff
> format), Changing p5 and p6 to .5 creates a sine wave twice as long and
> an octave lower. Changing p7 and p8 to .5, or anything else, has no
> effect. I have tried it with RT Sound 1.9 (implementing Csound 3.47) and
> Winsound 3.477. What am I doing wrong? Thank you for your help.
> 
> -dB
>  (David M. Boothe, Audio Director 
>   Lyrick Studios, Dallas, TX)
> 
> --------------
> ;orc file using soundin.599
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 1
> 
> instr 01
> 
> aamp      = p4  ;amplitude scaling of samp
> iatim     = p5  ;starting time factor
> ibtim     = p6  ;ending time factor
> iapch     = p7  ;starting pitch factor
> ibpch     = p8  ;ending pitch factor
> iwsize    = p9  ;window size in samps
> irandw    = p10 ;rand window size bw (in samps)
> ioverlap  = p11 ;dens of overlapping windows
> ifn1      = 71  ;ftable sound
> ifn2      = 81  ;ftable window
> ibeg      = 0   ;where to start reading ftable
> itimemode = 0   ;make atimewarp scaling factor
> atimewarp line  iatim, p3, ibtim	;time scaling
> aresample line  iapch, p3, ibpch	;pitch scaling
> 
> a1 sndwarp aamp, atimewarp, aresample, ifn1, /
>            ibeg, iwsize, irandw, ioverlap, ifn2, itimemode 
> out a1
> endin
> 
> -----------------
> ;sco file using soundin.599
> f71 0	65536 -1  599 0 0 0 ;soundfile
> f81 0	512    20 1         ;Hamming Window
> 
> ;p4	amplitude scaling of samp
> ;p5	starting time factor
> ;p6	ending time factor
> ;p7	starting pitch factor
> ;p8	ending pitch factor
> ;p9	window size in samps
> ;p10	rand window size bw (in samps)
> ;p11	dens of overlapping windows
> 
> ;p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
>  i1 0  4  1  1  1  1  1  1  0   10
> e
> 
> 
>