MIDI Programming HELP! 
Author Message
 MIDI Programming HELP!

Hi, all-
    I'm trying to write a program (in VB or C) to send MIDI commands to
a sound card.  I've found some C code, and some VB code (using API calls
from the mmsystem) that looks like what I need.  With both of these, I
can initialize the soundcard (I think), and send commands to it, but I
don't think I'm sending the right commands to it to get sound out.  So,
what I'm looking for is either source code, or a list of the commands I
send to the card to get a note to go on.  If I can get smoe audible
result, I can go from there.  Following are the steps (commands) I send
to the sound card now:
1. Initialize the card.  (This is Status Byte 0xFF, I think)
2. Set Channel 1 to program 1. (this is Status Byte 0xC0, followed by
Data Byte 0x01)
3. Send a Note on event for channel 1. (Status Byte 0x90, Data Bytes
0x40 and 0x7F)

If anyone sees a step I'm missing, or has code that will allow me to get
audible results from lower-level calls to a sound card in VB or C, I
would greatly appreciate any help.  I'm not looking for a way to load an
entire MIDI song into a buffer, and then play it.  I need to be able to
create the MIDI stream in real-time.

Again, Thanks in advance for any help.

-Jeff Mitchell



Mon, 25 Jun 2001 03:00:00 GMT  
 MIDI Programming HELP!
And your question about C++ is ...

Paul Lutus

Quote:

>Hi, all-
>    I'm trying to write a program (in VB or C) to send MIDI commands to
>a sound card.  I've found some C code, and some VB code (using API calls
>from the mmsystem) that looks like what I need.  With both of these, I
>can initialize the soundcard (I think), and send commands to it, but I
>don't think I'm sending the right commands to it to get sound out.  So,
>what I'm looking for is either source code, or a list of the commands I
>send to the card to get a note to go on.  If I can get smoe audible
>result, I can go from there.  Following are the steps (commands) I send
>to the sound card now:
>1. Initialize the card.  (This is Status Byte 0xFF, I think)
>2. Set Channel 1 to program 1. (this is Status Byte 0xC0, followed by
>Data Byte 0x01)
>3. Send a Note on event for channel 1. (Status Byte 0x90, Data Bytes
>0x40 and 0x7F)

>If anyone sees a step I'm missing, or has code that will allow me to get
>audible results from lower-level calls to a sound card in VB or C, I
>would greatly appreciate any help.  I'm not looking for a way to load an
>entire MIDI song into a buffer, and then play it.  I need to be able to
>create the MIDI stream in real-time.

>Again, Thanks in advance for any help.

>-Jeff Mitchell



Mon, 25 Jun 2001 03:00:00 GMT  
 MIDI Programming HELP!
Do this...

Quote:
> 2. Set Channel 1 to program 1. (this is Status Byte 0xC0, followed by
> Data Byte 0x01)

midiOutShortMsg(devId, 0x01C0)

Quote:
> 3. Send a Note on event for channel 1. (Status Byte 0x90, Data Bytes
> 0x40 and 0x7F)

midiOutShortMsg(devId, 0x7F4090) where 7F is velocity

JAA



Mon, 25 Jun 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help with MIDI program in C

2. Sample graphics and MIDI programs in LCC-Win32

3. C Programming for MIDI

4. editing program to contain MIDI capability

5. MIDI Programming

6. C SOURCES TO PROGRAM MIDI CARD (SBPR

7. New Group Proposal - MIDI programming

8. MIDI programming in C

9. Draft FAQ: Mac/MIDI Programming In C

10. Midi programming (cross

11. Programming MIDI on SoundBlaster

12. HELP:how send sysex messages to midi device?

 

 
Powered by phpBB® Forum Software