Browse Source

Code cleanup.

faust
Stephane Letz Andrew Belt 4 years ago
parent
commit
81bd571805
2 changed files with 8 additions and 8 deletions
  1. +1
    -1
      Faust.md
  2. +7
    -7
      src/FaustEngine.cpp

+ 1
- 1
Faust.md View File

@@ -37,7 +37,7 @@ gain = hslider("gain [knob:2]", 0.5, 0, 1, 0.01);
gate = button("gate [switch:1]"); gate = button("gate [switch:1]");


// DSP processor // DSP processor
process = os.osc(freq) * gain, os.sawtooth(freq) * gain * gate;
process = os.osc(freq) * gain, os.sawtooth(freq) * gain * gate;
``` ```


Some additional files can be seen in the examples folder: Some additional files can be seen in the examples folder:


+ 7
- 7
src/FaustEngine.cpp View File

@@ -247,7 +247,7 @@ class FaustEngine : public ScriptEngine {
display("Created DSP"); display("Created DSP");
} }
// Prepare inputs/outputs
// Check inputs/outputs
if (fDSP->getNumInputs() > NUM_ROWS) { if (fDSP->getNumInputs() > NUM_ROWS) {
display("ERROR: DSP has " + to_string(fDSP->getNumInputs()) + " inputs !"); display("ERROR: DSP has " + to_string(fDSP->getNumInputs()) + " inputs !");
return -1; return -1;
@@ -258,12 +258,6 @@ class FaustEngine : public ScriptEngine {
return -1; return -1;
} }
// Setup UI
fDSP->buildUserInterface(&fRackUI);
setFrameDivider(1);
setBufferSize(kBufferSize);
// Prepare buffers for process // Prepare buffers for process
ProcessBlock* block = getProcessBlock(); ProcessBlock* block = getProcessBlock();
@@ -277,6 +271,12 @@ class FaustEngine : public ScriptEngine {
fOutputs[chan] = block->outputs[chan]; fOutputs[chan] = block->outputs[chan];
} }
// Setup UI
fDSP->buildUserInterface(&fRackUI);
setFrameDivider(1);
setBufferSize(kBufferSize);
// Init DSP with default SR // Init DSP with default SR
fDSP->init(44100); fDSP->init(44100);
return 0; return 0;


Loading…
Cancel
Save