Skip to content

Commit

Permalink
documentation of aout and stereo
Browse files Browse the repository at this point in the history
  • Loading branch information
dktr0 committed Nov 27, 2024
1 parent 8a91c41 commit c19a681
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Other changes relative to 0.4.x

-[a,b,c] combines a b and c combinatorially (similar to 0.4 but with matrix semantics); {a,b,c}, which is new, combines a b and c pairwise; 'zip' is now deprecated (and will be removed in 0.6) since the new { } notation generalizes it

-available outputs are 'audio' 'blend' 'add' 'rgba' 'rgb' (previously existing outputs like 'hsv' 'red' 'splay' 'alpha' etc have been removed). Visual outputs behave in a layer fashion similar to image editing software. Earlier statements in a Punctual program with visual outputs are like lower/earlier layers in image editing. When a later/newer layer has an alpha component (blend or rgba), that alpha value is used to determine how much of the combined result comes from the previous layer (alpha = 0) versus the new/current layer (alpha = 1). With "add" (which is RGB) the RGB of the previous and new layer are added together, and the result has an alpha of 1 everywhere. With "rgb", the result is simply the provided rgb data with an alpha of 1 everywhere.
-available outputs are 'audio' 'aout' 'stereo' 'blend' 'add' 'rgba' 'rgb' (previously existing outputs like 'hsv' 'red' 'splay' 'alpha' etc have been removed). Visual outputs behave in a layer fashion similar to image editing software. Earlier statements in a Punctual program with visual outputs are like lower/earlier layers in image editing. When a later/newer layer has an alpha component (blend or rgba), that alpha value is used to determine how much of the combined result comes from the previous layer (alpha = 0) versus the new/current layer (alpha = 1). With "add" (which is RGB) the RGB of the previous and new layer are added together, and the result has an alpha of 1 everywhere. With "rgb", the result is simply the provided rgb data with an alpha of 1 everywhere. 'aout' (and 'stereo') provide more fine-grained options for directing audio signals to specific outputs and not just the entire set of available audio outputs.

-'step' has been re-implemented as 'spr' (for spread), with support for multi-channel results and a pairwise variant (sprp). 'seq' has also been introduced - while spr/sprp require a second, bipolar argument, seq is instead driven directly by the prevailing metre.

Expand Down
6 changes: 5 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ A Punctual statement does not cause audio or video output unless it ends with >>

In the pre-alpha draft of Punctual 0.5, the following outputs are available:

\>> audio -- audio output: If multiple channels of audio are present, they are spread/panned "equidistantly" over the available audio outputs.
\>> audio -- audio output: If multiple channels of audio are present, they are spread/panned "equidistantly" over all of the available audio outputs.

\>> aout [channelOffset] [numberOfChannels] -- an audio output with [numberOfChannels] directed to the output channels starting at channelOffset. The channels of whatever signal is provided are spread over [numberOfChannels]. For example, aout 2 1 would be a mono (one channel) output going out the 3rd channel of audio output.

\>> stereo - a synonym for "aout 0 2"; the channels of whatever signal is provided are spread/panned equidistantly over the first 2 available outputs (regardless of how many channels of audio output are available).

\>> blend -- video output where every four channels of signal are interpreted as red, green, blue, and alpha channels, with the alpha channel controlling the blending with "previous" visual output (previous = in earlier statements in the same Punctual program), and (assuming it arrives at the final output of the program) also affecting the transparency of Punctual's visual output. Whenever less than 4 channels are available, the missing channels are formed as follows: the 2nd or 3rd channels are repeated to get to 3 channels, and then a default value of 1.0 is inserted for the missing alpha channel.

Expand Down

0 comments on commit c19a681

Please sign in to comment.