Skip to content

Commit

Permalink
update EventIter impl docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emuell committed Jun 13, 2024
1 parent 0ae2199 commit 82b68e6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/event/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ impl CycleNoteEvents {

// -------------------------------------------------------------------------------------------------

/// Emits a vector of [`Event`]S from a Tidal [`Cycle`].
/// Emits a vector of [`EventIterItem`] from a Tidal [`Cycle`].
///
/// Channels from cycle are merged down into note events on different voices.
/// Float and String targets are currently unsupported and will result into None events.
/// Values in cycles can be mapped to notes with an optional mapping table.
///
/// See also [`ScriptedCycleEventIter`](`super::scripted_cycle::ScriptedCycleEventIter`)
#[derive(Clone, Debug)]
pub struct CycleEventIter {
cycle: Cycle,
Expand Down
2 changes: 1 addition & 1 deletion src/event/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{event::EventIter, BeatTimeBase, EventIterItem, PulseIterItem};

// -------------------------------------------------------------------------------------------------

/// Emits an empty, None [`Event`].
/// Continuously emits empty [`EventIterItem`]S.
#[derive(Clone, Debug)]
pub struct EmptyEventIter {}

Expand Down
2 changes: 1 addition & 1 deletion src/event/fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{

// -------------------------------------------------------------------------------------------------

/// Endlessly emits a single, fixed [`Event`].
/// Continuously emits a single, fixed [`EventIterItem`].
#[derive(Clone, Debug)]
pub struct FixedEventIter {
events: Vec<Event>,
Expand Down
2 changes: 1 addition & 1 deletion src/event/mutated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type EventMapFn = dyn FnMut(Event) -> Event + 'static;

// -------------------------------------------------------------------------------------------------

/// Endlessly emits [`Event`] which's value can be mutated in each iter step
/// Continuously emits [`EventIterItem`] which's value can be mutated in each iter step
/// with a custom closure.
///
/// NB: This event iter can not be cloned. `clone_dyn` thus will cause a panic!
Expand Down
6 changes: 5 additions & 1 deletion src/event/scripted_cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ use crate::tidal::{Cycle, Event as CycleEvent, Value as CycleValue};

// -------------------------------------------------------------------------------------------------

/// Emits a vector of [`Event`]S from a Tidal [`Cycle`] with optional mapping callbacks from scripts.
/// Emits a vector of [`EventIterItem`] from a Tidal [`Cycle`].
///
/// Channels from cycle are merged down into note events on different voices.
/// Values in cycles can be mapped to notes with an optional mapping table or
/// callbacks from from scripts.
///
/// See also [`CycleEventIter`](`super::cycle::CycleEventIter`)
#[derive(Clone, Debug)]
Expand Down

0 comments on commit 82b68e6

Please sign in to comment.