You Are Here:

Community: Developer Discussion Boards

#1 Old Beep or Click? - 2006-02-22, 11:11

Join Date: Jan 2006
Posts: 67
slitchfield
Offline
Regular Contributor
Is there a way to generate a short beep or click (as in the old OPL command "beep")?

It's for the metronome in my Musician app - it's all very well being able to summon up MID or WAV or MP3 sound files, but the very act of calling them is going to mess up the split second timing of the program.

Surely there's a simple way (or hack) to sound something like the built-in system keyclick noise? Or a simple beep?

Thanks
Steve Litchfield
Reply With Quote

#2 Old Re: Beep or Click? - 2006-02-22, 11:57

Join Date: Sep 2003
Posts: 209
Location: Finland
otsov
Offline
Regular Contributor
Quote:
Originally Posted by slitchfield
Is there a way to generate a short beep or click (as in the old OPL command "beep")?
"User::Beep" (see SDK documentation), you could add this e.g. to "audio" but you would need to do C/C++ coding.
Reply With Quote

#3 Old Re: Beep or Click? - 2006-02-22, 12:10

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Just try playing a short WAV sample with the audio module and see if it's good enough.
Reply With Quote

#4 Old Re: Beep or Click? - 2006-02-22, 15:27

Join Date: Jan 2006
Posts: 67
slitchfield
Offline
Regular Contributor
Quote:
Originally Posted by jplauril
Just try playing a short WAV sample with the audio module and see if it's good enough.
After optimising the WAV file and doing all I can in the code, it's just about good enough, together with a fudge factor or two. The beat's still irregular though, I suspect a degree of inefficiency in terms of caching the sound file etc.

A built-in 'click' or beep function would be far more likely to work quick enough, though. No other ideas?

Cheers
Steve Litchfield
Reply With Quote

#5 Old Re: Beep or Click? - 2006-02-22, 15:34

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
You could try playing the file from the RAM disk (D: ). I don't know if it makes any difference, but it's easy to try.
Reply With Quote

#6 Old Re: Beep or Click? - 2006-02-22, 15:55

Join Date: Jan 2006
Posts: 67
slitchfield
Offline
Regular Contributor
Quote:
Originally Posted by jplauril
You could try playing the file from the RAM disk (D: ). I don't know if it makes any difference, but it's easy to try.
Hmm.... e32 is already imported. I use:

file_copy("D:\\metronome.wav","E:\\metronome.wav")

but Python tells me that global name file_copy is not defined. Any ideas? Is this a misprint in the PDF docs?

Steve Litchfield
Reply With Quote

#7 Old Re: Beep or Click? - 2006-02-22, 16:20

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
If you said "import e32" you need to say e32.file_copy.
Reply With Quote

#8 Old Re: Beep or Click? - 2006-02-22, 16:35

Join Date: Jan 2006
Posts: 67
slitchfield
Offline
Regular Contributor
Quote:
Originally Posted by jplauril
If you said "import e32" you need to say e32.file_copy.
Wayhay! Thanks. And playing from RAM disk (D make a big difference, I think the metronome's sorted now!

Thanks again

Steve Litchfield
Reply With Quote

#9 Old Re: Beep or Click? - 2006-02-23, 19:37

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Hello ,

You can also generate a beep with a midi file !
Korakot has modified a "smidi" library and showed usage in Snippet PyS60 Generate and play midi on mobile phone..



links references :
smidi library : http://larndham.net/service/pys60/smidi.py
Generate and play midi on mobile phone. : http://www.bigbold.com/snippets/posts/show/572
Reply With Quote

#10 Old Re: Beep or Click? - 2006-02-23, 19:41

Join Date: Jan 2006
Posts: 67
slitchfield
Offline
Regular Contributor
Quote:
Originally Posted by cyke64
Hello , You can also generate a beep with a midi file !
Yes, but I suspect there's similar overhead to playing a WAV file. Anyway, the digitised metronome sound is fine from RAM disk and sounds great in Musician 1.5, if I say so myself 8-)

BTW, the tuning notes in the program are MID files....

Steve
Reply With Quote

#11 Old Re: Beep or Click? - 2006-03-07, 18:14

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Is there a way to generate a short beep or click (as in the old OPL command "beep")?
Now you can emit a beep with this free library and use it in a next Musician version ;-)

There music.loudest() function and music.tone(freq,duration,volume) function.

You find there source and sis file for you phone. http://csg.csail.mit.edu/IAP06/pyext.zip

Curious but in my 6600 Nokia phone It doesn't work :-(
Reply With Quote

#12 Old Re: Beep or Click? - 2006-03-08, 08:17

Join Date: Jan 2005
Posts: 148
Location: Bangkok, Thailand
Send a message via MSN to korakotc
korakotc's Avatar
korakotc
Offline
Regular Contributor
It doesn't work on my 6600 either.
(That's why I haven't written a snippet about it.)
Reply With Quote

#13 Old Re: Beep or Click? - 2008-06-17, 20:33

Join Date: Mar 2003
Posts: 564
cassioli's Avatar
cassioli
Offline
Super Contributor
Quote:
Originally Posted by cyke64 View Post
Now you can emit a beep with this free library and use it in a next Musician version ;-)

There music.loudest() function and music.tone(freq,duration,volume) function.

You find there source and sis file for you phone. http://csg.csail.mit.edu/IAP06/pyext.zip

Curious but in my 6600 Nokia phone It doesn't work :-(
has this module been updated in last months?
I'd need to produce some tones at 19000 Hz for very short durations (400 to 2000 microseconds, i.e. 0.4 to 2.0 milliseconds)
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Application skips many times when I click the application bb_sathya Mobile Java General 0 2005-12-20 05:49
beep within applicaiton for 6230i very quiet gwhistance Mobile Java General 0 2005-11-30 15:57
Belkin USB Bluetooth Adapter Works! jonawebb Bluetooth Technology 10 2003-06-21 21:10
How to use Beep() to make a system beep on 7650? bijibiji General Symbian C++ 0 2003-05-07 11:54
How to detect a double click event in S60 C++ kdinn General Symbian C++ 0 2002-12-11 05:28

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia