剧情提要:
[机器小伟]在[工程师阿伟]的陪同下进行着声学神通的修炼。
这次要研究的是[乐音的偏混]。
正剧开始:
星历2016年05月10日 16:55:51, 银河系厄尔斯星球中华帝国江南行省。
[工程师阿伟]正在和[机器小伟]一起研究[乐音的偏混]。
#乐音的偏混 #生成音乐文件内容 def waveDataGen(): import wavename; import wavedata; vowelName_en = wavename.vowelName_en; size_ve = len(vowelName_en); vowelName_zh = wavename.vowelName_zh; size_vz = len(vowelName_zh); consonantName_zh = wavename.consonantName_zh; size_cz = len(consonantName_zh); musicToneName = wavename.musicToneName; size_mt = len(musicToneName); #print(size_ve, size_vz, size_cz, size_mt); #16 29 70 77 #22k/s => 1.32M/min => 15.84M/12min data = []; for n in range(1, 13): swing = n; for i in range(size_cz): if i < swing or i > size_mt-swing-1: continue; voicePiece_1 = eval('wavedata.'+musicToneName[i-swing]); voicePiece_2 = eval('wavedata.'+musicToneName[i]); voicePiece_3 = eval('wavedata.'+musicToneName[i+swing]); for j in range(3): data += voicePiece_1; data += voicePiece_2; data += voicePiece_3; data += voicePiece_2; for j in range(30): data += idleWave; for i in range(100): data += idleWave; return data;
乐音的偏混(3*)
乐音的偏混
#生成音乐文件内容 def waveDataGen(): import wavename; import wavedata; vowelName_en = wavename.vowelName_en; size_ve = len(vowelName_en); vowelName_zh = wavename.vowelName_zh; size_vz = len(vowelName_zh); consonantName_zh = wavename.consonantName_zh; size_cz = len(consonantName_zh); musicToneName = wavename.musicToneName; size_mt = len(musicToneName); #print(size_ve, size_vz, size_cz, size_mt); #16 29 70 77 #22k/s => 1.32M/min => 15.84M/12min data = []; for n in range(12, 30): swing = n; for i in range(size_cz): if i < swing or i > size_cz-swing-1: continue; voicePiece_1 = eval('wavedata.'+consonantName_zh[i-swing]); voicePiece_2 = eval('wavedata.'+consonantName_zh[i]); voicePiece_3 = eval('wavedata.'+consonantName_zh[i+swing]); for j in range(1): data += voicePiece_1; data += voicePiece_2; data += voicePiece_3; data += voicePiece_2; data += voicePiece_1; data += voicePiece_2; for j in range(30): data += idleWave; for i in range(100): data += idleWave; return data;
本节到此结束,欲知后事如何,请看下回分解。
时间: 2024-11-29 09:12:43