Beispiel #1
0
                    next.append(i)
                    rounded_preds[i] = 1

            p = np.array([np.append(p[0], np.array([rounded_preds]), axis=0)])
            p = np.delete(p, 0, 1)

            nexties.append([pno_pitcher(i) for i in next])

        print()
        # print(nexties)

tot_music = mari_287_to_310[start_index:start_index + maxlen] + nexties

notes = []
time = 0.0
for i in tot_music:
    if len(i) == 1:
        dur = 0.2
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 20])
        time += dur
    else:
        dur = 3.8
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 30])
        time += dur

midi_generator(notes, 'feldman_dream_1.mid', sustain='yes')

# midi_generator(notes,'feldman_dream_1.mid',sustain = 'no')
        print()
        # print(nexties)
start_music = []
for i in really_random:
    n = []
    for j, jtem in enumerate(i):
        if jtem == 1:
            n.append(pno_pitcher(j))
    start_music.append(n)

tot_music = start_music + nexties

notes = []
time = 0.0
for i in tot_music:
    if len(i) == 1:
        dur = 0.2
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 20])
        time += dur
    else:
        dur = 3.8
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 30])
        time += dur

midi_generator(notes, 'feldman_dream_1_random_seed_really.mid', sustain='yes')

# midi_generator(notes,'feldman_dream_1.mid',sustain = 'no')
Beispiel #3
0
            p = np.array(
                [np.append(p[0], np.array([chord_size_and_preds]), axis=0)])
            p = np.delete(p, 0, 1)

            nexties.append([pno_pitcher(i) for i in next])

        print()
        # print(nexties)

tot_music = mari_287_to_310[start_index:start_index + maxlen] + nexties

notes = []
time = 0.0
for i in tot_music:
    if len(i) == 1:
        dur = 0.2
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 20])
        time += dur
    else:
        dur = 3.8
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 30])
        time += dur

midi_generator(notes,
               'feldman_dream_1_chord_sizes_random_seed.mid',
               sustain='yes')

# midi_generator(notes,'feldman_dream_1.mid',sustain = 'no')
Beispiel #4
0
                        next.append(i)
                        rounded_preds[i] = 1

            p = np.array([np.append(x[0], np.array([rounded_preds]), axis=0)])
            p = np.delete(p, 0, 1)

            nexties.append([pno_pitcher(i) for i in next])

        print()
        # print(nexties)

tot_music = mari_287_to_310[start_index:start_index + maxlen] + nexties

notes = []
time = 0.0
for i in tot_music:
    if len(i) == 1:
        dur = 0.2
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 10])
        time += dur
    else:
        dur = 3.8
        for j in i:
            notes.append([pno_numberer(j) * 2, time, dur, 20])
        time += dur

midi_generator(notes, 'feldman_dream_1_constrained.mid', sustain='yes')

# midi_generator(notes,'feldman_dream_1.mid',sustain = 'no')