From de46c182b195ba54d88de69ba5e790d29d2a24dc Mon Sep 17 00:00:00 2001 From: Dr John Vidler Date: Tue, 26 Mar 2024 15:39:25 +0000 Subject: [PATCH] Added definitions to match the Makecode effects parameters --- inc/SoundEmojiSynthesizer.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/inc/SoundEmojiSynthesizer.h b/inc/SoundEmojiSynthesizer.h index 9c218ca9..c45a77ec 100644 --- a/inc/SoundEmojiSynthesizer.h +++ b/inc/SoundEmojiSynthesizer.h @@ -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 {