Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

View Poll Results: Do you use your Kindle to listen to music?
Yeah! All the time. 31 31.63%
Only when my actual music player dies 18 18.37%
No. It's too undeveloped 49 50.00%
Voters: 98. You may not vote on this poll

Reply
 
Thread Tools Search this Thread
Old 12-26-2010, 11:53 PM   #1
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Cool Kindle Music Shuffler

Hi Guys,

I'm here to present to share my Kindle Music Shuffler with you guys. Please note that nearly all of the code is based off of the Screensaver Hack Randomization algorithm.

Prerequisites:

- Jailbreak
- Launchpad

To install it, create a folder in /mnt/us called musicshuffle. Place the "shuffle" and "sort" executables (located in the attached archive) in that folder. Now, to use it, just add an entry to launchpad to run the shuffle script:

M S = !/mnt/us/musicshuffle/shuffle

Then, next time you want to shuffle your music, simply run that command, and it will shuffle all of your music.

~ Kranu

Let me know if you encounter problems with this, I will try to weed them out, although I'm pretty bad at shell scripting.
Attached Files
File Type: zip musicshuffle.zip (91.3 KB, 1169 views)

Last edited by kranu; 12-26-2010 at 11:56 PM. Reason: added prerequisites
kranu is offline   Reply With Quote
Old 12-27-2010, 01:19 AM   #2
FF2
Wizard
FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.
 
Posts: 1,111
Karma: 1025784
Join Date: Oct 2010
Device: WiFi Kindle3
I guess the type of music I listen to is not suited for shuffling - classical. I would certainly like more control of what I hear without having to constantly access the music folder from a pc.
FF2 is offline   Reply With Quote
Old 12-27-2010, 01:28 AM   #3
wvcherrybomb
Sharp Shootin' Grandma
wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.wvcherrybomb ought to be getting tired of karma fortunes by now.
 
wvcherrybomb's Avatar
 
Posts: 849
Karma: 1123940
Join Date: Nov 2010
Location: Sunny Florida
Device: Kindle 3, Kindle Fire, Literati (has been adopted by my daughter)
Quote:
Originally Posted by FF2 View Post
I would certainly like more control of what I hear without having to constantly access the music folder from a pc.
Oh, me too!

I haven't had any reason to jailbreak my Kindle ... until now. Thanks for the music shuffler.
wvcherrybomb is offline   Reply With Quote
Old 12-27-2010, 01:40 AM   #4
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by FF2 View Post
I guess the type of music I listen to is not suited for shuffling - classical. I would certainly like more control of what I hear without having to constantly access the music folder from a pc.
Well, you can always put your music inside the Audible or Documents folder, and it will show up on your Kindle screen where you can pick and choose. Unfortunately, with that, you won't be able to listen to music in the background, and you won't be able to have a playlist.

I've tried making a music player with the KDK, but I'm so bad at Java that I can't even figure out how to make a button react.

Before I bought my Kindle, one of the things that I imagined was a iPod like system where I could pick my music and put it in a playlist with shuffle and what not. I was vastly disappointed when I figured out that it can't even shuffle (well, until this).
kranu is offline   Reply With Quote
Old 12-27-2010, 10:45 AM   #5
FF2
Wizard
FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.FF2 ought to be getting tired of karma fortunes by now.
 
Posts: 1,111
Karma: 1025784
Join Date: Oct 2010
Device: WiFi Kindle3
Your skills at programming this thing are way better than mine. I was Cobol in the 1970's! Since the k3 is not a cellphone (yet) I can supply my music from my Blackberry if need be. But it would be nice to have more music control of the k3. Thanks for your early efforts and here's hoping you can go further.
FF2 is offline   Reply With Quote
Old 12-29-2010, 09:56 PM   #6
SteveEisenberg
Wizard
SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.SteveEisenberg ought to be getting tired of karma fortunes by now.
 
Posts: 1,783
Karma: 12414006
Join Date: Jun 2008
Location: Philadelphia USA
Device: Kindle Keyboard 3G
I'm not ready to jailbreak, but this post gave me some ideas. It would be fairly easy (given my skill-set, anyway) to automatically, whenever the K3 is connected to the PC, exchange the music on the device for a more or less random selection from the larger number of MP3 tracks that are sitting in folders on my PC. As someone mentioned, I don't want it to be purely random since the order of classical music movements should be preserved. I'll have to think about how random it should be.

I'm presuming that when you copy MP3's, by code, from the PC, they will then play on the Kindle in that order, just as when you copy them manually. But this will have to be tested unless someone already knows. How does the Kindle know what order to play the tracks? Can you access this from MS Windows?

As for answering the poll, I would say that I read with Kindle background music on about a fifth of the time.

The 44 Françoise Hardy tracks I now have on my K3 are so awesome that doing this will not be a major priority.
SteveEisenberg is offline   Reply With Quote
Old 12-30-2010, 02:22 AM   #7
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by SteveEisenberg View Post
I'm not ready to jailbreak, but this post gave me some ideas. It would be fairly easy (given my skill-set, anyway) to automatically, whenever the K3 is connected to the PC, exchange the music on the device for a more or less random selection from the larger number of MP3 tracks that are sitting in folders on my PC. As someone mentioned, I don't want it to be purely random since the order of classical music movements should be preserved. I'll have to think about how random it should be.

I'm presuming that when you copy MP3's, by code, from the PC, they will then play on the Kindle in that order, just as when you copy them manually. But this will have to be tested unless someone already knows. How does the Kindle know what order to play the tracks? Can you access this from MS Windows?

As for answering the poll, I would say that I read with Kindle background music on about a fifth of the time.

The 44 Françoise Hardy tracks I now have on my K3 are so awesome that doing this will not be a major priority.
From my experience, the Kindle plays music by alphanumerical order. If you don't want to jailbreak, I'm quite certain that you can test this out with the standard ;debugOn ~exec musicshuffle/shuffle (on Kindle 3)
kranu is offline   Reply With Quote
Old 01-13-2011, 06:01 PM   #8
magillos
Junior Member
magillos began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2011
Device: nono
Quote:
Then, next time you want to shuffle your music, simply run that command, and it will shuffle all of your music.
It doesn't work right. I can only use shuffler once after fresh reboot is done and no music has been played. Kindle music player has no "stop" button but just simple play/pause. So if any music is played before shuffling music collection (and paused or not) it just doesn't work. Kindle stops to play music at all (at the end of current track if on) and device restart is needed. Repeating shuffle causes the same so to use it again or to use music player I have to reboot kindle; not too convenient.
magillos is offline   Reply With Quote
Old 03-08-2011, 01:32 AM   #9
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
/deleted by author

Last edited by jeromedevine; 03-08-2011 at 11:01 AM.
jeromedevine is offline   Reply With Quote
Old 03-08-2011, 01:52 AM   #10
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by jeromedevine View Post
Doesn't work. Waste of time. Trash of a thread.
Why doesn't it work?
kranu is offline   Reply With Quote
Old 03-08-2011, 02:05 AM   #11
jeromedevine
Zealot
jeromedevine doesn't litterjeromedevine doesn't litterjeromedevine doesn't litter
 
Posts: 108
Karma: 240
Join Date: Sep 2009
Device: Kindle 3 3G Graphite, Sony PRS-505
/deleted by author

Last edited by jeromedevine; 03-08-2011 at 11:01 AM.
jeromedevine is offline   Reply With Quote
Old 11-02-2011, 04:42 PM   #12
leonsegal
Junior Member
leonsegal began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2011
Device: kindle
hi

this looks like a very cool idea!

i have entered all the outlined steps but it doesnt appear to work

it says 'success' but the tracks still play in order - even if i run it after a reboot!

Thanks

Last edited by leonsegal; 11-02-2011 at 04:52 PM. Reason: mistake
leonsegal is offline   Reply With Quote
Old 11-05-2011, 03:01 AM   #13
kranu
I <3 my Kindle
kranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensionskranu can understand the language of future parallel dimensions
 
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
Quote:
Originally Posted by leonsegal View Post
hi

this looks like a very cool idea!

i have entered all the outlined steps but it doesnt appear to work

it says 'success' but the tracks still play in order - even if i run it after a reboot!

Thanks
Hi,

Try going into your music folder, and looking at the file names. If they have numbers at the beginning, it should be working properly.
kranu is offline   Reply With Quote
Old 01-31-2012, 05:46 AM   #14
darryl47nopra
Junior Member
darryl47nopra began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2012
Device: K3
Quote:
Originally Posted by kranu View Post
Hi Guys,

To install it, create a folder in /mnt/us called musicshuffle. .
i dont get it.
have i to create the folder in root directory?? or what?
darryl47nopra is offline   Reply With Quote
Old 02-01-2012, 08:20 AM   #15
tvjohn
Connoisseur
tvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of lighttvjohn is a glorious beacon of light
 
Posts: 83
Karma: 12307
Join Date: Apr 2011
Device: Kindle 3, K4NT
Quote:
Originally Posted by kranu View Post
Hi Guys,

...
M S = !/mnt/us/musicshuffle/shuffle

Then, next time you want to shuffle your music, simply run that command, and it will shuffle all of your music.

~ Kranu

Let me know if you encounter problems with this, I will try to weed them out, although I'm pretty bad at shell scripting.
I get an "is_integer" not found when I run the shuffle script.

However, since installing the Kindle terminal, as I regularly listen to music on K3, I realised that using the terminal is a useful way to control mplayer directly, particularly as it displays mp3 tags, file info' etc. Previously I'd installed fbdev's kinamp, so mplayer was already in the system folder.

So, I launch the terminal via a launchpad sequence, then:

cd /mnt/us/music

& from there:

../system/mplayer -shuffle *.*

which seems to work pretty well.

All of that can be put in a short script, & aliased to keypresses of your choice.

Space pauses play, enter goes to next tune.

You can press the left hand < key to go back to Kindle & carry on reading a book, etc.. You also get the hardware volume control working from there, whereas you need keypresses for volume via the terminal. At any time whilst reading, you can launch the terminal again to see current song title, last few played etc..

You can also, by terminal output redirection, collect all the current session's output into a file. so you can see just how random mplayer's shuffle really is

Playlists can also be defined if you wish.
tvjohn is offline   Reply With Quote
Reply

Tags
hack, kindle, music, shuffle

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 01:26 PM.


MobileRead.com is a privately owned, operated and funded community.