| Interesting. I don't know if that would work, and I've already reverted to 5.11, alas....
Jeremy On Mon, Feb 15, 2010 at 5:27 PM, Art Hunkins <abhunkin@uncg.edu> wrote:
Just wondering...
What about:
0dbfs=1
gi0dbfs = 0dbfs
in header, and use gi0dbfs in instruments?
Art Hunkins
----- Original Message -----
Sent: Monday, February 15, 2010 6:11
AM
Subject: [Csnd] Re: Re: Re: UDO not
working with 5.12
0dbfs=1 will work, but you can't
use the constant '0dbfs' in instruments, because it will be 0.
This bug happens only with the old parser. So if you use --new-parser, it
will work.
Victor
On 15 Feb 2010, at 11:05, J wrote:
Ah, yes, that makes sense. What a bug! At least it's
known. FWIW, I use 0dbfs = 1 exclusively, and this seems to be the only
thing broken.
Best, Jeremy
On Mon, Feb 15, 2010 at 10:50 AM, Victor Lazzarini
<Victor.Lazzarini@nuim.ie>
wrote:
yes, this is to do with the 0dbfs bug I
reported earlier.
Victor
On 15 Feb 2010, at 10:44, J wrote:
Hello,
I have noticed that under 5.12 that a UDO I am using, a modified
version of the Decimate opcode, is not working. It simply wont pass
sound through.
I am using it in Max5, and when I look at what's coming out of it,
it's getting NaN....
I'm sure it's not my effects instrument, as it is working with all
other opcodes, and it was working fine until I updated to 5.12...
The modifications that were done to the UDO were to make it
compatible with 0dbfs = 1 orchestras. It's worth mentioning that I
didn't make these modifications, so there may be something obvious going
on that I don't understand. Still, it did work in 5.11.
Anyway, if someone could run this and see if it works on their
setup, I would appreciate it.
Best, Jeremy
Here is the opcode:
opcode decimator, a, akk
setksmps
1
ain, kbit, ksrate xin
kdbs = 0dbfs
kdbu = 0dbfs * 2
kbits = 2^kbit
; Bit depth (1 to 16)
kfold = (sr/ksrate)
;
Sample rate
kin downsamp ain
; Convert to kr
kin = (kin + kdbs)
;
Add DC to avoid (-)
kin = kin*(kbits / kdbu)
; Divide signal
level
kin = int(kin)
; Quantise
aout upsamp kin
; Convert to sr
aout = aout * (kdbu/kbits) -
kdbs ; Scale and remove DC
a0ut fold aout,
kfold ;
Resample
xout
a0ut
endop
|