You Are Here:

Community: Developer Discussion Boards

#1 Old [announce] vibra.pyd and music.pyd modules - 2006-03-07, 18:40

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

Korakot showed me this and I found two little new modules made in IAP Class in MIT !
music.pyd (I'd prefer name it tone.pyd or beep.pyd!) and vibra.pyd (extracted from miso module !)

You can use it like this:
Code:
import music
import vibra
max_volume=music.loudest()
music.tone(440,25,max_volume-1)

vibra.vibrate(100,50)

Download source code and sis file plus ball.py with sound and vibra : http://csg.csail.mit.edu/IAP06/pyext.zip
Hey Korakot , now you can use what you have found on mapping freq and note midi http://www.borg.com/~jglatt/tutr/notefreq.htm ;-)

[bold]
when I try it I don't hear sound and music.tone(440,25) returns 1 value (Is it error or True value ?) Is anyone can recompile it or modify it (with missing volume argument) and share it with us ?
I don't understand why you can use the third argument for setting volume of the beep ? I see an example with ball_tone2.py !
[/bold]

Do anyone know how to use vibra on not Second edition FP2 ?
In doc I read this :
Runs the vibra motor for the specified duration of time
at the specified intensity. The duration is specified
in milliseconds, and must be greater than zero.
The intensity is a value between -100 and 100 (inclusive),
and it specifies percentage of full rotation speed.
Positive and negative values cause rotation in opposite directions;
a zero value indicates no rotation, and thus it makes little
sense to call this function with 0 intensity argument.
Vibration will not work unless enabled in the profile.
Only supported on Series 60 2nd Ed FP2 and higher
Last edited by cyke64 : 2006-03-07 at 19:22. Reason: I try it and it fails !
Reply With Quote

#2 Old Question Re: [announce] vibra.pyd and music.pyd modules - 2007-08-12, 11:16

Join Date: Jun 2007
Posts: 27
DJ Fadereu
Offline
Registered User
could you get it to work yet? I tried and got the same '1' as response in the interactive shell!
Reply With Quote

#3 Old Re: [announce] vibra.pyd and music.pyd modules - 2007-08-12, 16:29

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
I cannot install it on E90....
Reply With Quote

#4 Old Re: [announce] vibra.pyd and music.pyd modules - 2007-08-13, 04:17

Join Date: Jun 2007
Posts: 27
DJ Fadereu
Offline
Registered User
I gave up on music.pyd. It is somehow frustrating that people posted that module on wikis and forums without making it work. Well, someday when I know C++....

Another solution by korakot worked for me, the one mentioned here:

http://snippets.dzone.com/user/korakot/tag/music

Just install smidi.py as a library on your phone's C: drive, then try
the 'play([(34,192)])' command in your interactive shell. It works fine....
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

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