Constant / note data
notefq() returns the current note frequency normalized to the Nyquist limit of the current sample rate. In other words, it gives the played note frequency as a 0..1 value, where 1.0 means sampleRate/2.
At 44.1 kHz sample rate, 1.0 corresponds to 22050 Hz. At 48 kHz, 1.0 corresponds to 24000 Hz. This makes notefq() useful when you want formulas to react to pitch in a sample-rate-aware normalized way.
No arguments.
For A4 (440 Hz), notefq() is about 440 / 22050 = 0.01995 at 44.1 kHz. Higher notes produce larger values, lower notes produce smaller ones.
Unlike tone(), which is a tuning ratio relative to A4, notefq() is a real normalized frequency value tied to the current sample rate.
sin(X)*(0.2 + 8*notefq()) lp(saw(X), 0.01 + 2.5*notefq(), 0.2)
notefq() can be very useful when you want filters or other controls to follow note pitch in a normalized way. For example:
mg(saw(X), 4*notefq(), 0.1)
Here the filter cutoff rises automatically with the played note, so higher notes open the filter more and lower notes keep it lower.
It is also useful for shaping loudness or timbre across the keyboard range. For example:
sin(X)*(1-4*sqrt(notefq()))
This kind of curve makes high notes quieter and low notes louder, which can help keep the keyboard balance more natural or more musical in some patches.
notefq() is best for modulation, scaling, and sample-rate-aware formula logic. For normal pitched oscillators, still prefer sin(X), saw(X), tri(X), and similar forms, because X already contains the current note pitch.