Class: MusicSetTheory::NoteSeqChord
- Defined in:
- lib/music_set_theory/chords.rb,
lib/music_set_theory/chords.rb
Overview
A specialisation of noteseq used exclusively for defining chords - especially chords associated with heptatonic/diotonic scales.
Constant Summary
Constants included from MusUtility
Constants included from Temperament
Temperament::CHROM_NAT_NOTES, Temperament::CHROM_NAT_NOTE_POS, Temperament::CHROM_SIZE, Temperament::MNU_FLAT, Temperament::MNU_NATURAL, Temperament::MNU_SHARP, Temperament::M_FLAT, Temperament::M_NATURAL, Temperament::M_SHARP, Temperament::NSEQ_CHORD, Temperament::NSEQ_SCALE, Temperament::NSEQ_TYPE_HASH, Temperament::RE_NOTEPARSE, Temperament::RE_SHARP, Temperament::WestTemp, Temperament::WestTment
Instance Attribute Summary
Attributes inherited from NoteSeq
#nseq_abbrev, #nseq_name, #nseq_nat_posns, #nseq_other_abbrevs, #nseq_posn, #nseq_synonyms, #nseq_temp, #nseq_type
Instance Method Summary collapse
-
#initialize(nseq_name, nseq_temp, nseq_posn, nseq_nat_posns, nseq_abbrev) ⇒ NoteSeqChord
constructor
Args nseq_name:: name of chord.
- #to_s ⇒ Object
Methods inherited from NoteSeq
#get_notes_for_key, #get_posn_for_offset, #register_with_temp
Methods included from MusUtility
#deep_freeze, #deep_melt, #enl_seq, #multislice, #norm_seq, #repseq, #rotate, #rotate_and_zero, #scalar_addition, #seqtostr
Methods included from Temperament
#WestTempNew, WestTempNew, #un_unicode_accdtls
Constructor Details
#initialize(nseq_name, nseq_temp, nseq_posn, nseq_nat_posns, nseq_abbrev) ⇒ NoteSeqChord
Args
- nseq_name
name of chord.
- nseq_temp
temperament for chord.
- nseq_posn
position of notes in chord.
- nseq_nat_posns
natural note positions for notes in scales.
- nseq_abbrev
main abbreviation for chord.
See Also
NoteSeq#initialize()
82 83 84 85 86 |
# File 'lib/music_set_theory/chords.rb', line 82 def initialize( nseq_name, nseq_temp, nseq_posn, nseq_nat_posns, nseq_abbrev ) super(nseq_name, NSEQ_CHORD, nseq_temp, nseq_posn, nseq_nat_posns, nseq_abbrev: nseq_abbrev) end |
Instance Method Details
#to_s ⇒ Object
88 89 90 91 |
# File 'lib/music_set_theory/chords.rb', line 88 def to_s self.nseq_name.to_s + ":" + self.nseq_abbrev.to_s + ":" + self.nseq_posn.to_s end |