![]() |
N900 play next music track when you shake the phone (python script)
2 Attachment(s)
Hi,
I've made a simple python script to skip to the next track when you shake the phone :D heres what you have to do: extract the script to your phone open the media player and start playing music open the terminal and: cd to the directory of the script type in: python skipshake.py shake the phone and see the results :) when you're done with the script close the terminal. here is the script: Code:
import gobject please test it out and tell me what you think about it |
Re: N900 play next music track when you shake the phone (python script)
Haven't tried this (or the other), but check out shake2control.
|
Re: N900 play next music track when you shake the phone (python script)
Quote:
I've seen that one, but it is in C and it is a bit more complex than this python script. cheers :D |
Re: N900 play next music track when you shake the phone (python script)
Does this check the prox sensor for being covered before skipping the track (I am no expert in python but didnt see anything suggesting it did). I prefer if it doesnt since I keep my n900 in its case most times.
|
Re: N900 play next music track when you shake the phone (python script)
Quote:
also this script is pretty smart when it gets to shaking the phone, I didn't encounter any random track changes yet :) try it out and tell me what you think. |
Re: N900 play next music track when you shake the phone (python script)
Quote:
|
Re: N900 play next music track when you shake the phone (python script)
hmm doesn't seem to work for me. it just displays changes in slope level when i move and shake the N900.
|
Re: N900 play next music track when you shake the phone (python script)
Quote:
|
Re: N900 play next music track when you shake the phone (python script)
Quote:
Quote:
to get a higher slope you'll need to be shaking it for a bit longer if you change the setting of the slope to a lower value, it'll change the track if you shake it less. but 35 is the best value I came up with since it makes sure you've shaken it enough. if you get the message: skipped track at a slope of some_number that means that the player should've skipped the track if it did display "skipped track at a slope of some_number" but didn't change the track, then please tell me so. feel free to explore the script and play with it as much as you want cheers ^^ |
Re: N900 play next music track when you shake the phone (python script)
1 Attachment(s)
To make things clearer about the slopes, I've collected some data from previous shakes and plotted them with pygame
here you go :D |
Re: N900 play next music track when you shake the phone (python script)
I've cleaned up the script a little :)
|
Re: N900 play next music track when you shake the phone (python script)
Yeah, it works. nice :)
|
Re: N900 play next music track when you shake the phone (python script)
thx for the nice app :D
if sum(slope)/100 > 35: i edit the 35 to 5 and all works well XD thx thx Greetz Erazor |
All times are GMT. The time now is 21:14. |
vBulletin® Version 3.8.8