Skip to content

Osc

Structs

struct Phasor

Phasor Oscillator.

An oscillator that generates a ramp waveform from 0.0 to 1.0. The phasor is the root of all oscillators in MMMAudio.

The Phasor can act as a simple phasor with the .next() function.

However, it can also be an impulse with next_impulse() and a boolean impulse with next_bool().

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Phasor Parameters

Name Type Default Description
num_chans Int 1 Number of channels.

Phasor Functions

struct Phasor . fn init

Initialize the phasor oscillator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Phasor . fn next

Creates the next sample of the phasor output based on the inputs.

fn next Signature

def next(mut self: Phasor, freq: SIMD[DType.float64, self.num_chans] = 100, phase_offset: SIMD[DType.float64, self.num_chans] = 0, trig: SIMD[DType.bool, self.num_chans] = SIMD(fill=True)) -> SIMD[DType.float64, self.num_chans]

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, self.num_chans] 100 Frequency of the phasor in Hz.
phase_offset SIMD[DType.float64, self.num_chans] 0 Offsets the phase of the oscillator (0 to 1).
trig SIMD[DType.bool, self.num_chans] SIMD(fill=True) Trigger signal to reset the phase when switching from False to True.

fn next Returns : SIMD[DType.float64, self.num_chans] The next sample of the phasor output.

struct Phasor . fn next_bool

Increments the phasor and returns a boolean impulse when the phase wraps around from 1.0 to 0.0. This only works with possive frequencies and phase offsets between 0.0 and 1.0.

fn next_bool Signature

def next_bool(mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: SIMD[DType.bool, num_chans] = SIMD(fill=True)) -> SIMD[DType.bool, num_chans]

fn next_bool Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the phasor in Hz (default is 100.0).
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig SIMD[DType.bool, num_chans] SIMD(fill=True) Trigger signal to reset the phase when switching from False to True (default is all True, which resets the phasor on the first sample).

fn next_bool Returns : SIMD[DType.bool, num_chans] A boolean SIMD indicating True when the impulse occurs.

struct Phasor . fn next_impulse

Generates an impulse waveform where the output is 1.0 for one sample when the phase wraps around from 1.0 to 0.0, and 0.0 otherwise. This only works with possive frequencies and phase offsets between 0.0 and 1.0.

fn next_impulse Signature

def next_impulse(mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: SIMD[DType.bool, num_chans] = SIMD(fill=True)) -> SIMD[DType.float64, num_chans]

fn next_impulse Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the phasor in Hz (default is 100.0).
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig SIMD[DType.bool, num_chans] SIMD(fill=True) Trigger signal to reset the phase when switching from False to True (default is all True, which resets the phasor on the first sample).

fn next_impulse Returns : SIMD[DType.float64, num_chans] The next impulse sample as a Float64. 1.0 when the impulse occurs, 0.0 otherwise.

struct Impulse

Impulse Oscillator.

An oscillator that outputs a 1.0 or True for one sample when the phase wraps around from 1.0 to 0.0.

Impulse is essentially a wrapper around the Phasor oscillator that provides impulse-specific methods.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Impulse Parameters

Name Type Default Description
num_chans Int 1 Number of channels (default is 1).

Impulse Functions

struct Impulse . fn init

Initialize the impulse oscillator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Impulse . fn next_bool

Increments the phasor and returns a boolean impulse when the phase wraps around from 1.0 to 0.0.

fn next_bool Signature

def next_bool(mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: SIMD[DType.bool, num_chans] = SIMD(fill=True)) -> SIMD[DType.bool, num_chans]

fn next_bool Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the phasor in Hz (default is 100.0).
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig SIMD[DType.bool, num_chans] SIMD(fill=True) Trigger signal to reset the phase when switching from False to True (default is all True, which resets the phasor on the first sample).

fn next_bool Returns : SIMD[DType.bool, num_chans] A boolean SIMD indicating True when the impulse occurs.

struct Impulse . fn next

Generates an impulse waveform where the output is 1.0 for one sample when the phase wraps around from 1.0 to 0.0, and 0.0 otherwise.

fn next Signature

def next(mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: SIMD[DType.bool, num_chans] = SIMD(fill=True)) -> SIMD[DType.float64, num_chans]

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the phasor in Hz (default is 100.0).
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig SIMD[DType.bool, num_chans] SIMD(fill=True) Trigger signal to reset the phase when switching from False to True (default is all True, which resets the phasor on the first sample).

fn next Returns : SIMD[DType.float64, num_chans] The next impulse sample as a Float64. 1.0 when the impulse occurs, 0.0 otherwise.

struct Osc

Wavetable Oscillator Core.

A wavetable oscillator capable of all standard waveforms and also able to load custom wavetables. Capable of linear, cubic, quadratic, lagrange, or sinc interpolation. Also capable of using an internal Downsampler.

  • Pure tones can be generated without oversampling or sinc interpolation.
  • When doing extreme modulation, best practice is to use sinc interpolation and an TimesOversampling.x2.
  • Try all the combinations of interpolation and oversampling to find the best tradeoff between quality and CPU usage for your application.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Osc Parameters

Name Type Default Description
num_chans Int 1 Number of channels (default is 1).
interp Interp Interp.linear Interpolation method. See Interp struct for options (default is Interp.linear).
ov_samp TimesOversampling TimesOversampling.none A TimesOversampling struct to indicate times oversampling.

Osc Functions

struct Osc . fn init

Initialize the oscillator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Osc . fn next

Generate the next oscillator sample on a single waveform type. All inputs are SIMD types except trig, which is a scalar. This means that an oscillator can have num_chans different instances, each with its own frequency, phase offset, and waveform type, but they will all share the same trigger signal.

fn next Signature

def next[osc_type: OscType = OscType.sine](mut self: Osc, freq: SIMD[DType.float64, self.num_chans] = 100, phase_offset: SIMD[DType.float64, self.num_chans] = 0, trig: Bool = False) -> SIMD[DType.float64, self.num_chans]

fn next Parameters

Name Type Default Description
osc_type OscType OscType.sine Type of waveform. See the OscType struct for options (default is OscType.sine).

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, self.num_chans] 100 Frequency of the oscillator in Hz.
phase_offset SIMD[DType.float64, self.num_chans] 0 Offsets the phase of the oscillator (0 to 1).
trig Bool False Trigger signal to reset the phase when switching from False to True (default is 0.0).

fn next Returns : SIMD[DType.float64, self.num_chans] The next sample of the oscillator output.

struct Osc . fn next_all_basic_waveforms

Get the next sample of all basic waveforms (sine, triangle, saw, square) in a SIMD vector, where each waveform is in a different lane.

fn next_all_basic_waveforms Signature

def next_all_basic_waveforms(mut self, freq: Float64 = 100, phase: Float64 = 0, last_phase: Float64 = 0, trig: Bool = False) -> SIMD[DType.float64, 4]

fn next_all_basic_waveforms Arguments

Name Type Default Description
freq Float64 100 Frequency of the oscillator in Hz.
phase Float64 0 Current oscillator phase.
last_phase Float64 0 Previous oscillator phase.
trig Bool False Trigger signal to reset the waveform phase.

fn next_all_basic_waveforms Returns : SIMD[DType.float64, 4] The next sample of the built-in basic waveforms.

struct Osc . fn next_basic_waveforms

Variable Wavetable Oscillator using built-in waveforms. Generates the next oscillator sample on a variable waveform where the output is interpolated between different waveform types.

fn next_basic_waveforms Signature

def next_basic_waveforms[*osc_types: OscType](mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: Bool = False, osc_frac: SIMD[DType.float64, num_chans] = 0) -> SIMD[DType.float64, num_chans]

fn next_basic_waveforms Parameters

Name Type Default Description
*osc_types OscType VariadicList of waveform types (OscType) to interpolate between. See the OscType struct for options. This should be indicated as a compile-time parameter pack, e.g. next_basic_waveforms[OscType.sine, OscType.triangle]. This cannot be left empty or it will cause a compile error.

fn next_basic_waveforms Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the oscillator in Hz.
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig Bool False Trigger signal to reset the phase when switching from False to True (default is 0.0).
osc_frac SIMD[DType.float64, num_chans] 0 Fractional index for wavetable interpolation. Values are between 0.0 and 1.0. 0.0 corresponds to the first waveform in the osc_types list, 1.0 corresponds to the last waveform in the osc_types list, and values in between interpolate linearly between all waveforms in the list.

fn next_basic_waveforms Returns : SIMD[DType.float64, num_chans] The interpolated output sample.

struct Osc . fn next_vwt

Variable Wavetable Oscillator that interpolates over a loaded Buffer. Generates the next oscillator sample on a variable waveform where the output is interpolated between different different channels of a provided Buffer.

fn next_vwt Signature

def next_vwt(mut self: Osc, ref buffer: Buffer, freq: SIMD[DType.float64, self.num_chans] = 100, phase_offset: SIMD[DType.float64, self.num_chans] = 0, trig: Bool = False, osc_frac: SIMD[DType.float64, self.num_chans] = 0) -> SIMD[DType.float64, self.num_chans]

fn next_vwt Arguments

Name Type Default Description
buffer Buffer Reference to a Buffer containing the waveforms to interpolate between.
freq SIMD[DType.float64, self.num_chans] 100 Frequency of the oscillator in Hz.
phase_offset SIMD[DType.float64, self.num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig Bool False Trigger signal to reset the phase when switching from False to True (default is 0.0). All waveforms will reset together.
osc_frac SIMD[DType.float64, self.num_chans] 0 Fractional index for wavetable interpolation. Values are between 0.0 and 1.0. 0.0 corresponds to the first channel in the input buffer, 1.0 corresponds to the last channel in the input buffer, and values in between interpolate linearly between all channels in the buffer.

fn next_vwt Returns : SIMD[DType.float64, self.num_chans] The interpolated wavetable sample.

struct Osc . fn next_vwt

Variable Wavetable Oscillator that interpolates over a loaded SIMDBuffer. Generates the next oscillator sample on a variable waveform where the output is interpolated between different different channels of a provided Buffer. This should only be used with low channel counts (maybe up to 4 or 8 channels depending on the CPU).

fn next_vwt Signature

def next_vwt[simd_chans: Int](mut self: Osc, ref buffer: SIMDBuffer[simd_chans], freq: SIMD[DType.float64, self.num_chans] = 100, phase_offset: SIMD[DType.float64, self.num_chans] = 0, trig: Bool = False, osc_frac: SIMD[DType.float64, self.num_chans] = 0) -> SIMD[DType.float64, self.num_chans]

fn next_vwt Parameters

Name Type Default Description
simd_chans Int Number of channels stored in the source SIMDBuffer.

fn next_vwt Arguments

Name Type Default Description
buffer SIMDBuffer[simd_chans] Reference to a Buffer containing the waveforms to interpolate between.
freq SIMD[DType.float64, self.num_chans] 100 Frequency of the oscillator in Hz.
phase_offset SIMD[DType.float64, self.num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig Bool False Trigger signal to reset the phase when switching from False to True (default is 0.0). All waveforms will reset together.
osc_frac SIMD[DType.float64, self.num_chans] 0 Fractional index for wavetable interpolation. Values are between 0.0 and 1.0. 0.0 corresponds to the first channel in the input buffer, 1.0 corresponds to the last channel in the input buffer, and values in between interpolate linearly between all channels in the buffer.

fn next_vwt Returns : SIMD[DType.float64, self.num_chans] The interpolated wavetable sample.

struct OscBank

A convenience struct for processing a bank of Osc's with fixed frequencies. The number are indicated by the num parameter. Each output can be accessed via index.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

OscBank Parameters

Name Type Default Description
num Int The total number of Oscillators.

OscBank Functions

struct OscBank . fn init

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin]

fn init Returns : Self

Static Method

This is a static method.

struct OscBank . fn set_freq

Set the frequency of a specific oscillator in the bank.

fn set_freq Signature

def set_freq(mut self, index: Int, freq: Float64)

fn set_freq Arguments

Name Type Default Description
index Int Index of the oscillator to retune.
freq Float64 Frequency in Hertz to assign.

struct OscBank . fn next

Generate the next sample from the oscillator bank.

fn next Signature

def next[osc_type: OscType = OscType.sine](mut self) -> Float64

fn next Parameters

Name Type Default Description
osc_type OscType OscType.sine Waveform type used by each oscillator in the bank.

fn next Returns : Float64 The averaged output of all oscillators in the bank.

struct LFOsc

A low-frequency oscillator with multiple waveform options.

This oscillator generates a non-bandlimited oscillator capable of saw, triangle, and square waves. It is useful for modulation, but should be avoided for audio-rate synthesis due to aliasing.

Outputs values between -1.0 and 1.0.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

LFOsc Parameters

Name Type Default Description
num_chans Int 1 Number of channels (default is 1).

LFOsc Functions

struct LFOsc . fn init

Initialize the low-frequency oscillator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct LFOsc . fn next

Generate the next sawtooth wave sample.

fn next Signature

def next[osc_type: OscType = OscType.saw](mut self, freq: SIMD[DType.float64, num_chans] = 100, phase_offset: SIMD[DType.float64, num_chans] = 0, trig: Bool = False) -> SIMD[DType.float64, num_chans]

fn next Parameters

Name Type Default Description
osc_type OscType OscType.saw Waveform type to generate.

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the sawtooth wave in Hz.
phase_offset SIMD[DType.float64, num_chans] 0 Offsets the phase of the oscillator (default is 0.0).
trig Bool False Trigger signal to reset the phase when switching from False to True (default is 0.0).

fn next Returns : SIMD[DType.float64, num_chans] The next low-frequency oscillator sample.

struct Dust

A dust noise oscillator that generates random impulses at random intervals.

Dust has a Phasor as its core, and the frequency of the Phasor is randomly changed each time an impulse is generated. This allows the Dust to be used in multiple ways. It can be used as a simple random impulse generator, or the user can use the get_phase() method to get the current phase of the internal Phasor and use that phase to drive other oscillators or processes. The user can also set the phase of the internal Phasor using the set_phase() method, allowing for more complex interactions.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Dust Parameters

Name Type Default Description
num_chans Int 1 Number of channels.

Dust Functions

struct Dust . fn init

Initialize the dust noise oscillator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Dust . fn next

Generate the next dust noise sample.

fn next Signature

def next(mut self: Dust, low: SIMD[DType.float64, self.num_chans] = 100, high: SIMD[DType.float64, self.num_chans] = 2000, trig: SIMD[DType.bool, self.num_chans] = SIMD(fill=False)) -> SIMD[DType.float64, self.num_chans]

fn next Arguments

Name Type Default Description
low SIMD[DType.float64, self.num_chans] 100 Lower bound for the random frequency range.
high SIMD[DType.float64, self.num_chans] 2000 Upper bound for the random frequency range.
trig SIMD[DType.bool, self.num_chans] SIMD(fill=False) Trigger signal to reset the phase when switching from False to True.

fn next Returns : SIMD[DType.float64, self.num_chans] The next dust noise sample as a Float64. Will be 1.0 when an impulse occurs, 0.0 otherwise.

struct Dust . fn next_bool

Generate the next dust noise sample as a boolean impulse.

fn next_bool Signature

def next_bool(mut self: Dust, low: SIMD[DType.float64, self.num_chans] = 100, high: SIMD[DType.float64, self.num_chans] = 2000, trig: SIMD[DType.bool, self.num_chans] = SIMD(fill=False)) -> SIMD[DType.bool, self.num_chans]

fn next_bool Arguments

Name Type Default Description
low SIMD[DType.float64, self.num_chans] 100 Lower bound for the random frequency range.
high SIMD[DType.float64, self.num_chans] 2000 Upper bound for the random frequency range.
trig SIMD[DType.bool, self.num_chans] SIMD(fill=False) Trigger signal to reset the phase when switching from False to True.

fn next_bool Returns : SIMD[DType.bool, self.num_chans] The next dust noise sample as a boolean SIMD. Will be True when an impulse occurs, False otherwise.

struct Dust . fn get_phase

fn get_phase Signature

def get_phase(self) -> SIMD[DType.float64, num_chans]

fn get_phase Returns : SIMD[DType.float64, num_chans]

struct Dust . fn set_phase

fn set_phase Signature

def set_phase(mut self, phase: SIMD[DType.float64, num_chans])

fn set_phase Arguments

Name Type Default Description
phase SIMD[DType.float64, num_chans]

struct TTrig

A trigger that outputs True for a specified number of samples or amount of time after receiving a trigger signal.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable


TTrig Functions

struct TTrig . fn init

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin]

fn init Returns : Self

Static Method

This is a static method.

struct TTrig . fn next

Generate the next trigger sample.

fn next Signature

def next(mut self, trig: Bool, samples: Int) -> Bool

fn next Arguments

Name Type Default Description
trig Bool Trigger signal.
samples Int Number of samples for which to output True.

fn next Returns : Bool True if the trigger is active, False otherwise.

struct TTrig . fn next

Generate the next trigger sample based on time.

fn next Signature

def next(mut self, trig: Bool, time: Float64) -> Bool

fn next Arguments

Name Type Default Description
trig Bool Trigger signal.
time Float64 Amount of time in seconds for which to output True.

fn next Returns : Bool True if the trigger is active, False otherwise.

struct LFNoise

Low-frequency interpolating noise generator generating numbers between -1.0 and 1.0. With stepped (none), linear, or cubic interpolation.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

LFNoise Parameters

Name Type Default Description
num_chans Int 1 Number of channels.
interp Interp Interp.cubic Interpolation method. Options are Interp.none (stepped), Interp.linear, Interp.cubic.

LFNoise Functions

struct LFNoise . fn init

Initialize the low-frequency noise generator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct LFNoise . fn next

Generate the next low-frequency noise sample.

fn next Signature

def next(mut self: LFNoise, freq: SIMD[DType.float64, self.num_chans] = 100) -> SIMD[DType.float64, self.num_chans]

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, self.num_chans] 100 Frequency of the noise in Hz.

fn next Returns : SIMD[DType.float64, self.num_chans] The next sample as a Float64.

struct Sweep

A phase accumulator.

Phase accumulator that sweeps from 0 up to inf at a given frequency, resetting on trigger.

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Sweep Parameters

Name Type Default Description
num_chans Int 1 Number of channels.

Sweep Functions

struct Sweep . fn init

Initialize the sweep generator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Sweep . fn next

Generate the next sweep sample.

fn next Signature

def next(mut self, freq: SIMD[DType.float64, num_chans] = 100, trig: SIMD[DType.bool, num_chans] = False) -> SIMD[DType.float64, num_chans]

fn next Arguments

Name Type Default Description
freq SIMD[DType.float64, num_chans] 100 Frequency of the sweep in Hz.
trig SIMD[DType.bool, num_chans] False Trigger signal to reset the phase when switching from False to True (default is all False).

fn next Returns : SIMD[DType.float64, num_chans] The next sample as a Float64.

struct Line

** A Line between start and end that takes dur seconds to complete.**

Traits: AnyType, Copyable, ImplicitlyDeletable, Movable

Line Parameters

Name Type Default Description
num_chans Int 1
linexpcurve Int 0

Line Functions

struct Line . fn init

Initialize the line generator.

fn init Signature

def __init__(out self, world: UnsafePointer[MMMWorld, MutUntrackedOrigin])

fn init Arguments

Name Type Default Description
world UnsafePointer[MMMWorld, MutUntrackedOrigin] Pointer to the MMMWorld instance.

fn init Returns : Self

Static Method

This is a static method.

struct Line . fn next

Generate the next line sample.

fn next Signature

def next(mut self, start: SIMD[DType.float64, num_chans], end: SIMD[DType.float64, num_chans], dur: SIMD[DType.float64, num_chans], trig: SIMD[DType.bool, num_chans] = True) -> SIMD[DType.float64, num_chans]

fn next Arguments

Name Type Default Description
start SIMD[DType.float64, num_chans] Starting value of the line.
end SIMD[DType.float64, num_chans] Ending value of the line.
dur SIMD[DType.float64, num_chans] Duration of the line in seconds.
trig SIMD[DType.bool, num_chans] True Trigger signal to reset the phase when switching from False to True (default is all False).

fn next Returns : SIMD[DType.float64, num_chans] The next interpolated line value.


Documentation generated with mojo doc from Mojo version 1.0.0b2