Skip to content

Fix expander release#269

Merged
harrypm merged 3 commits intooyvindln:vhs_decodefrom
eshaz:fix-expander-release
Jan 24, 2026
Merged

Fix expander release#269
harrypm merged 3 commits intooyvindln:vhs_decodefrom
eshaz:fix-expander-release

Conversation

@eshaz
Copy link
Copy Markdown

@eshaz eshaz commented Jan 24, 2026

Finally achieved accurate results from the expander. I did some research on how expanders are implemented electronically, and the peak envelope detector is normally implemented as a diode and capacitor + load. The discharge rate is constant so I updated to the code to do the same, and this fixed the dynamics issues I was hearing.

I created a test tone sequence that matches the IEC 61054 spec (Annex A - Encoder transient measurement method) and recorded this to a tape. I compared the VCR playback output to hifi-decode's output and they match almost identically. I think the low frequency rippling was introduced at some point during the recording, since both the line out and hifi-decode have the same shape.

I also added a few optimizations to the post processing code.

  • Top Waveform: Decoded audio without expander applied
  • Middle Waveform: Decoded audio with expander applied
  • Bottom Waveform: Line out from VCR
image

@harrypm harrypm merged commit 76a11bc into oyvindln:vhs_decode Jan 24, 2026
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.

2 participants