Arduino
AI Thinker Audio Kit: Synthesizer to Bluetooth
In the last Blog, I have shown how to use the Synthesizer class. I wanted to verify the audio quality issue by sending the output to Bluetooth Here is the sketch. I just added a callback method to feed the bluetooth source: Arduino Sketch #define USE_MIDI #include “BluetoothA2DPSource.h” #include “AudioTools.h” #include “AudioTools/Synthesizer.h” #include “AudioLibs/AudioKit.h” BluetoothA2DPSource a2dp_source; AudioKitStream kit; Synthesizer synthesizer; GeneratedSoundStream<int16_t> in(synthesizer); SynthesizerKey keys[] = {{PIN_KEY1, N_C3},{PIN_KEY2, N_D3},{PIN_KEY3, N_E3},{PIN_KEY4, N_F3},{PIN_KEY5, N_G3},{PIN_KEY6, N_A3},{0,0}}; int32_t get_sound_data(Frame *data, Read more…