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

Stereo and Mono are swapped #65

Closed
Knorxi opened this issue Aug 2, 2022 · 5 comments
Closed

Stereo and Mono are swapped #65

Knorxi opened this issue Aug 2, 2022 · 5 comments

Comments

@Knorxi
Copy link

Knorxi commented Aug 2, 2022

When I'm listening to a stereo station, the RDS Panel shows "Mono"

flagstring[3] = mono_stereo ? '1' : '0';

When I swap the '1' and '0' it works. But then the code doesn't look so good anymore ;-)
May be the variable should be renamed to stereo_mono ...

@argilo
Copy link

argilo commented Aug 2, 2022

NRSC-4-A, which seems to be the only publicly available RDS standard, states:

Bit d0, set to 0: Mono
Bit d0, set to 1: Stereo

So it would appear that line you quoted is correct, but the following lines are incorrect:

<< '-' << (mono_stereo ? "MONO" : "STEREO")

gr-rds/python/rdspanel.py

Lines 151 to 156 in 7af7687

if (flags[3]=='1'):
self.stereo.setText("Mono")
self.stereo.setStyleSheet("font-weight: bold; color: red")
else:
self.stereo.setText("Stereo")
self.stereo.setStyleSheet("font-weight: bold; color: red")

@argilo
Copy link

argilo commented Aug 2, 2022

Also of note: The abstract of IEC 62106-2:2018 states that:

Obsolete and no longer part of the RDS standard are: MS (Group 0A, 0B and 15B) certain DI codes (mono/stereo, artificial head, compression), Language code, and PIN (Group 1A).

So it seems that the field no longer exists in recent versions of the RDS standard.

@argilo
Copy link

argilo commented Aug 2, 2022

I did a quick survey of my local stations. Most are broadcasting in stereo, but only one sets the "stereo" bit in RDS. Perhaps this is part of the reason why the field was removed in IEC 62106-2:2018.

@Knorxi
Copy link
Author

Knorxi commented Aug 3, 2022

Thanks for the response and the cool RDS code.
I can learn a lot from that.

I was going to say "I'm glad the standard has been withdrawn so that the stereo bit is preserved ;-)", but, I have also tested a few radio stations and in Germany some of them do not broadcast the stereo bit also.

Concerning the mono / stereo problem in parser_impl.cc:
You are right.
I have always a problem in variable names with the 2 states in the name.
In never know which state is "1".
E.g. there are the variables "music_speech" and "mono_stereo" in the code.
In the IEC for "Music" the bit is set and for "Speech" the bit is not set.
For "Stereo" another bit is set and the same bit is not set for "Mono".
So in the variable name "music _speech" is the state where the bit is set the first word.
But in "mono _stereo" is the state where the bit is set the second word.

@bastibl
Copy link
Owner

bastibl commented Aug 4, 2022

My 1999 copy of IEC 62106 agrees :-) I'll go ahead and merge the PR. Thank you!

mono

@bastibl bastibl closed this as completed May 6, 2024
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

No branches or pull requests

3 participants