Returns a FoscPitchClassSet.
Pitch-class set.
| *newFromSelection | Makes pitch-class set from selection. |
| includes | (abjad: contains) |
| hash | Hashes pitch-class set. |
| illustrate | Illustrates pitch-class set. |
| str | Gets string representation of pitch-class set. |
| difference | Set-theoretic difference of receiver and expr. |
| sect | Set-theoretic intersection of receiver and expr. |
| isDisjoint | Is true when typed receiver shares no elements with expr. Otherwise false. |
| isEmpty | Is true when pitch class set is empty. |
| isSubsetOf | Is true when receiver is a subset of expr. Otherwise false. |
| isSupersetOf | Is true when receiver is a superset of expr. Otherwise false. |
| notEmpty | Is true when set is not empty. |
| symmetricDifference | Symmetric difference of receiver and expr. |
| union | Union of receiver and expr. |
| normalOrder | Gets normal order. |
| primeForm | Gets prime form. |
| invert | Inverts pitch-class set. |
| isTransposedSubset | Is true when pitch-class set is transposed subset of pcset. Otherwise false. |
| isTransposedSuperset | Is true when pitch-class set is transposed superset of pcset. Otherwise false. |
| multiply | Multiplies pitch-class set by n. |
| orderBy | Orders pitch-class set by pitch-class segment. |
| transpose | Transposes all pitch-classes in pitch-class set by index n. |
Example
a = FoscPitchClassSet[0, 2, 4, 8];a = FoscPitchClassSet(#[0, 2, 4, 8]);
a.items;[ FoscPitchClass.new, FoscPitchClass.new, FoscPitchClass.new, FoscPitchClass.new ]
a = FoscPitchClassSet([0, 2, 4, 8]);
b = FoscPitchClassSet([1, 3, 4, 8]);
a.sect(b).items.collect { |each| each.pitchClassNumber };[ 4.0, 8.0 ]
b = FoscPitchSet([60, 61, 62]);
a = FoscPitchClassSet(b);
a.items.collect { |each| each.pitchClassNumber };[ 0.0, 1.0, 2.0 ]Makes pitch-class set from selection.
Returns pitch-class set.
(abjad: contains)
Is true when pitch-class set contains argument. Otherwise false.
Returns true or false.
Hashes pitch-class set.
Returns integer.
Illustrates pitch-class set.
Gets string representation of pitch-class set.
Returns string.
Set-theoretic difference of receiver and expr.
Returns new pitch class set.
Set-theoretic intersection of receiver and expr.
Returns new pitch class set.
Is true when typed receiver shares no elements with expr. Otherwise false.
Returns boolean.
Example
a = FoscPitchClassSet([1, 2, 3], Number);
b = FoscPitchClassSet([4], Number);
c = FoscPitchClassSet([3, 4], Number);
isDisjoint(a, b);true
isDisjoint(a, c);falseIs true when pitch class set is empty.
Returns boolean.
Example
a = FoscPitchClassSet([1, 2, 3], Number);
a.isEmpty;false
a = FoscPitchClassSet([], Number);
a.isEmpty;trueIs true when receiver is a subset of expr. Otherwise false.
Returns boolean.
Example
a = FoscPitchClassSet([1, 2, 3]);
b = FoscPitchClassSet([2, 3]);
a.isSubsetOf(b);false
b.isSubsetOf(a);trueIs true when receiver is a superset of expr. Otherwise false.
Returns boolean.
Example
a = FoscPitchClassSet([1, 2, 3]);
b = FoscPitchClassSet([2, 3]);
a.isSupersetOf(b);true
b.isSupersetOf(a);falseIs true when set is not empty.
Returns boolean.
Example
a = FoscPitchClassSet([1, 2, 3], Number);
a.notEmpty;true
a = FoscPitchClassSet([], Number);
a.notEmpty;falseSymmetric difference of receiver and expr.
Returns new pitch class set.
Example
a = FoscPitchClassSet([1, 2, 3]);
b = FoscPitchClassSet([2, 3, 4]);
a.symmetricDifference(b).collect { |each| each.pitchClassNumber };Union of receiver and expr.
Returns new pitch class set.
Example
a = FoscPitchClassSet([1, 2, 3]);
b = FoscPitchClassSet([2, 3, 4]);
a.union(b).items.collect { |each| each.pitchClassNumber };[ 1.0, 2.0, 3.0, 4.0 ]Gets normal order.
Returns pitch-class segment.
Gets prime form.
Returns new pitch-class set.
Inverts pitch-class set.
Returns numbered pitch-class set.
Is true when pitch-class set is transposed subset of pcset. Otherwise false.
Returns true or false.
Is true when pitch-class set is transposed superset of pcset. Otherwise false.
Returns true or false.
Multiplies pitch-class set by n.
Returns new pitch-class set.
Orders pitch-class set by pitch-class segment.
Returns pitch-class segment.
Transposes all pitch-classes in pitch-class set by index n.
Returns new pitch-class set.