SV Mazurka Plugin:
MzNevermore          

SYNOPSIS

    MzNevermore -- Independent control of window size and transform size for spectrogram display.
    MzNevermore displays spectrograms in a manner similar to the Raven audio editor from the Cornell Lab of Ornithology.

INPUT PARAMETERS

    MzNevermore accepts 10 input parameters:

    1. Window size
      The number of samples of auido data which will be used to calculate the spectrum.
    2. Transform size
      The size of the windowed audio plus silence padding to reduce vertical pixelization of the spectrum display.
    3. Step size
      The number of samples to shift in the audio for each spectrogram frame.
    4. Min spectral bin
      The minimum frequency bin to display in the spectrogram.
    5. Min spectral frequency (in Hz)
      The minimum frequency in Hz to display in the spectrogram. This value will be used instead of parameter 4 if it is set to a value other than 0.
    6. Maximum spectral bin
      The maximum frequency bin to display in the spectrogram.
    7. Maximum spectral frequency (in Hz)
      The maximum frequency in Hz to display in the spectrogram. This value will be used instead of parameter 6 if it is set to a value other than 0.
    8. Compress range
      Do dynamic range compression on the amplitude values (makes quiet regions more visible).
    9. Window type
      The analysis window applied to the audio data before the Fourier transform is calculated. Hann is the default value which will work in most cases.
    10. Frequency scale
      This is the scaling factor for the vertical axis in the spectrogram. The default is "Hertz" which is a linear scale in terms of frequency values which is the most common display format for spectrograms. The "interval" display is a logarithmic scaling which shows a constant width for intervals.

DESCRIPTION

    Below is an idealized spectrogram of a sound which was synthesized from 28 sinewaves, each represented by one of the lines in the following figure. This idealized spectrogram will be used to demonstrate the various parameters which can control the display of the spectrogram in the MzNevermore plugin.

     
     

    Frequency scale


    The frequency scale parameter controls format for the vertical axis of the spectrogram. By default the spectrogram is displayed with "Hertz" linearly on the vertical axis. The other option is "Interval" which displays equivalent intervals equally at any position on the vertical scale.

    Since the example ideal spectrogram was used to create the sound on the "Interval" frequency scale, the spectrogram on the right looks more like the ideal spectrogram in this case:

    "Hertz" scaling of frequencies

    "Interval" scaling of frequencies

    "Hertz" scaling is useful when you want to view harmonics as equally spaced lines. "Interval" scalign is useful when you want to view intervales as equally spaced lines.

    The difference can perhaps be seen more clearly with a harmonically pitched note as shown in the following figure:

    The harmonics are labeled from 1 being the fundamental, up to 6 being the 6th harmonic. If the fundamental is 100 Hz, for example, then the 6th harmonic is at 600 Hz. In the "Hertz" vertical scaling, the harmonics are evenly spaced at 100 Hz, 200 Hz, 300 Hz, 400 Hz, 500 Hz, and 600 Hz. In the "Interval" vertical scaling, all interval classes retain their size regardless of their vertical position. For example, two of octaves are marked in the figure above. In the "Interval" scaling, the size of the octaves are equal. In the "Hertz" scaling, the lower octave is 1/2 the size of the octave indicated above it.

    Step size


    The Step size parameter specifies how many samples to jump between analysis frames in the audio data. A smaller number will give a smoother look to the spectrogram because the spectrogram is updated more often over time. By default, the step size is set to 512 samples. At a 44.1 kHz sampling rate (as used with Compact Disc recordings), that is a time of 512 / 44100 = 11.6 milliseconds. Here is a picture of the center of the spectrogram using a 512 sample step size:

    Decreasing the step size from 512 to 256 will make the spectrogram display update twice as often:

    Likewise, increasing the step size to 1024 samples (23.2 ms), will increase the quantization on the horizontal time axis:

    If the step size is smaller than the window size, then the audio data between spectrogram frames will overlap.
     
     

    Compress range


    The Compress range option applies a compression function to the amplitudes (in decibels) in the spectrogram. If this option is selected, a good visual compromise between quiet and loud sounds occurs.

    The uncompressed range shown on the left contains significant amounts of green in the plot where there is no sound activity. It is displaying the noise floor of the audio file which is at around -96 dB since the file contains 16-bit amplitude values. Since the noise floor is not interesting to see, the compressed amplitude range on the right places the noise floor at the colour black.

    The compressed range is best when looking at music which contains a variety of dynamics throughout. However, if you compare the pictures, the compression setting used in this case saturates the peaks near the bottom of the spectrogram, causing a loss of visual frequency discrimination.

     
     

    Window size


    The Window size parameter controls the frequency resolution ability of the spectrogram. The larger the window size, the more accurately the frequencies can be resolved. However, the larger the window size, the more spectral smearing occurs which decreases the visual sharpness of the display. The following figure demonstrates the trade-off between frequency accuracy and resolution:

    For the window size equal to 512, the low frequencies are poorly resolved, since you cannot see the individual harmonic tracks towards the bottom of the spectrogram. As the size of the window increases, the frequency resolution increases, and the lower frequency tracks become clearer.

    However, as the window size increases, the harmonic tracks start to smear when they change pitch, and become very sharp when they are at a constant pitch.

    If you are analyzing vocal music, violin music or other similar instruments which use vibrato, you must be careful to use a smaller window size so that the frequencies in the vibrato do not smear. For piano and other fixed-pitch instruments, a larger window is more suitable since the smearing would not be as noticeable.

     
     

    Transform size


BUGS

    Crashes Sonic Visualiser occasionally for some unknown reason to be examined in the future.

DOWNLOAD

    Compiled versions of the MzNevermore plugin can be downloaded from the download page.

    The source code for the plugin was last modified on 20 Jul 2006.

SEE ALSO

ALLUSIONS

    The Raven
    by Edgar Allan Poe

    Once upon a midnight dreary, while I pondered, weak and weary,
    Over many a quaint and curious volume of forgotten lore--
    While I nodded, nearly napping, suddenly there came a tapping,
    As of some one gently rapping, rapping at my chamber door.
    "'Tis some visiter," I muttered, "tapping at my chamber door--
                     Only this and nothing more."

    Ah, distinctly I remember it was in the bleak December,
    And each separate dying ember wrought its ghost upon the floor.
    Eagerly I wished the morrow;--vainly I had sought to borrow
    From my books surcease of sorrow--sorrow for the lost Lenore--
    For the rare and radiant maiden whom the angels name Lenore--
                     Nameless here for evermore.

    And the silken sad uncertain rustling of each purple curtain
    Thrilled me--filled me with fantastic terrors never felt before;
    So that now, to still the beating of my heart, I stood repeating
    "'Tis some visiter entreating entrance at my chamber door--
    Some late visiter entreating entrance at my chamber door;
                     This it is and nothing more."

    Presently my soul grew stronger; hesitating then no longer,
    "Sir," said I, "or Madam, truly your forgiveness I implore;
    But the fact is I was napping, and so gently you came rapping,
    And so faintly you came tapping, tapping at my chamber door,
    That I scarce was sure I heard you"--here I opened wide the door--
                     Darkness there and nothing more.

    Deep into that darkness peering, long I stood there wondering, fearing,
    Doubting, dreaming dreams no mortals ever dared to dream before;
    But the silence was unbroken, and the stillness gave no token,
    And the only word there spoken was the whispered word, "Lenore?"
    This I whispered, and an echo murmured back the word, "Lenore!"--
                     Merely this and nothing more.

    Back into the chamber turning, all my soul within me burning,
    Soon again I heard a tapping something louder than before.
    "Surely," said I, "surely that is something at my window lattice;
    Let me see, then, what thereat is and this mystery explore--
    Let my heart be still a moment and this mystery explore;--
                     'Tis the wind and nothing more.

    Open here I flung the shutter, when, with many a flirt and flutter,
    In there stepped a stately Raven of the saintly days of yore.
    Not the least obeisance made he; not a minute stopped or stayed he,
    But, with mien of lord or lady, perched above my chamber door--
    Perched upon a bust of Pallas just above my chamber door--
                     Perched, and sat, and nothing more.

    Then the ebony bird beguiling my sad fancy into smiling,
    By the grave and stern decorum of the countenance it wore,
    "Though thy crest be shorn and shaven, thou," I said, "art sure no craven,
    Ghastly grim and ancient Raven wandering from the Nightly shore--
    Tell me what thy lordly name is on the Night's Plutonian shore!"
                     Quoth the Raven, "Nevermore."

    Much I marvelled this ungainly fowl to hear discourse so plainly,
    Though its answer little meaning--little relevancy bore;
    For we cannot help agreeing that no living human being
    Ever yet was blessed with seeing bird above his chamber door--
    Bird or beast upon the sculptured bust above his chamber door,
                     With such name as "Nevermore."

    But the Raven, sitting lonely on that placid bust, spoke only
    That one word, as if its soul in that one word he did outpour
    Nothing farther then he uttered; not a feather then he fluttered--
    Till I scarcely more than muttered: "Other friends have flown before--
    On the morrow he will leave me, as my Hopes have flown before."
                     Then the bird said "Nevermore."

    Startled at the stillness broken by reply so aptly spoken,
    "Doubtless," said I, "what it utters is its only stock and store,
    Caught from some unhappy master whom unmerciful Disaster
    Followed fast and followed faster till his songs one burden bore--
    Till the dirges of his Hope that melancholy burden bore
                     Of 'Never--nevermore.'"

    But the Raven still beguiling all my sad soul into smiling,
    Straight I wheeled a cushioned seat in front of bird and bust and door;
    Then, upon the velvet sinking, I betook myself to linking
    Fancy unto fancy, thinking what this ominous bird of yore--
    What this grim, ungainly, ghastly, gaunt, and ominous bird of yore
                     Meant in croaking "Nevermore."

    This I sat engaged in guessing, but no syllable expressing
    To the fowl whose fiery eyes now burned into my bosom's core;
    This and more I sat divining, with my head at ease reclining
    On the cushion's velvet lining that the lamp-light gloated o'er,
    But whose velvet violet lining with the lamp-light gloating o'er
                     She shall press, ah, nevermore!

    Then, methought, the air grew denser, perfumed from an unseen censer
    Swung by Seraphim whose foot-falls tinkled on the tufted floor.
    "Wretch," I cried, "thy God hath lent thee--by these angels he hath sent thee
    Respite--respite and nepenthe from thy memories of Lenore!
    Quaff, oh quaff this kind nepenthe and forget this lost Lenore!"
                     Quoth the Raven, "Nevermore."

    "Prophet!" said I, "thing of evil!--prophet still, if bird or devil!--
    Whether Tempter sent, or whether tempest tossed thee here ashore,
    Desolate, yet all undaunted, on this desert land enchanted--
    On this home by Horror haunted--tell me truly, I implore--
    Is there--is there balm in Gilead?--tell me--tell me, I implore!"
                     Quoth the Raven, "Nevermore."

    "Prophet!" said I, "thing of evil!--prophet still, if bird or devil!
    By that Heaven that bends above us--by that God we both adore--
    Tell this soul with sorrow laden if, within the distant Aidenn,
    It shall clasp a sainted maiden whom the angels name Lenore--
    Clasp a rare and radiant maiden whom the angels name Lenore."
                     Quoth the Raven, "Nevermore."

    "Be that our sign of parting, bird or fiend!" I shrieked, upstarting--
    "Get thee back into the tempest and the Night's Plutonian shore!
    Leave no black plume as a token of that lie thy soul has spoken!
    Leave my loneliness unbroken!--quit the bust above my door!
    Take thy beak from out my heart, and take thy form from off my door!"
                     Quoth the Raven, "Nevermore."

    And the Raven, never flitting, still is sitting, still is sitting
    On the pallid bust of Pallas just above my chamber door;
    And his eyes have all the seeming of a demon's that is dreaming
    And the lamp-light o'er him streaming throws his shadows on the floor;
    And my soul from out that shadow that lies floating on the floor
                     Shall be lifted--nevermore!