Table of Contents

Class KeyRelationships

Namespace
Celeritas.Core.Analysis
Assembly
Celeritas.dll

Helper methods for key relationships.

public static class KeyRelationships
Inheritance
KeyRelationships
Inherited Members

Methods

AreCloselyRelated(KeySignature, KeySignature)

Check if two keys are closely related (differ by at most one accidental). Closely related keys are: the key itself, its relative, the dominant and subdominant keys, and their relatives. For C major: G, F, Am, Em, Dm. Parallel keys (C major / C minor) differ by three accidentals and are NOT closely related under the standard definition.

public static bool AreCloselyRelated(KeySignature a, KeySignature b)

Parameters

a KeySignature
b KeySignature

Returns

bool

CommonTones(KeySignature, KeySignature)

Get the number of common tones between two keys (0-7).

public static int CommonTones(KeySignature a, KeySignature b)

Parameters

a KeySignature
b KeySignature

Returns

int

Describe(KeySignature, KeySignature)

Describe the relationship between two keys.

public static string Describe(KeySignature from, KeySignature to)

Parameters

from KeySignature
to KeySignature

Returns

string