示例#1
0
void CMfxEvent::setToDefaults()
{
	SetTime( 0 );
	SetPort( 0 );
	SetChannel( 0 );

	switch (GetType())
	{
		case Note:
			SetKey( 60 );
			SetVel( 64 );
			SetDur( 120 );
			break;

		case KeyAft:
			SetKey( 60 );
			SetPressure( 0 );
			break;

		case Control:
			SetCtrlNum( CTL_MODULATION );
			SetCtrlVal( 0 );
			break;

		case Patch:
			SetBankSelectMethod( Normal );
			SetBank( BANK_NONE );
			SetPatch( 0 );
			break;

		case ChanAft:
			SetPressure( 0 );
			break;

		case Wheel:
			SetWheel( 0 );
			break;

		case RPN:
		case NRPN:
			SetCtrlNum( 0 );
			SetCtrlVal( 0 );
			break;

		case Sysx:
		case Text:
		case Lyric:
			m_hBuffer = NULL;
			break;

		case MuteMask:
			m_mfxChannel = 0;
			m_maskSet = 0;
			m_maskClear = 0;
			break;

		case VelOfs:
		case KeyOfs:
			m_mfxChannel = 0;
			m_nOfs = 0;
			break;

		case VelTrim:
		case KeyTrim:
			m_mfxChannel = 0;
			m_nTrim = 0;
			break;

		case ShortMsg:
			m_dwShortMsg = 0;
			break;
			
		default:
			ASSERT(FALSE);
			break;
	}
}
示例#2
0
void SetDur7(GtkAction *action, gpointer param){
  SetDur(7);
}
示例#3
0
void SetDur8(GtkAction *action, gpointer param){
  SetDur(8);
}
示例#4
0
void SetDur5(GtkAction *action, gpointer param){
  SetDur(5);
}
示例#5
0
void SetDur6(GtkAction *action, gpointer param){
  SetDur(6);
}
示例#6
0
void SetDur4(GtkAction *action, gpointer param){
  SetDur(4);
}
示例#7
0
void SetDur3(GtkAction *action, gpointer param){
  SetDur(3);
}
示例#8
0
void SetDur2(GtkAction *action, gpointer param){
  SetDur(2);
}
示例#9
0
void SetDur1(GtkAction *action, gpointer param){
  SetDur(1);
}
示例#10
0
void SetDur0(GtkAction *action, gpointer param){
  SetDur(0);
}