Bryn The Raccoon

Programming Projects & Creative Code

Project Portfolio

Web Audio Synth

Live

Modular synthesizer with visual patch cables and Y2K UI

JavaScript Web Audio API Canvas

Audio Reactive Visualizer

Active

3D particle system driven by audio frequencies

Three.js GLSL Web Audio

Retro Game Engine

In Dev

PS1-style 3D engine with MOD music playback

C++ OpenGL FMOD

MIDI Visualizer

Live

3D visualization of MIDI data with real-time synthesis

Three.js Tone.js WebMIDI

Y2K UI Library

Complete

Collection of Y2K-themed React components

React TypeScript Styled Components

VST Plugin Suite

In Dev

Collection of Y2K-themed audio plugins

C++ JUCE DSP

Code Snippets

Web Audio Synth Class

// Y2K-style synth with Web Audio API
class Y2KSynth {
    constructor(context) {
        this.ctx = context || new (window.AudioContext || 
                                   window.webkitAudioContext)();
        this.oscillators = new Map();
        this.filters = [];
        this.lfoRate = 5;
        this.distortion = 0;
    }
    
    playNote(frequency, type = 'sawtooth', duration = 2) {
        const osc = this.ctx.createOscillator();
        const gain = this.ctx.createGain();
        const filter = this.ctx.createBiquadFilter();
        
        // Create Y2K-style LFO for filter cutoff
        const lfo = this.ctx.createOscillator();
        const lfoGain = this.ctx.createGain();
        
        osc.type = type;
        osc.frequency.setValueAtTime(frequency, this.ctx.currentTime);
        
        // Y2K filter settings
        filter.type = 'lowpass';
        filter.frequency.setValueAtTime(2000, this.ctx.currentTime);
        filter.Q.setValueAtTime(10, this.ctx.currentTime);
        
        // LFO modulation
        lfo.frequency.setValueAtTime(this.lfoRate, this.ctx.currentTime);
        lfoGain.gain.setValueAtTime(800, this.ctx.currentTime);
        
        // Envelope
        const now = this.ctx.currentTime;
        gain.gain.setValueAtTime(0, now);
        gain.gain.linearRampToValueAtTime(0.8, now + 0.1);
        gain.gain.exponentialRampToValueAtTime(0.01, now + duration);
        
        // Connect nodes
        osc.connect(filter);
        filter.connect(gain);
        gain.connect(this.ctx.destination);
        lfo.connect(lfoGain);
        lfoGain.connect(filter.frequency);
        
        // Start
        osc.start(now);
        lfo.start(now);
        osc.stop(now + duration);
        lfo.stop(now + duration);
        
        return { osc, gain, filter, lfo };
    }
}

Audio Analysis with Python

# Y2K-style audio analyzer
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy import signal

class Y2KAudioAnalyzer:
    def __init__(self, filename):
        self.sample_rate, self.data = wavfile.read(filename)
        if len(self.data.shape) > 1:
            self.data = self.data[:, 0]  # Take first channel
        
    def generate_spectrogram(self):
        """Create Y2K-style spectrogram visualization"""
        frequencies, times, spectrogram = signal.spectrogram(
            self.data,
            self.sample_rate,
            window='hann',
            nperseg=1024,
            noverlap=512,
            scaling='spectrum'
        )
        
        # Apply Y2K color mapping
        fig, ax = plt.subplots(figsize=(12, 6))
        cmap = plt.cm.get_cmap('cool')  # Y2K color palette
        
        # Plot with Y2K aesthetics
        im = ax.pcolormesh(times, frequencies, 10 * np.log10(spectrogram),
                          cmap=cmap, shading='gouraud')
        
        ax.set_title('Y2K Spectrogram Analysis', fontsize=16, color='#ff00ff')
        ax.set_ylabel('Frequency [Hz]', color='#00ffff')
        ax.set_xlabel('Time [sec]', color='#00ffff')
        
        # Add grid with Y2K style
        ax.grid(True, alpha=0.3, linestyle='--', color='#ffff00')
        
        plt.tight_layout()
        return fig

GitHub Activity

47
Repositories
892
Commits
128
Stars
6
Languages