Example #1
0
        //protected float[] panTable = new float[4] { 1.0f, 0.5012f, 0.2512f, 0.1000f };

        public ADPCMA(int num, reverb reverb, distortion distortion, chorus chorus, effect.HPFLPF hpflpf, effect.ReversePhase reversePhase, effect.Compressor compressor, int revStartCh)
        {
            this.num          = num;
            this.reversePhase = reversePhase;
            this.reverb       = reverb;
            this.distortion   = distortion;
            this.chorus       = chorus;
            this.hpflpf       = hpflpf;
            this.compressor   = compressor;

            this.revStartCh = revStartCh;
            this.buf        = null;
            this.size       = 0;
            for (int i = 0; i < 6; i++)
            {
                channel[i].panL   = 1.0f;
                channel[i].panR   = 1.0f;
                channel[i].level  = 0;
                channel[i].volume = 0;
                channel[i].pos    = 0;
                channel[i].step   = 0;
                channel[i].volume = 0;
                channel[i].start  = 0;
                channel[i].stop   = 0;
                channel[i].adpcmx = 0;
                channel[i].adpcmd = 0;
            }
            this.tl   = 0;
            this.key  = 0;
            this.tvol = 0;

            InitADPCMATable();
        }
Example #2
0
 public Rhythm(int num, reverb reverb, distortion distortion, chorus chorus, effect.HPFLPF hpflpf, effect.ReversePhase reversePhase, effect.Compressor compressor, int efcCh)
 {
     this.reverb       = reverb;
     this.distortion   = distortion;
     this.chorus       = chorus;
     this.hpflpf       = hpflpf;
     this.efcCh        = efcCh;
     this.reversePhase = reversePhase;
     this.compressor   = compressor;
     this.num          = num;
 }
Example #3
0
 public PSG2(int num, reverb reverb, distortion distortion, chorus chorus, effect.HPFLPF hpflpf, effect.ReversePhase reversePhase, effect.Compressor compressor, int efcStartCh)
 {
     this.num          = num;
     this.reverb       = reverb;
     this.distortion   = distortion;
     this.chorus       = chorus;
     this.hpflpf       = hpflpf;
     this.reversePhase = reversePhase;
     this.compressor   = compressor;
     this.efcStartCh   = efcStartCh;
     makeTblGetSample();
 }
Example #4
0
        public FM6(int n, reverb reverb, distortion distortion, chorus chorus, effect.HPFLPF hpflpf, effect.ReversePhase reversePhase, effect.Compressor compressor, int efcStartCh, Dictionary <int, uint[]> dicOpeWav)
        {
            this.num          = n;
            this.reverb       = reverb;
            this.distortion   = distortion;
            this.chorus       = chorus;
            this.hpflpf       = hpflpf;
            this.reversePhase = reversePhase;
            this.efcStartCh   = efcStartCh;
            this.compressor   = compressor;
            this.dicOpeWav    = dicOpeWav;

            chip = new fmvgen.Chip();

            for (int i = 0; i < 6; i++)
            {
                ch[i] = new fmvgen.Channel4(i + n * 6);
                ch[i].SetChip(chip);
                ch[i].SetType(fmvgen.OpType.typeN);
            }

            csmch = ch[2];
        }
Example #5
0
        // ---------------------------------------------------------------------------
        //	構築
        //
        public OPNA2(reverb reverb, distortion distortion, chorus chorus, effect.eq3band ep3band, effect.HPFLPF hpflpf, effect.ReversePhase reversePhase, effect.Compressor compressor)
        {
            this.reverb       = reverb;
            this.distortion   = distortion;
            this.chorus       = chorus;
            this.ep3band      = ep3band;
            this.hpflpf       = hpflpf;
            this.reversePhase = reversePhase;
            this.compressor   = compressor;

            fm6 = new FM6[2] {
                new FM6(0, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 0, dicOpeWav),
                new FM6(1, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 6, dicOpeWav)
            };
            psg2 = new PSG2[4] {
                new PSG2(0, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 12),
                new PSG2(1, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 15),
                new PSG2(2, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 18),
                new PSG2(3, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 21)
            };
            adpcmb = new ADPCMB[3] {
                new ADPCMB(0, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 24),
                new ADPCMB(1, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 25),
                new ADPCMB(2, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 26)
            };
            rhythm = new Rhythm[6] {
                new Rhythm(0, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 27),
                new Rhythm(1, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 28),
                new Rhythm(2, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 29),
                new Rhythm(3, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 30),
                new Rhythm(4, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 31),
                new Rhythm(5, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 32)
            };
            adpcma = new ADPCMA(0, reverb, distortion, chorus, hpflpf, reversePhase, compressor, 33);

            for (int i = 0; i < 6; i++)
            {
                rhythm[i].sample = null;
                rhythm[i].pos    = 0;
                rhythm[i].size   = 0;
                rhythm[i].volume = 0;
            }
            rhythmtvol = 0;

            for (int i = 0; i < 2; i++)
            {
                fm6[i].parent = this;
            }

            for (int i = 0; i < 3; i++)
            {
                adpcmb[i].adpcmmask   = (uint)((i == 0) ? 0x3ffff : 0xffffff);
                adpcmb[i].adpcmnotice = 4;
                adpcmb[i].deltan      = 256;
                adpcmb[i].adpcmvol    = 0;
                adpcmb[i].control2    = 0;
                adpcmb[i].shiftBit    = (i == 0) ? 6 : 9;
                adpcmb[i].parent      = this;
            }

            csmch = ch[2];
        }