Results 1 to 5 of 5

Thread: Midi Files

  1. #1

    Midi Files

    I thought I posted this yesterday, but I can't see the thread anywhere....

    Can I play Midi files using DirectSound? Or do I have to use TMediaPlayer?

    Thanks
    http://www.c5software.co.uk (site is being developed at the moment)

  2. #2

    Midi Files

    I think you can use DirectMusic for playing midi files.
    [size=10px][ Join us in #pgd on irc.freenode.net ] [ Sign the Petition for a Software Patent Free Europe ][/size]

  3. #3

    Midi Files

    Ok, I read a lot about DirectSound and DirectMusic and I found nothing about playing external MIDIs - only for generating ones. As I know, DirectSound/DirectMusic don't support any external file type but there are libraries which can be used - or you can write your own procedure for reading wave or MIDI. I cannot write such procedure. Do you know any .pas files available for download, which provide such functions?
    http://www.kaldata.net

  4. #4

    Midi Files

    You can definitely play midi files with DirectMusic. I forget exactly how, since I don't have the example code to hand, but I think it's just a matter of using loading the tune up with IDirectMusicLoader8.LoadObjectFromFile and then playing the segment w/ IDirectMusicPerformance8.PlaySegment(Ex).
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  5. #5

    Midi Files

    DirectSound itself doesn't support any external files, it only provides access to wave output devices on system, but DirectMusic plays midi and wav files directly - through it's loader object. DirectMusic supports also sgt and sgp files (DirectMusic native file format), those files are a bit like midi but they can also contain samples for instruments so it's a bit like mod or xms.

    You can even play MP3,OGG or any format as long as appropriate audio compression codec is installed and file has standard RIFF header which identificates which codec DirectMusic should use.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL