Make audio recording simulation run in real time?

2 visualizaciones (últimos 30 días)
Oliver
Oliver el 28 de Mzo. de 2025
Editada: Oliver el 31 de Mzo. de 2025
Hello,
As part of some university work, I am trying to modulate audio to be recorded from my mic using the Audio Device Reader block with an Audio Oscillator block acting as the carrier signal. However, whenever I try to run the simulation, in which i want it to be ten seconds long so I have time to speak what i need to get modulated, the simulation runs instantly instead of in real time. Is there any way to get the simulation to run in real time so when looking at the time scope I can watch the amplitude change with my speaking?

Respuesta aceptada

Zinea
Zinea el 31 de Mzo. de 2025
In order to be able to watch the amplitude change while speaking in real time, the following need to be ensured:
1) The sample time for the "Audio Device Reader" and "Audio Device Writer" blocks is set correctly. It should be small enough to capture and play audio in real time, typically around 1/44100 for a 44.1 kHz sample rate.
2) The "Simulation Pacing" option can be used to slow down the simulation to real time. It can be set to 1x for real time pacing.
You can refer to the model attached where the amplitude change is reflected in the time scope in real time while speaking.
Hope this helps, best!
  1 comentario
Oliver
Oliver el 31 de Mzo. de 2025
Thank you, that example seems to be one way of having a system that is working in real-time on my laptop rn!

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by