spessasus / SpessaSynth

MIDI SoundFont/DLS synthesizer library written in JavaScript.
https://spessasus.github.io/SpessaSynth/
Other
96 stars 12 forks source link

add support for sample offset modulator destination #51

Closed mrbumpy409 closed 1 month ago

mrbumpy409 commented 1 month ago

Version

github.io page, v3.20.35

Description

The modulator destination "sample offset" does not appear to be supported or working correctly, at least in the SoundFont I have tested.

Reproduction steps

  1. Load GeneralUser GS v2.0.0 as the SoundFont. Note that this test will not work with the older, bundled GeneralUser GS version.
  2. With live MIDI input controlling channel 1, load preset 000:039 Synth Bass 2 into channel 1. This preset uses a modulator at the instrument level (instrument "Synth Bass 2_1") to subtract from the sample offset at high velocities, revealing the brighter note attack at the start of the waveform.
  3. Play notes at both soft and loud velocities.

Expected behavior

The tone should become brighter / more aggressive at high velocities. Compare the sound to how it plays in FluidSynth or Polyphone (must be recent/latest version), or use this video as a reference point at timestamp 5:43.

Actual behavior

The sound never gets brighter at high velocities (apart from the second instrument layer that adds punch to the attack) as the modulator targeting sample offset is ignored.

MIDI files and SoundFonts

GeneralUser GS v2.0.0

spessasus commented 1 month ago

Thanks for another report. I've fixed it (hopefully). If you experience more problems, feel free to open another issue!

PS: GUGS 2.0 sounds fantastic!

mrbumpy409 commented 1 month ago

Thanks @spessasus! I will test out your improvements once I get back from my weekend trip. Have a great weekend!

spessasus commented 1 month ago

Thanks @spessasus! I will test out your improvements once I get back from my weekend trip. Have a great weekend!

Thanks, you too : )

mrbumpy409 commented 1 month ago

This seems to be working correctly now. Thank you!