Polyphony requires multiple objects

Any given MSP patch cord represents a single channel of audio. If you want to generate or process multiple sounds or channels, you need to treat each sound or channel separately. For example, each sfplay~ object can have multiple loaded sound cues so that it's ready to play any one of several files, but it can only play one sound file at any given instant. And if it's a stereo file you need to treat each channel separately for mixing, processing, etc. This patch demonstrates that.

Using key presses and releases

Using both the key and keyup objects, you can tell when a key was pressed and when it was released. The split object allows you to isolate a range of numbers; it passes only the specified range of numbers out its left outlet, and passes all other numbers out its right outlet. The numbered keys 0 to 9 correspond to ASCII codes 48 to 57, so it's easy to isolate those keys, and subtracting 48 brings those numbers down into the range 0 to 9.