Read and write file from custom-module

Hi,
is there a way to read and write a JSON file from the custom-module ?

Let’s explain the case of use :

  • I would like to give the path of the json as a parameter in the custom-module
  • when the module is initialized, i would like to open this file and set the content as a variable, used in the rest of the module.
  • Morever I would like to export this variable as a JSON file by catching a specific OSC command.

Do you think there is a way to do sth like that ?

Best regards

You can’t read/write files from the custom module for now, it would be nice to have that but it would need some restrictions (only json files maybe).

In v0.47.0 you can now do that using the two functions loadJSON and saveJSON.

1 Like