soundFloppy = loadSound('floppy.mp3');
soundNokia = loadSound('nokia-3310.mp3');
soundBoca = loadSound("dial-up-modem.mp3");
soundAim = loadSound("aim.mp3");
soundIcq = loadSound("icq.mp3");
cnv = createCanvas(600, 450);
btn = new imageButton("floppy.png", 100 , 100);
btn.position(30, height / 2);
btn.mousePressed(floppyBtnPressed);
btn.mouseReleased(floppyBtnReleased);
btnNokia = new imageButton("nokia.png", 100, 100);
btnNokia.position(150, height/2 - 3);
btnNokia.mousePressed(nokiaBtnPressed);
btnNokia.mouseReleased(nokiaBtnReleased);
soundNokia.setVolume(0.2);
btnBoca = new imageButton("boca.png", 120, 120);
btnBoca.position(220, height/2 + 10);
btnBoca.mousePressed(bocaBtnPressed);
btnBoca.mouseReleased(bocaBtnReleased);
btnAim = new imageButton("aim.png", 100, 100);
btnAim.position(370 , height/2);
btnAim.mousePressed(aimBtnPressed);
btnAim.mouseReleased(aimBtnReleased);
btnIcq = new imageButton("icq.png", 100, 100);
btnIcq.position(460, height/2);
btnIcq.mousePressed(icqBtnPressed);
btnIcq.mouseReleased(icqBtnReleased);
headerTxt = "Sound Museum";
descriptionTxt = "Step into a nostalgic journey with Sound Museum, where you can relive the iconic sounds of classic technological devices! Our interactive platform allows you to hear the unique audio signatures of devices that shaped our digital lives.";
currentlyPlayingTxt = "...";
amp = new p5.Amplitude();
circle(width/2, height/2, soundLevel);
text(descriptionTxt, 20, 70, width - 50);
if (soundFloppy.isPlaying()) {
amp.setInput(soundFloppy);
var rms = amp.getLevel();
currentlyPlayingTxt = 'You are listening the sound of a Floppy Disk...';
else if (soundNokia.isPlaying() == true) {
currentlyPlayingTxt = 'You are listening the sound of a Nokia-3310...';
else if (soundBoca.isPlaying() == true) {
currentlyPlayingTxt = 'You are listening the sound of Boca...';
else if (soundAim.isPlaying() == true) {
currentlyPlayingTxt = 'You are listening the sound of Aim...';
else if (soundIcq.isPlaying() == true) {
currentlyPlayingTxt = 'You are listening the sound of Icq...';
currentlyPlayingTxt = '...';
text(currentlyPlayingTxt, 20, height - 50, width - 50);
function floppyBtnPressed() {
function floppyBtnReleased() {
function nokiaBtnPressed() {
function nokiaBtnReleased() {
function bocaBtnPressed() {
function bocaBtnReleased() {
function aimBtnPressed() {
function aimBtnReleased() {
function icqBtnPressed() {
function icqBtnReleased() {