当前位置: 首页>>代码示例>>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;未经允许,请勿转载。