Browse Source

Pushed buttons now become red, add a warning for non supported 'soundfile'. Improve documentation.

faust
Stephane Letz Andrew Belt 4 years ago
parent
commit
f1fe484aae
3 changed files with 24 additions and 2 deletions
  1. +11
    -1
      Faust.md
  2. +1
    -0
      Makefile
  3. +12
    -1
      src/FaustEngine.cpp

+ 11
- 1
Faust.md View File

@@ -4,10 +4,20 @@ The [Faust audio DSP language](https://faust.grame.fr) can be used in VCV Protot


## Compiling on OSX ## Compiling on OSX


The Faust *libfaust* library will have to be compiled as a dynamic version, and installed on your machine. Then the [Faust aware VCV Prototype](https://github.com/sletz/VCV-Prototype) can be compiled and installed.
The Faust *libfaust* dynamic library has to be available in your system. You can get is from a precompiled Faust release (simpler), or compile it yourself (harder). Then the [Faust aware VCV Prototype](https://github.com/sletz/VCV-Prototype) can be compiled and installed.

### Installing the *libfaust* dynamic library from a precompiled package:

- go on Faust [release page](https://github.com/grame-cncm/faust/releases) and get the latest .dmg for OSX.
- mount the disk image and copy the 3 *libfaust.dylib*, *libfaust.2.dylib* and *libfaust.x.y.z.dylib* files located in the disk image */lib* folder in your system */usr/local/lib* folder

### Compiling the *libfaust* dynamic library:


- clone the [Faust GitHub project](https://github.com/grame-cncm/faust) - clone the [Faust GitHub project](https://github.com/grame-cncm/faust)
- assuming you have installed the LLVM dependency (with brew or macports on OSX), type `make world` to compile the libfaust libray in dynamic mode (read https://github.com/grame-cncm/faust/wiki/Building if needed) - assuming you have installed the LLVM dependency (with brew or macports on OSX), type `make world` to compile the libfaust libray in dynamic mode (read https://github.com/grame-cncm/faust/wiki/Building if needed)

### Compiling the VCV Prototype:

- clone the [Faust aware VCV Prototype](https://github.com/sletz/VCV-Prototype) then type `make && make install` to build it - clone the [Faust aware VCV Prototype](https://github.com/sletz/VCV-Prototype) then type `make && make install` to build it
- you can now add a Faust aware VCV Prototype in your Rack session and start coding in Faust. - you can now add a Faust aware VCV Prototype in your Rack session and start coding in Faust.




+ 1
- 0
Makefile View File

@@ -263,3 +263,4 @@ FAUST_MAKE_FLAGS += prefix="$(DEP_PATH)"
endif endif


include $(RACK_DIR)/plugin.mk include $(RACK_DIR)/plugin.mk


+ 12
- 1
src/FaustEngine.cpp View File

@@ -79,7 +79,13 @@ struct RackUI : public GenericUI
{ {
int index = getIndex(fValue); int index = getIndex(fValue);
if (fKey == "switch" && (index != -1)) { if (fKey == "switch" && (index != -1)) {
fUpdateFunIn.push_back([=] (ProcessBlock* block) { *zone = block->switches[index-1]; });
fUpdateFunIn.push_back([=] (ProcessBlock* block)
{
*zone = block->switches[index-1];
// And set the color to red when on
block->switchLights[index-1][0] = *zone;
});
} }
} }
@@ -162,6 +168,11 @@ struct RackUI : public GenericUI
{ {
addBarGraph(zone); addBarGraph(zone);
} }
void addSoundfile(const char* label, const char* soundpath, Soundfile** sf_zone)
{
WARN("Faust Prototype : 'soundfile' primitive not yet supported");
}
void declare(FAUSTFLOAT* zone, const char* key, const char* val) void declare(FAUSTFLOAT* zone, const char* key, const char* val)
{ {


Loading…
Cancel
Save