File: tuplet.mg

package info (click to toggle)
midge 0.2.41%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 556 kB
  • sloc: perl: 5,508; modula3: 1,204; lisp: 869; makefile: 36; sh: 20
file content (60 lines) | stat: -rw-r--r-- 1,185 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This example shows how to use the %tuplet keyword
#  first with a simple 3:2 tuplet, then with a nested
#  tuplet (3:2 inside of 5:3)

@head {
	$tempo 80
	$time_sig 4/4
	$resolution 120   # 3 and 5 are factors, so the tuplets divide evenly.
}

@body {

	# count out the time in 4/4
	# 1 bar repeated 7 times
	@channel 10 "click" {
		%repeat 7 {
			/l4r4/stick
		}
	}

	@channel 1 "piano" {
		/l4r4/e3 # straight bar

		# simple tuplet (1 bar played twice)
		%repeat 2 {


			e                        # 1 quarter note

			%tuplet 3:2 { f+ g f+ }  # 3 quarter notes in the space of 2

			d                        # quarter note on 4th beat of the bar

		}

		/l4r4/e # straight bar

		# nested tuplets (1 bar played twice)
		%repeat 2 {
			e                     # 1 quarter note

			%tuplet 5:3 {         # 5:3 tuplet (to end of bar (1+3=4)

				f+ g a            # 3 quarter notes (of 5) in 5:3

				%tuplet 3:2 {     # nested 3:2 tuplet (to end of 5:3
                                  #  tuplet (3+2=5))

					g f+ d        # 3 quarter notes (of 3) in 3:2

				}                 # end of 3:2 tuplet

			}                     # end of 5:3 tuplet

		}

		/l4r4/e # straight bar

	}
}