Skip to main content

ARAContentKeySignature

Struct ARAContentKeySignature 

Source
#[repr(C, packed(1))]
pub struct ARAContentKeySignature { pub root: ARACircleOfFifthsIndex, pub intervals: [ARAKeySignatureIntervalUsage; 12], pub name: ARAUtf8String, pub position: ARAQuarterPosition, }
Expand description

! Content reader event class: key signature provided by kARAContentTypeKeySignatures. ! Defines the usage of each pitch class in the octave-cyclic 12-tone pitch system. ! This content type describes the key signatures as would be annotated in a score, not the local ! scales (which may be using some out-of-key notes via additional per-note accidentals). ! The event position relates to ARAContentTempoEntry, a valid tempo map must be provided ! by any provider of ARAContentBarSignature. ! Each key signature is valid until the following one, the first key signature is assumed to also ! be valid any time before it is actually defined. ! Event sort order is by position. ! 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§

§root: ARACircleOfFifthsIndex

! Root key of the signature.

§intervals: [ARAKeySignatureIntervalUsage; 12]

! Scales intervals (aka scale mode) of the signature. ! The index of this arrays entry is the chromatic interval to the keys root pitch class. ! \verbatim ! Examples (Hex Values): ! major {FF, 00, FF, 00, FF, FF, 00, FF, 00, FF, 00, FF} ! natural minor {FF, 00, FF, FF, 00, FF, 00, FF, FF, 00, FF, 00} ! \endverbatim

§name: ARAUtf8String

! Optional user-readable name of the key signature as displayed in the content provider ! (including the root note name). ! Typically, the receiver has a built-in system to generate a suitable name for a key ! signature based on its internal abstractions. However, this internal model might cover all ! states that the ARA model can provide, or vice versa. If there is such a mismatch, the ! internal name generation algorithm will likely fail - in which case the receiver may fall ! back to the string provided here. ! Note that the utility library that ships with the ARA SDK contains C++ code that can create ! a proper name for the most common key signatures, otherwise falling back to this name. ! The receiver must copy the name, the pointer may be only valid as long as the containing ! ARAContentKeySignature struct. ! It may be NULL if the provider does not provide a name for the key signature in its UI. ! When encoding the string to send it across the ARA API, flat and sharp symbols must be ! represented with the Unicodes 0x266D “MUSIC FLAT SIGN” and 0x266F “MUSIC SHARP SIGN” ! respectively (as also required for ARAContentChord::name).

§position: ARAQuarterPosition

! Start time in quarter notes, see ARAContentTempoEntry.

Trait Implementations§

Source§

impl Clone for ARAContentKeySignature

Source§

fn clone(&self) -> ARAContentKeySignature

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 ARAContentKeySignature

Source§

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

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

impl Copy for ARAContentKeySignature

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.