NAM A2 Calibration

This commit is contained in:
Robin E.R. Davies
2026-05-13 11:22:42 -04:00
parent c456e5187b
commit 7343ced278
13 changed files with 243 additions and 72 deletions
+2 -7
View File
@@ -28,7 +28,6 @@ const THROTTLING_TRIGGGER_LEVEL = Math.floor(ALLOWED_DOWNLOADS_PER_MINUTE/2);
class DownloadThrottler {
private throttleActive: boolean = false;
private fifo: number[] = [];
private downloadCount: number = 0;
@@ -39,11 +38,7 @@ class DownloadThrottler {
this.fifo.shift();
}
if (this.fifo.length > THROTTLING_TRIGGGER_LEVEL) {
this.throttleActive = true;
} else {
this.throttleActive = false;
}
this.downloadCount = this.fifo.length;
}
getThrottleDelay(now : number = Date.now()): number {
while (this.fifo.length > 0 && this.fifo[0] + 60000 <= now) {
@@ -264,7 +259,7 @@ export class Tone3000DownloadHandler {
let models: Model[] = [];
let architectureFilter: number | undefined = undefined;
// Take A2 models only for NAM downloads, and only if the tone actually has A2 models.
if (downloadType === Tone3000DownloadType.Nam && !!tone.a2_models_count) {
if (downloadType === Tone3000DownloadType.Nam && !!tone.a2_models_count && this.model.tone3000_A2_models) {
architectureFilter = 2; // NAM models only
}