Skip to main content

ARAContentTuning

Struct ARAContentTuning 

Source
#[repr(C, packed(1))]
pub struct ARAContentTuning { pub concertPitchFrequency: f32, pub root: ARACircleOfFifthsIndex, pub tunings: [f32; 12], pub name: ARAUtf8String, }
Expand description

! Content reader event class: periodic 12-tone tuning table provided by kARAContentTypeStaticTuning. ! Defines the tuning of each pitch class in the octave-cyclic 12-tone pitch system. ! Allows to import (12-tone) Scala files. ! Stretched tunings are not supported by ARA at this point, but may be added in a future release ! as an additional tuning stretch curve applied on top of this average tuning. ! ARA defines a single overall tuning (i.e. there’s always only one event for this reader). ! As with all content readers, a pointer to this struct retrieved via getContentReaderDataForEvent() ! is still owned by the callee and must remain valid until either getContentReaderDataForEvent() ! is called again or the reader is destroyed via destroyContentReader().

Fields§

§concertPitchFrequency: f32

! Frequency of the concert pitch ‘A’ in hertz, defaulting to kARADefaultConcertPitchFrequency aka 440.0f.

§root: ARACircleOfFifthsIndex

! Root key for the following per-key tunings.

§tunings: [f32; 12]

! Tuning of each note pitch as an offset from the equal temperament tuning in cent. ! Each entry defaults to 0.0f. ! The first entry relates to the root, increasing chromatically up to the full octave. ! \verbatim ! Example: ! Arabian Rast: {0.0f, 0.0f, 0.0f, 0.0f, -50.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -50.0f} ! \endverbatim

§name: ARAUtf8String

! User-readable name of the tuning as displayed in the content provider. ! The tuning name may or may not include the root note, depending on context - for example, ! equal temperament does not care about the root note so it is always omitted, Werckmeister ! tunings typically imply a root note of C unless noted explicitly otherwise, etc. ! The name is provided only for display purposes, in case the receiver wants to display the ! tuning exactly as done in the sender instead of utilizing its built-in naming system for ! tunings based on the above properties. ! The receiver must copy the name, the pointer may be only valid as long as the containing ! ARAContentTuning struct. ! It may be NULL if the provider does not provide a name for the tuning in its UI.

Trait Implementations§

Source§

impl Clone for ARAContentTuning

Source§

fn clone(&self) -> ARAContentTuning

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ARAContentTuning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ARAContentTuning

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.