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

Preemphasis Implementation #54

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Blenderpics
Copy link

So... this is my preemphasis implementation, along with some minor improvements.
Even though i have no knowledge about audio filtering, and i am therefore not quite sure if i picked my coefficient right, the sound quality improved quite a bit.

seriously, i cant hear the difference between playing the original file and listening to the PiFm generated FM.

Because in US the preemphasis' cutoff frequency differs to the one used in EU, i added the functionality to change it via CLI with -preemph (eu/us) (default is us)

Also, i added a feature that let's you change the lowpass cutoff frequency by adding -cutoff (compliant/quality) to your parameters (default is compliant). It further improves the quality, and since you should not broadcast fm with this setup anyways, why not just allow higher frequencies since it doesnt matter when using with a grounded coax cable anyways.

Florian Schöck added 7 commits March 12, 2016 00:57
Implemented as a first-order highpass filter
whitespaces instead of tabs, see ad76693
Might not apply to the fm standards, but since you are not supposed to use it publicly, it doesn't matter
previouse filter was described by:
y[n] = bx[n]-bx[n-1]+ay[n-1]
filter is now described by:
y(n) = x(n) - a x(n-1)
with 'a' = old 'b'
even i have no idea if that coefficient 'a' is selected correctly, it sounds much better than before
by adding -preemph [eu/us/{cutoff freq}] to your Pi FM parameters, you can now select the right preemphasis for your region
with -cutoff [compliant/quality/{cutoff freq}] you can now select the cutoff frequency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant