Digigurdy-baz
Loading...
Searching...
No Matches
Public Member Functions | List of all members
VibKnob Class Reference

#include <vibknob.h>

Public Member Functions

 VibKnob (int v_pin)
 Cosntructor. VibKnob abstracts a knob or pedal that produces a vibrato effect. More...
 
void update ()
 Sample the voltage pin and set the appropriate amount of vibrato on the melody strings. More...
 
int getVoltage ()
 Reports the current pin voltage. More...
 
int getVibrato ()
 Report the current vibrato value, calculated based off the current voltage. More...
 
void enable ()
 Sets the enable flag for this object. More...
 
void disable ()
 Disabled this object. update() will not respond if the object is disabled. More...
 

Constructor & Destructor Documentation

◆ VibKnob()

VibKnob::VibKnob ( int  v_pin)

Cosntructor. VibKnob abstracts a knob or pedal that produces a vibrato effect.

Parameters
v_pinThe analog voltage pin to be used.

Member Function Documentation

◆ disable()

void VibKnob::disable ( )

Disabled this object. update() will not respond if the object is disabled.

◆ enable()

void VibKnob::enable ( )

Sets the enable flag for this object.

◆ getVibrato()

int VibKnob::getVibrato ( )

Report the current vibrato value, calculated based off the current voltage.

Returns
0-127, the current vibrato/modulation value to be used.

◆ getVoltage()

int VibKnob::getVoltage ( )

Reports the current pin voltage.

Returns
0-1023, 0 = 0V, 1023 = 3.3V

◆ update()

void VibKnob::update ( )

Sample the voltage pin and set the appropriate amount of vibrato on the melody strings.

Warning
This class/method expects certain GurdyString objects to exist.

The documentation for this class was generated from the following files: