Hello,
I started a drum sample reader VST plugin project for OSX based on Juce but I am struggling to find many informations (more examples in fact).
My goal for the moment would be to have let's say 8 samples, each assigned to one keyboard note and each with its own volume/balance knob (and filters and separate outputs later).
I managed to read samples using the synthesizer/samplervoice objects and to read several samples in parallel, assigning one sample to one midi note (one samplervoice instance per .wav file).
Now, I want to add a volume/gain, balance, filter knobs etc to each samplervoice.
(I know how to handle basic GUI elements, like sliders and pass values to the processor, thank to the Juce tuto.)
#Q1: is using samplervoice the right way to do that? (to make a sample based VST instrument I mean?)
#Q2, Gain: For the gain, i tried to reuse the code in the Juce Demo Plugin (https://github.com/julianstorer/JUCE/blob/master/examples/audio%20plugin%20demo/Source/PluginProcessor.cpp) but this did not have any effect on the volume when the sample is played. (I also compiled the audio plugin demo and the gain knob has also no effect either, as far as I can say...)
// Go through the incoming data, and apply our gain to it... for (channel = 0; channel < getNumInputChannels(); ++channel) buffer.applyGain (channel, 0, buffer.getNumSamples(), gain->getValue());
>Could can anyone confirm if the gain button works or not in the audioPluginDemo?
>if it works , why would it work for a synthesizervoice but not using samplervoice ?
>is there another way to change the volume?
>is there a way to change the velocity sensibility of a samplervoice ?
#Q3, Balance/pan:
I understand from other readings I would have to get each channel independently from the buffer (channel 0 for L and 1 for R ) and set the gain to each channel (with a different value) to change the balance.
>Could Can anyone confirm this or point me to an example about how to handle balance/pan?
#Q4 multiple outputs / routing:
I have read this tutoria (among others): http://artandlogic.com/2013/02/developing-audio-applications-with-juce-part-1/
I understand I will have to deal with AudioProcessorGraph and multiple audioprocessors if I want to handle multiple outputs (like assigning sample track 2 to output 6 for example).
>Could anyone point me to a simple example of how to use AudioProcessorGraph? (the Scumbler source did not helped me much :-( )
> or could anyone know where I can look at regarding routing?
Many thanks =)