All Projects → pschatzmann → arduino-audio-tools

pschatzmann / arduino-audio-tools

Licence: GPL-3.0 license
Arduino Audio Tools (Music Player, Music Recorder supporting I2S, Microphones, DAC, ADC, A2DP, Url, MP3, AAC, AudioKit, ES8388)

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to arduino-audio-tools

Av Converter
[av-converter.com] Audio and Video Converter, and YouTube downloader. Convert to MP3, MP4, AAC, FLAC, AC3, WAV, etc.
Stars: ✭ 97 (-75.32%)
Mutual labels:  mp3, aac
Atldotnet
Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
Stars: ✭ 180 (-54.2%)
Mutual labels:  mp3, aac
Audiobookconverter
Improved AudioBookConverter based on freeipodsoftware release (mp3 to m4b converter)
Stars: ✭ 131 (-66.67%)
Mutual labels:  mp3, aac
Gogglesmm
Goggles Music Manager
Stars: ✭ 41 (-89.57%)
Mutual labels:  mp3, aac
nipper
🌶 💽 Nipper - Youtube playlist (& video) ripper
Stars: ✭ 23 (-94.15%)
Mutual labels:  mp3, aac
Webrtc apm
webrtc中apm相关代码的提取,包括AEC/NS/AGC/VAD ,另外还包括mp3/aac编码器、SoundTouch
Stars: ✭ 65 (-83.46%)
Mutual labels:  mp3, aac
Audio Steganography Algorithms
A Library of Audio Steganography & Watermarking Algorithms
Stars: ✭ 146 (-62.85%)
Mutual labels:  mp3, aac
Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+86.51%)
Mutual labels:  mp3, codec
Flacon
Audio File Encoder. Extracts audio tracks from an audio CD image to separate tracks.
Stars: ✭ 252 (-35.88%)
Mutual labels:  mp3, aac
Esp32 Audioi2s
Play mp3 files from SD via I2S
Stars: ✭ 226 (-42.49%)
Mutual labels:  mp3, aac
Audioworks
A cross-platform, multi-format audio conversion and tagging suite
Stars: ✭ 35 (-91.09%)
Mutual labels:  mp3, aac
goicy
AAC and MPEG (MP1, MP2, MP3) Icecast/Shoutcast source client written in Go
Stars: ✭ 58 (-85.24%)
Mutual labels:  mp3, aac
Esp8266audio
Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
Stars: ✭ 972 (+147.33%)
Mutual labels:  mp3, aac
Recordutil
support free record mp3 amr wav aac format可以录制android ios兼容的aac mp3格式切换录制格式也支持体积极少的amr格式,只需要改变工厂方法改变一句话就能实现,和iOS不撕逼录音,这是一个通用解决方案,你值得拥有!
Stars: ✭ 91 (-76.84%)
Mutual labels:  mp3, aac
Minimp3
Minimalistic MP3 decoder single header library
Stars: ✭ 898 (+128.5%)
Mutual labels:  mp3, codec
Mediafile
A unified reader of metadata from audio & video files.
Stars: ✭ 138 (-64.89%)
Mutual labels:  mp3, aac
Freac
The fre:ac audio converter project
Stars: ✭ 518 (+31.81%)
Mutual labels:  mp3, aac
Ion.sound
JavaScript plugin for playing sounds and music in browsers
Stars: ✭ 694 (+76.59%)
Mutual labels:  mp3, aac
Symphonia
Pure Rust multimedia format demuxing, tag reading, and audio decoding library
Stars: ✭ 191 (-51.4%)
Mutual labels:  mp3, aac
Youtube-DL-GUI
Graphical User Interace built around youtube-dl CLI
Stars: ✭ 38 (-90.33%)
Mutual labels:  mp3, aac

Arduino Audio Tools

Some basic header-only C++ classes that can be used for Audio Processing provided as Arduino Library:

This functionality provides the glue which makes different audio processing components and libraries work together. We also provide plenty of examples that demonstrate how to implement the different scenarios. The design philosophy is based on the Arduino conventions: we use the begin() and end() methods to start and stop the processing and we propagate the use of Streams. We all know the Arduino Streams: We usually use them to write out print messages and sometimes we use them to read the output from Serial devices. The same thing applies to “Audio Streams”: You can read audio data from “Audio Sources” and you write them to “Audio Sinks”.

As “Audio Sources” we will have e.g.:

As “Audio Sinks” we will have e.g:

Examples

Here is an simple example which streams a file from the Flash Memory and writes it to I2S:

#include "AudioTools.h"
#include "StarWars30.h"

uint8_t channels = 2;
uint16_t sample_rate = 22050;

MemoryStream music(StarWars30_raw, StarWars30_raw_len);
I2SStream i2s;  // Output to I2S
StreamCopy copier(i2s, music); // copies sound into i2s

void setup(){
    Serial.begin(115200);

    auto config = i2s.defaultConfig(TX_MODE);
    config.sample_rate = sample_rate;
    config.channels = channels;
    config.bits_per_sample = 16;
    i2s.begin(config);
}

void loop(){
    if (!copier.copy()){
      i2s.end();
      stop();
    }
}

Each stream has it's own configuration object that should be passed to the begin method. The defaultConfig() method is providing a default proposal which will usually "just work". Please consult the class documentation for the available configuration parameters. You can also easily adapt any provided examples: If you e.g. replace the I2SStream with the AnalogAudioStream class, you will get analog instead of digital output.

Further examples can be found in the Wiki. The library also provides a versatile AudioPlayer.

Logging

The application uses a built in logger (see AudioLogger.h and AudioConfig.h). You can e.g. deactivate the logging by changing USE_AUDIO_LOGGING to false in the AudioConfig.h:

#define USE_AUDIO_LOGGING false
#define LOG_LEVEL AudioLogger::Warning
#define LOG_STREAM Serial

Per default we use the log level warning and the logging output is going to Serial. You can also change this in your sketch by calling AudioLogger begin with the output stream and the log level e.g:

AudioLogger::instance().begin(Serial, AudioLogger::Debug);

Optional Libraries

Dependent on the example you might need to install some of the following libraries:

  • ESP32-A2DP Library to support A2DP Bluetooth Audio
  • Many Codec Libraries which are described in the Wiki
  • arduino-audiokit Support for the ESP32 AudioKit and decoder chips (ES8388, A1S, etc)
  • arduino-vs1053 Support for VS1053 audio modules
  • arduino-midi A simple MIDI message parser and generator
  • SAM A Text to Speech Engine
  • TTS A Text to Speech Engine
  • flite A Text to Speech Engine
  • simple-tts A Simple TTS engine using prerecorded audio (e.g. to implement Talking Clock, Talking Numbers)
  • arduino-stk Synthesis ToolKit in C++ (STK)
  • Maximilian cross-platform and multi-target audio synthesis and signal processing library
  • Mozzi A sound synthesis library for Arduino
  • Tensorflow Lite Machine Learning for Arduino
  • KissFFT Fast Fourier Transform FFT Library
  • esp32-fft Another FFT library (not only for the ESP32)
  • rp2040-i2s I2S library for MBED RP2040
  • SdFat Library to read and write files supporting SD cards with FAT16/FAT32 and exFAT
  • SD Library to read and write files supporting SD cards with FAT16 and FAT32

After installing a library, you might need to activate it's usage in the AudioConfig.h file!

Show and Tell

Get some inspiration from projects that were using this library or share your projects with the community.

Documentation

Installation in Arduino

You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with

cd  ~/Documents/Arduino/libraries
git clone pschatzmann/arduino-audio-tools.git

I recommend to use git because you can easily update to the latest version just by executing the git pull command in the project folder.

If you want to use the library in PlatformIO, you can find a detailed description in the Wiki.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].