Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating typedoc link syntax #1236

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tone/component/analysis/Analyser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {
}

/**
* Run the analysis given the current settings. If [[channels]] = 1,
* it will return a Float32Array. If [[channels]] > 1, it will
* Run the analysis given the current settings. If {@link channels} = 1,
* it will return a Float32Array. If {@link channels} > 1, it will
* return an array of Float32Arrays where each index in the array
* represents the analysis done on a channel.
*/
Expand Down Expand Up @@ -128,7 +128,7 @@ export class Analyser extends ToneAudioNode<AnalyserOptions> {

/**
* The number of channels the analyser does the analysis on. Channel
* separation is done using [[Split]]
* separation is done using {@link Split}
*/
get channels(): number {
return this._analysers.length;
Expand Down
6 changes: 3 additions & 3 deletions Tone/component/analysis/FFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class FFT extends MeterBase<FFTOptions> {

/**
* Gets the current frequency data from the connected audio source.
* Returns the frequency data of length [[size]] as a Float32Array of decibel values.
* Returns the frequency data of length {@link size} as a Float32Array of decibel values.
*/
getValue(): Float32Array {
const values = this._analyser.getValue() as Float32Array;
Expand All @@ -60,7 +60,7 @@ export class FFT extends MeterBase<FFTOptions> {

/**
* The size of analysis. This must be a power of two in the range 16 to 16384.
* Determines the size of the array returned by [[getValue]] (i.e. the number of
* Determines the size of the array returned by {@link getValue} (i.e. the number of
* frequency bins). Large FFT sizes may be costly to compute.
*/
get size(): PowerOfTwo {
Expand All @@ -81,7 +81,7 @@ export class FFT extends MeterBase<FFTOptions> {
}

/**
* Returns the frequency value in hertz of each of the indices of the FFT's [[getValue]] response.
* Returns the frequency value in hertz of each of the indices of the FFT's {@link getValue} response.
* @example
* const fft = new Tone.FFT(32);
* console.log([0, 1, 2, 3, 4].map(index => fft.getFrequencyOfIndex(index)));
Expand Down
8 changes: 4 additions & 4 deletions Tone/component/analysis/Meter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class Meter extends MeterBase<MeterOptions> {
}

/**
* Use [[getValue]] instead. For the previous getValue behavior, use DCMeter.
* Use {@link getValue} instead. For the previous getValue behavior, use DCMeter.
* @deprecated
*/
getLevel(): number | number[] {
Expand All @@ -90,9 +90,9 @@ export class Meter extends MeterBase<MeterOptions> {

/**
* Get the current value of the incoming signal.
* Output is in decibels when [[normalRange]] is `false`.
* If [[channels]] = 1, then the output is a single number
* representing the value of the input signal. When [[channels]] > 1,
* Output is in decibels when {@link normalRange} is `false`.
* If {@link channels} = 1, then the output is a single number
* representing the value of the input signal. When {@link channels} > 1,
* then each channel is returned as a value in a number array.
*/
getValue(): number | number[] {
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/analysis/Waveform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Waveform extends MeterBase<WaveformOptions> {

/**
* The size of analysis. This must be a power of two in the range 16 to 16384.
* Determines the size of the array returned by [[getValue]].
* Determines the size of the array returned by {@link getValue}.
*/
get size(): PowerOfTwo {
return this._analyser.size;
Expand Down
12 changes: 6 additions & 6 deletions Tone/component/channel/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface ChannelOptions extends ToneAudioNodeOptions {

/**
* Channel provides a channel strip interface with volume, pan, solo and mute controls.
* See [[PanVol]] and [[Solo]]
* See {@link PanVol} and {@link Solo}
* @example
* // pan the incoming signal left and drop the volume 12db
* const channel = new Tone.Channel(-0.25, -12);
Expand Down Expand Up @@ -91,7 +91,7 @@ export class Channel extends ToneAudioNode<ChannelOptions> {
}

/**
* Solo/unsolo the channel. Soloing is only relative to other [[Channel]]s and [[Solo]] instances
* Solo/unsolo the channel. Soloing is only relative to other {@link Channel}s and {@link Solo} instances
*/
get solo(): boolean {
return this._solo.solo;
Expand Down Expand Up @@ -137,9 +137,9 @@ export class Channel extends ToneAudioNode<ChannelOptions> {

/**
* Send audio to another channel using a string. `send` is a lot like
* [[connect]], except it uses a string instead of an object. This can
* be useful in large applications to decouple sections since [[send]]
* and [[receive]] can be invoked separately in order to connect an object
* {@link connect}, except it uses a string instead of an object. This can
* be useful in large applications to decouple sections since {@link send}
* and {@link receive} can be invoked separately in order to connect an object
* @param name The channel name to send the audio
* @param volume The amount of the signal to send.
* Defaults to 0db, i.e. send the entire signal
Expand All @@ -158,7 +158,7 @@ export class Channel extends ToneAudioNode<ChannelOptions> {
}

/**
* Receive audio from a channel which was connected with [[send]].
* Receive audio from a channel which was connected with {@link send}.
* @param name The channel name to receive audio from.
*/
receive(name: string): this {
Expand Down
4 changes: 2 additions & 2 deletions Tone/component/channel/MidSideMerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { optionsFromArguments } from "../../core/util/Defaults";
export type MidSideMergeOptions = ToneAudioNodeOptions;

/**
* MidSideMerge merges the mid and side signal after they've been separated by [[MidSideSplit]]
* MidSideMerge merges the mid and side signal after they've been separated by {@link MidSideSplit}
* ```
* Mid = (Left+Right)/sqrt(2); // obtain mid-signal from left and right
* Side = (Left-Right)/sqrt(2); // obtain side-signal from left and right
Expand All @@ -21,7 +21,7 @@ export class MidSideMerge extends ToneAudioNode<MidSideMergeOptions> {
readonly name: string = "MidSideMerge";

/**
* There is no input, connect sources to either [[mid]] or [[side]] inputs.
* There is no input, connect sources to either {@link mid} or {@link side} inputs.
*/
readonly input: undefined;

Expand Down
2 changes: 1 addition & 1 deletion Tone/component/channel/MidSideSplit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class MidSideSplit extends ToneAudioNode<MidSideSplitOptions> {
readonly input: Split;

/**
* There is no output node, use either [[mid]] or [[side]] outputs.
* There is no output node, use either {@link mid} or {@link side} outputs.
*/
readonly output: undefined;
/**
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/channel/Recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class Recorder extends ToneAudioNode<RecorderOptions> {

/**
* Stop the recorder. Returns a promise with the recorded content until this point
* encoded as [[mimeType]]
* encoded as {@link mimeType}
*/
async stop(): Promise<Blob> {
assert(this.state !== "stopped", "Recorder is not started");
Expand Down
6 changes: 3 additions & 3 deletions Tone/component/dynamics/Gate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export interface GateOptions extends ToneAudioNodeOptions {

/**
* Gate only passes a signal through when the incoming
* signal exceeds a specified threshold. It uses [[Follower]] to follow the ampltiude
* of the incoming signal and compares it to the [[threshold]] value using [[GreaterThan]].
* signal exceeds a specified threshold. It uses {@link Follower} to follow the ampltiude
* of the incoming signal and compares it to the {@link threshold} value using {@link GreaterThan}.
*
* @example
* const gate = new Tone.Gate(-30, 0.2).toDestination();
Expand Down Expand Up @@ -90,7 +90,7 @@ export class Gate extends ToneAudioNode<GateOptions> {
}

/**
* The attack/decay speed of the gate. See [[Follower.smoothing]]
* The attack/decay speed of the gate. See {@link Follower.smoothing}
*/
get smoothing(): Time {
return this._follower.smoothing;
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/dynamics/Limiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface LimiterOptions extends ToneAudioNodeOptions {

/**
* Limiter will limit the loudness of an incoming signal.
* Under the hood it's composed of a [[Compressor]] with a fast attack
* Under the hood it's composed of a {@link Compressor} with a fast attack
* and release and max compression ratio.
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions Tone/component/dynamics/MidSideCompressor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface MidSideCompressorOptions extends ToneAudioNodeOptions {
}

/**
* MidSideCompressor applies two different compressors to the [[mid]]
* and [[side]] signal components of the input. See [[MidSideSplit]] and [[MidSideMerge]].
* MidSideCompressor applies two different compressors to the {@link mid}
* and {@link side} signal components of the input. See {@link MidSideSplit} and {@link MidSideMerge}.
* @category Component
*/
export class MidSideCompressor extends ToneAudioNode<MidSideCompressorOptions> {
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/dynamics/MultibandCompressor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface MultibandCompressorOptions extends ToneAudioNodeOptions {
}

/**
* A compressor with separate controls over low/mid/high dynamics. See [[Compressor]] and [[MultibandSplit]]
* A compressor with separate controls over low/mid/high dynamics. See {@link Compressor} and {@link MultibandSplit}
*
* @example
* const multiband = new Tone.MultibandCompressor({
Expand Down
4 changes: 2 additions & 2 deletions Tone/component/envelope/FrequencyEnvelope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface FrequencyEnvelopeOptions extends EnvelopeOptions {
exponent: number;
}
/**
* FrequencyEnvelope is an [[Envelope]] which ramps between [[baseFrequency]]
* and [[octaves]]. It can also have an optional [[exponent]] to adjust the curve
* FrequencyEnvelope is an {@link Envelope} which ramps between {@link baseFrequency}
* and {@link octaves}. It can also have an optional {@link exponent} to adjust the curve
* which it ramps.
* @example
* const oscillator = new Tone.Oscillator().toDestination().start();
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/filter/BiquadFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface BiquadFilterOptions extends ToneAudioNodeOptions {

/**
* Thin wrapper around the native Web Audio [BiquadFilterNode](https://webaudio.github.io/web-audio-api/#biquadfilternode).
* BiquadFilter is similar to [[Filter]] but doesn't have the option to set the "rolloff" value.
* BiquadFilter is similar to {@link Filter} but doesn't have the option to set the "rolloff" value.
* @category Component
*/
export class BiquadFilter extends ToneAudioNode<BiquadFilterOptions> {
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/filter/LowpassCombFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface LowpassCombFilterOptions extends ToneAudioNodeOptions {

/**
* A lowpass feedback comb filter. It is similar to
* [[FeedbackCombFilter]], but includes a lowpass filter.
* {@link FeedbackCombFilter}, but includes a lowpass filter.
* @category Component
*/
export class LowpassCombFilter extends ToneAudioNode<LowpassCombFilterOptions> {
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/Global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const dummyContext = new DummyContext();
let globalContext: BaseContext = dummyContext;

/**
* Returns the default system-wide [[Context]]
* Returns the default system-wide {@link Context}
* @category Core
*/
export function getContext(): BaseContext {
Expand Down
4 changes: 2 additions & 2 deletions Tone/core/clock/TickParam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface TickParamOptions<TypeName extends UnitName> extends ParamOptions<TypeN
}

/**
* A Param class just for computing ticks. Similar to the [[Param]] class,
* A Param class just for computing ticks. Similar to the {@link Param} class,
* but offers conversion to BPM values as well as ability to compute tick
* duration and elapsed ticks
*/
Expand Down Expand Up @@ -218,7 +218,7 @@ export class TickParam<TypeName extends "hertz" | "bpm"> extends Param<TypeName>
}

/**
* The inverse of [[ticksToTime]]. Convert a duration in
* The inverse of {@link ticksToTime}. Convert a duration in
* seconds to the corresponding number of ticks accounting for any
* automation curves starting at the given time.
* @param duration The time interval to convert to ticks.
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/clock/TransportEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface TransportEventOptions {
}

/**
* TransportEvent is an internal class used by [[TransportClass]]
* TransportEvent is an internal class used by {@link TransportClass}
* to schedule events. Do no invoke this class directly, it is
* handled from within Tone.Transport.
*/
Expand Down
8 changes: 4 additions & 4 deletions Tone/core/context/AbstractParam.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Time, UnitMap, UnitName } from "../type/Units";

/**
* Abstract base class for [[Param]] and [[Signal]]
* Abstract base class for {@link Param} and {@link Signal}
*/
export abstract class AbstractParam<TypeName extends UnitName> {

Expand Down Expand Up @@ -37,8 +37,8 @@ export abstract class AbstractParam<TypeName extends UnitName> {

/**
* Creates a schedule point with the current value at the current time.
* Automation methods like [[linearRampToValueAtTime]] and [[exponentialRampToValueAtTime]]
* require a starting automation value usually set by [[setValueAtTime]]. This method
* Automation methods like {@link linearRampToValueAtTime} and {@link exponentialRampToValueAtTime}
* require a starting automation value usually set by {@link setValueAtTime}. This method
* is useful since it will do a `setValueAtTime` with whatever the currently computed
* value at the given time is.
* @param time When to add a ramp point.
Expand Down Expand Up @@ -196,7 +196,7 @@ export abstract class AbstractParam<TypeName extends UnitName> {
abstract cancelScheduledValues(time: Time): this;

/**
* This is similar to [[cancelScheduledValues]] except
* This is similar to {@link cancelScheduledValues} except
* it holds the automated value at time until the next automated event.
* @example
* return Tone.Offline(() => {
Expand Down
20 changes: 10 additions & 10 deletions Tone/core/context/Context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export class Context extends BaseContext {

/**
* Create an audio worklet node from a name and options. The module
* must first be loaded using [[addAudioWorkletModule]].
* must first be loaded using {@link addAudioWorkletModule}.
*/
createAudioWorkletNode(
name: string,
Expand Down Expand Up @@ -413,7 +413,7 @@ export class Context extends BaseContext {
* The amount of time into the future events are scheduled. Giving Web Audio
* a short amount of time into the future to schedule events can reduce clicks and
* improve performance. This value can be set to 0 to get the lowest latency.
* Adjusting this value also affects the [[updateInterval]].
* Adjusting this value also affects the {@link updateInterval}.
*/
get lookAhead(): Seconds {
return this._lookAhead;
Expand Down Expand Up @@ -452,7 +452,7 @@ export class Context extends BaseContext {
}

/**
* The current audio context time plus a short [[lookAhead]].
* The current audio context time plus a short {@link lookAhead}.
* @example
* setInterval(() => {
* console.log("now", Tone.now());
Expand All @@ -463,19 +463,19 @@ export class Context extends BaseContext {
}

/**
* The current audio context time without the [[lookAhead]].
* In most cases it is better to use [[now]] instead of [[immediate]] since
* with [[now]] the [[lookAhead]] is applied equally to _all_ components including internal components,
* to making sure that everything is scheduled in sync. Mixing [[now]] and [[immediate]]
* can cause some timing issues. If no lookAhead is desired, you can set the [[lookAhead]] to `0`.
* The current audio context time without the {@link lookAhead}.
* In most cases it is better to use {@link now} instead of {@link immediate} since
* with {@link now} the {@link lookAhead} is applied equally to _all_ components including internal components,
* to making sure that everything is scheduled in sync. Mixing {@link now} and {@link immediate}
* can cause some timing issues. If no lookAhead is desired, you can set the {@link lookAhead} to `0`.
*/
immediate(): Seconds {
return this._context.currentTime;
}

/**
* Starts the audio context from a suspended state. This is required
* to initially start the AudioContext. See [[start]]
* to initially start the AudioContext. See {@link start}
*/
resume(): Promise<void> {
if (isAudioContext(this._context)) {
Expand Down Expand Up @@ -593,7 +593,7 @@ export class Context extends BaseContext {
}

/**
* Clear the function scheduled by [[setInterval]]
* Clear the function scheduled by {@link setInterval}
*/
clearInterval(id: number): this {
return this.clearTimeout(id);
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/Listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ListenerOptions extends ToneAudioNodeOptions{

/**
* Tone.Listener is a thin wrapper around the AudioListener. Listener combined
* with [[Panner3D]] makes up the Web Audio API's 3D panning system. Panner3D allows you
* with {@link Panner3D} makes up the Web Audio API's 3D panning system. Panner3D allows you
* to place sounds in 3D and Listener allows you to navigate the 3D sound environment from
* a first-person perspective. There is only one listener per audio context.
*/
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/Offline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ToneAudioBuffer } from "./ToneAudioBuffer";
/**
* Generate a buffer by rendering all of the Tone.js code within the callback using the OfflineAudioContext.
* The OfflineAudioContext is capable of rendering much faster than real time in many cases.
* The callback function also passes in an offline instance of [[Context]] which can be used
* The callback function also passes in an offline instance of {@link Context} which can be used
* to schedule events along the Transport.
* @param callback All Tone.js nodes which are created and scheduled within this callback are recorded into the output Buffer.
* @param duration the amount of time to record for.
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/ToneAudioNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export abstract class ToneAudioNode<Options extends ToneAudioNodeOptions = ToneA

/**
* Connect the output to the context's destination node.
* See [[toDestination]]
* See {@link toDestination}
* @deprecated
*/
toMaster(): this {
Expand Down
2 changes: 1 addition & 1 deletion Tone/core/context/ToneWithContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export abstract class ToneWithContext<Options extends ToneWithContextOptions> ex

/**
* Convert the incoming time to seconds.
* This is calculated against the current [[TransportClass]] bpm
* This is calculated against the current {@link TransportClass} bpm
* @example
* const gain = new Tone.Gain();
* setInterval(() => console.log(gain.toSeconds("4n")), 100);
Expand Down
Loading