projectlosangeles commited on
Commit
acdf893
·
verified ·
1 Parent(s): 6eea992

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -36,13 +36,22 @@ def Generate_POP(song_length,
36
 
37
  #==================================================================
38
 
 
 
 
 
 
 
39
  print('=' * 70)
40
  print('MuseCraft AlgoPOP Generator')
41
  print('=' * 70)
42
 
43
  print('Generating...')
44
 
45
- pop_piece = algorithms.write_pop(scale('C', 'Major'))
 
 
 
46
 
47
  midi_data = write(pop_piece, save_as_file=False)
48
 
 
36
 
37
  #==================================================================
38
 
39
+ SEMITONES = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"]
40
+
41
+ SCALES = ['Minor', 'Major']
42
+
43
+ #==================================================================
44
+
45
  print('=' * 70)
46
  print('MuseCraft AlgoPOP Generator')
47
  print('=' * 70)
48
 
49
  print('Generating...')
50
 
51
+ pop_piece = algorithms.write_pop(scale(SEMITONES[song_semitone_key],
52
+ SCALES[song_scale]),
53
+ length=[song_length-1, song_length]
54
+ )
55
 
56
  midi_data = write(pop_piece, save_as_file=False)
57