Create a midi file using vb
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Create a midi file using vb

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    Create a midi file using vb

    I am doing a mini vb program on midi files. I need help on how to create a midi file that only plays the musical notes. When the user press a key like C or A, the proocedure simply generate a midi tone that corresponds to only the pressed character and after ward saved the press character in midi form

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,782

    Re: Create a midi file using vb

    You can get the key pressed in the keypressed event or you can use the keydown or KeyUp events beyond that would need more info from you.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,873

    Re: Create a midi file using vb

    the MIDI format is available for download, except that it is over 900 pages of text.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Feb 2014
    Posts
    6

    Re: Create a midi file using vb

    I've just done some work on this. Not sure if it's bisuitable for you, but my code accepts a table of values as a parameter and converts it into a MIDI file. It doesn't play the notes though. I'm currently using a program called MIDIox to handle the MIDI in and out streams. It's freeware and a really useful MIDI debugging tool. If you add a reference to that in your program, you can just call a method to send MIDI notes. There a good section on scripting in the MIDIox help text. If you have a lookup from ASCII value to MIDI out code, you can just output that. Eg, ASCII 67 for C might be note 60 (middle C in MIDI). Hope this helps. This is a good resource on the MIDI file format: http://www.fileformat.info/format/midi/corion.htm.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center