Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- MusicManager.js +3 -3
MusicManager.js
CHANGED
|
@@ -659,8 +659,8 @@ export class MusicManager {
|
|
| 659 |
// =====================================================================
|
| 660 |
|
| 661 |
const DEAD_ZONE = 0.25; // higher than trigger thresh so loop starts after open
|
| 662 |
-
const MIN_BPM =
|
| 663 |
-
const MAX_BPM =
|
| 664 |
|
| 665 |
const distToInterval = (dist) => {
|
| 666 |
if (dist < DEAD_ZONE) return Infinity;
|
|
@@ -777,7 +777,7 @@ export class MusicManager {
|
|
| 777 |
// Ring finger distance sets beat rate of the shape bass (0=off, 1=fast pulse)
|
| 778 |
const ringDist = this._smoothDist.ring || 0;
|
| 779 |
if (ringDist > 0.15 && this._shapeBassActive) {
|
| 780 |
-
const beatBPM =
|
| 781 |
const beatMs = 60000 / beatBPM;
|
| 782 |
if (!this._shapeBeatTimer) this._shapeBeatTimer = 0;
|
| 783 |
const now = performance.now();
|
|
|
|
| 659 |
// =====================================================================
|
| 660 |
|
| 661 |
const DEAD_ZONE = 0.25; // higher than trigger thresh so loop starts after open
|
| 662 |
+
const MIN_BPM = 20; // very slow ambient pulse
|
| 663 |
+
const MAX_BPM = 100; // chill downtempo cap
|
| 664 |
|
| 665 |
const distToInterval = (dist) => {
|
| 666 |
if (dist < DEAD_ZONE) return Infinity;
|
|
|
|
| 777 |
// Ring finger distance sets beat rate of the shape bass (0=off, 1=fast pulse)
|
| 778 |
const ringDist = this._smoothDist.ring || 0;
|
| 779 |
if (ringDist > 0.15 && this._shapeBassActive) {
|
| 780 |
+
const beatBPM = 15 + ringDist * 85; // 15-100 BPM, ambient throb
|
| 781 |
const beatMs = 60000 / beatBPM;
|
| 782 |
if (!this._shapeBeatTimer) this._shapeBeatTimer = 0;
|
| 783 |
const now = performance.now();
|