<commit_before>define(["helper/Basic", "Tone/source/PulseOscillator", "helper/Offline",
	"helper/SourceTests", "helper/OscillatorTests", "helper/CompareToFile"],
function(BasicTests, PulseOscillator, Offline, SourceTests, OscillatorTests, CompareToFile) {

	describe("PulseOscillator", function(){

		//run the common tests
		BasicTests(PulseOscillator);
		SourceTests(PulseOscillator);
		OscillatorTests(PulseOscillator);

		it("matches a file", function(){
			return CompareToFile(function(){
				var osc = new PulseOscillator().toMaster();
				osc.start(0);
			}, "pulseOscillator.wav");
		});

		context("Phase Rotation", function(){
			it("can change the phase to 90", function(){
				return Offline(function(){
					var osc = new PulseOscillator({
						"phase" : 90,
						"frequency" : 1
					});
					osc.toMaster();
					osc.start(0);
				}, 1).then(function(buffer){
					buffer.forEach(function(sample, time){
						if (time < 0.25){
							expect(sample).to.be.within(-1, 0);
						} else if (time > 0.25 && time < 0.5){
							expect(sample).to.be.within(0, 1);
						}
					});
				});
			});
<commit_msg>expanding pulse oscillator threshold<commit_after>define(["helper/Basic", "Tone/source/PulseOscillator", "helper/Offline",
	"helper/SourceTests", "helper/OscillatorTests", "helper/CompareToFile"],
function(BasicTests, PulseOscillator, Offline, SourceTests, OscillatorTests, CompareToFile) {

	describe("PulseOscillator", function(){

		//run the common tests
		BasicTests(PulseOscillator);
		SourceTests(PulseOscillator);
		OscillatorTests(PulseOscillator);

		it("matches a file", function(){
			return CompareToFile(function(){
				var osc = new PulseOscillator().toMaster();
				osc.start(0);
			}, "pulseOscillator.wav", 50);
		});

		context("Phase Rotation", function(){
			it("can change the phase to 90", function(){
				return Offline(function(){
					var osc = new PulseOscillator({
						"phase" : 90,
						"frequency" : 1
					});
					osc.toMaster();
					osc.start(0);
				}, 1).then(function(buffer){
					buffer.forEach(function(sample, time){
						if (time < 0.25){
							expect(sample).to.be.within(-1, 0);
						} else if (time > 0.25 && time < 0.5){
							expect(sample).to.be.within(0, 1);
						}
					});
				});
			});

{'fraction_non_alphanumeric': 0.16453462726069695, 'fraction_numerical': 0.018526687251874726, 'mean_word_length': 3.6570841889117043, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '902988', 'n_tokens_mistral': 996, 'n_tokens_neox': 744, 'n_words': 146}