asigalov61
commited on
Commit
•
ff06030
1
Parent(s):
0db4793
Update app.py
Browse files
app.py
CHANGED
@@ -43,11 +43,11 @@ def mix_chord(chord, tones_chord, mel_patch, mel_pitch):
|
|
43 |
tclen = len(tones_chord)
|
44 |
|
45 |
if len(cg) > tclen:
|
46 |
-
|
47 |
|
48 |
for i, cc in enumerate(cg):
|
49 |
c = copy.deepcopy(cc)
|
50 |
-
c[4] = ((c[4] // 12) * 12) +
|
51 |
c[5] += c[4] % 12
|
52 |
cho.append(c)
|
53 |
|
|
|
43 |
tclen = len(tones_chord)
|
44 |
|
45 |
if len(cg) > tclen:
|
46 |
+
tchord = tones_chord + [random.choice(tones_chord) for _ in range(len(cg)-tclen)]
|
47 |
|
48 |
for i, cc in enumerate(cg):
|
49 |
c = copy.deepcopy(cc)
|
50 |
+
c[4] = ((c[4] // 12) * 12) + tchord[i]
|
51 |
c[5] += c[4] % 12
|
52 |
cho.append(c)
|
53 |
|