Skip to content

Commit

Permalink
Add docs on class-specific properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Jul 28, 2023
1 parent 13aa759 commit dd0715d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/node/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ counter: 2.00000

To stop polling a node, call `node.poll(0)`.

### Node-specific properties

Some `Node` classes have additional properties, containing information on implementation-specific states. These can be accessed via the `get_property` method.

For example, the `BufferPlayer` node exposes a `position` property, which returns the playhead's current position, in seconds.

```
>>> buffer = Buffer("audio.wav")
>>> player = BufferPlayer(buffer)
>>> player.play()
...
>>> player.get_property("position")
5.984000205993652
```

---

[→ Next: Stochastic nodes](stochastic.md)

0 comments on commit dd0715d

Please sign in to comment.