コード例 #1
0
ファイル: VocalSampler.cs プロジェクト: TheBerkin/Sagen
        public VocalSampler(Synthesizer synth, Phoneme vowel)
            : base(synth)
        {
            bands = new[]
            {
                // open-mid back unrounded vowel
                //new BandPassFilter(2600, 2700, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(1170, 1170, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(600, 600, synth.SampleRate, LowResonance, LowResonance) {Volume = LEVEL_F1},

                // open-mid front unrounded vowel
                new BandPassFilter(3500, 3600, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F4},
                new BandPassFilter(2600, 2700, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                new BandPassFilter(1800, 1900, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                new BandPassFilter(650, 800, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F1},

                // close front rounded vowel
                //new BandPassFilter(3200, 3300, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F4},
                //new BandPassFilter(2100, 2200, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(1800, 1900, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(200, 300, synth.SampleRate, LowResonance, LowResonance) {Volume = LEVEL_F1},

                // near-open front unrounded vowel
                //new BandPassFilter(2900, 3000, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(1700, 1800, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(800, 900, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F1},

                // postalveolar approximant
                //new BandPassFilter(3000, 3000, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(1400, 1400, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(350, 350, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F1},

                // close-mid front unrounded vowel
                //new BandPassFilter(3600, 3700, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F4},
                //new BandPassFilter(2500, 2600, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(2200, 2300, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(450, 500, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F1},

                // close front unrounded vowel
                //new BandPassFilter(3000, 3000, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F3},
                //new BandPassFilter(2250, 2250, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F2},
                //new BandPassFilter(250, 250, synth.SampleRate, HighResonance, HighResonance) {Volume = LEVEL_F1},

                // voiceless palatal-alveolar sibilant fricative
                //new BandPassFilter(200, 1200, synth.SampleRate, 1.0f, 1.0f) { Volume = 0.075f },
                //new BandPassFilter(1900, 5500, synth.SampleRate, .35f, .35f) { Volume = 0.01f },
                //new BandPassFilter(2100, 2500, synth.SampleRate, .2f, .2f) { Volume = 0.1f },
                //new BandPassFilter(3700, 4100, synth.SampleRate, .2f, .2f) { Volume = 0.050f },
                //new BandPassFilter(4600, 5400, synth.SampleRate, .18f, .18f) { Volume = 0.060f },
                //new BandPassFilter(6700, 7200, synth.SampleRate, .1f, .1f) { Volume = 0.0060f },
            };

            lowPass = new ButterworthFilter(500, synth.SampleRate, PassFilterType.LowPass, .1f);
            highPass = new ButterworthFilter(6000, synth.SampleRate, PassFilterType.HighPass, .4f);

            numBands = bands.Length;
        }
コード例 #2
0
ファイル: Phoneme.Presets.cs プロジェクト: TheBerkin/Sagen
 private static void Vowel(string ipa, string xsampa, float openness, float backness, float roundedness)
 {
     var vowel = new Phoneme(openness, backness, roundedness);
     _presetsIPA[ipa] = vowel;
     _presetsXSAMPA[xsampa] = vowel;
 }
コード例 #3
0
ファイル: Phoneme.Presets.cs プロジェクト: TheBerkin/Sagen
 private static void Consonant(string ipa, string xsampa, ArticulationPlace place, ArticulationManner type, bool voiced)
 {
     var consonant = new Phoneme(place, type, voiced);
     _presetsIPA[ipa] = consonant;
     _presetsXSAMPA[xsampa] = consonant;
 }