Effacer les filtres
Effacer les filtres

Playing 2 sounds simultaneously

5 vues (au cours des 30 derniers jours)
Cyrus
Cyrus le 18 Avr 2013
I am trying to play 2 waveforms simultaneously and was wondering if anybody can help me with this. The current script I have is:
x = [0:.1:1000*pi];
x_trans = transpose(x);
y = sin(x_trans);
y2 = cos(x_trans);
comp = [y, y2];
soundsc(comp);
If the is a better way to do this I am open to ideas

Réponses (1)

Walter Roberson
Walter Roberson le 18 Avr 2013
That looks appropriate. You can write it more compactly but internally it would come out as the same thing:
x = [0:.1:1000*pi];
soundsc( [sin(x(:)), cos(x(:))] );

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by