diff options
author | Phil Burk <[email protected]> | 2016-11-30 19:02:58 -0800 |
---|---|---|
committer | Phil Burk <[email protected]> | 2016-11-30 19:02:58 -0800 |
commit | 2785ec51000f9dd7a7640f1a4edb69f541d757f1 (patch) | |
tree | 7b5ab76a669bf0b92b5d13109076c145af0f904c /src/com/jsyn/data/DoubleTable.java | |
parent | 5cc223574b43d3f72b746e8f0bb4f31cbd2fd52f (diff) |
cleanup for 16.7.8, doc MultiChannelSynthesizer, add DoubleTable.length()
Diffstat (limited to 'src/com/jsyn/data/DoubleTable.java')
-rw-r--r-- | src/com/jsyn/data/DoubleTable.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/jsyn/data/DoubleTable.java b/src/com/jsyn/data/DoubleTable.java index 0a34a95..ca64c94 100644 --- a/src/com/jsyn/data/DoubleTable.java +++ b/src/com/jsyn/data/DoubleTable.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. @@ -21,7 +21,7 @@ import com.jsyn.exceptions.ChannelMismatchException; /** * Evaluate a Function by interpolating between the values in a table. This can be used for * wavetable lookup or waveshaping. - * + * * @author Phil Burk (C) 2010 Mobileer Inc */ public class DoubleTable implements Function { @@ -60,6 +60,10 @@ public class DoubleTable implements Function { table = new double[numFrames]; } + public int length() { + return table.length; + } + public void write(double[] data) { write(0, data, 0, data.length); } @@ -79,7 +83,7 @@ public class DoubleTable implements Function { /** * Treat the double array as a lookup table with a domain of -1.0 to 1.0. If the input is out of * range then the output will clip to the end values. - * + * * @param input * @return interpolated value from table */ |