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

Tx drive levels #781

Closed
drowe67 opened this issue Dec 4, 2024 · 3 comments
Closed

Tx drive levels #781

drowe67 opened this issue Dec 4, 2024 · 3 comments
Labels
before release Must be fixed before next public release

Comments

@drowe67
Copy link
Owner

drowe67 commented Dec 4, 2024

As per the standard we established with FreeDV waveforms, the signal level of the RADE Tx signal passing through freedv-gui and being sent to the sound card should be approximately +/- 16383 (leaving 1 bit of dynamic range free for overshoot issues caused by further signal processing, and the effect of filtering).

The tx level should never be anywhere near 32767 (16 bit clipping point) at any point in the freedv-gui Tx signal processing chain. This is because other signal processing (e.g. filtering/resampling in the drivers or sound card) can have overshoot that would push it beyond the clipping point, distorting the waveform, lowing performance, and causing splatter.

The example in the radae repo show scaling to approximately this level, e.g. in ota_test.sh

cat ${tx_radae}.f32 | python3 f32toint16.py --real --scale 16383 > ${tx_radae}.raw

In the sample from drowe67/radae#36 the Tx sample is clipped. Is this the same signal being sent to the soundcard D/A? This would cause distortion of the RADE waveform. I have plotted tx.wav (sample from the radae repo, scaled correctly) below for comparison.

Screenshot from 2024-12-05 06-28-47

Also using octave:

octave:21> s=load_raw("~/Downloads/FreeDV_FromRadio_20241201-191336sample.wav");
octave:22> plot(s)
octave:23> max(s)
ans =  32767
@drowe67 drowe67 added the before release Must be fixed before next public release label Dec 4, 2024
@tmiw
Copy link
Collaborator

tmiw commented Dec 4, 2024

This was partially fixed in #776 (https://github.com/drowe67/freedv-gui/pull/776/files#diff-96063afc5af5ad68d26aeb3c004e4ad8913e233ebc8658a2c79f9cc50042c5bbR126). EOO TX will be updated as well in #780 prior to the merge of that PR.

That said, the TX Attenuation slider would cause that signal to be scaled down prior to TX but wouldn't be reflected in any recordings done by users.

@tmiw
Copy link
Collaborator

tmiw commented Dec 5, 2024

EOO scaling fixed in 864640e.

@tmiw
Copy link
Collaborator

tmiw commented Dec 14, 2024

Since #780 is now merged, TX drive levels should be correct for all of RADE (even EOO). Closing.

@tmiw tmiw closed this as completed Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
before release Must be fixed before next public release
Projects
None yet
Development

No branches or pull requests

2 participants