Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a polyphonic sampler that works like the VST chugin (#47) I developed earlier. So you can do
sampler.setParameter(0, 60./127.); // set to center C
because the 0th parameter happens to be the center frequency of the sampler.Then if you do
sampler.noteOn(60, 1.);
then you'll get the original sound. If you didsampler.noteOn(67, 1.);
it would be pitched up and sped up. The interpolation is good too.Most importantly you can load samples!
sampler.read("C:/path/to/drum.wav");
// absolute pathYou can enable/disable the amplitude envelope and filter envelope. You can also control the ADSR of both of these envelopes. The filter has a parameter for its base cutoff frequency and another parameter for how the filter envelope modulates it. All of these parameters are subject to change as Sampler grows, so chuck users should be careful about updates in which the parameter order might change...
There's also the issue of the
vst_patch.patch
that I put in the root directory (same as mentioned in the VST PR). I think chuck itself needs to change so that strings can be returned by chugins.