manuel-arguelles / drg2sbg Goto Github PK
View Code? Open in Web Editor NEWI-Doser .drg files to .sbg converter
License: GNU General Public License v2.0
I-Doser .drg files to .sbg converter
License: GNU General Public License v2.0
This program takes a .drg file from I-Doser and convert it to an .sbg SBaGen file. The authors of this project have nothing to do with I-Doser, I-Doser is a registered trademark. This project does not supports piracy or any illegal action, the use of this product must be stricly to pass .drg files to .sbg for later convertion to .wav or similar portable format, for those who (as the author) doesn't have a Windows pc to play the dose. This project will never be possible without the help of "The Unofficial I-Doser Blog" and their _steAlth_'s DRG Author by konstAnt and _khAttAm_ to tell the truth this is a rip off stripped version of konstAnt and _KhAttAm_ _steAlth_'s DRG Author. They did all the work with the .drg files, I just port some parts of it to C. Features: * Convert drg file into sbagen format * Extract every part of the drg file (description, title, image, sbagen code) * Create drg files Related links: * http://uazu.net/sbagen/ (Main Engine, the binaural generator) * http://www.i-doser.com/ (The company who makes the .drg files) * http://www.i-doser.com/store/ (The place to buy good .drg files) * http://theidoserblog.blogspot.com/ (The guys who made this possible) * http://p4c0.wordpress.com/ (Useless blog) -- Manuel Argüelles
This program will output alloff:
inplace of
all-off: -`. The cause of this was not apparent via inspection of the source code.
I am working on a port of this to javascript for a HTML5 idoser player.
I can't get mine to output the correct stuff & wondered if you could help. I think I have pretty accurately ported drg_get_uncoded_data
, mine looks like this:
function drg_get_uncoded_data(data){
var S = [
22, 213, 140, 67, 234, 48, 108, 225, 6, 101, 194, 50, 44, 247,
58, 145, 20, 80, 241, 60, 127, 154, 125, 33, 45, 166, 245, 84,
28, 110, 220, 56, 195, 181, 238, 109, 69, 216, 31, 162, 61, 183,
74, 71, 129, 148, 170, 111, 137, 164, 179, 178, 9, 41, 160, 219,
77, 93, 97, 143, 14, 158, 118, 152, 0, 221, 192, 116, 86, 65,
55, 173, 217, 32, 227, 119, 102, 115, 254, 132, 95, 23, 49, 73,
211, 142, 66, 59, 85, 252, 138, 212, 243, 38, 134, 165, 184, 13,
209, 124, 197, 141, 114, 43, 92, 133, 175, 205, 128, 68, 91, 104,
64, 126, 39, 40, 46, 72, 139, 232, 182, 2, 131, 201, 188, 112,
200, 78, 159, 113, 237, 99, 249, 90, 7, 47, 122, 36, 76, 117,
222, 149, 96, 82, 100, 208, 151, 198, 228, 94, 87, 190, 42, 246,
10, 169, 171, 120, 51, 236, 255, 215, 191, 223, 54, 103, 89, 135,
57, 98, 176, 161, 24, 235, 26, 3, 250, 233, 121, 79, 207, 242,
224, 11, 123, 193, 155, 157, 218, 186, 244, 75, 167, 63, 206, 81,
29, 150, 229, 4, 15, 230, 37, 185, 1, 203, 35, 16, 136, 204,
144, 253, 214, 168, 27, 189, 105, 231, 177, 18, 25, 52, 70, 88,
196, 210, 163, 239, 156, 19, 34, 17, 202, 30, 21, 62, 147, 174,
240, 130, 8, 180, 106, 172, 83, 12, 146, 251, 226, 53, 153, 107,
199, 248, 187, 5
];
var i = j = s = temp = 0;
for (var b = 0; b < data.length; b++) {
i = (i+1) % 256;
j = (j + S[i]) % 256;
temp = S[i];
S[i] = S[j];
S[j] = temp;
s=S[i] + S[j];
data[b] = data[b] ^ S[s % 256];
console.log("b=%d, i=%d, j=%d, s[i]=%d, s[j]=%d, s=%d: %s (%d)", b, i, j, S[i], S[j], s, data[b], data[b].charCodeAt(0));
}
return data;
}
data
param is base64-decoded chunk for the element.
I get this for title of Absinthe.drg:
b=0, i=1, j=213, s[i]=168, s[j]=213, s=381: 1 (49)
b=1, i=2, j=97, s[i]=13, s[j]=140, s=153: � (148)
b=2, i=3, j=164, s[i]=54, s[j]=67, s=121: q (113)
b=3, i=4, j=142, s[i]=96, s[j]=234, s=330: � (138)
b=4, i=5, j=190, s[i]=244, s[j]=48, s=292: + (43)
b=5, i=6, j=42, s[i]=74, s[j]=108, s=182: � (148)
b=6, i=7, j=11, s[i]=50, s[j]=225, s=275: T (84)
b=7, i=8, j=17, s[i]=80, s[j]=6, s=86: ' (39)
1�q�+�T'
I modified your for-loop to look like this:
for (b = 0; b < a; b++) {
i = (i +1) % 256;
j = (j + S[i]) % 256;
temp = S[i];
S[i] = S[j];
S[j] = temp;
s=S[i] + S[j];
data[b] = data[b] ^ S[s % 256];
printf("b=%d, i=%d, j=%d, s[i]=%d, s[j]=%d, s=%d: %c (%d)\n", (int)b, i, j, S[i], S[j], s, data[b], (int)data[b]);
}
and it (correctly) outputs:
b=0, i=1, j=213, s[i]=168, s[j]=213, s=381: A (65)
b=1, i=2, j=97, s[i]=13, s[j]=140, s=153: b (98)
b=2, i=3, j=164, s[i]=54, s[j]=67, s=121: s (115)
b=3, i=4, j=142, s[i]=96, s[j]=234, s=330: i (105)
b=4, i=5, j=190, s[i]=244, s[j]=48, s=292: n (110)
b=5, i=6, j=42, s[i]=74, s[j]=108, s=182: t (116)
b=6, i=7, j=11, s[i]=50, s[j]=225, s=275: h (104)
b=7, i=8, j=17, s[i]=80, s[j]=6, s=86: e (101)
Absinthe
Everything seems to match up to the actual char output, for some reason. Any help you can provide would be much appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.