From 5a6a77c2d5c60d7092d832876b34c1410b7b2abd Mon Sep 17 00:00:00 2001 From: kevinstadler Date: Tue, 26 Sep 2023 14:45:46 +0200 Subject: [PATCH] Fix web reference documentation --- src/processing/sound/Analyzer.java | 2 +- src/processing/sound/BeatDetector.java | 7 +++---- src/processing/sound/Filter.java | 2 +- src/processing/sound/PitchDetector.java | 12 +++++------- src/processing/sound/SoundObject.java | 4 ++-- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/processing/sound/Analyzer.java b/src/processing/sound/Analyzer.java index be10189..0d885ab 100644 --- a/src/processing/sound/Analyzer.java +++ b/src/processing/sound/Analyzer.java @@ -8,7 +8,7 @@ * Common superclass of all audio analysis classes * @webref Analysis */ -abstract class Analyzer { +public abstract class Analyzer { protected SoundObject input; diff --git a/src/processing/sound/BeatDetector.java b/src/processing/sound/BeatDetector.java index 0c4ced1..5fb2331 100644 --- a/src/processing/sound/BeatDetector.java +++ b/src/processing/sound/BeatDetector.java @@ -43,14 +43,13 @@ protected void setInput(UnitOutputPort input) { } /** - * Returns whether or not the current moment of audio contains a beat or not. - * A "beat" is defined as a spike in the energy of the audio signal — it may + * Returns true if the current moment of the audio signal + * contains a beat, false otherwise.
+ * A "beat" is defined as a spike in the energy of the audio signal - it may * or may not coincide exactly with a musical beat. * * @webref Analysis:BeatDetector * @webBrief Returns whether or not the current moment of audio contains a beat or not. - * - * @return True if the audio signal currently contains a beat, false otherwise. */ public boolean isBeat() { return this.detector.current.getValue() == 1; diff --git a/src/processing/sound/Filter.java b/src/processing/sound/Filter.java index c1602fb..1c88c1a 100644 --- a/src/processing/sound/Filter.java +++ b/src/processing/sound/Filter.java @@ -6,7 +6,7 @@ import processing.core.PApplet; // common superclass for JSyn filters that have a 'Q' unitport -abstract class Filter extends Effect { +public abstract class Filter extends Effect { public Filter(PApplet parent) { super(parent); diff --git a/src/processing/sound/PitchDetector.java b/src/processing/sound/PitchDetector.java index 4108fd7..b6673d8 100644 --- a/src/processing/sound/PitchDetector.java +++ b/src/processing/sound/PitchDetector.java @@ -7,11 +7,11 @@ /** * Detects the pitch (also known as the 'fundamental frequency') of a sound * signal. For complex signals this is not a trivial task, so the analyzer only - * returns a frequency measurement (measured in Hertz, or 'Hz') when its - * measurement exceeds a 'confidence level' that can be specified by the user. + * returns a frequency measurement (measured in Hertz) when its measurement + * exceeds a 'confidence level' that can be specified by the user. * + * @webref Analysis:PitchDetector * @webBrief Detects the fundamental frequency of a sound signal - * @webref */ public class PitchDetector extends Analyzer { private final com.jsyn.unitgen.PitchDetector detector; @@ -19,9 +19,7 @@ public class PitchDetector extends Analyzer { private float minimumConfidence = 0.8f; /** - * Creates a new PitchDetector object. - * - * @param parent Typically "this" + * @param parent typically "this" * @param minimumConfidence the minimum confidence level required for * frequency measurements, between 0 (accept all measurements, no matter how * unreliable) to 1 (only accept perfect measurements). Defaults to 0.8. @@ -56,6 +54,7 @@ public float analyze() { * Returns an estimate of the current pitch (or 'fundamental frequency') of * the input sound signal, in Hertz. If the confidence in the current * measurement does not exceed the minimum confidence, this method returns 0. + * @webref Analysis:PitchDetector * @webBrief Detect the fundamental frequency of the input sound signal. * @param minimumConfidence the minimum confidence level required for * frequency measurements, between 0 (accept all measurements, no matter how @@ -63,7 +62,6 @@ public float analyze() { * confidence level specified when this PitchDetector was created. * @param target a float array of length 2 that will be filled with the * frequency and confidence in that frequency measurement - * @webref */ public float analyze(float minimumConfidence) { return (float) (this.detector.confidence.getValue() >= minimumConfidence ? this.detector.frequency.getValue() : 0.0); diff --git a/src/processing/sound/SoundObject.java b/src/processing/sound/SoundObject.java index ec02e03..59945ff 100644 --- a/src/processing/sound/SoundObject.java +++ b/src/processing/sound/SoundObject.java @@ -55,7 +55,7 @@ public void add(float add) { * @param amp * A float value between 0.0 (complete silence) and 1.0 (full volume) * controlling the amplitude/volume of this sound. - * @webref SoundObject:SoundObject + * @webref SoundObject **/ public void amp(float amp) { if (Engine.checkAmp(amp)) { @@ -82,7 +82,7 @@ public boolean isPlaying() { * @param pos * The panoramic position of this sound unit as a float from -1.0 * (left) to 1.0 (right). - * @webref SoundObject:SoundObject + * @webref SoundObject **/ public void pan(float pos) { if (this.circuit.processor == null) {