Skip to content

Commit e124025

Browse files
committed
feat: refined epic 5
1 parent 671443f commit e124025

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

docs/epic-5.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,25 @@ Modify the `StatusTool.java` to gather additional information from the Bitwig St
8383
"index": 0, // 0-based index of the device in the track's device chain
8484
"name": "Polymer", // Name of the selected device
8585
"bypassed": false, // True if the device is currently bypassed
86-
"parameters": [ // Parameters of the selected device
86+
"parameters": [ // Parameters of the selected device (reflects the 8 remote controls of the currently selected page)
8787
{
8888
"index": 0, // 0-7
89-
"name": "Oscillator Mix", // From /device/param/{1-8}/name
90-
"value": 0.75, // From /device/param/{1-8}/value (normalized 0.0-1.0)
91-
"display_value": "75%" // From /device/param/{1-8}/valueStr
89+
"exists": true, // True if a parameter is mapped to this remote slot on the current page
90+
"name": "Oscillator Mix", // From device.getRemoteControls().getParameter(i).name().get()
91+
"value": 0.75, // From device.getRemoteControls().getParameter(i).value().get() (normalized 0.0-1.0)
92+
"raw_value": 75.0, // From device.getRemoteControls().getParameter(i).value().getRaw() (native value)
93+
"display_value": "75%" // From device.getRemoteControls().getParameter(i).displayedValue().get()
94+
},
95+
{
96+
"index": 1,
97+
"exists": false,
98+
"name": null,
99+
"value": null,
100+
"raw_value": null,
101+
"display_value": null
92102
}
93-
// ... up to 8 device parameters, only include if accessible/exists
103+
// ... up to 8 device remote controls, mirroring structure of Epic 8's get_device_details.remote_controls
104+
// Only 'name', 'value', 'raw_value', 'display_value' are null if 'exists' is false.
94105
]
95106
}
96107
}
@@ -99,15 +110,17 @@ Modify the `StatusTool.java` to gather additional information from the Bitwig St
99110
## 5. Technical Considerations
100111

101112
* The `StatusTool.java` will need to interface with various parts of the Bitwig Studio Java API (Application, Project, Transport, Track, Device, ClipLauncherSlotBank, etc.) to retrieve the required information.
102-
* Care must be taken to handle cases where information might be unavailable (e.g., no device selected, no clip slot selected, project parameters not configured). In such cases, relevant fields should be `null` or omitted where appropriate (e.g., an empty array for parameters if none exist).
103-
* The `value` for parameters should be normalized (0.0-1.0) where applicable, consistent with `get_selected_device_parameters`. `display_value` will provide the formatted string.
113+
* For `selected_device.parameters`, the structure should mirror the `remote_controls` array from Epic 8's `get_device_details` tool, providing an 8-element array where each element has an `exists` flag. This reflects the 8 remote controls of the currently selected page of the selected device. This includes adding `raw_value`.
114+
* Care must be taken to handle cases where information might be unavailable (e.g., no device selected, no clip slot selected, project parameters not configured). In such cases, relevant fields should be `null` or an empty array `[]` for lists.
115+
* The `value` for parameters should be normalized (0.0-1.0) where applicable, consistent with `get_selected_device_parameters`. `display_value` will provide the formatted string. `raw_value` provides the native, unnormalized value.
104116
* Indices (`track_index`, `slot_index`, `scene_index`, `device.index`) should be 0-based.
105117
* The `api-reference.md` will need to be updated to reflect these changes to the `status` command's response.
106118

107119
## 6. Acceptance Criteria
108120

109121
* The `status` MCP command returns a JSON object matching the structure defined above.
110122
* All fields in the JSON response accurately reflect the current state of Bitwig Studio.
123+
* The `selected_device.parameters` array in the response correctly represents the 8 remote controls of the selected device's current page, including `exists`, `name`, `value`, `raw_value`, and `display_value` for each, aligning with the structure in Epic 8.
111124
* The `StatusTool.java` correctly queries the Bitwig API for all required data points.
112125
* The `api-reference.md` is updated with the new response format for the `status` command.
113126
* The changes are thoroughly tested for various Bitwig project states (e.g., empty project, project with content, different selections).

0 commit comments

Comments
 (0)