pachet commited on
Commit
eb20f69
·
1 Parent(s): 5535d60

Add app.py and fixed hexachord

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. hexachords.py +0 -2
app.py CHANGED
@@ -39,7 +39,7 @@ def create_midi(chords):
39
  for i_chord, chord in enumerate(chords):
40
  for i, note in enumerate(chord):
41
  if i == 0 and i_chord != 0:
42
- track.append(Message('note_off', note=note.pitch.midi, velocity=0, time=1))
43
  else:
44
  track.append(Message('note_on', note=note.pitch.midi, velocity=64, time=0))
45
  for i, note in enumerate(chord):
 
39
  for i_chord, chord in enumerate(chords):
40
  for i, note in enumerate(chord):
41
  if i == 0 and i_chord != 0:
42
+ track.append(Message('note_on', note=note.pitch.midi, velocity=64, time=1))
43
  else:
44
  track.append(Message('note_on', note=note.pitch.midi, velocity=64, time=0))
45
  for i, note in enumerate(chord):
hexachords.py CHANGED
@@ -9,8 +9,6 @@ class Hexachord:
9
  def generate_chord_sequence(self, list_of_notes, intrvl="P5"):
10
 
11
  hexachord = list_of_notes
12
- s = stream.Stream()
13
- s.append(hexachord)
14
  fifth = interval.Interval(intrvl) # Perfect fifth
15
  all_pc = [n.pitch.pitchClass for n in hexachord]
16
  all_chords = []
 
9
  def generate_chord_sequence(self, list_of_notes, intrvl="P5"):
10
 
11
  hexachord = list_of_notes
 
 
12
  fifth = interval.Interval(intrvl) # Perfect fifth
13
  all_pc = [n.pitch.pitchClass for n in hexachord]
14
  all_chords = []