Re: Background music...

new topic     » goto parent     » topic index » view thread      » older message » newer message

>  Hi all!
>
> Does any one know how to use background music (MID,IMS file) in a program?
> I know WAV playing routine made by Jacques, with which i can play sound,
> but, i want to play background "music" more than sound effect.
> Is there any util. to convert MID or IMS to WAV?

        Yeah, there are some programs that play midi and save wav, but it
dumb. ONE floppy disk can mostly hold about 25 seconds of ugly
low-quality compressed sound effect.
        The difference between the formats is that wave save is table with
frequencys and volumes, that your card produces sound with. For the
ODL telephone quality there should be about 11.000 sound frames per
second in such a table. So 11.000 * frequency byte + 11.000 * volume
byte. And this is just 8 bit mono, old-telephone quality.
        Midi is totally different, it is designed to be cpu-friendly, that
means it will not slow your program down a lot, instead you can a
special processor in the sound card, to generate a piece of
wave-table and play it. That piece of wave-table is of a give volume,
frequency and length. Because an other processor is doing the job,
the normal cpu can do other things. You can hardly simulate a real
voice with midi, cause the volumes and frequencies changes to many
time within the second. You can play a sort of piano with it, using
different frequencies, volumes and lengths for each tone. With this
you can have a nice background song. A .MID file contain a piano
chord data, which tone, which length, which volume
        I don't advise you to even try to use wav file for background music
unless you want to give your program on a CD_ROM and it is the only
program on it.  You problely don't even have the hard drive for it,
(to make it, takes too much HD-SPACE also)
        Midi can be programmed in Euphoria, i got the specs, i just am too
confused about ports, pokes, machine code. If someone wants them to
try to code such routines, i got a LOT of specs and tutorials and
stuff...
        Midi can be used for background music, however it's
musically not very interesting. There is also a way to have music
with real life sounds, which sound much better, call module-music.
The file-extension most used is .MOD but also .S3M and .XM are
popular. These files contain both actually. They contain a piano
chord, and wave files. The program then mixes the wave files on the
frequency and with the volume as in the piano chord in a few
channels. (Each channel produces a wave-table, all the channels are
then mixed together to the soundcard) So instead of an ugly tone, you
now have sounds that are played on different tones, with different
volumes. There are also a few sound effects like volume sliding and
tone sliding. These files are bigger than midi-files, but just a bit,
and there quality is GREAT.
        Maybe Jacques Deschenes can code a module-player? It seems that he
knows a lot about the sound card...

I hope this helps...

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu