| Reply | « Previous Thread | Next Thread » |
|
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 !
|
|
could you get it to work yet? I tried and got the same '1' as response in the interactive shell!
|
| DJ Fadereu |
| View Public Profile |
| Find all posts by DJ Fadereu |
|
I cannot install it on E90....
![]() |
|
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.... |
| DJ Fadereu |
| View Public Profile |
| Find all posts by DJ Fadereu |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |