Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Apr 27, 2024
1 parent e2d48bd commit a22c91e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ async function start() {
byteBeatNode.setType(ByteBeatNode.Type.byteBeat);
byteBeatNode.setExpressionType(ByteBeatNode.ExpressionType.infix);
byteBeatNode.setDesiredSampleRate(8000);
byteBeatNode.setExpressions(['((t >> 10) & 42) * t']);
await byteBeatNode.setExpressions(['((t >> 10) & 42) * t']);
byteBeatNode.connect(context.destination);
}
```
Expand Down Expand Up @@ -384,14 +384,14 @@ There's just one class `ByteBeatNode`. You must call the async function `ByteBea
Returns the number of channels output
by the current expression.
* `getSampleForTime(time: number, context, stack, channel: number)`
* `async getSamplesForTimeRange(start: number, end: number: numSamples: number, context, stack, channel: number)`
Gets a -1 to +1 from the current expression for the given time (time is the `t` value in your expression)
This function is useful for visualizers.
To make a stack call `ByteBeatNode.createStack()`. To create a context call
`ByteBeatNode.createContext`.
To make a stack call `byteBeat.createStack()`. To create a context call
`byteBeat.createContext`.
A stack is used for postfix expressions.
[See docs on postfix](#postfix). The context
is used for keeping expressions state for
Expand Down

0 comments on commit a22c91e

Please sign in to comment.