Digigurdy-baz
Loading...
Searching...
No Matches
Functions
Play Screens and Functions

Functions

void draw_note (int note, int x_offset)
 Draws a 64x64 ABC-style bitmap of the note being played. More...
 
void draw_staff (int note, int x_offset)
 Draws a staff bitmap and the given note on it. More...
 
void print_note (String note_str, int x_offset)
 Print as text the note being played in a large font. More...
 
void draw_play_screen (int note, int screen_type, bool draw_buzz)
 Draws the play screen in one of six ways depending on the user's chosen screen type. More...
 
void print_display (int mel1, int mel2, int drone, int tromp, int tpose, int cap, int offset, bool hi_mute, bool lo_mute, bool drone_mute, bool tromp_mute)
 Draws the screen visible when sound is not being made, the "heads-up display" screen. More...
 
void vol_up ()
 Turns the volume of all strings up by 10, if possible. More...
 
void vol_down ()
 Turns the volume of all strings down by 10, if possible. More...
 
void all_soundOff ()
 Sends a soundOff() to all six string objects. More...
 
void no_buzz_soundOff ()
 Sends a soundOff() to all strings but the buzz. More...
 
void all_soundKill ()
 Sends a soundKill() to all six string objects. More...
 
void all_clearVolArray ()
 Clears the volume array of all six string objects. More...
 
void tpose_up_1 (bool playing)
 Increases the transpose by 1 semitone, and adjusts any playing notes. More...
 
void tpose_down_1 (bool playing)
 Decreases the transpose by 1 semitone, and adjusts any playing notes. More...
 
void cycle_capo (bool playing)
 Cycles the capo, and adjusts any playing notes. More...
 
void tpose_up_x (bool playing, int steps)
 Adjusts the transpose by a given number of steps. More...
 

Detailed Description

These functions draw the screens shown during play and outside of the menu tree, and help manage play behavior.

Function Documentation

◆ all_clearVolArray()

void all_clearVolArray ( )

Clears the volume array of all six string objects.

◆ all_soundKill()

void all_soundKill ( )

Sends a soundKill() to all six string objects.

◆ all_soundOff()

void all_soundOff ( )

Sends a soundOff() to all six string objects.

◆ cycle_capo()

void cycle_capo ( bool  playing)

Cycles the capo, and adjusts any playing notes.

Parameters
playingTrue if currently playing sound, false otherwise.
Version
New in 2.3.7

◆ draw_note()

void draw_note ( int  note,
int  x_offset 
)

Draws a 64x64 ABC-style bitmap of the note being played.

Parameters
note0-127, the MIDI note to be displayed
x_offset0-64, the x-offset to display the image. 0 = far left, 32 = centered, 64 = far right

◆ draw_play_screen()

void draw_play_screen ( int  note,
int  screen_type,
bool  draw_buzz 
)

Draws the play screen in one of six ways depending on the user's chosen screen type.

Parameters
note0-127, the MIDI note to be drawn.
screen_typeThe arrangement to display. See the code itself to know what they mean: this is a magic number.
draw_buzzIf true, draw the on-screen buzz indicator.

◆ draw_staff()

void draw_staff ( int  note,
int  x_offset 
)

Draws a staff bitmap and the given note on it.

Parameters
note0-127, the MIDI note to be drawn.
x_offset0-64, the x-offset to display the image. 0 = far left, 32 = centered, 64 = far right

◆ no_buzz_soundOff()

void no_buzz_soundOff ( )

Sends a soundOff() to all strings but the buzz.

◆ print_display()

void print_display ( int  mel1,
int  mel2,
int  drone,
int  tromp,
int  tpose,
int  cap,
int  offset,
bool  hi_mute,
bool  lo_mute,
bool  drone_mute,
bool  tromp_mute 
)

Draws the screen visible when sound is not being made, the "heads-up display" screen.

Parameters
mel1The high melody MIDI note, 0-127
mel2The low melody MIDI note, 0-127
droneThe drone MIDI note, 0-127
trompThe trompette MIDI note, 0-127
tposeThe transpose value, -12 to +12
capThe capo value, 0-4
offsetThe note offset (Currently unused)
hi_muteTrue if high melody is muted
lo_muteTrue if low melody is muted
drone_muteTrue if drone is muted
tromp_muteTrue if trompette is muted

◆ print_note()

void print_note ( String  note_str,
int  x_offset 
)

Print as text the note being played in a large font.

Parameters
note_strThe text of the note to be displayed.
x_offset0-64, the x-offset to display the text. 0 = far left, 32 = centered, 64 = far right
Warning
This function will only correctly display text matching the "LongNoteNum" text pattern. See notes.h, notes.cpp.

◆ tpose_down_1()

void tpose_down_1 ( bool  playing)

Decreases the transpose by 1 semitone, and adjusts any playing notes.

Parameters
playingTrue if currently playing sound, false otherwise.
Version
New in 2.3.7

◆ tpose_up_1()

void tpose_up_1 ( bool  playing)

Increases the transpose by 1 semitone, and adjusts any playing notes.

Parameters
playingTrue if currently playing sound, false otherwise.
Version
New in 2.3.7

◆ tpose_up_x()

void tpose_up_x ( bool  playing,
int  steps 
)

Adjusts the transpose by a given number of steps.

Parameters
playingTrue if currently playing sound, false otherwise.
stepsNumber of semitones to move (signed)
Version
New in 2.5.7

◆ vol_down()

void vol_down ( )

Turns the volume of all strings down by 10, if possible.

  • Checks volume of all strings
  • If the quietest string is less than 10 from min volume, decreases the volume of all strings by 10.
  • If the quietest string is more than 10 from min volume, do nothing.
    Version
    New in 2.3.4

◆ vol_up()

void vol_up ( )

Turns the volume of all strings up by 10, if possible.

  • Checks volume of all strings
  • If the loudest string is more than 10 from full volume, increases the volume of all strings by 10.
  • If the loudest string is less than 10 from full, do nothing.
    Version
    New in 2.3.4