Need just a little bit of help here.

ColinWG

New member
I am fixing to do something really nasty to a Radioboss install in which the entire music library is going to end up being rebuilt.

I would really like to extract the mix / fade points from the datafile then be able to rebuild it on the fly as each song is updated.

Would it be possible to get the structure of the file and any quirks involved with handling the elements?
 
Mix, fade and other information is stored inside the music files in a special tag. So when you add the same music to a fresh RB installation, you'll have all this settings preserved.
 
It's not a new setup, it's like version 4 or something.

And I examined the tags after editing a couple and didn't find any new tags in the soup.

Wrote my own tag reader / editor, lets me see all the tags.

This version saves a corrupted ID3v2 (4.0) tag by the way.
 
What version are you using? 4.9.0.11 should save the correct tags.
The fade/mix and other info is saved in the APEv2 tag.
 
Didn't realize there was a flock of subversions.

4.0.2.441

Also, in reference to the corrupt headers. I'm reading the MP3 files with another program for insertion into a music log generation program. I've already gotten the system working fairly well, am generating 3 hour M3U playlists with music and traffic intergrated, am using a template to load each segment:
Code:
Const Template = "[event%EVENT%]
DateTime=%MS%/%DS%/%YR% %HRSE%
FileName=%PATH%%LYR%-%LML%-%LDL%-%HRNL%.m3u
TaskName=Load %LML%/%LDL% %HRNS%
UseDate=1
Immediately=0
Above=0
MuteLev=100
Days=1111111
DelPrev=1
Shuffle=0
Repeat=0
RepeatPeriod=1
RepeatCount=1
Enqueue=0
DelTask=0
DelTaskTime=%MS%/%DS%/%YR% 11:59:50 PM
DelTaskUseDate=1
"
And just filling in all the fields properly to ensure the system runs non-stop. Heck:
Code:
Function GenerateScheduleEvent(ThisDate As Date, LogDate As Date, LogHour As Long, ThisHour As Long, EventID As Long) As String
Dim Work As String
  Work = Template
  Work = Replace$(Work, "%EVENT%", Format$(EventID))
  Work = Replace$(Work, "%YR%", Format$(ThisDate, "yyyy"))
  Work = Replace$(Work, "%MS%", Format$(ThisDate, "m"))
  Work = Replace$(Work, "%ML%", Format$(ThisDate, "mm"))
  Work = Replace$(Work, "%DS%", Format$(ThisDate, "d"))
  Work = Replace$(Work, "%DL%", Format$(ThisDate, "dd"))

  Work = Replace$(Work, "%LYR%", Format$(LogDate, "yyyy"))
  Work = Replace$(Work, "%LML%", Format$(LogDate, "mm"))
  Work = Replace$(Work, "%LDL%", Format$(LogDate, "dd"))
  Work = Replace$(Work, "%HRNL%", Format$(LogHour, "00"))
  Work = Replace$(Work, "%HRNS%", Format$(TimeSerial(LogHour, 0, 0), "h AM/PM"))

  Work = Replace$(Work, "%HRSE%", Format$(TimeSerial(ThisHour, 59, 0), "h:mm:ss AM/PM"))
  Work = Replace$(Work, "%HRSK%", Format$(TimeSerial(ThisHour, 59, 50), "h:mm:ss AM/PM"))
  Work = Replace$(Work, "%PATH%", BossRealPlayListPath)

  Work = Replace$(Work, "|", vbCrLf)
  GenerateScheduleEvent = Work
End Function

And then it's just a matter of telnetting into the machine and loading the correct schedule, that's another story, ...

Onwards!

The ID3v2(4) tags.

In order for this to work smoothly, I need to read the lengths of the actual file on disk, then compute the EOM's (Mix Point), and feed that into the music log generator. To do this, I'm using MCI to load the file and then use several MCI functions to get the length:
Code:
Public Function GetPlayLength(FileName As String) As String
Dim Results As String, WrappedName As String
Dim cmdToDo As String * 255
Dim dwReturn As Long, Seconds As Long, Minutes As Long, Calculated As Date
Static LengthStr As String * 30, mSeconds As String

    WrappedName = Chr$(34) & FileName & Chr$(34)
    cmdToDo = "open " & WrappedName & " type MPEGVideo Alias mp3play"
    dwReturn = mciSendString(cmdToDo, 0&, 0&, 0&)
    mciSendString "set mp3play time format milliseconds", 0, 0, 0
    mciSendString "status mp3play length", LengthStr, Len(LengthStr), 0
    mSeconds = Mid$(LengthStr, 1, InStr(1, LengthStr, Chr$(0), vbBinaryCompare) - 1)
    Seconds = Round(Val(mSeconds) / 1000) ' Round(CInt(Mid$(l, 1, Len(l))) / 1000)
    If Seconds < 60 Then Results = "00:" & Format(Seconds, "00")
    If Seconds > 59 Then
        Minutes = Int(Seconds / 60)
        Seconds = Seconds - (Minutes * 60)
        Results = Format(Minutes, "00") & ":" & Format(Seconds, "00")
        Calculated = TimeSerial(0, Minutes, Seconds)
        Calculated = DateAdd("s", -5, Calculated)
        Results = Format$(Calculated, "nn:ss")
    End If
    mciSendString "stop mp3play", 0, 0, 0
    mciSendString "close mp3play", 0, 0, 0

  GetPlayLength = Results & ".0" & vbTab & mSeconds
End Function

And MCI don't like the tagging, it returns a length of 0:00 for the file.

Looking at the tagging:
Code:
Official: 10720 (BinHex Editor = 10713)
TIT2:??Gimme Some Lovin'
TPE1:??Blues Brothers
TALB:??Gold Disc 531 - 8001
TYER:??1980
TCON:??
TCOM:??
COMM:????

The Unicode is not bothering the MCI subsystem:
Code:
Official: 2038 (BinHex Editor = 2038)
TYER:??1980
TALB:??Gold Disc 5.31 - 8001
TPE1:??Blues Brothers
TIT2:??Gimme Some Lovin'
COMM:????5.31.01
The second tag was taken by copying the target file to another folder, then using winamp to retag it, I get the correct length from it. The tag that's saved by base.exe is setting the ID3 tag length wrong, if I decode it according to ID3's documentation, I'm getting the size as being 10,720 bytes long. Looking at it in a hex editor, the tag length (including padding) is only 10,713 bytes long. (For posting purposes, the <bh:00> was stripped from the strings.)

One of the other things that I am doing is replacing all the music on the system with higher quality audio, but I'm only including ID3v1 tags in the files. I already have a list of proper EOM's for the songs I'm converting, and from what I'm reading, your system uses the EOM independent of length, the EOM's going to be the same whether the actual song is 3 minutes or 4 minutes long.

And that brings up an interesting issue in that if I don't force a reset on the computer once a day, eventually, when it loads one of my M3U files, it speed skips through the songs, playing 1 frame, skipping several frames, sounds like someone holding down the fast forward on a CD player.
 
Version 4.0.2 if very old, it was released about 4 years ago and there were 9 major updates since then. I strongly suggest you updating to the latest version - I'm pretty sure it will resolve all the issues with tagging and playback.

Scheduler format (.sdl) is the same, so your scripts will work without modifications.
 
Back
Top