AT9&AT3 Converter

PS VITA / PsTV AT9&AT3 Converter v2.3

BenMitnicK

Developer
Hi,

Little program for convert your files Wav/MP3 To At9/At3 and At9/At3 To Wav/Mp3 nothing special you must have .NET framework 4.5 installed and the files to be converted must be in the same directory as the application.

The At9&At3 format are used by Sony on PS Vita, PSP and PS3 especially for the sounds of themes.

At9&At3_Converter allows you to convert these sound files to other formats

at9_Converter.png


at3_Converter.png


ChangeLog V2.2
  • Add BitRate support for AT9 and AT3
  • Add Uppercase extention
  • Add Compatibility PSP/PS3 for AT3
  • Add Some verifications
  • Add More compatibility for Sampling Rate 48000[kHz] and 44100[kHz]
  • Add Status bar
  • Add Info for AT9 and AT3 convertion
  • Improved UI

Download: AT9&AT3_Converter V2.2
 
Nice first post. :) Thanks for sharing, and welcome on forum.

PS. I gonna do small edit to make it visible also in our resources section.

Edit: Done!
 
Last edited:
There is a feature of AT3 format used in PSP... but not used much in PS3. Is used to create "loops"

As example.... lets say i make a song using fruityloops or something that allows me to made it entirelly from scratch
My song is 15 seconds lenght... the first 5 seconds is the intro... then the last 10 seconds should be repeated in an infinite loop

Iirc... i tryed this in PS3 and it works... but i was using a AT3 file i made years ago for PSP, i dont even remember the tools i used or what i did (maybe i had to make some hexeditor dirty patch, im not sure)... but it should be something simple, basically iirc is only needed to specify the exact point where the loop is going to "jump back"

Another thing i remember is the song was played nicelly, the "jump back" is barelly notable if you calculate it well, pretty cool feature because it looks like you are playing a very long song (well actually is infinite, hehhehe) but is just a few seconds, heheh
 
There is a feature of AT3 format used in PSP... but not used much in PS3. Is used to create "loops"

As example.... lets say i make a song using fruityloops or something that allows me to made it entirelly from scratch
My song is 15 seconds lenght... the first 5 seconds is the intro... then the last 10 seconds should be repeated in an infinite loop
Someone knows about how to do this special loops ?, im completly sure it works because i have some .AT3 files made by myself for PSP with that special loops and they works in PS3

Im searching in google and i cant find how i did it... im wondering if it was some kind of manual patch made with a hexeditor and not much popular (kind of thing discussed in underground forums)
 
Someone knows about how to do this special loops ?, im completly sure it works because i have some .AT3 files made by myself for PSP with that special loops and they works in PS3

Im searching in google and i cant find how i did it... im wondering if it was some kind of manual patch made with a hexeditor and not much popular (kind of thing discussed in underground forums)

1. Audacity > create sound clip, save as wav w/ attributes atrac 66kbps or 128kbps).

2. Use Atrac3Plus v1 > to create the loop and convert file to AT3 > rename file to SND0.AT3, put in which ever folder is required for your game, save file, disc, or game data install.

You can also use GWAT3 to create the loop as well, but that adds an extra step and app to use whereas Atrac3Plus can do it a as well. A PS3 SND0 should never be more than 2.4MB in size on PS3.
 
Found it !
It happened in a spanish PSP scene forum, this is the program "loops v4" made in VB by spirax
https://www.elotrolado.net/hilo_programa-para-poner-loops-a-los-at3_462695
And this is the idea that originated the program by killer-x
https://www.elotrolado.net/hilo_tutorial-como-poner-musica-al-menu-de-presentacion_426018

I been looking at some .at3 files with different loops in a hexeditor and i have an overal idea of how it works...
The "standard" way to add a loop in a .at3 file is by using a tool named "GWAT", you can grab the tools from this tutorial https://www.reddit.com/r/ps3homebrew/wiki/snd0

GWAT adds some kind of "info slot" (codenamed "fact") in the header of the .at3 file with the info of the loop... in it there are time counters
So... the way to do this special loops is (first step) by generating an standard loop with GWAT, this adds the needed section at the .at3 header
After that (second step) is when you can change the times in the area that has been added by GWAT :D

And the tool "loops v4" made by spirax is intended to modify the loop data added by GWAT (or alternativelly, you can change the values of the loop times with a hexeditor, as explained by killer-x)
 
1. Audacity > create sound clip, save as wav w/ attributes atrac 66kbps or 128kbps).

2. Use Atrac3Plus v1 > to create the loop and convert file to AT3 > rename file to SND0.AT3, put in which ever folder is required for your game, save file, disc, or game data install.

You can also use GWAT3 to create the loop as well, but that adds an extra step and app to use whereas Atrac3Plus can do it a as well. A PS3 SND0 should never be more than 2.4MB in size on PS3.
I dont meant that, i was asking about how to create a loop of different size than the audio track

As example... when it plays in the PS3 it plays the first 5 seconds... then does an infinite loop in the next 20 seconds

This can be made by modifying the times of the loop info added by GWAT3 ;)



Edit:
1. Audacity > create sound clip, save as wav w/ attributes atrac 66kbps or 128kbps).
The PS3 supports ATRACT3 132kbps STEREO

The 66kbps was the max for PSP, but it seems in PS3 we can use 132kbps
Not tested by myself, but is mentioned in the reddit tutorial
 
For the record... (something i just realized right now)
After all the conversions needed to do for playstations, the .at3 file is still a .wav, and follows the .wav standards
The header allows for a lot of optional "chunks", is very well explained here:
https://sites.google.com/site/musicgapi/technical-documents/wav-file-format

When you convert a wav into a .at3 with goldwave it only have the chunks named "fmt" and "data"
But when you create a loop with GWAT are added the chunks named "fact" and "smpl"
And the time info for the loop is inside the "smpl" chunk :)

This is how it looks my .at3 file without loop in a hexeditor:
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 49 46 46 C0 F9 07 00 57 41 56 45 66 6D 74 20  RIFFÀù..WAVEfmt 
00000010  20 00 00 00 70 02 02 00 44 AC 00 00 99 40 00 00   ...p...D¬..™@..
00000020  80 01 00 00 0E 00 01 00 00 10 00 00 00 00 00 00  €...............
00000030  01 00 00 00 64 61 74 61                          ....data

And this is how it looks with loop generated by GWAT (so is an standard loop, from time 00:00 up to end of track)
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 49 46 46 14 FA 07 00 57 41 56 45 66 6D 74 20  RIFF.ú..WAVEfmt 
00000010  20 00 00 00 70 02 02 00 44 AC 00 00 99 40 00 00   ...p...D¬..™@..
00000020  80 01 00 00 0E 00 01 00 00 10 00 00 00 00 00 00  €...............
00000030  01 00 00 00 66 61 63 74 08 00 00 00 00 28 15 00  ....fact.....(..
00000040  00 08 00 00 73 6D 70 6C 3C 00 00 00 00 00 00 00  ....smpl<.......
00000050  00 00 00 00 94 58 00 00 3C 00 00 00 00 00 00 00  ...."X..<.......
00000060  00 00 00 00 00 00 00 00 01 00 00 00 18 00 00 00  ................
00000070  00 00 00 00 00 00 00 00 00 08 00 00 FF FF 14 00  ............ÿÿ..
00000080  00 00 00 00 00 00 00 00 64 61 74 61              ........data
 
I uploaded a sample song with one of that special loops in this thread
https://www.psx-place.com/threads/managunz-ps3-backup-manager-by-zar.1198/page-49#post-223049

Take a look at it cypher, and play it in the PS3 to see how the loop has been synced
The bad news is the files generated by the "loops v4" tool made by spirax doesnt works in PS3 :(
Im not sure why it happens... but the files generated by it can be used to see how the times are controlled in the loop

So... what you should do is to create the loop with GWAT3, that tool is relliable, after that we need to edit 1 single value (4 bytes length) in a hexeditor

Following my example before...
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 49 46 46 14 FA 07 00 57 41 56 45 66 6D 74 20  RIFF.ú..WAVEfmt 
00000010  20 00 00 00 70 02 02 00 44 AC 00 00 99 40 00 00   ...p...D¬..™@..
00000020  80 01 00 00 0E 00 01 00 00 10 00 00 00 00 00 00  €...............
00000030  01 00 00 00 66 61 63 74 08 00 00 00 00 28 15 00  ....fact.....(..
00000040  00 08 00 00 73 6D 70 6C 3C 00 00 00 00 00 00 00  ....smpl<.......
00000050  00 00 00 00 94 58 00 00 3C 00 00 00 00 00 00 00  ...."X..<.......
00000060  00 00 00 00 00 00 00 00 01 00 00 00 18 00 00 00  ................
00000070  00 00 00 00 00 00 00 00 00 08 00 00 FF FF 14 00  ............ÿÿ..
00000080  00 00 00 00 00 00 00 00 64 61 74 61              ........data
The value 0xFFFF1400 is the total number of samples of the audio track... this is dependant of the total time lenght, but also to the "samples per second" of the original wav, i was using 441000... anyway you can consider this value is the 100% of the time
And btw... all this values needs to be converted to big endian... so the 0xFFFF1400 is 0x14FFFF

The 4 bytes before (0x00080000) indicates the loop start... GWAT always uses the value 0x00080000 for it, so always generates a loop from the beginning of track

For the song i uploaded in managunz thread i used value 0x117E00 (as you can see comparing them is a big amount of the total 0x14FFFF... this is because my loop is near the end)

So the result was this:
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 49 46 46 14 FA 07 00 57 41 56 45 66 6D 74 20  RIFF.ú..WAVEfmt 
00000010  20 00 00 00 70 02 02 00 44 AC 00 00 99 40 00 00   ...p...D¬..™@..
00000020  80 01 00 00 0E 00 01 00 00 10 00 00 00 00 00 00  €...............
00000030  01 00 00 00 66 61 63 74 08 00 00 00 00 28 15 00  ....fact.....(..
00000040  00 08 00 00 73 6D 70 6C 3C 00 00 00 00 00 00 00  ....smpl<.......
00000050  00 00 00 00 94 58 00 00 3C 00 00 00 00 00 00 00  ...."X..<.......
00000060  00 00 00 00 00 00 00 00 01 00 00 00 18 00 00 00  ................
00000070  00 00 00 00 00 00 00 00 00 7E 11 00 FF FF 14 00  .........~..ÿÿ..
00000080  00 00 00 00 00 00 00 00 64 61 74 61              ........data

I had to do 4 or 5 tests with the tool made by spirax to realize it was not working... then examining his files to get the confirmation of where the loop info was located... then 4 or 5 more tests to find the exact value when i was trying to do the loop, that was tricky, but in audacity you can get an idea at the value by changing the counters to "samples"
Is a bit tricky but it works pretty well... and btw, when the XMB is playing the song and does the jump to "restart" loop, in that transition it does it very smoothly... much better than the PSP, i remember to be doing this for the PSP and the results was not so good, but in PS3 is perfect... you are going to have problems trying to imagine where i did the "cut" for the loop :P
The PS3 supports ATRACT3 132kbps STEREO

The 66kbps was the max for PSP, but it seems in PS3 we can use 132kbps
Not tested by myself, but is mentioned in the reddit tutorial
At this point this is tested, when i made the conversion from .wav to .at3 i used the max quality that is 132kbps

Souns quality is good, btw, i made that (weird ?) step mentioned in the reddit tutorial with goldwave to change the "playback rate" from 44100mhz to 40200mhz, not sure if this was really needed or a good idea because i dont even understand why is needed this step... but anyway the results was good
 
Last edited:
i made that (weird ?) step mentioned in the reddit tutorial with goldwave to change the "playback rate" from 44100mhz to 40200mhz, not sure if this was really needed or a good idea because i dont even understand why is needed this step... but anyway the results was good
This is mandatory btw, i made some frankenstests with different settings and the results was weird when not following the procedure explained in reddit

The "failproof" way is... you need to have the "source" wav file at 44100Hz
Incase your file have a different value open it in goldwave and use the option "resample" and convert it to 44100Hz... when you do this action (if you click play) you will realize the timing of the soundtrack is the same (as expected, this changes the quality but doesnt changes the timing)

After that you need to click in "recalculate sample ratio" and reduce it to 40200Hz... after doing this (if you click play) you will realize the sound plays in slow motion (it looks you ruined it), but this is exactly what the PS3 needs

So, in plain words... the file you create in PC doesnt plays well in PC (but in the PS3 plays perfect)
 
I think I might've caught that slow motion thing. I noticed that when I was making a coldboot audio for someone. his handle is starman, and he's on a different site. I was trying to create an at3 of the capturing a star man (fast tempo) in mario. iirc, it was much faster on the pc than the ps3.
 

Similar threads

Back
Top