How Can I Improve My MATLAB Piano Synthesis to Sound Less Like a Kazoo?

Click For Summary
SUMMARY

The discussion focuses on improving piano sound synthesis in MATLAB, specifically addressing the challenge of creating a realistic piano timbre. The user employs a fundamental frequency and 24 partials with an ADSR envelope but achieves a sound resembling a kazoo. Key suggestions include incorporating the percussive strike of the hammer on piano strings and adding inharmonicities to enhance realism. Additionally, recording a sample note and modifying playback speed for pitch adjustment is recommended as a viable technique.

PREREQUISITES
  • Familiarity with MATLAB programming
  • Understanding of Digital Signal Processing (DSP) concepts
  • Knowledge of FM synthesis and additive synthesis techniques
  • Experience with ADSR envelope shaping
NEXT STEPS
  • Research methods for simulating piano hammer strikes in sound synthesis
  • Explore techniques for adding inharmonicity to synthesized sounds
  • Learn about audio timescale and pitch modification techniques
  • Investigate advanced MATLAB functions for sound synthesis and manipulation
USEFUL FOR

This discussion is beneficial for sound designers, music technologists, and MATLAB users interested in synthesizing realistic piano sounds and enhancing their digital audio projects.

rhcp13
Messages
1
Reaction score
0
Hello,

I'm not sure if this is the right place to write this thread, but I have a question about attempting to synthesize a piano in MATLAB. I am very new to MATLAB and DSP in general and my project is trying to create a piano sound using whatever means (FM synthesis, additive synthesis, etc... whatever is simplest). My program asks the user for a note number (1-88) and should produce the tone with a piano timbre. Right now, I have a signal that is build on the fundamental plus 24 partials with an ADSR envelope for the entire signal. Here is some of the sample code:

srate = 44100;

ff = 27.5*2^((noteNumber-1)/12);

t = (0:1/srate:2);

for i = 1:25
y = y + amp(i)*cos(2*pi*ff*i*t);
end

The sound I am producing is more like that of a kazoo. I know that I need to add the percussive strike of the hammer on the piano strings and some inharmonicities as well but do not know how to go about that? Any help/code would be greatly appreciated. Thank you very much
 
Physics news on Phys.org

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
5K