Skip to content

Commit

Permalink
Tidy up SignalFlow docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Oct 29, 2024
1 parent 40f1d58 commit d2fc6a7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/devices/signalflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,18 @@ Three different types of event are supported, all of which interact with [Patch]

```python
from isobar import *
from isobar.io.signalflow import SignalFlowOutputDevice
from signalflow import *

class Ping (Patch):
def __init__(self, frequency: float = 440):
super().__init__()
envelope = ASREnvelope(0, 0, 0.5)
sine = SineOscillator(frequency)
envelope = ASREnvelope(0, 0, 0.5)
output = sine * envelope * 0.25
self.set_output(output)
self.set_auto_free_node(envelope)

graph = AudioGraph()
output_device = SignalFlowOutputDevice(graph=graph)
timeline = Timeline(120, output_device=output_device)
timeline = Timeline(120, SignalFlowOutputDevice())
timeline.schedule({
# If a Patch class is passed to the `patch` property, a patch of this class
# is created each time the event is triggered.
Expand Down Expand Up @@ -100,4 +97,4 @@ timeline.schedule({
"duration": PLoop(PTri(10, 0.1, 0.5)),
})
timeline.run()
```
```

0 comments on commit d2fc6a7

Please sign in to comment.