Using the SAM TTS Engine with the Audiokit

I decided to use my SAM TTS Library with the AI Thinker Audio Kit. Unfortunately I found quite some bugs in my library that I needed to correct first, but now it is working as expected. Here is the Arduino Sketch #include “sam_arduino.h” #include “AudioTools.h” #include “AudioLibs/AudioKit.h” AudioKitStream kit; SAM sam(kit); const char* text = “Hallo my name is SAM”; void setup(){ Serial.begin(115200); AudioLogger::instance().begin(Serial, AudioLogger::Info); // setup i2s auto cfg = kit.defaultConfig(); cfg.bits_per_sample = sam.bitsPerSample(); Read more…

Microcontrollers and Apple MIDI

My Arduino MIDI Library is using Arduino Streams as a basic design feature and therefore it supports Bluetooth, TCP/IP and UDP. I am usually programming on an old Macbook, so I was wondering if I can extend my library to support Apple MIDI as well. After some research I found that Apple MIDI communicates on 2 UDP ports: one for the session management and the other for the midi data. I wanted to avoid me Read more…

Microcontrollers and MIDI – Using the Bluetooth Serial Interface

In one of my previous posts I gave an overview on how we can connect a microcontroller to a MIDI Device using a physical serial connection with the help of my Arduino MIDI Library. This solution is very similar, but replaces the physical connection with Serial Bluetooth This solution will work with any ESP32 and it will actually also work with any microcontroller if you connect a HC-05 Bluetooth Module! The PC Software We need Read more…

Microcontrollers and MIDI – Using the Serial Interface

In one of my previous posts I gave an overview on how we can connect an microcontroller to a MIDI Device. The simplest solution is to connect the MIDI Keyboard to the PC and use a FTDI serial adapter to communicate with your microcontroller. Because the keyboard is only sending data, we only need to connect the TX pin on the FTDI to the RX pin on the AudioKit board. Please make sure that the Read more…

Microcontrollers and MIDI – An Overview

In this Blog I would like to look into the options how we can connect a microcontroller with a Midi Keyboard. MIDI is a communication protocol from the 1980s that connects musical instruments and computers. MIDI keyboards nowadays usually have USB support and offer a separate MIDI port. Some modern keyboards even support Bluetooth. To use either USB or a MIDI connector is usually quite challenging for a microcontroller. So the easiest is usually to Read more…

AI Thinker AudioKit – A simple Synthesizer with STK

As you might know from my last posts I am currently extending my Arduino Audio Tools library to support the AI Thinker Audio Kit which is based on the ES8388 audio chip. I didn’t do much with my Arduino STK project lately, so I think this is the perfect opportunity to promote it a little bit. The STK Synthesizer First we import the libraries and declare the variables that we use: #include “AudioTools.h” #include “AudioLibs/AudioKit.h” Read more…

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…

AI Thinker Audio Kit: A Polythonic Synthesizer with the AudioTools Library

I have described in my last blog how to build a simple Synthesizer with my Arduino Audio Tools library to support the AI Thinker Audio Kit which is based on the ES8388 audio chip. In the meantime I have decided to wrap the described solution into it’s own Synthesizer class and solve the problem that we can generate only one tone at the time by putting the audio chain into a separate class for each Read more…

AI Thinker Audio Kit: Building a Simple Synthesizer with the AudioTools Library

As you might know from my last posts I am currently extending my Arduino Audio Tools library to support the AI Thinker Audio Kit which is based on the ES8388 audio chip. In my Arduino Audio Tools we have all ingredients to turn our ESP32 AudioKit into a simple synthesizer with just a few lines of code: Naturally you can use this functionality on any other Processor. You just need to replace the output object Read more…

Investigating the AI Thinker AudioKit Audio Input Bug…

In my last blog, I have described how to process audio input data and encountered the bug that the microphone and line input are mixed together and that there is an open issue for this which has been open for quite some time now. So I decided to do a little bit of research for my ESP32 AudioKit V2.2 3478 : First Assumption: The Registers are not set up correctly The ES8388 Data Sheet describes Read more…