moved var definition

This commit is contained in:
Elliot Gerchak 2016-11-23 13:24:37 +00:00
parent 81a3f76a44
commit 15419f5628

View File

@ -8,7 +8,6 @@ function now() {
var NSEC_PER_SEC = 1000000000; var NSEC_PER_SEC = 1000000000;
var register = 3.1415; var register = 3.1415;
var logs = document.getElementById('logs');
function square_am_signal(time, freq) { function square_am_signal(time, freq) {
window.logs.value += "\nPlaying / " + time + " seconds / " + freq + "Hz"; window.logs.value += "\nPlaying / " + time + " seconds / " + freq + "Hz";
@ -29,6 +28,7 @@ function square_am_signal(time, freq) {
} }
function start() { function start() {
var logs = document.getElementById('logs');
var song = document.getElementById("tones").value.split("\n"); var song = document.getElementById("tones").value.split("\n");
var length = song.length; var length = song.length;
var line, time, freq; var line, time, freq;