示例#1
0
	void onAudio(AudioIOData& io){

		// Set the frequency, in Hz
		buzz.freq(55);

		mod.period(16);

		while(io()){

			int nh = mod.triU() * 64;

			// Set number of harmonics
			buzz.harmonics(nh);
	
			float s = buzz() * 0.2;

			io.out(0) = s;
			io.out(1) = s;
		}
	}
void audioCB(AudioIOData& io){

	while(io()){
	
		int nh = mod.triU() * 64;
		buzz.harmonics(nh);
	
		float s = buzz();

		io.out(0) = io.out(1) = s*0.2;
	}
}