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

#include <keyboxbutton.h>

Inheritance diagram for KeyboxButton:
GurdyButton

Public Member Functions

 KeyboxButton (int my_pin, int my_offset)
 Constructor. KeyboxButton extends the GurdyButton class for use as a keybox key. More...
 
int getOffset ()
 Return the key's note offset. More...
 
- Public Member Functions inherited from GurdyButton
 GurdyButton (int my_pin, int interval)
 Constructor. This class handles simple push-on, release-off buttons. More...
 
void update ()
 Polls the button and updates its state. More...
 
bool beingPressed ()
 Reports if the button is being pressed this update() cycle. More...
 
bool wasPressed ()
 Reports if the button was pressed down this update() cycle. More...
 
bool wasReleased ()
 Reports if the button was released this update() cycle. More...
 

Additional Inherited Members

- Protected Attributes inherited from GurdyButton
Bounce * bounce_obj
 
bool being_pressed
 

Constructor & Destructor Documentation

◆ KeyboxButton()

KeyboxButton::KeyboxButton ( int  my_pin,
int  my_offset 
)

Constructor. KeyboxButton extends the GurdyButton class for use as a keybox key.

Parameters
my_pinThe digital voltage pin for this key/switch/button
my_offsetThe number of semitones this key raises the note beign played

Member Function Documentation

◆ getOffset()

int KeyboxButton::getOffset ( )

Return the key's note offset.

Returns
The key's offset in semitones, 0-127 in theory (0-24 realistically)

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