Package net.paulhertz.pixelaudio.io

# Class AudioBrushSessionLoader

java.lang.Object
net.paulhertz.pixelaudio.io.AudioBrushSessionLoader

public final class AudioBrushSessionLoader extends Object
Read AudioBrush session data form JSON files. Used in the example sketch `Bagatelle`.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `AudioBrushSessionLoader.BrushData`
  `static enum`
  `AudioBrushSessionLoader.JsonFileType`
  `static class`
  `AudioBrushSessionLoader.LoadResult`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `private`
  `AudioBrushSessionLoader()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static AudioBrushSessionLoader.JsonFileType`
  `detectType(processing.data.JSONObject root)`
  `static AudioBrushSessionLoader.LoadResult`
  `load(File chosenFile)`
  `private static AudioBrushSessionLoader.LoadResult`
  `loadSession(File sessionFile, processing.data.JSONObject root)`
  `private static AudioBrushSessionLoader.LoadResult`
  `loadSingleFromConfig(File configFile, processing.data.JSONObject root)`
  `private static AudioBrushSessionLoader.LoadResult`
  `loadSingleFromGesture(File gestureFile, processing.data.JSONObject root)`
  `static processing.data.JSONObject`
  `readRoot(File file)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AudioBrushSessionLoader

    private AudioBrushSessionLoader()

- ## Method Details

  - ### load

    public static AudioBrushSessionLoader.LoadResult load(File chosenFile) throws IOException
    Throws:
      `IOException`

  - ### readRoot

    public static processing.data.JSONObject readRoot(File file) throws IOException
    Throws:
      `IOException`

  - ### detectType

    public static AudioBrushSessionLoader.JsonFileType detectType(processing.data.JSONObject root)

  - ### loadSingleFromGesture

    private static AudioBrushSessionLoader.LoadResult loadSingleFromGesture(File gestureFile, processing.data.JSONObject root) throws IOException
    Throws:
      `IOException`

  - ### loadSingleFromConfig

    private static AudioBrushSessionLoader.LoadResult loadSingleFromConfig(File configFile, processing.data.JSONObject root) throws IOException
    Throws:
      `IOException`

  - ### loadSession

    private static AudioBrushSessionLoader.LoadResult loadSession(File sessionFile, processing.data.JSONObject root) throws IOException
    Throws:
      `IOException`