Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out why bf-tests/sound-board is not loading #237

Open
jessegreenberg opened this issue Apr 24, 2024 · 1 comment
Open

Figure out why bf-tests/sound-board is not loading #237

jessegreenberg opened this issue Apr 24, 2024 · 1 comment
Assignees
Labels
type:bug Something isn't working

Comments

@jessegreenberg
Copy link
Contributor

It errors out when we try to load. Why?

@jessegreenberg jessegreenberg added the type:bug Something isn't working label Apr 24, 2024
@jessegreenberg jessegreenberg self-assigned this Apr 24, 2024
jessegreenberg added a commit that referenced this issue Apr 26, 2024
@jessegreenberg
Copy link
Contributor Author

Comonents are missing in the saved state in the database.

There is a component called 'objectBounds_Copy2' with dependencies

(10) ['position_Copy2', 'leftTopBounds_Copy1', 'centerTopBounds_Copy1', 'rightTopBounds_Copy1', 'leftCenterBounds_Copy1', 'centerBounds_Copy1', 'rightCenterBounds_Copy1', 'leftBottomBounds_Copy1', 'centerBottomBounds_Copy1', 'rightBottomBounds_Copy1']

But only position_Copy2 exists in the save state for this project in the database. The others are not in the JSON.

It is possible that this happened before #206 was fixed (it even has the same error message) - This is only possible if sound-board project was last saved before November 21, 2023. @brettfiedler is that possible? If not, there may be another bug with how programs are saved.

The broken component was in a Program called "Grid Mapped Speech". Removing that program produces a loadable project. Ill put it here:

Restored Project
{
  "programs": [
    {
      "number": 978,
      "title": "Grid Mapped Sound",
      "keywords": "",
      "description": "",
      "expanded": true,
      "topWhiskerLength": 0.2,
      "rightWhiskerLength": 0.2,
      "bottomWhiskerLength": 0.2,
      "leftWhiskerLength": 0.2,
      "positionProperty": {
        "x": 491.1453893771304,
        "y": 128.10045918524656
      },
      "modelContainer": {
        "namedBooleanProperties": [],
        "namedVector2Properties": [
          {
            "name": "position",
            "propertyType": "Vector2Property",
            "defaultX": 0,
            "defaultY": 0
          }
        ],
        "namedNumberProperties": [],
        "namedEnumerationProperties": [],
        "namedDerivedProperties": [
          {
            "name": "objectBounds",
            "propertyType": "DerivedProperty",
            "dependencyNames": [
              "position",
              "leftTopBounds",
              "centerTopBounds",
              "rightTopBounds",
              "leftCenterBounds",
              "centerBounds",
              "rightCenterBounds",
              "leftBottomBounds",
              "centerBottomBounds",
              "rightBottomBounds"
            ],
            "derivation": "if ( leftTopBounds.containsPoint( position ) ) {\r\n    return leftTopBounds;\r\n}\r\nelse if ( centerTopBounds.containsPoint( position ) ) {\r\n    return centerTopBounds;\r\n}\r\nelse if ( rightTopBounds.containsPoint( position ) ) {\r\n    return rightTopBounds;\r\n}\r\nelse if ( leftCenterBounds.containsPoint( position ) ) {\r\n    return leftCenterBounds;\r\n}\r\nelse if ( centerBounds.containsPoint( position ) ) {\r\n    return centerBounds;\r\n}\r\nelse if ( rightCenterBounds.containsPoint( position ) ) {\r\n    return rightCenterBounds;\r\n}\r\nelse if ( leftBottomBounds.containsPoint( position ) ) {\r\n    return leftBottomBounds;\r\n}\r\nelse if ( centerBottomBounds.containsPoint( position ) ) {\r\n    return centerBottomBounds;\r\n}\r\nelse if ( rightBottomBounds.containsPoint( position ) ) {\r\n    return rightBottomBounds;\r\n}\r\nelse {\r\n    return null;\r\n}\r\n"
          }
        ],
        "namedBounds2Properties": [],
        "namedObservableArrays": [],
        "namedArrayItems": [],
        "namedArrayItemReferences": [],
        "namedStringProperties": []
      },
      "controllerContainer": {
        "vector2PropertyControllers": [
          {
            "name": "positionController",
            "controlledComponentName": "position",
            "controlType": "MATCH_CENTER",
            "controlTypeFamily": ""
          }
        ],
        "boundsPropertyControllers": [],
        "booleanPropertyControllers": [],
        "numberPropertyControllers": [],
        "enumerationPropertyControllers": []
      },
      "viewContainer": {
        "soundViews": [
          {
            "name": "leftTopSound",
            "modelComponentNames": [
              "position",
              "leftTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (leftTopBounds.containsPoint( position) ) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "birdCall.mp3",
            "loop": false,
            "autoplay": false
          },
          {
            "name": "centerTopSound",
            "modelComponentNames": [
              "position",
              "centerTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (centerTopBounds.containsPoint( position)) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "cricketsLoop.mp3",
            "loop": false,
            "autoplay": false
          },
          {
            "name": "rightTopSound",
            "modelComponentNames": [
              "position",
              "rightTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (rightTopBounds.containsPoint( position)) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "loonCall.mp3",
            "loop": false,
            "autoplay": false
          },
          {
            "name": "leftCenterSound",
            "modelComponentNames": [
              "position",
              "leftCenterBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (leftCenterBounds.containsPoint( position)) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "rhodesChord.mp3",
            "loop": false,
            "autoplay": false
          },
          {
            "name": "centerSound",
            "modelComponentNames": [
              "position",
              "centerBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (centerBounds.containsPoint(position)) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "thunder.mp3",
            "loop": false,
            "autoplay": false
          },
          {
            "name": "rightCenterSound",
            "modelComponentNames": [
              "position",
              "rightCenterBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (rightCenterBounds.containsPoint( position)) {\r\n    play();\r\n}",
            "lazyLink": false,
            "soundFileName": "short-success.mp3",
            "loop": false,
            "autoplay": false
          }
        ],
        "descriptionViews": [],
        "textViews": [],
        "shapeViews": [
          {
            "name": "objectView",
            "modelComponentNames": [
              "position"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setCenterX( position.x );\r\nsetCenterY( position.y );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "circle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": "0.1",
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          }
        ],
        "backgroundViews": [],
        "imageViews": []
      },
      "listenerContainer": {
        "linkListeners": [],
        "animationListeners": [],
        "bluetoothListeners": []
      },
      "customCodeContainer": {
        "onProgramAddedCode": "",
        "onProgramRemovedCode": "",
        "onProgramChangedPositionCode": "",
        "onProgramMarkersAddedCode": "",
        "onProgramMarkersRemovedCode": "",
        "onProgramMarkersChangedPositionCode": "",
        "onProgramAdjacentCode": "",
        "onProgramSeparatedCode": ""
      }
    },
    {
      "number": 971,
      "title": "Bounds (required)",
      "keywords": "",
      "description": "",
      "expanded": true,
      "topWhiskerLength": 0.2,
      "rightWhiskerLength": 0.2,
      "bottomWhiskerLength": 0.2,
      "leftWhiskerLength": 0.2,
      "positionProperty": {
        "x": 321.9042516986174,
        "y": 14.918676799144933
      },
      "modelContainer": {
        "namedBooleanProperties": [],
        "namedVector2Properties": [],
        "namedNumberProperties": [],
        "namedEnumerationProperties": [],
        "namedDerivedProperties": [],
        "namedBounds2Properties": [
          {
            "name": "leftTopBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": 0,
            "defaultMinY": 0,
            "defaultMaxX": "0.33",
            "defaultMaxY": "0.33"
          },
          {
            "name": "centerTopBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.33",
            "defaultMinY": 0,
            "defaultMaxX": "0.66",
            "defaultMaxY": "0.33"
          },
          {
            "name": "rightTopBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.66",
            "defaultMinY": 0,
            "defaultMaxX": 1,
            "defaultMaxY": "0.33"
          },
          {
            "name": "leftCenterBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": 0,
            "defaultMinY": "0.33",
            "defaultMaxX": "0.33",
            "defaultMaxY": "0.66"
          },
          {
            "name": "centerBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.33",
            "defaultMinY": "0.33",
            "defaultMaxX": "0.66",
            "defaultMaxY": "0.66"
          },
          {
            "name": "rightCenterBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.66",
            "defaultMinY": "0.33",
            "defaultMaxX": 1,
            "defaultMaxY": "0.66"
          },
          {
            "name": "leftBottomBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": 0,
            "defaultMinY": "0.66",
            "defaultMaxX": "0.33",
            "defaultMaxY": 1
          },
          {
            "name": "centerBottomBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.33",
            "defaultMinY": "0.66",
            "defaultMaxX": "0.66",
            "defaultMaxY": 1
          },
          {
            "name": "rightBottomBounds",
            "propertyType": "Bounds2Property",
            "defaultMinX": "0.66",
            "defaultMinY": "0.66",
            "defaultMaxX": 1,
            "defaultMaxY": 1
          }
        ],
        "namedObservableArrays": [],
        "namedArrayItems": [],
        "namedArrayItemReferences": [],
        "namedStringProperties": []
      },
      "controllerContainer": {
        "vector2PropertyControllers": [],
        "boundsPropertyControllers": [],
        "booleanPropertyControllers": [],
        "numberPropertyControllers": [],
        "enumerationPropertyControllers": []
      },
      "viewContainer": {
        "soundViews": [],
        "descriptionViews": [],
        "textViews": [],
        "shapeViews": [
          {
            "name": "leftTopView",
            "modelComponentNames": [
              "leftTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( leftTopBounds );\r\nsetFill( 'rgba(255, 0, 0, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "centerTopView",
            "modelComponentNames": [
              "centerTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( centerTopBounds );\r\nsetFill( 'rgba(0, 0, 255, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "rightTopView",
            "modelComponentNames": [
              "rightTopBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( rightTopBounds );\r\nsetFill( 'rgba(0, 128, 0, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "leftCenterView",
            "modelComponentNames": [
              "leftCenterBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( leftCenterBounds );\r\nsetFill( 'rgba(255, 255, 0, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "centerView",
            "modelComponentNames": [
              "centerBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( centerBounds );\r\nsetFill( 'rgba(128, 0, 128, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "rightCenterView",
            "modelComponentNames": [
              "rightCenterBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( rightCenterBounds );\r\nsetFill( 'rgba(255, 165, 0, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "leftBottomView",
            "modelComponentNames": [
              "leftBottomBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( leftBottomBounds );\r\nsetFill( 'rgba(255, 192, 203, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "centerBottomView",
            "modelComponentNames": [
              "centerBottomBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( centerBottomBounds );\r\nsetFill( 'rgba(165, 42, 42, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          },
          {
            "name": "rightBottomView",
            "modelComponentNames": [
              "rightBottomBounds"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setRectBounds( rightBottomBounds );\r\nsetFill( 'rgba(128, 128, 128, 0.5)' );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "rectangle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": 0.5,
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          }
        ],
        "backgroundViews": [],
        "imageViews": []
      },
      "listenerContainer": {
        "linkListeners": [],
        "animationListeners": [],
        "bluetoothListeners": []
      },
      "customCodeContainer": {
        "onProgramAddedCode": "",
        "onProgramRemovedCode": "",
        "onProgramChangedPositionCode": "",
        "onProgramMarkersAddedCode": "",
        "onProgramMarkersRemovedCode": "",
        "onProgramMarkersChangedPositionCode": "",
        "onProgramAdjacentCode": "",
        "onProgramSeparatedCode": ""
      }
    },
    {
      "number": 1586,
      "title": "Grid Mapped Volume",
      "keywords": "",
      "description": "",
      "expanded": false,
      "topWhiskerLength": 0.2,
      "rightWhiskerLength": 0.2,
      "bottomWhiskerLength": 0.2,
      "leftWhiskerLength": 0.2,
      "positionProperty": {
        "x": 143.3943977226401,
        "y": 283.9854541811713
      },
      "modelContainer": {
        "namedBooleanProperties": [],
        "namedVector2Properties": [
          {
            "name": "position_Copy1",
            "propertyType": "Vector2Property",
            "defaultX": 0,
            "defaultY": 0
          }
        ],
        "namedNumberProperties": [],
        "namedEnumerationProperties": [],
        "namedDerivedProperties": [
          {
            "name": "objectBounds_Copy1",
            "propertyType": "DerivedProperty",
            "dependencyNames": [
              "position_Copy1",
              "leftTopBounds",
              "centerTopBounds",
              "rightTopBounds",
              "leftCenterBounds",
              "centerBounds",
              "rightCenterBounds",
              "leftBottomBounds",
              "centerBottomBounds",
              "rightBottomBounds"
            ],
            "derivation": "if ( leftTopBounds.containsPoint( position_Copy1 ) ) {\r\n    return leftTopBounds;\r\n}\r\nelse if ( centerTopBounds.containsPoint( position_Copy1 ) ) {\r\n    return centerTopBounds;\r\n}\r\nelse if ( rightTopBounds.containsPoint( position_Copy1 ) ) {\r\n    return rightTopBounds;\r\n}\r\nelse if ( leftCenterBounds.containsPoint( position_Copy1 ) ) {\r\n    return leftCenterBounds;\r\n}\r\nelse if ( centerBounds.containsPoint( position_Copy1 ) ) {\r\n    return centerBounds;\r\n}\r\nelse if ( rightCenterBounds.containsPoint( position_Copy1 ) ) {\r\n    return rightCenterBounds;\r\n}\r\nelse if ( leftBottomBounds.containsPoint( position_Copy1 ) ) {\r\n    return leftBottomBounds;\r\n}\r\nelse if ( centerBottomBounds.containsPoint( position_Copy1 ) ) {\r\n    return centerBottomBounds;\r\n}\r\nelse if ( rightBottomBounds.containsPoint( position_Copy1 ) ) {\r\n    return rightBottomBounds;\r\n}\r\nelse {\r\n    return null;\r\n}\r\n"
          }
        ],
        "namedBounds2Properties": [],
        "namedObservableArrays": [],
        "namedArrayItems": [],
        "namedArrayItemReferences": [],
        "namedStringProperties": []
      },
      "controllerContainer": {
        "vector2PropertyControllers": [
          {
            "name": "positionController_Copy1",
            "controlledComponentName": "position_Copy1",
            "controlType": "MATCH_CENTER",
            "controlTypeFamily": ""
          }
        ],
        "boundsPropertyControllers": [],
        "booleanPropertyControllers": [],
        "numberPropertyControllers": [],
        "enumerationPropertyControllers": []
      },
      "viewContainer": {
        "soundViews": [
          {
            "name": "objectSound",
            "modelComponentNames": [
              "leftTopBounds",
              "centerTopBounds",
              "rightTopBounds",
              "leftCenterBounds",
              "centerBounds",
              "rightCenterBounds",
              "leftBottomBounds",
              "centerBottomBounds",
              "rightBottomBounds",
              "position_Copy1"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "if (leftTopBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0);\r\n    play();\r\n}\r\nelse if (centerTopBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.1);\r\n    play();\r\n}\r\nelse if (rightTopBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.2);\r\n    play();\r\n}\r\nelse if (leftCenterBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.3);\r\n    play();\r\n}\r\nelse if (centerBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.4);\r\n    play();\r\n}\r\nelse if (rightCenterBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.5);\r\n    play();   \r\n}\r\nelse if (leftBottomBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.6);\r\n    play();\r\n}\r\nelse if (centerBottomBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.7);\r\n    play();\r\n}\r\nelse if (rightBottomBounds.containsPoint(position_Copy1)) {\r\n    setPlaybackRate(1);\r\n    setOutputLevel(0.8);\r\n    play();   \r\n}",
            "lazyLink": false,
            "soundFileName": "trill1.wav",
            "loop": false,
            "autoplay": false
          }
        ],
        "descriptionViews": [],
        "textViews": [],
        "shapeViews": [
          {
            "name": "objectView_Copy1",
            "modelComponentNames": [
              "position_Copy1"
            ],
            "referenceComponentNames": [],
            "controlFunctionString": "setCenterX( position_Copy1.x );\r\nsetCenterY( position_Copy1.y );",
            "lazyLink": false,
            "defaultViewOptions": {
              "centerX": "",
              "centerY": "",
              "scale": 1,
              "rotation": 0,
              "opacity": 1,
              "visible": true,
              "viewUnits": "model"
            },
            "defaultShapeOptions": {
              "shapeType": "circle",
              "fill": "lightblue",
              "stroke": "red",
              "lineWidth": 1,
              "rectWidth": 0.5,
              "rectHeight": 0.5,
              "circleRadius": "0.1",
              "ellipseRadiusX": 0.3,
              "ellipseRadiusY": 0.15,
              "lineStartX": 0,
              "lineStartY": 0,
              "lineEndX": 0.3,
              "lineEndY": 0.3,
              "triangleBaseWidth": 0.1,
              "triangleHeight": 0.3,
              "polygonPoints": [
                [
                  0,
                  0
                ],
                [
                  0.1,
                  0
                ],
                [
                  0.1,
                  0.1
                ],
                [
                  0,
                  0.1
                ]
              ]
            }
          }
        ],
        "backgroundViews": [],
        "imageViews": []
      },
      "listenerContainer": {
        "linkListeners": [],
        "animationListeners": [],
        "bluetoothListeners": []
      },
      "customCodeContainer": {
        "onProgramAddedCode": "",
        "onProgramRemovedCode": "",
        "onProgramChangedPositionCode": "",
        "onProgramMarkersAddedCode": "",
        "onProgramMarkersRemovedCode": "",
        "onProgramMarkersChangedPositionCode": "",
        "onProgramAdjacentCode": "",
        "onProgramSeparatedCode": ""
      }
    }
  ]
}

Making copies of "Grid Mapped Sound" program works well with save and load. I also tried with and without reference components.

Sorry @brettfiedler, I think the description program is lost. But hopefully this restored project makes it easier to recreate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants