

i created an instrument that works only at certain times of the day. In this way, I’m giving this instrument some agency to play during a set time. In this case I gave it the value of course, but the idea is that this instrument decided on it’s own. i could have used a random number generator to come up with this and attributed it to the instrument but that’s not the point. The story I’m telling is that the instrument “decided” that it can only play for a part of the day. In reality everyone knows that the coders decided it, but this is make-belief. Characters in a play “decide” when we all know the playwright made the decision.
When it comes to building the actual sonic interactions, the behavior might be just that it plays something very minimal to show that it is in fact working but isn’t going to participate in a significant way at the moment. For example:
Sleeping: small clicks
participating: a wide range of sonic variations, some of which will be based on input and
Code:
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
var h = hour()
button1 = createButton('play ');
button1.position(105, 68);
button1.mousePressed(pressed);
if((h >= 16) && (h <= 21)) {
text('Current hour:\n' + h, 5, 50);
}
else {
button1.hide();
text('this instument is doesnt usually like to play at this hour \n' + 'it normally plays between 4 and 9 pm in October\n' + 'Please come back later or try another instrument',5, 50);
}
function pressed() {
window.open("https://editor.p5js.org/katya/full/S12IWdnuQ");
}
}