admin管理员组文章数量:1394135
I am creating a Digital Audio Workspace in nextjs. I have audio samples for every third note of each instrument, and luckily Tone.js automatically handles this:
"Multiple samples can also be combined into an instrument. If you have audio files anized by note, Tone.Sampler will pitch shift the samples to fill in gaps between notes. So for example, if you only have every 3rd note on a piano sampled, you could turn that into a full piano sample."
The problem is, I also have different articulations and dynamics for each note. Just for violin theres multiple articulations, and then each articulation has a different dynamic. If I want to take advantage of the automatic pitch shifting the keys have to be exact note names like C3 or A4, but these can only map to one sound file and I have multiple.
I also considered using Tone.PitchShift to do the shifting manually but it seems that is only for pitching an entire audio channel and I need many different notes pitched differently simultaneously. My choices from what I know at this point seem to be 10s of samplers, 10s of pitch shift channels, or to speed up/ slow down the audio which I also dont want to do. Is there a performant solution to this problem?
Example:
// if a#3 is played, the g3 sample should play pitched up by 3 semitones
0: {lowkey: 'g3', highkey: 'a#3', key: 'g3', file: 'instrumentSounds/Samples/1st Violins/1st-violins-col-g3-p.mp3', dynamic: 'p'}
// here is the same but at a different dynamic level. If i want to use automatic pitch shifting there can only be one g3. Also this is only for one articulation (col legno) and there are many combinations
1: {lowkey: 'g3', highkey: 'a#3', key: 'g3', file: 'instrumentSounds/Samples/1st Violins/1st-violins-col-g3-pp.mp3', dynamic: 'pp'}
版权声明:本文标题:javascript - How can I handle Tone.js pitch shifting with multiple articulations and dynamics? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744582964a2614034.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论