DiddyKong's BRSTM copier *NEW UPDATE 2015-3-09* SOURCE CODE RELEASED

Started by Diddy Kong, March 19, 2012, 12:09:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

March 23, 2013, 07:21:02 PM #45 Last Edit: March 23, 2013, 07:27:14 PM by jdaster64
K, I got it working in C++; given a 32-bit FP value "val", here's a pseudocode function/script that returns a 32-bit integer "enc":

unsigned int enc = 0;

if (val == 0.0)
   return enc; //00000000

if (val < 0.0)
   enc += 2^31; // sets first bit of 32-bit to 1 if negative
   val = val*-1;

int exp = 0;

while (val < 1.0 || val >=2.0)
   if (val < 1.0)
       val *= 2.0;
       exp -= 1;
   else
       val /= 2.0;
       exp += 1;

// val is now scaled so that 1 <= val < 2

enc += 2^23 * (exp+127); // adds exponent bits
enc += round((val-1)*2^24); // adds last 23 bits

Hooray for half a semester of C++ programming!

Here's the .exe file I made, if you want to test it further.  EDIT: and here's the actual C++ code I used. The bottom for loop basically just prints the number in hex form.

JD
post that on my thread :/


that's for UMC, not this...

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.


March 23, 2013, 08:21:09 PM #48 Last Edit: March 23, 2013, 08:36:41 PM by Diddy Kong
Quote from: DarkPika on March 23, 2013, 07:20:49 PM
your point has been made :)
and I fully agree with it XDD

though that programming attention is for UMC...
(not trying to gain by using your thread, that line just slipped) :P

I still need to finish my post :P


for some tips on your program, I'd reccomend leaning how to do this stuff yourself instead of using other programs to do it for you ;)

for example, internal file handling using an 8bit interger with each value being a byte of the file :)
(UMC currently does that)

I'm actually working on archive handling with file extraction...
(a smart file system for UMC)

anyways...
for you, another expert thing would be your own basic audio editor ;)

bacically, something that's able to pitch-shift, re-loop, etc...

you could help out BJ by writing that :)



in a way, I'm helping BJ out by learning GL and figuring out nintendo's GX formatting.
(GX is GL with a few modifications)
well my main purpose of the external programs was for MKW mode
to pitch shift only,  not to be a brawlbox (brstm) killer

this program was meant to be aimed at noobs who cant even as much as look at a song ID txt list
ans to make sawnd insertation more simple and works unlike supersawndz

every time you reference your program, im seeing this as connections and relations between what we want to do so thats okay

jaklub created sawndz my app simply uses it to insert sawnd files, the copier simply backs up the brsar, copies it to the program directory FOR the user, renames the sawnd file (like sawndz012 does) then tells sawndz to do its thing, (which i put a wait for program end line here) , after in which the brsar is copied BACK to the sd card , which is crap i tell people who come to the chat for this to do

March 23, 2013, 09:44:21 PM #49 Last Edit: March 23, 2013, 09:46:37 PM by DarkPika
Quote from: Diddy Kong on March 23, 2013, 08:21:09 PM
well my main purpose of the external programs was for MKW mode
to pitch shift only,  not to be a brawlbox (brstm) killer
well...
why not try to put brbx to shame until it's able to get better :)
(programmers like a little load off their back like that) :P

Quotethis program was meant to be aimed at noobs who cant even as much as look at a song ID txt list
ans to make sawnd insertation more simple and works unlike supersawndz
that's fine...
but it was your pitch shifting implamentation that inspired the other things I've brought up :)

Quoteevery time you reference your program, im seeing this as connections and relations between what we want to do so thats okay
yea...
but I don't want others to mistake my inputs for something to help me on and start using your thread for that ;)

Quotejaklub created sawndz my app simply uses it to insert sawnd files, the copier simply backs up the brsar, copies it to the program directory FOR the user, renames the sawnd file (like sawndz012 does) then tells sawndz to do its thing, (which i put a wait for program end line here) , after in which the brsar is copied BACK to the sd card , which is crap i tell people who come to the chat for this to do
just a basic interface for now... yea...
as you've stated was your original idea.

though now you're doing stuff that could be dealt with at an advanced level...
I see you're just using a cmd interface basically...
(no different from programming a .bat file)

*reads my last 2 lines*
there's an idea I could use...

GM can basically make exe's that act in place of .bat files :3
(not all compy's can run .bat files)

think you could input the cmd-line operations for the .bat into GM and compile an exe that performs the operations of the .bat?? :)

if so, thanx =D
and here's the operations:
-------------------------------------
@echo off
data\Python272\python.exe UMC_loader.py
-------------------------------------

UMC dev4 has the custom icon to use ;)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

March 23, 2013, 11:03:53 PM #50 Last Edit: March 23, 2013, 11:22:05 PM by Diddy Kong
Quote from: DarkPika on March 23, 2013, 09:44:21 PM
well...
why not try to put brbx to shame until it's able to get better :)
(programmers like a little load off their back like that) :P
that's fine...
but it was your pitch shifting implamentation that inspired the other things I've brought up :)
yea...
but I don't want others to mistake my inputs for something to help me on and start using your thread for that ;)
just a basic interface for now... yea...
as you've stated was your original idea.

though now you're doing stuff that could be dealt with at an advanced level...
I see you're just using a cmd interface basically...
(no different from programming a .bat file)

*reads my last 2 lines*
there's an idea I could use...

GM can basically make exe's that act in place of .bat files :3
(not all compy's can run .bat files)

think you could input the cmd-line operations for the .bat into GM and compile an exe that performs the operations of the .bat?? :)

if so, thanx =D
and here's the operations:
-------------------------------------
@echo off
dataPython272python.exe UMC_loader.py
-------------------------------------

UMC dev4 has the custom icon to use ;)
the pitch shifting for MKW mode is so people dont have to hex the brstm themselves or manually make their own sped up version of a song, the program does it for them, making it faster to just download ONE brstm, and not worry about having to request a sped up version of it, or hunt for it.
^^^ thats not useful to the brawl side - and is not meaning to replace brawlbox in anyway, brawlbox is for hacking many things, not just audio, its still the primary tool for brstms

pitch shifting was originally not going to be in the program, but i added because i foresaw  MKW users soon to whine about pitch increases being a side effect, so i think one step ahead,  people from MKW LOVE it, even mr bean JR will be using it

as far as people getting the wrong idea from your references to UMC, i will BACK YOU UP on that, and explain how i take certain references as notes or comparisons that can help me


the  code i run that does BATish operations is this line is run for EVERY action and program to run

execute_program("program.exe"," arguments/params",true)

that 3rd argument is a true or false, or 0 or 1,, if true, the runtime pauses until the launched application closes, if false, the runtime continues after launching the external application

btw the arguments otherwise in a bat file, can be changed or outcome'd by variables :P  variables set by the txt file vgmstream spits out are the params used when it runs the standalone brstmmaker

https://www.dropbox.com/s/8fc1x2yndzo31wo/vvvv.exe

and idk why you wanted that ^ but OK :P



Post Merge: March 23, 2013, 11:22:05 PM

Quote from: jdaster64 on March 23, 2013, 07:30:47 PM
Oh, I wasn't aware, sorry about that.
:P

March 23, 2013, 11:33:35 PM #51 Last Edit: March 24, 2013, 12:42:19 AM by DarkPika
to correct you there...
brbx is the main tool for BUILDING brstms.
there's no possible way to edit them (that I know of) other than hexxing...
why I'm so eagar to see you advance with this thing :D


and thanx :3
I wanted that because some computers (library, school, etc) won't run BAT files.

to run UMC you need to run the BAT file.
though now that I've got the exe (thank you so much), I can run the program even more portably now ^_^


EDIT:
IT WORKS! ^_^
lol thanx diddy :)
though now I have 3 windows that appear...

if you'd like to fix that up, you can DL UMC dev4 and copy the exe to the program directory ;)

can you set a file icon with that??
(take your answer over to my thread plz) :)

EDIT2:
and yea... it doesn't auto-close when closing UMC's window...

windows:
- GM (the exe you just made) :)
- python console
- UMC (GL/SDL window)

EDIT3: finally managed to change the icon :3
+1 for resource hacker XD

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: DarkPika on March 23, 2013, 11:33:35 PM
to correct you there...
brbx is the main tool for BUILDING brstms.
there's no possible way to edit them (that I know of) other than hexxing...
why I'm so eagar to see you advance with this thing :D


and thanx :3
I wanted that because some computers (library, school, etc) won't run BAT files.

to run UMC you need to run the BAT file.
though now that I've got the exe (thank you so much), I can run the program even more portably now ^_^


EDIT:
IT WORKS! ^_^
lol thanx diddy :)
though now I have 3 windows that appear...

if you'd like to fix that up, you can DL UMC dev4 and copy the exe to the program directory ;)

can you set a file icon with that??
(take your answer over to my thread plz) :)

EDIT2:
and yea... it doesn't auto-close when closing UMC's window...

windows:
- GM (the exe you just made) :)
- python console
- UMC (GL/SDL window)

EDIT3: finally managed to change the icon :3
+1 for resource hacker XD
exe icon technically relates to brstm copier lol
yes, i can put any icon i want, i have a program for that, though i want to use a REAL icon for brstm copier instead of this building block crap :P

March 26, 2013, 11:54:28 AM #53 Last Edit: March 26, 2013, 11:59:24 AM by DarkPika
download GIMP ;)
it builds and efficiently manages multi-layer icons like the one used in GM exes :)
(including transparency)
^ uses PNG alpha-masking for 16-million colors

use Resource Hacker to replace the icon ;)
... wait a minute... what program do you have??


also...
can we take UMC's batch-exe over to my thread plox.
thanx :)

I hope you're not bothered by working on this for me... :/
I do have a few requests and ideas, but I'll ask them on my thread ;)

I've already marked you down in UMC's credits. :D
(since this is a big issue in portability)
^ and Ian Mallet is yelling at me about it... lol

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

March 26, 2013, 05:10:34 PM #54 Last Edit: March 26, 2013, 05:12:27 PM by Diddy Kong
Quote from: DarkPika on March 26, 2013, 11:54:28 AM
download GIMP ;)
it builds and efficiently manages multi-layer icons like the one used in GM exes :)
(including transparency)
^ uses PNG alpha-masking for 16-million colors

use Resource Hacker to replace the icon ;)
... wait a minute... what program do you have??


also...
can we take UMC's batch-exe over to my thread plox.
thanx :)

I hope you're not bothered by working on this for me... :/
I do have a few requests and ideas, but I'll ask them on my thread ;)

I've already marked you down in UMC's credits. :D
(since this is a big issue in portability)
^ and Ian Mallet is yelling at me about it... lol
i cant design imagry from scratch lol

i have an icon maker, GIMP, and photoshop the ICOFX is used to batch convert a multi res icon package then save it as an ICO which is the only format game maker accepts

Post Merge: March 26, 2013, 05:12:27 PM

we can take the discussion there, but ANYTHING relating to or planning to go into brstm copier goes HERE

March 26, 2013, 06:01:43 PM #55 Last Edit: March 26, 2013, 06:04:35 PM by DarkPika
Quote from: Diddy Kong on March 26, 2013, 05:10:34 PM
i cant design imagry from scratch lol
why not?? :-\
I used Blender (24 and 26) and Paint Shop Pro 7 to make my icon :P
(and a little MS Paint)

Quotei have an icon maker, GIMP, and photoshop the ICOFX is used to batch convert a multi res icon package then save it as an ICO which is the only format game maker accepts
ICOFX??

I just used gimp to export individual icons:
16 million colors:
-48x48
-32x32
-16x16
256 colors:
-48x48
-32x32
-16x16

and layered them in gimp with highest quality/largest image first (on top) (following the format above)
and exported the full 6 layers as another icon and replaced the exe's gear icon with that...

Quote
Post Merge: March 26, 2013, 05:12:27 PM

we can take the discussion there, but ANYTHING relating to or planning to go into brstm copier goes HERE
of course =3

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: DarkPika on March 26, 2013, 06:01:43 PM
why not?? :-\
I used Blender (24 and 26) and Paint Shop Pro 7 to make my icon :P
(and a little MS Paint)
ICOFX??

I just used gimp to export individual icons:
16 million colors:
-48x48
-32x32
-16x16
256 colors:
-48x48
-32x32
-16x16

and layered them in gimp with highest quality/largest image first (on top) (following the format above)
and exported the full 6 layers as another icon and replaced the exe's gear icon with that...
of course =3
i lack concept for that.. im not very original or creative in the art/image department
i would need someone to designt an icon or logo for me

March 26, 2013, 06:31:36 PM #57 Last Edit: March 26, 2013, 08:51:56 PM by DarkPika
ah, I could do that :)
I'll admit I'm not the best artist, but I can do something :P

it may take a moment for me to upload...
(need to have mother's phone)

EDIT: by "a moment" I mean "a few days"...
(mother and her phone, and leaving to go places... yea...)

EDIT:
well I've gotten the layout finished... finally :srs:
do you want the full-size PNG to make the ico yourself,
do you want me to make the ico and send it to you,
or do you want me to do all of the above and include the extra images used in building the main image??

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: DarkPika on March 26, 2013, 06:31:36 PM
ah, I could do that :)
I'll admit I'm not the best artist, but I can do something :P

it may take a moment for me to upload...
(need to have mother's phone)

EDIT: by "a moment" I mean "a few days"...
(mother and her phone, and leaving to go places... yea...)

EDIT:
well I've gotten the layout finished... finally :srs:
do you want the full-size PNG to make the ico yourself,
do you want me to make the ico and send it to you,
or do you want me to do all of the above and include the extra images used in building the main image??
main png - i have an ICO resource builder


idk, also up to you about the loading banner, if you want to change that...
im leaving it alone :P

March 26, 2013, 09:29:04 PM #59 Last Edit: March 27, 2013, 11:50:45 AM by DarkPika
I've actually gotten 2 images finished, and personally, I like the alternate better :P

sadly though mother's busy with the phone, so I can't UL...

I'm working on your album now ;)
http://picasaweb.google.com/tcll5850/DiddyKong
you can keep watch on here for any image I UL for you :)
(not copying or memorizing the links of the images as they're ungodly long)

a nice trick with Picasa,
you can modify the image size just by modifying it's hot-link :D
all picasaweb images contain 'http://lh*server ID*.ggpht.com/.../.../s*image width*/*image name*.png'
you can change the image width to anything under it's width.
(oversizing it causes it to either disappear or display at it's original size)

EDIT:
the album is created, and I have an image copied to it as a place-holder...


EDIT2:
forgot to mention about the loading banner...

I'd like to work on it yes, but due to issues with mother and the phone, not right now... :/

Post Merge: March 27, 2013, 03:08:25 AM

UL'd them over at SWF...
Picasaweb moble is crap :srs:
and trying to filter the manual link simply gets reparsed in moble view...

they went through all that trouble to program a peice of trash. >:O
what is this garbage.

I'm going to try to get the image links from SWF an UL them to picasa on my wii...
(I can do web uploads at least)

I don't want to use up SWF's space :/

EDIT:
gawd it's like everything's trying to stop me from getting those images up to Picasa...

you know what...
I give up...
they're uploaded, so IDC anymore...


Post Merge: March 27, 2013, 11:50:45 AM

so...
how do you like your images?? =3

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.