spiffyscore

Check-in [4f872339ff]
Login
Overview
SHA1:4f872339ff41a69d874c3519a88dc83b30dd8315
Date: 2011-11-07 01:39:19
User: brian
Comment:Altered the sample-based instruments to ine Csound string formatting instead of a billion if clauses to choose what file to play
Timelines: family | ancestors | descendants | both | develop
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-11-15
22:09
[0c3fb3e27f] Replaced csound support with midi support (user: brian, tags: develop)
15:47
[daa0ddb3ad] Attempted to make a csound based on midi. Failed. (user: brian, tags: feature/midi)
2011-11-07
01:39
[4f872339ff] Altered the sample-based instruments to ine Csound string formatting instead of a billion if clauses to choose what file to play (user: brian, tags: develop)
2011-11-03
19:23
[8293931a34] Added a very, very bad set of violin samples (user: brian, tags: develop)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified cfg.orc from [a0811d420c] to [feddf36ca4].

     1      1   sr=44100
     2      2   ksmps=20
     3      3   nchnls=1
     4      4   
     5         -instr 3
     6         -    if p5=1.05 then
     7         -        asig diskin2 "samples/bass/1.05.wav", 1
     8         -    elseif p5=1.06 then
     9         -        asig diskin2 "samples/bass/1.06.wav", 1
    10         -    elseif p5=1.07 then
    11         -        asig diskin2 "samples/bass/1.07.wav", 1
    12         -    elseif p5=1.08 then
    13         -        asig diskin2 "samples/bass/1.08.wav", 1
    14         -    elseif p5=1.08 then
    15         -        asig diskin2 "samples/bass/1.09.wav", 1
    16         -    elseif p5=1.10 then
    17         -        asig diskin2 "samples/bass/1.10.wav", 1
    18         -    elseif p5=1.11 then
    19         -        asig diskin2 "samples/bass/1.11.wav", 1
    20         -    elseif p5=2.00 then
    21         -        asig diskin2 "samples/bass/2.00.wav", 1
    22         -    elseif p5=2.01 then
    23         -        asig diskin2 "samples/bass/2.01.wav", 1
    24         -    elseif p5=2.02 then
    25         -        asig diskin2 "samples/bass/2.02.wav", 1
    26         -    elseif p5=2.03 then
    27         -        asig diskin2 "samples/bass/2.03.wav", 1
    28         -    elseif p5=2.04 then
    29         -        asig diskin2 "samples/bass/2.04.wav", 1
    30         -    elseif p5=2.05 then
    31         -        asig diskin2 "samples/bass/2.05.wav", 1
    32         -    elseif p5=2.06 then
    33         -        asig diskin2 "samples/bass/2.06.wav", 1
    34         -    elseif p5=2.07 then
    35         -        asig diskin2 "samples/bass/2.07.wav", 1
    36         -    elseif p5=2.08 then
    37         -        asig diskin2 "samples/bass/2.08.wav", 1
    38         -    elseif p5=2.09 then
    39         -        asig diskin2 "samples/bass/2.09.wav", 1
    40         -    elseif p5=2.10 then
    41         -        asig diskin2 "samples/bass/2.10.wav", 1
    42         -    elseif p5=2.11 then
    43         -        asig diskin2 "samples/bass/2.11.wav", 1
    44         -    elseif p5=3.00 then
    45         -        asig diskin2 "samples/bass/3.00.wav", 1
    46         -    elseif p5=3.01 then
    47         -        asig diskin2 "samples/bass/3.01.wav", 1
    48         -    elseif p5=3.02 then
    49         -        asig diskin2 "samples/bass/3.02.wav", 1
    50         -    elseif p5=3.03 then
    51         -        asig diskin2 "samples/bass/3.03.wav", 1
    52         -    elseif p5=3.04 then
    53         -        asig diskin2 "samples/bass/3.04.wav", 1
    54         -    elseif p5=3.05 then
    55         -        asig diskin2 "samples/bass/3.05.wav", 1
    56         -    elseif p5=3.06 then
    57         -        asig diskin2 "samples/bass/3.06.wav", 1
    58         -    elseif p5=3.07 then
    59         -        asig diskin2 "samples/bass/3.07.wav", 1
    60         -    elseif p5=3.08 then
    61         -        asig diskin2 "samples/bass/3.08.wav", 1
    62         -    elseif p5=3.09 then
    63         -        asig diskin2 "samples/bass/3.09.wav", 1
    64         -    elseif p5=3.10 then
    65         -        asig diskin2 "samples/bass/3.10.wav", 1
    66         -    elseif p5=3.11 then
    67         -        asig diskin2 "samples/bass/3.11.wav", 1
    68         -    endif
    69         -    outs asig
    70         -endin
    71         -
    72      5   instr 1
    73         -    asound pluck   p4, cpspch(p5), cpspch(p6), p7, p8 p9 p10
    74         -    out asound
            6  +;    kcps = 220
            7  +;    icps = 220
            8  +;    ifn  = 0
            9  +;    imeth = p4
           10  +;;    asig pluck 0.7, cpspch(p5), cpspch(p6), ifn, imeth, .1, 10
           11  +    asig pluck   p4, cpspch(p5), cpspch(p6), p7, p8 p9 p10
           12  +    out asig
    75     13   endin
    76     14   
    77     15   instr 2
    78     16       kenv linen p4, .1, p3, .2; envelope
    79     17       asound oscili kenv, cpspch(p5), p6; oscillator
    80     18       out asound
    81     19   endin
           20  +
           21  +instr 3
           22  +;    pylassigni "note", p5
           23  +;    pylruni "sample_file = 'samples/bass/%.2f.wav' % note"
           24  +;    Ssample_file pylevali "sample_file"
           25  +
           26  +    Ssample_file sprintf "samples/bass/%.2f.wav", p5
           27  +    asig diskin2 Ssample_file, 1
           28  +    outs asig
           29  +endin
    82     30   
    83     31   instr 4
    84     32       aFMinst foscili p4, cpspch(p5), p6, p7, p8, p9
    85     33   endin
    86     34   
    87     35   instr 5
    88         -    if p5=3.07 then
    89         -        asig diskin2 "samples/violin/3.07.wav", 1
    90         -    elseif p5=3.08 then
    91         -        asig diskin2 "samples/violin/3.08.wav", 1
    92         -    elseif p5=3.08 then
    93         -        asig diskin2 "samples/violin/3.09.wav", 1
    94         -    elseif p5=3.10 then
    95         -        asig diskin2 "samples/violin/3.10.wav", 1
    96         -    elseif p5=3.11 then
    97         -        asig diskin2 "samples/violin/3.11.wav", 1
    98         -    elseif p5=4.00 then
    99         -        asig diskin2 "samples/violin/4.00.wav", 1
   100         -    elseif p5=4.01 then
   101         -        asig diskin2 "samples/violin/4.01.wav", 1
   102         -    elseif p5=4.02 then
   103         -        asig diskin2 "samples/violin/4.02.wav", 1
   104         -    elseif p5=4.03 then
   105         -        asig diskin2 "samples/violin/4.03.wav", 1
   106         -    elseif p5=4.04 then
   107         -        asig diskin2 "samples/violin/4.04.wav", 1
   108         -    elseif p5=4.05 then
   109         -        asig diskin2 "samples/violin/4.05.wav", 1
   110         -    elseif p5=4.06 then
   111         -        asig diskin2 "samples/violin/4.06.wav", 1
   112         -    elseif p5=4.07 then
   113         -        asig diskin2 "samples/violin/4.07.wav", 1
   114         -    elseif p5=4.08 then
   115         -        asig diskin2 "samples/violin/4.08.wav", 1
   116         -    elseif p5=4.09 then
   117         -        asig diskin2 "samples/violin/4.09.wav", 1
   118         -    elseif p5=4.10 then
   119         -        asig diskin2 "samples/violin/4.10.wav", 1
   120         -    elseif p5=4.11 then
   121         -        asig diskin2 "samples/violin/4.11.wav", 1
   122         -    elseif p5=5.00 then
   123         -        asig diskin2 "samples/violin/5.00.wav", 1
   124         -    elseif p5=5.01 then
   125         -        asig diskin2 "samples/violin/5.01.wav", 1
   126         -    elseif p5=5.02 then
   127         -        asig diskin2 "samples/violin/5.02.wav", 1
   128         -    elseif p5=5.03 then
   129         -        asig diskin2 "samples/violin/5.03.wav", 1
   130         -    elseif p5=5.04 then
   131         -        asig diskin2 "samples/violin/5.04.wav", 1
   132         -    elseif p5=5.05 then
   133         -        asig diskin2 "samples/violin/5.05.wav", 1
   134         -    elseif p5=5.06 then
   135         -        asig diskin2 "samples/violin/5.06.wav", 1
   136         -    elseif p5=5.07 then
   137         -        asig diskin2 "samples/violin/5.07.wav", 1
   138         -    elseif p5=5.08 then
   139         -        asig diskin2 "samples/violin/5.08.wav", 1
   140         -    elseif p5=5.09 then
   141         -        asig diskin2 "samples/violin/5.09.wav", 1
   142         -    elseif p5=5.10 then
   143         -        asig diskin2 "samples/violin/5.10.wav", 1
   144         -    elseif p5=5.11 then
   145         -        asig diskin2 "samples/violin/5.11.wav", 1
   146         -    endif
           36  +    Ssample_file sprintf "samples/bass/%.2f.wav", p5
           37  +    asig diskin2 Ssample_file, 1
   147     38       outs asig
   148     39   endin

Modified spiffyscore.py from [c67f427fd6] to [390f3e8450].

   101    101                           "u": ["C/4 C/4 C/4 C/4"],
   102    102                       },
   103    103                   },
   104    104               },
   105    105           },
   106    106           "sync_test": {
   107    107               "body": {
   108         -                "lead_instr": {  # Instrument 'melody'
   109         -                    "score_line": "i5 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
   110         -                    "octave": 4,
   111         -                    "duration": 30,
   112         -                    "grammars": {  # Notes for this instrument to use in this piece
   113         -#                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
   114         -                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
   115         -                        "v": ["C/2 C/2 C/2 C/2 (w)"],
   116         -                        "w": ["E/2 F/2 E/2 F/2 (u)"],
   117         -                    },
   118         -                },
          108  +#                "lead_instr": {  # Instrument 'melody'
          109  +#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
          110  +##                    "score_line": "i5 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
          111  +#                    "octave": 7,
          112  +#                    "duration": 30,
          113  +#                    "grammars": {  # Notes for this instrument to use in this piece
          114  +##                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
          115  +#                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
          116  +#                        "v": ["C/2 C/2 C/2 C/2 (w)"],
          117  +#                        "w": ["E/2 F/2 E/2 F/2 (u)"],
          118  +#                    },
          119  +#                },
   119    120                   "follow_instr": {  # Instrument 'melody'
          121  +#                    "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1",
   120    122                       "score_line": "i3 %(time)f %(duration)f 7000 %(octave)d.%(note)s",
   121    123   #                    "sync": "lead_instr",
   122    124                       "octave": 2,
   123    125                       "duration": 30,
   124    126                       "grammars": {  # Notes for this instrument to use in this piece
   125    127   #                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
   126    128                           "u": ["E F G E (v)"],
   127    129                           "v": ["G A A A (e)", "G A A A (v)"],
   128         -                        "e": ["B A G A (v)"],
          130  +                        "e": ["B A G A (u)"],
   129    131                       },
   130    132                   },
          133  +#                "instr2": {  # Instrument 'melody'
          134  +#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6",
          135  +#                    "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s",
          136  +#                    "octave": 5,
          137  +#                    "duration": 30,
          138  +#                    "grammars": {  # Notes for this instrument to use in this piece
          139  +##                        "u": ["A ^A B C ^C D ^D E F ^F G ^G"],
          140  +#                        "u": ["A/2, B/2, C/2 D/2 (u)", "D/2' D/2' D/2' D/2' (v)"],
          141  +#                        "v": ["C/2 C/2 C/2 C/2 (w)"],
          142  +#                        "w": ["E/2 F/2 E/2 F/2 (u)"],
          143  +#                    },
          144  +#                },
   131    145               },
   132    146           },
   133    147       }
   134    148       print '''f1 0 512 10 1
   135    149   f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08
   136    150   f3 0 1025 10 1
   137         -t 0 100
          151  +t 0 60
   138    152       '''
   139    153   
   140    154       section_start = 0
   141    155   #    for section in ["verse1", "verse2"]:
   142    156       for section in ["sync_test"]:
   143    157           print "; Section " + section
   144    158           subsection_start = section_start