| @@ -354,7 +354,7 @@ struct {identifier} : Module {{""" | |||||
| enum ParamIds {""" | enum ParamIds {""" | ||||
| for c in components['params']: | for c in components['params']: | ||||
| source += f""" | source += f""" | ||||
| PARAM_{c['name']},""" | |||||
| {c['name']}_PARAM,""" | |||||
| source += """ | source += """ | ||||
| PARAMS_LEN | PARAMS_LEN | ||||
| };""" | };""" | ||||
| @@ -364,7 +364,7 @@ struct {identifier} : Module {{""" | |||||
| enum InputIds {""" | enum InputIds {""" | ||||
| for c in components['inputs']: | for c in components['inputs']: | ||||
| source += f""" | source += f""" | ||||
| INPUT_{c['name']},""" | |||||
| {c['name']}_INPUT,""" | |||||
| source += """ | source += """ | ||||
| INPUTS_LEN | INPUTS_LEN | ||||
| };""" | };""" | ||||
| @@ -374,7 +374,7 @@ struct {identifier} : Module {{""" | |||||
| enum OutputIds {""" | enum OutputIds {""" | ||||
| for c in components['outputs']: | for c in components['outputs']: | ||||
| source += f""" | source += f""" | ||||
| OUTPUT_{c['name']},""" | |||||
| {c['name']}_OUTPUT,""" | |||||
| source += """ | source += """ | ||||
| OUTPUTS_LEN | OUTPUTS_LEN | ||||
| };""" | };""" | ||||
| @@ -384,7 +384,7 @@ struct {identifier} : Module {{""" | |||||
| enum LightIds {""" | enum LightIds {""" | ||||
| for c in components['lights']: | for c in components['lights']: | ||||
| source += f""" | source += f""" | ||||
| LIGHT_{c['name']},""" | |||||
| {c['name']}_LIGHT,""" | |||||
| source += """ | source += """ | ||||
| LIGHTS_LEN | LIGHTS_LEN | ||||
| };""" | };""" | ||||
| @@ -397,15 +397,15 @@ struct {identifier} : Module {{""" | |||||
| for c in components['params']: | for c in components['params']: | ||||
| source += f""" | source += f""" | ||||
| configParam(PARAM_{c['name']}, 0.f, 1.f, 0.f, "");""" | |||||
| configParam({c['name']}_PARAM, 0.f, 1.f, 0.f, "");""" | |||||
| for c in components['inputs']: | for c in components['inputs']: | ||||
| source += f""" | source += f""" | ||||
| configInput(INPUT_{c['name']}, "");""" | |||||
| configInput({c['name']}_INPUT, "");""" | |||||
| for c in components['outputs']: | for c in components['outputs']: | ||||
| source += f""" | source += f""" | ||||
| configOutput(OUTPUT_{c['name']}, "");""" | |||||
| configOutput({c['name']}_OUTPUT, "");""" | |||||
| source += """ | source += """ | ||||
| } | } | ||||
| @@ -434,10 +434,10 @@ struct {identifier}Widget : ModuleWidget {{ | |||||
| for c in components['params']: | for c in components['params']: | ||||
| if 'x' in c: | if 'x' in c: | ||||
| source += f""" | source += f""" | ||||
| addParam(createParam<RoundBlackKnob>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::PARAM_{c['name']}));""" | |||||
| addParam(createParam<RoundBlackKnob>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::{c['name']}_PARAM));""" | |||||
| else: | else: | ||||
| source += f""" | source += f""" | ||||
| addParam(createParamCentered<RoundBlackKnob>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::PARAM_{c['name']}));""" | |||||
| addParam(createParamCentered<RoundBlackKnob>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::{c['name']}_PARAM));""" | |||||
| # Inputs | # Inputs | ||||
| if len(components['inputs']) > 0: | if len(components['inputs']) > 0: | ||||
| @@ -445,10 +445,10 @@ struct {identifier}Widget : ModuleWidget {{ | |||||
| for c in components['inputs']: | for c in components['inputs']: | ||||
| if 'x' in c: | if 'x' in c: | ||||
| source += f""" | source += f""" | ||||
| addInput(createInput<PJ301MPort>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::INPUT_{c['name']}));""" | |||||
| addInput(createInput<PJ301MPort>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::{c['name']}_INPUT));""" | |||||
| else: | else: | ||||
| source += f""" | source += f""" | ||||
| addInput(createInputCentered<PJ301MPort>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::INPUT_{c['name']}));""" | |||||
| addInput(createInputCentered<PJ301MPort>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::{c['name']}_INPUT));""" | |||||
| # Outputs | # Outputs | ||||
| if len(components['outputs']) > 0: | if len(components['outputs']) > 0: | ||||
| @@ -456,10 +456,10 @@ struct {identifier}Widget : ModuleWidget {{ | |||||
| for c in components['outputs']: | for c in components['outputs']: | ||||
| if 'x' in c: | if 'x' in c: | ||||
| source += f""" | source += f""" | ||||
| addOutput(createOutput<PJ301MPort>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::OUTPUT_{c['name']}));""" | |||||
| addOutput(createOutput<PJ301MPort>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::{c['name']}_OUTPUT));""" | |||||
| else: | else: | ||||
| source += f""" | source += f""" | ||||
| addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::OUTPUT_{c['name']}));""" | |||||
| addOutput(createOutputCentered<PJ301MPort>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::{c['name']}_OUTPUT));""" | |||||
| # Lights | # Lights | ||||
| if len(components['lights']) > 0: | if len(components['lights']) > 0: | ||||
| @@ -467,10 +467,10 @@ struct {identifier}Widget : ModuleWidget {{ | |||||
| for c in components['lights']: | for c in components['lights']: | ||||
| if 'x' in c: | if 'x' in c: | ||||
| source += f""" | source += f""" | ||||
| addChild(createLight<MediumLight<RedLight>>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::LIGHT_{c['name']}));""" | |||||
| addChild(createLight<MediumLight<RedLight>>(mm2px(Vec({c['x']}, {c['y']})), module, {identifier}::{c['name']}_LIGHT));""" | |||||
| else: | else: | ||||
| source += f""" | source += f""" | ||||
| addChild(createLightCentered<MediumLight<RedLight>>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::LIGHT_{c['name']}));""" | |||||
| addChild(createLightCentered<MediumLight<RedLight>>(mm2px(Vec({c['cx']}, {c['cy']})), module, {identifier}::{c['name']}_LIGHT));""" | |||||
| # Widgets | # Widgets | ||||
| if len(components['widgets']) > 0: | if len(components['widgets']) > 0: | ||||
| @@ -495,7 +495,7 @@ Model* model{identifier} = createModel<{identifier}, {identifier}Widget>("{slug} | |||||
| def usage(script): | def usage(script): | ||||
| text = f"""VCV Rack Plugin Helper Utility | |||||
| text = f"""VCV Rack Plugin Development Helper | |||||
| Usage: {script} <command> ... | Usage: {script} <command> ... | ||||
| Commands: | Commands: | ||||