Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Here you are welcome to share your Push2Run cards

PLEASE NOTE:
If you are downloading a Push2Run card from here or anywhere else, please inspect it carefully before running it or any software associated with it. If you don't do this you may end up with seriously unwanted results.

When sharing a card, please leave any special instructions that are required for its use. For example, if additional software is needed to enable the card, you should leave a link to the program's official webpage.
Post Reply
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

Hi all

I have created a program/batch file and was wondering if anyone would like to give it a go before I add more to it and then posted it here.

The program will play any song or batch of songs from any artist locally from your computer from your own MP3 collection via voice command.

It uses a Push2Run card which calls it.

A few notes:

- I use it in Windows 7 - I'm not sure if it will work in Windows 10 but it should.
- *Edit - It works fine in Windows 10
- My MP3 Filenames are in the format " Artist - SongName.MP3 "
- It works with Winamp - ideally set to random/shuffle mode. *Located at "C:\Program Files (x86)\Winamp\winamp.exe"
- It doesn't require Winamp to be open or populated with a playlist as it creates one on the fly with whatever you say.

It can play entire artists collections by saying "Hey Google, tell My Computer to play songs by *Artists Name*"
- It will then play every song you have of that artist.

It can play any individual song by just the name, or the artist and the song name.
"Hey Google, tell My Computer to play Pink Floyd Comfortably Numb"

You can also say the words in any order and it will play them.
"Hey Google, tell My Computer to play "Numb Floyd Comfortably Pink"

I have a very large collection of MP3's and it has so far worked a treat.

It will accept up to 9 words of song/artist names in any order.

It can also play whole folders of music -
Eg: "Hey Google, tell My Computer to play Hard Rock" - and it will play everything in a subfolder called Hard Rock.

I also have the top 100 songs of different years and have added the year in my filenames - so it can play the top 100 of any year just by saying the year.
Eg: "Hey Google, tell My Computer to play 1978"

I will eventually post the code here but would like it tested a bit by a few others.
I'd prefer not having others add to it then repost it as it will then make it difficult for me to add new features to it as the versions will diverge.

I will likely add more 'understanding' to it so it can discern playing live and studio versions, or if extra superfluous words are added.
EG: "Hey Google, tell My Computer to play Comfortably Numb BY Pink Floyd"
or - "Hey Google, tell My Computer to play Pink Floyd Comfortably Numb - studio version"

I might also add a help file and perhaps an installer. I may also add a method for it to play a favourite list of songs.
Eg: "Hey Google, tell My Computer to play Dinner Music from my favourites" or something similar.

It uses a lookup list so I will have it create one if it cannot find the list it needs.
It creates a text file of songs that it didn't find - as sometimes Google gets things wrong musicwise.
I use it to play my MP3's from a mapped network drive. It's very fast.

If anyone would like to test it, let me know. It's ideal if you have loads of songs and want a cool local Spotify-like setup.

I've also made a few cards to play internet radio stations and others that can make Winamp skip tracks, do volume etc via command-line.
Last edited by Warrior on Mon Dec 13, 2021 8:36 pm, edited 4 times in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song or Artist on Demand From Your Own MP3 Collection

Post by Warrior »

And here's the card for it. The batch file does most of the work - I am still tweaking it.

Added a found list of songs / artists that have been requested.
Mp3Search.jpg
Mp3Search.jpg (53.42 KiB) Viewed 43144 times
Attachments
Play a Song.p2r
(516 Bytes) Downloaded 2218 times
Last edited by Warrior on Fri Apr 26, 2019 12:38 am, edited 1 time in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song or Artist on Demand From Your Own MP3 Collection

Post by Warrior »

Last edited by Warrior on Fri Apr 26, 2019 12:54 am, edited 3 times in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song or Artist on Demand From Your Own MP3 Collection

Post by Warrior »

Last edited by Warrior on Fri Apr 26, 2019 12:55 am, edited 2 times in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

I've now added the ability to play up to 10 streaming Internet Radio Stations as well as local MP3's.

I've also enhanced the display when it runs and added a timer so it auto closes after it has shown what it is doing.
Wizerd
Posts: 7
Joined: Tue Apr 23, 2019 12:24 pm

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Wizerd »

Hey Warrior - nice work. Would be interested in checking out the file(s) when it's available (or to help test). I have a rather large mp3 collection as well, and it would be nice to automate local file play.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

Hi

I'll package up the needed files and maybe a little help file for it.

It's really just the batch file, a shortcut file to make it's window nicer looking, then a little dos timer called 'sleep' so it stays open for a little while so you can read it's output of what it's done.

There are 10 m3u files which go to online radio stations for 'Live' music.

You can edit them as you like. I selected them from this list: http://www.181.fm/mp3links

I was tossing up whether or not to have the batch file look for the MP3 List it needs and create it's own if it didn't find it, but I think for now you can just create your own.

I have MP3's scattered everywhere but the main ones I'd want to play are in the one location really.

All you would do is open a command line, go to the root of the drive that has your MP3's in it, then type :

Dir *.mp3 /on /b /s > "C:\MediaSort\Mp3List.txt"

The MP3List.txt will have entries like this:

C:\Mp3s\Hard Rock\Alice Cooper\Alice Cooper - Pain.mp3
C:\Mp3s\Hard Rock\Alice Cooper\Alice Cooper - Poison - (1989).mp3


Being a plain text file, you can just edit out the lines of Mp3s you don't want available.

I might add an option for it to go to an online news source so you can ask it to read you the news. Maybe something like NPR or FSN.

I'll send it over soon ... ;-)
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

I sent you a PM with the link to the files. Here's the P2R card for it.

Note that the batch file I sent you is in a kind of 'debug' mode so it shows the files it'll play above, then it displays a header.

I'll eventually modify it so it merely displays the number of results it found so it's display will be neater.

The code may appear to be a bit messy but I had to adjust it to take the commands it was fed.

It's not overly elegant so there's no for-in-do loops, etc. It's just this way as a proof of concept and so I can easily add more commands to it like reading the news or weather.

Let me know if you have any trouble getting it going or if you have any ideas for things you'd like it to do. You'll see at the top of the batch file, it can 'listen' for specific words then branch off and play them.

My IFTTT file is :

If You say "tell the computer to $", then Push a note

To use it, just create an MP3List.txt file as noted, then have it play whatever songs are in your collection.

To have it play artists, just say "Tell the computer to play songs by Steely Dan" or whatever.

For internet radio, try "Tell the computer to play channel 4" - you can choose up to the 10 channels in the m3u files and edit them as you like.

There are 10 radio stations as M3U files included, and 5 of them are duplicated.

If your MP3's are in folders, you can have it play the folders of MP3's.

Try "Tell the computer to play Dinner Music" - If you have an MP3 folder called Dinner Music for example.

And as noted above, it doesn't care what the order of the song name or artist is in. It uses a cascading find command which ignores the order.

After you've been using it for a while, you'll see 2 new files in the MediaSort folder it creates called Found.txt and NotFound.txt.
These are lists of hits and misses.

Don't forget, it works with Winamp - ideally set to random/shuffle mode and turn off "Allow multiple instances"

It needs to be located at "C:\Program Files (x86)\Winamp\winamp.exe"
Attachments
Play a Song.p2r
(516 Bytes) Downloaded 2103 times
Last edited by Warrior on Fri Apr 26, 2019 12:21 pm, edited 3 times in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

Winamp commands here :

The commands were changed/updated in version 5.666 which was the last version before they finished.
Attachments
Winamp Skip.p2r
(566 Bytes) Downloaded 2038 times
Winamp Set Volume.p2r
(554 Bytes) Downloaded 2132 times
Winamp Pause.p2r
(566 Bytes) Downloaded 2133 times
Last edited by Warrior on Fri Apr 26, 2019 12:20 pm, edited 2 times in total.
User avatar
Warrior
Posts: 91
Joined: Fri Oct 26, 2018 8:19 am

Re: Play any Song, Artist or Radio Station on Demand From Your Own MP3 Collection

Post by Warrior »

Winamp Volume up and down commands.

The commands were changed/updated in version 5.666 which was the last version before they finished.
Attachments
Winamp Volume Up.p2r
(552 Bytes) Downloaded 2081 times
Winamp Volume Down.p2r
(558 Bytes) Downloaded 2059 times
Post Reply