Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: FM Transmitter noise, no media

  1. #1
    Join Date
    Feb 2018
    Posts
    23
    Post Thanks / Like

    Default FM Transmitter noise, no media

    I'm fairly new to this hobby. Although I've been doing the lights for about 3 years now, I've finally got to a point to sequence the lights w/ music. With that said, I only have 2 songs, maybe 3, that will be ready for this year. I have a Pi 3B+ with a usb sound dongle going to an FM transmitter that has its own volume control. I've noticed that the Falcon Player volume control does NOT work with a usb sound dongle (that's another issue).

    During the sequences w/ music playing, everything is perfect. Nice, clean music transmitted to the radio. I would like to play the music sequences every 15 min and just generic animated light sequences (no music) in between "shows". It's during the "in between" time, when the Pi is not putting out any music, the radio just picks up a buzz with a fast high pitched chirping sound. Now, I've used Audacity to make a 30sec silence track. Playing that, the buzzing/chirping goes away. It's only when the Pi is NOT putting out any sound. Does anyone have a solution to this or has anyone had a similar problem?

  2. #2
    Join Date
    Aug 2008
    Location
    Columbus, OH
    Posts
    4,263
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    While I don't have a solution for you I do think what you are hearing is not unexpected. Audio inputs like the one on your transmitter are looking for any 'noise' to turn into a broadcast. That usb dongle is most likely the culprit. Maybe a dongle using a different sound chip may make a difference.

    I think your silence track is a good idea.
    Quote Originally Posted by Cmndr Brain View Post
    I'm fairly new to this hobby. Although I've been doing the lights for about 3 years now, I've finally got to a point to sequence the lights w/ music. With that said, I only have 2 songs, maybe 3, that will be ready for this year. I have a Pi 3B+ with a usb sound dongle going to an FM transmitter that has its own volume control. I've noticed that the Falcon Player volume control does NOT work with a usb sound dongle (that's another issue).

    During the sequences w/ music playing, everything is perfect. Nice, clean music transmitted to the radio. I would like to play the music sequences every 15 min and just generic animated light sequences (no music) in between "shows". It's during the "in between" time, when the Pi is not putting out any music, the radio just picks up a buzz with a fast high pitched chirping sound. Now, I've used Audacity to make a 30sec silence track. Playing that, the buzzing/chirping goes away. It's only when the Pi is NOT putting out any sound. Does anyone have a solution to this or has anyone had a similar problem?

  3. #3
    Join Date
    Nov 2011
    Location
    Chicago - Southwest Suburbs
    Posts
    7,741
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    I take a different approach and play different music during the breaks. I use a script that starts an internet radio station on the pi when I'm not running sequences. This keeps the radio channel active with music playing all the time.

  4. #4
    Join Date
    Jan 2015
    Location
    Folsom, CA, USA
    Posts
    1,953
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    Have you tested using the Piís internal sound board?

    I did use a relay once. I got some indoor pixels, cut the pixel and used the red to turn on and off the power to FM
    In Lights Therapy

  5. #5
    Join Date
    Jan 2017
    Posts
    404
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    What type of FM transmitter are you using?

    Mine has an on-board mic that it defaults to, when not receiving any audio input from the other source

  6. #6
    Join Date
    Aug 2008
    Location
    Columbus, OH
    Posts
    4,263
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    That sounds great.
    Any chance of sharing that script?
    Quote Originally Posted by jchuchla View Post
    I take a different approach and play different music during the breaks. I use a script that starts an internet radio station on the pi when I'm not running sequences. This keeps the radio channel active with music playing all the time.

  7. #7
    Join Date
    Nov 2011
    Location
    Chicago - Southwest Suburbs
    Posts
    7,741
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    Quote Originally Posted by ukewarrior View Post
    That sounds great.
    Any chance of sharing that script?
    The basis for the script is in the FPP script repo. But here's my version of it.

    Code:
    #!/bin/sh
    ###################################################################
    # MP3StreamerStart.sh - Stream live stream from internet          #
    #                                                                 #
    # Will Play Until MP3StreamerStop.sh Is Called                    #
    #                                                                 #
    # v1.0 - Written By MyKroft - Can Be Used Without Restrictions    #
    #                                                                 #
    ###################################################################
    
    # Edit this line to hold the URL of the stream:port in quotes
    # STREAMURL="http://relay5.181.fm:11082" #North Pole Network System  320k HD
    # STREAMURL="http://66.85.154.211:9035/" #Classic Holiday Radio 128k
    # STREAMURL="http://167.114.64.181:8232/listen.pls?" #Christmas Radio Live 320K HD
    STREAMURL="http://144.217.180.30:8058/listen.pls" #DPark Radio Disney 128K
    
    # Edit this line to hold any options required in quotes
    STREAMOPTIONS="-q -@ "
    #
    # Options Available
    #
    # usage: mpg123 [option(s)] [file(s) | URL(s) | -]
    # supported options [defaults in brackets]:
    #   -v    increase verbosity level       -q    quiet (don't print title)
    #   -t    testmode (no output)           -s    write to stdout
    #   -w <filename> write Output as WAV file
    #   -k n  skip first n frames [0]        -n n  decode only n frames [all]
    #   -c    check range violations         -y    DISABLE resync on errors
    #   -b n  output buffer: n Kbytes [0]    -f n  change scalefactor [32768]
    #   -r n  set/force samplerate [auto]
    #   -os,-ol,-oh  output to built-in speaker,line-out connector,headphones
    #                                        -a d  set audio device
    #   -2    downsample 1:2 (22 kHz)        -4    downsample 1:4 (11 kHz)
    #
    #   -d n  play every n'th frame only     -h n  play every frame n times
    #   -0    decode channel 0 (left) only   -1    decode channel 1 (right) only
    #   -m    mix both channels (mono)       -p p  use HTTP proxy p [$HTTP_PROXY]
    #   -@ f  read filenames/URLs from f     -T get realtime priority
    #   -z    shuffle play (with wildcards)  -Z    random play
    #   -u a  HTTP authentication string     -E f  Equalizer, data from file
    #   -C    enable control keys            --no-gapless  not skip junk/padding in mp3s
    #   -?    this help                      --version  print name + version
    
    mpg123 ${STREAMOPTIONS} ${STREAMURL}
    # & echo $! >/tmp/mpg123.pid
    And here's the script to stop the internet radio player:
    Code:
    #!/bin/bash
    . /opt/fpp/scripts/common
    . /opt/fpp/scripts/functions
    
    # Find Current Volume Setting and Audio Device
    CurrentVolume=$(getSetting volume)
    AudioDevice=$(getSetting AudioMixerDevice)
    
    # Fade Out Volume
    VolumeDecrease=$CurrentVolume
    
    while [ $VolumeDecrease -gt 0 ];  do
      amixer set $AudioDevice ${VolumeDecrease}% > /dev/null 2>&1
      let VolumeDecrease=VolumeDecrease-2
      #sleep .001
    done
    
    # stop mpg123
    #kill -9 $(cat /tmp/mpg123.pid)
    sudo killall -9 mpg123
    
    # Set Volume Back To Orig Level
    Volume=$(echo "scale=2 ; ${CurrentVolume} / 2.0 + 50" | bc)
    amixer set $AudioDevice ${Volume}% > /dev/null 2>&1

  8. #8
    Join Date
    Nov 2011
    Location
    Chicago - Southwest Suburbs
    Posts
    7,741
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    I also have a 3rd script that runs periodically in a cron job. I found that the internet radio would occasionally drop after playing for several hours. So this script detects if it died and then restarts it.
    Code:
    #!/bin/sh
    ###################################################################
    # MP3StreamerStart.sh - Stream live stream from internet          #
    #                                                                 #
    # Will Play Until MP3StreamerStop.sh Is Called                    #
    #                                                                 #
    # v1.0 - Written By MyKroft - Can Be Used Without Restrictions    #
    #                                                                 #
    ###################################################################
    
    # Edit this line to hold the URL of the stream:port in quotes
    # STREAMURL="http://relay5.181.fm:11082"
    
    # STREAMURL="http://relay5.181.fm:11082" #North Pole Network System  320k HD
    # STREAMURL="http://66.85.154.211:9035/" #Classic Holiday Radio 128k
    # STREAMURL="http://167.114.64.181:8232/listen.pls?" #Christmas Radio Live 320K HD
    STREAMURL="http://144.217.180.30:8058/listen.pls" #DPark Radio Disney 128K
    
    # Edit this line to hold any options required in quotes
    STREAMOPTIONS="-q -@ "
    #
    # Options Available
    #
    # usage: mpg123 [option(s)] [file(s) | URL(s) | -]
    # supported options [defaults in brackets]:
    #   -v    increase verbosity level       -q    quiet (don't print title)
    #   -t    testmode (no output)           -s    write to stdout
    #   -w <filename> write Output as WAV file
    #   -k n  skip first n frames [0]        -n n  decode only n frames [all]
    #   -c    check range violations         -y    DISABLE resync on errors
    #   -b n  output buffer: n Kbytes [0]    -f n  change scalefactor [32768]
    #   -r n  set/force samplerate [auto]
    #   -os,-ol,-oh  output to built-in speaker,line-out connector,headphones
    #                                        -a d  set audio device
    #   -2    downsample 1:2 (22 kHz)        -4    downsample 1:4 (11 kHz)
    #
    #   -d n  play every n'th frame only     -h n  play every frame n times
    #   -0    decode channel 0 (left) only   -1    decode channel 1 (right) only
    #   -m    mix both channels (mono)       -p p  use HTTP proxy p [$HTTP_PROXY]
    #   -@ f  read filenames/URLs from f     -T get realtime priority
    #   -z    shuffle play (with wildcards)  -Z    random play
    #   -u a  HTTP authentication string     -E f  Equalizer, data from file
    #   -C    enable control keys            --no-gapless  not skip junk/padding in mp3s
    #   -?    this help                      --version  print name + version
    
    if ! pgrep -x mpg123
    then 
    	mpg123 ${STREAMOPTIONS} ${STREAMURL}
    	echo "mpg123 not running, Player restarted."
    else
    	echo "mpg123 is running, no restart needed."
    fi
    # & echo $! >/tmp/mpg123.pid

  9. #9
    Join Date
    Feb 2018
    Posts
    23
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    I did some testing today. First off, the transmitter I'm using is a Rangestar FS CZH-05B. I've had it for years and it works great. The buzz is most likely interference signals in wires and transmitter. Moving the wires and adding ferrite cores changes the amount of buzzing noise. Moving/changing the input wire from front input using a 1/8" headphone style plug to the rear input with separate RCA connectors helped a little. The fast chirping sound is from the usb dongle, but only when there is no signal. Switched to the onboard audio and the chirping went away. So, further testing was done. Here's what I have found for my setup so far.
    ----------------------------------------------------------
    On board audio:
    Pros: FPP volume control works (Not a big deal)
    Little noise with no audio (No chirping)

    Cons: Poor music quality (can hear slight hissing in the background during low points in the music)
    ----------------------------------------------------------
    USB audio: (Sound Blaster Play! 3)
    Pros: Excellent music quality (no hissing or background noise during music playback)

    Cons: No FPP volume control
    Chirping when no audio being played.
    ----------------------------------------------------------
    I'll test and play around some more over the next few days. Based on the incredible difference in the audio quality of
    the usb audio, I think I'll continue to use that.

    I'll check out the Internet radio scripts. I think that is a great idea. You guys that can script like that are just amazing.
    Is there a way to play .mp3 music off the FPP sd card separate from a sequence being played?

    Thank you all for your help and suggestions. This is a great community.
    Last edited by Cmndr Brain; 10-16-2019 at 05:38 PM.

  10. #10
    Join Date
    Nov 2011
    Location
    Chicago - Southwest Suburbs
    Posts
    7,741
    Post Thanks / Like

    Default Re: FM Transmitter noise, no media

    It's interesting that you're not getting volume control of the soundblaster. That's working on mine. But I'm not on a current FPP version though. Perhaps that broke in a more recent version.

    You can use the same script to play MP3s, or even playlists of MP3s. Just substitute the filename in place of the internet radio stream URL.

    That script to start the player is actually really simple. most of that script is just comments explaining what it's doing and what the possible options are. There's only 3 actual lines there doing anything. two to set variables, and one to start the player with those variable options. that mpg123 line is the one that does the work. mpg123 is an mpeg player program. It's just running that program, with a specific file or URL and with certain player options.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •