[][src]Struct ot_utils::Slicer

pub struct Slicer {
    pub output_folder: String,
    pub output_filename: String,
    pub sample_rate: u32,
    pub slices: Vec<OTSlice>,
    pub filelist: Vec<PathBuf>,
    pub stereo: bool,
    pub tempo: u32,
    // some fields omitted
}

The Slicer struct is the main struct of the library and it's responsable for parsing .wav files and generating the final .wav and .ot files

Fields

output_folder: String

Folder to which the final .ot and .wav files will be generated

output_filename: String

Name of the final .ot and .wav files (without extension)

sample_rate: u32

Sample rate of the audio samples

slices: Vec<OTSlice>

Vector of slices

filelist: Vec<PathBuf>stereo: booltempo: u32

Tempo / BPM of the final .wav file

Implementations

impl Slicer[src]

pub fn new() -> Self[src]

Creates a new instance of the Slicer struct

pub fn clear(&mut self)[src]

Clears out the slice vector and resets sample offset

pub fn add_file(
    &mut self,
    filepath: String
) -> Result<&'static str, &'static str>
[src]

Adds file to the list of files to be processed

pub fn generate_ot_file(
    &mut self,
    evenly_spaced: bool
) -> Result<&'static str, &'static str>
[src]

Generates the .ot file for the Octatrack and renames the concat .wav file to the same name as the .ot file

Auto Trait Implementations

impl RefUnwindSafe for Slicer

impl Send for Slicer

impl Sync for Slicer

impl Unpin for Slicer

impl UnwindSafe for Slicer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.