Is there a way to link an MP3 file to a JPG file ??

Discuss and share scripts and script files...
panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

I have various MP3 (music) files in a directory, and have words to each of them in JPG (picture) format in another directory.
Is there a way to associate the two files to have XY automatically open the JPG file when the MP3 file plays?

They are in JPG format since there are words and music together that I scanned, and each MP3 music file has a different JPG associated with it of course.
IfranView is my default picture viewer.

Thanks for any help. This would be VERY helpful if it is possible.

Panflute

(BTW XY is the ONLY music player I have found that will show a directory in LIST view and play the music)

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Is there a way to link an MP3 file to a JPG file ??

Post by Stefan »

Hi panflute, welcome.

Such things could be managed to do with an XYplorer script.

If you would provide a few examples i am sure someone will help you.

a) 5 examples of your folder structure for mp3 and jpg
b) 5 examples of your mp3/jpg file names
c) how would you pick up an jpg for an mp3? Are there common parts in the file name?
d) will you take care that the relationship between paths and file names
will never change and be always as your examples?


.

panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Re: Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

Thanks for your reply Stephan !

If you could provide me with an example script and tell me how to link the script to a particular MP3 file I may be able to edit the script and figure out the rest....hopefully.

Yes there are common files names (but not always exact) For instance:

1. c:\1mp3\Girl In The Red Dress.mp3 ----> c:\1music\Girl In The Red Dress.jpg
2. c:\1mp3\Cinema Paradiso.mp3 ----> C:\1music\Cinema Paradiso 2.jpg
3. c:\1mp3\classical\Fratelli Chase.mp3 ----> c:\1music\classical\Fratelli Chase 4.jpg
4. c:\1mp3\Gabriel's Oboe 4c.mp3 ----> c:\1music\Gabriel's Oboe.jpg

I have XY set to play the MP3 file when I hit the space bar and to stop at the end. Then I select the next song I want to play and hit the spacebar.
I can change XY to aumatically play the file if needed. Sometimes I keep multiple instances of XY open to quickly go from one song to the next.
So in order for this to work, each MP3 needs to be associated with a particular JPG file.
The directories and locations of files never change.

I am a musician and want to use this on my gigs. If the music could open automatically that would make my job much easier rather than having to search and separately open each piece of music.

I hope I am being clear....

Thanks again for any help-
Panflute








Stefan wrote:Hi panflute, welcome.

Such things could be managed to do with an XYplorer script.

If you would provide a few examples i am sure someone will help you.

a) 5 examples of your folder structure for mp3 and jpg
b) 5 examples of your mp3/jpg file names
c) how would you pick up an jpg for an mp3? Are there common parts in the file name?
d) will you take care that the relationship between paths and file names
will never change and be always as your examples?


.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Is there a way to link an MP3 file to a JPG file ??

Post by j_c_hallgren »

panflute wrote:Yes there are common files names (but not always exact) For instance:
Hi and welcome to the XY forums from myself also!

But to make it easier, the names could be kept in sync except for extension, right? Or is there some reason why they would differ other than unintended?

BTW, quoting the entire prior post at bottom just makes for a longer post that one has to skip over...and all those extra blank lines didn't help...just something to consider in future.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Re: Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

Yes, I could change the names to be exact except for the extension, that would not be a problem, however, I would like to keep the MP3s and JPGs in separate directories. Thanks.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

panflute wrote:Yes, I could change the names to be exact except for the extension, that would not be a problem, however, I would like to keep the MP3s and JPGs in separate directories. Thanks.
if i understand correctly, when you press space bar to preview mp3 file you want a jpg to open in irfanview, right?
I was sure this is possible until found that one command (sendkeys "{Space}") does not work for some reason. If this worked then your problem is solved perfectly. Is it possible that you want to open mp3 in one app and corresponding jpg in irfanview with one key stroke?
Seems like you want to control audio within XY and open jpg in irfanview, right?

panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Re: Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

Seems like you want to control audio within XY and open jpg in irfanview, right?


Yes that is correct, Irfranview is my default viewer, and it works well for me.

It would save a lot of work if i did not have to open up the JPG manually each time I select another song.

I will use this "live" on my music job, and the faster i can go from one song to the next without searching and opening the corresponding JPG the better.
Last edited by panflute on 28 Sep 2009 02:19, edited 1 time in total.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

panflute wrote:Seems like you want to control audio within XY and open jpg in irfanview, right?


Yes that is correct, but I would like the jpg to open automatically....
It would save a lot of work if i did not have to open up the JPG manually each time I play another song.
OK, actually it could be done. But I am hoping to get an answer from admin (aka Don) regarding a command which does not seem to work right now. If that command works then your wish might come true. Basically, this is howit will work:

1) you go to a song and hit a key (customizable).
2) the song will play.
3) simultaneously a related jpg from another directory will open in irfanview.

panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Re: Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

YES...that is exactly how I would like it to work if possible.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

panflute wrote:YES...that is exactly how I would like it to work if possible.
If you dont care too much then it will already work now, but like this;

1) you go to a song and hit a key.
2) song will play in your default player (instead of XY).
3) jpg will open in irfanview.

panflute
Posts: 6
Joined: 27 Sep 2009 19:55

Re: Is there a way to link an MP3 file to a JPG file ??

Post by panflute »

If you dont care too much then it will already work now, but like this;


NO GOOD Serendipity....going to an external MP3 player defeats the whole purpose of making things easier for me.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

panflute wrote:If you dont care too much then it will already work now, but like this;


NO GOOD Serendipity....going to an external MP3 player defeats the whole purpose of making things easier for me.
Yup, understood. :)

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

panflute wrote:(BTW XY is the ONLY music player I have found that will show a directory in LIST view and play the music)
This is interesting, XY is not a music player. The audio playback is for previewing purposes, but glad it fits your needs.

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Is there a way to link an MP3 file to a JPG file ??

Post by admin »

Hi,

Two things

1) In a later version a plan freely assignable thumbnails: you pick any picture file to be the thumbnail of the current file. For you this means you could assign your lyrics images as thumbnails and show them (zoomed) while the music is playing.

2) You OCR scan your lyrics and paste the texts in the Comment field of the MP3.

Don

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Is there a way to link an MP3 file to a JPG file ??

Post by serendipity »

@Don: Why doesn't this work?

Code: Select all

    focus;
    sendkeys "{space}";

Post Reply