Csound Csound-dev Csound-tekno Search About

[Csnd] lpread and lpfread

Date2010-06-07 20:02
Frommenno
Subject[Csnd] lpread and lpfread
Hi,

is someone willing to try out this example? It is a bit of work because you
have to analyze with LPANAL the soundfile "fox.wav" that can be found in the
examples folder from the manual.



; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac           -iadc     -d     ;;;RT audio I/O



; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

; Instrument #1.
instr 1
asig	buzz	20000, 440, 10, 1
;fox.lpc = 2.8 seconds long
ktime  line 0, p3, 2.8       ; Define time lin
krmsr,krmso,kerr,kcps lpread    ktime,"/home/menno/manual/examples/fox.lpc"
;aout				lpreson	asig
aout				lpfreson	asig, 1
ares				balance	aout, asig
       out ares

endin



f1 0 4096 10 1

i 1 0 2.8
e





According to the manual "aout	lpreson	asig" should be equal to "aout
lpfreson	asig, 1" but using the latter i get this error:

ftable 1:
new alloc for instr 1:
file /home/menno/manual/examples/fox.lpc (505064 bytes) loaded into memory
Using pole type of file.
INIT ERROR in instr 1: Pole file not supported for this opcode !
aout	lpfreson	asig	1	
	  B  0.000 - note deleted.  i1 had 1 init errors

When you run this with "aout	lpreson	asig" it works like it should.
My system = Ubuntu 10.04, QuteCsound 0.5.0

thanks very much,
Menno

Date2010-06-07 20:13
FromVictor Lazzarini
Subject[Csnd] Re: lpread and lpfread
you need to analyse the file with coefficients, not poles (don't use  
the -a opton).

Victor

On 7 Jun 2010, at 20:02, menno wrote:

>
> Hi,
>
> is someone willing to try out this example? It is a bit of work  
> because you
> have to analyze with LPANAL the soundfile "fox.wav" that can be  
> found in the
> examples folder from the manual.
>
> 
> 
> ; Select audio/midi flags here according to platform
> ; Audio out   Audio in    No messages
> -odac           -iadc     -d     ;;;RT audio I/O
> 
> 
>
> ; Initialize the global variables.
> sr = 44100
> kr = 4410
> ksmps = 10
> nchnls = 1
>
> ; Instrument #1.
> instr 1
> asig	buzz	20000, 440, 10, 1
> ;fox.lpc = 2.8 seconds long
> ktime  line 0, p3, 2.8       ; Define time lin
> krmsr,krmso,kerr,kcps lpread    ktime,"/home/menno/manual/examples/ 
> fox.lpc"
> ;aout				lpreson	asig
> aout				lpfreson	asig, 1
> ares				balance	aout, asig
>       out ares
>
> endin
>
> 
> 
> f1 0 4096 10 1
>
> i 1 0 2.8
> e
>
> 
> 
>
>
> According to the manual "aout	lpreson	asig" should be equal to "aout
> lpfreson	asig, 1" but using the latter i get this error:
>
> ftable 1:
> new alloc for instr 1:
> file /home/menno/manual/examples/fox.lpc (505064 bytes) loaded into  
> memory
> Using pole type of file.
> INIT ERROR in instr 1: Pole file not supported for this opcode !
> aout	lpfreson	asig	1	
> 	  B  0.000 - note deleted.  i1 had 1 init errors
>
> When you run this with "aout	lpreson	asig" it works like it should.
> My system = Ubuntu 10.04, QuteCsound 0.5.0
>
> thanks very much,
> Menno
>
> -- 
> View this message in context: http://old.nabble.com/lpread-and-lpfread-tp28809370p28809370.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-06-07 21:19
Frommenno
Subject[Csnd] Re: lpread and lpfread

Victor Lazzarini wrote:
> 
> you need to analyse the file with coefficients, not poles (don't use  
> the -a opton).
> 
> Victor
> 
> 
thanks you Victor, that works. The manual says:
"When lpread / lpreson are used with pole files, automatic stabilization is
performed and the filter should not get wild."
This example uses lpread/lpfreson, which is another combination, so i have
to analyze with coefficients (not use -a option).
i'll accept that and will try to find out later what that means in more
detail :)

Another issue i found when trying to analyze "beats.wav" from the manual:
util lpanal:
Using pole storage method
audio sr = 44100, monaural
opening WAV infile /home/menno/manual/examples/beats.wav
analysing 88200 sample frames (2.0 secs)
Row 0 or 34 have maximum of 0
gauss: ill-conditioned
OR
util lpanal:
Using filter coefficient storage method
audio sr = 44100, monaural
opening WAV infile /home/menno/manual/examples/beats.wav
analysing 88200 sample frames (2.0 secs)
Row 0 or 34 have maximum of 0
gauss: ill-conditioned

What is happening here?

Menno


Date2010-06-07 22:11
FromVictor Lazzarini
Subject[Csnd] Re: Re: lpread and lpfread
There is a problem with lpanal, when there is silence in the file, it  
gives you this
'gauss: ill-conditioned' error. I guess it needs fixing, but I don't  
know how exactly.

Victor
On 7 Jun 2010, at 21:19, menno wrote:

>
>
> Victor Lazzarini wrote:
>>
>> you need to analyse the file with coefficients, not poles (don't use
>> the -a opton).
>>
>> Victor
>>
>>
> thanks you Victor, that works. The manual says:
> "When lpread / lpreson are used with pole files, automatic  
> stabilization is
> performed and the filter should not get wild."
> This example uses lpread/lpfreson, which is another combination, so  
> i have
> to analyze with coefficients (not use -a option).
> i'll accept that and will try to find out later what that means in  
> more
> detail :)
>
> Another issue i found when trying to analyze "beats.wav" from the  
> manual:
> util lpanal:
> Using pole storage method
> audio sr = 44100, monaural
> opening WAV infile /home/menno/manual/examples/beats.wav
> analysing 88200 sample frames (2.0 secs)
> Row 0 or 34 have maximum of 0
> gauss: ill-conditioned
> OR
> util lpanal:
> Using filter coefficient storage method
> audio sr = 44100, monaural
> opening WAV infile /home/menno/manual/examples/beats.wav
> analysing 88200 sample frames (2.0 secs)
> Row 0 or 34 have maximum of 0
> gauss: ill-conditioned
>
> What is happening here?
>
> Menno
>
>
>
> -- 
> View this message in context: http://old.nabble.com/lpread-and-lpfread-tp28809370p28810262.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2010-06-07 22:18
Frommenno
Subject[Csnd] Re: Re: lpread and lpfread
okay, i will file the bug tommorrow -

thanks
Menno