I often hear sounds and think "boy, would that be a cool sound for playing a tune on a keyboard." But, often the sounds begin substantially before where the understood "downbeat" would be.
An example would be a real trumpet; before the note truly begins to ring, there's rushing air and the beginnings of the lip vibrations. A synthetic example could be more extreme, with some sort of sonic introduction to the actual pitch appearing.
Given that keys won't emit sound before they are actually pressed (only the most expensive keyboards can predict the future), that means the key would need to be pressed before the musical beat so that the "beat" of the sound would occur at the musical beat. So, this means we have the player having to work some fraction of a second ahead of the rest of the band in order to stay in time with them.
Is this feasible? Or, is it commonly done (e.g. with the horn sound)? Or, with the horn, are synthetic versions edited so that they have no audible precursor to the beat?