Index: cfg.orc ================================================================== --- cfg.orc +++ cfg.orc @@ -15,5 +15,9 @@ instr 3 asound foscili p4, cpspch(p5), 5, 2, 3, p9 out asound endin + +instr 4 + aFMinst foscili p4, cpspch(p5), p6, p7, p8, p9 +endin Index: cfg.py ================================================================== --- cfg.py +++ cfg.py @@ -12,50 +12,92 @@ random.seed(time.time()) def main(): composition = { + "fm_test": { + "intro": { + "melody": { # Instrument 'melody' + "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2 6 5 1", + "octave": 8, + "duration": 10, + "grammars": { # Notes for this instrument to use in this piece + "u": ["G/2 G/2 | G/4 G/4 A/4 A/4 | A/2 A/2 | G | G | A | A | A3 (w)"], + "w": ["E | E | F | F | G/2 G/2 | G3 (u)"], + }, + }, + }, + }, "verse1": { "intro": { "melody": { # Instrument 'melody' - "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2", + "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1", "octave": 8, "duration": 10, "grammars": { # Notes for this instrument to use in this piece - "u": ["G/2 G/2 G/4 G/4 A/4 A/4 A/2 G G A A A3 (w)"], - "w": ["E E F F G/2 G/2 G3 (u)"], + "u": ["G/2 G/2 | G/4 G/4 A/4 A/4 | A/2 A/2 | G | G | A | A | A3 (w)"], + "w": ["E | E | F | F | G/2 G/2 | G3 (u)"], }, }, }, "body": { "melody": { # Instrument 'melody' - "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2", + "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1", + "octave": 8, + "duration": 10, + "grammars": { # Notes for this instrument to use in this piece + "u": ["C | G/2 G/2 | G/2 G/2 | C | B, | F' | C | F | C | B | F | (w)"], + "w": ["E/4 A/4 D/4 G/4 | F/4 F/4 B2 | (u)"], + }, + }, + }, + "outro": { + "melody": { # Instrument 'melody' + "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1", "octave": 8, "duration": 10, "grammars": { # Notes for this instrument to use in this piece - "u": ["C G/2 G/2 G/2 C B, F' C F C B F (w)"], - "w": ["E/4 A/4 D/4 G/4 F/4 F/4 B2 (u)"], + "u": ["C/4 C/4 C/4 C/4 | z2"], }, }, }, }, "verse2": { "body": { "melody": { # Instrument 'melody' - "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2", + "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 1", "octave": 8, - "duration": 10, + "duration": 30, "grammars": { # Notes for this instrument to use in this piece - "u": ["C C C C F/2 F/2 F/2 (u)", "D D G/2 A/2 D D (u)"], + "u": ["C | C | C | C | F/2 F/2 | F/2 F/2 | (u)", "D | D | G/2 A/2 | D | D | (u)"], }, }, "harmony": { # Instrument 'melody' - "score_line": "i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2", + "score_line": "i3 %(time)f %(duration)f 4000 %(octave)d.%(note)s 2 3 5 3", + "octave": 8, + "duration": 30, + "grammars": { # Notes for this instrument to use in this piece + "u": ["C | C | z | C | C | z/2 F/4 F/2 F/2 | F/2 F/2 | z (u)", "D | D | G/2 A/2 | D | D | z (u)"], + }, + }, + "percussion": { # Instrument 'melody' + "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6", + "octave": 8, + "duration": 30, + "grammars": { # Notes for this instrument to use in this piece + "u": ["C/4 C/4 C/4 C/4 | F/2 F/2 | F/2 F/2 | (u)", "D/4 D/4 G/4 A/4 | D | D | (v)"], + "v": ["C | D | E | F | E | D | C | (u)",], + }, + }, + }, + "outro": { + "percussion": { # Instrument 'melody' + "score_line": "i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6", "octave": 8, - "duration": 10, + "duration": 30, "grammars": { # Notes for this instrument to use in this piece - "u": ["C C C C F/2 F/2 F/2 (u)", "D D G/2 A/2 D D (u)"], + "u": ["C/4 C/4 C/4 C/4"], }, }, }, }, } @@ -64,11 +106,12 @@ f3 0 1025 10 1 t 0 100 ''' section_start = 0 - for section in ["verse1", "verse2"]: +# for section in ["verse1", "verse2"]: + for section in ["fm_test"]: print "; Section " + section subsection_start = section_start section = composition[section] for subsection in ["intro", "body", "outro"]: try: ADDED score.yaml Index: score.yaml ================================================================== --- score.yaml +++ score.yaml @@ -0,0 +1,39 @@ +--- +chorus: + core: + rhythm: + csound_line: i1 %(time)f %(duration)f 7000 %(octave)d.%(note)s %(octave)d.%(note)s 0 6 + max_duration: 80 + sync: timbre + octave: 7 + sustain: 1 + grammars: + u: + - (I) (ii)/4 (ii)/4 (IV)/2 (V)2 (IV) (ii) x u + - (I) (vii) (III) y u + - (I) (v) (IV) u u + w: (i) (VII)2 (VI)/4 (V)/4 (i)/4 (VII)2 (VI) (V) w u + x: (III/2) (VI)/2 (III)/2 (vii)2 (i)2 (V) u + y: (I) (vi)2 (IV) (V) y y u + + timbre: + csound_line: i3 %(time)f %(duration)f 2000 %(octave)d.%(note)s 2 3 5 3 + max_duration: 80 + sync: melody + sustain: 1 + octave: 6 + grammars: + u: + - I2+ VII2 V2 VI2 I2 IV/2 V/2 III2 u + - I2- IV2 V2 IV I V2 III2 II2. u + + melody: + csound_line: i2 %(time)f %(duration)f 7000 %(octave)d.%(note)s 2 + max_duration: 80 + octave: 8 + grammars: + u: + - I V/2 V/2 V/2 I VII + - IV' I IV I VII IV + w: III/4 VI/4 II/4 V/4 VI/4 IV/4 VII2 + x: I/2 I/2 VI IV/2 V2 z I/2 I/2 VI IV/2 V Index: test.sco ================================================================== --- test.sco +++ test.sco @@ -1,45 +1,17 @@ f1 0 512 10 1 f2 0 8192 10 .24 .64 .88 .76 .06 .5 .34 .08 f3 0 1025 10 1 t 0 100 -; Section verse1 -; Subsection intro -;Instrument melody -i2 0.000000 1.000000 7000 8.04 2 -i2 1.000000 1.000000 7000 8.04 2 -i2 2.000000 1.000000 7000 8.05 2 -i2 3.000000 1.000000 7000 8.05 2 -i2 4.000000 0.500000 7000 8.07 2 -i2 4.500000 0.500000 7000 8.07 2 -i2 5.000000 3.000000 7000 8.07 2 -; Subsection body -;Instrument melody -i2 8.000000 0.250000 7000 8.04 2 -i2 8.250000 0.250000 7000 8.09 2 -i2 8.500000 0.250000 7000 8.02 2 -i2 8.750000 0.250000 7000 8.07 2 -i2 9.000000 0.250000 7000 8.05 2 -i2 9.250000 0.250000 7000 8.05 2 -i2 9.500000 2.000000 7000 8.11 2 -; Subsection outro -; Section verse2 -; Subsection intro -; Subsection body -;Instrument melody -i2 11.500000 1.000000 7000 8.00 2 -i2 12.500000 1.000000 7000 8.00 2 -i2 13.500000 1.000000 7000 8.00 2 -i2 14.500000 1.000000 7000 8.00 2 -i2 15.500000 0.500000 7000 8.05 2 -i2 16.000000 0.500000 7000 8.05 2 -i2 16.500000 0.500000 7000 8.05 2 -;Instrument harmony -i2 11.500000 1.000000 7000 8.00 2 -i2 12.500000 1.000000 7000 8.00 2 -i2 13.500000 1.000000 7000 8.00 2 -i2 14.500000 1.000000 7000 8.00 2 -i2 15.500000 0.500000 7000 8.05 2 -i2 16.000000 0.500000 7000 8.05 2 -i2 16.500000 0.500000 7000 8.05 2 +; Section fm_test +; Subsection intro +;Instrument melody +i2 0.000000 1.000000 7000 8.04 2 6 5 1 +i2 1.000000 1.000000 7000 8.04 2 6 5 1 +i2 2.000000 1.000000 7000 8.05 2 6 5 1 +i2 3.000000 1.000000 7000 8.05 2 6 5 1 +i2 4.000000 0.500000 7000 8.07 2 6 5 1 +i2 4.500000 0.500000 7000 8.07 2 6 5 1 +i2 5.000000 3.000000 7000 8.07 2 6 5 1 +; Subsection body ; Subsection outro