1. Background music...
- Posted by Lee woo seob <wslee at HHI.CO.KR> Jun 26, 1997
- 710 views
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? Bye! from Lee woo seob.
2. Re: Background music...
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jun 26, 1997
- 684 views
> 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
3. Re: Background music...
- Posted by Philip Lettkeman <phil.man at JUNO.COM> Jun 26, 1997
- 704 views
>Subject: Background music... > > 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? > >Bye! > >from Lee woo seob. A midi file can be recorded as a wave file on most sixteen bit sound cards. I also have a developer's kit for the sound blaster 16 that contains routines for playing midi (actually a tone generator). All the code is in basic, c, and pascal. If I can find it I also have a kit for the sound blaster awe32 to access the better midi it plays. Let me know if you want it and I'll try to get it to you. Same goes for you, Jacques. Bye! Philip Lettkeman phil.man at juno.com Beginner Extraordinare
4. Re: Background music...
- Posted by Irv <mountains at MINDSPRING.COM> Jun 26, 1997
- 735 views
> >Subject: Background music... I have posted a file sbf4.zip on my Euphoria ftp directory. It has all sorts of Soundblaster & MIDI stuff, for anyone who is able to convert the C code into Euphoria! http://www.mindspring.com/~mountains Irv
5. Re: Background music...
- Posted by Jacques Deschenes <desja at GLOBETROTTER.QC.CA> Jun 26, 1997
- 697 views
At 09:54 97-06-26 +0000, Ralf wrote: > Maybe Jacques Deschenes can code a module-player? It seems that he >knows a lot about the sound card... > Forget it about MOD player it would have to be done mostly in assembler because the interrupt can't call an euphoria procedure, contrary to C where assembler code can call C procedures, so most of the work can be done in C. With euphoria most of the code would have to be done in assembler with no debugger tools!! Not for me. But I'm presently studiing the mid file format and I will probably write a mid player, because it's a much simpler task. The assembler coding will be sizable. Hope to see euphoria for windows soon. Then we will be able call functions in the DLL (except gui ones as it will be console version). And that means all sound api will be accessible (provide we know the interface of those functions). I searched the net for windows 95 api definitions but didn't find it. If someone knows where to find it please let me know. Regards, Jacques Deschenes Baie-Comeau, Quebec Canada desja at quebectel.com
6. Re: Background music...
- Posted by Ricardo Niederberger Cabral <rnc at INFOLINK.COM.BR> Jul 30, 1997
- 734 views
> Hope to see euphoria for windows soon. Then we will be able call >functions in the >DLL (except gui ones as it will be console version). And that means all >sound api will be accessible (provide we know the interface of those >functions). I searched the >net for windows 95 api definitions but didn't find it. If someone knows >where to find it please let me know. Visual Basic 3,4 and 5 for windows comes with an excellent API list, but I don't know if API and DLL support in a future Win32 Euphoria would be like it is in VB. For playing a wav file in VB for example, just: ----------- Const SYNC = 1 handler = sndPlaySound(ByVal CStr("filename.wav"), SYNC) ----------- and in the declaration section: ----------- Declare Function waveOutGetNumDevs Lib "winmm" () As Long Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long ----------- It would be great if this future Win32 Euphoria support DLL calls like VB does. --- Ricardo Niederberger Cabral rnc at infolink.com.br