[bash] printf "\a" funziona, beep no. Dove sbaglio?

Installazione, configurazione e uso di programmi e strumenti.
Avatar utente
Sargonsei
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2550
Iscrizione: domenica 17 febbraio 2008, 13:56

[bash] printf "\a" funziona, beep no. Dove sbaglio?

Messaggio da Sargonsei »

Se apro un terminale e impartisco il comando
printf "\a"
dalle casse esce un suono molto simile ad un tonfo.
A seguito di una ricerca su Internet, sono venuto a sapere che, se volevo poter emettere uno o più suoni di mio gradimento, avrei dovuto fare uso di un'applicazione che si chiama beep.
Installata beep su Ubuntu 10.10, ho prima impartito il comando
printf "\a"
per assicurarmi che le casse funzionassero: funzionavano.
Poi altri due comandi per emettere dei suoni con beep, ma non ho sentito nulla.
Questo è il mio output.

Codice: Seleziona tutto

ubuntu10v10@ubuntu10v10:~$ printf "\a"
ubuntu10v10@ubuntu10v10:~$ beep -l 1000
ubuntu10v10@ubuntu10v10:~$ beep -l 1000 --verbose
[DEBUG] 1 times 1000 ms beeps (100 delay between, 0 delay after) @ 440.00 Hz
ubuntu10v10@ubuntu10v10:~$ 
Qualcuno sa dirmi perché il comando printf "\a" funziona, e beep no?
Postare l'output di un comando significa inserire nel post: la riga in cui si digita il comando, tutto l'output, e la riga in cui il prompt ricompare.
Hardware e Sistema Operativo di Sargonsei: http://sargonsei.altervista.org/hardwar ... r-fisso-2/
Comandi da tenere a portata di mano: http://sargonsei.altervista.org/655-2/
Avatar utente
Diabolik62
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 16046
Iscrizione: domenica 20 dicembre 2009, 16:29
Distribuzione: wind 10049 archfce4.12

Re: [bash] printf "\a" funziona, beep no. Dove sbaglio?

Messaggio da Diabolik62 »

non so se puo servire, ma credo di si


NAME
      beep - beep the pc speaker any number of ways

SYNOPSIS
      beep [-f N] [-l N] [-r N] [-d N] [-D N] [-s] [-c]

      beep [ OPTIONS ] [-n] [--new] [ OPTIONS ]

      beep [-h] [--help]

      beep [-v] [-V] [--version]

DESCRIPTION
      beep allows the user to control the pc-speaker with precision, allowing
      different sounds to indicate different events.  While  it  can  be  run
      quite  happily on the command line, it's intended place of residence is
      within shell/perl scripts, notifying the user when something  interest-
      ing  occurs.   Of  course,  it has no notion of what's interesting, but
      it's real good at that notifying part.

      All options have default values, meaning that just typing  'beep'  will
      work.   If  an  option is specified more than once on the command line,
      subsequent options override their predecessors.  So  'beep  -f  200  -f
      300' will beep at 300Hz.

OPTIONS
      -f N   beep  at  N Hz, where 0 < N < 20000.  As a general ballpark, the
             regular terminal beep is around 750Hz.  N is not,  incidentally,
             restricted to whole numbers.

      -l N   beep for N milliseconds.

      -r N   specify the number of repetitions (defaults to 1).

      -d N, -D N
             specify  a  delay of N milliseconds between repetitions.  Use of
             -d specifies that this delay should only  occur  between  beeps,
             that  is,  it  should  not  occur after the last repetition.  -D
             indicates that the delay should occur  after  every  repetition,
             including  the last.  Normally, -d is what you want, but if, for
             example, you are stringing several  beep  commands  together  to
             play  the  star  wars  anthem,  you  may want control over every
             delay.

      -n, --new
             this option allows you to break the command line up into  speci-
             fying  multiple  beeps.   Each  time  this  option is used, beep
             starts treating all further arguments as though they were for  a
             new beep.  So for example:

             beep -f 1000 -n -f 2000 -n -f 1500

             would  produce  a sequence of three beeps, the first with a fre-
             quency of 1000Hz (and otherwise default values), then  a  second
             beep  with  a frequency of 2000Hz (again, with things like delay
             and reps being set to their defaults), then  a  third  beep,  at
             1500Hz.   This is different from specifying a -r value, since -r
             repeats the same beep multiple times, whereas -n allows  you  to
             specify  different  beeps.   After a -n, the new beep is created
             with all the default values, and any of these can  be  specified
             without  altering  values  for preceeding (or later) beeps.  See
             the EXAMPLES section if this managed to confuse you.

      -s, -c these options put beep into  input-processing  mode.   -s  tells
             beep  to  read  from  stdin, and beep after each newline, and -c
             tells it to do so after every character.   In  both  cases,  the
             program will also echo the input back out to stdout, which makes
             it easy to slip beep into a text-processing  pipeline,  see  the
             EXAMPLES section.

      -h, --help
             display usage info and exit

      -v, -V, --version
             display version information and exit
Avatar utente
isuaami
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2876
Iscrizione: domenica 1 maggio 2011, 0:01
Località: Terra

Re: [bash] printf "\a" funziona, beep no. Dove sbaglio?

Messaggio da isuaami »

Codice: Seleziona tutto

alsamixer
e controlla che Beep non sia settato su mute e/o abbia un basso livello

Codice: Seleziona tutto

beep  -f 1000 -r2 -n -f 2000 -r5 -n -f 3600 -r2 -n -f 1000 -n -f 2000 -r2 -n -f 4000 -l 7000

Cresciuto con una nonna che i soldi te li metteva in mano con quel fare a metà tra una spia della Stasi e lo spacciatore di fumo al parco.
Avatar utente
Sargonsei
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 2550
Iscrizione: domenica 17 febbraio 2008, 13:56

Re: [bash] printf "\a" funziona, beep no. Dove sbaglio?

Messaggio da Sargonsei »

isuaami ha scritto:

Codice: Seleziona tutto

alsamixer
e controlla che Beep non sia settato su mute e/o abbia un basso livello
La voce beep non c'è.
Postare l'output di un comando significa inserire nel post: la riga in cui si digita il comando, tutto l'output, e la riga in cui il prompt ricompare.
Hardware e Sistema Operativo di Sargonsei: http://sargonsei.altervista.org/hardwar ... r-fisso-2/
Comandi da tenere a portata di mano: http://sargonsei.altervista.org/655-2/
Scrivi risposta

Ritorna a “Applicazioni”

Chi c’è in linea

Visualizzano questa sezione: Google [Bot] e 7 ospiti