Register - Login
Views: 99796982
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:47:54 AM
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: 10092
For next: 175

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: 19175
For next: 1081

Since: 09-03-09


Since last post: 9.3 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: 99320645
For next: 552926

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: 19175
For next: 1081

Since: 09-03-09


Since last post: 9.3 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: 99320645
For next: 552926

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: 76000
For next: 2125

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: 99320645
For next: 552926

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: 10092
For next: 175

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: 10092
For next: 175

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.

27 database queries, 3 query cache hits.
Query execution time: 0.110076 seconds
Script execution time: 0.020094 seconds
Total render time: 0.130171 seconds