public double getValueAtSample(int iframe, int ilevel, int unit) {
        if (iframe < 0 || iframe >= pitchFrames.size()) {
            return NUMundefined;
        }
        double f = pitchFrames.get(iframe).getCandidate(0).frequency;
        if (f <= 0.0 || f >= this.ceiling) {
            return NUMundefined;   // frequency out of range (or NUMundefined)? Voiceless
        }
        return convertStandardToSpecialUnit(ilevel == Pitch_LEVEL_FREQUENCY ? f : pitchFrames.get(iframe).getCandidate(0).strength, ilevel, unit);
    }