Simplify v2 - remove GBC/GBA/Clean presets
- Removed sound mode buttons from UI - Simplified colorizer to just one clean GB sound - Less complexity, cleaner interface
This commit is contained in:
@@ -222,53 +222,18 @@ export class GameBoyColorizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a preset configuration.
|
* Create the default GB configuration.
|
||||||
|
* Simple, clean Game Boy sound.
|
||||||
*/
|
*/
|
||||||
static createPreset(preset: 'dmg' | 'gbc' | 'gba' | 'clean'): Partial<ColorizerConfig> {
|
static createPreset(_preset?: string): Partial<ColorizerConfig> {
|
||||||
switch (preset) {
|
// Just one clean GB sound - no complexity
|
||||||
case 'dmg':
|
|
||||||
// Original Game Boy - warm but clean
|
|
||||||
return {
|
return {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
lowpassFreq: 8000,
|
lowpassFreq: 8000, // Natural GB rolloff
|
||||||
bitDepth: 8, // Less harsh than 4-bit
|
bitDepth: 8, // Clean enough to avoid harshness
|
||||||
sampleRateReduction: 1, // No SR reduction (causes artifacts)
|
sampleRateReduction: 1, // No SR reduction (causes artifacts)
|
||||||
saturation: 0.1, // Minimal saturation to avoid clicks
|
saturation: 0.05, // Very subtle warmth
|
||||||
highpassFreq: 30, // Let bass through!
|
highpassFreq: 30, // Let bass through
|
||||||
};
|
};
|
||||||
|
|
||||||
case 'gbc':
|
|
||||||
// Game Boy Color - slightly cleaner
|
|
||||||
return {
|
|
||||||
enabled: true,
|
|
||||||
lowpassFreq: 10000,
|
|
||||||
bitDepth: 8,
|
|
||||||
sampleRateReduction: 1,
|
|
||||||
saturation: 0.08, // Minimal saturation
|
|
||||||
highpassFreq: 25,
|
|
||||||
};
|
|
||||||
|
|
||||||
case 'gba':
|
|
||||||
// Game Boy Advance - cleaner still
|
|
||||||
return {
|
|
||||||
enabled: true,
|
|
||||||
lowpassFreq: 14000,
|
|
||||||
bitDepth: 12,
|
|
||||||
sampleRateReduction: 1,
|
|
||||||
saturation: 0.1,
|
|
||||||
highpassFreq: 20,
|
|
||||||
};
|
|
||||||
|
|
||||||
case 'clean':
|
|
||||||
// No processing
|
|
||||||
return {
|
|
||||||
enabled: false,
|
|
||||||
lowpassFreq: 20000,
|
|
||||||
bitDepth: 16,
|
|
||||||
sampleRateReduction: 1,
|
|
||||||
saturation: 0,
|
|
||||||
highpassFreq: 20,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,13 +450,6 @@
|
|||||||
<button id="btn-drum">Drum</button>
|
<button id="btn-drum">Drum</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="quick-test" style="margin-top: 0.5rem;">
|
|
||||||
<span style="font-size: 0.6rem; opacity: 0.7;">Sound mode:</span>
|
|
||||||
<button id="btn-dmg" class="active">DMG</button>
|
|
||||||
<button id="btn-gbc">GBC</button>
|
|
||||||
<button id="btn-gba">GBA</button>
|
|
||||||
<button id="btn-clean">Clean</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="quick-test" style="margin-top: 0.5rem;">
|
<div class="quick-test" style="margin-top: 0.5rem;">
|
||||||
<span style="font-size: 0.6rem; opacity: 0.7;">Arranger:</span>
|
<span style="font-size: 0.6rem; opacity: 0.7;">Arranger:</span>
|
||||||
@@ -677,29 +670,6 @@
|
|||||||
apu.getNoiseChannel('n1')?.playKick(100);
|
apu.getNoiseChannel('n1')?.playKick(100);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Colorizer preset buttons
|
|
||||||
const presetButtons = {
|
|
||||||
dmg: document.getElementById('btn-dmg'),
|
|
||||||
gbc: document.getElementById('btn-gbc'),
|
|
||||||
gba: document.getElementById('btn-gba'),
|
|
||||||
clean: document.getElementById('btn-clean'),
|
|
||||||
};
|
|
||||||
|
|
||||||
function setColorizerPreset(preset) {
|
|
||||||
log(`Sound mode: ${preset.toUpperCase()}`);
|
|
||||||
player.getAPU().setColorizerPreset(preset);
|
|
||||||
|
|
||||||
// Update button states
|
|
||||||
Object.entries(presetButtons).forEach(([key, btn]) => {
|
|
||||||
btn.classList.toggle('active', key === preset);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
presetButtons.dmg.addEventListener('click', () => setColorizerPreset('dmg'));
|
|
||||||
presetButtons.gbc.addEventListener('click', () => setColorizerPreset('gbc'));
|
|
||||||
presetButtons.gba.addEventListener('click', () => setColorizerPreset('gba'));
|
|
||||||
presetButtons.clean.addEventListener('click', () => setColorizerPreset('clean'));
|
|
||||||
|
|
||||||
// ===== ARRANGER TOGGLE =====
|
// ===== ARRANGER TOGGLE =====
|
||||||
|
|
||||||
const arrangerBtn = document.getElementById('btn-arranger');
|
const arrangerBtn = document.getElementById('btn-arranger');
|
||||||
|
|||||||
Reference in New Issue
Block a user