Skip to content

very long notes are truncated #246

Open

Description

@algorithmixx

If a midi note shall last longer than the duration of the soundfont sample the sound will stop when the end of the sample is reached.
Adding "source.loop=true;" after the audio buffer has been created in "player.js" is a cheap work around.

Alas, if the sample contains an attack, the loop restart will be noticeable.

Is there a way to split buffers generally into attack / steady sound / decay ?

Activity

  1. hmoffatt commented on Feb 3, 2019

    @hmoffatt

    The sound fonts don't have any information about attack / steady / decay, if you had that information you could certainly use it and get both infinite sustain AND smaller sound fonts, which would be great.

    sf2 sound font has the attack / steady / decay information, but the sound font builder script included with MIDI.js doesn't actually understand sf2 files. It just renders an sf2 sound font to the js format by using the Fluidsynth synthesiser to play each note for 3 seconds.

  2. congfeng22 commented on Aug 14, 2020

    @congfeng22

    If a midi note shall last longer than the duration of the soundfont sample the sound will stop when the end of the sample is reached.
    Adding "source.loop=true;" after the audio buffer has been created in "player.js" is a cheap work around.

    Alas, if the sample contains an attack, the loop restart will be noticeable.

    Is there a way to split buffers generally into attack / steady sound / decay ?

    Hi, could you elaborate on where to insert source.loop=true; in player.js? I'm having the same problem and need a quick fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions