FoscInterval

Returns a FoscInterval.


Description

Abstract interval.


Attributes Summary

Class Methods

isNamedIntervalAbbreviation Is true when argument is a named interval abbreviation. Otherwise false.
isNamedQualityAbbreviation Is true when argument is a named-interval quality abbreviation. Otherwise false.

Instance Properties

[(abjad:](#(abjad:) cents)

Instance Methods: Special Methods

abs Gets absolute value of interval.
float Coerce to float.
< Is true when interval is less than argument.
neg Negates interval.
str Gets string representation of interval.

Instance Methods

transpose Transposes pitch_carrier by interval.


Usage

  1. Example

    a = FoscInterval(4);
    a.interval;
    4
    a.number;
    4


Class Methods


isNamedIntervalAbbreviation

Is true when argument is a named interval abbreviation. Otherwise false.

Underlying regex: ^([+,-]?)(M|m|P|aug|dim)(\\d+)$

Returns true or false.

  1. Example

    FoscInterval.isNamedIntervalAbbreviation("+M9");
    true


isNamedQualityAbbreviation

Is true when argument is a named-interval quality abbreviation. Otherwise false.

Underlying regex: “^(M|m|P|aug|dim)$”

Returns true or false.

  1. Example

    FoscInterval.isNamedQualityAbbreviation("aug");
    true


Instance Properties


(abjad:

cents)

Gets cents of interval.

Returns nonnegative number.


Instance Methods: Special Methods


abs

Gets absolute value of interval.

Returns new interval.


float

Coerce to float.

Returns float.


<

Is true when interval is less than argument.

Returns true or false.


neg

Negates interval.

Returns interval.


str

Gets string representation of interval.

Returns string.


Instance Methods


transpose

Transposes pitch_carrier by interval.

Returns new pitch carrier.