Pitch and perception

I'm re-writing the way WTPA2 handles SD card stuff again --
WTPA2 now has THREE voices instead of two! Bank0, Bank1, and the SD streaming playback.

Question I have is:
Do any of you know how accurate your perceptions of pitch are? Streaming playback is a lot faster in code with an error of about 5.18 cents (0.3%).
With some screwing around I can get that down to 1.73 cents (0.1%).

I did some listening tests and I can't tell the difference. Can you guys?
TB

Comments

  • 5cents is probably in perceivable-ville, but it mainly depends on the interval/context.

    Much harder if it's isolated single tones, but definitely more obvious if it's in a harmonic context (or worse, unison).

    Are you talking +/- or just +?
  • Just one way or the other. It has to do with counter resolution, so it would always be 5 cents sharp (or flat, can't remember).
    Basically, the SD streaming playback has a fixed pitch (22050, so you can use standard wav-style samples) and I was wondering if you would notice a difference from your source, assuming your source was exactly 22050.

    All the samples streamed would have the same offset, so they would be in tune with each other. You'd never be playing the normal and sharp in unison (WTPA can't do that), and it's pretty unlikely you'd have the two samples in the same program -- unless you were using some string samples from your computer and had loaded the same string samples onto your WTPA, and we're playing both sources at the same time. Then one of them would be 5 cents out of tune.

    I am beginning to suspect this is a nitpick. But, please enlighten me if it isn't.

    TB
  • I can't see how it would be problematic at all really.
  • I think the fact that it is slightly out of tune is a good thing. Most moogs and stuff sit slightly sharp or flat, that is what gives them character. The A we know wasn't standardized until the 1920s! I have a harpsichord, and it resonates most and sounds best about 20-30 cents flat of 440. Pitch is what gives instruments their character, and differentiates them from being static to dynamic. I created test tones in audacity, one at 440, and one at 445.18, and their was a slight difference, the two merged together made for a nice thick sound, so it should sound quite nice with other instruments, or if you are that picky, tune everything else up!
  • edited September 2011
    the wiki for electronic tuners says this about cheap tuners:

    "Small movements of the needle, or LED, usually represent a tuning error of 1 cent of a semitone. The typical accuracy of these types of tuners is around +/- 3 cents for quality needle tuners and +/- 9 cents of a semitone for the most inexpensive LED tuners." So I figure if you can get below 3 cents it should get past all consumers, but not those with perfect pitch or trained pro ears, which ain't me.
  • edited September 2011
    I've chosen/been lucky enough to spend
    thousands of hours "tuning" all sorts
    of pairs of samples/loops for timing
    and/or tuning. I agree that 5 cents
    is unnoticeable in most cases.
    Wouldn't worry about a handful of cents.
  • edited September 2011
    Shruthi-1 v0.90 and v0.91 used a 16-bits phase accumulator which gave a +/- 10 cent pitch error on the lowest octave. Only one person complained.
    Shruthi-1 v0.92 and v0.93 had a mistake in the pitch table which made it tuned for A=442 Hz instead of A=440 Hz (timers in phase correct PWM mode count up to prescaler - 2 instead of prescaler), amounting to an 8 cents error. Two persons complained.

    And this is for an instrument which is supposed to produce pitched tones...

    Here's the result of several generations of master tape botch ups and audio engineers stretching tracks to get them to fit on compilation CDs: the Beatles are totally out of tune http://img233.imageshack.us/img233/4061/screenshot20110926at112.png
    (courtesy of Hélène Papadopoulos).

    Has anybody ever heard sample-based music which was not out of tune :)?

    Wonder where your limitation comes from, though. If it is because 22050 is not an exact divider of your master clock, you can still get away with it by using a fractional counter and use linear interpolation.
  • everybodys made good points here and i also think this shouldnt be a problem. sure if you ask an audiophile he/she would immedietaly spot differences and theyd be beyond acceptable variational tolerance(s) but these peeps won't be showing up at bent fest, 8bit or noisecore gigs, buying your unit, understand the need and use for WTPA, nor commend/aid you in your achievements/goals (you evil heathen devil/manufacturer of purity defilers)... keep on todd, we all trust your ears.
  • Thanks guys. 5.18 cents it is. And yeah, I suppose a little error here and there is (in part) what WTPA has always been about.

    @pichenettes --
    Thanks for the case studies! That's reassuring. I never did bother to check what the error in cents was between the scaled notes used in MIDI mode on WTPA, but nobody has complained about that, and I never noticed.

    W/r/t the limitation, yep, it has to do with clock/timer division. I realized I could get the pitch error down by making the timer fractional, but didn't really want to add the overhead unless it was necessary.
    IE, at 20MHz/8, 22050 is closest to 113 cycles, with the above error. If I alternate between 113 and 114 cycles, the error is reduced significantly. With more divisions I could do better, but it's simplest to just set the timer's output compare and let it rip.
  • Alternating between 113 / 114 is going to create some periodic clock jitter, and it will sound like the nastiest form of aliasing. Yesterday I did something stupid with my code which resulted in every 40th sample (at 39kHz) being offset by 5us. I was surprised by how horrible such a small error sounded.
  • edited September 2011
    I have heard that horses have perfect pitch but humans, generally, do not. Which is why I have never seen a horse at a noise festival.

    More constructively, I wonder what would be the better audio file to use while checking for these errors. Metal is too raw and much of what is out there is compressed and limited into a frickin brick. I'm thinking some Beethoven orchestral bits, kettle drums to lush strings might be a good test file. Or, solo flute, due to the lack of harmonics and the sine wave aspect means pitch, alaising and sideband issues would leap right out at you?
  • Here's the musical math on pitch/freq etc.
    I have an app that does it
    http://www.birdsoft.demon.co.uk/music/samplert.htm
  • You WANT arduino aliasing?
    Try this if you have a pocket piano?
    Tons of aliasing it says.

    http://nostromo.noisepages.com/arduino-piano-squealer-synth/
Sign In or Register to comment.