Struct surgefilter_comb::imports::Scale[][src]

pub struct Scale {
    pub name: String,
    pub description: String,
    pub raw_text: TuningData,
    pub count: usize,
    pub tones: Vec<Tone, Global>,
}
Expand description

From: http://huygens-fokker.org/scala/scl_format.html The files are human readable ASCII or 8-bit character text-files. The file type is .scl . There is one scale per file. Lines beginning with an exclamation mark are regarded as comments and are to be ignored. The first (non comment) line contains a short description of the scale, but long lines are possible and should not give a read error. The description is only one line. If there is no description, there should be an empty line. The second line contains the number of notes. This number indicates the number of lines with pitch values that follow. In principle there is no upper limit to this, but it is allowed to reject files exceeding a certain size. The lower limit is 0, which is possible since degree 0 of 1/1 is implicit. Spaces before or after the number are allowed.

After that come the pitch values, each on a separate line, either as a ratio or as a value in cents. If the value contains a period, it is a cents value, otherwise a ratio. Ratios are written with a slash, and only one. Integer values with no period or slash should be regarded as such, for example “2” should be taken as “2/1”. Numerators and denominators should be supported to at least 231-1 = 2147483647. Anything after a valid pitch value should be ignored. Space or horizontal tab characters are allowed and should be ignored. Negative ratios are meaningless and should give a read error. For a description of cents, go here. The first note of 1/1 or 0.0 cents is implicit and not in the files. Files for which Scala gives Error in file format are incorrectly formatted. They should give a read error and be rejected.

Fields

name: Stringdescription: Stringraw_text: TuningDatacount: usizetones: Vec<Tone, Global>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.