.. _moduleFiguredBass.realizerScale:

music21.figuredBass.realizerScale
=================================

.. WARNING: DO NOT EDIT THIS FILE: AUTOMATICALLY GENERATED. Edit the .py file directly

.. module:: music21.figuredBass.realizerScale



.. function:: convertToPitch(pitchString)


    Converts a pitchString to a :class:`~music21.pitch.Pitch`, only if necessary.



    >>> from music21.figuredBass import realizerScale
    >>> pitchString = 'C5'
    >>> realizerScale.convertToPitch(pitchString)
    C5
    >>> realizerScale.convertToPitch(pitch.Pitch('E4')) # does nothing
    E4



FiguredBassScale
----------------



.. class:: FiguredBassScale(scaleValue='C', scaleMode='major')



    Acts as a wrapper for :class:`~music21.scale.Scale`. Used to represent the
    concept of a figured bass scale, with a scale value and mode.


    Accepted scale types: major, minor, dorian, phrygian, and hypophrygian.
    A FiguredBassScale is raised if an invalid scale type is provided.



    >>> from music21.figuredBass import realizerScale
    >>> fbScale = realizerScale.FiguredBassScale()
    >>> fbScale.realizerScale
    <music21.scale.MajorScale C major>
    >>> fbScale.keySig
    <music21.key.KeySignature of no sharps or flats>



    **FiguredBassScale** **attributes**

        .. attribute:: keySig

            A :class:`~music21.key.KeySignature` corresponding to the scale value and mode.


        .. attribute:: realizerScale

            A :class:`~music21.scale.Scale` based on the desired value and mode.


    **FiguredBassScale** **methods**

        .. method:: getPitchNames(bassPitch, notationString=None)


            Takes a bassPitch and notationString and returns a list of corresponding
            pitch names based on the scale value and mode above and inclusive of the
            bassPitch name.



            >>> from music21.figuredBass import realizerScale
            >>> fbScale = realizerScale.FiguredBassScale()
            >>> fbScale.getPitchNames('D3', '6')
            ['D', 'F', 'B']
            >>> fbScale.getPitchNames('G3')
            ['G', 'B', 'D']
            >>> fbScale.getPitchNames('B3', '6,#5')
            ['B', 'D', 'F#', 'G']
            >>> fbScale.getPitchNames('C#3', '-7') # Fully diminished seventh chord
            ['C#', 'E', 'G', 'B-']



        .. method:: getPitches(bassPitch, notationString=None, maxPitch=B5)


            Takes in a bassPitch, a notationString, and a maxPitch representing the highest
            possible pitch that can be returned. Returns a sorted list of pitches which
            correspond to the pitches of each specific pitch name found through getPitchNames
            that fall between the bassPitch and the maxPitch, inclusive of both.



            >>> from music21.figuredBass import realizerScale
            >>> fbScale = realizerScale.FiguredBassScale()
            >>> fbScale.getPitches('C3') # Root position triad
            [C3, E3, G3, C4, E4, G4, C5, E5, G5]
            >>> fbScale.getPitches('D3', '6') # First inversion triad
            [D3, F3, B3, D4, F4, B4, D5, F5, B5]
            >>> fbScale.getPitches(pitch.Pitch('G3'), '7', 'F4') # Root position seventh chord
            [G3, B3, D4, F4]



        .. method:: getSamplePitches(bassPitch, notationString=None)


            Returns all pitches for a bassPitch and notationString within
            an octave of the bassPitch, inclusive of the bassPitch but
            exclusive at the upper bound. In other words, this method
            returns the most compact complete chord implied by the bassPitch
            and its figures.



            >>> from music21.figuredBass import realizerScale
            >>> fbScale = realizerScale.FiguredBassScale()
            >>> fbScale.getSamplePitches('D3', '6') # First inversion triad
            [D3, F3, B3]
            >>> fbScale.getSamplePitches('G3') # Root position triad
            [G3, B3, D4]
            >>> fbScale.getSamplePitches('B3', '6,5') # First inversion seventh chord
            [B3, D4, F4, G4]
            >>> fbScale.getSamplePitches('F3', '-6,-') # Neapolitan chord
            [F3, A-3, D-4]
            >>> fbScale.getSamplePitches('C5', '4,3') # Second inversion seventh chord
            [C5, E5, F5, A5]
            >>> fbScale.getSamplePitches('C#3', '-7') # Fully diminished seventh chord
            [C#3, E3, G3, B-3]




