The Dink Network

Reply to Re: MP3 to Midi conversion.

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 8th 2012, 07:29 PM
knightg.gif
Sumurai8
Peasant He/Him Netherlands
Who's knocking on heaven's door? 
Mp3 to midi sounds very, very hard or just impossible to me. Mp3 to wav sounds more plausible and I would recommend that if you really don't want to use the mp3's.

I once made a littl' script for myself that allowed me to play a set of songs in an area and change to a different set of songs in an other area. It isn't quite finished yet, but if you would want to use wav's instead of midi's in your dmod, this could help you doing so. I have to note that if you are playing windowed, the music will keep playing when focusing out of the window, while scripts and timers freeze. This will cause the timer to be asynced from the music and create a large silence gap between the current and next song. I also never really did fix the bug that if you load a safegame, the music would not start... or the annoying bug that I somehow managed to create random game-crashing bugs with this script (random, because I was never able to reproduce the bug). &jukeboxsound and &jukeboxtime and &killmusic are globals.

void main ( void )
{
int &crap;
int &mm;
int &ss;
int &timethingy;

script_attach(1000);
&killmusic = 1;
wait(2000);
//oh noes, all instances of the jukebox have killed themself... right now :'(
&killmusic = 0;

we_love_cookies:
if (&killmusic == 1)
{
sound_set_kill(&jukeboxsound);
kill_this_task();
}

// if (&player_map == 0)
// {
// //This is the title screen; do things slightly different
// }
//Find out where we are based on the screennumber

if (&jukeboxtime < 1)
{
goto music_anywhere;
}

wait(1000);
&jukeboxtime -= 1;
goto we_love_cookies;

music_anywhere:
sound_set_kill(&jukeboxsound);

&crap = random(7, 0);
//Debug: &crap = 2;
if (&crap == &jukeboxnr)
{
goto music_anywhere;
}
else
{
&jukeboxnr = &crap;
}
if (&crap == 0)
{
load_sound("thing.wav", 90);
&jukeboxtime = 420;
//7:00
}
if (&crap == 1)
{
load_sound("thang.wav", 90);
&jukeboxtime = 420;
//6:59
}

<snap>

if (&crap == 6)
{
load_sound("thong.wav", 90);
&jukeboxtime = 186;
//3:06
}
&jukeboxsound = playsound(90, 44100, 0, 0, 0);
wait(1000);
&jukeboxtime -= 1;
goto we_love_cookies;
}