Created
November 24, 2022 18:37
-
-
Save samesimilar/b6d687d367750790b74011227ae33aea to your computer and use it in GitHub Desktop.
My notes on Designing a faust dsp synth for the Critter&Guitari Organelle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generating pd external for organelle from faust dsp | |
NB: These are not intended to be "instructions" or a how-to, just notes based on my experiments with Faust, PureData and the Organelle. | |
On my laptop run faust to generate the cpp: | |
faust -a puredata.cpp -o cpgrui-pd.cpp cpgrui.dsp | |
Copy cpp to organelle and compile: | |
g++ -DPD -Wall -g -shared -Dmydsp=cpgrui \ | |
-o cpgrui~.pd_linux cpgrui-pd.cpp | |
compile on mac: | |
faust -a puredata.cpp phasemod.dsp -o phasemod.cpp | |
c++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -fPIC -msse -ffast-math -I ../../pd -Dmydsp=phasemod phasemod.cpp -o phasemod~.pd_darwin | |
faust -xml phasemod.dsp -o /dev/null | |
../../faust2pd -s phasemod.dsp.xml | |
faust2pd options - (nb. -n = number of voices) | |
faust2pd version 2.16, Copyright (c) 2009 by Albert Graef | |
Usage: faust2pd [-hVbs] [-f size] [-o output-file] [-n #voices] | |
[-r max] [-X patterns] [-x width] [-y height] input-file | |
Options: | |
-h, --help display this help message and exit | |
-V, --version display the version number and exit | |
-b, --fake-buttons replace buttons (bangs) with checkboxes (toggles) | |
-f, --font-size font size for GUI elements (10 by default) | |
-n, --nvoices create a synth patch with the given number of voices | |
-o, --output-file output file name ('.pd' file) | |
-r, --radio-sliders radio controls for sliders with values 0..max-1 | |
-s, --slider-nums sliders with additional number control | |
-X, --exclude exclude controls matching the given glob patterns | |
-x, --width maximum width of the GUI area | |
-y, --height maximum height of the GUI area | |
input-file input file name ('.dsp.xml' or '.dsp.json') or URL | |
NOTE: --slider-nums is the default as of faust2pd 2.12; use --no-slider-nums | |
to disable. Default output-file is input-file with new extension '.pd'. | |
Designing a faust dsp synth for organelle | |
1. make sure to declare the name of the synth in the .dsp file: “declare name "fmpoly”;” | |
2. use the ‘old’ version of the ADSR envelope (from music.lib), otherwise when adjusting the release it will re-trigger your notes | |
1. mu = library(“music.lib”); | |
2. envelop = mu.adsr(attack, decay, sustain, release, trigger); | |
3. To enable polyphony make sure to multiply output * gain signal | |
4. convert from the faust file to .cpp | |
faust -a puredata.cpp faustpoly.dsp -o fmpoly.cpp | |
4. generate the faust xml file | |
faust -xml fmpoly.dsp -o /dev/null | |
5. generate the pd file | |
faust2pd -n 8 -s fmpoly.dsp.xml | |
(use -n 8 to generate an 8-voice polyphonic synth patch) | |
6. compile the cpp file | |
mac: c++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -fPIC -msse -ffast-math -I /Users/mikespears/Music/src/Faust-2.14.4/include -I /Users/mikespears/Music/src/faust2pd-2.16/pd -Dmydsp=fmpoly fmpoly.cpp -o fmpoly~.pd_darwin | |
organelle: g++ -DPD -Wall -g -shared -Dmydsp=fmpoly \ | |
-o fmpoly~.pd_linux fmpoly.cpp | |
7. copy fmpoly.pd file to organelle. Also copy dependencies to same folder: faust-control.pd, faust-gate.pd, faust-r.pd, faust-s.pd, midi-in.pd | |
8. create a new main.pd synth patch that hooks up midi notes to midi-in then to synth patch (e.g. fmpoly), then to organelle output. | |
* on the mac, use synth.pd to test the patch | |
* specify the number of midi notes as the first parameter when creating the midi-in object | |
* receive keyboard notes for the organelle as follows (make sure to divide velocity by 127): | |
[screenshot] | |
To see a list of paramters/messages that the module receives, send a ‘bang’ to the left inlet and print out from the left outlet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment