not sure
This commit is contained in:
parent
560398fefb
commit
80ed37298b
73 changed files with 3619 additions and 1295 deletions
|
|
@ -85,6 +85,48 @@ describe('vibe and audio config contract', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('keeps audio timing, graph, and density settings bounded', () => {
|
||||
const { delay, generativePiano, graph, piano, rhythm } = gardenAudioConfig;
|
||||
|
||||
expect(rhythm.bpm).toBeGreaterThan(0);
|
||||
expect(rhythm.stepsPerBeat).toBeGreaterThan(0);
|
||||
expect(rhythm.stepsPerBar).toBeGreaterThanOrEqual(rhythm.stepsPerBeat);
|
||||
expect(rhythm.lookaheadSeconds).toBeGreaterThanOrEqual(piano.scheduleAheadSeconds);
|
||||
|
||||
expect(delay.feedbackMin).toBeLessThanOrEqual(delay.feedback);
|
||||
expect(delay.feedback).toBeLessThanOrEqual(delay.feedbackMax);
|
||||
expect(delay.feedbackHighPassHz).toBeLessThan(delay.feedbackLowPassHz);
|
||||
expect(delay.returnLowPassHz).toBeGreaterThan(delay.feedbackHighPassHz);
|
||||
|
||||
generativePiano.stylePools.forEach((register) => {
|
||||
expect(register.midiMin).toBeLessThan(register.preferredMidi);
|
||||
expect(register.preferredMidi).toBeLessThan(register.midiMax);
|
||||
});
|
||||
generativePiano.padRegisters.forEach((register) => {
|
||||
expect(register.midiMin).toBeLessThan(register.preferredMidi);
|
||||
expect(register.preferredMidi).toBeLessThan(register.midiMax);
|
||||
});
|
||||
|
||||
expect(generativePiano.brushStreamIdleIntervalBeats).toBeGreaterThanOrEqual(
|
||||
generativePiano.brushStreamActiveIntervalBeats
|
||||
);
|
||||
expect(generativePiano.brushStreamActiveIntervalBeats).toBeGreaterThanOrEqual(
|
||||
generativePiano.brushStreamIntenseIntervalBeats
|
||||
);
|
||||
expect(generativePiano.brushStreamIntenseIntervalBeats).toBeGreaterThanOrEqual(
|
||||
generativePiano.brushStreamManicIntervalBeats
|
||||
);
|
||||
expect(generativePiano.maxBrushPhraseLayers).toBeLessThanOrEqual(3);
|
||||
expect(generativePiano.maxBrushStreamNotesPerBar).toBeLessThanOrEqual(
|
||||
rhythm.stepsPerBar
|
||||
);
|
||||
|
||||
Object.values(graph.pianoBusGains).forEach((gain) => {
|
||||
expect(gain).toBeGreaterThan(0);
|
||||
expect(gain).toBeLessThanOrEqual(1.2);
|
||||
});
|
||||
});
|
||||
|
||||
it('falls back to finite RGB channels for malformed hex colors', () => {
|
||||
expect(hexToRgb('not-a-color')).toEqual([0, 0, 0]);
|
||||
expect(hexToRgb('#abcdzz')).toEqual([0, 0, 0]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue