• BEL

    From Dieter Britz@21:1/5 to All on Tue Sep 28 13:39:31 2021
    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    --
    Dieter Britz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to Dieter Britz on Tue Sep 28 09:09:02 2021
    On Tuesday, September 28, 2021 at 6:39:35 AM UTC-7, Dieter Britz wrote:
    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    You could buy one of these:

    https://en.wikipedia.org/wiki/Teletype_Model_33

    which has an actual metal bell that rings when you send it achar(7).

    Many electronic ASCII (or non-ASCII) terminals generate a beep sound,
    emulating a bell. But more recently, most of us use terminal emulators,
    most of which have the ability to beep, if the system has a way to beep.

    I am writing this on an OS X system, which has Terminal.app, which
    does beep when sent ASCII X'07'.

    You might check to see if your audio is muted, or the level turned down low.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arjen Markus@21:1/5 to All on Wed Sep 29 07:36:40 2021
    On Tuesday, September 28, 2021 at 6:09:05 PM UTC+2, gah4 wrote:


    You might check to see if your audio is muted, or the level turned down low.

    I tried this on a Windows machine in the standard command window (and the loudspeaker on - which I normally don't have). A program writing a single BEL character (achar(7)) to standard output does produce a bell sound. I tried with both gfortran and
    Intel Fortran oneAPI and the result was the same.

    Regards,

    Arjen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to Dieter Britz on Wed Sep 29 20:26:08 2021
    On Tuesday, September 28, 2021 at 6:39:35 AM UTC-7, Dieter Britz wrote:
    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    At one point in "The Andromeda Strain" movie (I didn't check the book),
    there is a terminal with a bell that is supposed to ring. It turns out not to ring, as it got a piece of paper stuck in it. (Yes a real mechanical bell.)

    In the end that not hearing the bell turns out to be the right thing,
    but they didn't know that at the time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dieter Britz@21:1/5 to Arjen Markus on Thu Sep 30 07:58:59 2021
    On Wed, 29 Sep 2021 07:36:40 -0700, Arjen Markus wrote:

    On Tuesday, September 28, 2021 at 6:09:05 PM UTC+2, gah4 wrote:


    You might check to see if your audio is muted, or the level turned down
    low.

    I tried this on a Windows machine in the standard command window (and
    the loudspeaker on - which I normally don't have). A program writing a
    single BEL character (achar(7)) to standard output does produce a bell
    sound. I tried with both gfortran and Intel Fortran oneAPI and the
    result was the same.

    Regards,

    Arjen

    Thanks. It doesn't work on my laptop. I tried ACHAR(7) and put on head
    phones, but no beep, The alptop can make them, and I often get noises
    to indicate errors of various sorts, but it seems, not from a Fortran
    program with print. I'll have to live without it.

    I want this for a program that warns me of imminent birthdays and
    appointments when I turn on the console, to remind me to read what it
    outputs on the screen.

    --
    Dieter Britz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phillip Helbig (undress to reply@21:1/5 to dieterhansbritz@gmail.com on Thu Sep 30 09:03:30 2021
    In article <sj3qo3$e9e$1@dont-email.me>, Dieter Britz <dieterhansbritz@gmail.com> writes:

    On Wed, 29 Sep 2021 07:36:40 -0700, Arjen Markus wrote:

    On Tuesday, September 28, 2021 at 6:09:05 PM UTC+2, gah4 wrote:


    You might check to see if your audio is muted, or the level turned down
    low.

    I tried this on a Windows machine in the standard command window (and
    the loudspeaker on - which I normally don't have). A program writing a single BEL character (achar(7)) to standard output does produce a bell sound. I tried with both gfortran and Intel Fortran oneAPI and the
    result was the same.

    Regards,

    Arjen

    Thanks. It doesn't work on my laptop. I tried ACHAR(7) and put on head phones, but no beep, The alptop can make them, and I often get noises
    to indicate errors of various sorts, but it seems, not from a Fortran
    program with print. I'll have to live without it.

    I want this for a program that warns me of imminent birthdays and appointments when I turn on the console, to remind me to read what it
    outputs on the screen.

    This is not a Fortran issue:

    $ creat bell.f90
    print*, achar(7)
    end
    Exit
    $ fortran bell
    $ link bell
    $ r bell

    Works as designed.

    I normally ring the bell with an OS-level script:

    $ bell[0,32]= %x07
    $ write sys$output bell
    $exit

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From LC's No-Spam Newsreading account@21:1/5 to Dieter Britz on Thu Oct 21 13:18:29 2021
    On Tue, 28 Sep 2021, Dieter Britz wrote:

    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    This is not a Fortran question, the actual generation of the sound
    depends on your hardware and operating system.

    On most Unix/Linux X11 terminal windows even the plain typing of a
    control-G (equivalent to the program you mentioned) used to sound the
    bell. However on "modern" PCs this is usually disabled.

    One can however assign a system sound to the X11 bell, picking it up
    from files stored under /usr/share/sounds and including something like
    this in your .login (this works on my office OC with Suse)

    pactl upload-sample /usr/share/sounds/... x11-bell
    pactl load-module module-x11-bell sample=x11-bell

    Have a quick network search on those commands. Variations are possible.
    For instance on my new home PC with Ubuntu I had to add to the second
    command

    display=$DISPLAY

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to LC's No-Spam Newsreading account on Thu Oct 21 12:54:30 2021
    On Thursday, October 21, 2021 at 4:18:39 AM UTC-7, LC's No-Spam Newsreading account wrote:
    On Tue, 28 Sep 2021, Dieter Britz wrote:

    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    This is not a Fortran question, the actual generation of the sound
    depends on your hardware and operating system.

    There might be some I/O libraries that block some control characters.
    I believe that is rare now, but maybe not always.

    When microprocessor controlled terminals were first introduced, they
    often had many interesting features activated by control characters.
    There were many fun tricks you could play one someone, and many
    people did use those tricks.

    But yes, the usual Fortran systems now pass control characters,
    and it is up to the users (real or emulated) terminal to process them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gary Scott@21:1/5 to All on Fri Oct 22 10:43:05 2021
    On 10/21/2021 2:54 PM, gah4 wrote:
    On Thursday, October 21, 2021 at 4:18:39 AM UTC-7, LC's No-Spam Newsreading account wrote:
    On Tue, 28 Sep 2021, Dieter Britz wrote:

    The ASCII character CHAR(7) is the bell, i.e. a beep sound.
    When I print it, there is no sound. How come, and how do I
    get that sound from a Fortran program?

    This is not a Fortran question, the actual generation of the sound
    depends on your hardware and operating system.

    There might be some I/O libraries that block some control characters.
    I believe that is rare now, but maybe not always.

    When microprocessor controlled terminals were first introduced, they
    often had many interesting features activated by control characters.
    There were many fun tricks you could play one someone, and many
    people did use those tricks.

    But yes, the usual Fortran systems now pass control characters,
    and it is up to the users (real or emulated) terminal to process them.


    There isn't actually a terminal in most cases now, just a terminal
    emulator that has in some cases been dumbed down over time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to All on Fri Oct 22 11:58:29 2021
    On Friday, October 22, 2021 at 8:43:08 AM UTC-7, Gary Scott wrote:

    (snip, I wrote)
    But yes, the usual Fortran systems now pass control characters,
    and it is up to the users (real or emulated) terminal to process them.

    There isn't actually a terminal in most cases now, just a terminal
    emulator that has in some cases been dumbed down over time.

    Yes, that is why I said real or emulated. Note in this picture:

    https://upload.wikimedia.org/wikipedia/commons/1/1a/ASR-33_backside.jpg

    of the Teletype model 33 from:

    By Seth Morabito - Flickr: The Backside, CC BY-SA 2.0, https://commons.wikimedia.org/w/index.php?curid=19317785

    you can see the actual metal bell, just below the slot where paper goes into the platen.

    Also, some terminal emulators flash the screen when the BEL character is received.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From LC's No-Spam Newsreading account@21:1/5 to Gary Scott on Tue Oct 26 23:16:08 2021
    On Fri, 22 Oct 2021, Gary Scott wrote:

    This is not a Fortran question, the actual generation of the sound
    depends on your hardware and operating system.

    But yes, the usual Fortran systems now pass control characters,
    and it is up to the users (real or emulated) terminal to process them.

    There isn't actually a terminal in most cases now, just a terminal
    emulator that has in some cases been dumbed down over time.

    At least for Linux/X11 systems, at least the oldest terminal emulators
    (xterm, urxvt) have not been dumbed down (I don'y use the newest ones).

    It is the combination of X11 and hardware that often do not support
    silly old audio bells (because they have multimedia support !!!) ... but
    if one wishes it can be re-instated with some pactl commands, as said.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)