Comments (1)
it may already be possible to do this by sending the right MIDI message. I pass every MIDI message to fluidsynth, and it implements them according to the Soundfont Specification.
Chapter 9.2:
MIDI CC120 All Sound Off - When received with any data value, all notes playing in the key-on state bypass the release phase and are shut off, regardless of the sustain or sostenuto positions.
Maybe you could send a MIDI CC120 after every "note off"?
otherwise, I think what you really want is to set releaseModEnv
or releaseVolEnv
to a negative value:
8.1.2 Generator Enumerators Defined
30releaseModEnv
This is the time, in absolute timecents, for a 100% change in the Modulation Envelope value during release phase. For the Modulation Envelope, the release phase linearly ramps toward zero from the current level. If the current level were full scale, the Modulation Envelope Release Time would be the time spent in release phase until zero value were reached. A value of 0 indicates a 1 second decay time for a release from full level. A negative value indicates a time less than one second; a positive value a time longer than one second. For example, a release time of 10 msec would be1200log2(.01) = -7973
.38
releaseVolEnv
This is the time, in absolute timecents, for a 100% change in the Volume Envelope value during release phase. For the Volume Envelope, the release phase linearly ramps toward zero from the current level, causing a constant dB change for each time unit. If the current level were full scale, the Volume Envelope Release Time would be the time spent in release phase until 100dB attenuation were reached. A value of 0 indicates a 1-second decay time for a release from full level. A negative value indicates a time less than one second; a positive value a time longer than one second. For example, a release time of 10 msec would be1200log2(.01) = -7973
.
See also 8.1.3 Generator Summary
modulators (i.e. mapping of MIDI CCs to generators) are defined like this:
https://github.com/Birch-san/juicysfplugin/blob/master/Source/FluidSynthModel.cpp#L116-L126
looks like I already map MIDI CC 72 Release time
to GEN_VOLENVRELEASE
(a.k.a releaseVolEnv
).
I think the problem for your use-case is that it's set to unipolar:
https://github.com/Birch-san/juicysfplugin/blob/master/Source/FluidSynthModel.cpp#L120
this means it maps 0 to 127 as "0 to 127 timecents" (1 second to lots of seconds)
if set to bipolar: it'd map 0 to 127 as "-127 to 127 timecents" (0 seconds to lots of seconds). or something like that.
so, less range to play with, but becomes capable of going down to 0 secs.
I can't remember what's the difference between the modulation envelope and the volume envelope. nor do I really remember how to use the modulator API and interpret the soundfont specification.
that's the general area in which the change would need to be made. not sure about:
- the scope of this (seems weird to only do it only for the release parameter)
- the backwards-compatibility story (changing how the range is mapped would cause a change in behaviour / make existing songs sound different)
- the configurability story (i.e. should this be configurable at all? what kind of configurability would make sense?).
from juicysfplugin.
Related Issues (20)
- Mac 12.0+ Only? HOT 2
- GitHub automated pipeline - build artifacts are corrupted HOT 5
- Mac build from source: No global header file was included HOT 2
- Soundfonts not mapping to full keyboard range HOT 1
- Thank You HOT 1
- ADSR Envelope Question HOT 1
- AU Plugin crashes inside Logic Pro X HOT 4
- Anyone willing to keep this plugin going? HOT 2
- Any updates coming in future or has development now stopped on this plugin?
- Have questions about the use of large models
- Feature request: FluidSynth interpolation settings HOT 29
- enable dynamic sample loading to load only samples from selected preset into RAM HOT 1
- Compiling on Windows fails when using Dockerfile HOT 7
- Could JuicySFPlugin be able to cut down the ADSR time as well? HOT 1
- Attempting to build on Linux HOT 4
- Could pitch bend range expand beyond 2 semitones? HOT 2
- Doesnt work at all in Logic or Mac in General HOT 2
- Last version compatible with Windows 7, if any?
- Plugin cannot open when target soundfont is not found where expected
- feature-request: (sidecar) backdrop loading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from juicysfplugin.