-- | Amplitude Converters module CsoundExpr.Opcodes.Math.Amp (ampdb, ampdbfs, db, dbamp, dbfsamp) where import CsoundExpr.Base.Types import CsoundExpr.Base.MultiOut import CsoundExpr.Base.SideEffect import CsoundExpr.Base.UserDefined -- | * opcode : ampdb -- -- -- * syntax : -- -- > ampdb(x) (no rate restriction) -- -- -- * description : -- -- Returns the amplitude equivalent of the decibel value x. Thus: -- -- -- * url : ampdb :: (X x0) => x0 -> x0 ampdb x0sig = prefixOperation "ampdb" args where args = [to x0sig] -- | * opcode : ampdbfs -- -- -- * syntax : -- -- > ampdbfs(x) (no rate restriction) -- -- -- * description : -- -- Returns the amplitude equivalent of the full scale decibel (dB -- FS) value x. The logarithmic full scale decibel values will be -- converted to linear 16-bit signed integer values from 32,768 to -- +32,767. -- -- -- * url : ampdbfs :: (X x0) => x0 -> x0 ampdbfs x0sig = prefixOperation "ampdbfs" args where args = [to x0sig] -- | * opcode : db -- -- -- * syntax : -- -- > db(x) -- -- -- * description : -- -- Returns the amplitude equivalent for a given decibel amount. -- This opcode is the same as ampdb. -- -- -- * url : db :: (X x0) => x0 -> x0 db x0sig = prefixOperation "db" args where args = [to x0sig] -- | * opcode : dbamp -- -- -- * syntax : -- -- > dbamp(x) (init-rate or control-rate args only) -- -- -- * description : -- -- Returns the decibel equivalent of the raw amplitude x. -- -- -- * url : dbamp :: (K k0) => k0 -> k0 dbamp k0sig = prefixOperation "dbamp" args where args = [to k0sig] -- | * opcode : dbfsamp -- -- -- * syntax : -- -- > dbfsamp(x) (init-rate or control-rate args only) -- -- -- * description : -- -- Returns the decibel equivalent of the raw amplitude x, relative -- to full scale amplitude. Full scale is assumed to be 16 bit. New -- is Csound version 4.10. -- -- -- * url : dbfsamp :: (K k0) => k0 -> k0 dbfsamp k0sig = prefixOperation "dbfsamp" args where args = [to k0sig]