Giter Site home page Giter Site logo

chrisdel101 / synth-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alex-wilmer/synth-starter

0.0 2.0 0.0 191 KB

Build your own synth with this convenient boilerplate!

Home Page: http://benevolent.ninja:3000/

License: MIT License

Makefile 0.17% HTML 21.92% JavaScript 77.91%

synth-starter's Introduction

Synth Starter โšก๐Ÿ”‰๐ŸŽถ

JSWS-101

A user interface with all of the fixins of a typical synthesizer--knobs, toggles, sliders, oh my!

It's your job to write the code that generates the sound and hooks into the UI to shape your synth's output into something beautiful (or chaotic, if that's your thing).

MDN Resources

Programs

Checkout a blank slate!

git checkout blank

Install / Run

yarn:

make yarn

npm:

make npm

Open http://localhost:3000 in your browser.

Already installed? Just run:

npm start

Code

src/Synth

The Synth function is called when the page is loaded and it returns an object with two listener functions that will be called whenever the UI is updated, or the next sequencer step fires.

let Synth = () => {

  //  Your synth code

  return {

    onUIChange(UI) {

      // Listen to UI changes!

    },

    onSequencerEvent(UI) {

      // Listen to sequencer steps!

    },

  }
}

export default Synth

src/Oscilloscope (requires AudioContext)

The Oscilloscope function returns an analyzer node that will draw the waveform of the nodes that connect to it.

import Oscilloscope from './Oscilloscope'

let ctx = new AudioContext()
...
node.connect(Oscilloscope(ctx))

Tonal Helpers

danigb's tonal library is included and is very helpful for converting pitches to frequencies among other things. Check out the repository for more details

https://github.com/danigb/tonal

import { toFreq } from 'tonal'

toFreq(`C3`) // 130.8127826502993

synth-starter's People

Contributors

alex-wilmer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.