• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Fun with /dev/speaker

Scheduled Pinned Locked Moved General pfSense Questions
11 Posts 3 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    daplumber
    last edited by Mar 23, 2021, 12:22 AM

    I've always appreciated pfSense's happy little melody announcing that it finally got to a login prompt or was shutting down.

    So I went looking for a few old tunes from the bad old BASIC days that might be pressed into service as notifications.

    This is my favourite so far:

    echo "E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 E8 E8 E8 D12 D4 E8 E8 F8 C8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4 D8 D8 E8 C8 D8 E12 F12 E8 C8 D8 E12 F12 E8 D8 C8 D8 P8 E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4" >/dev/speaker

    Anyone else got any favorites? I'm thinking of the above if an IDS flags an attack or something.

    –--------
    This user has been carbon dated to the 8-bit era...

    P 1 Reply Last reply Apr 8, 2021, 7:59 PM Reply Quote 2
    • P
      provels @daplumber
      last edited by provels Apr 8, 2021, 8:09 PM Apr 8, 2021, 7:59 PM

      @daplumber
      Haha, fun. I bookmarked your original post and finally tried it on my FreeBSD NAS (no speaker in the FW). Is the alpha the note and the numeric the duration?

      EDIT - https://forums.freebsd.org/threads/beep-on-sucessful-bootup.64145/

      Peder

      MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
      BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

      D 2 Replies Last reply Apr 9, 2021, 2:58 AM Reply Quote 0
      • D
        daplumber @provels
        last edited by Apr 9, 2021, 2:58 AM

        @provels my understanding is that speaker understands some form of Music Macro LanguageMML

        Yes, it’s note followed by duration as a fraction of a note.

        –--------
        This user has been carbon dated to the 8-bit era...

        1 Reply Last reply Reply Quote 0
        • D
          daplumber @provels
          last edited by Apr 9, 2021, 3:03 AM

          @provels BTW a lot of boards don’t have piezo speakers on the board, but do have a pair of header pins and a piezo speaker runs a couple of bucks on Amazon etc.

          –--------
          This user has been carbon dated to the 8-bit era...

          P 1 Reply Last reply Apr 9, 2021, 10:28 AM Reply Quote 0
          • P
            provels @daplumber
            last edited by Apr 9, 2021, 10:28 AM

            @daplumber
            Reminds of my old days with DOS 3.1 on my IBM clone. Thanks for the wiki link. Now to compose the "Office" theme...

            Peder

            MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
            BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

            D 1 Reply Last reply Apr 9, 2021, 2:56 PM Reply Quote 0
            • D
              daplumber @provels
              last edited by Apr 9, 2021, 2:56 PM

              @provels ooh, cool. Maybe the theme from “The Equalizer” too? ;-)

              –--------
              This user has been carbon dated to the 8-bit era...

              P 1 Reply Last reply Apr 9, 2021, 4:15 PM Reply Quote 0
              • P
                provels @daplumber
                last edited by provels Apr 9, 2021, 4:16 PM Apr 9, 2021, 4:15 PM

                @daplumber
                Trying to find an online convertor for MIDI to MML, but the output does not resemble your original post. 🤷 Obvs, too many < > < < ...

                2b994234-327b-4122-a349-c92f5ce2e095-image.png

                Peder

                MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                D 1 Reply Last reply Apr 9, 2021, 4:34 PM Reply Quote 0
                • D
                  daplumber @provels
                  last edited by Apr 9, 2021, 4:34 PM

                  @provels Do see spkr (4) for the exact syntax supported.

                  –--------
                  This user has been carbon dated to the 8-bit era...

                  1 Reply Last reply Reply Quote 1
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Apr 10, 2021, 1:13 PM

                    Yeah, you need quotes around it.
                    spkrtest(8) is also included for further fun. 😉

                    Steve

                    P D 2 Replies Last reply Apr 10, 2021, 3:19 PM Reply Quote 1
                    • P
                      provels @stephenw10
                      last edited by Apr 10, 2021, 3:19 PM

                      @stephenw10
                      Haha, stupid server tricks! Gotta love it.
                      c1d73508-51ff-4663-b1b2-8fb3ed55c6d4-image.png

                      Peder

                      MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                      BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                      1 Reply Last reply Reply Quote 1
                      • D
                        daplumber @stephenw10
                        last edited by Apr 10, 2021, 11:52 PM

                        @stephenw10 said in Fun with /dev/speaker:

                        spkrtest(8)

                        I can't believe I missed this! Thanks!

                        –--------
                        This user has been carbon dated to the 8-bit era...

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received