WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: beep from commandline in tcl ?  (Read 2375 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
beep from commandline in tcl ?
« on: December 06, 2015, 08:56:38 AM »
I do not find in TCL the beep or play command. Does it exist somewhere? Or an equivalent? What i'd like to do is something like this:

Code: [Select]
~# scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'play $HOME/.local/sounds/freedesktop/stereo/camera-shutter.oga' & 'mv $f $HOME/Bilder/shots/'
The freedesktop sounds i think i'll have to download from somewhere; or do they exist in the extensions (i didn't find them though ...)?

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: beep from commandline in tcl ?
« Reply #1 on: December 06, 2015, 02:29:10 PM »
Answering to myself: Installing sox.tce gives the play command, A part of the freedesktop theme sounds i found on sourceforgenet. Now,
Code: [Select]
play sound.ogg obviously created a problem to alsa: Although the sound is played, i get this error msg (or warning):

Code: [Select]
$ play desktop-login.ogg
play WARN alsa: can't encode 0-bit Unknown or not applicable

desktop-login.ogg:

 File Size: 227k      Bit Rate: 452k
  Encoding: Vorbis       
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz     
Replaygain: off         
  Duration: 00:00:04.02 

In:100%  00:00:04.02 [00:00:00.00] Out:193k  [      |      ]        Clip:0   
Done.

Any ideas in regard?

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: beep from commandline in tcl ?
« Reply #2 on: December 06, 2015, 06:39:38 PM »
I consider this problem as resolved.

1. step: install sox.tce
2. step: play command with the option -G -D does all what is needed.

As for the commandline to do screenshots there seem to be a problem with the length in TCL (in slackware that works). In any case, i broke that line down in a 2 line shell script:
Code: [Select]
#!/bin/sh
scrot '%y.%m.%d-%H:%M_$wx$h_scrot.png' -e 'mv $f /home/tc/Bilder/shots/' &
play -D -G /home/tc/.local/sounds/fLight_2.0/Notify.ogg
which does the job nicely.