|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
A bounded region of a DynamicSoundStream with associated playback parameters. More...
#include <StreamSlice.hpp>
Collaboration diagram for MayaFlux::Kakshya::StreamSlice:Public Member Functions | |
| uint32_t | end_channel () const |
| uint64_t | end_frame () const |
| uint32_t | start_channel () const |
| uint64_t | start_frame () const |
| StreamSlice & | with_loop_count (size_t n) |
| StreamSlice & | with_looping (bool l) |
| StreamSlice & | with_repeat (Kinesis::TimeMap length) |
| StreamSlice & | with_scale (double s) |
| StreamSlice & | with_source_channel (uint32_t channel) |
| StreamSlice & | with_speed (double s) |
| StreamSlice & | with_time_map (Kinesis::TimeMap map) |
Static Public Member Functions | |
| static StreamSlice | from_frame_range (std::shared_ptr< DynamicSoundStream > stream, uint64_t start_frame, uint64_t end_frame, uint8_t index=0) |
| Construct a slice spanning a frame sub-region across all channels. | |
| static StreamSlice | from_region (std::shared_ptr< DynamicSoundStream > stream, uint64_t start_frame, uint64_t end_frame, uint32_t start_channel, uint32_t end_channel, uint8_t index=0) |
| Construct a slice spanning a frame and channel sub-region. | |
| static StreamSlice | from_stream (std::shared_ptr< DynamicSoundStream > stream, uint8_t index=0) |
| Construct a slice spanning the full stream across all channels. | |
Public Attributes | |
| bool | active {} |
| double | cursor_remainder {} |
| uint8_t | index {} |
| size_t | loop_count {} |
| bool | looping {} |
| Region | region |
| std::shared_ptr< const Kinesis::TimeMap > | repeat |
| double | scale { 1.0 } |
| std::optional< uint32_t > | source_channel |
| double | speed { 1.0 } |
| std::shared_ptr< DynamicSoundStream > | stream |
| std::shared_ptr< const Kinesis::TimeMap > | time_map |
A bounded region of a DynamicSoundStream with associated playback parameters.
Describes a slice of audio data within a DynamicSoundStream as a Region. region.start_coordinates[0] / end_coordinates[0] are the frame bounds; region.start_coordinates[1] / end_coordinates[1] are the channel bounds.
The slice does not own a processor. The region is the contract; whatever drives this slice resolves the appropriate processor at activation time. Currently that is CursorAccessProcessor for sequential bounded reads, but the region descriptor is equally valid input to RegionOrganizationProcessor (non-linear navigation, selection patterns, transitions) or any future region-aware processor against a DynamicSoundStream.
speed and scale are playback parameters applied by the driving processor. cursor_remainder accumulates sub-frame advancement for speed != 1.0. looping and index are playback state and identity carried with the slice.
time_map, when set, replaces speed: it gives the read position in frames as a function of seconds since the voice was bound (see Kinesis::TimeMaps). Like the other fields it can be changed while the voice plays.
source_channel picks which channel of the stream is played. Unset, the voice plays the stream channel with the same number as its output channel.
repeat, with a time_map, restarts the map over and over. Its value is how many seconds each repeat lasts, read when the repeat begins, so a length that shrinks over time gives a stutter or bouncing repeat.
Definition at line 42 of file StreamSlice.hpp.