Skip to content

Instantly share code, notes, and snippets.

@sletz
Created August 8, 2023 15:35
Show Gist options
  • Save sletz/7321079b9a6bb0d9c15d13e14d97e497 to your computer and use it in GitHub Desktop.
Save sletz/7321079b9a6bb0d9c15d13e14d97e497 to your computer and use it in GitHub Desktop.
Test RNBO patch
{
"patcher": {
"fileversion": 1,
"appversion": {
"major": 8,
"minor": 5,
"revision": 5,
"architecture": "x64",
"modernui": 1
},
"classnamespace": "box",
"rect": [
85.0,
104.0,
640.0,
480.0
],
"bglocked": 0,
"openinpresentation": 0,
"default_fontsize": 12.0,
"default_fontface": 0,
"default_fontname": "Arial",
"gridonopen": 1,
"gridsize": [
15.0,
15.0
],
"gridsnaponopen": 1,
"objectsnaponopen": 1,
"statusbarvisible": 2,
"toolbarvisible": 1,
"lefttoolbarpinned": 0,
"toptoolbarpinned": 0,
"righttoolbarpinned": 0,
"bottomtoolbarpinned": 0,
"toolbars_unpinned_last_save": 0,
"tallnewobj": 0,
"boxanimatetime": 200,
"enablehscroll": 1,
"enablevscroll": 1,
"devicewidth": 0.0,
"description": "",
"digest": "",
"tags": "",
"style": "",
"subpatcher_template": "",
"assistshowspatchername": 0,
"boxes": [
{
"box": {
"id": "obj-1",
"maxclass": "comment",
"numinlets": 0,
"numoutlets": 1,
"patching_rect": [
50.0,
10.0,
350.0,
100.0
],
"text": "Faust generated RNBO patch, Copyright (c) 2023 Grame",
"fontsize": 16
}
},
{
"box": {
"id": "obj-2",
"maxclass": "newobj",
"numinlets": 4,
"numoutlets": 6,
"patching_rect": [
48.0,
48.0,
66.0,
22.0
],
"patcher": {
"fileversion": 1,
"appversion": {
"major": 8,
"minor": 5,
"revision": 5,
"architecture": "x64",
"modernui": 1
},
"classnamespace": "rnbo",
"rect": [
85.0,
104.0,
640.0,
480.0
],
"bglocked": 0,
"openinpresentation": 0,
"default_fontsize": 12.0,
"default_fontface": 0,
"default_fontname": "Arial",
"gridonopen": 1,
"gridsize": [
15.0,
15.0
],
"gridsnaponopen": 1,
"objectsnaponopen": 1,
"statusbarvisible": 2,
"toolbarvisible": 1,
"lefttoolbarpinned": 0,
"toptoolbarpinned": 0,
"righttoolbarpinned": 0,
"bottomtoolbarpinned": 0,
"toolbars_unpinned_last_save": 0,
"tallnewobj": 0,
"boxanimatetime": 200,
"enablehscroll": 1,
"enablevscroll": 1,
"devicewidth": 0.0,
"description": "",
"digest": "",
"tags": "",
"style": "",
"subpatcher_template": "",
"assistshowspatchername": 0,
"boxes": [
{
"box": {
"id": "obj-1",
"maxclass": "codebox~",
"numinlets": 0,
"numoutlets": 1,
"patching_rect": [
500.0,
500.0,
400.0,
200.0
],
"code": "// Code generated with Faust version 2.66.2\r\n// Compilation options: -lang codebox -ct 1 -es 1 -mcd 16 -double -ftz 0 \r\n// Additional functions\r\nfunction faust_rint(x) {\r\n\t let i : Int = trunc(x); \r\n\t let f : number = x - i; \r\n\t let odd : Int = abs(i % 2) >= 1; \r\n\t let even : Int = odd == 0; \r\n\t let a : number = (x > 0) * (((f > 0.5) * even) + ((f >= 0.5) * odd)); \r\n\t let b : number = (x < 0) * (((f < -0.5) * even) + ((f <= -0.5) * odd)); \r\n\t return i + (a - b); \r\n} \r\n// Params\r\n// Globals\r\n// Fields\r\n@state fSampleRate_cb : Int = 0;\r\n@state fUpdated : Int = 0;\r\n\r\n// Init\r\nfunction dspsetup() {\r\n\tfUpdated = true;\r\n\tfSampleRate_cb = samplerate();\r\n}\r\n// Control\r\nfunction control() {\r\n}\r\n// Update parameters\r\nfunction update() {\r\n\tif (fUpdated) { fUpdated = false; control(); }\r\n}\r\n// Compute one frame\r\nfunction compute(i0,i1,i2,i3) {\r\n\tinput0_cb = i0;\r\n\tinput1_cb = i1;\r\n\tinput2_cb = i2;\r\n\tinput3_cb = i3;\r\n\toutput0_cb = input0_cb;\r\n\toutput1_cb = input1_cb;\r\n\toutput2_cb = input2_cb;\r\n\toutput3_cb = input3_cb;\r\n\treturn [output0_cb,output1_cb,output2_cb,output3_cb];\r\n}\r\n// Update parameters\r\nupdate();\r\n// Compute one frame\r\noutputs = compute(in1,in2,in3,in4);\r\n// Write the outputs\r\nout1 = outputs[0];\r\nout2 = outputs[1];\r\nout3 = outputs[2];\r\nout4 = outputs[3];\r\n",
"outlettype": [
""
],
"rnbo_classname": "codebox~",
"rnbo_extra_attributes": {
"code": "// Code generated with Faust version 2.66.2\r\n// Compilation options: -lang codebox -ct 1 -es 1 -mcd 16 -double -ftz 0 \r\n// Additional functions\r\nfunction faust_rint(x) {\r\n\t let i : Int = trunc(x); \r\n\t let f : number = x - i; \r\n\t let odd : Int = abs(i % 2) >= 1; \r\n\t let even : Int = odd == 0; \r\n\t let a : number = (x > 0) * (((f > 0.5) * even) + ((f >= 0.5) * odd)); \r\n\t let b : number = (x < 0) * (((f < -0.5) * even) + ((f <= -0.5) * odd)); \r\n\t return i + (a - b); \r\n} \r\n// Params\r\n// Globals\r\n// Fields\r\n@state fSampleRate_cb : Int = 0;\r\n@state fUpdated : Int = 0;\r\n\r\n// Init\r\nfunction dspsetup() {\r\n\tfUpdated = true;\r\n\tfSampleRate_cb = samplerate();\r\n}\r\n// Control\r\nfunction control() {\r\n}\r\n// Update parameters\r\nfunction update() {\r\n\tif (fUpdated) { fUpdated = false; control(); }\r\n}\r\n// Compute one frame\r\nfunction compute(i0,i1,i2,i3) {\r\n\tinput0_cb = i0;\r\n\tinput1_cb = i1;\r\n\tinput2_cb = i2;\r\n\tinput3_cb = i3;\r\n\toutput0_cb = input0_cb;\r\n\toutput1_cb = input1_cb;\r\n\toutput2_cb = input2_cb;\r\n\toutput3_cb = input3_cb;\r\n\treturn [output0_cb,output1_cb,output2_cb,output3_cb];\r\n}\r\n// Update parameters\r\nupdate();\r\n// Compute one frame\r\noutputs = compute(in1,in2,in3,in4);\r\n// Write the outputs\r\nout1 = outputs[0];\r\nout2 = outputs[1];\r\nout3 = outputs[2];\r\nout4 = outputs[3];\r\n",
"hot": 0
}
}
},
{
"box": {
"id": "obj-2",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
48.0,
48.0,
66.0,
22.0
],
"text": "in~ 1",
"outlettype": [
""
],
"rnbo_classname": "in~"
}
},
{
"box": {
"id": "obj-3",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
192.0,
48.0,
66.0,
22.0
],
"text": "in~ 2",
"outlettype": [
""
],
"rnbo_classname": "in~"
}
},
{
"box": {
"id": "obj-4",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
336.0,
48.0,
66.0,
22.0
],
"text": "in~ 3",
"outlettype": [
""
],
"rnbo_classname": "in~"
}
},
{
"box": {
"id": "obj-5",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
480.0,
48.0,
66.0,
22.0
],
"text": "in~ 4",
"outlettype": [
""
],
"rnbo_classname": "in~"
}
},
{
"box": {
"id": "obj-6",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
48.0,
120.0,
66.0,
22.0
],
"text": "out~ 1",
"outlettype": [
""
],
"rnbo_classname": "out~"
}
},
{
"box": {
"id": "obj-7",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
192.0,
120.0,
66.0,
22.0
],
"text": "out~ 2",
"outlettype": [
""
],
"rnbo_classname": "out~"
}
},
{
"box": {
"id": "obj-8",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
336.0,
120.0,
66.0,
22.0
],
"text": "out~ 3",
"outlettype": [
""
],
"rnbo_classname": "out~"
}
},
{
"box": {
"id": "obj-9",
"maxclass": "newobj",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
480.0,
120.0,
66.0,
22.0
],
"text": "out~ 4",
"outlettype": [
""
],
"rnbo_classname": "out~"
}
}
],
"lines": [
{
"patchline": {
"source": [
"obj-2",
0
],
"destination": [
"obj-1",
0
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-3",
0
],
"destination": [
"obj-1",
1
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-4",
0
],
"destination": [
"obj-1",
2
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-5",
0
],
"destination": [
"obj-1",
3
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-1",
0
],
"destination": [
"obj-6",
0
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-1",
1
],
"destination": [
"obj-7",
0
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-1",
2
],
"destination": [
"obj-8",
0
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-1",
3
],
"destination": [
"obj-9",
0
],
"order": 0
}
}
],
"parameters": {},
"dependency_cache": [],
"autosave": 0
},
"text": "rnbo~",
"outlettype": [
""
],
"title": "thru",
"saved_object_attributes": {
"optimization": "O3",
"title": "thru",
"dumpoutlet": 1
}
}
},
{
"box": {
"id": "obj-3",
"maxclass": "ezdac~",
"numinlets": 1,
"numoutlets": 1,
"patching_rect": [
64,
387.0,
45.0,
45.0
],
"text": "ezdac~",
"outlettype": [
""
]
}
}
],
"lines": [
{
"patchline": {
"source": [
"obj-2",
0
],
"destination": [
"obj-3",
0
],
"order": 0
}
},
{
"patchline": {
"source": [
"obj-2",
1
],
"destination": [
"obj-3",
1
],
"order": 1
}
},
{
"patchline": {
"source": [
"obj-2",
2
],
"destination": [
"obj-3",
2
],
"order": 2
}
},
{
"patchline": {
"source": [
"obj-2",
3
],
"destination": [
"obj-3",
3
],
"order": 3
}
}
],
"parameters": {},
"dependency_cache": [],
"autosave": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment