xxxxxxxxxx
31
let url ="https://api.open-meteo.com/v1/forecast?latitude=37.7749&longitude=122.4194&hourly=temperature_2m&temperature_unit=fahrenheit&hourly=cloudcover&timezone=America/Los_Angeles";
function preload() {
loadJSON(url, (weatherData) => {
console.log(weatherData);
});
}
function setup() {
createCanvas(400, 400);
startButton = createButton("start transport");
stopButton = createButton("stop transport");
startButton.mousePressed(startTransport);
stopButton.mousePressed(stopTransport);
}
function draw() {
background(220);
}
function startTransport() {
Tone.start();
Tone.Transport.start();
}
function stopTransport() {
Tone.Transport.stop();
}