Skip to content

Commit

Permalink
Documentation: Updated LFOs
Browse files Browse the repository at this point in the history
Updated documentation and examples for sawlfo, sinelfo, squarelfo, and trianglelfo.
  • Loading branch information
gregwht committed Jan 8, 2024
1 parent fef0014 commit d46cbce
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/library/oscillators/sawlfo/example-0.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from signalflow import *
graph = AudioGraph()

#-------------------------------------------------------------------------------
# Siren effect, using a sawtooth LFO to modulate a sinewave's frequency
#-------------------------------------------------------------------------------
lfo = SawLFO(1, 200, 1000)
sine = SineOscillator(lfo)
sine.play()
Expand Down
6 changes: 4 additions & 2 deletions docs/library/oscillators/sawlfo/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: SawLFO node documentation
description: SawLFO: Produces a sawtooth LFO at the given `frequency` and `phase` offset, with output ranging from `min` to `max`.
description: SawLFO: Produces a sawtooth LFO at the given `frequency`, with output ranging from `min` Hz to `max` Hz, with the given `phase` offset.

[Reference library](../../index.md) > [Oscillators](../index.md) > [SawLFO](index.md)

Expand All @@ -9,13 +9,15 @@ description: SawLFO: Produces a sawtooth LFO at the given `frequency` and `phase
SawLFO(frequency=1.0, min=0.0, max=1.0, phase=0.0)
```

Produces a sawtooth LFO at the given `frequency` and `phase` offset, with output ranging from `min` to `max`.
Produces a sawtooth LFO at the given `frequency`, with output ranging from `min` Hz to `max` Hz, with the given `phase` offset.

### Examples

```python

#-------------------------------------------------------------------------------
# Siren effect, using a sawtooth LFO to modulate a sinewave's frequency
#-------------------------------------------------------------------------------
lfo = SawLFO(1, 200, 1000)
sine = SineOscillator(lfo)
sine.play()
Expand Down
2 changes: 2 additions & 0 deletions docs/library/oscillators/sinelfo/example-0.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from signalflow import *
graph = AudioGraph()

#-------------------------------------------------------------------------------
# Siren effect, using a sinewave LFO to modulate a sawtooth's frequency
#-------------------------------------------------------------------------------
lfo = SineLFO(1, 200, 1000)
saw = SawOscillator(lfo)
saw.play()
Expand Down
8 changes: 5 additions & 3 deletions docs/library/oscillators/sinelfo/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: SineLFO node documentation
description: SineLFO: Produces a sinusoidal LFO at the given `frequency` and `phase` offset, with output ranging from `min` to `max`.
description: SineLFO: Produces a sinusoidal LFO at the given `frequency`, with output ranging from `min` Hz to `max` Hz, with the given `phase` offset.

[Reference library](../../index.md) > [Oscillators](../index.md) > [SineLFO](index.md)

Expand All @@ -9,13 +9,15 @@ description: SineLFO: Produces a sinusoidal LFO at the given `frequency` and `ph
SineLFO(frequency=1.0, min=0.0, max=1.0, phase=0.0)
```

Produces a sinusoidal LFO at the given `frequency` and `phase` offset, with output ranging from `min` to `max`.
Produces a sinusoidal LFO at the given `frequency`, with output ranging from `min` Hz to `max` Hz, with the given `phase` offset.

### Examples

```python

# Siren effect, using a sinewave LFO to modulate a sawtooth's frequency
#-------------------------------------------------------------------------------
# Siren effect, using a sine wave LFO to modulate a sawtooth's frequency
#-------------------------------------------------------------------------------
lfo = SineLFO(1, 200, 1000)
saw = SawOscillator(lfo)
saw.play()
Expand Down
10 changes: 10 additions & 0 deletions docs/library/oscillators/squarelfo/example-0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from signalflow import *
graph = AudioGraph()

#-------------------------------------------------------------------------------
# Alarm effect, using a pulse wave LFO to modulate a sinewave's frequency
#-------------------------------------------------------------------------------
lfo = SquareLFO(1, 200, 400)
sine = SineOscillator(lfo)
sine.play()
graph.wait()
15 changes: 13 additions & 2 deletions docs/library/oscillators/squarelfo/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: SquareLFO node documentation
description: SquareLFO: Produces a pulse wave LFO with the given `frequency` and pulsewidth of `width`, ranging from `min` to `max`, where `width` of `0.5` is a square wave.
description: SquareLFO: Produces a pulse wave LFO at the given `frequency`, ranging from `min` Hz to `max` Hz, with a pulsewidth of `width` (where `width` of `0.5` is a square wave), with the given `phase` offset.

[Reference library](../../index.md) > [Oscillators](../index.md) > [SquareLFO](index.md)

Expand All @@ -9,5 +9,16 @@ description: SquareLFO: Produces a pulse wave LFO with the given `frequency` and
SquareLFO(frequency=1.0, min=0.0, max=1.0, width=0.5, phase=0.0)
```

Produces a pulse wave LFO with the given `frequency` and pulsewidth of `width`, ranging from `min` to `max`, where `width` of `0.5` is a square wave.
Produces a pulse wave LFO at the given `frequency`, ranging from `min` Hz to `max` Hz, with a pulsewidth of `width` (where `width` of `0.5` is a square wave), with the given `phase` offset.

### Examples

```python

#-------------------------------------------------------------------------------
# Alarm effect, using a square wave LFO to modulate a sinewave's frequency
#-------------------------------------------------------------------------------
lfo = SquareLFO(1, 200, 400)
sine = SineOscillator(lfo)
sine.play()
```
10 changes: 10 additions & 0 deletions docs/library/oscillators/trianglelfo/example-0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from signalflow import *
graph = AudioGraph()

#-----------------------------------------------------------------------------------
# Pacman ghost sound, using a triangle wave LFO to modulate a sine wave's frequency
#-----------------------------------------------------------------------------------
lfo = TriangleLFO(3, 200, 900)
sine = SineOscillator(lfo)
sine.play()
graph.wait()
15 changes: 13 additions & 2 deletions docs/library/oscillators/trianglelfo/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: TriangleLFO node documentation
description: TriangleLFO: Produces a triangle LFO with the given `frequency` and `phase` offset, ranging from `min` to `max`.
description: TriangleLFO: Produces a triangle LFO with the given `frequency`, ranging from `min` Hz to `max` Hz, with the given `phase` offset.

[Reference library](../../index.md) > [Oscillators](../index.md) > [TriangleLFO](index.md)

Expand All @@ -9,5 +9,16 @@ description: TriangleLFO: Produces a triangle LFO with the given `frequency` and
TriangleLFO(frequency=1.0, min=0.0, max=1.0, phase=0.0)
```

Produces a triangle LFO with the given `frequency` and `phase` offset, ranging from `min` to `max`.
Produces a triangle LFO with the given `frequency`, ranging from `min` Hz to `max` Hz, with the given `phase` offset.

### Examples

```python

#-----------------------------------------------------------------------------------
# Pacman ghost sound, using a triangle wave LFO to modulate a sine wave's frequency
#-----------------------------------------------------------------------------------
lfo = TriangleLFO(3, 200, 900)
sine = SineOscillator(lfo)
sine.play()
```

0 comments on commit d46cbce

Please sign in to comment.