예제 #1
0
파일: dsp.c 프로젝트: cjxgm/oversynth
void process_midi(size_t frame, uint8_t ev[3])
{
	if (ev[0] == 0xb0 && ev[1] == 0x7f) {			// controller no. 127
		alpha = 1.0f - ev[2] / 127.0f;	//-make alpha goes slower when
		alpha = 1.0f - alpha * alpha;	// reaching 1
		comp_alpha = 1.0f - alpha;		//-complementary of alpha

		printf("alpha = %4.4f", alpha);
		if (ev[2] == 0) puts("  original sound");
		else if (ev[2] == 0x7f) puts("  complete silence");
		else putchar('\n');
	}
	else if (ev[0] == 0xb0 && ev[1] == 0x7e) {		// controller no. 126
		note_duration = ev[2] / 31.0f;
		printf("len = %2.2f\n", note_duration);
	}
	else if (ev[0] >= 0x90 && ev[0] <= 0xa0) {		// note on in channel 0
		sound_select(ev[0] - 0x90);
		synth_add(ev[1], note_duration, ev[2] / 127.0f);
		printf("note = %2.2x    vol %2.2f    sound %x\n",
				ev[1], ev[2] / 127.0f, ev[0]-0x90);
	}
//	else printf("unknown: %2.2x: %2.2x(% 3d) %2.2x(% 3d)\n",
//			ev[0], ev[1], ev[1], ev[2], ev[2]);
}
예제 #2
0
파일: speakup_acntpc.c 프로젝트: 7799/linux
static int __init acntpc_init(void)
{
	return synth_add(&synth_acntpc);
}
static int __init spkout_init(void)
{
	return synth_add(&synth_spkout);
}
static int __init audptr_init(void)
{
	return synth_add(&synth_audptr);
}
예제 #5
0
static int __init decpc_init(void)
{
	return synth_add(&synth_dec_pc);
}
예제 #6
0
static int __init dtlk_init(void)
{
	return synth_add(&synth_dtlk);
}
예제 #7
0
static int __init decext_init(void)
{
	return synth_add(&synth_decext);
}
예제 #8
0
static int __init apollo_init(void)
{
	return synth_add(&synth_apollo);
}
static int __init keypc_init(void)
{
	return synth_add(&synth_keypc);
}
예제 #10
0
static int __init txprt_init(void)
{
	return synth_add(&synth_txprt);
}
예제 #11
0
static int __init bns_init(void)
{
	return synth_add(&synth_bns);
}
예제 #12
0
static int __init soft_init(void)
{
	return synth_add(&synth_soft);
}
예제 #13
0
static int __init acntsa_init(void)
{
	return synth_add(&synth_acntsa);
}