This project is the step 3 of the main project Real-time audio processing. Please refer to the README of main project for more information.
Thomas Hézard - Audio scientist and developer
www.thomashezard.com
thomas.hezard [at] thz.fr
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
The application AudioLoop
provided is developped using the JUCE framework, and can be built for macOS, Linux, Windows, iOS or Android.
The app is already fully functionnal with the following features:
- The audio processing loop captures the audio input, processes it with the class
AudioProcessor
(the same class as in step 2 of the project), and sends teh result to the audio output. - The audio processing loop automatically starts when the program starts.
- If you build and run the app in a desktop environement (macOS, Windows, Linux), some audio hardware controls are available in the interface.
- Two controllers are available in the interface. In the current state of the project, they are not linked to the
AudioProcessor
, but you'll be able to use them to control your processor's parameters in real time if you want.
All the files you will have to modify are located in the sources/audio_engine
directory. You should not modify the other files or the AudioLoop.jucer
project.
An instance of the class AudioProcessor
, the same you worked on in step 2, is used inside the main audio render loop.
Source files are located in sources/audio_engine/audio_processor.*
.
AudioProcessor
is used the following way:
- Instanciation of the
AudioProcessor
inside theaudio_processor_
variable ofAudioEngine
insources/audio_engine/audio_engine.cpp
line 15. - Call of the
Prepare
function insources/audio_engine/audio_engine.cpp
line 22. - Call of the
Process
function insources/audio_engine/audio_engine.cpp
line 36.
For the moment, AudioProcessor
does not have any parameters, and the controllers from UI are linked to two internal variables from AudioEngine
: parameter_a_
and parameter_b_
.
In order to link these paramaters to your AudioProcessor
, you have to modify the following code:
- Setters and getters for the parameters in
sources/audio_engine/audio_engine.cpp
lines 42, 47, 52 and 57 (you can removeparameter_a_
andparameter_b_
if they are not needed anymore). - The controllers have a range of
[0,1]
with a mid value of0.5
. You can either- change these values in
main_screen.cpp
lines 18-19 and 37-38, - or transform this
[0,1]
range into usefull values within yourAudioProcessor
class (recommended).
- change these values in
- Make sure JUCE is installed on your computer with the
Projucer
app available and the global paths properly set. The project has been tested with JUCE 7.0.5, it is recommended to use the exact same version. - Depending on the platform you are working on and the platform you want to build the app for, be sure you have all the tools needed installed on your system. See the main README of the project for more information.
- Open the
AudioLoop.jucer
withProjucer
. - Click
File -> Save Project
to export the project. - You can now build the app with the build system corresponding to your exporter (Xcode, make, Visual Studio, Code::Block or Android Studio), and edit the sources in your favourite IDE by either:
- launching the IDE from JUCE directly with the dedicated button at the top,
- opening the project in the
Builds
directory.