joyeux noel kin

chant kin

Log in to post a comment.

// "We Wish You a Merry Christmas" - Version complète authentique
// Durée: 1 minute 30 secondes - Tous les couplets traditionnels

ditty.bpm = 110; // Tempo traditionnel modéré

// Synthé principal pour les cloches
const bells = synth.def((phase, env, options) => {
    const fundamental = Math.sin(phase * Math.PI * 2);
    const harmonic2 = Math.sin(phase * Math.PI * 4) * 0.3;
    const harmonic3 = Math.sin(phase * Math.PI * 6) * 0.15;
    const harmonic5 = Math.sin(phase * Math.PI * 10) * 0.08;
    return (fundamental + harmonic2 + harmonic3 + harmonic5) * env.value * 0.55;
});

// Harmonie vocale
const harmony = synth.def((phase, env) => {
    const osc1 = Math.sin(phase * Math.PI * 2);
    const osc2 = Math.sin(phase * Math.PI * 2.01) * 0.8; // Légère désaccordage
    return (osc1 + osc2) * 0.5 * env.value * 0.25;
});

// Basse festive
const bass = synth.def((phase, env) => {
    const sine = Math.sin(phase * Math.PI * 2);
    const sub = Math.sin(phase * Math.PI) * 0.3;
    return (sine + sub) * env.value * 0.5;
});

// Cloches hautes pour l'ornementation
const chimes = synth.def((phase, env) => {
    return Math.sin(phase * Math.PI * 2) * Math.sin(phase * Math.PI * 8) * env.value * 0.3;
});

// Filtre passe-bas
const lpf = filter.def(class {
    constructor(options) {
        this.l = 0;
        this.r = 0;
    }
    process(input, options) {
        this.l += (input[0] - this.l) * options.cutoff;
        this.r += (input[1] - this.r) * options.cutoff;
        return [this.l, this.r];
    }
}, { cutoff: 0.28 });

// Réverbération spacieuse
const reverb = filter.def(class {
    constructor() {
        this.buffer = new Array(16000).fill(0);
        this.index = 0;
    }
    process(input, options) {
        const delayed = this.buffer[this.index];
        this.buffer[this.index] = input[0] + delayed * options.feedback;
        this.index = (this.index + 1) % this.buffer.length;
        return [
            input[0] + delayed * options.mix,
            input[1] + delayed * options.mix
        ];
    }
}, { feedback: 0.48, mix: 0.42 });

// MÉLODIE PRINCIPALE - VERSION COMPLÈTE
loop(() => {
    // ========== INTRODUCTION (4 mesures) ==========
    bells.play(g4, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    bells.play(d5, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    bells.play(b4, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    bells.play(g4, { attack: 0.02, release: 0.4, duration: 0.5 });
    sleep(0.5);
    
    // ========== COUPLET 1: "We wish you a merry Christmas" ==========
    // Mesure 1: We wish you a mer-ry
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    // Mesure 2: Christ-mas
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    // Mesure 3: We wish you a mer-ry
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    // Mesure 4: Christ-mas
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    // Mesure 5: We wish you a mer-ry
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(b4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(c5, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    // Mesure 6: Christ-mas
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    // Mesure 7-8: And a hap-py new year
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.5, duration: 0.33 });
    sleep(0.33);
    
    // ========== REFRAIN 1: "Good tidings we bring" ==========
    // Mesure 9-10: Good ti-dings we bring
    bells.play(d5, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(d5, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(d5, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(c5, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    
    // Mesure 11-12: To you and your kin
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    
    // Mesure 13-14: Good ti-dings for Christ-mas
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    bells.play(d5, { attack: 0.02, release: 0.25, duration: 0.5 });
    sleep(0.5);
    
    bells.play(c5, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    // Mesure 15-16: And a hap-py new year
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.6, duration: 0.33 });
    sleep(0.66);
    
    // ========== COUPLET 2: "Now bring us some figgy pudding" ==========
    // Répétition de la mélodie avec variations dynamiques
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(fs4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(b4, { attack: 0.02, release: 0.18, duration: 0.17 });
    sleep(0.17);
    bells.play(c5, { attack: 0.02, release: 0.25, duration: 0.17 });
    sleep(0.17);
    
    bells.play(b4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(g4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(d4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    
    bells.play(e4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(a4, { attack: 0.02, release: 0.25, duration: 0.33 });
    sleep(0.33);
    bells.play(fs4, { attack: 0.02, release: 0.5, duration: 0.33 });
    sleep(0.66);
    
    // ========== FINALE GRANDIOSE ==========
    bells.play(d5, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    bells.play(d5, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    bells.play(d5, { attack: 0.02, release: 0.3, duration: 0.5 });
    sleep(0.5);
    
    bells.play(c5, { attack: 0.02, release: 0.3, duration: 0.66 });
    sleep(0.66);
    bells.play(b4, { attack: 0.02, release: 0.3, duration: 0.66 });
    sleep(0.66);
    
    bells.play(g4, { attack: 0.02, release: 0.4, duration: 0.66 });
    sleep(0.66);
    bells.play(d5, { attack: 0.02, release: 0.4, duration: 0.66 });
    sleep(0.66);
    
    bells.play(c5, { attack: 0.02, release: 0.4, duration: 0.5 });
    sleep(0.5);
    bells.play(b4, { attack: 0.02, release: 0.4, duration: 0.5 });
    sleep(0.5);
    bells.play(a4, { attack: 0.02, release: 0.4, duration: 0.5 });
    sleep(0.5);
    
    bells.play(g4, { attack: 0.02, release: 2, duration: 2 });
    sleep(3);
    
}, { name: 'Mélodie Complète' }).connect(lpf.create()).connect(reverb.create());

// HARMONIES VOCALES
loop(() => {
    sleep(2); // Attendre l'intro
    
    for (let verse = 0; verse < 3; verse++) {
        // Accords pour chaque phrase
        harmony.play(g3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(b3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(d3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(fs3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(a3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(e3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(g3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(b3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(d3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(a3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(a3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(c4, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(d3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(fs3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(g3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(b3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
        
        harmony.play(d3, { attack: 0.15, release: 0.85, duration: 1 });
        harmony.play(a3, { attack: 0.15, release: 0.85, duration: 1 });
        sleep(1);
    }
    
    // Accords finale
    harmony.play(g2, { attack: 0.1, release: 2.5, duration: 2 });
    harmony.play(b2, { attack: 0.1, release: 2.5, duration: 2 });
    harmony.play(d3, { attack: 0.1, release: 2.5, duration: 2 });
    harmony.play(g3, { attack: 0.1, release: 2.5, duration: 2 });
    sleep(3);
    
}, { name: 'Harmonies' }).connect(lpf.create());

// LIGNE DE BASSE
loop(() => {
    sleep(2);
    
    for (let verse = 0; verse < 3; verse++) {
        bass.play(g2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(d2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(e2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(d2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(a2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(d2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(g2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
        bass.play(d2, { attack: 0.01, release: 0.45, duration: 1 });
        sleep(1);
    }
    
    bass.play(g1, { attack: 0.01, release: 2.5, duration: 2 });
    sleep(3);
    
}, { name: 'Basse' }).connect(lpf.create());

// ORNEMENTATIONS - Cloches hautes
loop(() => {
    sleep(4);
    
    for (let i = 0; i < 45; i++) {
        if (i % 4 === 0) {
            chimes.play(g5, { attack: 0.001, release: 0.15, duration: 0.1 });
        }
        sleep(0.5);
    }
    
}, { name: 'Cloches ornementales' }).connect(lpf.create()).connect(reverb.create());