Or, foreshadowing. Of which there are two general kinds, which require — of course — different handling.
The first kind of foreshadowing is when you need something bad to happen to your characters unexpectedly — the equivalent of having your protagonist walking down the street without a care in the world, and then dropping a grand piano on his head. This needs to come as an unforeseen, and probably fatal, surprise to your protagonist; but not to your readers, who have little patience for plummeting pianos. Either you carefully plant, amid the usual distractions, the fact that the occupant of the fourth-floor-front apartment plays the piano, and hopes to trade in his or her current badly-tuned specimen for a better one someday; or you make it clear from the first pages of the book that your protagonist lives in the sort of film-noir universe where death by random piano is always a possibility.
The second kind of foreshadowing is when something bad is going to happen to one or more of your characters, and you want the reader to be aware that something bad is going to happen, and you want them to be waiting for it — the equivalent, in this case, of putting all your characters under a tornado watch and letting your readers sweat over the question of exactly which one of their fictional friends is going to see the funnel cloud snaking down out of the greenish-grey sky and hear the noise like an enormous freight train going over a bad grade. For that kind of foreshadowing, you need to start bringing the warning signs into the narrative early, a little bit at a time, and letting the frequency and the intensity build up slowly but steadily until the warning sirens begin to sound.
Because just as a stage whisper isn’t anything like a real whisper, fictional surprise isn’t anything like real surprise; it’s an artificial representation of the real thing. The real thing, if put unchanged into fiction, is liable to look fake.
If all that’s wrong with the piano is that it needs tuning, that’s too easily and cheaply taken care of, by hiring a piano tuner. Better make that a cracked soundboard, instead.
But in the event, an “occupant of the fourth-floor-front apartment” who “plays the piano, and hopes to trade in his or her current badly-tuned specimen for a better one” is probably wealthy enough to buy a new piano any old time he or she wants one, without having to wait for “someday” to shove the other one out the presumably six-foot-high window of the flat.
I always assumed that the falling piano was the result of a failure in the rigging being used to move the piano in through the upstairs window from the street below (the apartment building is, of course, a renovated brownstone with no room to move a grand piano in through the front door and up the stairs.) And our protagonist is a known daydreamer who’s too busy inside his own head to take a sensible precaution like crossing to the other side of the street.
Of course, as absentminded (and unlucky) as this guy is, if he crosses the street to get away from the piano movers, he’ll end up getting hit by a bus. Because the author is out to get him, and if the author is out to get you, there is no escape.