spiffyscore

Check-in [bf135b5321]
Login
Overview
SHA1:bf135b5321a32d06a8953b74eafbd80e84af8b4f
Date: 2011-11-27 02:26:33
User: brian
Comment:Fixed a bug that prevented sharps and flats from working
Timelines: family | ancestors | descendants | both | develop
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-11-27
02:56
[8f28834102] Fixed chord support (user: brian, tags: develop)
02:26
[bf135b5321] Fixed a bug that prevented sharps and flats from working (user: brian, tags: develop)
02:03
[821ac3e4d6] Added a volume offset parameter to each instrument. Fixed a bug that kept instruments from always being rendered, and one that broke midi files. (user: brian, tags: develop)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified parse.py from [ce9611a745] to [4cca2f3d0c].

   120    120           note.syncopate = p[2]
   121    121   
   122    122   
   123    123       def p_accidental(p):
   124    124           '''note : ACCIDENTAL note
   125    125           '''
   126    126           if p[1] == "^":
   127         -            p[0] = p[2].value + 1
          127  +            p[2].value += 1
   128    128           else:
   129         -            p[0] = p[2].value - 1
          129  +            p[2].value -= 1
          130  +        p[0] = p[2]
   130    131   
   131    132       def p_octave(p):
   132    133           '''note : note OCTAVE
   133    134           '''
   134    135           count = len(p[2])
   135    136           increment_or_decrement = 1 if p[2].startswith("'") else -1
   136    137           p[1].octave += (count * increment_or_decrement)

Modified spiffyscore.py from [58892e1cd4] to [8b19298d3a].

    17     17   random.seed(time.time())
    18     18   mymidi = midifile(15)
    19     19   
    20     20   def main():
    21     21       composition = {
    22     22           "intro": {
    23     23               "body": {
    24         -                "pan_flute": {  # Instrument 'melody'
           24  +                "percusion": {
           25  +                    "channel": 14,
           26  +                    "octave": 4,
           27  +                    "duration": 60,
           28  +                    "grammars": {
           29  +                        "u": ["A ^A (u)"]
           30  +                    }
           31  +                },
           32  +                "pan_flute": {
    25     33                       "channel": 8,
    26     34                       "octave": 5,
    27     35                       "duration": 60,
    28     36                       "grammars": {  # Notes for this instrument to use in this piece
    29     37                           "u": ["C2' B2 | A3 D3 || B | C' | D | C2' C2' | z | (u)", "C2' C2' | C2' C2' | (x)"],
    30     38                           "v": ["G2 F2 | E2 F2 | D5 (u)", "B/4 C/4' B/4 A/4 | D2 D2 | z | (u)"],
    31     39                           "x": ["z4 | (v)"],