我正在尝试一种不寻常的数据分析方法;我想从我的数据中生成音频。
[伪]
data = fetch_data()
with open('soundfile.wav', 'w') as f:
for elem in data:
x, y, z = elem
pitch, tempo, volume = map_to_sound_function(x, y, z)
append_sound_to_file(f, pitch, tempo, volume)
我如何实施功能map_to_sound_function()
和append_sound_to_file()
?