How to create a sound like this?

Hello people. I'm new to this forum, and I need help on that: How could I create this sound? I have a reference image that could help:

7 Comments

The image didn't come through. Try again. Why don't you just record the sound from the video. Windows snip and sketch program will let you do that.

Oh ok. Wait a second.

An hour later, still nothing ...
Augusto
Augusto on 22 Feb 2025
Edited: Augusto on 22 Feb 2025
Yeah bro, I'm late lol. Here it is tho:
(P.S: I zipped the audios bcuz I couldnt upload WAV.)
I need help on making these 2 sounds: The siren on the background, and these whistling sounds,

Great. Do you want to remake the identical audio waves? Or, just want to find the frequency spectrum and apply the redshift filter to somewhat mimic the Doppler effect?

Why do you need to create it with MATLAB code rather than just record it from an existing video or download a similar sound? Go here to search for similar sounds:

Yes Sam Chak, i want to recreate the same audio waves.

Sign in to comment.

Answers (1)

Firstt, look to see what their spectrograms reveal —
uz = unzip('examples.zip')
uz = 1x2 cell array
{'siren_sound_example.wav'} {'whistle.wav'}
for k = 1:numel(uz)
fn = strrep(string(uz{k}), "_", "\_");
[wavvec,Fs] = audioread(uz{k});
figure
tiledlayout(2,1)
nexttile
pspectrum(wavvec(:,1),Fs,'spectrogram')
colormap(turbo)
title("Left Channel")
nexttile
pspectrum(wavvec(:,2),Fs,'spectrogram')
colormap(turbo)
title("Right Channel")
sgtitle(fn)
end
for k = 1:numel(uz)
fn = strrep(string(uz{k}), "_", "\_");
[wavvec,Fs] = audioread(uz{k});
figure
tiledlayout(2,1)
nexttile
[sp,fp,tp] = pspectrum(wavvec(:,1),Fs,'spectrogram');
waterfall(fp,tp,sp')
set(gca,XDir="reverse",View=[60 60], ZScale='log')
colormap(turbo)
ylabel("Time (s)")
xlabel("Frequency (Hz)")
title("Left Channel")
nexttile
[sp,fp,tp] = pspectrum(wavvec(:,2),Fs,'spectrogram');
waterfall(fp,tp,sp')
set(gca,XDir="reverse",View=[60 60], ZScale='log')
colormap(turbo)
ylabel("Time (s)")
xlabel("Frequency (Hz)")
title("Right Channel")
sgtitle(fn)
end
These are going to be a challenge to synthesize. I’ll give it some thought.
.

Products

Release

R2024b

Asked:

on 21 Feb 2025

Commented:

on 25 Feb 2025

Community Treasure Hunt

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

Start Hunting!