waveform_editor.tendencies.periodic.triangle_wave.TriangleWaveTendency

class waveform_editor.tendencies.periodic.triangle_wave.TriangleWaveTendency(**kwargs)

Bases: PeriodicBaseTendency

A tendency representing a triangle wave.

__init__(**kwargs)

Methods

__init__(**kwargs)

get_derivative(time)

Get the values of the derivatives at the provided time array.

get_value([time])

Get the tendency values at the provided time array.

set_next_tendency(next_tendency)

Sets the next tendency as a param.

set_previous_tendency(prev_tendency)

Sets the previous tendency as a param.

Attributes

allow_zero_duration

annotations

duration

end

end_derivative

end_value

is_first_repeated

line_number

name

next_tendency

param

prev_tendency

start

start_derivative

start_value

start_value_set

times_changed

user_amplitude

user_base

user_duration

user_end

user_frequency

user_max

user_min

user_period

user_phase

user_start

values_changed

get_derivative(time: ndarray) ndarray

Get the values of the derivatives at the provided time array.

Parameters:
time: ndarray

The time array on which to generate points.

Returns:

numpy array containing the derivatives

get_value(time: ndarray | None = None) tuple[numpy.ndarray, numpy.ndarray]

Get the tendency values at the provided time array. If no time array is provided, a time array will be created from the start to the end of the tendency, where time points are defined for every peak and trough in the tendency.

Parameters:
time: ndarray | None = None

The time array on which to generate points.

Returns:

Tuple containing the time and its tendency values.

set_next_tendency(next_tendency)

Sets the next tendency as a param.

Parameters:
next_tendency

The tendency follows the current tendency.

set_previous_tendency(prev_tendency)

Sets the previous tendency as a param.

Parameters:
prev_tendency

The tendency precedes the current tendency.


Last update: 2026-05-21