This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const recorder = new Tone.Recorder(); | |
| const synth = new Tone.Synth().connect(recorder); | |
| // start recording | |
| recorder.start(); | |
| // generate a few notes | |
| synth.triggerAttackRelease("C3", 0.5); | |
| synth.triggerAttackRelease("C4", 0.5, "+1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add this script tag the index.html file | |
| <script src="https://apis.google.com/js/client:platform.js"></script> | |
| // Initialize the library with your credentials | |
| const initialize = () => { | |
| return window.gapi.auth2.init({ | |
| client_id: "YOUR_CLIENT_ID", //paste your client ID here | |
| scope: "https://www.googleapis.com/auth/analytics.readonly", | |
| }); | |
| }; |