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

Reply With Quote



