aboutsummaryrefslogtreecommitdiffstats
path: root/Bowelyzer.sc
blob: 3d01b1a64e04aad13386fb4cf6a1f53d57612880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Bowelyzer{

  var <gui, <server, <analyzer, <config, <hub;

  *new{
    arg configFile;
    ^super.new.init(configFile);
  }

  init{
    //initialize with configuration, if available (else use default)
    arg configFile;
    config = BowelyzerConfig.new(configFile);
    server = Server.new(
      \bowelyzer,
      BowelyzerOSCHub.getNetAddr(
        config.config.at(\synthServerAddress),
        config.config.at(\synthServerPort)
      )
    );
    Server.default = server;
    server.waitForBoot({
      hub = BowelyzerOSCHub.new(config.config);
      analyzer = BowelyzerAnalyzer.new(config.config);
      //gui = BowelyzerGUI.new(config.config);
   },
   5,
   {"scsynth failed to start!".postln});
  }

}