Code Monkey home page Code Monkey logo

midi-synth's Introduction

MIDI Synth

This application is a analog synthesizer simulation built on the Web Audio API. It is very loosely based on the architecture of a Moog Prodigy synthesizer, although this is a polyphonic synthesizer, and it lacks the oscillator sync and glide effects of the Prodigy. (AKA: this is not intended to be a replication of the Prodigy, so pleased don't tell me how crappy a reproduction it is! :)

This uses my Web MIDI Polyfill to add MIDI support via the Web MIDI API - in fact, I partly wrote this as a test case for the polyfill and the MIDI API itself, so if you have a MIDI keyboard attached, check it out. The polyfill uses Java to access the MIDI device, so if you're wondering why Java is loading, that's why. It may take a few seconds for MIDI to become active - the library takes a while to load - but when the ring turns gray (instead of blue), it's ready. If you have a native implementation of the Web MIDI API in your browser, the polyfill shouldn't load - at the time of this writing, Chrome Stable (from version 43) has the only such implementation. Earlier versions of Chrome (from version 33) can enable Web MIDI via chrome://flags/#enable-web-midi

You can try it out live at https://webaudiodemos.appspot.com/midi-synth/index.html.

Check it out, feel free to fork, submit pull requests, etc.

-Chris

midi-synth's People

Contributors

comfreek avatar cwilso avatar jdanford avatar nickmccurdy avatar njenkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

midi-synth's Issues

Voice constructor's velocity argument not used.

I've just incorporated this synth into my WebMIDISynthHost project [1], and see that the Voice constructor's velocity argument (js/synth.js, line 468) is not used. (It was used in an earlier version, but commented out, in line 478.)
How can it be used? Line 478 refers to a variable that no longer seems to exist...
Does this need fixing for both oscillators?

all the best,
James

[1] http://james-ingram-act-two.de/open-source/WebMIDISynthHost/host.html

Add license

I'm not sure what license this code is under.

Recording

Recording is not possible - the button is not functioning.

Tremolo knobs are mis-labeled

The 2 "tremolo" knobs which control modulation of the 2 oscillators actually affect PITCH (frequency) modulation, not loudness (amplitude), so they should be labelled "Vibrato", not "Tremolo".

??? Midi wont work ???

Eh? The console says that a midi controller is connected but the midi is still not playing from the computer... Any ideas?

new AudioContext() and requestMIDIAccess() do not work on modern browsers

These days, new AudioContext() and requestMIDIAccess() need to be initiated by a user gesture.

Error messages in Firefox:

An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page.

Uncaught (in promise) TypeError: selectMIDI is null
    populateMIDIInSelect https://webaudiodemos.appspot.com/midi-synth/js/midi.js:44
    onMIDIStarted https://webaudiodemos.appspot.com/midi-synth/js/midi.js:87

When changing KBD_OCT, user gets unhelpful feedback of which key is down

If I set KBD_OCT to +1, and hit the leftmost key (C), I don't see that key get highlighted to indicate that it detected my mouse action. Instead, the C key near the middle is highlighted, presumably because the synthesizer is playing C3, 131 Hz, just as it would if I pressed that key without changing the keyboard octave.

This is especially problematic when I'm trying to play a chord on a multi-touch device, since with significantly distorted synth settings it is actually not clear whether it detected each of the keys I meant to press. And for many settings, no keys are visibly highlighted at all.

Please highlight the keys I'm playing, rather than highlighting the key from the unmodified keyboard corresponding to the note that is playing.

Can't get MIDI IN to work (chrome 38)

Hi Chris,

I'm using Chrome 38 with the MIDI flag enabled but I can't get your synth (or drum machine) to connect with any of my MIDI controllers.

I've enabled the chrome flag and restarted. I've also installed the jazz-plugin even though I wasn't sure if I needed it. What steps need to be taken for this to work?

Thank you

MIDI keyboard's poblem

Hi Chris,
I'm using the latest version of Chrome with the MIDI flag enabled.
I can connect your sinth with my MIDI controllers, so i can see my keyboard in the MIDI_IN list.
When I try to play with your virtual piano I can hear the sound but, if I try to play with my keyboard it doesn't sound.
Have you got any idea to risolve this problem?

Thanks!
Mattia.

ChromeOS requires reboot to recognize MIDI device after enable-web-midi flag

Not a bug so much as a head's up for anybody trying this with a Chromebook: it seems that, after enabling WebMIDI in the browser, you need to reboot ChromeOS for a USB MIDI keyboard to be recognized. Once you do, it seems to work fine, but I figured it was worth mentioning if anybody was trying this.

Latency on an Acer c720 Chromebook is nil, by the way. Amazing.

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.