npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fourier-synth

v1.1.1

Published

Fourier Synthesizer Web Component

Downloads

5

Readme

Fourier Synthesizer Web Component

This project is a standalone Web Component for generating waveforms and audio using Fourier synthesis.

It was originally inspired by a Java Applet created by Manfred Thole.

Demo

Link to demo page.

Features

  • Waveforms can be saved and loaded via JSON files
  • Real (cosine) and imaginary (sine) harmonic adjustment
  • Adjustable fundamental frequency
  • Unlimited number of harmonics
  • Controls operate in real time
  • Configurable graph options
  • Fully customizable feature set including graph colors
  • All text fully translatable (English is built-in)

Develop

For information about development using this project see DEVELOP.md.

Use on the web

To use the Fourier Synthesizer web component on your web site, you need to import the component as a script and add the custom element tag to your page(s).

Browser support

Firefox (as of v112) and Safari (as of v16.3) do not support the disable normalization feature of the Web Audio API. As a result, the DC Offset control will not work properly - it is not possible to "clip" the generated wave where it exceeds the maximum level (the limits of the graph area). For best results use a different browser such as Edge, Opera, or another Chromium variant. For more information on browser support see the MDN documentation.

Script import

Add a script tag to the <head> section of your page. Replace https://my.domain/server-path/fourier-synth/ shown below with the path where the component files are stored on your server or elsewhere.

<script type="module" src="https://my.domain/server-path/fourier-synth/fourier-synth.esm.js"></script>

Hosting

Download one of the deploy files [email protected] or [email protected], and extract the contents. (The tgz file contains a tar file that needs to be extracted.) The extracted fourier-synth folder should be copied to your server including all contents. The name of the folder is not important, but it must match the src value of your page's script tag, and the file names must not be altered.

Serving from unpkg.com

If you don't need guaranteed availability, you can use the component from unpkg.com.

<script type="module" src="https://unpkg.com/[email protected]/dist/fourier-synth/fourier-synth.esm.js"></script>

Element tag

Add the element somewhere on your web page. Remember to use style or layout to control the size of the component.

<fourier-synth style="width: 850px;">Please enable JavaScript to use Fourier Synthesizer</fourier-synth>

Customization

To customize the features of the component or translate into another language, see the readme file for the web component.