Csound Csound-dev Csound-tekno Search About

[Csnd] another new opcode: tposcal

Date2010-02-14 21:38
FromVictor Lazzarini
Subject[Csnd] another new opcode: tposcal
Hi everyone,

just an update on this new work on timestretching. I fixed a couple of  
small teething problems with mincer and now both the phase locking and  
the pitch transposition seem to work well.

In addition, I have also  written a variation on mincer to do tempo  
scaling.  The opcode attempts to detect attacks and to avoid smearing  
them when doing time scaling.

a1  tposcal  ktimescal,kamp,kpitch,ktab,klock[,ifftsize, idecim,  
ithresh]


ktimescal = timescaling ratio, < 1stretch, > 2 contract
kamp = amplitude scaling
kpitch = pitch scaling
klock = 0 turns off phase locking, any other values turn it on
ktab = source table (GEN01 for instance, containing sound to be  
transformed, any size allowed)

ifftsize = fftsize (default 2048)
idecim = decimation (defaults to 4)
idbthresh =  threshold based on dB power spectrum ratio between two  
successive windows. A detected ratio above it will cancel timescaling  
momentarily, to avoid smearing (defaults to 1)


So the main changes from mincer is that we loose the flexibility of  
controlling the time pointer directly. However with the indirect  
control of timescaling, it's possible to alter it adaptively.




-d


0dbfs = 1 ; MAX AMPLITUDE IS 1.0 !!!!
nchnls=1
ksmps =10
gaef init 0

instr 1

idur = p3
ilock = p4
itab = 1
ipitch = 1
iamp = 0.8
ktime linseg 0.3, p3/2, 0.8, p3/2, 0.3

a1 tpscal ktime,iamp,ipitch,itab,ilock

     out a1
endin



f1 0 0 1 "tune.wav" 0 0 1

i1 0 30 1





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-14 21:42
FromVictor Lazzarini
Subject[Csnd] Re: another new opcode: tposcal
oops:

ktimescal = timescalig ratio,  < 1 stretch, > 1 contract

On 14 Feb 2010, at 21:38, Victor Lazzarini wrote:

> Hi everyone,
>
> just an update on this new work on timestretching. I fixed a couple  
> of small teething problems with mincer and now both the phase  
> locking and the pitch transposition seem to work well.
>
> In addition, I have also  written a variation on mincer to do tempo  
> scaling.  The opcode attempts to detect attacks and to avoid  
> smearing them when doing time scaling.
>
> a1  tposcal  ktimescal,kamp,kpitch,ktab,klock[,ifftsize, idecim,  
> ithresh]
>
>
> ktimescal = timescaling ratio, < 1stretch, > 2 contract
> kamp = amplitude scaling
> kpitch = pitch scaling
> klock = 0 turns off phase locking, any other values turn it on
> ktab = source table (GEN01 for instance, containing sound to be  
> transformed, any size allowed)
>
> ifftsize = fftsize (default 2048)
> idecim = decimation (defaults to 4)
> idbthresh =  threshold based on dB power spectrum ratio between two  
> successive windows. A detected ratio above it will cancel  
> timescaling momentarily, to avoid smearing (defaults to 1)
>
>
> So the main changes from mincer is that we loose the flexibility of  
> controlling the time pointer directly. However with the indirect  
> control of timescaling, it's possible to alter it adaptively.
>
>
> 
> 
> -d
> 
> 
> 0dbfs = 1 ; MAX AMPLITUDE IS 1.0 !!!!
> nchnls=1
> ksmps =10
> gaef init 0
>
> instr 1
>
> idur = p3
> ilock = p4
> itab = 1
> ipitch = 1
> iamp = 0.8
> ktime linseg 0.3, p3/2, 0.8, p3/2, 0.3
>
> a1 tpscal ktime,iamp,ipitch,itab,ilock
>
>    out a1
> endin
>
> 
> 
> f1 0 0 1 "tune.wav" 0 0 1
>
> i1 0 30 1
>
> 
> 
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-02-15 15:42
From"Dr. Richard Boulanger"
Subject[Csnd] Re: another new opcode: tposcal
wow - very very useful and powerful.  thanks so much for writing them.

what we need now is one of those melodyne, vocalign, pitchcorrecting/ 
harmonizing opcodes - the tpain opcode :-)

this stuff is awesome.

Rick

On Feb 14, 2010, at 4:38 PM, Victor Lazzarini wrote:

> Hi everyone,
>
> just an update on this new work on timestretching. I fixed a couple  
> of small teething problems with mincer and now both the phase  
> locking and the pitch transposition seem to work well.
>
> In addition, I have also  written a variation on mincer to do tempo  
> scaling.  The opcode attempts to detect attacks and to avoid  
> smearing them when doing time scaling.
>
> a1  tposcal  ktimescal,kamp,kpitch,ktab,klock[,ifftsize, idecim,  
> ithresh]
>
>
> ktimescal = timescaling ratio, < 1stretch, > 2 contract
> kamp = amplitude scaling
> kpitch = pitch scaling
> klock = 0 turns off phase locking, any other values turn it on
> ktab = source table (GEN01 for instance, containing sound to be  
> transformed, any size allowed)
>
> ifftsize = fftsize (default 2048)
> idecim = decimation (defaults to 4)
> idbthresh =  threshold based on dB power spectrum ratio between two  
> successive windows. A detected ratio above it will cancel  
> timescaling momentarily, to avoid smearing (defaults to 1)
>
>
> So the main changes from mincer is that we loose the flexibility of  
> controlling the time pointer directly. However with the indirect  
> control of timescaling, it's possible to alter it adaptively.
>
>
> 
> 
> -d
> 
> 
> 0dbfs = 1 ; MAX AMPLITUDE IS 1.0 !!!!
> nchnls=1
> ksmps =10
> gaef init 0
>
> instr 1
>
> idur = p3
> ilock = p4
> itab = 1
> ipitch = 1
> iamp = 0.8
> ktime linseg 0.3, p3/2, 0.8, p3/2, 0.3
>
> a1 tpscal ktime,iamp,ipitch,itab,ilock
>
>    out a1
> endin
>
> 
> 
> f1 0 0 1 "tune.wav" 0 0 1
>
> i1 0 30 1
>
> 
> 
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"