mzk

- music theory helper
git clone git://git.acid.vegas/mzk.git
Log | Files | Refs | Archive | README | LICENSE

commit c5f05ae1bc58f5f9dae89d3e698fc955682ce5e6
parent cea16c62d2647e5ecb1440e16bc2701d6d8660d5
Author: acidvegas <acid.vegas@acid.vegas>
Date: Thu, 25 Jul 2019 02:11:07 -0400

updated

Diffstat:
Mmzk/functions.py | 26++++++++++++++++++--------

1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/mzk/functions.py b/mzk/functions.py
@@ -87,6 +87,16 @@ def print_circle_of_fifths():
 	print(circle)
 	print(print_circle_of_fifths.__doc__)
 
+def help():
+	print('usage: python mzk.py [OPTIONS]')
+	print('\noptions:')
+	print('--chord=KEY_TYPE │ print a TYPE chord in the key of KEY')
+	print('--circle         │ print the circle of fifths')
+	print('--intervals      │ print list of intervals')
+	print('--scale=KEY_TYPE │ print a TYPE scale in the key of KEY')
+	print('--scales         │ print list of scale types & patterns')
+	print('\nnote: KEY_TYPE must be formatted as such: c_major, f#_mixolydian, etc.')
+
 def print_intervals():
 	'''definition:
 		the distance between two notes or pitches
@@ -108,13 +118,13 @@ def print_intervals():
 		perfect     - 4ths, 5ths, octaves
 		diminished  - minor/perfect - 1 semitone
 		augmented   - major/perfect + 1 semitone'''
-	print('            I N T E R V A L S           ')
-	print('┌───────────┬──────────────────┬───────┐')
-	print('│ semitones │ quality          │ short │')
-	print('├───────────┼──────────────────┼───────┤')
+	print('I N T E R V A L S'.center(38))
+	print('┌───────────┬────────────────┬───────┐')
+	print('│ semitones │ quality        │ short │')
+	print('├───────────┼────────────────┼───────┤')
 	for interval, info in constants.intervals.items():
-		print('│ {0} │ {1} │ {2} │'.format(str(info['semitones']).rjust(9), interval.ljust(16), info['short_name'].ljust(5)))
-	print('└───────────┴──────────────────┴───────┘')
+		print('│ {0} │ {1} │ {2} │'.format(str(info['semitones']).rjust(9), interval.ljust(14), info['short_name'].ljust(5)))
+	print('└───────────┴────────────────┴───────┘')
 	print(print_intervals.__doc__)
 
 def print_scale(root, type, full=False):
@@ -147,4 +157,4 @@ def print_scales():
 	print('└───────────────────────┴─────────────────┘')
 	print(print_scales.__doc__)
 
-print_scales()
-\ No newline at end of file
+print_scale('C','major')
+\ No newline at end of file