mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
removing SimpleAM and SimpleFM
These synths are very similar to AM/FMSynth. Plus, the new FMOscillator type available in SimpleSynth makes it already a Simple FM/AM Synth.
This commit is contained in:
parent
46919e7c86
commit
7338775540
2 changed files with 0 additions and 108 deletions
|
@ -1,54 +0,0 @@
|
|||
define(["Tone/instrument/SimpleAM", "helper/Basic", "helper/InstrumentTests"], function (SimpleAM, Basic, InstrumentTest) {
|
||||
|
||||
describe("SimpleAM", function(){
|
||||
|
||||
Basic(SimpleAM);
|
||||
InstrumentTest(SimpleAM, "C4");
|
||||
|
||||
context("API", function(){
|
||||
|
||||
it ("can get and set carrier attributes", function(){
|
||||
var amSynth = new SimpleAM();
|
||||
amSynth.carrier.oscillator.type = "triangle";
|
||||
expect(amSynth.carrier.oscillator.type).to.equal("triangle");
|
||||
amSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get and set modulator attributes", function(){
|
||||
var amSynth = new SimpleAM();
|
||||
amSynth.modulator.envelope.attack = 0.24;
|
||||
expect(amSynth.modulator.envelope.attack).to.equal(0.24);
|
||||
amSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get and set harmonicity", function(){
|
||||
var amSynth = new SimpleAM();
|
||||
amSynth.harmonicity.value = 2;
|
||||
expect(amSynth.harmonicity.value).to.equal(2);
|
||||
amSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can be constructed with an options object", function(){
|
||||
var amSynth = new SimpleAM({
|
||||
"carrier" : {
|
||||
"oscillator" : {
|
||||
"type" : "square2"
|
||||
}
|
||||
}
|
||||
});
|
||||
expect(amSynth.carrier.oscillator.type).to.equal("square2");
|
||||
amSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get/set attributes", function(){
|
||||
var amSynth = new SimpleAM();
|
||||
amSynth.set({
|
||||
"harmonicity" : 1.5
|
||||
});
|
||||
expect(amSynth.get().harmonicity).to.equal(1.5);
|
||||
amSynth.dispose();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,54 +0,0 @@
|
|||
define(["Tone/instrument/SimpleFM", "helper/Basic", "helper/InstrumentTests"], function (SimpleFM, Basic, InstrumentTest) {
|
||||
|
||||
describe("SimpleFM", function(){
|
||||
|
||||
Basic(SimpleFM);
|
||||
InstrumentTest(SimpleFM, "C4");
|
||||
|
||||
context("API", function(){
|
||||
|
||||
it ("can get and set carrier attributes", function(){
|
||||
var fmSynth = new SimpleFM();
|
||||
fmSynth.carrier.oscillator.type = "triangle";
|
||||
expect(fmSynth.carrier.oscillator.type).to.equal("triangle");
|
||||
fmSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get and set modulator attributes", function(){
|
||||
var fmSynth = new SimpleFM();
|
||||
fmSynth.modulator.envelope.attack = 0.24;
|
||||
expect(fmSynth.modulator.envelope.attack).to.equal(0.24);
|
||||
fmSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get and set harmonicity", function(){
|
||||
var fmSynth = new SimpleFM();
|
||||
fmSynth.harmonicity.value = 2;
|
||||
expect(fmSynth.harmonicity.value).to.equal(2);
|
||||
fmSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can be constructed with an options object", function(){
|
||||
var fmSynth = new SimpleFM({
|
||||
"carrier" : {
|
||||
"oscillator" : {
|
||||
"type" : "square2"
|
||||
}
|
||||
}
|
||||
});
|
||||
expect(fmSynth.carrier.oscillator.type).to.equal("square2");
|
||||
fmSynth.dispose();
|
||||
});
|
||||
|
||||
it ("can get/set attributes", function(){
|
||||
var fmSynth = new SimpleFM();
|
||||
fmSynth.set({
|
||||
"harmonicity" : 1.5
|
||||
});
|
||||
expect(fmSynth.get().harmonicity).to.equal(1.5);
|
||||
fmSynth.dispose();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue