コード例 #1
0
ファイル: midinotes.c プロジェクト: jambonbill/MB.C64Keyboard
/////////////////////////////////////////////////////////////////////////////
// ALL_NOTE_OFF
/////////////////////////////////////////////////////////////////////////////
void ALL_NOTE_OFF(){//KILL EVERY NOTES 
	//MIOS_MIDI_TxBufferPut(0xB0);//Controller Chn 1
	unsigned char i=0;
	for(i=0;i<15;i++){
		MIOS_MIDI_TxBufferPut(176 + i);//Controller Chn i
		MIOS_MIDI_TxBufferPut(123);//ALL NOTE OFF // http://www.borg.com/~jglatt/tech/midispec/ctllist.htm
		MIOS_MIDI_TxBufferPut(0x00);
	}
	return;
}
コード例 #2
0
ファイル: din_vel.c プロジェクト: glocklueng/mios-org
/////////////////////////////////////////////////////////////////////////////
// This function should be called from DIN_NotifyToggle() in main.c
/////////////////////////////////////////////////////////////////////////////
void DIN_VEL_NotifyToggle(unsigned char pin, unsigned char pin_value)
{
  // all even pin numbers are active when a button has been released
  // all odd pin numbers are active when a button has been pressed

  // delays are already measured in DIN_VEL_Tick(), so we only need
  // to react on the "pressed contact" (odd pin number)
  if( pin & 1 ) {
    if( pin_value == 0 ) {

      last_button = pin >> 1;

      // scale velocity counter
      last_velocity = velocity_table[din_velocity[last_button]];

      // send Note On at channel 1
      MIOS_MIDI_BeginStream();
      MIOS_MIDI_TxBufferPut(0x90);
      MIOS_MIDI_TxBufferPut(last_button + 0x24); // C-2 is the first button
      MIOS_MIDI_TxBufferPut(last_velocity);
      MIOS_MIDI_EndStream();

    } else {