Jump to content

Avatar

[PS3] Current situation with loop-ending affected songs


  • Please log in to reply
13 replies to this topic

#1 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted June 16, 2019 - 10:18 AM

Sorry if this is already discussed somewhere... I was able to find an old thread not exclusively on this issue but on generally problematic songs in PS3, but the thread has been inactive for many years, so I wanted to check if the situation has somehow changed.

 

So there are various songs in our databases which have the "loop-ending" problem when converted to PS3. If I understood correctly, this problem has to do with the audio file encryption, and was caused by a bug in a certain version of Magma, which was eventually fixed.

 

Question 1: Does it mean that all customs compiled with the latest version of Magma should be free of this problem?

 

There are two options in the latest version of C3 CON Tools that should fix this problem: one option is to activate the checkbox to "fix loop-ending while converting", and the other option from the menus is to fix a single selected mogg file.

 

Question 2: Are the two options equivalent? 

 

If that's the case, when one of the two doesn't solve the problem, it is then pointless to try the other.

 

Question 3: Do you need to replace only the mogg file after using either option?

 

At first sight, it seems to me that the metadata in songs.dta is not changed at all, but I am not sure.

 

Question 4: If I use one of the two options on songs that do NOT have the loop-ending problem, do I cause damage on those songs?

 

I know that it sounds pointless to apply the fix to a song that doesn't need it... here I am just thinking that, if it is harmless to those, I could leave the "fix while converting option" activated at all times, so that I can convert songs in large batches without worrying if some of them have the loop-ending issue.

 

---

 

Finally, as it seems to me that not every custom is successfully fixed by the options in C3 CON Tools, I was wondering if there is some other way to fix them by ourselves, without asking the original author to do any work. Since the issue is apparently caused by an older version of Magma, here's the last question:

 

Question 5: Is it possible to open the loop-ending custom in the latest version of Magma and re-build it?

 

Forgive my ignorance on this one... I am still largely unfamiliar with how Magma works!

 

Thanks!!!



#2 TrojanNemo

TrojanNemo

    The Programmer

  • 4,926 posts
  • Location
    Miami, Florida

Posted June 16, 2019 - 03:22 PM

1) should but from what I hear, they are not all fixed

2) yes, it's the exact same process

3) correct

4) considering I was trying whatever I could to fix the issue, maybe? I would guess not

5) not if the audio is encrypted



#3 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted June 17, 2019 - 10:12 AM

Thanks for the clarifications!

 

On second thoughts, if some customs are still coming out from the latest Magma with the loop-ending problem and some customs are not fixed by the C3 CON Tools functionality, then it's possible that they are actually the same customs, and therefore even if unencrypted it would not help to re-build them.

 

Perhaps I will open a different thread to keep a list of which customs have such problem, and mark those that are fixable in C3 CON Tools, it would be probably useful to share this knowledge in a single place that is easy to check for everyone. So far I have encountered only two, "Tears for Fears - Sowing the Seeds of Love" (fixable) and "The Beatles - Let it Be" (non-fixable).



#4 murlatok

murlatok
  • 175 posts
  • Location
    Minsk

Posted June 17, 2019 - 01:49 PM

Just posting these with the same problem:

 

Creedence Clearwater Revival - Commotion

Dire Straits - Money for Nothing

Halestorm - Love Bites (So Do I)

Linkin Park - The Messenger

The Turtles - Happy Together

Trapt - Headstrong

 

These are the ones i've encountered so far



#5 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 1, 2019 - 08:16 PM

Here's my updated list:

 

Tears for Fears - Sowing the Seeds of Love (fixable)
Tears for Fears - Mad World (fixable)

Dire Straits - Money for Nothing (fixable)
The Beatles - Let it Be (non-fixable)
The Beatles - Help! (non-fixable)

The Beatles - Yesterday (non-fixable)

The Beatles - All my Loving (non-fixable)

The Beatles - Blackbird (non-fixable)

I then had a little WTF? moment when I checked these three with C3 audio analyzer, before and after applying the fix...

For some reason, when applying the fix the C3 ps3 converter has ADDED 5 SECONDS* at the end of the Sowing the Seeds of Love audio file (and the fix works). However it does NOT add those 5 seconds to Help or Let it Be (which still don't work).

*I guess not really added any bytes to the file itself but increased the length value embedded in the file? Either way, the result is that the audio length matches with the song length in DTA

What's even more strange, the 5 seconds are added only if I choose "fix while converting", but not if I choose the standalone "fix mogg" functionality. This is odd since both are running the same code function.

---

I also compared the length of the audio with the length of the midi (using song analyzer) and also with the "song length" in the DTA.

ALL the 3 songs with loop ending problem have midi length > audio length. However this is inconclusive because I have found 2 other songs (e.g. Bruce Springsteen - Born in the USA) with the same, but without the loop ending problem. Still it was interesting to note that almost all songs that work for me (about 100) have midi length < audio length.

I don't know if the problem is caused by audio being shorter than midi (perhaps the midi "song end" event is beyond the end of the audio?) or by audio being shorter than song length in DTA (does that value itself depend on the midi?).

I looked into the code and expected to see it to add enough blank to the end of the audio to match the length difference... instead it adds the "remainder" of division by 8 of such difference. Sounds a bit like trying to have an integer number of bytes, but then I am surprised it ended up adding 5 whole seconds.



#6 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 3, 2019 - 02:36 PM

Dire Straits - Money for Nothing


@murlatok you may want to give this song another try because for me IT WORKS after applying the fix.

Just make sure you fix it when converting the CON to PS3 (select the "fix while converting" option from the menu). For some reason, the other way (choosing "fix mogg" on the standalone file) didnt work for me.

#7 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 3, 2019 - 02:40 PM

Does anyone know what is the function of the "song length" value in DTA?

I was hoping that it is used to stop the playback, so I tried to manually change it to a value shorter than the audio file length. It didn't help, but it was a very small hope.

On the other hand, since it's in the metadata file I really thought it would be used for the length to DISPLAY in the songs selection view of the game. But it didn't change that either :/

#8 Alternity

Alternity
  • 963 posts

Posted July 3, 2019 - 02:45 PM

I'm pretty sure it's just to show the song lenght when you select "More Info" (Or whatever its called) on a song. IIRC on PS3 it's the triangle button.

The thing that stops the playback of a song is the [end] event in the midi file.



#9 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 3, 2019 - 04:57 PM

I'm pretty sure it's just to show the song lenght when you select "More Info" (Or whatever its called) on a song. IIRC on PS3 it's the triangle button.

The thing that stops the playback of a song is the [end] event in the midi file.


Yeah I was thinking the same... and the loop ending happens probably because the audio file ends before the end event.

#10 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 3, 2019 - 07:13 PM

 

5) not if the audio is encrypted

 

Damn... I suppose all the TBRB songs have in fact the audio encrypted? After I started seeing the first couple of Beatles songs looping and not being fixed by the converter, I went to check a dozen TBRB songs (not listed here since they're not on C3 db) and they all seem to have the same problem so far, and none of them gets fixed by the tool :(



#11 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 5, 2019 - 09:55 AM

I tried to fix the problem by modifying the MIDI file. It didn't work, but I would like to hear some opinions from the experts...

 

Basically I did the following, using "Help!" as a test custom:

 

- extracted the MIDI file using C3 Tools

- opened the MIDI file in Reaper (into an empty project), choosing to keep the 12 tracks separate and merge tempo map

- anticipated the [end] event in EVENTS track by a small margin, from 57.4.99 to 57.4.49 *

- also anticipated other events which were at the same point in other tracks: [idle_realtime] in all instruments tracks and [ProFilm_a.pp] in VENUE track **

- exported the MIDI file, choosing to consolidate all, and keeping it multitrack

- encrypted the MIDI file in PS3 Converter using the "encrypt replacement MIDI" functionality

- replaced the old MIDI file with the new one in the song folder

 

Couple of longer notes:

 

* the song analyzer told me that the audio length was 140,67 and the midi length 140,718; my idea was to try and change the MIDI so that it ends before the end of the audio (as it does in all songs which don't loop), so by anticipating [end] by half a quarter, the MIDI length as shown by the analyzer is shortened to 140,399 < 140,67

 

** to my understanding, the MIDI file should never have events beyond [end], that's why I anticipated those other events

 

Well eventually this idea didn't really work because the song still gets stuck at the end.

 

I wonder if I should try to really shorten the MIDI by also cutting the actual tracks length as indicated by "All Notes Off" in Reaper? Or perhaps this is all useless, and the problem can't be solved by simply trying to exit earlier?



#12 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 5, 2019 - 10:57 AM

Ehm... I have to amend my previous post: IT WORKS!

 

Looking around for clues in RBN documentation, I noticed that there is a remark about the last BEAT track event which must be exactly 1 quarter before the [end] event. When I anticipated the [end], I did so by half a quarter. So I went back and anticipated it a whole quarter, and removed the last event in BEAT. And now the song exits properly at the end :)

 

I hope this is going to be useful to other people, because we now have a course of action that allows us to FIX the issue, hopefully in every song (but there might be exceptions), without having to ask from the original authors:

 

Method 1) Always try to fix looping songs directly in PS3 Converter first. Do so by checking the menu option "fix loop while converting" (do not trust the stand-alone "fix mogg that loops" because at least for me it has not worked once). You can check that the audio was fixed by using the Song Analyzer before and after applying the fix: the audio length should be longer after the fix, and it should actually look the same as the song length in DTA.

 

Method 2) If the converter doesn't fix it, check if the audio is not encrypted. In this case, just open up the CON in Magma, and build it again.

 

Method 3) If Magma doesn't fix it, or cannot fix it because the audio is encrypted, check if the custom is single-track. In this case, you can extract the audio using the Phase Shift converter, then re-build in Magma using the extracted audio instead of the encrypted one. This method works also for multitrack customs but you will lose the multitracks.

 

Method 4) If previous methods don't work, or if don't want to lose the multitracks, follow my instructions in my previous post, but also check the BEAT track for consistency as I mention here above.

 

I am quite sure sometimes the last method may fail, but at least Method 3 should always work, in the worst case you'll lose the multitracks.



#13 TrojanNemo

TrojanNemo

    The Programmer

  • 4,926 posts
  • Location
    Miami, Florida

Posted July 6, 2019 - 02:45 PM

Good job in figuring it out.

 

One thing - "anticipated" doesn't mean what you think it means.



#14 Shroud

Shroud
  • 88 posts
  • Location
    EU

Posted July 6, 2019 - 07:29 PM

Thanks TrojanNemo.

Indeed there are still a lot of things I don't understand.

One of the looping songs I've been fixing at MIDI level gave me the "unable to load, skipping" error after modifying the midi. Having read that this error is mostly caused by encryption but having always used Type 3 (both before and after the fix), I thought that probably I just touched the wrong things in the midi...

However I also knew that the skipping error could happen in case of a file naming issue. I recalled that after modifying the midi I had saved it with the wrong name, but I was sure I had then renamed it properly.

Then it occurred to me... I had fixed the name AFTER re-encrypting the midi. Could it be that the encryption process depends on the filename (at the time of encryption)?

So I went back to my modified midi, renamed it first, re-encrypted again, copied to PS3 and... BAM! everything works :D

This was quite baffling and I wouldn't bet this was really the reason, maybe it was just a glitch in re-encryption, but the moral of the story is: make sure you have the correct name before encrypting files ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users