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

add polyphonic sampler #50

Closed
wants to merge 3 commits into from
Closed

add polyphonic sampler #50

wants to merge 3 commits into from

Conversation

DBraun
Copy link
Member

@DBraun DBraun commented May 5, 2021

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 did sampler.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 path

You 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.

David Braun added 3 commits May 4, 2021 22:17
…r needs to be between 0 and 1. For example, to set the attack of an ADSR envelope to 200 milliseconds, the float value would be 200. See sampler_test.ck for more info.
@DBraun
Copy link
Member Author

DBraun commented Jun 6, 2022

Once the Faust chugin supports polyphony this chugin won’t be worth merging.

@DBraun
Copy link
Member Author

DBraun commented Jun 7, 2022

Closing because I think the polyphonic Faust PR makes this unnecessary.

@DBraun DBraun closed this Jun 7, 2022
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

Successfully merging this pull request may close these issues.

1 participant