File: README.md

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (65 lines) | stat: -rw-r--r-- 2,755 bytes parent folder | download | duplicates (3)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

## The libfaustremote library

The `libfaustremote` library allows to compile and process a Faust DSP program on a remote machine.

### Remote server 

The server launches a compilation service, waiting for DSPs to compile. Dependencies are:        
* `LLVM` using macport
* `faust` make + sudo make install at the root of Faust project
* `HTTPDFaust` make httpd + sudo make install at the root of Faust project
* `libmicrohttpd` using macport
* `libjacknet` download JackOSX package at: https://jackaudio.org

Here is the API:

* `remote_dsp_server* createRemoteDSPServer()`
* `void deleteRemoteDSPServer(remote_dsp_server* server)`

Use the server class to start/stop the compilation service:

```
class remote_dsp_server {
    public: 

    bool start(int port = 7777); /* Start the DSP compilation service on a given port */
    void stop();                 /* Stop the DSP compilation */

    void setCreateDSPFactoryCallback(createFactoryDSPCallback callback, void* callback_arg);
    void setDeleteDSPFactoryCallback(deleteFactoryDSPCallback callback, void* callback_arg);

    void setCreateDSPInstanceCallback(createInstanceDSPCallback callback, void* callback_arg);
    void setDeleteDSPInstanceCallback(deleteInstanceDSPCallback callback, void* callback_arg);
};
```

### Remote client 

Here is the API:

To easily include remote processing in your projects, this API has been created. It has the similar prototype as `llvm-dsp` dynamic dsp:

* `createRemoteDSPFactoryFromFile(const std::string& filename, int argc, const char* argv[], const string& ipServer, int portServer, string& error, int opt_level)`
* `createRemoteDSPFactoryFromString(const string& name_app, const string& dsp_content, int argc, const char* argv[], const string& ipServer, int portServer, string& error, int opt_level)`
* `createRemoteDSPInstance(remote_dsp_factory* factory, int argc, const char* argv[], int samplingRate, int bufferSize, string& error)`

Use instance as any static DSP:

* `virtual int getNumInputs()`
* `virtual int getNumOutputs()`
* `virtual void init(int samplingFreq)`
* `virtual void buildUserInterface(UI* ui)`
* `virtual void compute(int count, FAUSTFLOAT** input, FAUSTFLOAT** output)`

* `void deleteRemoteDSPInstance(remote_dsp* dsp)`
* `void deleteRemoteDSPFactory(remote_dsp_factory* factory)`

This example shows how to use the API. In this example you can pass in command line:

* the IP of remote Server you want to use
* NetJack parameters of slave to be open on remote machine (localIP/Port/Latency/Compression)
* the dsp files you want to run in JACK/QT environment and the number of instances for each
* syntax is given with `./RemoteClient --help`

The following has to be added at link time: `-lfaustremote -lcurl -ljacknet`.