diff options
author | Phil Burk <[email protected]> | 2016-08-02 07:52:17 -0700 |
---|---|---|
committer | Phil Burk <[email protected]> | 2016-10-24 08:29:20 -0700 |
commit | 580fea450ec0982d0bd8be589f00566267e7b0d1 (patch) | |
tree | 0420f768fc7c63208b1720232c447e17af9017af /src/com/jsyn/unitgen/PulseOscillatorBL.java | |
parent | a6583e89166f7477a675cf3094a91b303ba7850a (diff) |
Instruments: add better synth, pitch control
Diffstat (limited to 'src/com/jsyn/unitgen/PulseOscillatorBL.java')
-rw-r--r-- | src/com/jsyn/unitgen/PulseOscillatorBL.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/jsyn/unitgen/PulseOscillatorBL.java b/src/com/jsyn/unitgen/PulseOscillatorBL.java index 43fe27b..c0e234c 100644 --- a/src/com/jsyn/unitgen/PulseOscillatorBL.java +++ b/src/com/jsyn/unitgen/PulseOscillatorBL.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,11 +20,15 @@ import com.jsyn.engine.MultiTable; import com.jsyn.ports.UnitInputPort; /** - * Pulse oscillator that uses two band limited sawtooth oscillators. - * + * Pulse oscillator that uses two band limited sawtooth waveforms. + * * @author Phil Burk (C) 2009 Mobileer Inc */ public class PulseOscillatorBL extends SawtoothOscillatorBL { + /** Controls the duty cycle of the pulse waveform. + * The width varies from -1.0 to +1.0. + * When width is zero the output is a square wave. + */ public UnitInputPort width; public PulseOscillatorBL() { @@ -48,7 +52,7 @@ public class PulseOscillatorBL extends SawtoothOscillatorBL { double val2 = multiTable.calculateSawtooth(phase2, positivePhaseIncrement, flevel); /* - * Need to adjust amplitude based on positive phaseInc. little less than half at + * Need to adjust amplitude based on positive phaseInc and width. little less than half at * Nyquist/2.0! */ double scale = 1.0 - positivePhaseIncrement; |