''' durations=[ [36,60,36,60,48,48,48, 36,60,36,60,48,48,48] ] poem=poems[67] divider= poem[0]*2 assert(divider==14) seq=[] for i in range(int(len(poem[1])/divider)): line=() for j in range(poem[0]): line+=CRap(poem[1][i*divider+j][0],poem[1][i*divider+j][1], durations[0][j]) seq+=[line, BL(48)] line=() for j in range(poem[0],divider): line+=CRap(poem[1][i*divider+j][0],poem[1][i*divider+j][1], durations[0][j]) seq+=[line,BL(48)] ''' buf = ScoreDraft.TrackBuffer() GePing = ScoreDraft.GePing_UTAU() GePing.sing(buf, seq, 120) ScoreDraft.QPlayTrackBuffer(buf) #ScoreDraft.WriteTrackBufferToWav(buf, "rap.wav")
for i in range(8): for j in range(j0, len(durations)): line += (lyric_map[next(pi_calc)], (freq, durations[j])) singingSeq += [line] if i < 7: j0 = 0 freq = chooseFreq(chords[i + 1], freq) line = () singer.sing(track_sing, singingSeq, 120) guitar.play(track_guitar, guitar_notes, 120) ScoreDraft.Percussion.play(perc_list, track_drum, beats, 120) ScoreDraft.MixTrackBufferList(track_mix, [track_sing, track_guitar, track_drum]) ScoreDraft.QPlayTrackBuffer(track_mix) # Mix 2~n while 1: while (ScoreDraft.QPlayGetRemainingTime() > 5.0): time.sleep(2.0) if (ScoreDraft.QPlayGetRemainingTime() < 0.0): break track_mix = ScoreDraft.TrackBuffer() track_sing = ScoreDraft.TrackBuffer() singingSeq = [] for i in range(8): freq = chooseFreq(chords[i], freq) line = () for j in range(len(durations)): line += (lyric_map[next(pi_calc)], (freq, durations[j]))