Skip to content

engine-v0.4.1

Choose a tag to compare

@anthony-liddle anthony-liddle released this 09 Oct 19:59
· 21 commits to main since this release
77e9145

Added

  • VoiceSynthesizer.playNote returns the audio-clock time the voice falls
    silent:
    its sources' stop, and after that its filter's ring. It returned
    nothing.

Fixed

  • A filtered cue's ring plays out whole, the same on every render. A cue
    voice was disconnected as soon as its oscillator's end was reported, while
    a resonant filter was still ringing, so Chromium and WebKit cut the ring at
    a different point on every offline render (#128). A voice played with
    playNote now stays connected until its filter has rung out, and the audio
    clock decides when that is: once the ring is under 2^-24 of its level when
    the note stopped, worked out from the filter's settings. The longest, a
    bandpass or notch at 20 Hz with a Q of 20, rings 5.35 s. Its onEnded
    reports the end then. A replaced cue's effects count that ring before their
    echoes, and destroy() disconnects the cue voices still sounding.
  • Replacing the cue document keeps a ringing cue's echoes. loadCues
    disconnected a replaced cue's effects as soon as its last note's end was
    reported, so the echoes after it were cut (#123). Offline, Chromium and
    WebKit cut them every time, and Firefox and the engine's Node tests
    whenever the end was reported before the render finished, which made a
    Node test fail at random. A replaced instrument's effects now stay
    connected until its echoes have rung out, and the audio clock decides when
    that is: once every echo still to come is under 2^-24 of one already heard.
    For the longest echo a cue can have, feedback 0.9 at a 1 s delay, that is
    158 passes round the delay, 158.4 s after the last note stops at 48 kHz.
    They are disconnected then, or at once if nothing they played still rings,
    and when the engine is destroyed.
  • No warning from node-web-audio-api for an effects chain without
    distortion.
    Every chain with distortion at 0 set its waveshaper's curve to
    null, which it already was, and node-web-audio-api warned at each:
    "Setting the 'curve' property on 'WaveShaperNode' to 'null' is not
    supported yet". It no longer sets a null curve over one already null.
    Nothing sounds different.
  • midiToNoteName names a fractional pitch. It returned "undefined5"
    for a pitch such as 78.99998074500876, which a cue document allows. It now
    gives the nearest note and the distance from it in cents, to two places:
    "B7 -13.69¢" for 106.8631178836571, and "G5 0.00¢" for a pitch
    that rounds to the note itself. The octave comes from the nearest note, so
    59.99 is "C4 -1.00¢". A whole number is named exactly as before.