input Variable storage audio file

7 Ansichten (letzte 30 Tage)
Jonhoi Clarke
Jonhoi Clarke am 14 Apr. 2020
Beantwortet: Star Strider am 14 Apr. 2020
I would like to store the audio file in the "input_Signal so it can be modulated . any ideas ?
load gong;
[y,Fs]=audioread('gong.wav');
Input_Signal=
%
beginFreq = 1000 / (Fs/2);
endFreq = 4000 / (Fs/2);
[b,a] = butter(Order, [beginFreq, endFreq], 'bandpass');
% Bandpass
Signal = filter(b, a, Input_Signal);

Akzeptierte Antwort

Star Strider
Star Strider am 14 Apr. 2020
Starting with:
v = load('gong.mat');
audiowrite('gong.wav',v.y,v.Fs);
I would do either:
[y,Fs]=audioread('gong.wav');
Input_Signal = y;
or:
[Input_Signal,Fs]=audioread('gong.wav');
Both of these should work.
With respect to the rest, see the buttord and filtfilt function documentation for some valuable hints on how to filter a signal correctly.
.

Weitere Antworten (0)

Kategorien

Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by