Git Product home page Git Product logo

smfplayer-demo's Introduction

Live Demo

http://ryoyakawai.github.io/smfplayer/

What is this?

This application is Standard MIDI File Player with JavaScript. Now you can play Standard MIDI File only with your Chrome(as is 2014/05). With external MIDI devices with Web MIDI API. Even if you do not own any external MIDI Device, this application support Web MIDI Link which is tone generator build on top of Web Audio API!! (Thanks for @g200kg!!)

Requirements (as is 2014/05)

Google Chrome Version 34 or higher. (Both Mac and Windows are supported.)

Useful files

###js/smfParser.js Parse Standard MIDI File to JavaScript Object.

var smfParser=new SmfParser();
var parsedSmf = smfParser.parse( [midiFile] );

###js/smfPlayer.js Playback JavaScript Objected Standard MIDI File.

var smfPlayer=new SmfPlayer();
smfPlayer.init( [JavaScript Objected Standard MIDI File], latency, eventNo );
  • latency (msec): Set number unit of milliseconds that you want delay.
  • eventNo: Pass event number of JavaScript Object where to start play.

###Web MIDI Link Tone Generator created by Web Audio. Implementation of Web MIDI Link parts are here.

add div element in HTML

<div id="webmidilink"></div>

include sender file

<script type="text/javascript" src="js/webmidilinkSender.js"></script>

js/app.js : Line23-36 : Define the Tone Generators support Web MIDI Link.

synth.Load(url, name, attributes, element_id);
  • url: URL of Tone Generator support Web MIDI Link.
  • name: iframe's name when you use Web MIDI Link in iframe. Set null when you use in div element.
  • attribute: iframe's name when you use Web MIDI Link in iframe. Set null when you use in div element.
  • element_id: Id of the element where to set. Set null when you use in iframe.

js/app.js : Line62-84 : Send message to Web MIDI Link. Very similar to Web MIDI API.

LICENSE

LICENSE

smfplayer-demo's People

Contributors

ryoyakawai avatar cwilso 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.