当前位置: 首页>>代码示例>>C++>>正文


C++ maxiOsc::sinewave方法代码示例

本文整理汇总了C++中maxiOsc::sinewave方法的典型用法代码示例。如果您正苦于以下问题:C++ maxiOsc::sinewave方法的具体用法?C++ maxiOsc::sinewave怎么用?C++ maxiOsc::sinewave使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在maxiOsc的用法示例。


在下文中一共展示了maxiOsc::sinewave方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: play

void play(double *output) {
    
    //Using the phasor we can create a ramp, and use this ramp to set the frequency of one of the waves.
    //When the frequency of the lower waveform passes over the threshold of 20hz, we start to hear two new waveforms.
    //The frequency of the first new wave is the sum of the two original waves.
    //The frequency of the second new wave is the difference of the two original waves.
    //So you hear two new waves, one going up, one going down.
    
    output[0]=mySine.sinewave(440)*myOtherSine.sinewave(myPhasor.phasor(0.01,0,440));
    output[1]=output[0];
    
}
开发者ID:Craigson,项目名称:Maximilian,代码行数:12,代码来源:4.AM2.cpp

示例2: play

void play(double *output) {
	
	CurrentCount=myCounter.phasor(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.
	
	if (CurrentCount<5)//simple if statement
		
		myOscOutput=mySwitchableOsc.square(CurrentCount*100);
	
	else if (CurrentCount>=5)//and the 'else' bit.
		
		myOscOutput=mySwitchableOsc.saw(CurrentCount*50);//one osc object can produce whichever waveform you want. 
	
	if (CurrentCount==1) 
		
		myEnvelope.trigger(0,myEnvelopeData[0]); //trigger the envelope
	
	myFilteredOutput=myFilter.lores(myOscOutput,(myEnvelope.line(6, myEnvelopeData)),10);//lores takes an audio input, a frequency and a resonance factor (1-100)
	
	myPanPosition=myAutoPanner.sinewave(1);
	
	myOutputs.stereo(myFilteredOutput,myStereoOutput,myPanPosition);//Stereo, Quad or 8 Channel. Specify the input to be mixed, the output[numberofchannels], and the pan (0-1,equal power).	
	output[0]=myStereoOutput[0];//When working with mixing, you need to specify the outputs explicityly
	output[1]=myStereoOutput[1];//
	
}
开发者ID:Clivia,项目名称:Maximilian,代码行数:25,代码来源:11.Mixing.cpp

示例3: play

void play(double *output) {
    
    
    myOutputs.stereo(myOsc.noise(),myStereoOutput,(myAutoPanner.sinewave(1)+1)/2);//Stereo, Quad or 8 Channel. Specify the input to be mixed, the output[numberofchannels], and the pan (0-1,equal power).
    output[0]=myStereoOutput[0];//When working with mixing, you need to specify the outputs explicitly
    output[1]=myStereoOutput[1];//
    
}
开发者ID:Craigson,项目名称:Maximilian,代码行数:8,代码来源:11.Mixing.cpp

示例4: play

void play(double *output) {
	
	CurrentCount=myCounter.phasor(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.

// here we use a conditional to make something happen at a specific time.	

	if (CurrentCount<5)//simple if statement
		
		myOscOutput=mySwitchableOsc.square(CurrentCount*100);
	
	else if (CurrentCount>=5)//and the 'else' bit.
		
		myOscOutput=mySwitchableOsc.sinewave(CurrentCount*50);//one osc object can produce whichever waveform you want. 
	
    output[0]=myOscOutput;
    output[1]=output[0];

}
开发者ID:Craigson,项目名称:Maximilian,代码行数:18,代码来源:8.Counting3.cpp

示例5: play

void play(double *output) {
    
    myClock.ticker(); // This makes the clock object count at the current samplerate
    
    //This is a 'conditional'. It does a test and then does something if the test is true 

    if (myClock.tick) { // If there is an actual tick at this time, this will be true.
        
        freq+=100; // DO SOMETHING
        
    } // The curly braces close the conditional
    
    //output[0] is the left output. output[1] is the right output
    
    output[0]=mySine.sinewave(freq);//simple as that!
    output[1]=output[0];

}
开发者ID:Craigson,项目名称:Maximilian,代码行数:18,代码来源:7.Counting1.cpp

示例6: play

void play(double *output) {
	
	myCurrentVolume=myEnvelope.line(4,myEnvelopeData);
	
	CurrentCount=myCounter.phasor(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.
	
	if (CurrentCount<5)//simple if statement
		
		myOscOutput=mySwitchableOsc.square(CurrentCount*100);
	
	else if (CurrentCount>=5)//and the 'else' bit.
		
		myOscOutput=mySwitchableOsc.sinewave(CurrentCount*50);//one osc object can produce whichever waveform you want. 
	
	if (CurrentCount==1) 
		
		myEnvelope.trigger(0,myEnvelopeData[0]); //trigger the envelope
	
	*output=myOscOutput*myCurrentVolume;//point me at your speakers and fire.
}
开发者ID:Clivia,项目名称:Maximilian,代码行数:20,代码来源:9.Envelopes.cpp

示例7: play

void play(double *output) {//this is where the magic happens. Very slow magic.
	
	*output=mySine.sinewave(440);//simple as that! 
	
}
开发者ID:Clivia,项目名称:Maximilian,代码行数:5,代码来源:1.TestTone.cpp

示例8: play

void play(double *output) {

    output[0]=mySine.sinewave(440);
    output[1]=output[0];
    
}
开发者ID:Craigson,项目名称:Maximilian,代码行数:6,代码来源:1.TestTone.cpp

示例9: play

void play(double *output) {
    
    output[0]=mySine.sinewave(myOtherSine.sinewave(myLastSine.sinewave(0.1)*30)*440);//awesome bassline
    output[1]=output[0];

}
开发者ID:Craigson,项目名称:Maximilian,代码行数:6,代码来源:6.FM2.cpp

示例10: play

void play(double *output) {
	
	*output=mySine.sinewave(myOtherSine.sinewave(1)*440);
	
}
开发者ID:Clivia,项目名称:Maximilian,代码行数:5,代码来源:5.FM1.cpp


注:本文中的maxiOsc::sinewave方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。