Csound Csound-dev Csound-tekno Search About

pvsfread / fsigs global? / pvx memory de-allocation

Date2007-10-15 02:58
FromTim Mortimer
Subjectpvsfread / fsigs global? / pvx memory de-allocation
me again (groan...)

I've written a csd file & accompanying python script to enable batch
conversion of wav files to pvx files. If anyone wants to see it let me know
& i'll upload to nabble. it was pretty simple & straightforward however once
i drummed up the courage to address the issue...

2 questions:

1) now that potentially i'll be loading / accessing more fsigs than my
memory can handle - do i need to "de-allocate" memory assigned via pvsfread
somehow? or does the memory free up automatically once no longer required /
being used / the note event finishes? 

There is an ftfree opcode after all for example, & i'm wondering if there
should be a PVX equivalent?

(pvsdiskin is not appropriate in this case, as i'll be using ktimpt style
playback of the analysis data. An example of the types of things ill be
experimenting with is creating a continuous string glissando by
interpolating across the whole range of a string instrument for example (my
pvx violin for example is made of 44 different pvx files - one for each note
- just like it's sample based original... but now of course i can time
stretch it / blow it's spectrum apart...)

2) the manual for pvsfread states "As the file is read only once, and is
then available to all other interested opcodes, it can be expedient to
arrange for a dedicated instrument to preload all such analysis files at
startup." - this seems to imply that fsigs are essentially global sigs. is
that the case?

many thanks. excited about further burgeoning possibilities here now that i
CAN pvoc en masse....
-- 
View this message in context: http://www.nabble.com/pvsfread---fsigs-global----pvx-memory-de-allocation-tf4624096.html#a13205673
Sent from the Csound - General mailing list archive at Nabble.com.

Date2007-10-15 22:43
FromAndres Cabrera
SubjectRe: pvsfread / fsigs global? / pvx memory de-allocation
Hi Tim,

I am not sure, but I'll answer anyway...

Tim Mortimer escribió:
> 2 questions:
>
> 1) now that potentially i'll be loading / accessing more fsigs than my
> memory can handle - do i need to "de-allocate" memory assigned via pvsfread
> somehow? or does the memory free up automatically once no longer required /
> being used / the note event finishes? 
>
> There is an ftfree opcode after all for example, & i'm wondering if there
> should be a PVX equivalent?
>   
I would think that if you use local fsigs they are destroyed when the 
instrument instance is detroyed. Global fsigs are probably not 
destroyed, and I don't think you can detroy them, but you could reuse them.
> 2) the manual for pvsfread states "As the file is read only once, and is
> then available to all other interested opcodes, it can be expedient to
> arrange for a dedicated instrument to preload all such analysis files at
> startup." - this seems to imply that fsigs are essentially global sigs. is
> that the case?
>   
No, fsigs are not global, but you can have global fsigs (e.g. gfsig).
> many thanks. excited about further burgeoning possibilities here now that i
> CAN pvoc en masse....
>   
Cheers,
Andres