An openFrameworks add-on to provide audio basics to any ofApp.
Easily handles and selects system sound devices.
Currently working on Windows only, and for Input devices only.
NOTE
It will not work out-of-the-box without ofxSurfingImGui, or using ofxGui instead. But could be fixed for that. Look on USE_OFXGUI_INTERNAL directive. For similar basic purposes (maybe for devices selector only) you can use ofxSoundDeviceManager from @roymacdonald instead of this add-on.
WIP
- ONLY MS WINDOWS YET. SHOULD ADD macOS AND MAYBE LINUX APIs ENGINES.
- NOW I'AM USING THE MS DIRECTSHOW API. ASIO OR WASAPI HAS NOT BEEN HARDLY TESTED BUT IT SHOULD WORK.
- CURRENTLY ONLY USING INPUTS YET. INTENDED TO BE USED MAINLY ON AN AUDIO ANALYZER.
- DEVICES OUTPUT SELECTOR SEEMS NOT WORKING YET. IT USES THE DEFAULT DEVICE.
- SOUND FILE PLAYER GOES THROUGH THE DEFAULT OUTPUT. BUT IT´S FEEDING THE DETECTOR ENGINE FINE.
- COMPATIBLE WITH ofxSurfingAudioPlots FOR STYLED WAVEFORM PLOT.
SCREENSHOTS
- Provides audio basics to any ofApp.
- Device selector:
- Input and Output (WIP) audio devices.
- All (MS Windows yet) sound APIs: DS/ASIO/WASAPI.
- ImGui based GUI.
- Intuitive VU / RMS.
- Custom Smoother module.
- Bangs detector using a threshold.
- Gate with release timer. Bypasses upcomming bangs.
- Custom auto pilot AWENGINE:
- Auto timed callibrates threshold to last peak from history.
- Testing scene to set detector.
- New ImGui audio widgets:
- Waveform plot with threshold line.
- Big sertical slider for the threshold.
- FFT.
- Sound file player.
- Compatible with styled waveform plot module.
USAGE
#include "ofxSoundDevicesManager.h"
ofxSoundDevicesManager audioDevices;
void ofApp::setup(){
// Set samplerate and buffer size
audioDevices.setup(44100, 512);
}
void ofApp::draw(){
audioDevices.drawGui();
}
void ofApp::audioIn(ofSoundBuffer& input) {
audioDevices.audioIn(input);
}
OPTIONAL
- ofxSurfingWaveplots / for the example 2
- ofxGui (oF core)
CURRENT SYSTEMS
- Windows 10 / VS 2022 / oF 0.11+
TODO
- Improve settings using Port names instead of Port Numbers.
- Test and make it macOS-compatible.
- Merge some stuff from ofxSoundDeviceManager from @roymacdonald. (?)
- Make it ofxSoundObjects compatible. (?)
NOTES
- Would crash when hot-changing the sound API DS/ASIO/WASAPI, but should wake up and reload fine the settings after restarting the app or by hardcoding devices.
An add-on by @moebiusSurfing
(ManuMolina). 2020-2023.
MIT License