The Dink Network

Reply to Re: can't use .WAV???

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 1st 2006, 03:22 PM
old.gif
jjohn
Peasant He/Him
 
In that case, you'll need to add playmidi() after the buttons are added.
Consider downloading any of the excellent
Dink references.

playmidi("<filename without .mid>"); // works

From the r4.0 help file:

playmidi

Category: Sound

Version: 1.00+

Prototype: void playmidi(string midi_file[14]);

playmidi plays the midi_file found in the Sound
directory in the D-Mod. If it is not found, it
will look in Dink's sound directory and play it
if it exists there.

If a number is specified, Dink will attempt to
play "###.mid".

The numbers 1002-1018 as a 'midi_file' have special
meaning. They play the audio tracks on the Dink Smallwood CD.
All but 1003, 1008, 1014, 1015 and 1017 have MIDI alternatives
for those people (the majority) using the freeware version
without the original CD in the drive. 1001 and 1020 also play
MIDIs if the Dink CD is not present, although with the CD, 1001
has no effect (since track 1 is the data track on the CD) and
1020 stops the music (since the CD has no track 20). These numbers
also work for screens (press M in DinkEdit). Lastly, it's
interesting that it will confuse certain audio CDs
(such as the 'O Brother, Where Art Thou?' soundtrack)
with the Dink CD. [PP]

playmidi("1001");
// without the CD, plays "1.mid" (specified number less 1000);
// with the CD, no effect -- will not try to "play" data track

playmidi("1003");
// plays track 3 of CD, or "3.mid" (if dmod has one)

playmidi("1003.mid");
// plays, as specified, "1003.mid"

playmidi("1020");
// with CD, does nothing (no track 20);
// without CD, plays "20.mid" if found