Tools for building iRealPro songs.
Project description
PyRealPro
The pyrealpro module provides classes that can be used to build a representation of a song, and render it in the import URL format used by the iRealPro app. It assumes that you have a passing familiarity with the iRealPro import format, but hopefully makes it easier to programmatically construct an iRealPro song than resorting to brute-force string concatenation.
Concepts
The Song
class is used to define a song that you wish to import into iRealPro. In addition to basic information like
title, composer, key, and style, a song's measures
property may contain a list of Measure
objects.
A Measure
object's chords
property will have one or more chord names, as well as additional properties that describe
time signature (as a TimeSignature
object), barlines, endings, rehearsal marks, and text to be displayed underneath.
The TimeSignature
class provides simple objects used by the Measure
class to properly format the output ultimately
used by the Song
class to generate an iRealPro URL.
Example
from pyrealpro import Song, Measure, TimeSignature
s = Song(title="Automation Blues", composer="pyrealpro", key='G', style='New Orleans Swing',
composer_name_first="Otto",
composer_name_last="Matonne")
s.measures.append(Measure(chords='G7', barline_open='{', staff_text='Generated by pyrealpro'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))
s.measures.append(Measure(chords='C7', barline_open='['))
s.measures.append(Measure(chords='C7'))
s.measures.append(Measure(chords='G7'))
s.measures.append(Measure(chords='G7', barline_close=']'))
s.measures.append(Measure(chords='D7', barline_open='['))
s.measures.append(Measure(chords='C7'))
s.measures.append(Measure(chords='G7', ending='N1'))
s.measures.append(Measure(chords='D7', barline_close='}'))
s.measures.append(Measure(chords='G7', ending='N2'))
s.measures.append(Measure(chords='G7', barline_close='Z'))
print(s.url())
The above program will output the following URL, which can be imported into iRealPro:
iReal Pro File Format Reference
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyrealpro-0.2.0.tar.gz
.
File metadata
- Download URL: pyrealpro-0.2.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cd8be2a5c78fa77062472db3c3fa80ae196c0abcc01772ee217920a3f10939e |
|
MD5 | 3a3b1075964ac4a88293e5d2b0a9d4eb |
|
BLAKE2b-256 | 3107596f65d26c890ff2bef1233940c209b736590ee7f1d177f7a86e1fb14372 |
File details
Details for the file pyrealpro-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pyrealpro-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a1847e954c205567990e9258b106c69353e07831f8948a74073c49c3a54f04e |
|
MD5 | a9c7ac4c1d0d9f4291c00b9380303767 |
|
BLAKE2b-256 | e04e51e6eebc02e1a3e442ae19df25ba32c363ef8dbbce01d3a63f285427cedc |