confused need help! Matlab
What do you need help with?
What is going on here? What do I need to do?
My understand is that we have a z matrix with two channels and we have three bands ( low middle, and high)
let me think about this for a bit. I think I have come up with a solution or at least an idea.
go to computer science section to get helped
@jim_thompson5910
how does filter() work? filter(a, b, x) a being a row, b being a column, x being the name of the matrix?
clear, clc, close all % clears all windows % loads rdd file into matlab [z, fs] = audioread('rdd.wav'); % loads filter coeffs data load('filter_coeffs'); % band 1 is lpf low frequences % band 2 is the bpf mid-range frequences % band 3 is the hpf high frequences % z matrix contains 2 channels sound sample vs time (left channel col1 and right channel col2) % small if else statement off to side S = input('Do you want to activate sound, yes/no '); if (S == 1); % one being yes sound(z, fs) fprintf('You chose yes \n'); else (S == 0); % zero being no fprintf('You chose no \n'); end band1 = lpf; % storing low power frequency in band1 band2 = bpf; % storing mid-range power frequency in band2 band3 = hpf; % storing high power frequency in band3 chan1 = z(:,1); % 1 for left of z matrix chan2 = z(:,2); % 2 for right of z matrix % asking user which channel to use 1 or 2 chan = input('Enter channel: '); if (chan == 1) chan1 = z(:,1); fprintf('you chose channel 1 \n'); % right channel selected elseif (chan == 2) chan2 = z(:,2); fprintf('you chose channel 2 \n'); % left channel selected end % asking user which bands would like to be used ban = input('Enter a band: '); if (ban == 1) band1 = filter(
I have no idea how `filter` works. Even after reading through this page http://www.mathworks.com/help/matlab/ref/filter.html it still makes no sense to me. But the page may help you.
This is the same page I looked over myself. Let me review it over again.
@jim_thompson5910 do you understand this? http://www.mathworks.com/help/matlab/data_analysis/filtering-data.html
So I'm guessing the point of this lab is to take audio in and somehow modify it to make it sound better?
Yeah I think. My understanding was you can select from two different channels then also select a variety of different bands to make the audio sound different
In the link I just posted. So b represents a 1x4 matrix with 1/4 in each induce. so the original is being reduced by a quarter? I have three different bands here band1, band2, and band3. I need to make a prompt asking the user which bands I would like to use with the corresponding channels 1 and 2?
I'm not 100% familiar with audio terms but this page is saying A = feedback coefficients B = feedforward coefficients https://www.cs.sfu.ca/~tamaras/filters/Matlab_s_filter_function.html
I'm not exactly sure how the bands you pick help set up the coefficients which are used for filtering. I have a feeling it's where you say "what is the loudest you're willing to hear?" then they define a decibel value. That's a complete guess though. I'm far from an audio engineer. You might be better off in the CS section.
Okay. This is more electrical engineering, something I am not too familiar with myself.
I will post in CS section
Join our real-time social learning platform and learn together with your friends!