diff --git a/source/oopsy.js b/source/oopsy.js index aeea5ad..5c143de 100755 --- a/source/oopsy.js +++ b/source/oopsy.js @@ -176,7 +176,6 @@ const component_defs = { Switch3: { typename: "daisy::Switch3", pin: "a,b", - updaterate: "${name}.SetUpdateRate(seed.AudioCallbackRate());", mapping: [ { name: "${name}", get: "(hardware.${name}.Read()*0.5f+0.5f)", range: [0, 2] } ] @@ -333,7 +332,8 @@ struct Daisy { ${e.name}.Init(seed.GetPin(${e.pin.a}), seed.GetPin(${e.pin.b}));` ).join("")} ${components.filter((e) => e.typename == "daisy::GateIn").map((e, i) => ` - ${e.name}.Init(seed.GetPin(${e.pin}));` + dsy_gpio_pin ${e.name}_pin = seed.GetPin(${e.pin}); + ${e.name}.Init(&${e.name}_pin);` ).join("")} ${components.filter((e) => e.typename == "daisy::Encoder").map((e, i) => ` ${e.name}.Init(seed.GetPin(${e.pin.a}), seed.GetPin(${e.pin.b}), seed.GetPin(${e.pin.click}), seed.AudioCallbackRate());` diff --git a/source/seed.versio.json b/source/seed.versio.json new file mode 100644 index 0000000..34e9c81 --- /dev/null +++ b/source/seed.versio.json @@ -0,0 +1,98 @@ +{ + "name":"versio", + "defines": {}, + "components": { + "knob1": { + "component": "AnalogControl", + "pin": 21 + }, + "knob2": { + "component": "AnalogControl", + "pin": 22 + }, + "knob3": { + "component": "AnalogControl", + "pin": 28 + }, + "knob4": { + "component": "AnalogControl", + "pin": 23 + }, + "knob5": { + "component": "AnalogControl", + "pin": 16 + }, + "knob6": { + "component": "AnalogControl", + "pin": 17 + }, + "knob7": { + "component": "AnalogControl", + "pin": 19 + }, + + "button1": { + "component": "Switch", + "pin": 30 + }, + "gate1": { + "component": "GateIn", + "pin": 24 + }, + "sw1": { + "component": "Switch3", + "pin": {"a":6, "b":5 } + }, + "sw2": { + "component": "Switch3", + "pin": {"a":1, "b":0 } + }, + "led1": { + "component": "RgbLed", + "pin": {"r":10, "g":3, "b":4 } + }, + "led2": { + "component": "RgbLed", + "pin": {"r":12, "g":13, "b":11 } + }, + "led3": { + "component": "RgbLed", + "pin": {"r":25, "g":26, "b":14 } + }, + "led4": { + "component": "RgbLed", + "pin": {"r":29, "g":27, "b":15 } + } + }, + "aliases": { + "switch1": "sw1", + "switch2": "sw2", + + "ctrl1": "knob1", + "ctrl2": "knob2", + "ctrl3": "knob3", + "ctrl4": "knob4", + "ctrl5": "knob5", + "ctrl6": "knob6", + "ctrl7": "knob7", + "cv1": "knob1", + "cv2": "knob2", + "cv3": "knob3", + "cv4": "knob4", + "cv5": "knob5", + "cv6": "knob6", + "cv7": "knob7", + + "ctrl": "knob1", + "cv": "knob1", + "led": "led1", + "gate": "gate1", + "switch": "sw1", + "knob": "knob1", + "button": "button1", + "tap": "button1", + "fsu": "button1", + "abc": "sw1", + "xyz": "sw2" + } +} \ No newline at end of file diff --git a/source/test.sh b/source/test.sh index 1b5763a..59d9587 100755 --- a/source/test.sh +++ b/source/test.sh @@ -4,5 +4,5 @@ node oopsy.js writejson ../templates/oopsy_field.cpp field && \ node oopsy.js writejson ../templates/oopsy_petal.cpp petal && \ node oopsy.js writejson ../templates/oopsy_pod.cpp pod && \ node oopsy.js writejson ../templates/oopsy_versio.cpp versio && \ -node oopsy.js writejson ../templates/oopsy_pod.cpp seed.pod.json \ -echo OK \ No newline at end of file +node oopsy.js writejson ../templates/oopsy_pod.cpp seed.pod.json && \ +node oopsy.js writejson ../templates/oopsy_versio.cpp seed.versio.json \ No newline at end of file