Register - Login
Views: 99379055
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 10:42:22 PM
Jul - SM64 Hacking (Archive) - N64 Sound Tool New poll - New thread - New reply
Next newer thread | Next older thread
SubDrag
Member
Level: 13


Posts: 13/27
EXP: 10083
For next: 184

Since: 03-01-08


Since last post: 7.1 years
Last activity: 8.1 years

Posted on 11-13-10 01:03:30 PM Link | Quote
I open-sourced our N64 sound tool which lets you open soundbanks, and import new sounds (with fixed predictors). It won't work for SM64's format, but someone could potentially play with the code to do so if interested, since it's the same predictors/audio, just different soundbank format.

http://therwp.com/project/n64-sound-tool
MarIO0
Member
Level: 16


Posts: 18/43
EXP: 19156
For next: 1100

Since: 09-03-09


Since last post: 9.2 years
Last activity: 8.6 years

Posted on 11-13-10 01:46:14 PM Link | Quote
Thanks! I once attempted to do something similar, but pretty much failed (got the decoding working, though). Did you figure out the decoding code from SRip or from something different?

Also, I found in the VGMStream source that there are some Gamecube formats that are a bit similar to the algorithm for the N64 one (the << 0x0b >> 0x0b part), but not equal. Unfortunately VGMStream only has decoders, so it doesn't look like there's a predictor algorithm.

Going to look into it.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 6970/12211
EXP: 99235405
For next: 638166

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 11-13-10 06:35:07 PM Link | Quote
Stats
Time/Date
11-13-10 12:35:07 PM
Posts
6970
Days Here
1229
Level
122
Metal_Man88's Post
Well, thanks for the link SubDrag, it'll be interesting to see what applications this has for SM64, when eventually one or more of the resident tool-makers has time to look at the source code of course.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
MarIO0
Member
Level: 16


Posts: 19/43
EXP: 19156
For next: 1100

Since: 09-03-09


Since last post: 9.2 years
Last activity: 8.6 years

Posted on 11-14-10 04:29:45 PM (last edited by MarIO0 at 11-14-10 01:35 PM) Link | Quote
BTW, to anyone who's looking at the algorithm, at this part




if (i>0)
{
for(int x=i-1; x>-1; x--)
{
total += ( tmp[((i-1)-x)] * pred2[x] )
//printf("sample: %x - pred: %x - _smp: %x\n" , ((i-1)-x) , pred2[x] , tmp[((i-1)-x)])
}
}



What it's doing is the following:




* i = 0 -> Tmp[] * Pred2 []
* i = 1 -> Tmp[0] * Pred2 [0]
* i = 2 -> Tmp[0 1] * Pred2 [1 0]
* i = 3 -> Tmp[0 1 2] * Pred2 [2 1 0]
* i = 4 -> Tmp[0 1 2 3] * Pred2 [3 2 1 0]
* i = 5 -> Tmp[0 1 2 3 4] * Pred2 [4 3 2 1 0]
* i = 6 -> Tmp[0 1 2 3 4 5] * Pred2 [5 4 3 2 1 0]
* i = 7 -> Tmp[0 1 2 3 4 5 6] * Pred2 [6 5 4 3 2 1 0]

(E.g. i = 2 -> Tmp[0] * Pred2[1] + Tmp[1] * Pred2[0]).



Hope it looks more logic now. Still don't understand why it's this way.

EDIT: I would rewrite it this way (WARNING: Code untested!)




for (int x = 0; x < i; x++)
{
total += tmp[x] * pred2[i-x-1];
}

Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 6981/12211
EXP: 99235405
For next: 638166

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 11-14-10 06:40:57 PM Link | Quote
Stats
Time/Date
11-14-10 12:40:57 PM
Posts
6981
Days Here
1230
Level
122
Metal_Man88's Post
That's just his coding style, clearly. Some people want loops that go forwards, and others make them go backwards.

There may also be a specific purpose for that, such as making it easier for him to understand.

Indeed, it makes more sense to me to count down and have a simple [x] for pred2 over [i-x-1] for it.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
ShenoxVII

(in all seriousness, you're a prick)
Level: 24


Posts: 30/111
EXP: 75917
For next: 2208

Since: 10-09-10


Since last post: 9.0 years
Last activity: 9.0 years

Posted on 11-15-10 10:51:28 PM Link | Quote


I'm confused when I'm looking at this source. In resource.h




#define IDD_N64SOUNDLISTTOOL_DIALOG 102
#define IDR_MAINFRAME 128
#define IDR_MENUMAIN 129
#define IDD_DIALOGSPECIFYLOCATION 130
#define IDC_EXPORTCTLTBL 1000
#define IDC_INJECTPLACE 1001
#define IDC_BUTTONPLAYSND 1003
#define IDC_BUTTONTEST 1004
#define IDC_EDITCTL 1005
#define IDC_EDITCTL2 1006
#define IDC_EDITTBL 1006
#define IDC_BUTTON1 1058
#define IDC_BUTTONUP 1653
#define IDC_BUTTONDOWN 1654
#define IDC_COMBOSOUND 1668
#define IDC_EDITSAMPLINGRATE 1669
#define IDC_COMBOSOUNDBANK 1670
#define IDC_EDITVOL 1671
#define IDC_EDITPAN 1672
#define IDC_EDITPRIORITY 1673
#define IDC_EDITTREMTYPE 1674
#define IDC_EDITTREMRATE 1675
#define IDC_EDITTREMDEPTH 1676
#define IDC_EDITTREMDELAY 1677
#define IDC_EDITTVIBTYPE 1678
#define IDC_EDITVIBRATE 1679
#define IDC_EDITVIBDEPTH 1680
#define IDC_EDITVIBDELAY 1681
#define IDC_COMBOSOUND2 1682
#define IDC_EDITSAMPLEPAN 1683
#define IDC_EDITSAMPLEVOL 1684
#define IDC_EDITATTACKTIME 1685
#define IDC_EDITDECAYTIME 1686
#define IDC_EDITRELEASETIME 1687
#define IDC_EDITATTACKVOLUME 1688
#define IDC_EDITDECAYVOLUME 1689
#define IDC_EDITVELMIN 1690
#define IDC_EDITVELMAX 1691
#define IDC_EDITKEYMIN 1692
#define IDC_EDITKEYMAX 1693
#define IDC_EDITKEYBASE 1694
#define IDC_EDITDETUNE 1695
#define IDC_EDITLENGTH 1696
#define IDC_EDITBASE 1697
#define IDC_EDITLOOP 1698
#define IDC_EDITEND 1699
#define IDC_EDITCOUNT 1700
#define IDC_CHECKLOOPENABLED 1701
#define IDC_CHECKRAW 1703
#define IDC_STATICL1 1704
#define IDC_STATICL2 1705
#define IDC_STATICL3 1706
#define IDC_BUTTONRIP 1707
#define IDC_BUTTONRIP2 1707
#define IDC_STATICSFXBANKINST 1708
#define IDC_STATICSOUNDSCOMBO 1709
#define IDC_BUTTONADDSOUND 1710
#define IDC_BUTTONDELETESOUND 1711
#define IDC_STATICSOUNDBANK 1712
#define IDC_BUTTONDELETESOUND2 1713
#define IDC_BUTTONADDSOUND2 1714
#define IDC_BUTTONIMPORT16BITRAW 1715
#define IDC_BUTTONEXPORTRAW 1716
#define IDC_BUTTONIMPORTPREDICTORS 1717
#define IDC_BUTTONEXPORTRAW2 1718
#define IDC_BUTTONEXPORTPREDITORS 1718
#define IDC_BUTTONVADPCMIMPORT 1767
#define ID_FILE_OPENROM 32771
#define ID_FILE_QUIT 32772
#define ID_FILE_OPENROMEXPLICIT 32773



That is the part of source that is telling about the visual layout and what does what right? Because all the other files are getting me completely lost and this is only part of source that I understood a little bit.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 7019/12211
EXP: 99235405
For next: 638166

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 11-15-10 11:02:23 PM Link | Quote
Stats
Time/Date
11-15-10 05:02:23 PM
Posts
7019
Days Here
1231
Level
122
Metal_Man88's Post
Uh, yeah, man. You know? Perhaps you should stop blindly wandering through things you don't understand. Those are #DEFINES, which define numerical constants. Those could be related to the numbers for calling up icons, or... anything, based on that snippet.

Now, I'm going to make myself clear, Shenox: We don't need every topic clouded with you blundering through someone else's code or not really getting a concept. Stick to what you know and build up from there; otherwise I may have to prune the random questions you keep making, because this isn't a 'We will teach you how to program' function.

We'll teach people how to hack SM64, but programming questions in general is just getting a bit ridiculous.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
SubDrag
Member
Level: 13


Posts: 14/27
EXP: 10083
For next: 184

Since: 03-01-08


Since last post: 7.1 years
Last activity: 8.1 years

Posted on 06-06-11 01:35:09 AM Link | Quote
Update - supports way more games
http://goldeneyevault.com/viewfile.php?id=212
SubDrag
Member
Level: 13


Posts: 15/27
EXP: 10083
For next: 184

Since: 03-01-08


Since last post: 7.1 years
Last activity: 8.1 years

Posted on 06-13-11 12:08:47 AM Link | Quote
As an update, now support even more games:
Added (DECODING ONLY)
Doubutsu no Mori (J)
F-Zero Exp
Legend of Zelda, The - Ocarina of Time (U) (V1.0)
Legend of Zelda, The - Majora's Mask (U)
Pokemon Stadium 2 (U)
Star Fox 64 (U) (V1.0)
Yoshi's Story (U) (M2)
F-ZERO X (U)
Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - N64 Sound Tool New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries, 3 query cache hits.
Query execution time:  0.455603 seconds
Script execution time:  0.020860 seconds
Total render time:  0.476463 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 416 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 185 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 102 - Warning: unescaped & or unknown entity "&postid"
line 184 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 186 column 9 - Warning: missing <tr>
line 204 column 13 - Warning: missing <tr>
line 205 column 102 - Warning: unescaped & or unknown entity "&postid"
line 214 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 216 column 9 - Warning: missing <tr>
line 234 column 13 - Warning: missing <tr>
line 235 column 102 - Warning: unescaped & or unknown entity "&postid"
line 237 column 74 - Warning: <style> isn't allowed in <td> elements
line 237 column 9 - Info: <td> previously mentioned
line 237 column 1365 - Error: <z> is not recognized!
line 237 column 1365 - Warning: discarding unexpected <z>
line 237 column 1377 - Warning: discarding unexpected </z>
line 239 column 1409 - Error: <z> is not recognized!
line 239 column 1409 - Warning: discarding unexpected <z>
line 239 column 1417 - Warning: discarding unexpected </z>
line 241 column 1433 - Error: <z> is not recognized!
line 241 column 1433 - Warning: discarding unexpected <z>
line 241 column 1445 - Warning: discarding unexpected </z>
line 243 column 1461 - Error: <z> is not recognized!
line 243 column 1461 - Warning: discarding unexpected <z>
line 243 column 1469 - Warning: discarding unexpected </z>
line 246 column 2415 - Warning: discarding unexpected </td>
line 249 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 251 column 9 - Warning: missing <tr>
line 269 column 13 - Warning: missing <tr>
line 270 column 102 - Warning: unescaped & or unknown entity "&postid"
line 312 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 314 column 9 - Warning: missing <tr>
line 332 column 13 - Warning: missing <tr>
line 333 column 102 - Warning: unescaped & or unknown entity "&postid"
line 335 column 74 - Warning: <style> isn't allowed in <td> elements
line 335 column 9 - Info: <td> previously mentioned
line 335 column 1365 - Error: <z> is not recognized!
line 335 column 1365 - Warning: discarding unexpected <z>
line 335 column 1377 - Warning: discarding unexpected </z>
line 337 column 1409 - Error: <z> is not recognized!
Tidy found 244 warnings and 12 errors! Not all warnings/errors were shown.

The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md