Module containing the main algorithm for instant tuning in just intonation.
More...
Module containing the main algorithm for instant tuning in just intonation.
The algorithm for tuning is modularized and largely independent of the main application. It interacts with the outside world solely via Qt signals and slots.
Usage:
To use the tuner module in your application proceed as follows:
- Include the header file and create an instance of the tuner
- Connect your Midi source with the tuner This signal contains the three Midi bytes followed by a delta time marker, following the usual Midi specifications.
- Connect the tuner with the microtonal synthesizer This signal sends a QMap<int,double> to the sound-generating device, containing key numbers mapped to the corresponding tuning corrections in cents (relative to ET). This signal is sent frequently (triggered roughly every 20 ms).
- Initialize and start the tuner
myTuner.init();
myTuner.setEnvelopeParameters(10,2,1);
myTuner.start();
Options:
- You may interrupt the tuner by calling stop() and start().
- You may also call enalbeTuning(false) to hear in between equal temperament (zero pitch corrections) for comparison.
- You may set an overall target pitch by calling setFrequencyOfA4(), specifying the targeted pitch in cents relative to the recorded pitch of the sample. The algorithm will try to yield cent values around the
- You may allow the algorithm to deviate from the prescribed average pitch, setting the setPitchCorrectionParameter(lambda) to a value less than 1. In this case the resulting pitch drift will be sent periodically via the signalAveragePitchDrift().