Real Time Audio with AppDesigner?

17 views (last 30 days)
Pascal Westermeier
Pascal Westermeier on 24 Jun 2020
Edited: Kavya Vuriti on 30 Jun 2020
Hi Guys,
I want to edit a audio file, which I load with a push button, with e. g. a filter while the song is playing.
Since I am still quite inexperienced with the app designer, I wanted to ask if anyone knows if it is
even possible to edit audio files in real time with the app designer (without Simulink).
And if possible, how I can implement it with the app designer.

Answers (1)

Kavya Vuriti
Kavya Vuriti on 30 Jun 2020
Edited: Kavya Vuriti on 30 Jun 2020
Hi,
You can edit data captured in an audio file or any real time audio data by clicking a button in app designer. Launch app designer by typing the following command in command window.
>>appdesigner
Drag and drop a push button on the canvas. A component browser is displayed on the right side with properties and callbacks of the push button. Add the callback 'ButtonPushedFcn' .Here is the documentation for adding callbacks for components in app designer.
In the code view, you can try writing code for capturing real time audio using system objects like audioDeviceReader or loading an audio file using audioread function . In the callback function, you can also modify the data like increasing/decreasing amplitude or changing sampling rate. If necessary, you can play the modified data using system objects like audioDeviceWriter or write it to another audio file using audiowrite function.
For using above mentioned system objects, "Audio Toolbox" is required.
Refer to the following links for more information on real time audio in MATLAB and loading data from audio files into MATLAB:

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!