pub struct KeygroupProgram {
pub name: String,
pub keygroups: Vec<Keygroup>,
}
Expand description
A keygroup program is an instrument based on samples.
It’s split into multiple note range, each one in a Keygroup.
Fields§
§name: String
Name of the keygroup program.
keygroups: Vec<Keygroup>
Keygroups making this program.
Implementations§
Source§impl KeygroupProgram
impl KeygroupProgram
pub fn insert_layer_files(&mut self, files: Vec<LayerFile>)
pub fn insert_layer_file(&mut self, file: LayerFile)
Sourcepub fn sort_keygroups(&mut self)
pub fn sort_keygroups(&mut self)
Sort the keygroups of the program.
Sourcepub fn guess_ranges(&mut self, pitch_preference: f32)
pub fn guess_ranges(&mut self, pitch_preference: f32)
Based on the first layer, guess the ranges of each keygroup.
The pitch preference should be between 0 and 1 and is used to choose between pitching down or pitching up the samples. 0.5 means that each root note will be at the “center” of its keygroup.
pub fn export<W: Write>(&self, w: W) -> Result<()>
pub fn layer_count(&self) -> usize
pub fn set_velocity_layer_mode(&mut self, mode: &LayerVelocityMode)
Trait Implementations§
Source§impl Clone for KeygroupProgram
impl Clone for KeygroupProgram
Source§fn clone(&self) -> KeygroupProgram
fn clone(&self) -> KeygroupProgram
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeygroupProgram
impl Debug for KeygroupProgram
Source§impl Default for KeygroupProgram
impl Default for KeygroupProgram
Source§fn default() -> KeygroupProgram
fn default() -> KeygroupProgram
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeygroupProgram
impl<'de> Deserialize<'de> for KeygroupProgram
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for KeygroupProgram
impl PartialEq for KeygroupProgram
Source§impl Serialize for KeygroupProgram
impl Serialize for KeygroupProgram
impl StructuralPartialEq for KeygroupProgram
Auto Trait Implementations§
impl Freeze for KeygroupProgram
impl RefUnwindSafe for KeygroupProgram
impl Send for KeygroupProgram
impl Sync for KeygroupProgram
impl Unpin for KeygroupProgram
impl UnwindSafe for KeygroupProgram
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.