Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] lowpass filter #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[FEAT] lowpass filter #6

wants to merge 3 commits into from

Conversation

joeypas
Copy link

@joeypas joeypas commented Oct 5, 2024

resolves #2
I am currently working on the video, and will provide mathematical implementation details shortly as well.

@joeypas
Copy link
Author

joeypas commented Oct 5, 2024

Also for hacktoberfest, I believe the topic assigned to the repo should be "hacktoberfest" instead of "hacktoberfest2024"

@nots1dd
Copy link
Owner

nots1dd commented Oct 6, 2024

Also for hacktoberfest, I believe the topic assigned to the repo should be "hacktoberfest" instead of "hacktoberfest2024"

Hm i see, ill just add both as topics then

@nots1dd
Copy link
Owner

nots1dd commented Oct 6, 2024

resolves #2 I am currently working on the video, and will provide mathematical implementation details shortly as well.

I tried seeing the difference between the current commit of rAVen and your PR with a variety of music files and havent seemed to find a major difference

I have looked at your comments (appreciate you using my commenting style btw lol) and it seems good to go, but while testing i didnt notice a lot of difference in the visualization being more smooth

So it would be great if you could explain the changes behind low pass filter and how it is supposed to work in real time (if a video demonstrating the changes is not possible its fine)

@nots1dd
Copy link
Owner

nots1dd commented Oct 9, 2024

@joeypas

Any updates on the video or explanation?

@joeypas
Copy link
Author

joeypas commented Oct 9, 2024

Yes, sorry. I set the default cutoff frequency to a very high number, since I didn't know what frequencies you wanted to cut out. Changing the last parameter in the apply_low_pass_filter function call located in fft function from 99999.0f to something like 50000.0f or 45000.0f will show you a difference. From there its just about dialing in what the right cutoff should be.

@joeypas
Copy link
Author

joeypas commented Oct 9, 2024

Also in terms of explanation, is there anything more that you would like to know that's not included in the comments?

@@ -157,6 +184,8 @@ void fft(float in[], size_t stride, float complex out[], size_t n)
out[k] = e + v;
out[k + n / 2] = e - v;
}

apply_low_pass_filter(out, n, sample_rate, 99999.0f);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tweaking this line will change the graphics produced!

@nots1dd
Copy link
Owner

nots1dd commented Oct 9, 2024

Also in terms of explanation, is there anything more that you would like to know that's not included in the comments?

Nah not necessary the above comment should be good enough

@nots1dd
Copy link
Owner

nots1dd commented Oct 9, 2024

Yes, sorry. I set the default cutoff frequency to a very high number, since I didn't know what frequencies you wanted to cut out. Changing the last parameter in the apply_low_pass_filter function call located in fft function from 99999.0f to something like 50000.0f or 45000.0f will show you a difference. From there its just about dialing in what the right cutoff should be.

the frequencies i want to cut out is outside the range of human hearing

so ensuring that we only visualize in the range of 20hz-20khz should suffice

@nots1dd
Copy link
Owner

nots1dd commented Oct 9, 2024

Yes, sorry. I set the default cutoff frequency to a very high number, since I didn't know what frequencies you wanted to cut out. Changing the last parameter in the apply_low_pass_filter function call located in fft function from 99999.0f to something like 50000.0f or 45000.0f will show you a difference. From there its just about dialing in what the right cutoff should be.

the frequencies i want to cut out is outside the range of human hearing

so ensuring that we only visualize in the range of 20hz-20khz should suffice

So if you manage to cutoff frequencies that dont match this range, that would be amazing

@nots1dd nots1dd added the hacktoberfest Issues for hacktoberfest2024 label Oct 9, 2024
@joeypas
Copy link
Author

joeypas commented Oct 9, 2024

Ok it sounds like what you want is a band pass filter, (both high pass and low pass). I will have to go back and do some research/re implement functionality to make that work.

@nots1dd
Copy link
Owner

nots1dd commented Oct 10, 2024

Ok it sounds like what you want is a band pass filter, (both high pass and low pass). I will have to go back and do some research/re implement functionality to make that work.

Yes that would be great 👍

And do continue using the commenting style to explain the newly added functions logic and implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for hacktoberfest2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

adding a low pass filter
2 participants