Classes to effectively use FluidSynth microtonally in ChucK
Some time ago, I extended the FluidSynth chugin with hooks into libfluidsynth's tuning API. Once I started working with some more sophisticated soundfonts (such as those at https://sites.google.com/site/soundfonts4u/) I found a problem: it turns out that, the way libfluidsynth tuning works, the sample for the assigned-to note number is retuned to the pitch to which it is assigned, instead of using a sample which meant to be close to the desired pitch. So I wrote a set of ChucK classes so that I could just specify the note I want and let ChucK decide which MIDI note number to assign it to. If this is possibly of interest to you, check out my code at https://github.com/forrcaho/ChucK-code/tree/master/fluidsynth .
Hello Forrest, Are your FluidSynth chugin changes merged into the ccrma repository? That repo is a bit slow to integrate changes. Per your Github account it looks like we are both midwesterners — ping me off list if you want to meet up sometime to talk Chuck! michael
On Jan 27, 2020, at 11:23 PM, Forrest Cahoon
wrote: Some time ago, I extended the FluidSynth chugin with hooks into libfluidsynth's tuning API.
Once I started working with some more sophisticated soundfonts (such as those at https://sites.google.com/site/soundfonts4u/ https://sites.google.com/site/soundfonts4u/) I found a problem: it turns out that, the way libfluidsynth tuning works, the sample for the assigned-to note number is retuned to the pitch to which it is assigned, instead of using a sample which meant to be close to the desired pitch.
So I wrote a set of ChucK classes so that I could just specify the note I want and let ChucK decide which MIDI note number to assign it to. If this is possibly of interest to you, check out my code at https://github.com/forrcaho/ChucK-code/tree/master/fluidsynth https://github.com/forrcaho/ChucK-code/tree/master/fluidsynth . _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hello ChucKers, For the longest time I couldn't figure out how to get envelopes to work correctly as modulators ADSR env => blackhole; spork ~ updateAtSampleRate(); fun void updateAtSampleRate() { while (true) { 1::samp => now; env.last() => // do something } } It turns out they need a kick in the pants to work correctly, in other words Step step => ADSR env => blackhole; 1.0 => step.next; Is this intentional? Then is there any interest in implementing all the other envelope types (AD, AR, AHDSR, DADSR, DAHDSR)? I could probably do it in ChucK, but it might be better to implement them as chugins or upstream in STK. In any case, now that I know how to make ADSR envelopes work, I have some pretty awful synthesized drums, just in time for the RPM challenge. https://github.com/heuermh/lick/tree/master/lick/kick https://github.com/heuermh/lick/tree/master/lick/kick https://github.com/heuermh/lick/tree/master/lick/snare https://github.com/heuermh/lick/tree/master/lick/snare Cheers, michael
FYI, you should be able to avoid using the Step if you use env.value()
instead of env.last(). Last is the output sample, and value is the
amplitude of the envelope being applied to the input signal. It would
probably be useful to implement those other envelope types as chugins -- go
for it!
On Thu, Jan 30, 2020 at 8:22 AM Michael Heuer
Hello ChucKers,
For the longest time I couldn't figure out how to get envelopes to work correctly as modulators
ADSR env => blackhole;
spork ~ updateAtSampleRate();
fun void updateAtSampleRate() { while (true) { 1::samp => now; env.last() => // do something } }
It turns out they need a kick in the pants to work correctly, in other words
Step step => ADSR env => blackhole; 1.0 => step.next;
Is this intentional?
Then is there any interest in implementing all the other envelope types (AD, AR, AHDSR, DADSR, DAHDSR)? I could probably do it in ChucK, but it might be better to implement them as chugins or upstream in STK.
In any case, now that I know how to make ADSR envelopes work, I have some pretty awful synthesized drums, just in time for the RPM challenge.
https://github.com/heuermh/lick/tree/master/lick/kick https://github.com/heuermh/lick/tree/master/lick/snare
Cheers,
michael _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hello Jack, Ah, I see, I tried setting env.value but not reading from it, I was still reading env.last(). I would implement chugins or STK but alas, I do not C++ very much. ;) michael
On Jan 30, 2020, at 10:32 AM, Jack Atherton
wrote: FYI, you should be able to avoid using the Step if you use env.value() instead of env.last(). Last is the output sample, and value is the amplitude of the envelope being applied to the input signal. It would probably be useful to implement those other envelope types as chugins -- go for it!
On Thu, Jan 30, 2020 at 8:22 AM Michael Heuer
mailto:heuermh@gmail.com> wrote: Hello ChucKers, For the longest time I couldn't figure out how to get envelopes to work correctly as modulators
ADSR env => blackhole;
spork ~ updateAtSampleRate();
fun void updateAtSampleRate() { while (true) { 1::samp => now; env.last() => // do something } }
It turns out they need a kick in the pants to work correctly, in other words
Step step => ADSR env => blackhole; 1.0 => step.next;
Is this intentional?
Then is there any interest in implementing all the other envelope types (AD, AR, AHDSR, DADSR, DAHDSR)? I could probably do it in ChucK, but it might be better to implement them as chugins or upstream in STK.
In any case, now that I know how to make ADSR envelopes work, I have some pretty awful synthesized drums, just in time for the RPM challenge.
https://github.com/heuermh/lick/tree/master/lick/kick https://github.com/heuermh/lick/tree/master/lick/kick https://github.com/heuermh/lick/tree/master/lick/snare https://github.com/heuermh/lick/tree/master/lick/snare
Cheers,
michael _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu mailto:chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users https://lists.cs.princeton.edu/mailman/listinfo/chuck-users _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
Forrest Cahoon
-
Jack Atherton
-
Michael Heuer