<< Chapter < Page | Chapter >> Page > |
The sampling frequency is 10.00 kHz, and the length of the delay line is 10 samples. What is the pitch of the output signal? If the delay line length is decreased by one sample,what is the new pitch?
1000 Hz (10 kHz divided by 10 samples); 1111 Hz
For each of the two exercises, the first pitch is exactly the same, i.e., 1000 Hz. However, the change in pitch caused by decreasing the delay line by only one sample is substantial (1026 Hz comparedto 1111 Hz). But how perceptible is this difference? The module Musical Intervals and the Equal-Tempered Scale includes a LabVIEW interactive front panel that displays the frequency of each key on a standard 88-key piano.Pitch C6 is 1046 Hz while pitch C♯6 (a half-step higher) is 1109 Hz. These values are similar to the change from 1000 Hz to 1111 Hz caused by altering the delay line length by only one sample,so the change is certainly very audible. The abrupt "jump" in frequency becomes less pronounced at lower pitches where the delay line length is longer.
Flexibility to adjust the overall loop time in a continuous fashion is required to improve pitch accuracy. Moreover, any sources of delay in the loop must be accurately known.So far the delay of the low pass filter has been taken as zero, but in fact the low pass filter introduces a delay of its own.
The screencast video describes first how to calculate the delay of an arbitrary digital filter with transfer function $H(z)$ .
In general, therefore, the delay is the negated slope of the filter's phase function, and the delay varies with frequency.
Now, consider the specific low pass filter used in the basic Karplus-Strong algorithm. The filter coefficient "g" will be taken as 0.5, making the filter a true two-point averager:
The screencast video continues the discussion by deriving the delay of the low pass filter of . Several techniques for working with complexnumbers in LabVIEW are presented and used to visualize the magnitude and phase response of the filter.
Because the delay of the low pass filter is always 1/2, the pitch may be expressed more precisely as
While this result more accurately calculates the pitch, it does nothing to address the frequency resolution problem.
Now, consider the all-pass filter ( APF ) as a means to introduce a variable and fractional delay into the loop. The all-pass filter has a unit magnitude response over allfrequencies, so it does not "color" the signal passing through. However, the all-pass filter has a phase response that is approximately linear for all but the highest frequencies, so it introducesan approximately constant delay. Even better, the slope of the phase response is continuously variable, making it possible to adjust the delay as needed between 0 and 1 samples.
The all-pass filter transfer function is
where $\left|C\right|<1$ to ensure stability.
Notification Switch
Would you like to follow the 'Musical signal processing with labview -- subtractive synthesis' conversation and receive update notifications?