Poster | Thread |
1Mouse
|  |
Re: Hollywood Programming Project Posted on 13-Aug-2012 18:31:29
| | [ #41 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @djrikki
I'll look at it tomorrow, I've finished with my Sam440ep for the night.
Have settled in from of the TV with my laptop (Bring on the Amiga Netbook).
Thanks again for the assist. _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
1Mouse
|  |
Re: Hollywood Programming Project Posted on 13-Aug-2012 20:06:47
| | [ #42 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @djrikki
Just had a quick look, does it cater for all varients of the ID3 tag system?
I used FileX to open mp3 files to check the tagging and some of the artists say TPE1, some say TPE2 and some say TP1, have you taken these into account.
At present I'm using:
/*** ID3 tag reader*/ Function p_ReadSynchSafeInt(file) Local i = ReadInt(file) Return ((i & $7f) | ((i & $7f00) >> 1) | ((i & $7f0000) >> 2) | ((i & $7f000000) >> 3)) EndFunction
Function p_ReadTitle(f$) Local title$, album$, year$, genre$, language$, track$ = "n/a", "n/a", "n/a", "n/a", "n/a", "n/a" OpenFile(1, f$, #MODE_READ) If ReadString(1, 3) = "ID3" Seek(1, 10) While title$ = "n/a" Or artist$ = "n/a" Or album$ = "n/a" Or year$ = "n/a" Or genre$ = "n/a" Or language$ = "n/a" Or track$ = "n/a" Local tag$ = ReadString(1, 4) Local framelen = p_ReadSynchSafeInt(1) Seek(1, FilePos(1) + 2) ; skip flags /*** Get v2 Tags*/ If tag$ = "TIT2" Seek(1, FilePos(1) + 1) ; skip encoding title$ = ReadString(1, framelen - 1) title2$ = title$ CreateTextObject(6, title$) ElseIf tag$ = "TPE1" Seek(1, FilePos(1) + 1) ; skip encoding artist$ = ReadString(1, framelen - 1) artist2$ = artist$ CreateTextObject(7, artist$) ElseIf tag$ = "TALB" Seek(1, FilePos(1) + 1) ; skip encoding album$ = ReadString(1, framelen - 1) album2$ = album$ CreateTextObject(8, album$) ElseIf tag$ = "TYER" Seek(1, FilePos(1) + 1) ; skip encoding year$ = ReadString(1, framelen - 1) year2$ = year$ CreateTextObject(9, year$) ElseIf tag$ = "TCON" Seek(1, FilePos(1) + 1) ; skip encoding genre$ = ReadString(1, framelen - 1) genre2$ = genre$ CreateTextObject(10, genre$) ElseIf tag$ = "COMM" Seek(1, FilePos(1) + 1) ; skip encoding language$ = ReadString(1, framelen - 1) language2$ = language$ CreateTextObject(11, language$) ElseIf tag$ = "TRCK" Seek(1, FilePos(1) + 1) ; skip encoding track$ = ReadString(1, framelen - 1) track2$ = track$ CreateTextObject(12, track$) ElseIf StrLen(tag$) = 0 Break Else Seek(1, FilePos(1) + framelen) EndIf Wend Else /*** Get v1 Tags*/ Seek(1, FileSize(f$) - 128) If ReadString(1, 3) = "TAG" title$ = TrimStr(ReadString(1, 30), "\0", True) author$ = TrimStr(ReadString(1, 30), "\0", True) EndIf EndIf CloseFile(1) If title$ "n/a" And author$ "n/a" Return(author$ .. " - " .. title$) Else Return("n/a") EndIf EndFunction
But this can't cater for the ID3 tag varients either. _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
djrikki
 |  |
Re: Hollywood Programming Project Posted on 13-Aug-2012 21:28:15
| | [ #43 ] |
|
|
 |
Elite Member  |
Joined: 22-Jun-2010 Posts: 2077
From: Grimsby, UK | | |
|
| @1Mouse
Just tested it against music purchased from the iTunes Store. I also imported my vast CD collection into iTunes and all appears okay.
All tags regardless of ID version can be read via that python script and modules if you really need to provide better compatibility. The approach you take in reading the tags is up to you. Last edited by djrikki on 13-Aug-2012 at 09:29 PM.
_________________
|
|
Status: Offline |
|
|
1Mouse
|  |
Re: Hollywood Programming Project Posted on 22-Sep-2012 12:07:31
| | [ #44 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @djrikki
I've checked the python scripts but have no knowledge of how to incorporate them into my Hollywood program.
Are there Hollywood equivalants of these Python scripts?
This program I'm writing is driving me insane, am close to giving in, so much rubbish going on at home don't need 1 more thing to stress me out. _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
Hypex
 |  |
Re: Hollywood Programming Project Posted on 23-Sep-2012 14:52:49
| | [ #45 ] |
|
|
 |
Elite Member  |
Joined: 6-May-2007 Posts: 11351
From: Greensborough, Australia | | |
|
| @1Mouse
Quote:
/*** ID3 tag reader*/Function p_ReadSynchSafeInt(file)Local i = ReadInt(file)Return ((i & $7f) | ((i & $7f00) >> 1) | ((i & $7f0000) >> 2) | ((i & $7f000000) >> 3))EndFunction
|
I don't know Hollywood but why does it look like you are masking and shifting right? It looks like you are masking bytes and then shifting bits in the wrong direction!. It doesn't make sense!
For example if you did the above operation to the number $12345678 it would end up turning into $24d2b34! 
Does Hollywood allow masking of bits but can only shift in bytes? Seems strange! I don''t understand what it's trying to do. Why isn't it just reading a long word and returning that? What is the point of it? 
|
|
Status: Offline |
|
|
Hypex
 |  |
Re: Hollywood Programming Project Posted on 28-Sep-2012 8:51:27
| | [ #46 ] |
|
|
 |
Elite Member  |
Joined: 6-May-2007 Posts: 11351
From: Greensborough, Australia | | |
|
| @All
Okay looked it up, looks like ID3 is is encoded to be compatible with 7-bit ASCII. It dumps each MSB in each byte of a 32-bit word and then strings it together to form a 28-but word somewhat. Seems a lot of work!
It also looks big endian which you don't see a lot these days unless I misread it.
Okay so what problems are you facing with the program now?  Last edited by Hypex on 28-Sep-2012 at 10:32 AM.
|
|
Status: Offline |
|
|
djrikki
 |  |
Re: Hollywood Programming Project Posted on 28-Sep-2012 9:48:13
| | [ #47 ] |
|
|
 |
Elite Member  |
Joined: 22-Jun-2010 Posts: 2077
From: Grimsby, UK | | |
|
| @1mouse
Seems I have my wires crossed, Jack doesn't read ID3 Tag information, because it doesn't need to. It only needs to write ID3 Tag inforomation, 'tag' information is read directly from the iTunes library at present. _________________
|
|
Status: Offline |
|
|
1Mouse
|  |
Re: Hollywood Programming Project Posted on 28-Sep-2012 9:55:51
| | [ #48 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @Hypex
At present my software is able to read certain mp3 files, however my software is lacking:
Playlist support (the ability to open more than 1 mp3 at a time and display the tracks loaded)
Proper ID3 tag reading (only reads v3 at the moment)
The loading of coverart from the same folder the music is saved in (music is organised like iTunes: artist folder with album folders inside and within each album folder are the tracks and coverart)
All assistance greatly appreciated _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
1Mouse
|  |
Re: Hollywood Programming Project Posted on 9-Mar-2017 20:03:46
| | [ #49 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @all
After some time away from Hollywood and even my Sam440 I have returned to my InTune program.
I posted on my blog https://blitterwolf.blogspot.co.uk/2017/03/intune-recap.html to show people where I had got to.
I have moved on a little since the last post here.
I now have a playlist thanks to MUIRoyale.
Still can't read the artwork from the same folder as the track and I get an error, still, when there is no metadata in part of the ID3tag. _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
1Mouse
|  |
Re: Hollywood Programming Project Posted on 9-May-2025 17:23:56
| | [ #50 ] |
|
|
 |
Super Member  |
Joined: 23-Jun-2005 Posts: 1357
From: Bradford, West Yorkshire | | |
|
| @all
I know it's been 8 years since I looked at this and realised I would like a playlist lister within the inTune window and wondered if this was possible within Hollywood and not need MUIRoyal.
Still can't get artwork support and ID3 tags are still a nightmare.
I jst feel, like I could quite easily give it up for good and I'm too stubborn for that.
Help from anyone would be greatly appreciated.
Thanks all/anyone _________________ 1 AmigaOne G4XE (OS4 Pre-Release Update4) Minimig Sam440ep + OS4.1FE Sam460cr + OS4.1FE |
|
Status: Offline |
|
|
plouf
|  |
Re: Hollywood Programming Project Posted on 12-May-2025 20:05:00
| | [ #51 ] |
|
|
 |
New Member |
Joined: 1-Apr-2009 Posts: 2
From: Unknown | | |
|
| @1Mouse
what your problem exaclty ?
you have already done some work AFAIK in hollywoodforum. but seems you dont work too deep..
id3tag is about processign files... have to create a parser your self:)
another idea, maybe the best is your case. is to use another external tool that can read and extract id3tag for you
for example -> "ffmpeg -i mp3file.mp3 >ram:t/export.txt" will create a text in ram with many info about mp3 including all id3tags :) you have to proccess this for each file ![quote]
|
|
Status: Offline |
|
|