pyrealpro

 
Classes
       
builtins.object
Measure
Song
TimeSignature

 
class Measure(builtins.object)
    Measure(chords, time_sig=None, rehearsal_marks=[], barline_open='', barline_close=None, ending='', staff_text='', render_ts=False)
 
Represents a single measure of an iRealPro song.
 
  Methods defined here:
__init__(self, chords, time_sig=None, rehearsal_marks=[], barline_open='', barline_close=None, ending='', staff_text='', render_ts=False)
Initializes a Measure object.
 
:param chords: Union([str, list]) A string representing a single chord, or a list of chords. If a list is
                                  provided, the list length must either match the number of beats indicated
                                  by the time signature, or the number of beats in the time signature must be
                                  evenly divisible by the number of chords in the list (in which case the chords
                                  will be evenly spaced to fill the measure.)
:param time_sig: (TimeSignature), optional The measure time signature. Defaults to 4/4.
:param rehearsal_marks: Union([str, list]) optional
                                           A string containing a single rehearsal mark, or a list containing
                                           multiple rehearsal marks.  See REHEARSAL_MARKS for possible values.
:param barline_open: (str), optional
                            A string indicating that this measure has a beginning barline. See BARLINES_OPEN for
                            possible values.
:param barline_close: (str), optional
                             A string indicating that this measure has an ending barline. See BARLINES_CLOSE for
                             possible values.
:param ending: (str), optional
                      When building a Song with repeats, indicates that this measure is the beginning of an
                      alternate ending.  See ENDINGS for possible values.
:param staff_text: (str), optional
                          A string to be displayed below the measure.
:param render_ts: (bool), optional
                          Indicates whether the time signature should be included when this measure is output
                          as a string. Defaults to False.
__str__(self)
Return str(self).

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
BARLINES_CLOSE = ['|', ']', '}', 'Z']
BARLINES_OPEN = ['[', '{']
ENDINGS = ['N1', 'N2', 'N3', 'N0']
REHEARSAL_MARKS = ['*A', '*B', '*C', '*D', '*V', '*i', 'S', 'Q', 'f']
barline_close = None
barline_open = None
chords = None
ending = None
rehearsal_marks = None
render_ts = False
staff_text = None
time_sig = None

 
class Song(builtins.object)
    Song(**kwargs)
 
A class for building fake-book style chord charts that can be imported into iRealPro. Implements the iRealPro
data format as described at https://irealpro.com/ireal-pro-file-format/.
 
  Methods defined here:
__init__(self, **kwargs)
Initializes a new Song object.
 
:param title: (str) The title of the song.  Defaults to "Unknown".
:param key: (str) The key signature of the song. Should be a value found in KEY_SIGNATURES.
:param composer_name_first: (str) The composer's first name. Defaults to "Unknown".
:param composer_name_last: (str) The composer's last name.  Defaults to "Unknown".
:param style: (str) The song style. Must be a value found in STYLES_ALL. Defaults to "Medium Swing".
:param measures: (list) A list containing one or more Measure objects. If omitted, it will be initialized as an empty
                 list that can be appended to later.
__str__(self)
Return str(self).
url(self, urlencode=True)
Renders Song as an iRealPro data URL.
 
:param urlencode: (bool), optional
                          Indicates whether or not the result should be URL-encoded.

Readonly properties defined here:
composer_name
:return: (str) The composer's full name in "Last First" format.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
measures = None

 
class TimeSignature(builtins.object)
    TimeSignature(beats=4, duration=4)
 
Represents a musical time signature.
 
  Methods defined here:
__init__(self, beats=4, duration=4)
Initializes a TimeSignature object.
 
:param beats: (int) The number of beats per measure.
:param duration: (int) The duration per beat.
__str__(self)
Return str(self).

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes defined here:
VALID_TIME_SIGNATURES = ['T44', 'T34', 'T24', 'T54', 'T64', 'T74', 'T22', 'T32', 'T58', 'T68', 'T78', 'T98', 'T12']
beats = None
duration = None

 
Data
        KEY_SIGNATURES = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B', 'A-', 'Bb-', 'B-', 'C-', 'C#-', 'D-', 'Eb-', 'E-', ...]
STYLES_ALL = ['Afro 12/8', 'Ballad Double Time Feel', 'Ballad Even', 'Ballad Melodic', 'Ballad Swing', 'Blue Note', 'Bossa Nova', 'Doo Doo Cats', 'Double Time Swing', 'Even 8ths', 'Even 8ths Open', 'Even 16ths', 'Guitar Trio', 'Gypsy Jazz', 'Latin', 'Latin/Swing', 'Long Notes', 'Medium Swing', 'Medium Up Swing', 'Medium Up Swing 2', ...]
STYLES_JAZZ = ['Afro 12/8', 'Ballad Double Time Feel', 'Ballad Even', 'Ballad Melodic', 'Ballad Swing', 'Blue Note', 'Bossa Nova', 'Doo Doo Cats', 'Double Time Swing', 'Even 8ths', 'Even 8ths Open', 'Even 16ths', 'Guitar Trio', 'Gypsy Jazz', 'Latin', 'Latin/Swing', 'Long Notes', 'Medium Swing', 'Medium Up Swing', 'Medium Up Swing 2', ...]
STYLES_LATIN = ['Argentina: Tango', 'Brazil: Bossa Acoustic', 'Brazil: Bossa Electric', 'Brazil: Samba', 'Cuba: Bolero', 'Cuba: Cha Cha Cha', 'Cuba: Son Montuno 2-3', 'Cuba: Son Montuno 3-2']
STYLES_POP = ['Bluegrass', 'Country', 'Disco', 'Funk', 'Glam Funk', 'House', 'Reggae', 'Rock', 'Rock 12/8', 'RnB', 'Shuffle', 'Slow Rock', 'Smooth', 'Soul', 'Virtual Funk']