Giter Site home page Giter Site logo

ryohey / jasmid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gasman/jasmid

0.0 0.0 0.0 133 KB

A MIDI file reader and synthesiser in Javascript

Home Page: http://matt.west.co.tt/music/jasmid-midi-synthesis-with-javascript-and-html5-audio/

License: Other

Ruby 0.98% JavaScript 74.02% ActionScript 10.76% HTML 14.24%

jasmid's Introduction

jasmid - A Javascript MIDI file reader and synthesiser

Originally presented at BarCamp London 8, 13-14 November 2010

Instructions:
Open index.html in browser. Turn up volume. Click on link.

Sound output is via one of the following mechanisms, according to what your
browser supports:
* Mozilla Audio Data API <https://wiki.mozilla.org/Audio_Data_API>
* Web Audio API
    <https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html>
* a Flash fallback originally taken from dynamicaudio.js by Ben Firshman
    <https://github.com/bfirsh/dynamicaudio.js> and hacked around by me.


The code:
stream.js - helper library for reading a string as a stream of typed data
midifile.js - parses the MIDI file format into a header and a list of tracks,
    each consisting of a list of event objects
replayer.js - steps over the data structure generated by midifile.js and calls
    the appropriate operations on the synthesiser
synth.js - audio synthesiser; generates waveforms according to tweakable
    parameters
audio.js - passes the generated waveform to either the Audio Data API or the
    Flash fallback widget (da.swf)


Limitations:
* The only event types supported by replayer.js are note on, note off, tempo
    change and program change
* There are currently only two instrument presets defined in synth.js - one for
    strings and a 'piano' one for everything else - and neither of them are
    particularly good (just a single volume-modulated sine wave).


Matt Westcott <[email protected]> - @gasmanic - http://matt.west.co.tt/

jasmid's People

Contributors

gasman avatar luckyllama avatar paulmorris avatar ryohey avatar signpostmarv avatar zz85 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.