コード例 #1
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
        public void GetMapAttr()
        {
            try
            {
                Cartographer map = new Cartographer(cwd + @"\mapping");

                /*Cartographer map = new Cartographer();
                 * map.Convert(cwd + @"\mapping");
                 * map.Load(cwd + @"\mapping");*/
                string         mapattrJSON = File.ReadAllText(cwd + @"\mapping\mapAttr.json");
                List <MapAttr> mapPoints   = JsonConvert.DeserializeObject <List <MapAttr> >(mapattrJSON);

                for (var i = 0; i < mapPoints.Count; i++)
                {
                    var x          = mapPoints[i].X;
                    var y          = mapPoints[i].Y;
                    var mp         = map.GetPoint(x, y);
                    var attr_index = mp.Attr_Index;
                    var attr       = map.GetMapAttr(attr_index);
                    Assert.AreEqual(attr, mapPoints[i]);
                }
            }
            catch (Exception e)
            {
                Assert.Fail("Should not crash: {0}", e.ToString());
            }
        }
コード例 #2
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
        public void LoadsCorrectly()
        {
            try
            {
                Cartographer cart = new Cartographer(cwd + @"\mapping");

                List <string> rawmap = File.ReadAllLines(cwd + @"\mapping\map.csv").ToList();

                for (int y = 0; y < rawmap.Count(); y++)
                {
                    //break up line
                    List <string> valuesList = rawmap[y].Split(',').ToList();

                    for (int x = 0; x < valuesList.Count(); x++)
                    {
                        //convert value to ushort, then create MapPoint
                        Assert.AreEqual(Convert.ToInt32(valuesList[x]),
                                        cart.GetPoint(x, y).GetOccupancy());
                    }
                }
            }
            catch (Exception e)
            {
                Assert.Fail("Should not crash: {0}", e.ToString());
            }
        }
コード例 #3
0
ファイル: cartographer.cs プロジェクト: justi1jc/FPS
    public static MapRecord GetMap(int n, int m)
    {
        Cartographer cart = new Cartographer(n, m);

        cart.GenerateMap();
        return(cart.derived);
    }
コード例 #4
0
ファイル: cartographer.cs プロジェクト: justi1jc/FPS
 /* Constructor for map generation. */
 public Cartographer(int n, int m)
 {
     this.master = Cartographer.GetMaster();
     this.n      = n;
     this.m      = m;
     rand        = new System.Random();
 }
コード例 #5
0
        /// <summary>
        /// The center room of the specific zindex plane. TODO: Not sure if this should be a thing
        /// </summary>
        /// <param name="zIndex">The Z plane to find the central room for</param>
        /// <returns>The central room</returns>
        public IRoom CentralRoom(int zIndex = -1)
        {
            if (Interior == null)
            {
                return(Rooms().FirstOrDefault());
            }

            return(Cartographer.FindCenterOfMap(Interior.CoordinatePlane, zIndex));
        }
コード例 #6
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
 public void LoadDoesntCrash()
 {
     try {
         Cartographer cart = new Cartographer();
         cart.Load(@"./");
     } catch (Exception e) {
         Assert.Fail("Should not crash: {0}", e.ToString());
     }
 }
コード例 #7
0
 static void Main(string[] args)
 {
     PrintWelcome();
     Surveyor Surveyor = new Surveyor();
     Cartographer Cartographer = new Cartographer(Surveyor, 2000, 2000);
     Surveyor.ProcessTopSubReddits(5);
     Cartographer.DrawMap();
     Console.WriteLine("Execution Finished. Press ENTER to quit!");
     Console.ReadLine();
 }
コード例 #8
0
ファイル: World.cs プロジェクト: justi1jc/FPS
    /* Creates a new adventure. */
    public void CreateAdventure()
    {
        name = "game";
        map  = Cartographer.GetMap(5, 5);
        MonoBehaviour.print(map.ToString());
        DeployHoloDeck();
        Building b = map.buildings[0];

        decks[0].LoadRoom(b.id, b.rooms[0].name, 0, false);
        decks[0].AddPlayer("player1");
    }
コード例 #9
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
 public void ConvertDoesntCrash()
 {
     File.Delete(cwd + @"\mapping\mapping.json");
     try
     {
         Cartographer cart = new Cartographer();
         cart.Convert(cwd + @"\mapping");
     }
     catch (Exception e)
     {
         Assert.Fail("Should not crash: {0}", e.ToString());
     }
 }
コード例 #10
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
 public void CanGenerateBMP()
 {
     try {
         Cartographer    map       = new Cartographer(cwd + @"\mapping");
         WriteableBitmap mapBitmap = map.Render();
         using (FileStream stream5 = new FileStream(cwd + @"\mapping\map.png", FileMode.OpenOrCreate)) {
             PngBitmapEncoder encoder5 = new PngBitmapEncoder();
             encoder5.Frames.Add(BitmapFrame.Create(mapBitmap));
             encoder5.Save(stream5);
             stream5.Close();
         }
     } catch (Exception e) {
         Assert.Fail("Should not crash: {0}", e.ToString());
     }
 }
コード例 #11
0
ファイル: MapPanelController.cs プロジェクト: XCVG/quattro
        private void DrawIcon(Vector3 worldPos, Sprite icon, Cartographer c, string mouseOverText)
        {
            GameObject go = DrawIcon(c.NormalizeWorldPosition(worldPos), icon);

            if (!string.IsNullOrEmpty(mouseOverText))
            {
                var et = go.AddComponent <EventTrigger>();

                EventTrigger.Entry enterEntry = new EventTrigger.Entry();
                enterEntry.eventID = EventTriggerType.PointerEnter;
                enterEntry.callback.AddListener((data) => SetMarkerText(mouseOverText));
                et.triggers.Add(enterEntry);

                EventTrigger.Entry exitEntry = new EventTrigger.Entry();
                exitEntry.eventID = EventTriggerType.PointerExit;
                exitEntry.callback.AddListener((data) => ClearMarkerText());
                et.triggers.Add(exitEntry);
            }
        }
コード例 #12
0
ファイル: Overworld.cs プロジェクト: Rn4rc1s0/FPS_Project
    /* Asks the cartographer to make a new world */
    public void InitWorld()
    {
        if (Session.session.adventureSettings != null &&
            Session.session.adventureSettings.load)
        {
            AdventureDb   db  = new AdventureDb(saveFile);
            OverworldData dat = db.LoadData();

            actorsData = dat.actorsData;
            itemsData  = dat.itemsData;
            return;
        }

        Cartographer cart = new Cartographer();

        cart.GenerateWorld(this);
        cellsData  = cart.cells;
        itemsData  = cart.items;
        actorsData = cart.actors;
    }
コード例 #13
0
ファイル: MapPanelController.cs プロジェクト: XCVG/quattro
        public override void SignalPaint()
        {
            ClearPanel();

            //grab map name from string tables
            string sceneName   = SceneManager.GetActiveScene().name;
            string realMapName = StringSub.Sub.Replace(sceneName, "MAPS");

            TitleText.text = realMapName;

            //get cartographer
            Cartographer cartographer = Cartographer.Current;

            if (cartographer == null)
            {
                Debug.LogWarning("No cartographer exists!");
                ClearPanel();
                return;
            }

            //push map
            MapImage.texture = cartographer.MapTexture;

            //scale image
            if (MapImage.texture != null)
            {
                float ratio     = (float)MapImage.texture.height / (float)MapImage.texture.width;
                float newHeight = ratio * MapImage.rectTransform.rect.width;
                MapImage.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, newHeight);
                MapImage.rectTransform.ForceUpdateRectTransforms();
            }

            //draw player if applicable
            if (cartographer.ShowPlayer)
            {
                DrawIcon(WorldUtils.GetPlayerObject().transform.position, PlayerIcon, cartographer, GameState.Instance?.PlayerRpgState?.DisplayName);
            }

            DrawMarkers(cartographer);
        }
コード例 #14
0
ファイル: Convert.cs プロジェクト: justin-hubbard/Capstone
        public void GetPOI()
        {
            try {
                Cartographer map = new Cartographer(cwd + @"\mapping");

                /*Cartographer map = new Cartographer();
                 * map.Convert(cwd + @"\mapping");
                 * map.Load(cwd + @"\mapping");*/
                string poiJSON = File.ReadAllText(cwd + @"\mapping\poi.json");
                List <PointOfInterest> POIs = JsonConvert.DeserializeObject <List <PointOfInterest> >(poiJSON);

                for (var i = 0; i < POIs.Count; i++)
                {
                    var x         = POIs[i].X;
                    var y         = POIs[i].Y;
                    var poi_index = map.GetPoint(x, y).POI_Index;
                    var poi       = map.GetPointOfInterest(poi_index);
                    Assert.AreEqual(poi, POIs[i]);
                }
            } catch (Exception e) {
                Assert.Fail("Should not crash: {0}", e.ToString());
            }
        }
コード例 #15
0
        public override void Run()
        {
            _run     = true;
            _editing = true;

            while (_run)
            {
                _editor.AddSites = false;
                _editor.Reset();
                _editor.Draw();
                _editor.Run();

                _editing = false;

                _renderSet.Clear();

                if (_editor.Finalised)
                {
                    Cartographer <Node> cartographer = new Cartographer <Node>();
                    cartographer.GetCartogram(_grid.Nodes);

                    _inputs.InputReceived += OnInput;

                    while (_editing != true)
                    {
                        _inputs.ListenForInputs();
                    }

                    _inputs.InputReceived -= OnInput;
                }
                else
                {
                    _run = false;
                }
            }
            _launcher.Reset();
        }
コード例 #16
0
ファイル: MapPanelController.cs プロジェクト: XCVG/quattro
        private void DrawMarkers(Cartographer c)
        {
            if (c == null || c.Markers == null || c.Markers.Length < 1)
            {
                return;
            }

            Dictionary <string, MapMarkerState> markersData = GameState.Instance.MapMarkers;

            foreach (EditorMapMarker emm in c.Markers)
            {
                if (string.IsNullOrEmpty(emm.Id) && !emm.ForceShow)
                {
                    continue;
                }

                MapMarkerState state = emm.ForceShow ? MapMarkerState.Known : markersData.GetOrDefault(emm.Id, MapMarkerState.Unknown);

                if (state != MapMarkerState.Unknown)
                {
                    DrawIcon(emm.WorldPoint, GetMarkerSprite(emm.IconOverride, state), c, emm.NiceName);
                }
            }
        }
コード例 #17
0
ファイル: Program.cs プロジェクト: justin-hubbard/Capstone
        static void Main()
        {
            //change the test file xml here and make sure it is in bin.
            string startingXMLFile = "ETRL_03_07.xml";
            //string startingXMLFile = "FloorPlanTest.xml";
            //string startingOpenFile = "Sloan46_FINAL.xml";
            double compassToMapOffset = 72.0;

            // List of all the objects we'll be initializing.
            // Default to null, as some of them will only
            // be initialized conditionally e.g.
            // vehicle is only initialized if
            // there is a vehicle connected.
            SerialPort        sp               = null;
            IVehicle          vehicle          = null;
            IImageStream      depthStream      = null;
            IImageStream      videoStream      = null;
            IObstacleDetector obstacleDetector = null;
            ICartographer     cartographer     = null;
            IOdometer         odometer         = null;
            IInputDevice      input            = KeyboardInput.Instance;
            ObstacleMap       obstacleMap      = null;
            INavigator        navigator        = null;
            MainWindow        mainWindow       = null;

            Driver.Driver            driver           = null;
            VisualInputGridPresenter uiInputPresenter = null;
            ObstacleGridPresenter    uiGridPresenter  = null;
            PositioningSystem        ips             = null;
            OverlayRenderer          overlayRenderer = null;
            SensorArray       sensorArray            = null;
            Pose              pose              = null;
            IDoorDetector     doorDetector      = null;
            ObstacleLocalizer obstacleLocalizer = null;
            SonarDetector     sonarDetector     = null;

            Config.Initialize();

            Devices.Initialize();
            //string wheelchair_com_port = Devices.IsWheelchairConnected();
            string wheelchair_com_port = "COM3";//Devices.FindComPort("Arduino Uno");
            bool   WheelChairConnected = false;

            if (wheelchair_com_port != "")
            {
                WheelChairConnected = true;
            }
            //bool WheelChairConnected = true;
            bool EyeTribeConnected   = true; // Devices.IsEyeTribeConnected();
            bool ControllerConnected = true; //Devices.IsControllerConnected();
            bool KinectConnected     = true; //Devices.IsKinectConnected();

            //Console.WriteLine("Kinect Connected: {0}", KinectConnected.ToString());
            //Console.WriteLine("Eyetribe Connected: {0}", EyeTribeConnected.ToString());
            //Console.WriteLine("Wheelchair Connected: {0}", WheelChairConnected.ToString());
            //Console.WriteLine("Controller Connected: {0}", ControllerConnected.ToString());

            // Initialize vehicle and serial connection if
            // there is a vehicle connected.

            if (WheelChairConnected)
            {
                //sp = new SerialPort(wheelchair_com_port, 9600);
                vehicle = Wheelchair.Instance(wheelchair_com_port);
                vehicle.initializeOffset(Properties.Settings.Default.CalibrationOffset);
            }
            else
            {
                vehicle = new MockVehicle();

                MockVehicleWindow mockDisplay = new MockVehicleWindow((MockVehicle)vehicle);
                mockDisplay.Show();
            }

            //initalize IPS here

            IByteReader sensorReader = null;

            try
            {
                //sensorReader = new SerialByteReader("Arduino Mega");
                sensorReader = new SerialByteReader("COM4");
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            if (sensorReader != null)
            {
                ILogger logger = new NullLogger();
                sensorArray   = new SensorArray(sensorReader, logger);
                sonarDetector = new SonarDetector();
            }
            else
            {
                sensorReader = new NullByteReader();

                ILogger logger = new NullLogger();
                sensorArray = new SensorArray(sensorReader, logger);
            }

            IByteReader byteReader = null;

            try
            {
                //byteReader = new SerialByteReader(Devices.FindComPort("STMicroelectronics"));
                byteReader = new SerialByteReader("COM3");
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            if (byteReader != null)
            {
                ILogger logger = new NullLogger();
                ips = new MarvelMind(byteReader, logger);
            }
            else
            {
                //Setup Mock IPS

                //IByteReader mockByteReader = new FileByteReader(@"C:\Users\Dana\Documents\Visual Studio 2013\Projects\UITests\UITests\Mock_IPS_Data.txt");
                //IByteReader mockByteReader = new XLineFixedYByteReader(800, 100, 200);
                IByteReader mockByteReader = new RandomByteReader(300, 299);
                ILogger     mockLogger     = new NullLogger();
                ips = new MarvelMind(mockByteReader, mockLogger);
            }

            //wait for an iteration of the IPS system that way
            //we can get the starting location
            while (false == ips.XUpdated && false == ips.YUpdated)
            {
                continue;
            }

            //Tuple<double, double> t = new Tuple<double, double>((double)ips.X, (double)ips.Y);
            Tuple <double, double> t    = new Tuple <double, double>((double)ips.Y, (double)ips.X);
            mPoint startingLocationInXY = new mPoint(t);

            // UI, input, object detection, navigation, and driver are initialized always,
            // as they are not directly dependent on external hardware.
            obstacleMap = new ObstacleMap();
            //cartographer = new Cartographer(Directory.GetCurrentDirectory() + @"\FloorPlanTest.xml", ips);

            // might need to be changed later. If the location is not in the starting room. add staring room.
            //cartographer = new Cartographer(Directory.GetCurrentDirectory() + @"\FloorPlanTest.xml", startingLocationInXY);

            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "XML | *.xml";
            ofd.Title  = "Open Map";
            if (ofd.ShowDialog() == true)
            {
                startingXMLFile = ofd.FileName;
                Console.WriteLine(startingXMLFile);
            }

            cartographer = new Cartographer(startingXMLFile, startingLocationInXY);
            pose         = new Pose(ips, cartographer.GetStartingRoom(), sensorArray.CompassDevice, compassToMapOffset);

            overlayRenderer = new OverlayRenderer();

            if (KinectConnected)
            {
                depthStream = DepthStream.Instance;
                videoStream = VideoStream.Instance;

                // Initialize depthstream if kinect is connected.
                obstacleDetector = new ObstacleDetector(depthStream, false);
                obstacleDetector.Start();

                obstacleLocalizer = new ObstacleLocalizer(pose);

                ObstaclesOverlay obstaclesOverlay = new ObstaclesOverlay(obstacleDetector);
                overlayRenderer.Overlays.Add(obstaclesOverlay);

                doorDetector = new DepthBasedDoorDetector();
                doorDetector.RunAsync(depthStream);

                try
                {
                    sonarDetector.RunAsync(sensorArray);
                }
                catch (Exception e)
                {
                }
            }

            // Obstacle detector and driver are only run
            // if both the vehicle and kinect are connected.
            if (vehicle != null && KinectConnected)
            {
                Vector startPoint    = new Vector(7 / 0.75f, 43 / 0.75f);
                Vector startRotation = new Vector(-7, -43);
                startRotation.Normalize();
                odometer = new Odometer();

                navigator = new Navigator(obstacleMap, obstacleDetector, obstacleLocalizer, cartographer, doorDetector, pose, sonarDetector, sensorArray);
                driver    = new Driver.Driver(input, vehicle, navigator);
                driver.Start();
            }

            mainWindow       = new MainWindow(pose, obstacleMap, cartographer, navigator, doorDetector, overlayRenderer, EyeTribeConnected, ControllerConnected, sensorArray);
            uiInputPresenter = new VisualInputGridPresenter(mainWindow.visualInputGrid);

            //This starts the program.
            Application app = new Application();

            app.ShutdownMode = ShutdownMode.OnMainWindowClose;
            app.MainWindow   = mainWindow;
            app.MainWindow.Show();
            app.Run();
        }
コード例 #18
0
        /// <summary>
        /// Regenerate the internal map for the locale; try not to do this often
        /// </summary>
        public void RemapInterior()
        {
            string[,,] returnMap = Cartographer.GenerateMapFromRoom(CentralRoom(), new HashSet <IRoom>(Rooms()), true);

            Interior = new LiveMap(returnMap, false);
        }
コード例 #19
0
        /// <summary>
        /// Reads the current block and converts the block type to the specific model type found in the model tag.
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="objectType"></param>
        /// <param name="existingValue"></param>
        /// <param name="serializer"></param>
        /// <returns></returns>
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            JObject jsonObject = JObject.Load(reader);
            Block   modelBlock;

            if (objectType == typeof(Block))
            {
                modelBlock = default(Block);
                string modelType = (string)jsonObject["@model"] ?? string.Empty;
                switch (modelType)
                {
                    #region Amp
                case ConstAmp.MODEL_ARCHETYPE_CLEAN:
                    modelBlock = new ArchetypeClean();
                    break;

                case ConstAmp.MODEL_ARCHETYPE_LEAD:
                    modelBlock = new ArchetypeLead();
                    break;

                case ConstAmp.MODEL_ANGL_METEOR:
                    modelBlock = new ANGLMeteor();
                    break;

                case ConstAmp.MODEL_GERMAN_MAHADEVA:
                    modelBlock = new GermanMahadeva();
                    break;

                case ConstAmp.MODEL_JAZZ_RIVET_120:
                    modelBlock = new JazzRivet120();
                    break;

                case ConstAmp.MODEL_US_SMALL_TWEED:
                    modelBlock = new USSmallTweed();
                    break;

                case ConstAmp.MODEL_GERMAN_UBERSONIC:
                    modelBlock = new GermanUbersonic();
                    break;

                case ConstAmp.MODEL_MATCHSTICK_CH1:
                    modelBlock = new MatchstickCh1();
                    break;

                case ConstAmp.MODEL_MATCHSTICK_CH2:
                    modelBlock = new MatchstickCh2();
                    break;

                case ConstAmp.MODEL_MATCHSTICK_JUMP:
                    modelBlock = new MatchstickJump();
                    break;

                case ConstAmp.MODEL_ESSEX_A15:
                    modelBlock = new EssexA15();
                    break;

                case ConstAmp.MODEL_ESSEX_A30:
                    modelBlock = new EssexA30();
                    break;

                case ConstAmp.MODEL_WHO_WATT_100:
                    modelBlock = new WhoWatt100();
                    break;

                case ConstAmp.MODEL_SOUP_PRO:
                    modelBlock = new SoupPro();
                    break;

                case ConstAmp.MODEL_STONE_AGE_185:
                    modelBlock = new StoneAge185();
                    break;

                case ConstAmp.MODEL_VOLTAGE_QUEEN:
                    modelBlock = new VoltageQueen();
                    break;

                case ConstAmp.DISP_TWEED_BLUES_NRM:
                    modelBlock = new TweedBluesNrm();
                    break;

                case ConstAmp.MODEL_TWEED_BLUES_BRT:
                    modelBlock = new TweedBluesBrt();
                    break;

                case ConstAmp.MODEL_US_DELUXE_NRM:
                    modelBlock = new USDeluxeNrm();
                    break;

                case ConstAmp.MODEL_US_DELUXE_VIB:
                    modelBlock = new USDeluxeVib();
                    break;

                case ConstAmp.MODEL_US_DOUBLE_NRM:
                    modelBlock = new USDoubleNrm();
                    break;

                case ConstAmp.MODEL_US_DOUBLE_VIB:
                    modelBlock = new USDoubleVib();
                    break;

                case ConstAmp.MODEL_MAIL_ORDER_TWIN:
                    modelBlock = new MailOrderTwin();
                    break;

                case ConstAmp.MODEL_DIVIDED_DUO:
                    modelBlock = new DividedDuo();
                    break;

                case ConstAmp.MODEL_INTERSTATE_ZED:
                    modelBlock = new InterstateZed();
                    break;

                case ConstAmp.MODEL_DERAILED_INGRID:
                    modelBlock = new DerailedIngrid();
                    break;

                case ConstAmp.MODEL_MANDARIN_80:
                    modelBlock = new Mandarin80();
                    break;

                case ConstAmp.MODEL_CALI_RECTIFIRE:
                    modelBlock = new CaliRectifire();
                    break;

                case ConstAmp.DISP_CALI_IV_LEAD:
                    modelBlock = new CaliIVLead();
                    break;

                case ConstAmp.MODEL_CALI_IV_R1:
                    modelBlock = new CaliIVR1();
                    break;

                case ConstAmp.MODEL_CALI_IV_R2:
                    modelBlock = new CaliIVR2();
                    break;

                case ConstAmp.MODEL_CALI_TEXAS_CH1:
                    modelBlock = new CaliTexasCh1();
                    break;

                case ConstAmp.MODEL_CALI_TEXAS_CH2:
                    modelBlock = new CaliTexasCh2();
                    break;

                case ConstAmp.MODEL_BRIT_PLEXI_BRT:
                    modelBlock = new BritPlexiBrt();
                    break;

                case ConstAmp.MODEL_BRIT_PLEXI_NRM:
                    modelBlock = new BritPlexiNrm();
                    break;

                case ConstAmp.MODEL_PLACATER_DIRTY:
                    modelBlock = new PlacaterDirty();
                    break;

                case ConstAmp.MODEL_PLACATER_CLEAN:
                    modelBlock = new PlacaterClean();
                    break;

                case ConstAmp.MODEL_BRIT_2204:
                    modelBlock = new Brit2204();
                    break;

                case ConstAmp.MODEL_BRIT_J45_NRM:
                    modelBlock = new BritJ45Nrm();
                    break;

                case ConstAmp.MODEL_BRIT_J45_BRT:
                    modelBlock = new BritJ45Brt();
                    break;

                case ConstAmp.MODEL_BRIT_PLEXI_JUMP:
                    modelBlock = new BritPlexiJump();
                    break;

                case ConstAmp.MODEL_BRIT_TREM_NRM:
                    modelBlock = new BritTremNrm();
                    break;

                case ConstAmp.MODEL_BRIT_TREM_BRT:
                    modelBlock = new BritTremBrt();
                    break;

                case ConstAmp.MODEL_BRIT_TREM_JUMP:
                    modelBlock = new BritTremJump();
                    break;

                case ConstAmp.MODEL_BRIT_P75_NRM:
                    modelBlock = new BritP75Nrm();
                    break;

                case ConstAmp.MODEL_BRIT_P75_BRT:
                    modelBlock = new BritPlexiBrt();
                    break;

                case ConstAmp.MODEL_SOLO_LEAD_CLEAN:
                    modelBlock = new SoloLeadClean();
                    break;

                case ConstAmp.MODEL_SOLO_LEAD_CRUNCH:
                    modelBlock = new SoloLeadCrunch();
                    break;

                case ConstAmp.MODEL_SOLO_LEAD_OD:
                    modelBlock = new SoloLeadOD();
                    break;

                case ConstAmp.MODEL_A30_FAWN_NRM:
                    modelBlock = new A30FawnNrm();
                    break;

                case ConstAmp.MODEL_A30_FAWN_BRT:
                    modelBlock = new A30FawnBrt();
                    break;

                case ConstAmp.MODEL_PV_PANAMA:
                    modelBlock = new PVPanama();
                    break;

                case ConstAmp.MODEL_CARTOGRAPHER:
                    modelBlock = new Cartographer();
                    break;

                case ConstAmp.MODEL_AGUA_51:
                    modelBlock = new Agua51();
                    break;

                case ConstAmp.MODEL_SV_BEAST_BRT:
                    modelBlock = new SVBeastBrt();
                    break;

                case ConstAmp.DISP_GCOUGAR_800:
                    modelBlock = new GCougar800();
                    break;

                case ConstAmp.DISP_DEL_SOL_300:
                    modelBlock = new DelSol300();
                    break;

                case ConstAmp.MODEL_LINE6_BADONK:
                    modelBlock = new Line6Badonk();
                    break;

                case ConstAmp.MODEL_LINE6_LITIGATOR:
                    modelBlock = new Line6Litigator();
                    break;

                case ConstAmp.MODEL_LINE6_FATALITY:
                    modelBlock = new Line6Fatality();
                    break;

                case ConstAmp.MODEL_LINE6_ELEKTRIK:
                    modelBlock = new Line6Elektrik();
                    break;

                case ConstAmp.MODEL_LINE6_DOOM:
                    modelBlock = new Line6Doom();
                    break;

                case ConstAmp.MODEL_LINE6_2204_MOD:
                    modelBlock = new Line62204Mod();
                    break;

                case ConstAmp.MODEL_LINE6_EPIC:
                    modelBlock = new Line6Epic();
                    break;

                case ConstAmp.MODEL_REVV_GEN_RED:
                    modelBlock = new RevvGenRed();
                    break;

                case ConstAmp.MODEL_FULLERTON_NRM:
                    modelBlock = new FullertonNrm();
                    break;

                case ConstAmp.MODEL_FULLERTON_BRT:
                    modelBlock = new FullertonBrt();
                    break;

                case ConstAmp.MODEL_FULLERTON_JUMP:
                    modelBlock = new FullertonJump();
                    break;

                case ConstAmp.MODEL_GRAMMATICO_NRM:
                    modelBlock = new GrammaticoNrm();
                    break;

                case ConstAmp.MODEL_GRAMMATICO_BRT:
                    modelBlock = new GrammaticoBrt();
                    break;

                case ConstAmp.MODEL_GRAMMATICO_JUMP:
                    modelBlock = new GrammaticoJump();
                    break;
                    #endregion Amp



                    #region Cab
                case ConstCab.MODEL_4X12_GREENBACK_20:
                    modelBlock = new Cab4x12Greenback20();
                    break;

                case ConstCab.MODEL_4X12_GREENBACK_25:
                    modelBlock = new Cab4x12Greenback25();
                    break;

                case ConstCab.MODEL_1X12_LEAD_80:
                    modelBlock = new Cab1x12Lead80();
                    break;

                case ConstCab.MODEL_1X12_MATCH_H30:
                    modelBlock = new Cab1x12MatchH30();
                    break;

                case ConstCab.MODEL_1X12_MATCH_G25:
                    modelBlock = new Cab1x12MatchG25();
                    break;

                case ConstCab.MODEL_1X12_BLUE_BELL:
                    modelBlock = new Cab1x12BlueBell();
                    break;

                case ConstCab.MODEL_4X12_WHO_WATT_100:
                    modelBlock = new Cab4x12WhoWatt100();
                    break;

                case ConstCab.MODEL_1X6X9_SOUP_PRO_ELLIPSE:
                    modelBlock = new Cab1x6x9SoupProEllipse();
                    break;

                case ConstCab.MODEL_1X12_FIELD_COIL:
                    modelBlock = new Cab1x12FieldCoil();
                    break;

                case ConstCab.MODEL_1X12_US_DELUXE:
                    modelBlock = new Cab1x12USDeluxe();
                    break;

                case ConstCab.MODEL_4X10_TWEED_P10R:
                    modelBlock = new Cab4x10TweedP10R();
                    break;

                case ConstCab.MODEL_2X12_DOUBLE_C12N:
                    modelBlock = new Cab2x12DoubleC12N();
                    break;

                case ConstCab.MODEL_2X12_MAIL_C12Q:
                    modelBlock = new Cab2x12MailC12Q();
                    break;

                case ConstCab.MODEL_1X12_CELEST_12H:
                    modelBlock = new Cab1x12Celest12H();
                    break;

                case ConstCab.MODEL_2X12_INTERSTATE:
                    modelBlock = new Cab2x12Interstate();
                    break;

                case ConstCab.MODEL_4X12_CALI_V30:
                    modelBlock = new Cab4X12CaliV30();
                    break;

                case ConstCab.MODEL_4X12_SOLO_LEAD_EM:
                    modelBlock = new Cab4x12SoloLeadEM();
                    break;

                case ConstCab.MODEL_2X12_BLUE_BELL:
                    modelBlock = new Cab2x12BlueBell();
                    break;

                case ConstCab.MODEL_2X12_SILVER_BELL:
                    modelBlock = new Cab2x12SilverBell();
                    break;

                case ConstCab.MODEL_4X12_UBER_V30:
                    modelBlock = new Cab4x12UberV30();
                    break;

                case ConstCab.MODEL_4X12_BLACKBACK_30:
                    modelBlock = new Cab4x12Blackback30();
                    break;

                case ConstCab.MODEL_4X12_1960_T75:
                    modelBlock = new Cab4x121960T75();
                    break;

                case ConstCab.MODEL_8X10_SV_BEAST:
                    modelBlock = new Cab8x10SVBeast();
                    break;

                case ConstCab.MODEL_6X10_CALI_POWER:
                    modelBlock = new Cab6x10CaliPower();
                    break;
                    #endregion Cab



                    #region Delay
                case ConstDelay.MODEL_ADRIATIC_DELAY:
                    modelBlock = new AdriaticDelay();
                    break;

                case ConstDelay.MODEL_ADRIATIC_SWELL:
                    modelBlock = new AdriaticSwell();
                    break;

                case ConstDelay.MODEL_DUAL_DELAY:
                    modelBlock = new DualDelay();
                    break;

                case ConstDelay.MODEL_VINTAGE_DIGITAL_V2:
                    modelBlock = new VintageDigitalV2();
                    break;

                case ConstDelay.MODEL_SIMPLE_DELAY:
                    modelBlock = new SimpleDelay();
                    break;

                case ConstDelay.MODEL_TRANSISTOR_TAPE:
                    modelBlock = new TransistorTape();
                    break;

                case ConstDelay.MODEL_DELAY_COSMOS_ECHO:
                    modelBlock = new CosmosEcho();
                    break;

                case ConstDelay.MODEL_DELAY_PITCH:
                    modelBlock = new DelayPitch();
                    break;

                case ConstDelay.MODEL_HARMONY_DELAY:
                    modelBlock = new HarmonyDelay();
                    break;

                case ConstDelay.MODEL_ELEPHANT_MAN:
                    modelBlock = new ElephantMan();
                    break;

                case ConstDelay.MODEL_BUCKET_BRIGADE:
                    modelBlock = new BucketBrigade();
                    break;

                case ConstDelay.MODEL_PING_PONG:
                    modelBlock = new PingPong();
                    break;

                case ConstDelay.MODEL_SWELL_VINTAGE_DIGITAL:
                    modelBlock = new SwellVintageDigital();
                    break;

                case ConstDelay.MODEL_DUCKED_DELAY:
                    modelBlock = new DuckedDelay();
                    break;

                case ConstDelay.MODEL_MOD_CHORUS_ECHO:
                    modelBlock = new ModChorusEcho();
                    break;

                case ConstDelay.MODEL_SWEEP_ECHO:
                    modelBlock = new SweepEcho();
                    break;

                case ConstDelay.MODEL_REVERSE_DELAY:
                    modelBlock = new ReverseDelay();
                    break;

                case ConstDelay.MODEL_DELAY_MULTI_PASS:
                    modelBlock = new MultiPass();
                    break;

                case ConstDelay.MODEL_LOW_RES:
                    modelBlock = new LowRes();
                    break;

                case ConstDelay.MODEL_MULTITAP_4:
                    modelBlock = new Multitap4();
                    break;

                case ConstDelay.MODEL_MULTITAP_6:
                    modelBlock = new Multitap6();
                    break;

                case ConstDelay.MODEL_DL4_PING_PONG:
                    modelBlock = new DL4PingPong();
                    break;

                case ConstDelay.MODEL_DYNAMIC_DELAY_STEREO:
                    modelBlock = new DynamicDelayStereo();
                    break;

                case ConstDelay.MODEL_STEREO_DELAY:
                    modelBlock = new StereoDelay();
                    break;

                case ConstDelay.MODEL_DL4_DIGITAL_DELAY:
                    modelBlock = new DL4DigitalDelay();
                    break;

                case ConstDelay.MODEL_DELAY_WITH_MOD:
                    modelBlock = new DelayWithMod();
                    break;

                case ConstDelay.MODEL_DL4_REVERSE_DELAY:
                    modelBlock = new DL4ReverseDelay();
                    break;

                case ConstDelay.MODEL_TUBE_ECHO_STEREO:
                    modelBlock = new TubeEchoStereo();
                    break;

                case ConstDelay.MODEL_TAPE_ECHO_STEREO:
                    modelBlock = new TapeEchoStereo();
                    break;

                case ConstDelay.MODEL_SWEEP_ECHO_STEREO:
                    modelBlock = new SweepEchoStereo();
                    break;

                case ConstDelay.MODEL_ECHO_PLATTER:
                    modelBlock = new EchoPlatter();
                    break;

                case ConstDelay.MODEL_ANALOG_DELAY:
                    modelBlock = new AnalogDelay();
                    break;

                case ConstDelay.MODEL_ANALOG_DELAY_MOD:
                    modelBlock = new AnalogDelayMod();
                    break;

                case ConstDelay.MODEL_AUTO_VOL_DELAY:
                    modelBlock = new AutoVolDelay();
                    break;

                case ConstDelay.MODEL_MULTIHEAD_DELAY:
                    modelBlock = new MultiheadDelay();
                    break;
                    #endregion Delay



                    #region Distortion
                case ConstDistortion.MODEL_ARBITRATOR_FUZZ:
                    modelBlock = new ArbitratorFuzz();
                    break;

                case ConstDistortion.MODEL_BIT_CRUSHER:
                    modelBlock = new BitCrusher();
                    break;

                case ConstDistortion.MODEL_SCREAM_808:
                    modelBlock = new Scream808();
                    break;

                case ConstDistortion.MODEL_COMPULSIVE_DRIVE:
                    modelBlock = new CompulsiveDrive();
                    break;

                case ConstDistortion.MODEL_CLAWTHORN_DRIVE:
                    modelBlock = new ClawthornDrive();
                    break;

                case ConstDistortion.MODEL_DEEZ_ONE_MOD:
                    modelBlock = new DeezOneMod();
                    break;

                case ConstDistortion.MODEL_DEEZ_ONE_VINTAGE:
                    modelBlock = new DeezOneVintage();
                    break;

                case ConstDistortion.MODEL_DERANGEDMASTER:
                    modelBlock = new DerangedMaster();
                    break;

                case ConstDistortion.MODEL_KINKY_BOOST:
                    modelBlock = new KinkyBoost();
                    break;

                case ConstDistortion.MODEL_KWB:
                    modelBlock = new KWB();
                    break;

                case ConstDistortion.MODEL_MEGAPHONE:
                    modelBlock = new Megaphone();
                    break;

                case ConstDistortion.MODEL_FACIAL_FUZZ:
                    modelBlock = new FacialFuzz();
                    break;

                case ConstDistortion.MODEL_MINOTAUR:
                    modelBlock = new Minotaur();
                    break;

                case ConstDistortion.MODEL_HEDGEHOG_D9:
                    modelBlock = new HedgehogD9();
                    break;

                case ConstDistortion.MODEL_TEEMAH:
                    modelBlock = new Teemah();
                    break;

                case ConstDistortion.MODEL_HEAVY_DISTORTION:
                    modelBlock = new HeavyDistortion();
                    break;

                case ConstDistortion.MODEL_INDUSTRIAL_FUZZ:
                    modelBlock = new IndustrialFuzz();
                    break;

                case ConstDistortion.MODEL_THRIFTER_FUZZ:
                    modelBlock = new ThrifterFuzz();
                    break;

                case ConstDistortion.MODEL_TOP_SECRET_OD:
                    modelBlock = new TopSecretOD();
                    break;

                case ConstDistortion.MODEL_TRIANGLE_FUZZ:
                    modelBlock = new TriangleFuzz();
                    break;

                case ConstDistortion.MODEL_TYCOCTAVIA_FUZZ:
                    modelBlock = new TycoctaviaFuzz();
                    break;

                case ConstDistortion.MODEL_VERMIN_DIST:
                    modelBlock = new VerminDist();
                    break;

                case ConstDistortion.MODEL_VALVE_DRIVER:
                    modelBlock = new ValveDriver();
                    break;

                case ConstDistortion.MODEL_OBSIDIAN_7000:
                    modelBlock = new Obsidian7000();
                    break;

                case ConstDistortion.MODEL_WRINGER_FUZZ:
                    modelBlock = new WringerFuzz();
                    break;

                case ConstDistortion.MODEL_TUBE_DRIVE:
                    modelBlock = new TubeDrive();
                    break;

                case ConstDistortion.MODEL_SCREAMER:
                    modelBlock = new Screamer();
                    break;

                case ConstDistortion.MODEL_OVERDRIVE:
                    modelBlock = new Overdrive();
                    break;

                case ConstDistortion.MODEL_CLASSIC_DISTORTION:
                    modelBlock = new ClassicDistortion();
                    break;

                case ConstDistortion.MODEL_COLOR_DRIVE:
                    modelBlock = new ColorDrive();
                    break;

                case ConstDistortion.MODEL_BUZZ_SAW:
                    modelBlock = new BuzzSaw();
                    break;

                case ConstDistortion.MODEL_JUMBO_FUZZ:
                    modelBlock = new JumboFuzz();
                    break;

                case ConstDistortion.MODEL_OCTAVE_FUZZ:
                    modelBlock = new OctaveFuzz();
                    break;

                case ConstDistortion.MODEL_FUZZ_PI:
                    modelBlock = new FuzzPi();
                    break;

                case ConstDistortion.MODEL_JET_FUZZ:
                    modelBlock = new JetFuzz();
                    break;

                case ConstDistortion.MODEL_LINE_6_DRIVE:
                    modelBlock = new Line6Drive();
                    break;

                case ConstDistortion.MODEL_LINE_6_DISTORTION:
                    modelBlock = new Line6Distortion();
                    break;

                case ConstDistortion.MODEL_SUB_OCTAVE_FUZZ:
                    modelBlock = new SubOctaveFuzz();
                    break;

                case ConstDistortion.MODEL_HEIR_APPARENT:
                    modelBlock = new HeirApparent();
                    break;

                case ConstDistortion.MODEL_TONE_SOVEREIGN:
                    modelBlock = new ToneSovereign();
                    break;

                case ConstDistortion.MODEL_DHYANA_DRIVE:
                    modelBlock = new DhyanaDrive();
                    break;

                case ConstDistortion.MODEL_ZERO_AMP_BASS_DI:
                    modelBlock = new ZeroAmpBassDI();
                    break;

                case ConstDistortion.MODEL_AMPEG_SCRAMBLER_OD:
                    modelBlock = new AmpegScramblerOD();
                    break;
                    #endregion Distortion



                    #region Dynamics
                case ConstDynamics.MODEL_LA_STUDIO_COMP:
                    modelBlock = new LASutdioComp();
                    break;

                case ConstDynamics.MODEL_NOISE_GATE:
                    modelBlock = new NoiseGate();
                    break;

                case ConstDynamics.MODEL_HARD_GATE:
                    modelBlock = new HardGate();
                    break;

                case ConstDynamics.MODEL_AUTO_SWELL:
                    modelBlock = new AutoSwell();
                    break;

                case ConstDynamics.MODEL_RED_SQUEEZE:
                    modelBlock = new RedSqueeze();
                    break;

                case ConstDynamics.MODEL_DELUXE_COMP:
                    modelBlock = new DeluxeComp();
                    break;

                case ConstDynamics.MODEL_3_BAND_COMP:
                    modelBlock = new Comp3BandComp();
                    break;

                case ConstDynamics.MODEL_KINKY_COMP:
                    modelBlock = new KinkyComp();
                    break;

                case ConstDynamics.MODEL_TUBE_COMP:
                    modelBlock = new TubeComp();
                    break;

                case ConstDynamics.MODEL_RED_COMP:
                    modelBlock = new RedComp();
                    break;

                case ConstDynamics.MODEL_BLUE_COMP:
                    modelBlock = new BlueComp();
                    break;

                case ConstDynamics.MODEL_BLUE_COMP_TREB:
                    modelBlock = new BlueCompTreb();
                    break;

                case ConstDynamics.MODEL_VETTA_COMP:
                    modelBlock = new VettaComp();
                    break;

                case ConstDynamics.MODEL_VETTA_JUICE:
                    modelBlock = new VettaJuice();
                    break;

                case ConstDynamics.MODEL_BOOST_COMP:
                    modelBlock = new BoostComp();
                    break;
                    #endregion Dynamics



                    #region EQ
                case ConstEQ.MODEL_LOW_CUT_HIGH_CUT:
                    modelBlock = new LowCutHighCut();
                    break;

                case ConstEQ.MODEL_LOW_SHELF_HIGH_SHELF:
                    modelBlock = new LowShelfHighShelf();
                    break;

                case ConstEQ.MODEL_GRAPHIC_10_BAND:
                    modelBlock = new Graphic10Band();
                    break;

                case ConstEQ.MODEL_SIMPLE_3_BAND:
                    modelBlock = new Simple3Band();
                    break;

                case ConstEQ.MODEL_PARAMETRIC:
                    modelBlock = new Parametric();
                    break;

                case ConstEQ.MODEL_CALI_Q:
                    modelBlock = new CaliQ();
                    break;

                case ConstEQ.DISP_SIMPLE_TILT:
                    modelBlock = new SimpleTilt();
                    break;
                    #endregion EQ



                    #region FX Loop
                case ConstFxLoop.MODEL_FX_LOOP_MONO_1:
                    modelBlock = new FXLoopLeft();
                    break;

                case ConstFxLoop.MODEL_FX_LOOP_MONO_2:
                    modelBlock = new FXLoopRight();
                    break;

                case ConstFxLoop.MODEL_FX_LOOP_STEREO:
                    modelBlock = new FXLoopStereo();
                    break;
                    #endregion FX Loop



                    #region Filter
                case ConstFilter.DISP_ASHEVILLE_PATTRN:
                    modelBlock = new AshevillePattrn();
                    break;

                case ConstFilter.MODEL_AUTO_FILTER:
                    modelBlock = new AutoFilter();
                    break;

                case ConstFilter.MODEL_MUTANT_FILTER:
                    modelBlock = new MutantFilter();
                    break;

                case ConstFilter.MODEL_MYSTERY_FILTER:
                    modelBlock = new MysteryFilter();
                    break;

                case ConstFilter.MODEL_VOICE_BOX:
                    modelBlock = new VoiceBox();
                    break;

                case ConstFilter.MODEL_TRON:
                    modelBlock = new Tron();
                    break;

                case ConstFilter.MODEL_Q_FILTER:
                    modelBlock = new QFilter();
                    break;

                case ConstFilter.MODEL_SEEKER:
                    modelBlock = new Seeker();
                    break;

                case ConstFilter.MODEL_OBI_WAH:
                    modelBlock = new ObiWah();
                    break;

                case ConstFilter.MODEL_TRON_UP:
                    modelBlock = new TronUp();
                    break;

                case ConstFilter.MODEL_TRON_DOWN:
                    modelBlock = new TronDown();
                    break;

                case ConstFilter.MODEL_THROBBER:
                    modelBlock = new Throbber();
                    break;

                case ConstFilter.MODEL_SLOW_FILTER:
                    modelBlock = new SlowFilter();
                    break;

                case ConstFilter.MODEL_SPIN_CYCLE:
                    modelBlock = new SpinCycle();
                    break;

                case ConstFilter.MODEL_COMET_TRAILS:
                    modelBlock = new CometTrails();
                    break;
                    #endregion Filter



                    #region  Looper
                case ConstLooper.MODEL_LOOPER:
                    modelBlock = new Looper();
                    break;
                    #endregion Looper



                    #region Impulse response
                case ConstIR.MODEL_IMPULSE_RESPONSE_1024:
                    modelBlock = new ImpulseResponse1024();
                    break;

                case ConstIR.MODEL_IMPULSE_RESPONSE_2048:
                    modelBlock = new ImpulseResponse2048();
                    break;
                    #endregion Impulse Response



                    #region Modulation
                case ConstModulation.MODEL_60S_BIAS_TRAM:
                    modelBlock = new Mod60sBiasTrem();
                    break;

                case ConstModulation.MODEL_70S_CHORUS:
                    modelBlock = new Chorus70sChorus();
                    break;

                case ConstModulation.MODEL_AM_RING_MOD:
                    modelBlock = new AMRingMod();
                    break;

                case ConstModulation.MODEL_BUBBLE_VIBRATO:
                    modelBlock = new BubbleVibrato();
                    break;

                case ConstModulation.MODEL_COURTESAN_FLANGE:
                    modelBlock = new CourtesanFlange();
                    break;

                case ConstModulation.MODEL_DELUXE_PHASER:
                    modelBlock = new DeluxePhaser();
                    break;

                case ConstModulation.MODEL_DOUBLT_TAKE:
                    modelBlock = new DoubleTake();
                    break;

                case ConstModulation.MODEL_DYNAMIX_FLANGER:
                    modelBlock = new DynamixFlanger();
                    break;

                case ConstModulation.MODEL_TRINITY_CHORUS:
                    modelBlock = new TrinityChorus();
                    break;

                case ConstModulation.MODEL_GRAY_FLANGER:
                    modelBlock = new GrayFlanger();
                    break;

                case ConstModulation.MODEL_UBIQUITOUS_VIBE:
                    modelBlock = new UbiquitousVibe();
                    break;

                case ConstModulation.MODEL_SCRIPT_MOD_PHASE:
                    modelBlock = new ScriptModPhase();
                    break;

                case ConstModulation.DISP_HARMONIC_TREM:
                    modelBlock = new HarmonicTremolo();
                    break;

                case ConstModulation.MODEL_OPTICAL_TREM:
                    modelBlock = new OpticalTrem();
                    break;

                case ConstModulation.MODEL_PLASTI_CHORUS:
                    modelBlock = new PlastiChorus();
                    break;

                case ConstModulation.MODEL_PITCH_RING_MOD:
                    modelBlock = new PitchRingMod();
                    break;

                case ConstModulation.MODEL_CHORUS:
                    modelBlock = new Chorus();
                    break;

                case ConstModulation.MODEL_ROTARY_122:
                    modelBlock = new Rotary122();
                    break;

                case ConstModulation.MODEL_ROTARY_145:
                    modelBlock = new Rotary145();
                    break;

                case ConstModulation.MODEL_ROTARY_VIBE:
                    modelBlock = new RotaryVibe();
                    break;

                case ConstModulation.MODEL_HARMONIC_FLANGER:
                    modelBlock = new HarmonicFlanger();
                    break;

                case ConstModulation.MODEL_BLEAT_CHOP_TREM:
                    modelBlock = new BleatChopTrem();
                    break;

                case ConstModulation.MODEL_TREMOLO:
                    modelBlock = new Tremolo();
                    break;

                case ConstModulation.MODEL_PATTERN_TREM:
                    modelBlock = new PatternTrem();
                    break;

                case ConstModulation.MODEL_PANNER:
                    modelBlock = new Panner();
                    break;

                case ConstModulation.MODEL_BIAS_TREMOLO:
                    modelBlock = new BiasTremolo();
                    break;

                case ConstModulation.MODEL_OPTO_TREMOLO:
                    modelBlock = new OptoTremolo();
                    break;

                case ConstModulation.MODEL_SCRIPT_PHASE:
                    modelBlock = new ScriptPhase();
                    break;

                case ConstModulation.MODEL_PANNED_PHASER:
                    modelBlock = new PannedPhaser();
                    break;

                case ConstModulation.MODEL_BARBERPOLE_PHASER:
                    modelBlock = new BarberpolePhaser();
                    break;

                case ConstModulation.MODEL_DUAL_PHASER:
                    modelBlock = new DualPhaser();
                    break;

                case ConstModulation.MODEL_U_VIBE:
                    modelBlock = new UVibe();
                    break;

                case ConstModulation.MODEL_PHASER:
                    modelBlock = new Phaser();
                    break;

                case ConstModulation.MODEL_PITCH_VIBRATO:
                    modelBlock = new PitchVibrato();
                    break;

                case ConstModulation.MODEL_DIMMENSION:
                    modelBlock = new Dimmension();
                    break;

                case ConstModulation.MODEL_ANALOG_CHORUS:
                    modelBlock = new AnalogChorus();
                    break;

                case ConstModulation.MODEL_TRI_CHORUS:
                    modelBlock = new TriChorus();
                    break;

                case ConstModulation.MODEL_ANALOG_FLANGER:
                    modelBlock = new AnalogFlanger();
                    break;

                case ConstModulation.MODEL_JET_FLANGER:
                    modelBlock = new JetFlanger();
                    break;

                case ConstModulation.MODEL_AC_FLANGER:
                    modelBlock = new ACFlanger();
                    break;

                case ConstModulation.MODEL_80A_FLANGER:
                    modelBlock = new ADAFlanger();
                    break;

                case ConstModulation.MODEL_FREQUENCY_SHIFTER:
                    modelBlock = new FrequencyShifter();
                    break;

                case ConstModulation.MODEL_RING_MODULATOR:
                    modelBlock = new RingModulator();
                    break;

                case ConstModulation.MODEL_ROTARY_DRUM:
                    modelBlock = new RotaryDrum();
                    break;

                case ConstModulation.MODEL_ROTARY_DRUM_HORN:
                    modelBlock = new RotaryDrumHorn();
                    break;
                    #endregion Modulation



                    #region Pitch/Synth
                case ConstPitch.MODEL_PITCH_WHAM:
                    modelBlock = new PitchWham();
                    break;

                case ConstPitch.MODEL_DUAL_PITCH:
                    modelBlock = new DualPitch();
                    break;

                case ConstPitch.MODEL_SIMPLE_PITCH:
                    modelBlock = new SimplePitch();
                    break;

                case ConstPitch.MODEL_TWIN_HARMONY:
                    modelBlock = new TwinHarmony();
                    break;

                case ConstPitch.MODEL_3_NOTE_GENERATOR:
                    modelBlock = new Synth3NoteGenerator();
                    break;

                case ConstPitch.MODEL_4_OSC_GENERATOR:
                    modelBlock = new Synth4OSCGenerator();
                    break;

                case ConstPitch.MODEL_3_OSC_SYNTH:
                    modelBlock = new Synth3OSCSynth();
                    break;

                case ConstPitch.MODEL_BASS_OCTAVER:
                    modelBlock = new BassOctaver();
                    break;

                case ConstPitch.MODEL_TWO_VOICE_HARMONY:
                    modelBlock = new TwoVoiceHarmony();
                    break;

                case ConstPitch.MODEL_OCTI_SYNTH:
                    modelBlock = new OctiSynth();
                    break;

                case ConstPitch.MODEL_SYNTH_OMATIC:
                    modelBlock = new SynthOMatic();
                    break;

                case ConstPitch.MODEL_ATTACK_SYNTH:
                    modelBlock = new AttackSynth();
                    break;

                case ConstPitch.MODEL_SYNTH_STRING:
                    modelBlock = new SynthString();
                    break;

                case ConstPitch.MODEL_GROWLER:
                    modelBlock = new Growler();
                    break;
                    #endregion Pitch/Synth



                    #region Reverb
                case ConstReverb.MODEL_SPRING:
                    modelBlock = new Spring();
                    break;

                case ConstReverb.MODEL_63_SPRING:
                    modelBlock = new Reverb63Spring();
                    break;

                case ConstReverb.MODEL_CAVE:
                    modelBlock = new Cave();
                    break;

                case ConstReverb.MODEL_CHAMBER:
                    modelBlock = new Chamber();
                    break;

                case ConstReverb.MODEL_DUCKING:
                    modelBlock = new Ducking();
                    break;

                case ConstReverb.MODEL_ECHO:
                    modelBlock = new Echo();
                    break;

                case ConstReverb.MODEL_HALL:
                    modelBlock = new Hall();
                    break;

                case ConstReverb.MODEL_GLITZ:
                    modelBlock = new Glitz();
                    break;

                case ConstReverb.MODEL_ROOM:
                    modelBlock = new Room();
                    break;

                case ConstReverb.MODEL_DOUBLE_TANK:
                    modelBlock = new DoubleTank();
                    break;

                case ConstReverb.MODEL_GANYMEDE:
                    modelBlock = new Ganymede();
                    break;

                case ConstReverb.MODEL_PARTICLE:
                    modelBlock = new Particle();
                    break;

                case ConstReverb.MODEL_PLATE:
                    modelBlock = new Plate();
                    break;

                case ConstReverb.MODEL_OCTO:
                    modelBlock = new Octo();
                    break;

                case ConstReverb.MODEL_PLATEAUX:
                    modelBlock = new Plateaux();
                    break;

                case ConstReverb.MODEL_SEARCHLIGHTS:
                    modelBlock = new Searchlights();
                    break;

                case ConstReverb.MODEL_TILE:
                    modelBlock = new Tile();
                    break;
                    #endregion Reverb



                    #region Send/Return
                case ConstSendReturn.MODEL_SEND_MONO_1:
                    modelBlock = new SendLeft();
                    break;

                case ConstSendReturn.MODEL_SEND_MONO_2:
                    modelBlock = new SendRight();
                    break;

                case ConstSendReturn.MODEL_RETURN_MONO_1:
                    modelBlock = new ReturnLeft();
                    break;

                case ConstSendReturn.MODEL_RETURN_MONO_2:
                    modelBlock = new ReturnRight();
                    break;

                case ConstSendReturn.MODEL_SEND_STEREO_1_2:
                    modelBlock = new SendStereoLR();
                    break;

                case ConstSendReturn.MODEL_RETURN_STEREO_1_2:
                    modelBlock = new ReturnStereoLR();
                    break;
                    #endregion Send/Return



                    #region Volume/Pan
                case ConstVolPan.MODEL_VOLUME:
                    modelBlock = new Volume();
                    break;

                case ConstVolPan.MODEL_GAIN:
                    modelBlock = new Gain();
                    break;
                    #endregion Volume/Pan



                    #region Wah
                case ConstWah.MODEL_CHROME:
                    modelBlock = new Chrome();
                    break;

                case ConstWah.MODEL_CHROME_CUSTOM:
                    modelBlock = new ChromeCustom();
                    break;

                case ConstWah.MODEL_COLORFUL:
                    modelBlock = new Colorful();
                    break;

                case ConstWah.MODEL_CONDUCTOR:
                    modelBlock = new Conductor();
                    break;

                case ConstWah.MODEL_TEARDROP_310:
                    modelBlock = new Teardrop310();
                    break;

                case ConstWah.MODEL_THROATY:
                    modelBlock = new Throaty();
                    break;

                case ConstWah.MODEL_WEEPER:
                    modelBlock = new Weeper();
                    break;

                case ConstWah.MODEL_FASSEL:
                    modelBlock = new Fassel();
                    break;

                case ConstWah.MODEL_UK_WAH_846:
                    modelBlock = new UkWah846();
                    break;

                case ConstWah.MODEL_VETTA_WAH:
                    modelBlock = new Vetta();
                    break;
                    #endregion Wah

                default:
                    modelBlock = new Block();
                    break;
                }
                serializer.Populate(jsonObject.CreateReader(), modelBlock);
                return(modelBlock);
            }
            else
            {
                return(default(Block));
            }
        }
コード例 #20
0
 /* Loads the master map file into map or creates new one. */
 public void LoadMaster()
 {
     map = Cartographer.GetMaster();
 }