How to create a sound like this?

3 次查看(过去 30 天)
Augusto
Augusto 2025-2-21
评论: Augusto 2025-2-25

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 个评论
Image Analyst
Image Analyst 2025-2-22
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:
Augusto
Augusto 2025-2-25

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

请先登录,再进行评论。

回答(1 个)

Star Strider
Star Strider 2025-2-22
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.
.

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by