How to increase the length of an audio file with random white noise?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yasir Khan
le 3 Juil 2016
Réponse apportée : Image Analyst
le 3 Juil 2016
Hi, sorry if this does not make too much sense but here goes.
I have audio files, which are a second or less. I want to add random noise to the audio file (which is a wave file) at different levels of distortion too, so that the total audio length is 2.5 seconds. The level of random noise should be adjustable.
I am complete newby at Matlab and would appreciate the help.
0 commentaires
Réponse acceptée
Image Analyst
le 3 Juil 2016
Use the semicolon operator. For a mono signal
[y, Fs] = audioread('guitartune.wav');
% Crop to 1 second
y = y(1:Fs);
% soundsc(y, Fs);
% Make noise
noiseSignal = rand(length(y), 1);
% Concatenate noise.
outputSignal = [y; noiseSignal];
% Play the sound
soundsc(outputSignal, Fs);
0 commentaires
Plus de réponses (0)
Voir également
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!