TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Frequency Modulation (FM) with Web Audio API

31 pointsby grenover 11 years ago

2 comments

boomlindeover 11 years ago
It&#x27;s a nice article, but I think there are some important things to note here:<p>Typically, what we call &quot;FM synthesis&quot; is implemented as phase modulation -- instead of modulating the frequency of the carrier, you modulate a phase offset. That way, the amplitude of the modulator won&#x27;t have to be scaled with the frequency of the carrier for a uniform timbre over the whole frequency.<p>My second note is that most FM synthesizers (the whole Yamaha range, basically) don&#x27;t define the frequency ratio increments in octaves or quarter octaves, but simply as multiples of the base frequency, producing a harmonic series. Most implementations do this in integer increments, but others like the DX7 and TX81z let you use fractional frequency multiples.
评论 #6263839 未加载
tfj9eor9eover 11 years ago
For what it is worth, I have made a similar work with much less details and very poorly designed, but here are some cool FM instruments: <a href="https://github.com/tfjgeorge/jsfm#gong" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tfjgeorge&#x2F;jsfm#gong</a><p>To hear the sound click the speaker on the right (works at least with Chrome).
评论 #6262974 未加载