Announcement

Collapse
No announcement yet.

Play MIDI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Play MIDI

    Any samples of playing MIDI files from PBDLL5 ????

  • #2
    kjRamsey:
    This has got to be the oldest unanswered question on the BBS, certainly the oldest I have come across. Anyways, I have an answer. Better late than never, I suppose. The following code works great in PBDLL 6.0, but it consists of direct API calls so it should work fine in PB5.

    MCISendString "open type midiaudio", BYVAL 0, 0, 0
    MCISendString "PLAY c:\test.mid", BYVAL 0, 0, 0

    To stop the midi and free the MIDI out device:
    MCISendString "STOP c:\test.mid", BYVAL 0, 0, 0
    MCISendString "CLOSE type midiaudio", BYVAL 0, 0, 0

    You'll need to replace c:\test.mid with the name of a MIDI file on your system of course.
    Let me know how it goes.
    Danny.

    ------------------

    Comment


    • #3
      Danny,

      Thanks for posting this example, it works fine.

      Regards,

      [email protected]

      ------------------
      hutch at movsd dot com
      The MASM Forum

      www.masm32.com

      Comment


      • #4
        originally posted by danny faris:
        this has got to be the oldest unanswered question on the bbs, certainly the oldest i have come across. anyways, i have an answer. better late than never, i suppose.
        actually this is one of the oldest *answered* questions!

        the answer was carefully secreted away in the source code forum dated november 1998. it also shows how to launch avi files too -


        ------------------
        lance
        powerbasic support
        mailto:[email protected][email protected]</a>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Some days ago I posted a sample (#2), which plays AVI from resource.
          The same code should work for all multimedia files.
          (it's enough to change "type")

          ------------------

          Comment

          Working...
          X