Get all properties for a specific frame
| 214 | |
| 215 | // Get all properties for a specific frame |
| 216 | std::string Distortion::PropertiesJSON(int64_t requested_frame) const { |
| 217 | |
| 218 | // Generate JSON properties list |
| 219 | Json::Value root = BasePropertiesJSON(requested_frame); |
| 220 | |
| 221 | // Keyframes |
| 222 | root["distortion_type"] = add_property_json("Distortion Type", distortion_type, "int", "", NULL, 0, 3, false, requested_frame); |
| 223 | root["input_gain"] = add_property_json("Input Gain (dB)", input_gain.GetValue(requested_frame), "int", "", &input_gain, -24, 24, false, requested_frame); |
| 224 | root["output_gain"] = add_property_json("Output Gain (dB)", output_gain.GetValue(requested_frame), "int", "", &output_gain, -24, 24, false, requested_frame); |
| 225 | root["tone"] = add_property_json("Tone (dB)", tone.GetValue(requested_frame), "int", "", &tone, -24, 24, false, requested_frame); |
| 226 | |
| 227 | // Add distortion_type choices (dropdown style) |
| 228 | root["distortion_type"]["choices"].append(add_property_choice_json("Hard Clipping", HARD_CLIPPING, distortion_type)); |
| 229 | root["distortion_type"]["choices"].append(add_property_choice_json("Soft Clipping", SOFT_CLIPPING, distortion_type)); |
| 230 | root["distortion_type"]["choices"].append(add_property_choice_json("Exponential", EXPONENTIAL, distortion_type)); |
| 231 | root["distortion_type"]["choices"].append(add_property_choice_json("Full Wave Rectifier", FULL_WAVE_RECTIFIER, distortion_type)); |
| 232 | root["distortion_type"]["choices"].append(add_property_choice_json("Half Wave Rectifier", HALF_WAVE_RECTIFIER, distortion_type)); |
| 233 | |
| 234 | // Return formatted string |
| 235 | return root.toStyledString(); |
| 236 | } |