JSON Component name with capitals

Hello!

I was wondering if someone could help me with my problem of implementing a gate input on my Daisy Seed. The following PlugData patch will successfully compile to a Daisy patch.Init when I select it as a target board. Everything works great. The problem starts when I try to compile this same patch to a Daisy Seed. Posted below is my current JSON file. I’ve tried many things, but I cannot get the gate portion to compile without error. Note that that this patch and JSON file work great with the Daisy Seed if I omit the gate portion (trigging the sound via the switch). What am I missing? I did find a compenent_defs.json resource file on Github- Do I need something from this? I’ve tried implementing the GateIn info from there, but haven’t had any luck (I think I need to know where to insert if this is needed). I’m also attaching a compiler error message to give some more info on the situation. Any help would be greatly appreciated!

{
    "name": "customseed",
    "som": "seed",
    "components": {
        "ctrl1": {
            "component": "AnalogControl",
            "pin": 15

 },

        "ctrl2": {
            "component": "AnalogControl",
            "pin": 16

},
        "sw1": {
            "component": "Switch",
            "pin": 13

 },
	"Gate1_Trig": {
		"component": "GateIn",
		"pin": "13",
		"default": true
        }
    }
}

All component names have to be lower-case. Any name used in the patch will be converted to lower-case as well. (so you can write it with caps, but the definition still has to be lower-case)

Try changing your definition in the json to gate1_trig and it should work.

Thank you for the suggestion. When changed to lowercase, the compiler switches to a different issue- It changes the status export to successful, however, it says “DaisyCustomseed has no member named gate1_trig”, and fails to load the patch. Below is the modified JSON file and response. Does this spark any theories that would help resolve this issue?

{
    "name": "customseed",
    "som": "seed",
    "components": {
        "ctrl1": {
            "component": "AnalogControl",
            "pin": 15

 },

        "ctrl2": {
            "component": "AnalogControl",
            "pin": 16

},
        "sw1": {
            "component": "Switch",
            "pin": 13

 },
	"gate1_trig": {
		"component": "GateIn",
		"pin": "13",
		"default": true
        }
    }
}

Oops, sorry. In the components you just have to call the component gate1 and then inside the patch you can use all the various “GateIn” variants.

gate1 in the component can then be used with the trig function as [r gate1_trig @hv_param] in the patch.

So you don’t add a different component, you only change how you approach the component from the patch with the additional variation name.

I get the same error message when I change the component to gate1. Is it possible you mean GateIn? I’m wondering because the patch.Init uses this in its JSON file:

		"gate_in_1": {
			"component": "GateIn",
			"pin": "B10",
			"default": true

So then I try using GateIn, and I’m able to bypass the initial error- It starts compiling, but it always ends telling me there is no member named whatever I’ve called it. This initially confused me because remember- This patch works if I choose patch.Init as the target. The compiler knows what to do with Gate1_Trig in that scenario. I’ve tried a number of ways to name it in the patch and JSON. I’ve also tried copying the aliases from the patch.Init file and placing them in my JSON (matching the names in the patch as well), all without luck. Could I please share the 2 versions with errors that I keep going back to in hope for possible feedback? Here they are:

{
    "name": "customseed",
    "som": "seed",
    "components": {
        "ctrl1": {
            "component": "AnalogControl",
            "pin": 15

 },

        "ctrl2": {
            "component": "AnalogControl",
            "pin": 16

},
        "sw1": {
            "component": "Switch",
            "pin": 13

 },
	"gate1": {
		"component": "Gate1",
		"pin": "13",
		"default": true
        }
    }
}

And this following one seems to be the closest, but I can’t seem to get past the error despite what I name it in the patch or JSON file:

{
    "name": "customseed",
    "som": "seed",
    "components": {
        "ctrl1": {
            "component": "AnalogControl",
            "pin": 15

 },

        "ctrl2": {
            "component": "AnalogControl",
            "pin": 16

},
        "sw1": {
            "component": "Switch",
            "pin": 13

 },
	"gate1": {
		"component": "GateIn",
		"pin": "13",
		"default": true
        }
    }
}

I would like to add a bit of information that might help shed light on this problem: The last JSON file I posted WILL compile without error if I remove “default”: true, but embeds a patch that isn’t working correctly, producing static / noise.

Where does the "default": true come from? It is not part of the component specification.

It is best to look at how other board definitions setup their pin configuration: json2daisy/src/json2daisy/resources at main · electro-smith/json2daisy · GitHub

That’s a very good question! The reason it’s there is because it was copied from the board definition of the patch.Init JSON file found in the link you referred to. Since I had success compiling the patch with patch.Init as the target, I’ve been studying that file. But I’m a dumb guitar player at my core, and I very often have more questions in life than answers. However-

I would like to report success! I stated earlier that the removal of that "default": true
line was producing static / noise. It was actually firing off the voice rapidly, and I mistook it for noise. I corrected this by adding the gate buffer hardware from the patch.Init schematic to my own design. This is the section that I used:

And just to help others in the future that might stumble on the same thing, the JSON that got it working looks like this:

{
    "name": "customseed",
    "som": "seed",
    "components": {
        "ctrl1": {
            "component": "AnalogControl",
            "pin": 15

 },

        "ctrl2": {
            "component": "AnalogControl",
            "pin": 16

},
        "sw1": {
            "component": "Switch",
            "pin": 13

 },
        "gate1": {
            "component": "GateIn",
            "pin": 13
        }
    }
}

Dreamer, thank you so much for your help!!

1 Like

Ah! I think for Patch.Init() this is specific for the PatchSubModule config.
Since that has a more standardized/formalized pinout.

We should better document the differences between Seed and PatchSM in this way.