SamplerSound note range

I'm a bit confused by the note range in the SamplerSound class. For example I needed one sample on only one key and the only way I could make it work is that:

    oneNote.setRange (0, 127, false);
    oneNote.setRange (37, 127, false);

I'm sure there's something I'm missing here...what's the best way of assigning one sample to one key only?

Me again :)

setBit() is your friend.

Thanks again! :)

That worked...and now I understand why I had problems with the range. I thought the second number in setRange was the end point, I just realised it's the number of "steps" in the range.


Yes, I stepped over this also a few times.