hi dears
I'm new to labview
how can i integrate this matlab code to labview
I want to create a flute tone using labview ...Please any idea's about sound and music will be great.
with best regards to u all .
s = 44100; % sample rate
T = 1/fs; % sample period
t = [0:T:2.0]; % signal duration (seconds)
fm = 4; % modulation frequency
fc = 440; % carrier frequency
% A en m zijn afvallende e-machten y(t)=exp(-t/iau)
A = 0.9*exp(-0.001/0.1); % unmodulated carrier amplitude
m = 0.7; % modulation index
% modulation signal
xm = m * A * sin(2*pi*fm*t);
% amplutide modulation
xc = (A + xm) .* sin(2*pi*fc*t);
% ring modulation
%xc = xm .* sin(2*pi*fc*t);
subplot(2, 1, 1)
plot(t, xc)
xlabel('Time (seconds)')
ylabel('Amplitude');
axis([0, 0.2, -1.6, 1.6]); % zoom in display
subplot(2, 1, 2)
N = length(t); % N = length of fft
f = [0:N-1] * fs / (N-1); % frequency vector
X = abs(fft(xc)) / N;
plot(f, X);
xlabel('Frequency (Hertz)');
ylabel('Magnitude Gain');
axis([0,1000,0,max(X)]); % zoom in display
grid
sound(xc,fs)