|
Answer» Introduction. A small little micro SD card could hold hundreds of MP3 files of songs at last perhaps two or 3 min. each. Using a single card for just one album seems to be a waste of space. And the amount of time it takes to erase a dozen songs and then copy over a dozen songs can be more than just a minute or so. These cheap SD cards are rather slow when doing write operations. It should be faster to just change the filename itself rather than a erase all and copy a new files.
Now comes the headache.
Use a batch file as a midwife to a playlist. That's the best I like to think of.
I have a small MP3 player that does not pay attention to playlists. It just simply plays any and all MP3 files it can find on the micro-SD card. Now if I had something like an iPod, this would not be a problem because I'm iPod would recognize a playlist. But this cheap little device does not recognize a playlist. But the reason I like to use it is because it's small and portable and cheap but with very good sound from the tiny speaker. In fact, it has better sound than I get from my smart phones and my tablets. So I prefer it for pleasant background music while I am laying in bed or otherwise relaxing.
Now the obvious thing to do would be to have a separate SD card for each music collection I would like to listen to on this little gadget. But that seems to be a waste of something. The little tiny SD card has so much capacity that it seems to be a waste to have separate cards for my separate playlists. There should be some way to just change the playlist on the little card. Alas, this little player doesn't have any idea about what playlists can do.
So I got the idea of making a batch file that would serve as a midwife. The batch file could change the extension names of the files that I didn't want to hear & keep the MP3 extension for the files I want to hear tonight. Does that make any sense at all? Let me do an example.(Small for clarity.) Let's say I named nine files like this: song1.mp3, song2.mp3, ,song3.mpx song4.mp3, song5.mp3, song6.mpx song7.mp3, song8.mpx, song9.mpx From the above, the player would only play songs: 1, 2, 4, 5, 7
So I need a way to have a BAT file rename the files to match the playlist I want. Of course, the player does not do batch. But I would put the card into my PC, run a quick batch and then put the car back in the player.
Once I get it to work, I will load the card with 100s of songs and make ma five playlists for the genre I want for morning, noon, afternoon, night and whenever.
I will give myself two weeks to do this. Will I be able to do this? Thanks for your help.I just use Better File Rename for renaming like this. But that costs money. Question I have is, do you want to have control over what plays in which order? If so then i would think this would be a manual file rename process. A batch might work well then to prompt you with say the file that is to be renamed asking you what number to prepend to the name so say you have...
Paint it BLACK.mp3 Gimme Shelter.mp3 Jumping Jack Flash.mp3
But you want it to play in the order of
Jumping Jack Flash Paint it Black Gimme Shelter
The way I see it the batch would run alphanumerically through the directory listing so the first file up to prepend a number to would be Gimme Shelter with G being before J and P. You then would at the prompt of what value to prepend give it 3 the batch then renames Gimme Shelter.mp3 as 3_Gimme Shelter.mp3 and places that into a different completed work folder. Next the batch would grab for rename would be Jumping Jack Flash, and SINCE you want that first you would give it the value of 1 to prepend to the name, so it renames Jumping Jack Flash to 1_Jumping Jack Flash.mp3 and then finally it gets to the last file alphanumerically in this same directory Paint it Black, and since you want it to play second you give it a value of 2, in which the batch renames it to 2_Paint it Black.mp3
so in the end you have
1_Jumping Jack Flash.mp3 2_Paint it Black.mp3 3_Gimme Shelter.mp3
I already do a process like this manually for the 256MB old obsolete USB stick that keeps working and make up custom play lists this way via prepending renames. I havent taken the time to code anything up yet, but it seems pretty simple. Im not that great with batch and maybe someone here will run with this prepending file name with custom value added to prepend for you. I like adding a value and a underscore before the title of the song as for on the car stereo display it looks so much better than the value bound tight to the title like 2Paint it Black to me just looks too sloppy so add a underscore and make it look better. I guess I am picky that way.
*Also to note, your method doesnt retain the order with different file names with an appended numbering system. Appended ordering only works with files of the same name. So if you want to keep the title of the song in the file name, its best to prepend a value to them.
Locked out of editing last post, but did some quick searching and found this: for f in *.md; do mv "$f" "test - $f"; done
This adds test - before every file name of all .md file extension files as indicated by the wildcard *.md
If you had a batch in a loop with a counter you could pass the counter value within the "test - $f"; instruction and have 1 - 2 - 3 - 4 - and so on prepended until complete. However you wouldnt have any control of what files are in what order with a loop. But if prompted what to pass to this field, then maybe that would work to allow you to see what file is up at bat and give it a number for order that you want it placed with others.
http://superuser.com/questions/486465/how-to-mass-prepend-text-to-file-names
Quote from: DaveLembke on NOVEMBER 11, 2016, 08:44:22 AM Locked out of editing last post, but did some quick searching and found this: for f in *.md; do mv "$f" "test - $f"; done
This adds test - before every file name of all .md file extension files as indicated by the wildcard *.md
If you had a batch in a loop with a counter you could pass the counter value within the "test - $f"; instruction and have 1 - 2 - 3 - 4 - and so on prepended until complete. However you wouldnt have any control of what files are in what order with a loop. But if prompted what to pass to this field, then maybe that would work to allow you to see what file is up at bat and give it a number for order that you want it placed with others.
http://superuser.com/questions/486465/how-to-mass-prepend-text-to-file-names
This is BASH. Unless Geek is running Windows 10 with the Linux Subsystem installed, this is not going to work.I need to clarify. The3 MP3 player is super dumb. The only things it does is identify files as being audio files by the extension
My goal was to exclude a large block of files, not change the order The player does not have a way to go to a specific starting point. Expect by pressing the forward key N times.
Larger example, There are 100 audio files that a re just reading. Another 100 fioles are dance music. Another 100 are relaxing music.
So when I want to listen to the reading, I woulds exclude the music files. So I I want to dance, I would exclude the files not in the category. The order is not important. What matters is the kind of stuff I want to hear.
As for folders, the player does not respect folders. It plays anything that looks like a MP3 file. That is why I am think only the type matters. Of curse, to make the change I have to plug the card into my PC, do a command, them put it back. The should not take 30 seconds.
As mentioned , the obvious solution is to just buy a lot of SD memory cards. But that just seems to be such a waste to have a bunch of chips that are mostly empty. So I am looking for a batch program that can just change the type for blocks of files The files can be in folders. Windows sees folders, the player only sees files.Lets say there are five folders. \voice \rock \classic \western \soft If I want the classic group., change the type of all the others. Is that doable?
Gimme Shelter should be # 1...no matter what you guys figure out...I wonder if the player can see folders & files that have the hidden file attribute set. This way you would not have to screw around with renaming files.OK, I will test that now. I have already found that it only knows MP3 and it does not care about sort order. It plays files b y the order they weer save. It does not stopwith folder boundaries. It just plays everything I am going to try a test in Audacity.I will make a MP3 of my voice, write it to a USB drive and then make it hidden. NO. The player ignores the hidden bit. It plays the file as if the hidden thing did not matter.
Also, it only does MP3. It does not play WAV files or even see them.
Given the l imitations of the device, as you've noted the extension is probably the way to go here- rename files to MP3 to make them "visible" rename them back to make them invisible to the player.
My thinking is using extensions pl0, pl1, pl2, etc to .pl9. You would rename the files intending to be on each playlist with the appropriate extension, EG the first playlist to the pl0 extension, the second to the pl1 extension, etc.
you would have a batch file for performing the operation, and it is provided the desired playlist extension.
It's first task would be to find out the "current" playlist, since it would need to rename existing mp3 files back to the appropriate extension to hide them and tag them as part of that psuedo-playlist. I'm sure one of the more proficient batch guru's could do something more specific (maybe save it to a file for retrieval) but my thinking is to just brute force it to find the missing playlist extension, then rename all the mp3 files present back to that playlist extension. After that, the SD Card will have no files with the mp3 extension and the task is to rename the selected playlist files to Mp3 to make them "visible".
At that point we'd have the SD Card with no files with the mp3 extension, and the batch would just need to rename the selected playlist to "mp3" to make it active:
Code: [Select]for %%p in (0 1 2 3 4 5 6 7 8 9) do if not exist *.pl%%p rename *.mp3 *.pl%%p rename *.%1 *.mp3
At which point your "selected" playlist is enabled. with the selected playlist being provided as a command LINE argument.
But of course having to open a command prompt and such doesn't make it particularly straightforward. If the player ignores all files that don't have a .mp3 extension, we can utilize that to make it a bit easier, and even make it somewhat machine independent. Let's say the above batch file is named "setplaylist.bat" and is saved on the SD Card. For easy selection you could create empty files with no extension where the name matches the playlist extension- for example there would be files pl1, pl2, pl3, etc. Then you could make use of the batch by dragging those files over the batch file in Windows Explorer.
For adding additional playlists beyond 10, it would require altering the "cleanup" logic in such a fashion as to recognize what playlist is "active" if there is one so it can rename the files back. Of course you can use longer than 3 characters so you could just go on with 10, 11, 12, etc and add it in there. (I'm sure there's room for a "for" command trick to iterate through say 100 numbers and have as many playlists as you want, too, but I'm lazy and couldn't be bothered to look into that!)
It looks like you on to something here. I will have to think hard and see if I get it. Meanwhile, here is a picture of the little MP3 player.
It has better sound than my smartphone. But is not smart. It is very dumb.
|