MP3 help please!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 8
- Joined: Thu Feb 01, 2007 3:36 am
MP3 help please!
I'm a bit frustrated by this, it seems so simple but won't work. I'm pointing my stack to my iTunes music Library which is all in Mp3 format. This is what happens:
If I create a new player and try to manually link it to an MP3 file using the Inspector… the MP3 files are dimmed out. I activate the 'all filetypes' option in the Open dialog and presto, the MP3 shows up, gets put into the filenames property of player "fred", and a start player "fred" works fine, the music plays.
However, if I try to do the same thing by script, it DOESN'T work, it blanks out the player and returns a "could not open movie file" error. I presume this is because without my manual intervention of turning on the "all filetypes" option, it doesn't recognise the file as a QT valid movie.
There MUST be a simple way around this, SURELY all of you have done simple MP3 players...? Please, I haven't got much hair left, I don't want to lose the rest of it...
If I create a new player and try to manually link it to an MP3 file using the Inspector… the MP3 files are dimmed out. I activate the 'all filetypes' option in the Open dialog and presto, the MP3 shows up, gets put into the filenames property of player "fred", and a start player "fred" works fine, the music plays.
However, if I try to do the same thing by script, it DOESN'T work, it blanks out the player and returns a "could not open movie file" error. I presume this is because without my manual intervention of turning on the "all filetypes" option, it doesn't recognise the file as a QT valid movie.
There MUST be a simple way around this, SURELY all of you have done simple MP3 players...? Please, I haven't got much hair left, I don't want to lose the rest of it...
Hi Rick,
hmmmm, setting the filename of a player to a MP3 files works without problem, so something else must go wrong here.
Afer setting the filenmae you get "could not open movie file" in the result?
Can you open that file with QuickTime Player?
What exactly is in your script, could you post it please?
Regards
Klaus
hmmmm, setting the filename of a player to a MP3 files works without problem, so something else must go wrong here.
Afer setting the filenmae you get "could not open movie file" in the result?
Can you open that file with QuickTime Player?
What exactly is in your script, could you post it please?
Regards
Klaus
Hi Rick ~
I have no problems with this in OS X. Perhaps it's a file path problem?
If you manually link the file to the player, then copy the file path directly from the players filename property... stick it in a button with a script... for example:
... then, click the button to set the player to the path via script. Does that work?
Lynn P.
I have no problems with this in OS X. Perhaps it's a file path problem?
If you manually link the file to the player, then copy the file path directly from the players filename property... stick it in a button with a script... for example:
Code: Select all
on mouseUp
set the filename of player "myMp3Player" to "/Users/Rick/Music/iTunes/mySong.mp3" -- or whatever your particular path is
end mouseUp
Lynn P.
-
- Posts: 8
- Joined: Thu Feb 01, 2007 3:36 am
-- Script of cd fld "songs"
on mousedown
put word 2 of the clickline into tmp
put cd fld "albumpath" & "/" & line tmp of cd fld "songs" into songname
set the filename of player "fred" to songname
set the currentTime of player "fred" to zero
start player "fred"
end mousedown
"songname" after clicking on a song evaluates to:
/Volumes/MiniMax/•Main Music Library/iTunes/iTunes Music/Bob Dylan/02 Pledging My Time.mp3
If you drag a new Player from the toolbox and paste that path into its filename property in the Inspector, it works. But if you click on a new song (thus generating a new filename using the above script) the Player changes to a clear box as shown in the screensnap, and nothing happens. Issue a start player "fred" command via the msgbox and you get the error shown. Drag a new Player out and it is a clear box still. BTW I'm using Rev 2.6.1
[/img]
on mousedown
put word 2 of the clickline into tmp
put cd fld "albumpath" & "/" & line tmp of cd fld "songs" into songname
set the filename of player "fred" to songname
set the currentTime of player "fred" to zero
start player "fred"
end mousedown
"songname" after clicking on a song evaluates to:
/Volumes/MiniMax/•Main Music Library/iTunes/iTunes Music/Bob Dylan/02 Pledging My Time.mp3
If you drag a new Player from the toolbox and paste that path into its filename property in the Inspector, it works. But if you click on a new song (thus generating a new filename using the above script) the Player changes to a clear box as shown in the screensnap, and nothing happens. Issue a start player "fred" command via the msgbox and you get the error shown. Drag a new Player out and it is a clear box still. BTW I'm using Rev 2.6.1
![Image](http://www.genevainc.com.au/rick/pic1.png)
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
rev 2.6.1 has problems with "special" characters in filepaths. try to use a path with only ascii chars and numbers, will it work then?
There was some workaround for players, but none of them worked reliably in my experience.
I think this only got fixed in 2.8.1.
There was some workaround for players, but none of them worked reliably in my experience.
I think this only got fixed in 2.8.1.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Posts: 8
- Joined: Thu Feb 01, 2007 3:36 am
The problem is now solved. It wasn't the special characters in the filepath, it was the fact that iTunes has all the songs from a particular album in a folder of that name inside the folder I was looking in. Duh, my mistake entirely... I was missing one whole element of the filepath in my Open command. Thanks for your help.
-
- VIP Livecode Opensource Backer
- Posts: 149
- Joined: Thu Feb 23, 2006 8:49 pm
- Location: Bethel Park, Pittsbrugh, Pennsylvania USA
- Contact:
FWIW, You can use my free iTunes Library Suite to clean up your iTunes library from within Revolution!!!
It is located here and did I mention it is free to Revolution users.
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net
iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html
It is located here and did I mention it is free to Revolution users.
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net
iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net
Lazy River Software
3mcgrath@comcast.net