Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update queue docs (addressing #296) #326

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions docs/ops/queue.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
## Queue
These operators manage a first in, first out, queue of values. The queue can
hold up to 16 values. The length of the queue can be dynamically changed and
the contents will be preserved. There is also an averaging operator which is
useful for smoothing input values.

The queue has a maximum size of 64 elements, with a dynamic length marker,
set by `Q.N`.
These operators manage a first in, first out, queue of values. The length of
the queue can be dynamically changed up to a maximum size of 64 elements.
A fixed length can be set with the `Q.N` operator, or the queue can grow and
shrink automatically by setting `Q.GRW 1`. The queue contents will be preserved
when the length is shortened.

Queues also offer operators that do math on the entire queue (the `Q.AVG` operator
is particularly useful for smoothing input values) or copy the queue to and from
a tracker pattern.

Most operators manipulates the elements up to (and including) length. Exceptions are `Q.I i x` and `Q.P2`.

Examples, only first 8 elements shown for clarity:
By default all elements of the queue have a value of `0` and the length is set to 1.
```
Q.N "length" ->|
Q.N "length" ->|
element nb: 1 | 2 3 4 5 6 7 8
value 0 | 0 0 0 0 0 0 0
```
Expand Down
Loading