11<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2- < html > < head > < title > Python: package pyrealpro</ title >
2+ < html > < head > < title > Python: module pyrealpro</ title >
33< meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 ">
44</ head > < body bgcolor ="#f0f0f8 ">
55
88< td valign =bottom > < br >
99< font color ="#ffffff " face ="helvetica, arial "> < br > < big > < big > < strong > pyrealpro</ strong > </ big > </ big > </ font > </ td
1010> < td align =right valign =bottom
11- > < font color =" #ffffff " face =" helvetica, arial " > < a href =" . " > index </ a > < br > < a href =" file:/home/andy/Projects/pyrealpro/pyrealpro/__init__.py " > /home/andy/Projects/pyrealpro/pyrealpro/__init__.py </ a > </ font > < /td > </ tr > </ table >
11+ > </ td > </ tr > </ table >
1212 < p > </ p >
1313< p >
1414< table width ="100% " cellspacing =0 cellpadding =2 border =0 summary ="section ">
15- < tr bgcolor ="#aa55cc ">
15+ < tr bgcolor ="#ee77aa ">
1616< td colspan =3 valign =bottom > < br >
17- < font color ="#ffffff " face ="helvetica, arial "> < big > < strong > Package Contents </ strong > </ big > </ font > </ td > </ tr >
17+ < font color ="#ffffff " face ="helvetica, arial "> < big > < strong > Classes </ strong > </ big > </ font > </ td > </ tr >
1818
19- < tr > < td bgcolor ="#aa55cc "> < tt > </ tt > </ td > < td > </ td >
20- < td width ="100% "> < table width ="100% " summary ="list "> < tr > < td width ="25% " valign =top > < a href ="pyrealpro.pyrealpro.html "> pyrealpro</ a > < br >
21- </ td > < td width ="25% " valign =top > < a href ="pyrealpro.test.html "> < strong > test</ strong > (package)</ a > < br >
22- </ td > < td width ="25% " valign =top > </ td > < td width ="25% " valign =top > </ td > </ tr > </ table > </ td > </ tr > </ table > < p >
19+ < tr > < td bgcolor ="#ee77aa "> < tt > </ tt > </ td > < td > </ td >
20+ < td width ="100% "> < dl >
21+ < dt > < font face ="helvetica, arial "> < a href ="builtins.html#object "> builtins.object</ a >
22+ </ font > </ dt > < dd >
23+ < dl >
24+ < dt > < font face ="helvetica, arial "> < a href ="pyrealpro.html#Measure "> Measure</ a >
25+ </ font > </ dt > < dt > < font face ="helvetica, arial "> < a href ="pyrealpro.html#Song "> Song</ a >
26+ </ font > </ dt > < dt > < font face ="helvetica, arial "> < a href ="pyrealpro.html#TimeSignature "> TimeSignature</ a >
27+ </ font > </ dt > </ dl >
28+ </ dd >
29+ </ dl >
30+ < p >
31+ < table width ="100% " cellspacing =0 cellpadding =2 border =0 summary ="section ">
32+ < tr bgcolor ="#ffc8d8 ">
33+ < td colspan =3 valign =bottom > < br >
34+ < font color ="#000000 " face ="helvetica, arial "> < a name ="Measure "> class < strong > Measure</ strong > </ a > (< a href ="builtins.html#object "> builtins.object</ a > )</ font > </ td > </ tr >
35+
36+ < tr bgcolor ="#ffc8d8 "> < td rowspan =2 > < tt > </ tt > </ td >
37+ < td colspan =2 > < tt > < a href ="#Measure "> Measure</ a > (chords, time_sig=None, rehearsal_marks=[], barline_open='', barline_close=None, ending='', staff_text='', render_ts=False)< br >
38+ < br >
39+ Represents a single measure of an iRealPro song.< br > </ tt > </ td > </ tr >
40+ < tr > < td > </ td >
41+ < td width ="100% "> Methods defined here:< br >
42+ < dl > < dt > < a name ="Measure-__init__ "> < strong > __init__</ strong > </ a > (self, chords, time_sig=None, rehearsal_marks=[], barline_open='', barline_close=None, ending='', staff_text='', render_ts=False)</ dt > < dd > < tt > Initializes a < a href ="#Measure "> Measure</ a > < a href ="builtins.html#object "> object</ a > .< br >
43+ < br >
44+ :param chords: Union([str, list]) A string representing a single chord, or a list of chords. If a list is< br >
45+ provided, the list length must either match the number of beats indicated< br >
46+ by the time signature, or the number of beats in the time signature must be< br >
47+ evenly divisible by the number of chords in the list (in which case the chords< br >
48+ will be evenly spaced to fill the measure.)< br >
49+ :param time_sig: (< a href ="#TimeSignature "> TimeSignature</ a > ), optional The measure time signature. Defaults to 4/4.< br >
50+ :param rehearsal_marks: Union([str, list]) optional< br >
51+ A string containing a single rehearsal mark, or a list containing< br >
52+ multiple rehearsal marks. See REHEARSAL_MARKS for possible values.< br >
53+ :param barline_open: (str), optional< br >
54+ A string indicating that this measure has a beginning barline. See BARLINES_OPEN for< br >
55+ possible values.< br >
56+ :param barline_close: (str), optional< br >
57+ A string indicating that this measure has an ending barline. See BARLINES_CLOSE for< br >
58+ possible values.< br >
59+ :param ending: (str), optional< br >
60+ When building a < a href ="#Song "> Song</ a > with repeats, indicates that this measure is the beginning of an< br >
61+ alternate ending. See ENDINGS for possible values.< br >
62+ :param staff_text: (str), optional< br >
63+ A string to be displayed below the measure.< br >
64+ :param render_ts: (bool), optional< br >
65+ Indicates whether the time signature should be included when this measure is output< br >
66+ as a string. Defaults to False.</ tt > </ dd > </ dl >
67+
68+ < dl > < dt > < a name ="Measure-__str__ "> < strong > __str__</ strong > </ a > (self)</ dt > < dd > < tt > Return str(self).</ tt > </ dd > </ dl >
69+
70+ < hr >
71+ Data descriptors defined here:< br >
72+ < dl > < dt > < strong > __dict__</ strong > </ dt >
73+ < dd > < tt > dictionary for instance variables (if defined)</ tt > </ dd >
74+ </ dl >
75+ < dl > < dt > < strong > __weakref__</ strong > </ dt >
76+ < dd > < tt > list of weak references to the object (if defined)</ tt > </ dd >
77+ </ dl >
78+ < hr >
79+ Data and other attributes defined here:< br >
80+ < dl > < dt > < strong > BARLINES_CLOSE</ strong > = ['|', ']', '}', 'Z']</ dl >
81+
82+ < dl > < dt > < strong > BARLINES_OPEN</ strong > = ['[', '{']</ dl >
83+
84+ < dl > < dt > < strong > ENDINGS</ strong > = ['N1', 'N2', 'N3', 'N0']</ dl >
85+
86+ < dl > < dt > < strong > REHEARSAL_MARKS</ strong > = ['*A', '*B', '*C', '*D', '*V', '*i', 'S', 'Q', 'f']</ dl >
87+
88+ < dl > < dt > < strong > barline_close</ strong > = None</ dl >
89+
90+ < dl > < dt > < strong > barline_open</ strong > = None</ dl >
91+
92+ < dl > < dt > < strong > chords</ strong > = None</ dl >
93+
94+ < dl > < dt > < strong > ending</ strong > = None</ dl >
95+
96+ < dl > < dt > < strong > rehearsal_marks</ strong > = None</ dl >
97+
98+ < dl > < dt > < strong > render_ts</ strong > = False</ dl >
99+
100+ < dl > < dt > < strong > staff_text</ strong > = None</ dl >
101+
102+ < dl > < dt > < strong > time_sig</ strong > = None</ dl >
103+
104+ </ td > </ tr > </ table > < p >
105+ < table width ="100% " cellspacing =0 cellpadding =2 border =0 summary ="section ">
106+ < tr bgcolor ="#ffc8d8 ">
107+ < td colspan =3 valign =bottom > < br >
108+ < font color ="#000000 " face ="helvetica, arial "> < a name ="Song "> class < strong > Song</ strong > </ a > (< a href ="builtins.html#object "> builtins.object</ a > )</ font > </ td > </ tr >
109+
110+ < tr bgcolor ="#ffc8d8 "> < td rowspan =2 > < tt > </ tt > </ td >
111+ < td colspan =2 > < tt > < a href ="#Song "> Song</ a > (**kwargs)< br >
112+ < br >
113+ A class for building fake-book style chord charts that can be imported into iRealPro. Implements the iRealPro< br >
114+ data format as described at https://irealpro.com/ireal-pro-file-format/.< br > </ tt > </ td > </ tr >
115+ < tr > < td > </ td >
116+ < td width ="100% "> Methods defined here:< br >
117+ < dl > < dt > < a name ="Song-__init__ "> < strong > __init__</ strong > </ a > (self, **kwargs)</ dt > < dd > < tt > Initializes a new < a href ="#Song "> Song</ a > < a href ="builtins.html#object "> object</ a > .< br >
118+ < br >
119+ :param title: (str) The title of the song. Defaults to "Unknown".< br >
120+ :param key: (str) The key signature of the song. Should be a value found in KEY_SIGNATURES.< br >
121+ :param composer_name_first: (str) The composer's first name. Defaults to "Unknown".< br >
122+ :param composer_name_last: (str) The composer's last name. Defaults to "Unknown".< br >
123+ :param style: (str) The song style. Must be a value found in STYLES_ALL. Defaults to "Medium Swing".< br >
124+ :param measures: (list) A list containing one or more < a href ="#Measure "> Measure</ a > objects. If omitted, it will be initialized as an empty< br >
125+ list that can be appended to later.</ tt > </ dd > </ dl >
126+
127+ < dl > < dt > < a name ="Song-__str__ "> < strong > __str__</ strong > </ a > (self)</ dt > < dd > < tt > Return str(self).</ tt > </ dd > </ dl >
128+
129+ < dl > < dt > < a name ="Song-url "> < strong > url</ strong > </ a > (self, urlencode=True)</ dt > < dd > < tt > Renders < a href ="#Song "> Song</ a > as an iRealPro data URL.< br >
130+ < br >
131+ :param urlencode: (bool), optional< br >
132+ Indicates whether or not the result should be URL-encoded.</ tt > </ dd > </ dl >
133+
134+ < hr >
135+ Data descriptors defined here:< br >
136+ < dl > < dt > < strong > __dict__</ strong > </ dt >
137+ < dd > < tt > dictionary for instance variables (if defined)</ tt > </ dd >
138+ </ dl >
139+ < dl > < dt > < strong > __weakref__</ strong > </ dt >
140+ < dd > < tt > list of weak references to the object (if defined)</ tt > </ dd >
141+ </ dl >
142+ < dl > < dt > < strong > composer_name</ strong > </ dt >
143+ < dd > < tt > :return: (str) The composer's full name in "Last First" format.</ tt > </ dd >
144+ </ dl >
145+ < hr >
146+ Data and other attributes defined here:< br >
147+ < dl > < dt > < strong > measures</ strong > = None</ dl >
148+
149+ </ td > </ tr > </ table > < p >
150+ < table width ="100% " cellspacing =0 cellpadding =2 border =0 summary ="section ">
151+ < tr bgcolor ="#ffc8d8 ">
152+ < td colspan =3 valign =bottom > < br >
153+ < font color ="#000000 " face ="helvetica, arial "> < a name ="TimeSignature "> class < strong > TimeSignature</ strong > </ a > (< a href ="builtins.html#object "> builtins.object</ a > )</ font > </ td > </ tr >
154+
155+ < tr bgcolor ="#ffc8d8 "> < td rowspan =2 > < tt > </ tt > </ td >
156+ < td colspan =2 > < tt > < a href ="#TimeSignature "> TimeSignature</ a > (beats=4, duration=4)< br >
157+ < br >
158+ Represents a musical time signature.< br > </ tt > </ td > </ tr >
159+ < tr > < td > </ td >
160+ < td width ="100% "> Methods defined here:< br >
161+ < dl > < dt > < a name ="TimeSignature-__init__ "> < strong > __init__</ strong > </ a > (self, beats=4, duration=4)</ dt > < dd > < tt > Initializes a < a href ="#TimeSignature "> TimeSignature</ a > < a href ="builtins.html#object "> object</ a > .< br >
162+ < br >
163+ :param beats: (int) The number of beats per measure.< br >
164+ :param duration: (int) The duration per beat.</ tt > </ dd > </ dl >
165+
166+ < dl > < dt > < a name ="TimeSignature-__str__ "> < strong > __str__</ strong > </ a > (self)</ dt > < dd > < tt > Return str(self).</ tt > </ dd > </ dl >
167+
168+ < hr >
169+ Data descriptors defined here:< br >
170+ < dl > < dt > < strong > __dict__</ strong > </ dt >
171+ < dd > < tt > dictionary for instance variables (if defined)</ tt > </ dd >
172+ </ dl >
173+ < dl > < dt > < strong > __weakref__</ strong > </ dt >
174+ < dd > < tt > list of weak references to the object (if defined)</ tt > </ dd >
175+ </ dl >
176+ < hr >
177+ Data and other attributes defined here:< br >
178+ < dl > < dt > < strong > VALID_TIME_SIGNATURES</ strong > = ['T44', 'T34', 'T24', 'T54', 'T64', 'T74', 'T22', 'T32', 'T58', 'T68', 'T78', 'T98', 'T12']</ dl >
179+
180+ < dl > < dt > < strong > beats</ strong > = None</ dl >
181+
182+ < dl > < dt > < strong > duration</ strong > = None</ dl >
183+
184+ </ td > </ tr > </ table > </ td > </ tr > </ table > < p >
23185< table width ="100% " cellspacing =0 cellpadding =2 border =0 summary ="section ">
24186< tr bgcolor ="#55aa55 ">
25187< td colspan =3 valign =bottom > < br >
26188< font color ="#ffffff " face ="helvetica, arial "> < big > < strong > Data</ strong > </ big > </ font > </ td > </ tr >
27189
28190< tr > < td bgcolor ="#55aa55 "> < tt > </ tt > </ td > < td > </ td >
29- < td width ="100% "> < strong > name</ strong > = 'pyrealpro'</ td > </ tr > </ table >
191+ < td width ="100% "> < strong > KEY_SIGNATURES</ strong > = ['C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B', 'A-', 'Bb-', 'B-', 'C-', 'C#-', 'D-', 'Eb-', 'E-', ...]< br >
192+ < strong > STYLES_ALL</ strong > = ['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', ...]< br >
193+ < strong > STYLES_JAZZ</ strong > = ['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', ...]< br >
194+ < strong > STYLES_LATIN</ strong > = ['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']< br >
195+ < strong > STYLES_POP</ strong > = ['Bluegrass', 'Country', 'Disco', 'Funk', 'Glam Funk', 'House', 'Reggae', 'Rock', 'Rock 12/8', 'RnB', 'Shuffle', 'Slow Rock', 'Smooth', 'Soul', 'Virtual Funk']</ td > </ tr > </ table >
30196</ body > </ html >
0 commit comments