Csound Csound-dev Csound-tekno Search About

[Cs-dev] pvscale

Date2007-11-29 13:55
Fromjpff
Subject[Cs-dev] pvscale
I am having problems with pvscale.  It seems to have discontinuities
in amplitude, although the pitch seems OK
  The example below has a slow decline from 0 to 0.5s when it drops by
a large amount for 0.1 sec and then jumps back and declines slowly for
0.4s and so on.

instr 4
      kl   line       1, p3, 2
      asig oscili     16000, 440, 1 
      fsig pvsanal    asig,512,128,512,0
      fs   pvscale    fsig, kl
      ac   pvsynth    fs
           out        ac
endin

and 

i4 0 3


==John ffitch

"This research is of insufficient standard"

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-11-29 14:14
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvscale
I think this is due to the way that pvscale, to be fast, does not
consider the fact that certain components should be falling in
more than one bin at a time, so as the components get reassigned
to different bins, some will contain 0 amplitude, esp.  higher
bins. I think this is more evident in simple sounds, more complex
spectra will probably have better results. If you look at the code,
I zero all the bins before moving bin contents about.

For instance if a sound has components on bins 1,2,3,4 and is
scaled by 1.5, then its components will go to bins 1 (1.5), 3, 4 (4.5), 6,
but bins 2 and 5 will be zero, because of the truncation. Perhaps
in that case, we should assign 50% of bin 1 amp to 1 and 2, the similar
thing to 4 and 5. However, I think this is only simple lower down in the
spectrum, it might become more complicated higher up. But this
fudged solution might be experimented with.

To do a more complete scaling of the spectrum, we would need
to perhaps apply some convolution with the spectrum of the
analysis window, plus possibly some other things. It might
be too complicated for real time uses.

Victor

At 13:55 29/11/2007, you wrote:
>I am having problems with pvscale.  It seems to have discontinuities
>in amplitude, although the pitch seems OK
>   The example below has a slow decline from 0 to 0.5s when it drops by
>a large amount for 0.1 sec and then jumps back and declines slowly for
>0.4s and so on.
>
>instr 4
>       kl   line       1, p3, 2
>       asig oscili     16000, 440, 1
>       fsig pvsanal    asig,512,128,512,0
>       fs   pvscale    fsig, kl
>       ac   pvsynth    fs
>            out        ac
>endin
>
>and
>
>i4 0 3
>
>
>==John ffitch
>
>"This research is of insufficient standard"
>
>-------------------------------------------------------------------------
>SF.Net email is sponsored by: The Future of Linux Business White Paper
>from Novell.  From the desktop to the data center, Linux is going
>mainstream.  Let it simplify your IT future.
>http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2007-11-29 14:16
FromVictor Lazzarini
SubjectRe: [Cs-dev] pvscale
also: this might be resulting from the truncation rather than
rounding in bin reassignment.

Victor

At 13:55 29/11/2007, you wrote:
>I am having problems with pvscale.  It seems to have discontinuities
>in amplitude, although the pitch seems OK
>   The example below has a slow decline from 0 to 0.5s when it drops by
>a large amount for 0.1 sec and then jumps back and declines slowly for
>0.4s and so on.
>
>instr 4
>       kl   line       1, p3, 2
>       asig oscili     16000, 440, 1
>       fsig pvsanal    asig,512,128,512,0
>       fs   pvscale    fsig, kl
>       ac   pvsynth    fs
>            out        ac
>endin
>
>and
>
>i4 0 3
>
>
>==John ffitch
>
>"This research is of insufficient standard"
>
>-------------------------------------------------------------------------
>SF.Net email is sponsored by: The Future of Linux Business White Paper
>from Novell.  From the desktop to the data center, Linux is going
>mainstream.  Let it simplify your IT future.
>http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net