@@ -43,7 +43,8 @@ STATIC const uint16_t triangle[] = {0, 32767, 0, -32767};
43
43
//|
44
44
//| If `waveform` is None, a triangle waveform is used.
45
45
//|
46
- //| `rate`, `phase_offset`, `offset`, `scale`, and `once` can be changed at run-time. `waveform` may be mutated.
46
+ //| `rate`, `phase_offset`, `offset`, `scale`, and `once` can be changed at
47
+ //| run-time. `waveform` may be mutated.
47
48
//|
48
49
//| `waveform` must be a ``ReadableBuffer`` with elements of type ``'h'``
49
50
//| (16-bit signed integer). Internally, the elements of `waveform` are scaled
@@ -59,21 +60,22 @@ STATIC const uint16_t triangle[] = {0, 32767, 0, -32767};
59
60
//| should be considered an implementation detail, though it affects how LFOs
60
61
//| behave for instance when used to implement an integrator (``l.offset = l``).
61
62
//|
62
- //| An LFO's output is not updated in any other way than when its associated
63
- //| synthesizer updates it. For instance, if an LFO is created and its "first"
64
- //| output is non-zero, its output is 0 until it is updated by its associated synthesizer.
65
- //| Similarly, it is not updated when its inputs like ``scale`` and ``offset`` are changed.
63
+ //| An LFO's output, which is reflected in its `value` property, is not
64
+ //| updated in any other way than when its associated synthesizer updates it.
65
+ //| For instance, if an LFO is created with ``offset=1``, its `value` will still
66
+ //| be ``0`` until it is updated by its associated synthesizer. Similarly, merely
67
+ //| updating its properties does not update its value property.
66
68
//|
67
- //| The interpolation of the waveform is necessarily different depending on the ``once``
68
- //| property. Consider a LFO with
69
- //| ``waveform=np.array([0, 32767], dtype=np.int16), interpolate=True, once=True, rate=1``.
70
- //| Over 1 second this LFO's output will change
71
- //| from ``0`` to ``32767``, and will remain at ``32767`` thereafter, creating
72
- //| a "bend out" over a duration of 1 second.
69
+ //| The interpolation of the waveform is necessarily different depending on the
70
+ //| ``once`` property. Consider a LFO with ``waveform=np.array([0, 100],
71
+ //| dtype=np.int16), interpolate=True, once=True, rate=1``. Over 1 second this
72
+ //| LFO's output will change from ``0`` to ``100``, and will remain at
73
+ //| ``100`` thereafter, creating a "bend out" over a duration of 1 second.
73
74
//|
74
- //| However, when ``once=False``, this creates a sawtooth waveform with a period of 1 second.
75
- //| Over about the first half second the input will increase from ``0`` to ``32767``,
76
- //| then during the second half of the second it will decrease back to ``0``.
75
+ //| However, when ``once=False``, this creates a sawtooth waveform with a
76
+ //| period of 1 second. Over about the first half second the input will
77
+ //| increase from ``0`` to ``100``, then during the second half of the second
78
+ //| it will decrease back to ``0``.
77
79
//|
78
80
//| The time of the peak output is different depending on the value of ``once``:
79
81
//| At 1.0s for ``once=True`` and at 0.5s for ``once=False``.
0 commit comments