pub struct Chiptunomatic { /* private fields */ }Implementations§
Source§impl Chiptunomatic
impl Chiptunomatic
pub fn with_default_plugins(self) -> Self
pub fn with_sample_rate(self, sample_rate: u32) -> Self
pub fn register_plugin(&mut self, plugin: Rc<dyn Plugin>)
pub fn register_default_plugins(&mut self)
pub fn plugin(&self) -> Rc<dyn Plugin>
pub fn modes_string(&self) -> Vec<String>
pub fn mode_string(&self) -> String
Sourcepub fn set_mode(&mut self, mode: &String) -> Result<(), ChiptunomaticError>
pub fn set_mode(&mut self, mode: &String) -> Result<(), ChiptunomaticError>
Set the selected mode
Sourcepub fn song_metadata_from_seed(
&self,
seed: &[u8],
data_byte_len: u64,
) -> Result<SongMetadata, GenerateError>
pub fn song_metadata_from_seed( &self, seed: &[u8], data_byte_len: u64, ) -> Result<SongMetadata, GenerateError>
Builds SongMetadata from a bytes seed and stream byte length.
Sourcepub fn load_song_metadata_from_seed(
&mut self,
seed: &[u8],
data_byte_len: u64,
) -> Result<SongMetadata, GenerateError>
pub fn load_song_metadata_from_seed( &mut self, seed: &[u8], data_byte_len: u64, ) -> Result<SongMetadata, GenerateError>
Builds SongMetadata from a bytes seed and stream byte length.
pub fn song_metadata_from_string<S: Into<String>>( &self, s: S, data_byte_len: u64, ) -> Result<SongMetadata, GenerateError>
pub fn load_song_metadata_from_string<S: Into<String>>( &mut self, s: S, data_byte_len: u64, ) -> Result<SongMetadata, GenerateError>
pub fn song_metadata_from_path<P: AsRef<Path>>( &self, path: P, ) -> Result<SongMetadata, SongMetadataFromPathError>
pub fn load_song_metadata_from_path<P: AsRef<Path>>( &mut self, path: P, ) -> Result<SongMetadata, SongMetadataFromPathError>
Sourcepub fn song_note_reader(&self) -> SongNoteReader
pub fn song_note_reader(&self) -> SongNoteReader
Return a reader for the notes of a byte stream
Sourcepub fn read_song_notes<R: Read>(
&self,
reader: R,
) -> ReadSongNotes<R, SongNoteReader> ⓘ
pub fn read_song_notes<R: Read>( &self, reader: R, ) -> ReadSongNotes<R, SongNoteReader> ⓘ
Iterate over the notes of a byte stream
Sourcepub fn drum_sample_generator<R: Rng + SeedableRng + 'static>(
&self,
) -> DrumSampleGenerator
pub fn drum_sample_generator<R: Rng + SeedableRng + 'static>( &self, ) -> DrumSampleGenerator
Return a generator for the drum samples
Sourcepub fn sample_drum_steps<R: Rng + SeedableRng + 'static>(
&self,
) -> SampleDrumSteps ⓘ
pub fn sample_drum_steps<R: Rng + SeedableRng + 'static>( &self, ) -> SampleDrumSteps ⓘ
Iterate over the samples of the drum steps
Sourcepub fn file_to_wav<IP: AsRef<Path>, OP: AsRef<Path>>(
&mut self,
input_path: IP,
output_path: OP,
sample_rate: u32,
mix_generator: MixGenerator,
) -> Result<(), ConvertWavError>
pub fn file_to_wav<IP: AsRef<Path>, OP: AsRef<Path>>( &mut self, input_path: IP, output_path: OP, sample_rate: u32, mix_generator: MixGenerator, ) -> Result<(), ConvertWavError>
Convert a file to WAV. mode selects chiptune or lofi synthesis.
Auto Trait Implementations§
impl Freeze for Chiptunomatic
impl !RefUnwindSafe for Chiptunomatic
impl !Send for Chiptunomatic
impl !Sync for Chiptunomatic
impl Unpin for Chiptunomatic
impl UnsafeUnpin for Chiptunomatic
impl !UnwindSafe for Chiptunomatic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more