~ubuntu-branches/ubuntu/utopic/midge/utopic

« back to all changes in this revision

Viewing changes to examples/tutorial/time_choose.mg

  • Committer: Bazaar Package Importer
  • Author(s): Mario Lang
  • Date: 2004-05-01 15:23:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040501152357-effrpw4kn030r097
Tags: upstream-0.2.38
ImportĀ upstreamĀ versionĀ 0.2.38

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This is the same as note_choose.mg except different length
 
2
# notes are used in the choose blocks, with the time option
 
3
# used to fix the overall length of the blocks.
 
4
 
 
5
@head { $tempo 120 $time_sig 4/4 }
 
6
 
 
7
@body {
 
8
 
 
9
        # random notes on piano
 
10
        # 4 bars of a, 4 bars of d, repeated 4 times
 
11
 
 
12
        @channel 1 piano {
 
13
 
 
14
                $length 16 $patch 2 $volume 104
 
15
 
 
16
                %repeat 4 {
 
17
 
 
18
                        # pick 4 bars' worth of notes from the a scale
 
19
                        %choose 4:1 { 
 
20
                                4 /l8/a3 2 /l16/c4 3 /l16/d4 3 /l8/e4 3 /l16/g4
 
21
                                2 /l16/a4 2 /l16/e5 2 /l16/d5 1 /l8/g5 1 /l16/r
 
22
                        }
 
23
 
 
24
                        # pick 4 bars' worth of notes from the d scale
 
25
                        %choose 4:1 { 
 
26
                                4 /l8/d3 2 /l16/f4 3 /l16/g4 3 /l8/a4 3 /l16/c4
 
27
                                2 /l16/d4 2 /l16/a5 2 /l16/g5 1 /l8/c5 1 /l16/r
 
28
                        }
 
29
 
 
30
                }
 
31
 
 
32
        }
 
33
 
 
34
        # backing chords on organ
 
35
 
 
36
        %define Am { ( a2 c3 e3 a3 c4 e4 ) }
 
37
        %define Dm { ( d2 f3 a3 d3 f4 a4 ) }
 
38
        
 
39
 
 
40
        @channel 2 organ {
 
41
 
 
42
                $length 1 $octave 3 $patch 18
 
43
 
 
44
                %repeat 4 {
 
45
                        %repeat 4 { ~Am }
 
46
                        %repeat 4 { ~Dm }
 
47
                }
 
48
        }
 
49
}