FORUMS

[GUIDE][Difficulty: Beginner] Read Aloud Track Name and Artist

1,034 posts
Thanks Meter: 2,137
 
By MishaalRahman, Editor in Chief on 10th March 2016, 05:21 AM
Post Reply Email Thread
Do you have a bunch of new songs that you listen to while in the car, and would like to learn to associate the song with its track name and artist? Rather than looking at your car's display or your music widget, you can simply have Tasker them aloud when a song starts.

Prerequisites
  • A compatible music player. Go to this page and search for %MTRACK to see more details.


Instructions
  1. Create a new profile and name it "Say Track."
  2. Create an Event context, go to Variables --> Variable Set. Set the variable to %MTRACK and leave the value blank.
  3. Create the task but don't name it anything.

  1. Task --> Wait. Wait 1 second. This is necessary because %MARTIST sometimes takes a bit more time to be set after %MTRACK is.
  2. Variables --> Variable Split. Name %MARTIST, Splitter is - (a dash).
  3. Alert --> Say. Text: %MTRACK by %MARTIST1. Check If and set it to if %MPLAYSTATE !~ PAUSED AND %SCREEN ~ off. This is so it'll only read the track name and artist if the music isn't paused and if the screen is off.
  4. Alert --> Flash. Text: %MTRACK by %MARTIST1. Check If and set it to if %MPLAYSTATE !~ PAUSED AND %SCREEN ~ on. This will flash the track name and artist if the screen is on and music is playing (obviously).


That's it! Let me know if you find this one useful. Also, post below if it works for your music player. I use Gonemad Music Player and it works great for me!

I've attached the XML file below. To import it, move it to /sdcard/Tasker/Profiles, then open Tasker and long-press on the Profiles tab up top and click on Import.
Attached Files
File Type: xml Say_Track.prf.xml - [Click for QR Code] (1.9 KB, 1472 views)
The Following 10 Users Say Thank You to MishaalRahman For This Useful Post: [ View ]
11th March 2016, 08:08 AM |#2  
teorouge's Avatar
Senior Member
Flag Trento
Thanks Meter: 297
 
More
Thanks, but how can you handle different languages? I mean, you can't listen to English/Japanese/whatever songs/groups/artists in your main language (that's Italian, in my case) as you wouldn't even understand a thing. I tried to implement this long ago for car use via bluetooth and screen off but in the end I had to give up: could you find a solution maybe?
The Following User Says Thank You to teorouge For This Useful Post: [ View ] Gift teorouge Ad-Free
11th March 2016, 03:30 PM |#3  
Senior Member
Thanks Meter: 54
 
More
Is there a way that we can get this to work with Spotify?
The Following User Says Thank You to TheOrangeRemix For This Useful Post: [ View ] Gift TheOrangeRemix Ad-Free
15th March 2016, 07:53 PM |#4  
Account currently disabled
Flag Sydney
Thanks Meter: 971
 
More
Not working for me on Galaxy S2, CM13 and PowerAmp Pro, with your imported profile or entered manually. Wish it did!
16th March 2016, 02:48 AM |#5  
Member
Flag Friendswood
Thanks Meter: 17
 
More
Quote:
Originally Posted by TheOrangeRemix

Is there a way that we can get this to work with Spotify?

I too would like to know this information.
The Following User Says Thank You to TheGingerlyGamer For This Useful Post: [ View ] Gift TheGingerlyGamer Ad-Free
30th March 2016, 06:17 PM |#6  
Senior Member
Thanks Meter: 74
 
More
I just cant get this to work. All it does is literally say "%MTRACK" and "%MARTIST" .. it doesnt give the song info.

Im on 6.0 .. any help?
30th March 2016, 07:47 PM |#7  
Follow_and_Feel's Avatar
Senior Member
Flag Montabaur
Thanks Meter: 216
 
More
@MishaalRahman Are you sure that the variable "%MARTIST" is a tasker monitored Variable? It seems, that it's not a built-in variable, as I checked on this page. Additionally it doesn't work on my phone (%MTRACK is working fine though).

EDIT: And I can't import the project (it doesn't get recognized by tasker)
30th March 2016, 09:50 PM |#8  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 2,137
 
More
Quote:
Originally Posted by TheGingerlyGamer

I too would like to know this information.

Spotify won't work with this, but you can intercept the notification using AutoNotification or NotificationListener and have it read from there.

Quote:
Originally Posted by o0adam0o

I just cant get this to work. All it does is literally say "%MTRACK" and "%MARTIST" .. it doesnt give the song info.

Im on 6.0 .. any help?

It only works on certain music apps by default.

Quote:
Originally Posted by Follow_and_Feel

@MishaalRahman Are you sure that the variable "%MARTIST" is a tasker monitored Variable? It seems, that it's not a built-in variable, as I checked on this page. Additionally it doesn't work on my phone (%MTRACK is working fine though).

EDIT: And I can't import the project (it doesn't get recognized by tasker)

You might be right about that, %MARTIST works for me on Gonemad Music Player.
The Following User Says Thank You to MishaalRahman For This Useful Post: [ View ]
30th March 2016, 11:27 PM |#9  
Follow_and_Feel's Avatar
Senior Member
Flag Montabaur
Thanks Meter: 216
 
More
Quote:
Originally Posted by MishaalRahman


You might be right about that, %MARTIST works for me on Gonemad Music Player.

Yeah that's what I thought. Google Play Music doesn't deliver %MARTIST and it's no tasker built-in variable. I had a profile which reads aloud the track already. Thought it would be nice, if it read the artist, too. Unfortunately it doesn't seem to work for me, since I really want to stick to Play Music.
What a shame
31st March 2016, 10:51 PM |#10  
Senior Member
Thanks Meter: 74
 
More
Quote:
Originally Posted by Follow_and_Feel

Yeah that's what I thought. Google Play Music doesn't deliver %MARTIST and it's no tasker built-in variable. I had a profile which reads aloud the track already. Thought it would be nice, if it read the artist, too. Unfortunately it doesn't seem to work for me, since I really want to stick to Play Music.
What a shame

I got it to work with Play Music on Marshmallow.

Someone helped me with this:

"Those built-in variables don't function for all music apps and/or devices, OS, etc.
The best way to go about this is to use the plugin AutoNotification to pull the information directly from the notification in the status bar that displays it (assuming that when you're playing songs there's a notification up there showing Track/Artist).
You would use the Action AutoNotification > Query and specify Play Music as the app, then the track/artist should be available in the returned variables %antext or %antitle."
1st April 2016, 10:46 AM |#11  
Follow_and_Feel's Avatar
Senior Member
Flag Montabaur
Thanks Meter: 216
 
More
Quote:
Originally Posted by MishaalRahman

Spotify won't work with this, but you can intercept the notification using AutoNotification or NotificationListener and have it read from there.



It only works on certain music apps by default.



You might be right about that, %MARTIST works for me on Gonemad Music Player.

Quote:
Originally Posted by o0adam0o

I got it to work with Play Music on Marshmallow.

Someone helped me with this:

"Those built-in variables don't function for all music apps and/or devices, OS, etc.
The best way to go about this is to use the plugin AutoNotification to pull the information directly from the notification in the status bar that displays it (assuming that when you're playing songs there's a notification up there showing Track/Artist).
You would use the Action AutoNotification > Query and specify Play Music as the app, then the track/artist should be available in the returned variables %antext or %antitle."

That sounds good and I tried it, but unfortunately that's only a paid version feature. I don't know if I'm willing to pay, only that my script reads the artist, too. That seems to be a little exaggerated.
But thank you for the hint.

I will maybe consider trying this later this month and will report, if it works then

Cheers
Post Reply Subscribe to Thread

Tags
artist, music, read, tasker, track

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes