Skip to content

pushbase.melodic_pattern

Module constants

  • CIRCLE_OF_FIFTHS
  • ROOT_NOTES
  • NOTE_NAMES = ('C', 'D♭', 'D', 'E♭', 'E', 'F', 'G♭', 'G', 'A♭', 'A', 'B♭', 'B')
  • SCALES

Classes

class Scale(NamedTuple)

Bases: NamedTuple

Attributes

  • name = ''
  • notes

to_root_note(self, root_note)

scale_for_notes(self, notes)

__unicode__(self)

__str__(self)

__eq__(self, other)

__hash__(self)

class NoteInfo(NamedTuple)

Bases: NamedTuple

Attributes

  • index = None
  • channel = 0
  • color = 'NoteInvalid'

class TuningSystemPattern

__init__(self, first_note, tuning_system, steps)

__getitem__(self, i)

_color_for_note(self, note)

_get_note_info(self, octave_and_note, channel)

_octave_and_note_by_index(self, index)

_octave_and_note(self, x, y)

_number_of_notes(self)

note(self, x, y)

class MelodicPattern(NamedTuple)

Bases: NamedTuple

Attributes

  • steps
  • scale
  • root_note = 0
  • origin
  • chromatic_mode = False
  • width = None
  • height = None

extended_scale(self)

is_aligned(self)

note(self, x, y)

__getitem__(self, i)

_boundary_reached(self, x, y)

_octave_and_note_by_index(self, index)

_octave_and_note(self, x, y)

_color_for_note(self, note)

_get_note_info(self, octave_note, root_note, channel)

_octave_and_note_linear(self, i)

Functions

pitch_index_to_string(index)

scale_by_name(name)