Becuase of the very complex harmonics generated by FM the resulting FMwaveform has a rich harmonic content that can be exploited for music synthesis. In fact, the analogue synthesizer already does FM of a sort, with the LFOmodulating the pitch of the VCO. The only real difference is that an FMsynthesiser will use one oscillator to modulate the frequency of another, wherethe fundamental frequency of both oscillators is of a similar order.
Looking through your code, it looks like you're doing the FM correctly. However, I think that the modulation frequency is normally fixed rather than a fraction of the note frequency as it is in your code. It might be worth trying this and seeing if it sounds more like what you're looking for.
What is amplitude modulation (AM)
The other thing to mention is that FM synthesis was the start of the digital age so the waveforms were generated digitally and hence used more sophisticated waveforms than sine/square/triangle waves to create the interesting sounds. This might be what you need to do to get a better sound - rather than just generate a sine wave to modulate, use complex waveforms.
amplitude modulation Study Sets and Flashcards | Quizlet
In audio-frequency FM, we define ß as the ratio of the Carrier's peak frequency sweep (the amountby which the Carrier deviates from its unmodulated frequency) divided by theModulator frequency. We write this as follows:
Find and save ideas about Amplitude modulation on ..
The number of cycles above or below the center frequency is called the peak deviation. As the amplitude of the modulating wave is increased or decreased by some means, perhaps using an envelope generator, so too does the peak deviation change. It is this parameter, the changing strength of the modulating wave, that allows us to create dynamic, time-varying spectra of a sort very different from subtractive filtering and one that can, under certain circumstances, mimic the complexity of real-world sound characteristics using only two oscillators.
Amplitude modulation (AM) : the amplitude of the carrier wave ..
The rate of the vibrato is determined by the modulator'sfrequency, the depth of the vibrato (or how far above and belowits center frequency the carrier will be pushed) is determined bythe modulator's amplitude and the shape of the vibrato isdetermined by the modulator's waveform.
Analysis and synthesis of amplitude modulation ..
To answer your main question, yes it's absolutely fine to modulate waveforms other than sine waves. In fact, that's what FM is best at. Modulating sine waves gives a very boring sounding output, but when you input more complex waveforms with the same modulation, you get much more interesting results.
AM modulation of audio file - MATLAB Answers - MATLAB …
In contrast, complex waveforms multiply the number of resulting sidebands massively and make predictable results much more hard to achieve. Most documentation about FM - which is actually the almost-equivalent PHASE modulation (PM) in many common cases including "the" "FM" by Yamaha - concerns sine waves only.