Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

noteOff() does not work #47

Open
jazz-soft opened this issue Aug 29, 2015 · 2 comments
Open

noteOff() does not work #47

jazz-soft opened this issue Aug 29, 2015 · 2 comments

Comments

@jazz-soft
Copy link

Tried it with T("PluckGen"), T("OscGen"), T("SynthDef") on several browsers Windows and Mac.
Here is a sample file:

<title>Timbre</title> <script src="timbre.js"></script> <script></script>

Timbre

PluckGen
OscGen
SynthDef

@jazz-soft
Copy link
Author

Oops, html did not load properly...

@jazz-soft
Copy link
Author

var env = T("perc", {a:50, r:2500});
var osc = T("pulse");
var synth1 = T("PluckGen", {env:env, mul:0.5}).play();
var synth2 = T("OscGen", {osc:osc, env:env, mul:0.15}).play();
var synth3 = T("SynthDef").play();
synth3.def = function(opts) {
var osc1, osc2, env;
osc = T("saw", {freq:opts.freq, mul:0.25});
env = T("linen", {s:450, r:2500, lv:0.5}, osc);
return env.on("ended", opts.doneAction).bang();
};

var env = T("perc", {a:50, r:2500});
var osc = T("pulse");
var synth1 = T("PluckGen", {env:env, mul:0.5}).play();
var synth2 = T("OscGen", {osc:osc, env:env, mul:0.15}).play();
var synth3 = T("SynthDef").play();
synth3.def = function(opts) {
var osc1, osc2, env;
osc = T("saw", {freq:opts.freq, mul:0.25});
env = T("linen", {s:450, r:2500, lv:0.5}, osc);
return env.on("ended", opts.doneAction).bang();
};

function noteOn1() { synth1.noteOn(60, 100);}
function noteOff1() { synth1.noteOff(60);}

function noteOn2() { synth2.noteOn(60, 100);}
function noteOff2() { synth2.noteOff(60);}

function noteOn3() { synth3.noteOn(60, 100);}
function noteOff3() { synth3.noteOff(60); alert(timbre.version);}

it does not work at https://mohayonao.github.io/timbre.js/PragmaSynth.html either

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant