Jump to content
C3 Forums

[PS3] Current situation with loop-ending affected songs

Recommended Posts

[uPDATE: list of possible solutions on post #12]

[uPDATE: some fixed midi files attached to list on post #5]


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!



Link to post
Share on other sites

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).

Link to post
Share on other sites

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

Link to post
Share on other sites
  • 2 weeks later...

Here's my list (updated on 2020_09_14):


Tears for Fears - Sowing the Seeds of Love (fixable in C3 CON Tools)

Tears for Fears - Mad World (fixable in C3 CON Tools)

Dire Straits - Money for Nothing (fixable in C3 CON Tools)

Michael Jackson - Billy Jean (fixable in C3 CON Tools)

Queen - It's a Hard Life (fixable in C3 CON Tools)

Queen - Liar (fixable in C3 CON Tools)

Queen - Sweet Lady (fixable in C3 CON Tools)

Madonna - Material Girl (fixable in C3 CON Tools)

The Beatles - Let it Be (requires manual fix) -> fixed midi available

The Beatles - Help! (requires manual fix) -> fixed midi available

The Beatles - The Word (requires manual fix) -> fixed midi available

The Beatles - Yesterday (requires manual fix)

The Beatles - All my Loving (requires manual fix)

The Beatles - Blackbird (requires manual fix)

The Beatles - If I Needed Someone (requires manual fix) -> fixed midi available

The Beatles - Maxwell's Silver Hammer (requires manual fix) -> fixed midi available

The Beatles - Hey Bulldog (requires manual fix) -> fixed midi available

Eurythmics - Would I Lie to You? (requires manual fix)

The Rocky Horror Picture Show - Time Warp (requires manual fix) -> fixed midi available

Led Zeppelin - Stairway to Heaven (requires manual fix) -> fixed midi available



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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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 :/

Link to post
Share on other sites

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.

Link to post
Share on other sites


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 :(

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

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 ;)

Link to post
Share on other sites
  • 1 month later...

Just a small addition...


I recommend NOT to activate the "fix mogg while merging" option unless you already know that the custom you are merging is actually affected by the loop ending problem.


Today I was adding a batch of 20 customs, and since they included several Beatles (like those which previously gave me a loop ending) I thought I would save time by keeping the "fix while merging" option on for the whole batch. The result was 4 customs out of 20 looping, but then I checked the details and noticed that the fix had somehow cut the audio files a bit. So I replaced their moggs with new ones converted WITHOUT the fix, and they did not loop anymore. Apparently they were not troublesome customs since the start but they had become so after an unnecessary fix.


So it might be best after all to always convert customs normally, and only after you see them looping in game start applying any of the methods above ;)

Link to post
Share on other sites
  • 2 months later...

Finally got the chance to test applying fixes to troubled songs i posted earlier:

'fix while converting' helped with these songs:

Dire Straits - Money for Nothing

Halestorm - Love Bites (So Do I)

However these songs retained the same issue with the loop-ending:

Creedence Clearwater Revival - Commotion

Linkin Park - The Messenger

The Turtles - Happy Together

Trapt - Headstrong

Link to post
Share on other sites

Yeah as I wrote, some songs stubbornly resist the fixing procedure of C3 CON Tools :)


I will update the list when I find more of them so that other people know to expect, for example recently I had to manually fix Time Warp.


There's a chance even the manual fix might not work for some customs, but so far it did.

Link to post
Share on other sites
  • 2 weeks later...

Hello all. This information is for PS3 and the s/w is on the windows side.

Here is my list of Beatles songs that exhibited the loop-ending issue. Along with their midi and song lengths and the [end] event setting I used. I apologize that all of this info is not available for all the songs. I was part way through when I realized that I should be writing stuff down, but it was too late. Once you encrypt the midi, you cannot look at it again.

Thanks to BornGamerRob for his post on extracting the midi from a con file. Many thanks to Shroud who I have been PMing so I didn't look more of a fool than I am(better to be quiet and thought a fool than open your mouth and remove all doubt-Twain or Lincoln I think).


I did try method 1 from post 12 above on all of these, but it did not fix any of them. I tried the 'fix mogg that loops' on a couple but no dice.


My procedure is:

Open C3ConTools

Click 'Song Analyzer'. This opens a new window, click 'File', 'Open song file' and then navigate if needed to your song directory. If you left everything as the default setup, just have your problem cons in the CONS directory. Click the song you want and then 'Open'. You will get a nice window that will show all sorts of info about the midi file. The one we need is the Midi length in seconds, near the top and the audio length in seconds near the bottom.


Nearly all the songs with problems have the midi length greater than the audio length(and even now I am not sure if this audio length is the actual length of the audio of the mogg file).


Then we drag the con file onto a blank area(other areas may work) of the C3ConTools window. Another window will open. Click the MIDI button and this will extract the midi from the con file and place it onto the Clipboard. You can then click on your destination folder and do a Paste. Do not close the other window or this will not work. You can close it after the Paste.


Start Reaper(YMMV but I kept reaper in the same Customs folder I installed everything into. I found this easier for moving files around and keeping track of the updates. Reaper then just uses the same con directory as the tools). You do not use a template or project for this process.


Click on Insert and then Media File at the top and then navigate to your directory and choose the mid file you want to use. You will get a Dialog box open for Import Options. Expand Tracks and Merge Source Tempo should both be checked and hit OK.

You may or may not get additional Dialog Boxes to choose Import 2-Channel MIDI as Multichannel on a single track. This did not occur all the time. I guess if I unchecked the Always prompt box, it would go away(a Reaper genius I am NOT).


If you double click the Event Track(and sometimes just a single click would work on some songs), you should get a window at the bottom below the one with the tracks. If you click one of the indexes, you will see the line on the upper window move to that position. At the bottom of the list is an index with a Text Event with a Parameter of [end]. This will be at the last time index in the midi file. Anything beyond that is what is thought to be the issue. You might notice another index event call 'All Notes Off'. This is sometimes on the other tracks as well and does not cause any issues even if it's position is after the [end] event.


Click on the line with the end event and notice where the indicator moves to on the upper window. There is also a nice large counter at the top of the lower window. This has both the position info and a time stamp on it. You will probably find that the time is past the audio file length. This is what needs fixing. if you double click the position box, it will turn blue and you can then change it. This position will look something like 104.1.99 which corresponds to 3:06.7 or 186.7 seconds of midi file time. If your audio length was 184 seconds, then we need to shorten the midi length. You can change the 104.1.99 to 103.3.99. I found if you input 103.4.0, Reaper would change it to 103.3.99 most of the time. These are the 'quarters' that Shroud is referencing in post 12. An event can occur at any time in the midi, but Beats happen on the quarters so our [end] event is best kept to quarters(or within the .01 that Reaper likes).


Now that you have moved the [end] event before the end of the audio length, you have to check all the other tracks to make sure that there is nothing happening in any of them that is past the new [end] time. Click/Double click on each one and look near the bottom. Change the position value of the last index to be before the new [end] event. In Venue it might be [ProFilm_a.pp] among other ones. There might be multiple events with the same position, just change them all. One of the most important is the Beat Track. If there are any entries past the [end] event position, highlight the row and delete it. You will notice that one of the bars on the actual beat track in the upper window will disappear. The last Beat entry should be starting at the quarter before the [end] event starts. I do not know what happens if you remove a few extra.

When you click on the instruments and vocal tracks, you are looking for the Text Event [idle]. Again if past the [end], change the position value. Again ignore the All Notes Off entry. There might also be an [idle realtime] entry. These are to tell the character animation to stop. Just change the position value to be before the [end].


When you have finished all that, you can go to File, Export Project Midi. You will get a Dialog Box. It should have Entire Project and All buttons at the top and Multitrack Midi File at the bottom. Embed Temp Map is checked. You can specify the file name, or just leave it as midi_export.mid. NOTE the program will not give you a warning about overwriting files with the same name.


Now this is for the setup that Reaper shows me. If you have watched pksages Lets Author twitch stream, he gets a Reaper window with lots of colours in the different windows. I have not been able to get mine to look like that.


So your now modified mid file is ready. At this point you might want to make a copy of it so you can change it later. At this point you need to make sure that your modified mid file has the EXACT same name as the one that was extracted from the con file.


And once again we use the wonderful C3ConTools. Click the PS3 Converter button. You get the PS3 Converter window opening. Click Encryption Options. Make sure MIDI to Edat Encryption is Type 3 and then PAL or NTSC. If you have(and you must have) used the converter before, the options remain the same. Click Encrypt Replacement Midi File(s), and a file window will open. You can then choose(up to 10 I think) the files you wish to convert. It takes the mid file and changes it to a mid.edat file. I'm not sure if the mid file gets changed into the edat or the edat gets created and the mid file is deleted, but once you do this, your mid file is no longer accessible. Unless you made a copy in case it still loops.


You can now copy the edat file onto the PS3 into the same folder as the original. Nothing else needs to be copied, this doesn't affect the mogg or the songs.dta file.


The next post will have the file names

Link to post
Share on other sites

All songs are by The Beatles, except for Commotion by CCR.


No Values, sorry, but I don't think I moved the [end] very much. These all worked the first time.


A Hard Day's Night

Being for the Benefit of Mr Kite

Good Morning, Good Morning


Song Midi Length Audio Length [end] changed to

Help 140.718 140.67

Helter Skleter 273.174 272.48

I Feel Fine 143.523 143.45

If I Needed 146.702 146.69

Know Secret 120.824 120.84


Lucy Sky 221.249 221.33

Maxwells 209.118 209.4 115.3.99

Michelle 175.687 176.06 84.4.99

Poly/Bath 194.267 192.95 95.2.99

PolyPam 89.013 88.13 59.2.99


Pep Reprise 86.877 86.27 42.2.99

Something 186.702 186.7 103.4.99

The Word 174.523 174.98 87.3.99

You Never 229.34 229.19 85.2.99

Yesterday 129.476 127.36 51.3.99


Let It Be 252.109 249.7

HeyBulldog 203.495 203.3 86.3.99

Bird Can Sing 123.005 122.49 68.2.00

Tmrow/With 144.586 144.15 75.1.00

BuyMeLove 135.038 134.13 96.3.99


DayTripper 173.886 172.08 98.3.99

StandingThere 175.082 173.85 116.3.99

I Want You 470.481 468.79 208.1.50

Commotion 166.481 163.95 87.1.00

Link to post
Share on other sites

As you can see, the differences are sometimes not very large, and a few are reversed. I think the song lengths are just a guideline for going in and changing the [end] event. It may even be that it is just a stray Beat event that is causing the problem.



hope this helps some people.

I'm just glad the Abbey Road Medley was fine.

I hope Thick as a Brick is ok!

Link to post
Share on other sites

All songs are by The Beatles, except for Commotion by CCR.


Hi, do you mean that all the songs in your list suffer from the loop ending problem, or are you only guessing they probably do so because of the discrepancy between midi and audio lengths? Be aware that there are many songs with such discrepancy but no loop ending problem.


Also, remember that when the custom is not multitrack, you can use method 3 from my list (extracting the audio for phase shifter, then rebuilding in Magma) which doesn't require to modify the midi file, and actually doesn't require any choice on your part. I spent some time trying to unsuccesfully fix the midi of "Would I Lie To You?" which I probably already messed up myself at the first attempt, only to remember later about method 3... which fixed it immediately.

Link to post
Share on other sites

When I first played Day Tripper and it loop ended, I did not think much of it, I just put it down to not play it. The next time I played I picked it, and had the same problem, so I figured something was up.

When I posted about that, wondering if it was a d/l issue or something, you directed me to this this thread.


I then played through all the Beatles songs I had d/l(which was, all of them).

The list above was all the songs that loop ended. Lucy only sort of loopended, it would repeat for a while and then exit, but I changed it to remove that issue as well.


I barely made it through working with Reaper. I'm sure I would have accidentally launched nuclear missiles if I had fired up Magma!

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...