Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:4102] Re: Major commits to Csound 5

Date2004-02-23 09:55
FromGabriel Maldonado
Subject[CSOUND-DEV:4102] Re: Major commits to Csound 5
Besides speed, memory-transfer bandwidth and sample-format issues, you 
also have to take into account the waste of memory of Csound tables.
Csound tables, when using doubles, require the double space of computer 
RAM, isn't it?

BtW: In some situations, even 32-bit floats consume too much memory (for 
example, when loading an entire multi-channel piece into a csound table, 
a feature that is very useful in some realtime performances for me), so 
I introduced a special GEN22 in CsoundAV, that loads a sound file into a 
16-bit-shorts table (however, only loscil2, fof3 and the lposcint family 
of opcodes is able to handle GEN22-filled tables). Notice that the sound 
quality remains almost identical to that of floats, because samples are 
immediately converted to floats before any further processing. Using 
doubles in this case would consume four times the amount of memory in 
comparison with shorts.

Gabriel

Michael Gogins wrote:
> When I said sample format, I meant the internal sample format for
> processing, not the soundfile sample format. In other words, the "double"
> version of Csound versus the "float" version.
> 
> I haven't used pvoc extensively, and not at all in comparisons between
> double and float versions of Csound; my tests concerned my own scos and orcs
> and things like Trapped and Xanadu.
> 
> Shouldn't the ultimate criterion be the musical ear?
> 
> 
> ============================================
> Michael Gogins
> gogins at pipeline period com
> Irreducible Productions
> CsoundVST, an extended version of Csound for programming music and sound
> Available at http://sourceforge.net/projects/csound/
> ============================================
> 
> 
> ----- Original Message ----- 
> From: "Richard Dobson" 
> To: "Csound Developers Discussion List" 
> Sent: Sunday, February 22, 2004 6:14 PM
> Subject: [CSOUND-DEV:4092] Re: Major commits to Csound 5
> 
> 
> 
>>There is a very big distinction between ~sample~ format, and internal
> 
> processing
> 
>>precision. Doubles are certainly good for the internal processing stages
> 
> of
> 
>>recursive filters and reverbs, but are arguably overkill for just about
>>everything else.  pvoc (both streaming and offline) is ~measurably slower~
> 
> in
> 
>>doubles than in floats, no doubt to a great extent because of cache
> 
> problems.
> 
>>But I don't discount the necessity for carefully designed benchmark tests
> 
> to
> 
>>determine the range of differences in speed for specific tasks.
> 
> Eliminating the
> 
>>possibility of denormal problems reducing the apparent speed difference
> 
> between
> 
>>floats and doubles will be essential here.
>>
>>All current plugin architectures (specifically VST, DX and AudioUnits) use
>>floats as the sample format for the signal stream. efficient compatibility
> 
> with
> 
>>these is a priority. What plugins use internally is entirely up to them.
> 
> But
> 
>>mandating doubles as the default sample format is IMO unnecessary, and
> 
> will
> 
>>certainly not be faster!
>>
>>I had thought that requiring two versions of plugin opcodes was always
> 
> going to
> 
>>be unavoidable; but there probably are several ways it could be done; e.g.
> 
> by
> 
>>plugins supporting two versions of the opcode, selected at load time.
>>
>>Richard Dobson
>>
>>
>>Michael Gogins wrote:
>>
>>
>>>Since Csound is a musical instrument and double sounds better than
>>
> float -- 
> 
>>>please try it and see if you agree, listen especially to filtered sounds
>>
> and
> 
>>>high-index FM sounds -- I firmly believe that Csound 5 should be double
>>
> by
> 
>>>default.
>>>
>>>There will be problems if people don't agree as to sample format, since
>>>plugins must have the same sample size as the host. I don't want to get
>>
> into
> 
>>>a situation where we have to have plugin32.dll and plugin64.dll for
>>
> every
> 
>>>opcode.
>>>
>>>What's the big deal against double? I think float is sheer inertia. Last
>>>time I checked the running times on Windows, they were essentially the
>>
> same.
> 
>>>I think there should be a really compelling reason to stick with float
>>
> if
> 
>>>some people with trained ears think double sounds better.
>>>
>>
>>
> 
> 


-- 
Gabriel Maldonado
http://csounds.com/maldonado
--