Csound Csound-dev Csound-tekno Search About

[Csnd] lpanal64

Date2009-02-09 21:03
Frommenno
Subject[Csnd] lpanal64
Hi,

according to the manual
(file:///C:/Program%20Files/Csound/doc/manual/MiscCsound64.html) lpanal -and
cvanal- will not work with Csound64bit.
I found out that it does make an analysis but when trying an example using
lpread and this analysis file, Csound crashes, so the text must be right.
However i like the special "sound" of what is the lpanal creating, so i
wonder if this issue is going to be fixed in the foreseeable future or is it
simply not possible when using the Csound64 version?
-The fact that cvanal isn't working either is not a disaster, i can use the
pconvolve opcode-

thanks for the attention,
Menno
-- 
View this message in context: http://www.nabble.com/lpanal64-tp21921901p21921901.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-02-15 11:31
Frommenno
Subject[Csnd] Re: lpanal64
I like to ask the question again :)



menno wrote:
> 
> Hi,
> 
> according to the manual
> (file:///C:/Program%20Files/Csound/doc/manual/MiscCsound64.html) lpanal
> -and cvanal- will not work with Csound64bit.
> I found out that it does make an analysis but when trying an example using
> lpread and this analysis file, Csound crashes, so the text must be right.
> However i like the special "sound" of what is the lpanal creating, so i
> wonder if this issue is going to be fixed in the foreseeable future or is
> it simply not possible when using the Csound64 version?
> -The fact that cvanal isn't working either is not a disaster, i can use
> the pconvolve opcode-
> 
> thanks for the attention,
> Menno
> 

-- 
View this message in context: http://www.nabble.com/lpanal64-tp21921901p22021674.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-02-15 20:23
FromAnthony Kozar
Subject[Csnd] Re: lpanal64
Actually, the manual does not say that the 64-bit versions of lpanal and
cvanal do not work.  It says that analysis files created with the 32-bit
version of Csound will not work with the 64-bit version (and presumably vice
versa).  This does not mean that there are not bugs ;)

I remember that lpanal was sometimes producing analysis files with infinite
values that would cause problems.  I don't know if that issue was fixed or
not.

Can you please tell us what platform you are running this on, which version
of Csound, whether you downloaded a Csound package from Sourceforge or built
your own, and include your CSD/ORC/SCO files?

Do not post the original sound file or analysis file to the list.  If you
can post them on a publicly-accessible website, please do.  Otherwise,
please send the files to me privately (if they do not exceed 10MB) and I
will do my best to help.

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

menno wrote on 2/15/09 6:31 AM:

> 
> I like to ask the question again :)
> 
> 
> 
> menno wrote:
>> 
>> Hi,
>> 
>> according to the manual
>> (file:///C:/Program%20Files/Csound/doc/manual/MiscCsound64.html) lpanal
>> -and cvanal- will not work with Csound64bit.
>> I found out that it does make an analysis but when trying an example using
>> lpread and this analysis file, Csound crashes, so the text must be right.
>> However i like the special "sound" of what is the lpanal creating, so i
>> wonder if this issue is going to be fixed in the foreseeable future or is
>> it simply not possible when using the Csound64 version?
>> -The fact that cvanal isn't working either is not a disaster, i can use
>> the pconvolve opcode-
>> 
>> thanks for the attention,
>> Menno
>> 


Date2009-02-17 19:53
Frommenno
Subject[Csnd] Re: lpanal64
thanks for trying to help

i analyzed a mono female voice, a recording of 1.9 seconds. As you see in
the following output this was not the problem:


PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
util lpanal:
Reading sound from D:/csound/Samples/A_aarde_luid.wav, writing lpfile to
D:/csound/Analyses/A_aarde_luid.lpc
poles=50 hopsize=300 begin= 0.0 duration= 0.0
lpheader comment:

pch track range:  70.0 - 10000.0 Hz
Using filter coefficient storage method
audio sr = 44100, monaural
opening WAV infile D:\csound\Samples\A_aarde_luid.wav
analysing 84200 sample frames (1.9 secs)
280 lpc frames written to D:/csound/Analyses/A_aarde_luid.lpc




then i tried a simlplyfied example from the Csound book, based on example
2709:


;
; ""
; by 
;
; 
;
; Generated by blue 0.125.0 (http://csounds.com/stevenyi/blue/index.html)
;




sr=44100
ksmps=1
nchnls=2








	instr 1	;untitled
event "e", 0, 0, 0.1
	endin

	instr 2709	;
iosdur    =         p3
ktimp     line      0, p3, 1.9
krmsr, krmso, kerr, kcps    lpread  ktimp, "A_aarde_luid.lpc"
asig     buzz      krmso, kcps, int(sr/2/kcps), 1

aout      lpreson   asig
          outs       aout, aout

	endin






f1 0 8192 10 1








i2709	0.0625	1.8999999762	
i1	2.03125	0.1000000015	
e







i run this file and get the following:

PortMIDI real time MIDI plugin for Csound
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.10 (double samples) Jan  9 2009
libsndfile-1.0.18pre24
Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc 
UnifiedCSD:  D:\2709.csd
STARTING FILE
Skipping 
Creating orchestra
Creating score
orchname:  C:\DOCUME~1\Menno\LOCALS~1\Temp\cs3.orc
scorename: C:\DOCUME~1\Menno\LOCALS~1\Temp\cs4.sco
rtaudio: PortAudio module enabled ... using callback interface
rtmidi: PortMIDI module enabled
orch compiler:
30 lines read
	instr	2709	
Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.000s
sorting score ...
	... done
Elapsed time at end of score sort: real: 0.012s, CPU: 0.000s
The available MIDI out devices are:
   0: Microsoft MIDI Mapper (MMSystem)
   1: Microsoft GS Wavetable SW Synth (MMSystem)
   2: Out To MIDI Yoke:  1 (MMSystem)
   3: Out To MIDI Yoke:  2 (MMSystem)
   4: Out To MIDI Yoke:  3 (MMSystem)
   5: Out To MIDI Yoke:  4 (MMSystem)
   6: Delta AP MIDI (MMSystem)
PortMIDI: selected output device 4: 'Out To MIDI Yoke:  3' (MMSystem)
Csound version 5.10 (double samples) Jan  9 2009
displays suppressed
0dBFS level = 32768.0
orch now loaded
audio buffered in 128 sample-frame blocks
PortAudio V19-devel (built Jan  6 2009 21:14:14)
PortAudio: available output devices:
   0: Microsoft Sound Mapper - Output
   1: Delta AP 1/2
   2: Delta AP SPDIF
   3: Primary Sound Driver
   4: Delta AP 1/2
   5: Delta AP SPDIF
   6: M-Audio Delta ASIO
PortAudio: selected output device 'Delta AP 1/2'
writing 256-byte blks of shorts to dac
SECTION 1:
ftable 1:
new alloc for instr 2709:
file D:\csound\Analyses\A_aarde_luid.lpc (121000 bytes) loaded into memory
Using filter coefficient type of file.
soundin: opened 'D:\csound\Samples\A_aarde_luid.wav':
         44100 Hz, 1 channel(s), 84200 sample frames
B  0.000 ..  1.900 T  1.900 TT  1.900 M:     +inf
	 number of samples out of range:      195
Score finished in csoundPerformKsmps().
inactive allocs returned to freespace
end of score.		   overall amps:     +inf
	   overall samples out of range:      195
0 errors in performance
Elapsed time at end of performance: real: 5.422s, CPU: 5.422s
655 256-byte soundblks of shorts written to dac



No matter what soundfile i analyze and try to resynthesize, i get results
like shown in the attached PNG images.
http://www.nabble.com/file/p22065017/lpc.png lpc.png 
http://www.nabble.com/file/p22065017/lpca.png lpca.png 
(i hope this works...) 

If somehow these files are not attached, i'll explain what is to be seen:
lpc.png has all the 1.9 sec., with a burst of a sine for a few milliseconds.
Then lpca.png a close look at that burst.
 
Is there some error on my part or is there a bug?

thanks,
Menno
-- 
View this message in context: http://www.nabble.com/lpanal64-tp21921901p22065017.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-02-18 02:51
FromAnthony Kozar
Subject[Csnd] Re: lpanal64
I thought you originally said that Csound was crashing?  Regardless, more
comments below ...

menno wrote on 2/17/09 2:53 PM:

> end of score.           overall amps:     +inf
>   overall samples out of range:      195
> 0 errors in performance

This output indicates that Csound ran to completion but that the peak output
was infinite.  This could be a problem with the analysis file or with your
orchestra.

menno wrote on 2/17/09 2:53 PM:

> krmsr, krmso, kerr, kcps    lpread  ktimp, "A_aarde_luid.lpc"
> asig     buzz      krmso, kcps, int(sr/2/kcps), 1

There is a problem in these two lines of your orchestra.  The third input to
buzz is an i-rate value, i.e. it only is evaluated when the instrument is
initialized.  So the expression int(sr/2/kcps) is only evaluated once,
before the variable kcps has a value.  This can create unpredictable
results.

Try replacing int(sr/2/kcps) with an integer constant (eg. 2), and let me
know whether this improves the output level.

If it does not, please send your .lpc file to me in a private email.
 
menno wrote on 2/17/09 2:53 PM:

> Reading options from $CSOUNDRC: C:\Program Files\Csound\.csoundrc
> UnifiedCSD:  D:\2709.csd
> STARTING FILE
> Skipping 

Just to be sure I'm not missing anything here, what options are you using to
run Csound and what options are in .csoundrc ?

> Score finished in csoundPerformKsmps().

And what environment are you running Csound from?  Csound5GUI ?

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/


Date2009-02-18 14:04
Frommenno
Subject[Csnd] Re: lpanal64
Hi Anthony,

i updated my csound version from 5.09 doubles to 5.10 doubles. There is no
crash anymore, but the result is not as it should be.
I appreciate your offer to help me on this and will contact you shortly on
your personal emailadress (mailing-lists-1001 AT anthonykozar DOT net) .
When this issue is solved, i will give the results in this thread.

thanks Victor for your remark. 
Menno
-- 
View this message in context: http://www.nabble.com/lpanal64-tp21921901p22079445.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-02-21 18:13
Frommenno
Subject[Csnd] Re: lpanal64
Anthony, did you receive my email with the lpc file? I sent it to the email
address mailing-lists-1001 AT anthonykozar DOT net.

Menno


menno wrote:
> 
> Hi Anthony,
> 
> i updated my csound version from 5.09 doubles to 5.10 doubles. There is no
> crash anymore, but the result is not as it should be.
> I appreciate your offer to help me on this and will contact you shortly on
> your personal emailadress (mailing-lists-1001 AT anthonykozar DOT net) .
> When this issue is solved, i will give the results in this thread.
> 
> thanks Victor for your remark. 
> Menno
> 

-- 
View this message in context: http://www.nabble.com/lpanal64-tp21921901p22138682.html
Sent from the Csound - General mailing list archive at Nabble.com.


Date2009-02-28 07:46
FromAnthony Kozar
Subject[Csnd] Re: lpanal64
The problem here turned out to be bad assumptions in the lpread opcode when
using a doubles build of Csound.  Thanks to some helpful comments in the
code, I believe that I now have a version of lpread that works correctly
with doubles.

I need to test that I did not break the floats build.  Then I will commit my
fix.  If you are compiling Csound yourself, you can update from CVS and
recompile to immediately enjoy the improvements.  Otherwise, it will be in
the next release.

Thanks very much, Menno, for bringing this problem to our attention and for
being persistent!  ;)

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

menno wrote on 2/17/09 2:53 PM:

> 
> thanks for trying to help
> 
> i analyzed a mono female voice, a recording of 1.9 seconds. As you see in
> the following output this was not the problem:
> [...]

> then i tried a simlplyfied example from the Csound book, based on example
> 2709:
>
> 
> 
> 
> sr=44100
> ksmps=1
> nchnls=2
>
> instr 1    ;untitled
> event "e", 0, 0, 0.1
> endin
> 
> instr 2709    ;
> iosdur    =         p3
> ktimp     line      0, p3, 1.9
> krmsr, krmso, kerr, kcps    lpread  ktimp, "A_aarde_luid.lpc"
> asig     buzz      krmso, kcps, int(sr/2/kcps), 1
> 
> aout      lpreson   asig
>         outs       aout, aout
> 
> endin
> 
> 
> 
> 
> 
> 
> f1 0 8192 10 1
> 
> i2709    0.0625    1.8999999762
> i1    2.03125    0.1000000015
> e
> 
> 
> 
> 
> 
> 
> 
> i run this file and get the following:
> 
> [...]
> new alloc for instr 2709:
> file D:\csound\Analyses\A_aarde_luid.lpc (121000 bytes) loaded into memory
> Using filter coefficient type of file.
> soundin: opened 'D:\csound\Samples\A_aarde_luid.wav':
>        44100 Hz, 1 channel(s), 84200 sample frames
> B  0.000 ..  1.900 T  1.900 TT  1.900 M:     +inf
> number of samples out of range:      195
> Score finished in csoundPerformKsmps().
> inactive allocs returned to freespace
> end of score.           overall amps:     +inf
>   overall samples out of range:      195
> 0 errors in performance
> Elapsed time at end of performance: real: 5.422s, CPU: 5.422s
> 655 256-byte soundblks of shorts written to dac
> 
> 
> 
> No matter what soundfile i analyze and try to resynthesize, i get results
> like shown in the attached PNG images.