User-Defined Opcode Database

ampSlider

Converts a scaled (0-1) value to a value resembling a hardware mixer slider.

Download UDO File

Description

Converts a scaled (0-1) value to a scaled amplitude value resembling a volume slider attenuation on a hardware mixer (-inf dbfs to +10dbfs).

Syntax

kamp ampSlider kdb

Initialization

kdb -- a normalized value 0 - 1

Performance

Actual range of values returned are around (0-3), with a value of 1 (0dbfs) being
returned when the input is around .85.

This opcode uses the ampdbN UDO.

Code

opcode ampSlider, k, k
	
	kvalue xin
	kvalue ampdbN kvalue/.87
	kvalue pow kvalue, .8
	xout kvalue

endop

Examples

instr 2

	kdb linen	1, p3*.5, p3, p3*.5
	kamp ampSlider kdb
	asig rand 	kamp*0dbfs
	out asig

endin

Credits

ma++, jan 2005


Previous Home Next
ampdbN   stereoMS