Exemplo n.º 1
0
        private void SetupGigatron(outDatum od)
        {
            Chip chip = null;

            if (Audio.chipRegister.Gigatron == null)
            {
                return;
            }
            if (od.linePos.chipIndex < Audio.chipRegister.Gigatron.Count)
            {
                chip = Audio.chipRegister.Gigatron[od.linePos.chipNumber];
            }
            if (chip == null && od.linePos.chipIndex >= 0x80)
            {
                Driver.ZGM.ZgmChip.ZgmChip zChip = Audio.chipRegister.dicChipCmdNo[od.linePos.chipIndex];
                chip = Audio.chipRegister.Gigatron[zChip.Index];
            }
            Gigatron gigatron = new Gigatron(chip, setting, midiKbd);

            gigatron.isTrace = isTrace;

            Gigatron.Add(gigatron);
            dicInstAdd(gigatron, od.linePos.chipIndex, od.linePos.chipNumber);
            instsAdd(gigatron, od.linePos.chipIndex, od.linePos.chipNumber);
        }
Exemplo n.º 2
0
        public static Instrument SetupInstInfo(outDatum od, ref SoundManager.Chip chip, Setting setting, bool isTrace, MIDIKbd midiKbd)
        {
            if (Audio.chipRegister == null || Audio.chipRegister.Gigatron == null)
            {
                return(null);
            }

            if (od.linePos.chipIndex < Audio.chipRegister.Gigatron.Count)
            {
                chip = Audio.chipRegister.Gigatron[od.linePos.chipIndex];
            }

            if (chip == null && od.linePos.chipIndex >= 0x80)
            {
                Driver.ZGM.ZgmChip.ZgmChip zChip = Audio.chipRegister.dicChipCmdNo[od.linePos.chipIndex];
                chip = Audio.chipRegister.Gigatron[zChip.Index];
            }

            Gigatron gigatron = new Gigatron(chip, setting, midiKbd);

            gigatron.isTrace = isTrace;

            return(gigatron);
        }