pyabc2.Tune¶
- class pyabc2.Tune(abc)¶
Tune.
- Parameters:
abc (
str) – String of a single ABC tune.
Examples
>>> from pyabc2 import Tune >>> Tune("""\ ... T: G major scale ... K: G ... GABc defg | fedc BAG2 || ... """) Tune(title='G major scale', key=Gmaj, type='?')
Note
You must include the
K:info field as the last header line for the tune header and body to be properly recognized (titleandmeasuresto be populated, etc.).>>> from pyabc2.sources import load_example_abc >>> Tune(load_example_abc("Tell Her I am")) Tune(title='Tell Her I Am', key=Gmaj, type='jig')
Methods
__init__(abc)Iterator (generator) for
Notes of the tune.print_measures([n, note_format])Print measures to check parsing.
Attributes
Original ABC string.
Information contained in the tune header.
Tune primary title (first in the ABC).
All tune titles.
Tune type/rhythm, e.g. 'jig'.
Key object corresponding to the tune's key.
Revelant URL for this particular tune/setting.
Notes from "playing" the tune.