Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Cant get MIDI to play

Author
Message
Siddy
15
Years of Service
User Offline
Joined: 16th Dec 2008
Location:
Posted: 3rd Jan 2009 08:03
Im trying to get a midi to play, this is the code im writing:

LOAD MUSIC "music.mid",1
PLAY MUSIC 1
WAIT KEY

The program runs, but there is no music.

I have a file called "music.mid" in the root DIR, which i have opened any played in winamp so i know it works

I have also tried this with an mp3 and it works, for some reason only midi's wont work.

Any ideas?
BlobVanDam
16
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 3rd Jan 2009 16:17
Does the midi file work fine in other programs like Windows Media Player? I think Winamp uses a separate method of MIDI playback to the general Windows way. Try checking your Windows MIDI playback options in the Control Panel?

As far as I know, there shouldn't be anything stopping that command from working.
Siddy
15
Years of Service
User Offline
Joined: 16th Dec 2008
Location:
Posted: 3rd Jan 2009 17:50
Thanks for the reply,
I opened it is Windows media player and cooledit, its definitely a midi and it definitely works.

Im using the DEMO vr. of darkbasic pro, waiting for my dark game studio to arrive, maybe the midi player code in the demo is broken?

I dont know how to find out which vr of DBPRO it is.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Jan 2009 00:23
I think I heard something about music not working right without syncing.

Try running this code:



If that still doesn't work, see if this does:



Just trying to narrow down the problem, you might need to put this in Bug Reports.

Siddy
15
Years of Service
User Offline
Joined: 16th Dec 2008
Location:
Posted: 4th Jan 2009 01:29
Thank you bmaczero,
Unfortunately it still does not work.
I tried your code with an MP3 and it did work, so i do not doubt your code.

As i said, i am using the demo - i will try it DarkBASIC pro 7.1 (When it arrives) before i post in the bug section.

Thanks for the help!
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 4th Jan 2009 02:27 Edited at: 4th Jan 2009 02:28
Did you turn up your SW Synth volume?(Windows media player turns down the volume)

Attachments

Login to view attachments
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 4th Jan 2009 02:39 Edited at: 4th Jan 2009 02:41
Sorry for double posting but here's a DBP project to test the midi. If the Sw Synth is turned down it'll automaticlly turn it up for you.


Attachments

Login to view attachments
Siddy
15
Years of Service
User Offline
Joined: 16th Dec 2008
Location:
Posted: 4th Jan 2009 02:56
Thank you very much Ed222,

That was indeed the problem!

For some reason my SW Synth automatically is turned off, however when i play a midi in winamp or windows media player it turns on the SW Synth, but after the song is finished it turns it back off.

Even when i manually turn the SW Synth volume to full, after i play a midi in windows media play after it has finished it turns it back down.

"set music volume 1,100" insures that the sound is on (Thanks for that one!)

Im very happy i ran into this as now i know to always include "set music volume 1,100" as some peoples computer may have SW Synth automatically off.

For reference:

SET MUSIC VOLUME Music Number,Volume

example:

`This will play music number 1 at 100% volume, % greater than 100 can also be used.
SET MUSIC VOLUME 1,100

Login to post a reply

Server time is: 2024-11-25 12:31:21
Your offset time is: 2024-11-25 12:31:21