diff --git a/__init__.py b/__init__.py index fb4f64b03c19a6500c0109d3559161ca4c049dc6..bfd7c4fbfd06992653122520ee36e494e1bf127f 100755 --- a/__init__.py +++ b/__init__.py @@ -36,7 +36,9 @@ class EndlessSequencer(Application): self.current_note = 0 self.startTime = time.ticks_ms() self.SILENCE = 99 - self.bpm = 240 + self.bpm = 120 + self.time_signature = [0.5, 1, 2] # 1/16, 1/8, 1/4 + self.current_time_signature = 2 # 1/8 def draw(self, ctx: Context) -> None: ctx.rgb(*colours.BLACK) @@ -216,7 +218,7 @@ class EndlessSequencer(Application): def next_bpm(self): # taken from binarybrain code - beatTime = 60.0 * 1000.0 / self.bpm + beatTime = 60.0 * 1000.0 / self.bpm / self.current_time_signature curRelTime = time.ticks_diff(time.ticks_ms(), self.startTime) return curRelTime / beatTime > 1