alphaTab.model.Tuning
This public class represents a predefined string tuning.
class TuningPropertiesโ
isStandardโ
Gets or sets whether this is the standard tuning for this number of strings.
- JavaScript
- C#
- Kotlin
isStandard: boolean;bool IsStandard { get; set; }var isStandard: Booleannameโ
Gets or sets the name of the tuning.
- JavaScript
- C#
- Kotlin
name: string;string Name { get; set; }var name: StringnoteNamesโ
Use SpelledPitch for the written name of a pitch.
The flat spelled note names of the 12 pitch classes.
- JavaScript
- C#
- Kotlin
static readonly noteNames: string[];static IList<string> NoteNames { get; }companion object { val noteNames: }pitchesโ
Gets or sets the written pitches of the strings, starting with the highest string. Changing the returned array does not change the tuning, assign a new array instead.
- JavaScript
- C#
- Kotlin
pitches: SpelledPitch[];IList<SpelledPitch> Pitches { get; set; }var pitches: alphaTab.collections.List<SpelledPitch>tuningsโ
Gets or sets the MIDI values of the strings, starting with the highest string.
The values are taken from pitches : setting them spells the strings with flats,
changing the returned array does not change the tuning.
- JavaScript
- C#
- Kotlin
Methodsโ
findTuningโ
Tries to find a known tuning by a given list of tuning values.
| Parameter | Summary |
|---|---|
stringsAll | The values defining the tuning. |
Returnsโ
The known tuning.
finishโ
Tries to detect the name and standard flag of the tuning from a known tuning list based on the string values.
- JavaScript
- C#
- Kotlin
finish(): voidvoid Finish()fun finish(): UnitgetDefaultTuningForโ
Gets the default tuning for the given string count.
| Parameter | Summary |
|---|---|
stringCountAll | The string count. |
Returnsโ
The tuning for the given string count or null if the string count is not defined.
getPresetsForโ
Gets a list of all tuning presets for a given stirng count.
| Parameter | Summary |
|---|---|
stringCountAll | The string count. |
Returnsโ
The list of known tunings for the given string count or an empty list if the string count is not defined.
getTextForTuningโ
Use toNameString or toString for the written name of a pitch.
Gets the flat spelled name of the given tuning value, optionally with octave.
- JavaScript
- C#
- Kotlin
static getTextForTuning(tuning: number, includeOctave: boolean): stringstatic string GetTextForTuning(double tuning, bool includeOctave)fun getTextForTuning(tuning: Double, includeOctave: Boolean): String| Parameter | Summary |
|---|---|
tuningAll | (no description) |
includeOctaveAll | (no description) |
getTextPartsForTuningโ
Use SpelledPitch for the written name of a pitch.
Gets the flat spelled name and the octave of the given tuning value.
- JavaScript
- C#
- Kotlin
static getTextPartsForTuning(tuning: number, octaveShift?: number): string[]static IList<string> GetTextPartsForTuning(double tuning, double? octaveShift)fun getTextPartsForTuning(tuning: Double, octaveShift: Double?): | Parameter | Summary |
|---|---|
tuningAll | (no description) |
octaveShiftAll | (no description) |
initializeโ
(no description)
- JavaScript
- C#
- Kotlin
static initialize(): voidstatic void Initialize()fun initialize(): Unitresetโ
(no description)
- JavaScript
- C#
- Kotlin
reset(): voidvoid Reset()fun reset(): Unit