Struct glicol::Engine

source ·
pub struct Engine<const N: usize> {
    pub context: AudioContext<N>,
    pub index_info: HashMap<String, Vec<NodeIndex>>,
    pub index_info_backup: HashMap<String, Vec<NodeIndex>>,
    pub refpairlist: Vec<(Vec<String>, String, usize)>,
    pub samples_dict: HashMap<String, (&'static [f32], usize, usize)>,
    pub livecoding: bool,
    /* private fields */
}

Fields§

§context: AudioContext<N>§index_info: HashMap<String, Vec<NodeIndex>>§index_info_backup: HashMap<String, Vec<NodeIndex>>§refpairlist: Vec<(Vec<String>, String, usize)>§samples_dict: HashMap<String, (&'static [f32], usize, usize)>§livecoding: bool

Implementations§

source§

impl<const N: usize> Engine<N>

source

pub fn new() -> Self

source

pub fn send_msg(&mut self, msg: &str)

source

pub fn update_with_code(&mut self, code: &str)

source

pub fn update(&mut self) -> Result<(), EngineError>

source

pub fn reset(&mut self)

source

pub fn parse(&mut self) -> Result<(), EngineError>

source

pub fn make_graph(&mut self) -> Result<(), EngineError>

source

pub fn clean_up(&mut self, e: EngineError) -> Result<(), EngineError>

source

pub fn handle_ref_check(&self) -> Result<(), EngineError>

source

pub fn handle_remove_chain(&mut self)

source

pub fn handle_node_add(&mut self)

source

pub fn handle_node_update(&mut self) -> Result<(), EngineError>

source

pub fn handle_node_remove(&mut self)

source

pub fn handle_connection(&mut self)

source

pub fn next_block(&mut self, buf: Vec<&[f32]>) -> (&[Buffer<N>], [u8; 256])

source

pub fn set_bpm(&mut self, bpm: f32)

source

pub fn set_sr(&mut self, sr: usize)

source

pub fn set_seed(&mut self, seed: usize)

source

pub fn set_track_amp(&mut self, amp: f32)

Trait Implementations§

source§

impl<const N: usize> Default for Engine<N>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<const N: usize> Freeze for Engine<N>

§

impl<const N: usize> !RefUnwindSafe for Engine<N>

§

impl<const N: usize> Send for Engine<N>

§

impl<const N: usize> !Sync for Engine<N>

§

impl<const N: usize> Unpin for Engine<N>

§

impl<const N: usize> !UnwindSafe for Engine<N>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<S> FromSample<S> for S

source§

fn from_sample_(s: S) -> S

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

source§

fn to_sample_(self) -> U

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,