Templates / Features / Improvements / Bugs

Feel free to create pull requests in github/pihitan or contact me at me@ravencrows.xyz For errors, there should be a /log directory in the same directory as your jar / exe.

Creating Templates


If installed, create a .json file and place it in C:\Users\{user}\AppData\Local\Pihitan\templates
If ran through jar, just place it in the same directory.

Template format

A template is a json file in the following format

  {
    "id": "Display Name",
    "windowName": "Archetype Plini X", // Needed for autodetection
    "color": [ 0, 0.5, 0.7, 1], // [ r, g, b, a ] max value is 1, used in highlight and wireframe
    "author": "pihitan", // displayed on start
    ... 
    "sections": [  // Array of sections
      {
        "id": "pre-fx", // Section details
        ...
        "items": [ // Array of items
          {
            "id": "compressor", // item details
            "type": "GEAR",
            "pos": {
              "x": 15,
              "y": 70
            },
            ... // items may contain items
        ]
      }
    ]
  }
  
Each number defined in the template is a % size of the actual window with the upper left corner as x = 0, y = 0. Here are some examples of points in the grid.
Example coordinate grid, (0, 0) is upper left.
Define the position of prev / next preset button

  {
    "id": "program id", // display name
    ...
    "nextPreset": {
      "x": 48,
      "y": 15
    },
    "prevPreset": {
      "x": 45,
      "y": 15
    },
    ...
  }
    
Define sections. It is an array of objects. Each object has the following:

  {
    ...
      "id": "amp-clean",  // this will be displayed on screen
      "pos": {  // position that will be clicked
        "x": 39,
        "y": 10
      },
      "preStep": { // optional, this will be clicked after pos
        "x": 45,   // used in amp selectors
        "y": 10 
      },
      "items": [ ... ] // will discuss in the next section
    ...
  }
    
Define items.

  {
    "id": "gain", // will be displayed as {section}:{item-id}
    "type": "GEAR", // Can be KNOB, TOGGLE, GEAR
    "pos": { // Position
      "x": 25,
      "y": 74
    },
    "items": [...] // Optional, only defined when type is GEAR
  },
    
Here's an example of an item declaration for a drive/effects pedal.

  {
    "id": "drive",
    "type": "GEAR",
    "pos": {
      "x": 62,
      "y": 70
    },
    "items": [
      {
        "id": "drive",
        "type": "KNOB",
        "pos": {
          "x": 55,
          "y": 41
        }
      },
      {
        "id": "od/fuzz",
        "type": "TOGGLE",
        "pos": {
          "x": 62,
          "y": 41
        }
      },
      {
        "id": "tone",
        "type": "KNOB",
        "pos": {
          "x": 62,
          "y": 52
        }
      }
    ]
  }
    
In this example, when you are currently in drive, pressing space will make the program click on the parent item pos x = 62, y = 70

If currently in od/fuzz, pressing space will press on x = 62, y = 41 instead.
Please use the plini-x.json template that is included in the installation as a template / guide. Please consider sharing your templates. Thanks!