Computing.Net > Forums > Programming > MIDI events in VC++

MIDI events in VC++

Reply to Message Icon

Original Message
Name: Nil_IQ
Date: October 12, 2006 at 02:33:23 Pacific
Subject: MIDI events in VC++
OS: Win XP
Comment:

Hi.

I am a university student working on my final year project, and need to know whether I am on the right track before continuing any further. What I am trying to do is make a program which can recieve signals from a MIDI drum, and then output that signal in some form or other on the screen (the data from the drum should be a series of bytes).

I have been informed that MIDI events are recognised as windows events, and that in order to show the contents of the signal I would simply have to find out which event I need to be looking for.

Is this correct? Are MIDI events recognised by windows? If not, is there another way to detect incoming MIDI data in VC++?

If anyone could answer any or all of these questions, I would very much appreciate it.

Thanks in advance,

Nil


Report Offensive Message For Removal


Response Number 1
Name: wizard-fred
Date: October 12, 2006 at 03:20:32 Pacific
Reply: (edit)

It appears that you have not done your basic research regarding MIDI. The events are basically an encoded serial data stream containing commands for various functions.

If you use a driver then Windows will receive the data stream and try to pass it to an application. You didn't specify what kind of output and how you want it displayed. MIDI is also used as a controller to control lighting and audio level and positioning during a performance.

Although it is conventionally done at a speed of 31.5 kilobaud there has been work in transmitting the signal over ethernet (much higher bandwidth, less latency, more devices). Remember the encoder/decoder is essentially an analog modem.

If you don't separate the data stream you will get a mixture of music data mixed with command data.

There are software that does what you are trying to do both free and for purchase on the net, some with source. Perhaps you should connect your drum machine to some standard application and inspect the results. There are also MIDI user groups and forums for different MIDI devices.


Report Offensive Follow Up For Removal

Response Number 2
Name: pingy
Date: October 26, 2006 at 10:28:36 Pacific
Reply: (edit)

Hello Nil IQ,

I think you are confsed by the word "event".
When you hit the Drum, it's MIDI interface generates a stream of bytes. These are called an event. The same happens when you hit a key on a MIDI keyboard. There is no direct relation to an event generated in Window's code. In code you have to react to an event (this is a software event and not a MIDI event) which is, for instance, generated by DirectX which receives the MIDI byte stream. This software event could contain the information regarding the MIDI event. So search the internet for some MIDI toolkit which you can youse in VC++ because once you can react to the sofware event, you'll have to disect the MIDI event in components you could use. Next to events, MIDI can contain control messages and so called System Exclusive messages. So another tip is: figure out what MIDI exactly is and see what components are usefull to your application.

Good luck


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: MIDI events in VC++

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge