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

Added definitions to match the Makecode effects parameters #417

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions inc/SoundEmojiSynthesizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ DEALINGS IN THE SOFTWARE.
#define DEVICE_SOUND_EMOJI_SYNTHESIZER_EVT_DONE 1
#define DEVICE_SOUND_EMOJI_SYNTHESIZER_EVT_PLAYBACK_COMPLETE 2

//
// Sensible defaults (For effects)
//
// Taken from the work over in Makecode:
// https://github.com/microsoft/pxt/blob/5e2ff19c7d44bc659b997530c96b7ac9ad6a6551/webapp/src/components/soundEffectEditor/soundUtil.ts#L24-L42
//
// Mostly included here so downstream languages can pick similar-sounding effects to Makecode to maintain user expectations.
//
#define SFX_DEFAULT_VIBRATO_STEPS 512
#define SFX_DEFAULT_VIBRATO_PARAM 2

#define SFX_DEFAULT_TREMOLO_STEPS 900
#define SFX_DEFAULT_TREMOLO_PARAM 3

#define SFX_DEFAULT_WARBLE_STEPS 700
#define SFX_DEFAULT_WARBLE_PARAM 2

namespace codal
{
Expand Down