DaisyExamples icon indicating copy to clipboard operation
DaisyExamples copied to clipboard

Petal freq shifter

Open beserge opened this issue 4 years ago • 6 comments

beserge avatar Aug 14 '20 15:08 beserge

Quicknotes (the first few things are pretty much just related to the pitchshifter module itself:

  • LFO values end up getting quantized to semitones (which actually seems like part of pitchshifter.h SetTransposition) --
  • disabling the quantization in pitchshifter causes clicks (sounds like its when the lfos flip to reverse or something else.
  • Might as well add a knob for the del-size which is basically a quality vs accuracy scalar that changes the timbre (snippet below)
  • Same note as before about Process and UpdateAnalogControls conflict
  • Same note as before about Parameter vs AnalogControl consistency, and mixing between the UpdateControls and Audio Callback (which with these examples so far have been short enough that they don't need to be abstracted away).
  • Squaring (exponential curve) for the amplitude of the pitchshifter LFO feels more expressive when pitchshifter is unquantized.
  • Make it stereo! (once the other stuff is polished of course).
  • Botttom most of pitch control actually goes through zero and back up to one octave (I think the scaling for pitch shifting down calculations is off by a factor of two)
  • Missing petal.UpdateLeds()
// In global/static space -- feel free to use Parameter class
static float delsize;
// Delay size setter - in callback within sample-loop (for smoothness)

fonepole(delsize, 256 + (petal.knob[5].Value() * (SHIFT_BUFFER_SIZE - 256)), 0.001f);
// AT 256 it will respond quickly, but will not represent very accurate pitches.
// at SHIFT_BUFFER_SIZE - will respond less quickly (semi-audible delay on signal), but will be able to more accurately represent the original pitch.

stephenhensley avatar Aug 17 '20 20:08 stephenhensley

There might be some more work involved, if you feel like poking around the pitchshifter to resolve some of this stuff, the paper I used to write it is linked in the header file.

stephenhensley avatar Aug 17 '20 21:08 stephenhensley

Notes

  • Switch 1 LED does not illuminate when effect is ON.

  • LFO steps are more noticeable at lower frequency rates, if its possible to smooth out the LFO it would be perfect.

Other than that and what Shensley has mentioned, this effect is solid.

corellmichael avatar Oct 02 '20 23:10 corellmichael

TODO: some crunch when adjusting delsize, get rid of quantization (DaisySP)

beserge avatar Nov 09 '20 17:11 beserge

Marking as draft due to inactivity.

stephenhensley avatar Dec 01 '21 16:12 stephenhensley