ghpsdr3-alex icon indicating copy to clipboard operation
ghpsdr3-alex copied to clipboard

Auto Squelch for FM

Open vigeruno opened this issue 8 years ago • 5 comments

Hello. A simple automatic squelch for FM. Useful for those who listen to FM glsdr without getting a headache.

diff --git a/trunk/src/DttSP/fm_demod.c b/trunk/src/DttSP/fm_demod.c index 7e8eecb..d4197d2 100644 --- a/trunk/src/DttSP/fm_demod.c +++ b/trunk/src/DttSP/fm_demod.c @@ -86,13 +86,14 @@ pll (FMD fm, COMPLEX sig) void FMDemod (FMD fm) {

  • int i;
  • int i,mute; for (i = 0; i < CXBsize (fm->ibuf); i++) { pll (fm, CXBdata (fm->ibuf, i)); fm->afc = (REAL) (0.9999 * fm->afc + 0.0001 * fm->pll.freq.f);
  •   if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; }
    CXBreal (fm->obuf, i) =
    
  •       CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) \* fm->cvt;
    
  •       CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) \* fm->cvt \* mute;
    
    } }

Regards.....

vigeruno avatar Oct 28 '16 11:10 vigeruno

Are you sure that in:

  • if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } CXBreal (fm->obuf, i) =
  • CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt;
  • CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt * mute;

You only want CXBimag(fm->obuf,i) to be 0? What about CXBreal(fm->obuf,i) ?

Alex

On Fri, Oct 28, 2016 at 7:03 PM, vigeruno [email protected] wrote:

Hello. A simple automatic squelch for FM. Useful for those who listen to FM glsdr without getting a headache.

diff --git a/trunk/src/DttSP/fm_demod.c b/trunk/src/DttSP/fm_demod.c index 7e8eecb..d4197d2 100644 --- a/trunk/src/DttSP/fm_demod.c +++ b/trunk/src/DttSP/fm_demod.c @@ -86,13 +86,14 @@ pll (FMD fm, COMPLEX sig) void FMDemod (FMD fm) {

  • int i;
  • int i,mute; for (i = 0; i < CXBsize (fm->ibuf); i++) { pll (fm, CXBdata (fm->ibuf, i)); fm->afc = (REAL) (0.9999 * fm->afc + 0.0001 * fm->pll.freq.f);
  • if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } CXBreal (fm->obuf, i) =
  • CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt;
  • CXBimag (fm->obuf, i) = (fm->pll.freq.f - fm->afc) * fm->cvt * mute; } }

Regards.....

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9cAhZXZAiESj22832-9S9FNZoraTks5q4daZgaJpZM4KjUzG .

alexlee188 avatar Oct 28 '16 12:10 alexlee188

Hello. Yes. schermata del 2016-10-28 14-47-38

https://github.com/vigeruno/ghpsdr3-vigeruno/blob/master/trunk/src/DttSP/fm_demod.c You can listen live on ik6fjn ik6ioq server glsdr or qtradio schermata del 2016-10-28 14-55-07

Regards.....

vigeruno avatar Oct 28 '16 12:10 vigeruno

Ok I see :)

I have updated the repo with a slight change. Please test.

On Fri, 28 Oct, 2016 8:51 pm vigeruno, [email protected] wrote:

Hello. [image: schermata del 2016-10-28 14-47-38] https://cloud.githubusercontent.com/assets/22787199/19806900/d5562944-9d1d-11e6-863f-60729ce6ab7a.png

https://github.com/vigeruno/ghpsdr3-vigeruno/blob/master/trunk/src/DttSP/fm_demod.c

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43#issuecomment-256912408, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9Z4a0Xh-STYExS6jDtpcJZ_3jBKkks5q4e_RgaJpZM4KjUzG .

alexlee188 avatar Oct 29 '16 00:10 alexlee188

Hello.

It works with this change: if (fm->afc < 0.000001){ mute = 1; } else { mute = 0; } yes if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } not working autosquelch pollice_alto

Regards.....

vigeruno avatar Oct 29 '16 17:10 vigeruno

Ok. Corrected.

On Sun, 30 Oct, 2016 1:51 am vigeruno, [email protected] wrote:

Hello.

It works with this change: if (fm->afc < 0.000001){ mute = 1; } else { mute = 0; } yes if (fm->afc < 0.000001){ mute = 0; } else { mute = 1; } not working [image: autosquelch] https://cloud.githubusercontent.com/assets/22787199/19831682/6ec01502-9e10-11e6-8c73-53b6400e50f6.png [image: pollice_alto] https://cloud.githubusercontent.com/assets/22787199/19831706/ef2c3f68-9e10-11e6-9ad2-e87dbc767db1.jpeg

Regards.....

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/43#issuecomment-257105735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAin9SbkrVR5LWrOfWIG-eetqusS9lgLks5q44eQgaJpZM4KjUzG .

alexlee188 avatar Oct 30 '16 00:10 alexlee188