Playing sound: Switching seamlessly between two or more sounds
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to be able to switch quickly between playing two or more sounds. The purpose is to be able to compare two sounds against each other. It should be possible to select a part of the sound and loop this while switching between sound A and B as shown in the below figure.
When switching from sound A to B (by pressing the B button), sound B should start playing at the current sample - and sound A should stop.
I have been looking at the audioplayer object but this does not support setting the start/stop at specific samples. Any suggestion on how this can be implemented in Matlab?
Thanks,
Jesper Boldt
0 Commenti
Risposte (1)
Iain
il 5 Mar 2014
I don't know about seamlessly from a GUI.
You can play any duration of sound using "sound". I would be tempted to split the sound into, say, 0.1 second sections, and after playing each 0.1 section, determine what, if any, buttons have been pressed, and continue on with playing the appropriate sound.
If you can define when the switches happen, you can simply construct a sound vector by the normal means, and play it with "sound" or "soundsc"
2 Commenti
Rafael Kübler
il 18 Lug 2019
Hi,
I'm facing the same problem.
Has there been any other solution since then?
Thanks.
Vedere anche
Categorie
Scopri di più su Audio and Video Data in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!