home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sound Sensations!
/
sound_sensations.iso
/
demos
/
midif
/
silence.c
< prev
next >
Wrap
Text File
|
1988-09-03
|
876b
|
36 lines
/*********************************************************************
*
* silence 01 Aug 88 Copyright (c) 1988 cMIDI
*
* cMIDI function library demonstration. File 2 of 20.
*
*********************************************************************/
#include <cmidi.h>
main()
{
struct cm_message m1, m2;
int channel;
/* Open cmidi */
CmidiOpen();
/* Create all notes off messages. */
m1.status = m2.status = MIDI_CONTROL_CHANGE;
m1.data1 = 0x7b;
m1.data2 = 0x00;
m2.data1 = 0x7c;
m2.data2 = 0x00;
/* On each midi channel */
for (channel=0; channel<=15; channel++)
{
m1.status = m2.status = (m1.status & 0xf0) | channel;
TxMidiChan( m1 );
TxMidiChan( m2 );
}
/* Close cmidi */
CmidiClose( CLOSE_PRINT_ERRORS | CLOSE_RESET_MPU );
}