@bazrush: thx for you reply.
This is how I did it. Seems to work fine:
class AGSounds : public SamplerSound
{
public:
mySounds (const String& soundName,
AudioFormatReader& source,
const BigInteger& notes,
const int midiNoteForNormalPitch,
const double attackTimeSecs,
const double releaseTimeSecs,
const double maxSampleLengthSeconds) : SamplerSound (soundName, source, notes, midiNoteForNormalPitch, attackTimeSecs, releaseTimeSecs, maxSampleLengthSeconds)
{
}
bool appliesToChannel (const int midiChannel) override {
String soundName;
if ((soundName == "GPiano sound") && (midiChannel == 1))
return true;
if ((soundName == "Drums sound") && (midiChannel == 10))
return true;
if ((soundName == "Bass sound") && (midiChannel == 2))
return true;
return false;
}
};