Add v2 Game Boy sound engine (isolated from v1)
- Authentic DMG-CPU sound chip implementation: - 4 Pulse channels with duty cycle control (12.5%, 25%, 50%, 75%) - 2 Wave channels with 4-bit wavetables - 2 Noise channels with LFSR (7-bit and 15-bit modes) - GameBoy Colorizer effect chain: - Low-pass filter (natural GB rolloff) - Bit-crushing (4-bit DAC simulation) - Sample rate reduction - Saturation and high-pass filter - Presets: DMG, GBC, GBA, Clean - Intelligent MIDI processing: - Track analysis and role detection (bass, lead, drums, etc.) - Automatic channel mapping to GB channels - Chord arpeggiator for polyphony handling - GameBoy Arranger for fuller sound - BitMidi search integration - Completely isolated from v1 (no changes to src/)
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* Wario Synth v2 - Main Exports
|
||||
*
|
||||
* Game Boy-authentic synthesis engine
|
||||
*/
|
||||
|
||||
// Core Player - Main entry point
|
||||
export { GameBoyPlayer } from './core/GameBoyPlayer';
|
||||
|
||||
// APU and Channels
|
||||
export { GameBoyAPU } from './audio/apu/APU';
|
||||
export { PulseChannel } from './audio/apu/PulseChannel';
|
||||
export { WaveChannel } from './audio/apu/WaveChannel';
|
||||
export { NoiseChannel } from './audio/apu/NoiseChannel';
|
||||
|
||||
// Synthesis primitives
|
||||
export {
|
||||
DUTY_PATTERNS,
|
||||
createDutyWave,
|
||||
createAllDutyWaves,
|
||||
getDutyDescription,
|
||||
type DutyIndex
|
||||
} from './audio/synthesis/DutyCycle';
|
||||
|
||||
export {
|
||||
calculatePulseFrequency,
|
||||
calculateWaveFrequency,
|
||||
calculateNoiseFrequency,
|
||||
midiToStandardFrequency,
|
||||
getFrequencyDeviation
|
||||
} from './audio/synthesis/FrequencyCalc';
|
||||
|
||||
export {
|
||||
LFSR,
|
||||
generateNoiseBuffer,
|
||||
verifyLFSR,
|
||||
type LFSRMode
|
||||
} from './audio/synthesis/LFSR';
|
||||
|
||||
export {
|
||||
WaveTable,
|
||||
WAVE_PRESETS,
|
||||
generateTriangleWave,
|
||||
generateSawtoothWave,
|
||||
generateSineWave,
|
||||
generateSquareWave,
|
||||
generateBassWave,
|
||||
generatePadWave,
|
||||
generateLeadWave,
|
||||
type WavePreset,
|
||||
type WaveVolume
|
||||
} from './audio/synthesis/WaveTable';
|
||||
|
||||
// MIDI Intelligence
|
||||
export { TrackAnalyzer, type MIDINote, type MIDITrack } from './audio/midi/TrackAnalyzer';
|
||||
export { Arpeggiator, type ArpeggiatorConfig } from './audio/midi/Arpeggiator';
|
||||
export { ChannelMapper, type ChannelMapperConfig } from './audio/midi/ChannelMapper';
|
||||
|
||||
// Arranger (makes sparse MIDIs sound full like real GB music)
|
||||
export { GameBoyArranger, type ArrangerConfig, type ArrangementResult } from './audio/arranger/GameBoyArranger';
|
||||
|
||||
// Effects
|
||||
export { GameBoyColorizer, type ColorizerConfig } from './audio/effects/GameBoyColorizer';
|
||||
|
||||
// Types
|
||||
export * from './types';
|
||||
|
||||
// Tests
|
||||
export {
|
||||
runVerificationTests,
|
||||
createTestChannels,
|
||||
testDutyCycles,
|
||||
testWaveChannel,
|
||||
testNoiseChannel,
|
||||
testCombined,
|
||||
runAllAudioTests
|
||||
} from './audio/test/soundTest';
|
||||
Reference in New Issue
Block a user