Create TAP TEMPO / METRONOME

Hello.

I have a few months of experience with Processing, but I guess that this is an algorithm related question.

So, I have a processing project that plays sounds when the user press some PAD on MIDI or even KEYBOARD and I want to try to play a beap continuously according to BPM.

What I have tried:

import processing.sound.*; SoundFile beap; int bpm = 95; int secs = 1; void setup() { frameRate(60); fullScreen(); beap = new SoundFile(this, "sounds/bip.mp3"); } void draw(){ secs++; beap.play(); }

But, this of course plays beap continuously. Anybody can help me?

NOTE: changing frameRate(); does not help because it'll mess with rendering graphics.

Thanks

Tagged:

Answers

Sign In or Register to comment.