Question: Generate a similar code in MATLAB that would process like the code below by the similar audio files of a bass drums guitar and finale
Generate a similar code in MATLAB that would process like the code below by the similar audio files of a bass drums guitar and finale file
clear all;
close all;
clc
%% Command Listing # 1%%
bass = audioread('bass.wav');
drums = audioread('drums.wav');
guitar = audioread('guitar.wav');
length(guitar)
length(bass)
length(drums)
%% Command Listing # 2%%
drum_seg=drums(44100*10:44100*20);
subplot(2,2,1)
plot(drum_seg)
title('10-20 samples of the drum segment')
bass_seg=bass(44100*10:44100*20);
subplot(2,2,2)
plot(bass_seg)
title('10-20 samples of the bass segment')
guitar_seg=guitar(44100*10:44100*20);
subplot(2,2,3)
plot(guitar_seg)
title('10-20 samples of the guitar segment')
%% Command Listing #3 %%
sound(drum_seg,44100);
sound(drum_seg,88100);
sound(bass_seg,44100);
sound(bass_seg,88100);
sound(guitar_seg,44100);
sound(guitar_seg,88100);
%% Command Listing #4 %%
drum_seg = drums(44100*10 : 44100*20);
guitar_seg = guitar(44100*10 : 44100*20);
bass_seg = bass(44100*10 : 44100*20);
comp = drum_seg + guitar_seg;
soundsc(comp,44100);
%% Command Listing #5 %%
filename = 'finale.wav'
audiowrite(filename,comp,44100)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
