How to play a variation of frequency?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
1)Starting from a pure wave of a given frequency (4000 Hz) I can not implement this pseudo code to play a sound (pure wave) whose frequency decreases continuously from 4000 to 200:
demo matlab
t = (0:0.001:100)';
for n = 4000:-1:200
y = sin(2*pi*n*t)
sound(y,Fs);
end
How to implement this correctly?
2)same question but starting from an very short audio file or an sound sample
thanks
3 Commenti
Walter Roberson
il 3 Ott 2018
That code changes frequency in two different ways simultaneously. You should not do that. Either change the n used in the construction of y or else change the frequency used for playback, but do not do both.
Hint: changing the n used in the construction of y is much easier to put together into a single .wav file than if you change the playback frequency.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Audio I/O and Waveform Generation 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!