Skip to content

Commit

Permalink
Added more swing options
Browse files Browse the repository at this point in the history
  • Loading branch information
davetremblay committed Mar 9, 2019
1 parent e7f904a commit b7ec428
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 47 deletions.
Binary file modified .DS_Store
Binary file not shown.
110 changes: 85 additions & 25 deletions Marathon.py
Expand Up @@ -19,13 +19,12 @@ def main():
preset_options = """
Choose preset
1: Swing (q q / q. e)
2: Half-Swing (h q q / h q. e)
3: West African Triplet (e e e / e s s)
4: Gnawa Triplet (e e e / e s e)
5: Brazilian 16ths (s s s s / e s s e)
6: Braff's Quintuplet (s s s s s / e s s e s)
7: Viennese Waltz (q q q / e. s-q q)
1: Swing (2(q) / q. e)
2: West African Triplet (3(q) / e 2(s))
3: Gnawa Triplet (3(e) / e s e)
4: Brazilian 16ths (4(s) / e 2(s) e)
5: Braff's Quintuplet (5(s) / e 2(s) e s)
6: Viennese Waltz (3(q) / e. s-q q)
99: Text Command
"""
print(preset_options)
Expand All @@ -41,10 +40,10 @@ def main():
0: 1:1 Straight Quarter Notes
29: ~4:3 Septuplet Feel
40: 3:2 Quintuplet Feel
50: 5:3 Eighth Feel
50: 5:3 Sixteenths Feel
66.7: 2:1 Triplet Feel
85.7: ~5:2 Septuplet Feel
100: 3:1 Hard Swing
100: 3:1 Eighths Feel
"""

morph_examples_2 = """
Expand Down Expand Up @@ -84,48 +83,109 @@ def main():
"""

if preset == "1":
print(morph_examples_1)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.swing(morph1, morph2, repeats)

elif preset == "2":
print(morph_examples_1)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.half_swing(morph1, morph2, repeats)
swing_options = """
Choose preset
Base-4 Swing (up to 3:1):
1: Half-Bar Swing (2(q) / q. e)
2: Full-Bar Swing (h 2(q) / h q. e)
Base-16 Swing (up to 15:1):
3: Half-Bar Swing (2(q) / q... t)
4: Full-Bar Swing (h 2(q) / h q... t)
"""
print(swing_options)
swing_preset = input("Enter number: ")
comm1 = ""
comm2 = ""
morph1 = ""
morph2 = ""
repeats = ""

swing_examples_1 = """
Examples
0: 1:1 Straight Quarter Notes
29: 4:3 Septuplet Feel
40: 3:2 Quintuplet Feel
50: 5:3 Sixteenths Feel
66.7: 2:1 Triplet Feel
85.7: 5:2 Septuplet Feel
100: 3:1 Eighths Feel
"""

swing_examples_2 = """
Examples
0: 1:1 Straight Quarter Notes
16.3: 4:3 Septuplet Feel
22.9: 3:2 Quintuplet Feel
28.6: 5:3 Sixteenths Feel
38.1: 2:1 Triplet Feel
49: 5:2 Septuplet Feel
57.1: 3:1 Eighths Feel
68.6: 4:1 Quintuplet Feel
76.2: 5:1 Sextuplet Feel
81.6: 6:1 Septuplet Feel
85.7: 7:1 Sixteenths Feel
88.9: 8:1 Nonuplet Feel
91.4: 9:1 Quintuplet Feel
93.5: 10:1 Undecuplet Feel
95.2: 11:1 Sextuplet Feel
96.7: 12:1 Tridecuplet Feel
98: 13:1 Septuplet Feel
99: 14:1 Quindecuplet Feel
100: 15:1 Thirty-Seconds Feel
"""
if swing_preset == "1" or swing_preset == "2":
print(swing_examples_1)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
if swing_preset == "1":
presets.swing(morph1, morph2, repeats)
elif swing_preset == "2":
presets.half_swing(morph1, morph2, repeats)

if swing_preset == "3" or swing_preset == "4":
print(swing_examples_2)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
if swing_preset == "3":
presets.hard_swing(morph1, morph2, repeats)
elif swing_preset == "4":
presets.half_hard_swing(morph1, morph2, repeats)

elif preset == "3":
elif preset == "2":
print(morph_examples_2)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.west_african_triplet(morph1, morph2, repeats)

elif preset == "4":
elif preset == "3":
print(morph_examples_3)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.gwana_triplet(morph1, morph2, repeats)

elif preset == "5":
elif preset == "4":
print(morph_examples_4)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.brazilian_sixteens(morph1, morph2, repeats)

elif preset == "6":
elif preset == "5":
print(morph_examples_5)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
repeats = input("How many repetitions do you want?: ")
presets.braffs_quintuplets(morph1, morph2, repeats)

elif preset == "7":
elif preset == "6":
print(morph_examples_6)
morph1 = input("Enter starting morph value (0-100): ")
morph2 = input("Enter ending morph value (0-100): ")
Expand Down
36 changes: 26 additions & 10 deletions README.md
Expand Up @@ -52,19 +52,35 @@ The program will ask you for a preset:
```console
Choose preset

1: Swing (q q / q. e)
2: Half-Swing (h q q / h q. e)
3: West African Triplet (e e e / e s s)
4: Gnawa Triplet (e e e / e s e)
5: Brazilian 16ths (s s s s / e s s e)
6: Braff's Quintuplet (s s s s s / e s s e s)
7: Viennese Waltz (q q q / e. s-q q)
1: Swing (2(q) / q. e)
2: West African Triplet (3(q) / e 2(s))
3: Gnawa Triplet (3(e) / e s e)
4: Brazilian 16ths (4(s) / e 2(s) e)
5: Braff's Quintuplet (5(s) / e 2(s) e s)
6: Viennese Waltz (3(q) / e. s-q q)
99: Text Command

Enter number:
3
1
```

If you choose Swing, there are more preset options. You can choose between a narrow (base-8) and broad (base-16) range of swing ratios.

```console
Choose preset

Base-4 Swing (up to 3:1):
1: Half-Bar Swing (2(q) / q. e)
2: Full-Bar Swing (h 2(q) / h q. e)

Base-16 Swing (up to 15:1):
3: Half-Bar Swing (2(q) / q... t)
4: Full-Bar Swing (h 2(q) / h q... t)

Enter number:
1
```console

Then for starting and ending morph values:

```console
Expand All @@ -77,7 +93,7 @@ Examples
50: 5:3 Eighth Feel
66.7: 2:1 Triplet Feel
85.7: ~5:2 Septuplet Feel
100: 3:1 Hard Swing
100: 3:1 Eighth Feel

Enter starting morph value (0-100):
40
Expand All @@ -91,7 +107,7 @@ Examples
50: 5:3 Eighth Feel
66.7: 2:1 Triplet Feel
85.7: ~5:2 Septuplet Feel
100: 3:1 Hard Swing
100: 3:1 Eighth Feel

Enter ending morph value (0-100):
60
Expand Down
Binary file modified __pycache__/presets.cpython-36.pyc
Binary file not shown.

0 comments on commit b7ec428

Please sign in to comment.