mx = 8000 x = 0 alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] interval = int(mx/(len(alphabet))) with open("genudio.sh", "w") as f: for i in range(0, len(alphabet)): letter = alphabet[x] freq = (i+1) * interval f.write(f'ffmpeg -f lavfi -i "sine=frequency={freq}:duration=5" {letter}.ogg\n') x = x + 1