The limitation of simultaneous pressing of keys on a computer keyboard and multitouch on a multitouch screen

Dear users and developers,

Regarding the following code, I have two questions:
https://sccode.org/1-5gp

  1. On my laptop, I can play up to six voices. Is this limitation by SuperCollider, Qt, macOS, Bios or the machine?

  2. Could one play with this code polyphony many voices using multitouch on laptops with a built-in multitouch screen? Is it impossible because the operating system only provides one mouse pointer? I think the code should be revised using HID class when using an external multitouch screen which detects multitouch via a USB port. However, I am not sure about laptops with a built-in touchscreen. Could it differ according to the specification of products?

best,

Dear users and developers,

Regarding the following code, I have two questions:
A Simple Synthesizer Keyboard

  1. On my laptop, I can play up to six voices. Is this limitation by SuperCollider, Qt, macOS, Bios or the machine?
    Try opening a text editor and press down more than six keys. You might
    find that the latest key presses are not reported by the OS.
1 Like

I am also limited to 6 simultaneous keys pressed when testing the code in your post. I tested some code of my own with a similar GUI for inputting notes from the computer keyboard and noticed the same limitation of max 6 keys at a time - M1 laptop.

1 Like

I just got seven, using the computer keyboard. (No touchscreen on this machine, so I can’t try that.)

Also, I noticed that some combinations of letters did not fire all of them. Your mileage will vary because I’m using a custom X11 keyboard map, but e.g. just now I did “a w s e d f” and got all 6… then adding t = nothing, release t add g = note, release g add y = nothing.

I think that points to a hardware limitation: certain combinations of the physical switches just don’t go through.

That also means the behavior is likely to be different on different machines.

This code isn’t maintained by SC devs – if it should be revised, it would be up to an individual user to do it (such as perhaps yourself), and post the new version on sccode.

Almost certainly.

hjh

1 Like

I believe this hardware limitation (which is keyboard implementation dependent, nothing to do with SC) is known as key rollover:

Can confirm, I can play any number of voices on my keyboard with N-key rollover (no limits on simultaneous keypresses), so this is definitely hardware- and driver-dependent and not due to a software limitation. A lot of mechanical keyboards and “gaming” keyboards support full rollover these days.

You can determine your keyboard rollover here.

You need a gaming keyboard with anti ghosting like this one:

:slight_smile: There are more talented people playing “keyboards” in youtube too.

1 Like