Re: make beep
Khawar Nehal <[email protected]> Sat, 04 Jun 2011 12:15:31 +0200
| Newsgroups | gmane.org.user-groups.luni.tech |
|---|---|
| Message-ID | <[email protected]> |
sorry you wanted different sounds. You could use the standard beep (via echo and also use usleep which is available in sh and also as C function) So you do not need to use C. Just find out if sh takes longer or C. My guess or estimate : sh response may be fast in linux but not in Unix. For unusual reasons. Regards, Khawar On 06/04/2011 04:54 AM, Carl Karsten wrote: > "sacrifice things like reliability" um... no. > > > > On Fri, Jun 3, 2011 at 9:38 PM, bil<[email protected]> wrote: >> You could try running a real-time kernel, that may remove the gap between >> removal and it registaring. >> https://help.ubuntu.com/community/UbuntuStudio/RealTimeKernel >> >> On Friday, June 03, 2011 08:31:28 PM Carl Karsten wrote: >>> I want a light weight way to make a beep using standard tools - no >>> writing C, just install from standard repos, or best if it is part of >>> the ubuntu-desktop install. It should respect the system's >>> mute/volume controls. >>> >>> I am making my laptop beep and blop when I plug/unplug a card. Turns >>> out that the unplug events happen at 2 and 12 seconds after the card >>> has actually left the slot. And now I am paranoid that weird things >>> will happen if I plug something in before all the remove events have >>> fired. So I want distinctive noises. Super cool would be to start a >>> tone playing at the 1st remove event and turn it off at the 2nd. >>> >>> I have come up with the following: >>> >>> /usr/bin/sox -n -d synth .1 sin 700; /usr/bin/sox -n -d synth .1 sin 500 >>> >>> -n = no input file >>> -d = use default alsa device >>> synth .1 sin 700 = .1 second 700hz sin wave >>> >>> Here is it being used in udev: >>> >>> /etc/udev/rules.d/pci-beep.rules >>> >>> SUBSYSTEM=="pci", ACTION=="add", RUN+="/usr/bin/sox -n -d synth .1 sin >>> 500", RUN+="/usr/bin/sox -n -d synth .1 sin 700" >>> >>> SUBSYSTEM=="pci", ACTION=="remove", RUN+="/usr/bin/sox -n -d synth .1 >>> sin 700", RUN+="/usr/bin/sox -n -d synth .1 sin 500" >>> >>> SUBSYSTEM=="firewire", ACTION=="remove", RUN+="/usr/bin/sox -n -d >>> synth .3 sin 700" >>> >>> My biggest problem with this is the small gap between the 700 and >>> 500s. and sox can do all sorts of stuff, so having a kernel process >>> spawing it makes me grumpy. >>> >>> and I just wanna know what my options are. >> -- >> Linux Users Of Northern Illinois (Chicago) - Technical Discussion >> http://luni.org/mailman/listinfo/luni >> > > -- Khawar Nehal Applied Technology Research Center (ATRC) C-55 Block A KDA Officers, Karachi 75260, Pakistan Email : [email protected] Website : http://atrc.net.pk Mobile : 971-55-639-8386 Cybercoffee Shop 13 Building T1, Spain Cluster, International City, Dubai, UAE. Email : [email protected] Dubai Business Club Website : http://dubai-business.co.cc/ General email : [email protected] Facebook : http://www.facebook.com/root.sysop Linked In : http://www.linkedin.com/in/khawarnehal Gtalk : khawar.nehal Skype : khawar.nehal -- Linux Users Of Northern Illinois (Chicago) - Technical Discussion http://luni.org/mailman/listinfo/luni
khawar_nehal.vcf
(text/x-vcard, 149 B)
begin:vcard fn:Khawar Nehal n:Nehal;Khawar email;internet:[email protected] tel;cell:971-55-639-8386 x-mozilla-html:TRUE version:2.1 end:vcard