GithubHelp home page GithubHelp logo

jazz-soft / jzz-modules Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 1.0 4.64 MB

Additional modules for JZZ.js

HTML 1.44% JavaScript 98.56%
midi audio webmidi webmidiapi webaudio webaudioapi web-midi web-midi-api web-audio web-audio-api

jzz-modules's Introduction

JZZ-modules

Additional modules for JZZ.js:

JZZ.synth.MIDIjs
JZZ.synth.Timbre
JZZ.synth.OSC - moved to https://github.com/jazz-soft/JZZ-synth-OSC
JZZ.synth.Tiny - see at https://github.com/jazz-soft/JZZ-synth-Tiny
JZZ.input.Qwerty
JZZ.input.Kbd - moved to https://github.com/jazz-soft/JZZ-input-Kbd
JZZ.input.ASCII - moved to https://github.com/jazz-soft/JZZ-input-Kbd
JZZ.input.Knobs - moved to https://github.com/jazz-soft/JZZ-input-Kbd

JZZ.synth.MIDIjs

Create a custom MIDI-Out port using MIDI.js library.

windows mocos linux android

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/MIDI.js'></script>
<script src='javascript/JZZ.synth.MIDIjs.js'></script>
<script><!--
JZZ.synth.MIDIjs({ soundfontUrl: "./soundfont/", instrument: "acoustic_grand_piano" })
   .note(0, 'C5', 127, 500).wait(500)
   .note(0, 'E5', 127, 500).wait(500)
   .note(0, 'G5', 127, 500).wait(500)
   .note(0, 'C6', 127, 500);
--></script>

See the demo.

JZZ.synth.Timbre

A wrapper for the Timbre.js T("PluckGen")/T("OscGen")/T("SynthDef") synths.

windows mocos linux android

(Unlike advertized, does not seem to work in IE9 and some other browsers)

Example
<script src='javascript/timbre.js'></script>
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.synth.MIDIjs.js'></script>
<script><!--
var synth = T("SynthDef").play();
synth.def = function(opts) {
  var osc1, osc2, env;
  osc1 = T("sin", {freq:opts.freq, mul:0.25});
  osc2 = T("sin", {freq:opts.freq + 8, mul:0.25});
  env  = T("linen", {s:450, r:2500, lv:0.5}, osc1, osc2);
  return env.on("ended", opts.doneAction).bang();
};
JZZ.synth.Timbre(synth)
   .note(0, 'C5', 127, 500).wait(500)
   .note(0, 'E5', 127, 500).wait(500)
   .note(0, 'G5', 127, 500).wait(500)
   .note(0, 'C6', 127, 500);
--></script>

See the demo.

JZZ.synth.OSC

A simple Web Audio oscillator-based MIDI-Out port.

windows mocos linux ios android

(moved to https://github.com/jazz-soft/JZZ-synth-OSC)

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.synth.OSC.js'></script>
<script><!--
JZZ.synth.OSC()
   .note(0, 'C5', 127, 500).wait(500)
   .note(0, 'E5', 127, 500).wait(500)
   .note(0, 'G5', 127, 500).wait(500)
   .note(0, 'C6', 127, 500);
--></script>

See the demo.

JZZ.synth.Tiny

Tiny Web-Audio GM Synthesizer (g200kg/webaudio-tinysynth) wrapped as MIDI-Out port.

windows mocos linux ios android

(see at https://github.com/jazz-soft/JZZ-synth-Tiny)

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.synth.Tiny.js'></script>
<script><!--
JZZ.synth.Tiny()
   .note(0, 'C5', 127, 500).wait(500)
   .note(0, 'E5', 127, 500).wait(500)
   .note(0, 'G5', 127, 500).wait(500)
   .note(0, 'C6', 127, 500);
--></script>

See the demo.

JZZ.input.Qwerty

A wrapper for the Qwerty-Hancock keyboard.

windows mocos linux

Works wherewer the mouse and keyboard inputs are available.

qwerty

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/qwerty-hancock.js'></script>
<script src='javascript/JZZ.input.Qwerty'></script>
...
<div id='qwerty'> here comes the piano! </div>
...
<script><!--
JZZ.input.Qwerty({id:'qwerty', width:281, height:150, octaves:1, startNote:'C4'})
   .connect(JZZ().openMidiOut());
--></script>

See the demo.

JZZ.input.Kbd

Universal HTML keyboard for your MIDI projects.

windows mocos linux ios android

Mouse and multitouch support. Custom styles. Ready for responsive design.

(moved to https://github.com/jazz-soft/JZZ-input-Kbd)

kbd

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.input.Kbd'></script>
...
<script><!--
JZZ.input.Kbd().connect(JZZ().openMidiOut());
--></script>

See the demo.

JZZ.input.ASCII

ASCII keyboard as MIDI input.

windows mocos linux

Can be connected to JZZ.input.Kbd to enable both keyboard and mouse/touch input.

(moved to https://github.com/jazz-soft/JZZ-input-Kbd)

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.input.Kbd'></script>
...
<script><!--
JZZ.input.ASCII({
     //  S D   G H J
     // Z X C V B N M
     Z:'C5', S:'C#5', X:'D5', D:'D#5', C:'E5', V:'F5',
     G:'F#5', B:'G5', H:'Ab5', N:'A5', J:'Bb5', M:'B5'
   }).connect(JZZ().openMidiOut());
--></script>

See the demo.

JZZ.input.Knobs

Pitch-bend, modulation, and other knobs for your virtual instrument.

windows mocos linux ios android

Mouse and multitouch. Custom styles. Responsive design friendly. Perfect to use together with JZZ.input.Kbd...

(moved to https://github.com/jazz-soft/JZZ-input-Kbd)

knobs

Example
<script src='javascript/JZZ.js'></script>
<script src='javascript/JZZ.input.Kbd'></script>
...
<script><!--
JZZ.input.Slider({data:'pitch'}).connect(JZZ().openMidiOut());
JZZ.input.Pad({dataX:'mod', dataY:'volume'}).connect(JZZ().openMidiOut());
--></script>

See the demo.

How to create your own modules for JZZ.js

jzz-modules's People

Contributors

jazz-soft avatar joshstovall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

joshstovall

jzz-modules's Issues

How to change instrument with OSC

Hi,
My name is Jack,
It seems like the activation email of the community doesn't manage to be received by my email, so I am sorry to post my problem here.
Since I don't have any midi output device, I use JZZ.synth.OSC according to the "Hello MIDI" tutorial. It works well. However, when I tried to change the instrument(send(0xC0, 36)), the sound remain the same. Can anyone tell me how to change the instrument? THX!

here is the code:

<!DOCTYPE html>
<html>
<head>
<title>Hello MIDI!</title>
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true"/>
<script src="javascripts/JZZ.js"></script>
<script src="javascript/JZZ.synth.OSC.js"></script>
</head>
<body>
<h1>Hello MIDI!</h1>
<script><!--
JZZ.synth.OSC.register('Synth');
var port = JZZ().openMidiOut().or(function(){alert('Cannot open MIDI port!');});
function play(){
  port.send([0xC0, 36]).wait(500).send([0x90,65,127]).wait(500).send([0x80, 65, 0]);
}
--></script>
<button onclick='play();'> Press to play... </button>
</body>
</html>

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.