This shows you the differences between two versions of the page.
Previous revision | |||
— | resources:tools-software:sigmastudio:toolbox:gpioconditioning:rotaryvolume [03 Aug 2012 22:48] (current) – Approved William Jahn | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Rotary Volume====== | ||
+ | |||
+ | [[resources: | ||
+ | \\ | ||
+ | |||
+ | |The Rotary Volume block controls the volume level of an input audio signal, using the GPIO rotary encoder inputs. This block has the functionality of the Rotary Encoder, Up/Down Control, Index lookup Table, and SW External Volume control blocks all in one algorithm control. The user has the flexibility to define a custom volume curve that will be scrolled through by the rotary encoder.|{{rotaryvolpic1.png}}| | ||
+ | |||
+ | ===Input Pins=== | ||
+ | ^Name^Format \\ [int/dec] - [control/ | ||
+ | |Pin 0: Rotary Input Up|int - control|Control signal from GPIO rotary encoder that increments the volume| | ||
+ | |Pin 1: Rotary Input Down|int - control|Control signal from GPIO rotary encoder that decrements the volume| | ||
+ | |Pin 2: Interface Read|n/ | ||
+ | |Pin 3: Input Audio|decimal - audio|Audio Input to the volume control| | ||
+ | |||
+ | ===Output Pins=== | ||
+ | ^Name^Format \\ [int/dec] - [control/ | ||
+ | |Pin 0: Interface Write|n/ | ||
+ | |Pin 1: Output Audio|decimal - audio|Volume adjusted audio output| | ||
+ | |||
+ | ===GUI Controls=== | ||
+ | ^GUI Control Name^Default Value^Range^Function Description^ | ||
+ | |Debounce|20|[0, | ||
+ | |Volume Table Points|33 pts|[2, 800]|Sets the table size: the number of points used in the volume table curve.| | ||
+ | |Volume Table Values|1|[-16, | ||
+ | |SW Slew Rate|12|[1, 23]|Controls the slew ramp speed for the volume transition between consecutive volume gain points| | ||
+ | |||
+ | ===DSP Parameter Information=== | ||
+ | ^GUI Control Name^Compiler Name^Function Description^ | ||
+ | |Debounce|RotaryVolAlg1countmax|The integer number is directly written to the DSP.| | ||
+ | |Volume Table Values|RotaryVolAlg1table_p0 \\ ...|All the points in the table are written to the DSP in their linear gain format.| | ||
+ | |SW Slew Rate|RotaryVolAlg1step|The value for the slew rate written to the DSP follows the formula: < | ||
+ | |||
+ | ===Algorithm Description=== | ||
+ | The Rotary Volume control allows a GPIO inputs from a rotary encoder to control a custom volume curve. The volume curve can be any linear, logarithmic, | ||
+ | |||
+ | ===Example=== | ||
+ | The following image shows how two GPIO inputs are used to control the volume algorithm in the Rotary Volume block. The Rotary Volume algorithm has been grown in order to support stereo audio. A mux switch allows comparison between the direct signal from the Inputs, and the volume adjusted signal, routed to the Outputs. The Interface Read and Write blocks allow the last volume level to be saved and recalled.\\ | ||
+ | \\ | ||
+ | {{rotaryvolpic2.png}}\\ | ||
+ | \\ | ||
+ | |||
+ | ===Algorithm Details=== | ||
+ | |Toolbox Path|GPIO Conditioning - Volume Control - Rotary - Rotary Volume| | ||
+ | |Cores Supported|ADAU170x \\ ADAU144x \\ ADAU176x \\ ADAU178x| | ||
+ | |"Grow Algorithm" | ||
+ | |"Add Algorithm" | ||
+ | |Subroutine/ | ||
+ | |Program RAM|88*| | ||
+ | |Data RAM|41*| | ||
+ | |Parameter RAM|36* - Based on 33 points in table: each point = 1 Parameter RAM| | ||
+ | *Numbers are based on one instance of the algorithm with no additional " | ||
+ | |||
+ | ===Algorithm Growth Information=== | ||
+ | |Description|When the Rotary Volume algorithm is grown, an extra pair of input/ | ||
+ | |Program RAM Repetition|2 per growth|| | ||
+ | |Data RAM Repetition|9 per growth|| | ||
+ | |Parameter RAM Repetition|none|| | ||
+ | |||
+ | |||
+ | |||