https://github.com/moebiussurfing/ofxsounddevicesmanager
Provides audio basics to any ofApp: Select sound APIs and devices. Sound File Player. Detector Engine. Waveform plotting. [ WIP Windows only ]
https://github.com/moebiussurfing/ofxsounddevicesmanager
openframeworks openframeworks-addon
Last synced: about 1 year ago
JSON representation
Provides audio basics to any ofApp: Select sound APIs and devices. Sound File Player. Detector Engine. Waveform plotting. [ WIP Windows only ]
- Host: GitHub
- URL: https://github.com/moebiussurfing/ofxsounddevicesmanager
- Owner: moebiussurfing
- License: other
- Created: 2020-05-10T03:43:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T07:14:22.000Z (almost 3 years ago)
- Last Synced: 2025-02-27T07:13:34.992Z (over 1 year ago)
- Topics: openframeworks, openframeworks-addon
- Language: C++
- Homepage:
- Size: 3.7 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ofxSoundDevicesManager
# OVERVIEW
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](https://github.com/moebiussurfing/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](https://github.com/roymacdonald/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
### 1-example_Basic

### 2-example_ofxSurfingAudioPlots

### 4-example_Player

### 5-example_ExtrasDetector

[Instagram VIDEO](https://www.instagram.com/p/CooVhhrjW2g/)
## FEATURES
- 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
#### ofApp.h
```.cpp
#include "ofxSoundDevicesManager.h"
ofxSoundDevicesManager audioDevices;
```
#### ofApp.cpp
```.cpp
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);
}
```
### DEPENDENCIES
* [ofxSurfingImGui](https://github.com/moebiussurfing/ofxSurfingImGui)
* [ofxImGui](https://github.com/Daandelange/ofxImGui/) / Fork
* [ofxSurfingHelpers](https://github.com/moebiussurfing/ofxSurfingHelpers)
* [ofxSurfingBox](https://github.com/moebiussurfing/ofxSurfingBox)
OPTIONAL
* [ofxSurfingWaveplots](https://github.com/moebiussurfing/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](https://github.com/roymacdonald/ofxSoundDeviceManager) from **@roymacdonald**. (?)
* Make it [ofxSoundObjects](https://github.com/roymacdonald/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.
## AUTHOR
An add-on by **@moebiusSurfing**
*(ManuMolina). 2020-2023.*
## LICENSE
*MIT License*