Skip to content

Commit bd97f3a

Browse files
committed
fixes #637 -- tempo block can support multiple beats per minute
1 parent a765183 commit bd97f3a

File tree

4 files changed

+211
-187
lines changed

4 files changed

+211
-187
lines changed

css/activity.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,6 @@ table {
444444
background: rgba(255, 255, 255, 0.85);
445445
}
446446

447-
#tempoCanvas {
448-
visibility: hidden;
449-
position: absolute;
450-
border: 1 !important;
451-
background: rgba(255, 255, 255, 0.85);
452-
}
453-
454447
#pscDiv {
455448
position: absolute;
456449
top: 20%;

index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@
207207
<video id="camVideo" style="visibility:hidden;">
208208
</video>
209209

210-
<canvas id="tempoCanvas" width="700" height="100" style="visibility:hidden;">
211-
</canvas>
212-
213210
<canvas id="camCanvas" style="visibility:hidden;">
214211
</canvas>
215212

js/logo.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,9 +2184,9 @@ function Logo(pitchtimematrix, pitchdrummatrix, rhythmruler,
21842184
logo.defaultBPMFactor = TONEBPM / this._masterBPM;
21852185
}
21862186
if (this.inTempo) {
2187-
tempo.BPMBlock = blk;
2187+
tempo.BPMBlocks.push(blk);
21882188
var bpmnumberblock = blocks.blockList[blk].connections[1]
2189-
tempo.BPM = blocks.blockList[bpmnumberblock].text.text;
2189+
tempo.BPMs.push(blocks.blockList[bpmnumberblock].text.text);
21902190
}
21912191
break;
21922192
case 'setbpm':
@@ -2276,6 +2276,8 @@ function Logo(pitchtimematrix, pitchdrummatrix, rhythmruler,
22762276
childFlow = args[0];
22772277
childFlowCount = 1;
22782278
logo.inTempo = true;
2279+
tempo.BPMblocks = [];
2280+
tempo.BPMs = [];
22792281

22802282
var listenerName = '_tempo_' + turtle;
22812283
logo._setDispatchBlock(blk, turtle, listenerName);

0 commit comments

Comments
 (0)