當前位置: 首頁>>代碼示例>>Java>>正文


Java MultiplyAdd類代碼示例

本文整理匯總了Java中com.jsyn.unitgen.MultiplyAdd的典型用法代碼示例。如果您正苦於以下問題:Java MultiplyAdd類的具體用法?Java MultiplyAdd怎麽用?Java MultiplyAdd使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MultiplyAdd類屬於com.jsyn.unitgen包,在下文中一共展示了MultiplyAdd類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: WindCircuit

import com.jsyn.unitgen.MultiplyAdd; //導入依賴的package包/類
public WindCircuit()
{
	/*
	 * Create various unit generators and add them to circuit.
	 */
	add( myNoise = new WhiteNoise() );
	add( myFilter = new FilterStateVariable() );
	add( myLFO = new RedNoise() );
	add( myScalar = new MultiplyAdd() );

	/* Make ports on internal units appear as ports on circuit. */
	/* Optionally give some circuit ports more meaningful names. */
	addPort( noiseAmp = myNoise.amplitude, "NoiseAmp" );
	addPort( modRate = myLFO.frequency, "ModRate" );
	addPort( modDepth = myScalar.inputB, "ModDepth" );
	addPort( cutoff = myScalar.inputC, "Cutoff" );
	addPort( resonance = myFilter.resonance );
	addPort( amplitude = myFilter.amplitude );
	addPort( output = myFilter.output );

	/* Connect SynthUnits to make control signal path. */
	myLFO.output.connect( myScalar.inputA );
	myScalar.output.connect( myFilter.frequency );
	/* Connect SynthUnits to make audio signal path. */
	myNoise.output.connect( myFilter.input );

	/* Set ports to useful values and ranges. */
	noiseAmp.setup( 0.0, 0.3, 0.4 );
	modRate.setup( 0.0, 1.0, 10.0 );
	modDepth.setup( 0.0, 300.0, 1000.0 );
	cutoff.setup( 0.0, 600.0, 1000.0 );
	resonance.setup( 0.0, 0.066, 0.2 );
	amplitude.setup( 0.0, 0.9, 0.999 );
}
 
開發者ID:WiredProgrammers,項目名稱:collegeProjects,代碼行數:35,代碼來源:WindCircuit.java

示例2: WindCircuit

import com.jsyn.unitgen.MultiplyAdd; //導入依賴的package包/類
public WindCircuit() {
    /*
     * Create various unit generators and add them to circuit.
     */
    add(myNoise = new WhiteNoise());
    add(myFilter = new FilterStateVariable());
    add(myLFO = new RedNoise());
    add(myScalar = new MultiplyAdd());

    /* Make ports on internal units appear as ports on circuit. */
    /* Optionally give some circuit ports more meaningful names. */
    addPort(noiseAmp = myNoise.amplitude, "NoiseAmp");
    addPort(modRate = myLFO.frequency, "ModRate");
    addPort(modDepth = myScalar.inputB, "ModDepth");
    addPort(cutoff = myScalar.inputC, "Cutoff");
    addPort(resonance = myFilter.resonance);
    addPort(amplitude = myFilter.amplitude);
    addPort(output = myFilter.output);

    /* Connect SynthUnits to make control signal path. */
    myLFO.output.connect(myScalar.inputA);
    myScalar.output.connect(myFilter.frequency);
    /* Connect SynthUnits to make audio signal path. */
    myNoise.output.connect(myFilter.input);

    /* Set ports to useful values and ranges. */
    noiseAmp.setup(0.0, 0.3, 0.4);
    modRate.setup(0.0, 1.0, 10.0);
    modDepth.setup(0.0, 300.0, 1000.0);
    cutoff.setup(0.0, 600.0, 1000.0);
    resonance.setup(0.0, 0.066, 0.2);
    amplitude.setup(0.0, 0.9, 0.999);
}
 
開發者ID:philburk,項目名稱:jsyn,代碼行數:34,代碼來源:WindCircuit.java


注:本文中的com.jsyn.unitgen.MultiplyAdd類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。