Skip to content
View shaqiicrafter's full-sized avatar

Block or report shaqiicrafter

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
shaqiicrafter/README.md
<title>Oscillator</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/png" sizes="174x174" href="./favicon.png">

<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.4.3/webcomponents-bundle.js"></script>
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet"/>
<script src="../build/Tone.js"></script>
<script src="./js/tone-ui.js"></script>
<script src="./js/components.js"></script>
<style type="text/css">
	tone-play-toggle {
		margin-bottom: 10px;
	}
</style>
The oscillator has 4 basic types which can be altered by setting the number of partials and partials array.

Tone.Oscillator docs.
	<div id="content">
		<tone-momentary-button></tone-momentary-button>
	</div>
</tone-example>


<script type="text/javascript">
	const osc = new Tone.Oscillator({
		type: "square",
		frequency: 440,
		volume: -16
	}).toDestination();

	ui({
		tone: osc,
		parent: document.querySelector("#content")
	});

	// bind the interface
	document.querySelector("tone-momentary-button").addEventListener("down", () => osc.start());
	document.querySelector("tone-momentary-button").addEventListener("up", () => osc.stop());
</script>

Popular repositories Loading

  1. shaqiicrafter shaqiicrafter Public

    Config files for my GitHub profile.

  2. Tone.js Tone.js Public

    Forked from Tonejs/Tone.js

    A Web Audio framework for making interactive music in the browser.

    TypeScript