Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better interface for Piezo Buzzer sound #8

Open
Matt5sean3 opened this issue Nov 8, 2016 · 2 comments
Open

Better interface for Piezo Buzzer sound #8

Matt5sean3 opened this issue Nov 8, 2016 · 2 comments

Comments

@Matt5sean3
Copy link
Collaborator

A desire for this feature was expressed after the meeting. This interface would allow playing more complex sound over the Piezo Buzzer than just a beep and retrieving sound snippets in the flash memory.

@Matt5sean3
Copy link
Collaborator Author

The current interface for Piezo Buzzer sound is available from "assets.h"

/** Toggles the electric current to speaker if set number of ticks have passed.
 * If the current note is done, calls callback for the current audio asset.
 */
void doAudio();
/**
 * Tells timer interrupt to play a note.
 * @param [in] freq The note frequency (# of timer ticks between pulses)
 *        <needed here> formula for HZ -> freq value
 * @param [in] dur The duration of the note, in timer ticks
 */
void setNote(unsigned short freq, unsigned short dur) ;

/* void setBeep(unsigned short freq); */ /* not implemented */

/** Callback for setting next note when current note is complete. */
void nextNote_cb(unsigned char assetId, int frame);
void nextMIDI_cb(unsigned char assetId, int frame) ;

@Matt5sean3
Copy link
Collaborator Author

nextNote_cb and nextMIDI_cb don't appear to actually be used anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant