[Csnd] db opcode (bug?)
Date | 2011-12-09 23:51 |
From | Peiman Khosravi |
Subject | [Csnd] db opcode (bug?) |
Hello, Something funny happening with the db opcode. Values smaller than –90 cause really large negative outputs. Nearly blew out my ears today! Thanks Peiman <CsoundSynthesizer> <CsOptions> -odac -d </CsOptions> <CsInstruments> sr = 96000 ksmps = 1 nchnls = 1 0dbfs = 1 instr 1 iamp = db(-96) print iamp endin </CsInstruments> <CsScore> i1 0 1 </CsScore> </CsoundSynthesizer> |
Date | 2011-12-10 10:15 |
From | Tito Latini |
Subject | Re: [Csnd] db opcode (bug?) |
Attachments | None |
Date | 2011-12-10 12:04 |
From | peiman khosravi |
Subject | Re: [Csnd] db opcode (bug?) |
Thanks Tito, Sounds like a good plan. Or at the very least there should be an internal limit to avoid the value form jumping up. Particularly with an amplitude related opcode this could potentially be dangerous. Best, Peiman On 10 December 2011 10:15, Tito Latini |
Date | 2011-12-10 17:49 |
From | Victor Lazzarini |
Subject | Re: [Csnd] db opcode (bug?) |
Another idea is to extend the range. 90dB is a bit limited? I've added a couple macros in aops.c to help this. Victor On 10 Dec 2011, at 10:15, Tito Latini wrote: > The optimized `pow2' function (OOps/aops.c:52) fails > when the input is < -15. With the `db' opcode, > > db(-96) --> -96 * LOG2_10D20 = -15.945255 > > The simplest solution is to eliminate the optimization. > There is also a bug with `db' and the new parser (coming soon) > > tito > > On Fri, Dec 09, 2011 at 11:51:16PM +0000, Peiman Khosravi wrote: >> Hello, >> >> Something funny happening with the db opcode. Values smaller than 90 cause >> really large negative outputs. Nearly blew out my ears today! >> >> Thanks >> >> Peiman >> >> |