{
    "version": 1,
    "author": "Bimini Road",
    "tags": [
        "Utility"
    ],
    "description": "This is a tutorial patch to illustrate how to use the Microphone node with a Zero Cross node to build a simple instrument tuner.\n\nContains a node-by-node tutorial.",
    "patch": {
        "id": "9caf2c0f-53e8-49e3-b31e-437293369e64",
        "pan": {
            "x": -114.58329010009766,
            "y": -42.66855239868164
        },
        "zoom": 4.787299633026123,
        "nodes": [
            {
                "type": "Patch",
                "id": "2b8fde5a-d2c2-4c87-a3a9-52919590931b",
                "position": {
                    "x": 108.94263458251953,
                    "y": 27.259920120239259
                },
                "subPatch": {
                    "id": "ce562668-9ee6-440c-bbcb-37af883beb4d",
                    "pan": {
                        "x": 0.0,
                        "y": 0.0
                    },
                    "zoom": 1.0,
                    "nodes": [
                        {
                            "type": "Light",
                            "id": "a2f0cc33-fd9a-4ab6-b5d6-7a9f193dc647",
                            "position": {
                                "x": 211.4711151123047,
                                "y": -68.87633514404297
                            },
                            "exposedPosition": {
                                "x": 45.0,
                                "y": 5.0
                            }
                        },
                        {
                            "type": "Value",
                            "id": "bc4599cf-924b-417e-9c35-caf62e7e009f",
                            "position": {
                                "x": 211.19349670410157,
                                "y": -23.24742889404297
                            },
                            "exposedPosition": {
                                "x": -35.0,
                                "y": 5.0
                            }
                        },
                        {
                            "type": "Text",
                            "id": "fc57788d-26ee-455b-8be3-792d3672e08c",
                            "position": {
                                "x": 50.128456115722659,
                                "y": -87.26705932617188
                            },
                            "text": "This expression reads the output of the floor(Hz) expression and turns on the light only when the output of floor(Hz) is exactly 440Hz.",
                            "width": 151.508056640625
                        },
                        {
                            "type": "Expr",
                            "id": "5bdafce1-3c3c-4b97-bf63-21dbde69ea8a",
                            "position": {
                                "x": 16.931900024414064,
                                "y": -68.85958862304688
                            },
                            "expr": "Pitch==440"
                        },
                        {
                            "type": "Text",
                            "id": "fe512b0d-173c-48f5-99a6-9e7aa40c1d2a",
                            "position": {
                                "x": -106.22432708740235,
                                "y": -52.17369842529297
                            },
                            "text": "The ZeroCross node counts the number of times a wave crosses the zero and ouputs that number in Hz (cycles per second).",
                            "width": 121.7086181640625
                        },
                        {
                            "type": "Expr",
                            "id": "e2689bb8-d0bd-4870-8108-6e025b1e7457",
                            "position": {
                                "x": 17.787368774414064,
                                "y": -23.906463623046876
                            },
                            "expr": "floor(Hz)"
                        },
                        {
                            "type": "ZeroCross",
                            "id": "76d77af1-4aa3-4640-aead-9304127010fc",
                            "position": {
                                "x": -121.16575622558594,
                                "y": -24.683807373046876
                            }
                        },
                        {
                            "type": "Mic",
                            "id": "9df6438c-6e00-482b-8d84-109dfe644276",
                            "position": {
                                "x": -211.4711151123047,
                                "y": -54.97058868408203
                            }
                        },
                        {
                            "type": "Value",
                            "id": "da2efd48-bb11-4cea-bd7e-2bcfe9b16ac8",
                            "position": {
                                "x": -118.77899932861328,
                                "y": 17.2222900390625
                            }
                        },
                        {
                            "type": "Text",
                            "id": "4ad92f4b-38d8-48a1-a565-e605bff49248",
                            "position": {
                                "x": 34.568260192871097,
                                "y": 87.26705932617188
                            },
                            "text": "This expression truncates the output of the Zero Cross node so that only whole numbers pass",
                            "width": 151.508056640625
                        },
                        {
                            "type": "Text",
                            "id": "229cee61-f9d2-42b2-84d5-f0337c16b2aa",
                            "position": {
                                "x": 8.6796875,
                                "y": 134.57421875
                            },
                            "exposedPosition": {
                                "x": -35.0,
                                "y": 20.0
                            },
                            "text": "A = 440 Tuner",
                            "width": 256.0
                        }
                    ],
                    "wires": [
                        {
                            "from": "5bdafce1-3c3c-4b97-bf63-21dbde69ea8a",
                            "output": 0,
                            "to": "a2f0cc33-fd9a-4ab6-b5d6-7a9f193dc647",
                            "input": 0
                        },
                        {
                            "from": "e2689bb8-d0bd-4870-8108-6e025b1e7457",
                            "output": 0,
                            "to": "bc4599cf-924b-417e-9c35-caf62e7e009f",
                            "input": 0
                        },
                        {
                            "from": "e2689bb8-d0bd-4870-8108-6e025b1e7457",
                            "output": 0,
                            "to": "5bdafce1-3c3c-4b97-bf63-21dbde69ea8a",
                            "input": 0
                        },
                        {
                            "from": "76d77af1-4aa3-4640-aead-9304127010fc",
                            "output": 0,
                            "to": "e2689bb8-d0bd-4870-8108-6e025b1e7457",
                            "input": 0
                        },
                        {
                            "from": "9df6438c-6e00-482b-8d84-109dfe644276",
                            "output": 1,
                            "to": "76d77af1-4aa3-4640-aead-9304127010fc",
                            "input": 0
                        },
                        {
                            "from": "76d77af1-4aa3-4640-aead-9304127010fc",
                            "output": 0,
                            "to": "da2efd48-bb11-4cea-bd7e-2bcfe9b16ac8",
                            "input": 0
                        }
                    ]
                }
            }
        ],
        "wires": []
    },
    "history": {
        "states": [
            {
                "id": "17d1efb5-2b66-4bb2-958d-951113ba1db2"
            }
        ],
        "current": "17d1efb5-2b66-4bb2-958d-951113ba1db2"
    },
    "undoStack": {
        "stack": [
            "17d1efb5-2b66-4bb2-958d-951113ba1db2"
        ],
        "current": 0
    }
}