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

preamphasis is missing #52

Open
Blenderpics opened this issue Mar 4, 2016 · 5 comments
Open

preamphasis is missing #52

Blenderpics opened this issue Mar 4, 2016 · 5 comments

Comments

@Blenderpics
Copy link

In order to get a decent audio quality, you really have to amplify the high frequencies.

currently i am decoding all my files, then applying an equaliser and then rendering those files back to mp3, before i use them with PiFM RDS. A rather complicated way.

I also tried using alsaequal, but because i am using loopdevices i can't get it to work, no matter what i do. (PiFm listens on Loopback,1,0; standard audio output is Loopback,0,0)

A preamphasis really should be implemented right into PiFm

are there any plans on implementing something like that? Is PiFm even still being developed?

@ChristopheJacquet
Copy link
Owner

I agree, pre-emphasis is missing, it was tracked as part of bug #4. I don't have the formulas in mind, I will need to do a bit of research.

PiFmRds is an experimental program whose main feature is to transmit RDS. Honestly, improving sound quality is not what keeps me going because nobody should use the program to transmit sound apart from test samples (see the README).

However I will happily apply a patch if you implement that feature :)

@ChristopheJacquet
Copy link
Owner

Note: a first-order digital pre-emphasis filter is given by

y(n) = x(n) - a x(n-1)

@Blenderpics
Copy link
Author

I will give it a shot this weekend.

@Blenderpics
Copy link
Author

so i just implemented a preemphasis on a branch of my fork. I just used a generall highpass-filter to implement it, even though the formular does not match the one you provided.

I have to say i have absolutely no knowledge about digital waveform filtering whatsoever, so i'm quite sure the filter is probably wrong.

Having said that i am noticing an improvement in soundquallity. Or maybe i am going nuts, who knows.

Maybe someone with more audiofiltering knowledge than me could take a look at it?

@Crypter
Copy link

Crypter commented Aug 4, 2021

VERY long due, but here it is, solved:

Crypter/rpitx@d86308e

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

No branches or pull requests

3 participants