polyphonic pitch and/or volume changing

Status
Not open for further replies.

colorado_hick

Well-known member
For my musical instrument I have an analog joystick where I want to put volume on one axis and pitch shift on the other. I think I have it figured out for midi CC messages but not for audio out.

I have seen in the examples where I can modify the frequency of a note but what about the frequency of the entire output wave post- mixer? The equivalent of a pitch bend wheel on a synth. Same thing with volume.

Are these functions only available on the waveform objects? If so is there a way i can go from a mixer object into a waveform object? and if I do that can I modify the frequency of that object by a percentage amount?

For the volume if I need to I can just put the joystick pot on the actual jack but that seems like cheating. I can also go back and modify the frequency of all of the waveforms before the mixer but that seems messy too.


I found this thread but I am not sure if there is anything that ended up in the library:
https://forum.pjrc.com/threads/26767-Teensy-3-0-3-1-Audio-Library-with-sound-pitch-control



Thanks!!
 
Pitch shifting after you generate waves is much, much harder than before.

'harder' for the Teensy... i.e. more computations.

But even if there is an audio pitch shift available (to my knowledge there is not), it will generally distort the signal somewhat or possibly produce artifacts.

If you are generating waves the place to shift is prior to their creation in the pitch or frequency parameters.
 
Just to reinforce what the others have said, if you have the opportunity to adjust pitch when the sound is generated, DO IT! Pitch-shifting audio samples after synthesis is one of the most challenging tasks in audio DSP, especially in real-time. There are direct trade-offs between latency and artefacts, and anything that sounds good is very compute intensive.
 
Status
Not open for further replies.
Back
Top