Your teacher is correct, you can apply a delay effect to a piano, just like you would to a guitar.
First, let's get the basics out of the way:
Delay is an audio effect and an effects unit which records an input signal to an audio storage medium, and then plays it back after a period of time. The delayed signal may either be played back multiple times, or played back into the recording again, to create the sound of a repeating, decaying echo.
Thus, we can see that anything we can record, we can apply delay to. The piano - being an acoustic instrument - makes it a bit tricky to do live, which is why it's a better idea to use an electronic keyboard for this purpose.
Here's how you might go about getting the sound:
- Transcribe the music onto the piano,
- Set up an electronic keyboard (for example: a synthesizer or stage piano) to play a piano sound,
- For live performance, plug a delay effect between your keyboard and the amplifier (plug the audio outputs of your keyboard into the delay unit and the delay outputs into the amplification stage); set up your delay parameters and you're ready to go,
- If you are recording with a DAW, you can either set up a delay effect as a channel insert, so you are hearing the delay as you're recording; or, you can record your playing dry (without effects) and apply the delay effect to the recorded take during mixdown.
A couple of words about setting tempo delay (that is: echoes that are in sync with the tempo of your piece):
Tempo delay is a cool way to get more notes than you're actually playing, by having delayed notes ring out between notes that are actually played (this is sometimes referred to as slap-back). Since the delay time will be fixed, it's recommended you play such parts with an authoritative tempo source, such as a metronome, to make sure you aren't speeding up or slowing down relative to your delay.
Many delay plugins in modern DAWs have a tempo-sync option, where you can set up the tempo in your host DAW and set the delay time as a rhythmic subdivision relative to that tempo - dotted 8th notes, in this case.
If the delay effect (hardware or software) does not have such an option, but has the delay time scaled in miliseconds, you can get the quarter-note delay time (QDT) for a given tempo by applying this simple formula
QDT (ms) = 60,000 / tempo (bpm)
From there, you can get the appropriate delay time by dividing or multiplying the quarter note delay time by an appropriate amount. For example: an eighth note delay would be QDT/2; a dotted-quarter delay would be QDT*1.5 etc.
If your delay time control doesn't have a milisecond scale either, the only thing that remains is to set the delay time by ear.
The other parameters you'll need to set is the mix control - which sets the volume of the delayed notes relative to the notes you're actually playing - and the feedback control - which governs the number of repeats for each played note; set to 0 for just one repeat, as typical in a slap-back setting.
That's all there is to it.