Extracting Data for Sound Generation
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to extract data from a large file and play it as a sound. I've written up a code that resembles the data I'm dealing with, but I'm not sure how I can extract the data.
%Creates three abitrary matrices (resembles the data I'm working with)
for i = 1:100
for j = 1:100
A(i,j) = sin(i*j);
B(i,j) = cos(i*j);
for k = 1:10
C(i,j,k) = i+j+k;
end
end
end
%Normalizes the data
Astar = A/(abs(A));
Bstar = B/(abs(B));
%% Plotting
surf(Astar,Bstar);
xlabel('x')
ylabel('y')
zlabel('z');
colormap('parula');
The plotting (below) lets me see the data as in 3D environment (essentially the waveform as it varies in time), and I'm trying take the data on the planes x=1, 2, 3, 4... and collapse them into a single plane (e.g. x = 0) so I can take the data (which should be 2D now) and run it through my sound-producing code. (
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!