元编程参考文档

Signal

50 个节点

本页内容 50

Make Signal

函数

此节点没有文档说明。

签名
op_Implicit(value: 数字) -> Signal
Signal op_Implicit(double value)

参数

名称类型默认值说明
value数字—

返回

SignalSignal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Abs

函数

The magnitude: full-wave rectification.

签名
Abs(Signal: Signal) -> Signal
Signal Abs(Signal Signal)

参数

名称类型默认值说明
SignalSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Bandpass

函数

A bandpass around the cutoff.

签名
Bandpass(Signal: Signal, cutoff: Signal, q: Signal) -> Signal
Signal Bandpass(Signal Signal, Signal cutoff, Signal q)

参数

名称类型默认值说明
SignalSignal—
cutoffSignal—
qSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Clip

函数

Hard clipping at ±Limit.

签名
Clip(Signal: Signal, limit: Signal) -> Signal
Signal Clip(Signal Signal, Signal limit)

参数

名称类型默认值说明
SignalSignal—
limitSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Compile

函数

Compiles the signal at a sample rate into a processor that renders it block by block from time zero.

签名
Compile(Signal: Signal, sampleRate: 整数) -> Signal Processor
SignalProcessor Compile(Signal Signal, int sampleRate)

参数

名称类型默认值说明
SignalSignal—
sampleRate整数—

返回

结果Signal Processor
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Compress

函数

A feed-forward compressor as Giannoulis, Massberg and Reiss set it out (, JAES 60(6), 2012): a gain computer with a soft knee in decibels, then a smooth peak detector on the gain reduction, so attack and release are true time constants and the static curve is exact.

签名
Compress -> Signal
    Signal: Signal
    threshold: 数字
    ratio: 数字
    attack: 数字
    release: 数字
    knee: 数字
    makeup: 数字
    sidechain: Signal
Signal Compress(
    Signal Signal,
    double threshold = -18,
    double ratio = 4,
    double attack = 0.01,
    double release = 0.1,
    double knee = 6,
    double makeup = 0,
    Signal sidechain)

参数

名称类型默认值说明
SignalSignal—
threshold数字-18dBFS where compression starts.
ratio数字4Decibels in for each decibel out above the threshold; 1 does nothing, a very large ratio limits.
attack数字0.01Seconds for the gain reduction to reach 63% of a step up.
release数字0.1Seconds for it to recover 63% of the way.
knee数字6Decibels over which the curve bends from 1:1 to the ratio, centred on the threshold.
makeup数字0Decibels of gain after compression.
sidechainSignal—What the detector listens to instead of the signal itself: a kick, to duck a bass under it.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Crush

函数

A bitcrusher: the signal quantized to Bits bits and held at Rate samples a second, for the grit of an early sampler.

签名
Crush(Signal: Signal, bits: 数字, rate: 数字) -> Signal
Signal Crush(Signal Signal, double bits = 8, double rate = 8000)

参数

名称类型默认值说明
SignalSignal—
bits数字8
rate数字8000

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Delay

函数

The signal through a delay line: what went in Time seconds ago, fed back by Feedback so it repeats, mixed with the dry signal by Mix (1 is only the echo). The time may move - chorus, flanging - and is read between samples.

签名
Delay -> Signal
    Signal: Signal
    time: Signal
    feedback: Signal
    mix: Signal
    maximumTime: 数字
Signal Delay(
    Signal Signal,
    Signal time,
    Signal feedback,
    Signal mix,
    double maximumTime = 2)

参数

名称类型默认值说明
SignalSignal—
timeSignal—
feedbackSignal—
mixSignal—
maximumTime数字2

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Filter

函数

A state-variable filter - Simper's trapezoidal form, so its cutoff and Q can move every sample without zipper noise or blowing up.

签名
Filter -> Signal
    Signal: Signal
    mode: Filter Mode
    cutoff: Signal
    q: Signal
Signal Filter(
    Signal Signal,
    FilterMode mode,
    Signal cutoff,
    Signal q)

参数

名称类型默认值说明
SignalSignal—
modeFilter Mode—What it passes.
cutoffSignal—Hertz.
qSignal—Resonance: 0.707 is flat, higher rings.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Fold

函数

A wavefolder: the signal times Gain, reflected back off ±1 as often as it crosses it, so a sine pushed harder grows harmonics without growing louder - the west-coast synthesizer's way of brightening.

签名
Fold(Signal: Signal, gain: Signal) -> Signal
Signal Fold(Signal Signal, Signal gain)

参数

名称类型默认值说明
SignalSignal—
gainSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Highpass

函数

A 12 dB an octave highpass.

签名
Highpass(Signal: Signal, cutoff: Signal, q: Signal) -> Signal
Signal Highpass(Signal Signal, Signal cutoff, Signal q)

参数

名称类型默认值说明
SignalSignal—
cutoffSignal—
qSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Ladder

函数

A four-pole, 24 dB an octave ladder lowpass in zero-delay feedback form, with its passband gain kept at 1 as the resonance rises; a resonance of 1 is the edge of self-oscillation.

签名
Ladder -> Signal
    Signal: Signal
    cutoff: Signal
    resonance: Signal
Signal Ladder(Signal Signal, Signal cutoff, Signal resonance)

参数

名称类型默认值说明
SignalSignal—
cutoffSignal—
resonanceSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Lag

函数

A one-pole lag: the output moves toward the input exponentially, 60 dB of the way in Time seconds, as SuperCollider's Lag does.

签名
Lag(Signal: Signal, time: 数字) -> Signal
Signal Lag(Signal Signal, double time = 0.1)

参数

名称类型默认值说明
SignalSignal—
time数字0.1

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Lowpass

函数

A 12 dB an octave lowpass.

签名
Lowpass(Signal: Signal, cutoff: Signal, q: Signal) -> Signal
Signal Lowpass(Signal Signal, Signal cutoff, Signal q)

参数

名称类型默认值说明
SignalSignal—
cutoffSignal—
qSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Pan

函数

The signal placed between the speakers by the equal-power law: at Position -1 it is all left, at 1 all right, and in the middle each side carries it 3 dB down, so it is as loud wherever it is put. The position may move.

签名
Pan(Signal: Signal, position: Signal) -> Stereo Signal
StereoSignal Pan(Signal Signal, Signal position)

参数

名称类型默认值说明
SignalSignal—
positionSignal—

返回

结果Stereo Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Pitch Shift

函数

The signal raised or lowered in pitch without being sped up or slowed down, as it plays: read from a short delay line by two heads sliding through it at the new speed, half a window apart, each faded out as it wraps round while the other is at its loudest, by an equal-power law, since the two heads read the sound at different moments and only partly agree. The classic real-time shifter, the Eventide H910's: it adds no more delay than Window, and a longer window warbles less on a held note at the cost of smearing a sharp one.

签名
PitchShift -> Signal
    Signal: Signal
    semitones: Signal
    window: 数字
Signal PitchShift(
    Signal Signal,
    Signal semitones,
    double window = 0.05)

参数

名称类型默认值说明
SignalSignal—
semitonesSignal—How far to move it, in semitones; 12 is an octave up, and it may move.
window数字0.05Seconds of the delay line the heads slide through, 0.01 to 0.5.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Range

函数

The signal scaled from -1..1 to Low..High: an LFO turned into a cutoff sweep.

签名
Range(Signal: Signal, low: Signal, high: Signal) -> Signal
Signal Range(Signal Signal, Signal low, Signal high)

参数

名称类型默认值说明
SignalSignal—
lowSignal—
highSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Render

函数

Renders a number of seconds of the signal, mono.

签名
Render -> AudioBuffer
    Signal: Signal
    seconds: 数字
    sampleRate: 整数
    blockSize: 整数
AudioBuffer Render(
    Signal Signal,
    double seconds,
    int sampleRate = 44100,
    int blockSize = 256)

参数

名称类型默认值说明
SignalSignal—
seconds数字—
sampleRate整数44100
blockSize整数256

返回

结果AudioBuffer
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Render Samples

函数

Renders a number of frames of the signal into samples.

签名
RenderSamples -> 低精度数字数组
    Signal: Signal
    frames: 整数
    sampleRate: 整数
    blockSize: 整数
float[] RenderSamples(
    Signal Signal,
    int frames,
    int sampleRate = 44100,
    int blockSize = 256)

参数

名称类型默认值说明
SignalSignal—
frames整数—
sampleRate整数44100
blockSize整数256

返回

结果低精度数字数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Reverb

函数

Reverberation by Jezar's Freeverb: eight parallel comb filters with damped feedback into four series allpasses, the room every open-source synthesizer reaches for. Mix is how much of the result is reverb.

签名
Reverb -> Signal
    Signal: Signal
    roomSize: 数字
    damping: 数字
    mix: 数字
Signal Reverb(
    Signal Signal,
    double roomSize = 0.6,
    double damping = 0.5,
    double mix = 0.3)

参数

名称类型默认值说明
SignalSignal—
roomSize数字0.60 to 1: how long the tail lasts.
damping数字0.50 to 1: how quickly the high frequencies die in it.
mix数字0.30 is dry, 1 only the reverb.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Sample And Hold

函数

Sample and hold: the input's value at each rise of Trigger past one half, held until the next; 0 before the first. Noise sampled by a clock is the classic random-step modulation.

签名
SampleAndHold(Signal: Signal, trigger: Signal) -> Signal
Signal SampleAndHold(Signal Signal, Signal trigger)

参数

名称类型默认值说明
SignalSignal—
triggerSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Saturate

函数

Soft saturation: tanh of the signal times Drive, so a hot signal rounds off instead of clipping.

签名
Saturate(Signal: Signal, drive: Signal) -> Signal
Signal Saturate(Signal Signal, Signal drive)

参数

名称类型默认值说明
SignalSignal—
driveSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Slew

函数

A slew limiter: the output follows the input but moves at most one unit every Rise seconds going up and every Fall seconds going down - portamento for a pitch, de-clicking for a gate.

签名
Slew(Signal: Signal, rise: 数字, fall: 数字) -> Signal
Signal Slew(Signal Signal, double rise = 0.1, double fall = 0.1)

参数

名称类型默认值说明
SignalSignal—
rise数字0.1
fall数字0.1

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Stereo Reverb

函数

The signal through Freeverb on each side, the right channel's combs tuned 23 samples longer so the two tails are uncorrelated and the room has width; Width 0 sums the tails to the middle.

签名
StereoReverb -> Stereo Signal
    Signal: Signal
    roomSize: 数字
    damping: 数字
    mix: 数字
    width: 数字
StereoSignal StereoReverb(
    Signal Signal,
    double roomSize = 0.6,
    double damping = 0.5,
    double mix = 0.3,
    double width = 1)

参数

名称类型默认值说明
SignalSignal—
roomSize数字0.60 to 1: how long the tail lasts.
damping数字0.50 to 1: how quickly the high frequencies die.
mix数字0.30 is dry, 1 only the reverb.
width数字10 to 1: how wide the tail spreads.

返回

结果Stereo Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

To String

函数

The signal as an expression, such as lowpass(saw(220), 800).

签名
ToString(Signal: Signal) -> 文本
string ToString(Signal Signal)

参数

名称类型默认值说明
SignalSignal—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Adsr

函数

An ADSR envelope following a gate: rising to 1 over Attack while the gate is above one half, falling to Sustain over Decay and holding, and falling to 0 over Release once the gate drops. Each segment is a straight line from wherever the envelope stands, so a retrigger never jumps.

签名
Adsr -> Signal
    gate: Signal
    attack: 数字
    decay: 数字
    sustain: 数字
    release: 数字
Signal Adsr(
    Signal gate,
    double attack = 0.01,
    double decay = 0.1,
    double sustain = 0.7,
    double release = 0.3)

参数

名称类型默认值说明
gateSignal—
attack数字0.01
decay数字0.1
sustain数字0.7
release数字0.3

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Constant

函数

A constant value.

签名
Constant(value: 数字) -> Signal
Signal Constant(double value)

参数

名称类型默认值说明
value数字—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Control

函数

A value set from outside while the signal runs - a knob, a gate a key holds - read every sample.

签名
Control(value: Control Value) -> Signal
Signal Control(ControlValue value)

参数

名称类型默认值说明
valueControl Value—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Gate

函数

A gate: 1 for On Seconds, then 0 - repeating every Period Seconds when that is positive.

签名
Gate -> Signal
    onSeconds: 数字
    periodSeconds: 数字
    delaySeconds: 数字
Signal Gate(
    double onSeconds,
    double periodSeconds = 0,
    double delaySeconds = 0)

参数

名称类型默认值说明
onSeconds数字—
periodSeconds数字0
delaySeconds数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Grains

函数

Granular synthesis from a clip: short Hann-windowed grains, Density a second, each read from where Position points when it starts, give or take Jitter seconds, at the speed Pitch says. A position that stands still freezes the sound; one that crawls stretches it without changing its pitch.

签名
Grains -> Signal
    clip: AudioBuffer
    position: Signal
    pitch: Signal
    grainSeconds: 数字
    density: 数字
    jitter: 数字
    seed: 整数
Signal Grains(
    AudioBuffer clip,
    Signal position,
    Signal pitch,
    double grainSeconds = 0.08,
    double density = 25,
    double jitter = 0.01,
    int seed = 1)

参数

名称类型默认值说明
clipAudioBuffer—The source, mixed to mono.
positionSignal—Where each grain starts, 0 to 1 of the clip; read when the grain starts.
pitchSignal—Each grain's playback speed: 2 is an octave up; read when the grain starts.
grainSeconds数字0.08How long each grain lasts.
density数字25Grains started a second; times Grain Seconds, at most 128 overlapping.
jitter数字0.01Seconds of random scatter in where each grain reads from.
seed整数1Which scatter.

返回

结果Signal

备注

Grains overlapping by two or more are scaled so the windows sum to about one, so a clip granulated at its own speed and position comes out at its own level.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Input

函数

What a recording device hears, live: silence until a live session opens the device for it, then the device's sound, mixed to mono, about Cushion seconds after it arrives.

签名
Input(device: 文本, cushion: 数字) -> Signal
Signal Input(string device, double cushion = 0.01)

参数

名称类型默认值说明
device文本—The device's name as the host lists it; empty for the system's default.
cushion数字0.01Seconds of sound kept waiting so the audio thread never runs dry between the device's chunks, 0 to 0.5; see Live.LiveInput.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Mix

函数

Several signals summed.

签名
Mix(signals: Signal 数组) -> Signal
Signal Mix(params Signal[] signals)

参数

名称类型默认值说明
signalsSignal 数组—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Noise

函数

Noise from -1 to 1, the same for the same seed.

签名
Noise(color: Noise Color, seed: 整数) -> Signal
Signal Noise(NoiseColor color = NoiseColor.White, int seed = 1)

参数

名称类型默认值说明
colorNoise ColorWhite
seed整数1

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Addition Operation

函数

The sum of two signals: mixing.

签名
op_Addition(a: Signal, b: Signal) -> Signal
Signal op_Addition(Signal a, Signal b)

参数

名称类型默认值说明
aSignal—
bSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Op Implicit

函数

此节点没有文档说明。

签名
op_Implicit(value: 数字) -> Signal
Signal op_Implicit(double value)

参数

名称类型默认值说明
value数字—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Multiply Operation

函数

The product of two signals: gain, ring modulation, an envelope applied.

签名
op_Multiply(a: Signal, b: Signal) -> Signal
Signal op_Multiply(Signal a, Signal b)

参数

名称类型默认值说明
aSignal—
bSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Subtraction Operation

函数

The difference of two signals.

签名
op_Subtraction(a: Signal, b: Signal) -> Signal
Signal op_Subtraction(Signal a, Signal b)

参数

名称类型默认值说明
aSignal—
bSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Unary Negation Operation

函数

The signal upside down.

签名
op_UnaryNegation(a: Signal) -> Signal
Signal op_UnaryNegation(Signal a)

参数

名称类型默认值说明
aSignal—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Operator

函数

A phase-modulation operator, the building block of the Yamaha DX7 and every FM synthesizer since: a sine at Frequency whose phase is pushed by Modulation radians every sample, and by its own last output times Feedback.

签名
Operator -> Signal
    frequency: Signal
    modulation: Signal
    feedback: 数字
    phase: 数字
Signal Operator(
    Signal frequency,
    Signal modulation,
    double feedback = 0,
    double phase = 0)

参数

名称类型默认值说明
frequencySignal—Hertz; read every sample.
modulationSignal—Radians added to the phase; a modulator of amplitude I gives sidebands at the Bessel amplitudes J_n(I).
feedback数字0Radians of its own output fed back into its phase, 0 to about 1.5.
phase数字0Where in its cycle it starts, 0 to 1.

返回

结果Signal

备注

Chain operators by wiring one's output, scaled by a modulation index, into the next one's modulation. The feedback path averages the last two outputs, as the DX7's does, so a feedback near 1.5 turns the sine into a clean saw instead of noise.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Oscillator

函数

An oscillator from -1 to 1 at a frequency in hertz, which may itself be a signal - vibrato, FM, a glide.

签名
Oscillator -> Signal
    shape: Oscillator Shape
    frequency: Signal
    phase: 数字
Signal Oscillator(
    OscillatorShape shape,
    Signal frequency,
    double phase = 0)

参数

名称类型默认值说明
shapeOscillator Shape—The waveform.
frequencySignal—Hertz; read every sample.
phase数字0Where in its cycle it starts, 0 to 1.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Pluck

函数

A plucked string by the Karplus-Strong algorithm with Jaffe and Smith's extensions: each rising edge of Trigger fills a delay line one period long with a burst of noise, and the burst circulates through a gentle lowpass, losing its high harmonics first as a string does.

签名
Pluck -> Signal
    trigger: Signal
    frequency: Signal
    decay: 数字
    brightness: 数字
    seed: 整数
Signal Pluck(
    Signal trigger,
    Signal frequency,
    double decay = 2,
    double brightness = 0.5,
    int seed = 1)

参数

名称类型默认值说明
triggerSignal—Plucks on every rise past one half.
frequencySignal—Hertz, read at each pluck.
decay数字2Seconds for the fundamental to fall 60 dB.
brightness数字0.50 to 1: how much the loop and the pluck keep the high harmonics.
seed整数1Which noise each pluck starts from.

返回

结果Signal

备注

The period is tuned to a fraction of a sample with a first-order allpass, so notes are in tune across the keyboard rather than flat in the top octaves, and the loop gain is set from Decay, so the fundamental is 60 dB down after that many seconds whatever the pitch; high notes, whose loop filter alone would take them down faster, get a lighter filter and so keep a little more brightness. Every pluck starts at the same level, so brightness changes the tone and not the loudness, and the string stays within ±1.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Pulse

函数

A band-limited pulse whose high part lasts Width of a cycle; a width that moves is pulse-width modulation.

签名
Pulse(frequency: Signal, width: Signal, phase: 数字) -> Signal
Signal Pulse(Signal frequency, Signal width, double phase = 0)

参数

名称类型默认值说明
frequencySignal—
widthSignal—
phase数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Ramp

函数

A straight line from one value to another over some seconds, then held.

签名
Ramp(from: 数字, to: 数字, seconds: 数字) -> Signal
Signal Ramp(double from, double to, double seconds)

参数

名称类型默认值说明
from数字—
to数字—
seconds数字—

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Render Stereo

函数

Renders two signals as the left and right of a stereo clip, compiled together so a signal both share is computed once.

签名
RenderStereo -> AudioBuffer
    left: Signal
    right: Signal
    seconds: 数字
    sampleRate: 整数
    blockSize: 整数
AudioBuffer RenderStereo(
    Signal left,
    Signal right,
    double seconds,
    int sampleRate = 44100,
    int blockSize = 256)

参数

名称类型默认值说明
leftSignal—
rightSignal—
seconds数字—
sampleRate整数44100
blockSize整数256

返回

结果AudioBuffer
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Sample

函数

A clip played back, mixed to mono, at a speed that may itself be a signal - 2 an octave up, -1 backwards; silence once it runs out unless it loops.

签名
Sample(clip: AudioBuffer, speed: Signal, loop: 真否) -> Signal
Signal Sample(AudioBuffer clip, Signal speed, bool loop = false)

参数

名称类型默认值说明
clipAudioBuffer—
speedSignal—
loop真否False

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Saw

函数

A band-limited saw.

签名
Saw(frequency: Signal, phase: 数字) -> Signal
Signal Saw(Signal frequency, double phase = 0)

参数

名称类型默认值说明
frequencySignal—
phase数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Sine

函数

A sine.

签名
Sine(frequency: Signal, phase: 数字) -> Signal
Signal Sine(Signal frequency, double phase = 0)

参数

名称类型默认值说明
frequencySignal—
phase数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Square

函数

A band-limited square.

签名
Square(frequency: Signal, phase: 数字) -> Signal
Signal Square(Signal frequency, double phase = 0)

参数

名称类型默认值说明
frequencySignal—
phase数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Triangle

函数

A band-limited triangle.

签名
Triangle(frequency: Signal, phase: 数字) -> Signal
Signal Triangle(Signal frequency, double phase = 0)

参数

名称类型默认值说明
frequencySignal—
phase数字0

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理

Wavetable

函数

A wavetable oscillator: the table's frames played at a frequency, morphing between neighbouring frames as Position moves from 0 to 1, from a copy of the table band-limited for the frequency it is playing.

签名
Wavetable -> Signal
    table: Wavetable
    frequency: Signal
    position: Signal
    phase: 数字
Signal Wavetable(
    Wavetable table,
    Signal frequency,
    Signal position,
    double phase = 0)

参数

名称类型默认值说明
tableWavetable—The frames.
frequencySignal—Hertz; read every sample.
positionSignal—Where across the frames, 0 to 1; read every sample.
phase数字0Where in its cycle it starts, 0 to 1.

返回

结果Signal
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Signal
所属包
音频处理