Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

very long notes are truncated #246

Open
algorithmixx opened this issue Feb 3, 2019 · 2 comments
Open

very long notes are truncated #246

algorithmixx opened this issue Feb 3, 2019 · 2 comments

Comments

@algorithmixx
Copy link

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 ?

@hmoffatt
Copy link

hmoffatt commented Feb 3, 2019

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.

@congfeng22
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants