Playing MIDI File in C

Discussion in 'C Programming' started by ravi, Dec 2, 2007.

  1. ravi

    ravi Guest

    Can anybody tell me you to play MIDI file through a C program ?

    i am using Turbo C++

    Thanks.........
    ravi, Dec 2, 2007
    #1
    1. Advertising

  2. ravi

    santosh Guest

    ravi wrote:

    > Can anybody tell me you to play MIDI file through a C program ?
    >
    > i am using Turbo C++


    Please ask in <news:comp.os.ms-windows.programmer.win32> or one of the
    microsoft.public.* groups. Standard C by itself has no concept of audio
    other than the '\a' escape sequence. You'll have to use a platform
    specific library or API.
    santosh, Dec 2, 2007
    #2
    1. Advertising

  3. ravi

    santosh Guest

    ravi wrote:

    > Can anybody tell me you to play MIDI file through a C program ?
    >
    > i am using Turbo C++
    >
    > Thanks.........


    Also a web search turns up these two links that might help you.

    <http://www.borg.com/~jglatt/tech/winapi.htm>
    <http://www.borg.com/~jglatt/progs/software.htm>

    The first link is a tutorial for Windows MIDI and digital audio and the
    second link contains software for this. See the "Developer's software"
    section at the second link.
    santosh, Dec 2, 2007
    #3
  4. ravi

    jacob navia Guest

    ravi wrote:
    >> Please ask in <news:comp.os.ms-windows.programmer.win32> or one of the
    >> microsoft.public.* groups. Standard C by itself has no concept of audio
    >> other than the '\a' escape sequence. You'll have to use a platform
    >> specific library or API.

    >
    > Decoding the midi file and then play it by directly interfacing with
    > speakers using inportb() function in conio.h or sound() function in
    > dos.h.
    >
    > is it possible or not and if possible then HOW TO DECODE MIDI FILE ?


    It is possible using MSDOS.

    It is NOT possible using windows XP or above.

    It is NOT possible using any 32 bit system.

    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Dec 3, 2007
    #4
  5. ravi

    jacob navia Guest

    jacob navia wrote:
    > ravi wrote:
    >>> Please ask in <news:comp.os.ms-windows.programmer.win32> or one of the
    >>> microsoft.public.* groups. Standard C by itself has no concept of audio
    >>> other than the '\a' escape sequence. You'll have to use a platform
    >>> specific library or API.

    >>
    >> Decoding the midi file and then play it by directly interfacing with
    >> speakers using inportb() function in conio.h or sound() function in
    >> dos.h.
    >>
    >> is it possible or not and if possible then HOW TO DECODE MIDI FILE ?

    >
    > It is possible using MSDOS.
    >
    > It is NOT possible using windows XP or above.
    >
    > It is NOT possible using any 32 bit system.
    >


    Of course I am speaking about using inportb and outportb

    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Dec 3, 2007
    #5
  6. ravi

    jacob navia Guest

    ravi wrote:
    >> It is possible using MSDOS.
    >>
    >> It is NOT possible using windows XP or above.
    >>
    >> It is NOT possible using any 32 bit system.
    >>
    >> --
    >> jacob navia
    >> jacob at jacob point remcomp point fr
    >> logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32

    >
    > Can you tell me how ?
    > I am using MS DOS i.e Turbo C++ 3.0 which is a DOS based C/C++
    > compiler.


    Decoding MIDI is a large software undertaking and would take at
    least 3-4 months to do. And if you do not know how to do that
    I recommend you to document yourself before asking any more
    questions, since if you think someone will explain to you
    how to do that in a mail message you only show your
    ignorance...

    There are decoders of MIDI already done in windows and linux.
    I would recommend you to scrap MSDOS and use those operating
    systems.


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Dec 3, 2007
    #6
  7. ravi

    ravi Guest

    > Please ask in <news:comp.os.ms-windows.programmer.win32> or one of the
    > microsoft.public.* groups. Standard C by itself has no concept of audio
    > other than the '\a' escape sequence. You'll have to use a platform
    > specific library or API.


    Decoding the midi file and then play it by directly interfacing with
    speakers using inportb() function in conio.h or sound() function in
    dos.h.

    is it possible or not and if possible then HOW TO DECODE MIDI FILE ?
    ravi, Dec 3, 2007
    #7
  8. ravi

    ravi Guest

    > It is possible using MSDOS.
    >
    > It is NOT possible using windows XP or above.
    >
    > It is NOT possible using any 32 bit system.
    >
    > --
    > jacob navia
    > jacob at jacob point remcomp point fr
    > logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32


    Can you tell me how ?
    I am using MS DOS i.e Turbo C++ 3.0 which is a DOS based C/C++
    compiler.
    ravi, Dec 3, 2007
    #8
  9. ravi

    ravi Guest

    On Dec 3, 3:30 pm, jacob navia <> wrote:
    > jacob navia wrote:
    > > ravi wrote:
    > >>> Please ask in <news:comp.os.ms-windows.programmer.win32> or one of the
    > >>> microsoft.public.* groups. Standard C by itself has no concept of audio
    > >>> other than the '\a' escape sequence. You'll have to use a platform
    > >>> specific library or API.

    >
    > >> Decoding the midi file and then play it by directly interfacing with
    > >> speakers using inportb() function in conio.h or sound() function in
    > >> dos.h.

    >
    > >> is it possible or not and if possible then HOW TO DECODE MIDI FILE ?

    >
    > > It is possible using MSDOS.

    >
    > > It is NOT possible using windows XP or above.

    >
    > > It is NOT possible using any 32 bit system.

    >
    > Of course I am speaking about using inportb and outportb
    >
    > --
    > jacob navia
    > jacob at jacob point remcomp point fr
    > logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32


    i am taking about decoding midi files.
    ravi, Dec 3, 2007
    #9
  10. ravi

    ravi Guest

    On Dec 3, 3:39 pm, jacob navia <> wrote:
    > ravi wrote:
    > >> It is possible using MSDOS.

    >
    > >> It is NOT possible using windows XP or above.

    >
    > >> It is NOT possible using any 32 bit system.

    >
    > >> --
    > >> jacob navia
    > >> jacob at jacob point remcomp point fr
    > >> logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32

    >
    > > Can you tell me how ?
    > > I am using MS DOS i.e Turbo C++ 3.0 which is a DOS based C/C++
    > > compiler.

    >
    > Decoding MIDI is a large software undertaking and would take at
    > least 3-4 months to do. And if you do not know how to do that
    > I recommend you to document yourself before asking any more
    > questions, since if you think someone will explain to you
    > how to do that in a mail message you only show your
    > ignorance...
    >
    > There are decoders of MIDI already done in windows and linux.
    > I would recommend you to scrap MSDOS and use those operating
    > systems.
    >
    > --
    > jacob navia
    > jacob at jacob point remcomp point fr
    > logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32


    thanks
    ravi, Dec 3, 2007
    #10
  11. ravi

    santosh Guest

    OT - Re: Playing MIDI File in C

    ravi wrote:

    <snip>

    > i am taking about decoding midi files.


    Search the Net for pre-existing libraries for this. They are available
    for most systems, including DOS, Windows and UNIX. However you may have
    additional trouble under DOS. As jacob said, decoding MIDI files
    yourself may be a tedious task and if you knew how to do that, you
    wouldn't be asking here in the first place.
    santosh, Dec 3, 2007
    #11
  12. ravi

    Bartc Guest

    "jacob navia" <> wrote in message
    news:fj0ptd$v9l$...


    > Decoding MIDI is a large software undertaking and would take at
    > least 3-4 months to do. And if you do not know how to do that


    Probably not quite that long. I have some 500 lines of (interpreted, not C)
    code that will print out the notes and durations of all the tracks in a midi
    file, I'm sure not more than a day or so to do.

    You need the note, duration and 'voice' of each note in order to play the
    music.

    To play it's best to use a library; google for KBMIDI.C for examples (for
    MSWindows) of playing the notes. For DOS, you can beep the speaker easily
    enough but it won't be hi-fi.

    Bart
    Bartc, Dec 3, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo Villeneuve

    Java MIDI output device to MIDI Yoke.

    Hugo Villeneuve, Jul 4, 2003, in forum: Java
    Replies:
    0
    Views:
    940
    Hugo Villeneuve
    Jul 4, 2003
  2. Natanael Mignon

    Creating a MIDI file

    Natanael Mignon, Aug 17, 2003, in forum: Java
    Replies:
    4
    Views:
    517
    Natanael Mignon
    Aug 18, 2003
  3. Lyndon
    Replies:
    1
    Views:
    517
    Leonard Blaisdell
    Jul 25, 2005
  4. Gilly
    Replies:
    6
    Views:
    425
    Ken Starks
    May 4, 2008
  5. Asbjørn Bjørnstad
    Replies:
    0
    Views:
    433
    Asbjørn Bjørnstad
    Oct 9, 2008
Loading...

Share This Page