cyfaust 0.1.0__cp311-cp311-macosx_15_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cyfaust/CMakeLists.txt +93 -0
- cyfaust/__init__.py +0 -0
- cyfaust/__main__.py +819 -0
- cyfaust/box.pxd +46 -0
- cyfaust/box.pyx +2459 -0
- cyfaust/common.pxd +5 -0
- cyfaust/common.pyx +61 -0
- cyfaust/cyfaust.cpython-311-darwin.so +0 -0
- cyfaust/faust_box.pxd +298 -0
- cyfaust/faust_box_oo.pyx +66 -0
- cyfaust/faust_gui.pxd +261 -0
- cyfaust/faust_interp.pxd +160 -0
- cyfaust/faust_player.pxd +80 -0
- cyfaust/faust_signal.pxd +257 -0
- cyfaust/gui_statics.cpp +15 -0
- cyfaust/interp.pyx +673 -0
- cyfaust/player.cpp +32519 -0
- cyfaust/player.pyx +191 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUBase.cpp +2327 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUBase.h +1019 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUDispatch.cpp +423 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUDispatch.h +82 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUInputElement.cpp +151 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUInputElement.h +119 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUOutputElement.cpp +62 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUOutputElement.h +66 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUPlugInDispatch.cpp +615 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUPlugInDispatch.h +128 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUScopeElement.cpp +512 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/AUScopeElement.h +544 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/ComponentBase.cpp +370 -0
- cyfaust/resources/architecture/AU/AUPublic/AUBase/ComponentBase.h +340 -0
- cyfaust/resources/architecture/AU/AUPublic/AUEffectBase/AUEffectBase.cpp +463 -0
- cyfaust/resources/architecture/AU/AUPublic/AUEffectBase/AUEffectBase.h +391 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/AUInstrumentBase.cpp +837 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/AUInstrumentBase.h +267 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/AUMIDIBase.cpp +495 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/AUMIDIBase.h +213 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/LockFreeFIFO.h +168 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/MIDIControlHandler.h +92 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/MusicDeviceBase.cpp +354 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/MusicDeviceBase.h +126 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthElement.cpp +419 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthElement.h +227 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthEvent.h +145 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthNote.cpp +138 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthNote.h +186 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthNoteList.cpp +93 -0
- cyfaust/resources/architecture/AU/AUPublic/AUInstrumentBase/SynthNoteList.h +232 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUBaseHelper.cpp +134 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUBaseHelper.h +80 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUBuffer.cpp +217 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUBuffer.h +267 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUMIDIDefs.h +136 -0
- cyfaust/resources/architecture/AU/AUPublic/Utility/AUSilentTimeout.h +93 -0
- cyfaust/resources/architecture/AU/English.lproj/InfoPlist.strings +0 -0
- cyfaust/resources/architecture/AU/FaustAU.exp +2 -0
- cyfaust/resources/architecture/AU/FaustAU.xcodeproj/project.pbxproj +968 -0
- cyfaust/resources/architecture/AU/FaustAU.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- cyfaust/resources/architecture/AU/FaustAUCustomView.plist +14 -0
- cyfaust/resources/architecture/AU/Info.plist +47 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAAtomic.h +305 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAAtomicStack.h +239 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAAudioChannelLayout.cpp +153 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAAudioChannelLayout.h +199 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAAutoDisposer.h +508 -0
- cyfaust/resources/architecture/AU/PublicUtility/CABufferList.cpp +264 -0
- cyfaust/resources/architecture/AU/PublicUtility/CABufferList.h +319 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAByteOrder.h +161 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugMacros.cpp +88 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugMacros.h +580 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugPrintf.cpp +89 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugPrintf.h +115 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugger.cpp +77 -0
- cyfaust/resources/architecture/AU/PublicUtility/CADebugger.h +56 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAException.h +83 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAGuard.cpp +339 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAGuard.h +133 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAHostTimeBase.cpp +110 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAHostTimeBase.h +231 -0
- cyfaust/resources/architecture/AU/PublicUtility/CALogMacros.h +140 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAMath.h +68 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAMutex.cpp +345 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAMutex.h +163 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAReferenceCounted.h +87 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAStreamBasicDescription.cpp +795 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAStreamBasicDescription.h +409 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAThreadSafeList.h +255 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAVectorUnit.cpp +191 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAVectorUnit.h +100 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAVectorUnitTypes.h +59 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAXException.cpp +49 -0
- cyfaust/resources/architecture/AU/PublicUtility/CAXException.h +338 -0
- cyfaust/resources/architecture/AU/SectionPatternLight.tiff +0 -0
- cyfaust/resources/architecture/AU/Source/AUSource/FaustAU.h +38 -0
- cyfaust/resources/architecture/AU/Source/AUSource/FaustAU.r +153 -0
- cyfaust/resources/architecture/AU/Source/AUSource/FaustAUVersion.h +64 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Bargraph.h +18 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Bargraph.m +21 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Button.h +20 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Button.m +56 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_CustomView.h +87 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_CustomView.m +834 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_CustomViewFactory.h +13 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_CustomViewFactory.m +22 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Knob.h +81 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Knob.m +199 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Slider.h +18 -0
- cyfaust/resources/architecture/AU/Source/CocoaUI/FaustAU_Slider.m +21 -0
- cyfaust/resources/architecture/AU/version.plist +16 -0
- cyfaust/resources/architecture/VST/Info.plist +28 -0
- cyfaust/resources/architecture/VST/PkgInfo +1 -0
- cyfaust/resources/architecture/VST/README +11 -0
- cyfaust/resources/architecture/VST/VST.xcode/project.pbxproj +655 -0
- cyfaust/resources/architecture/alsa-console.cpp +246 -0
- cyfaust/resources/architecture/alsa-gtk.cpp +220 -0
- cyfaust/resources/architecture/alsa-qt.cpp +229 -0
- cyfaust/resources/architecture/api/DspFaust.cpp +612 -0
- cyfaust/resources/architecture/api/DspFaust.h +511 -0
- cyfaust/resources/architecture/api/README.md +237 -0
- cyfaust/resources/architecture/api/doc/Generic.md +38 -0
- cyfaust/resources/architecture/au-effect.cpp +487 -0
- cyfaust/resources/architecture/au-instrument.cpp +573 -0
- cyfaust/resources/architecture/bench.cpp +91 -0
- cyfaust/resources/architecture/c-jack-gtk.c +227 -0
- cyfaust/resources/architecture/ca-gtk.cpp +284 -0
- cyfaust/resources/architecture/ca-qt.cpp +424 -0
- cyfaust/resources/architecture/cpal.rs +195 -0
- cyfaust/resources/architecture/csound.cpp +245 -0
- cyfaust/resources/architecture/csvplot.cpp +227 -0
- cyfaust/resources/architecture/daisy/Makefile +14 -0
- cyfaust/resources/architecture/daisy/README.md +50 -0
- cyfaust/resources/architecture/daisy/ex_faust.cpp +173 -0
- cyfaust/resources/architecture/dssi.cpp +1262 -0
- cyfaust/resources/architecture/dummy-mem.cpp +186 -0
- cyfaust/resources/architecture/dummy.cpp +294 -0
- cyfaust/resources/architecture/faust/au/AUUI.h +404 -0
- cyfaust/resources/architecture/faust/audio/alsa-dsp.h +693 -0
- cyfaust/resources/architecture/faust/audio/android-dsp.h +583 -0
- cyfaust/resources/architecture/faust/audio/audio.h +115 -0
- cyfaust/resources/architecture/faust/audio/channels.h +122 -0
- cyfaust/resources/architecture/faust/audio/coreaudio-dsp.h +1543 -0
- cyfaust/resources/architecture/faust/audio/coreaudio-ios-dsp.h +743 -0
- cyfaust/resources/architecture/faust/audio/dummy-audio.h +255 -0
- cyfaust/resources/architecture/faust/audio/esp32-dsp.h +284 -0
- cyfaust/resources/architecture/faust/audio/fpe.h +164 -0
- cyfaust/resources/architecture/faust/audio/jack-dsp.h +534 -0
- cyfaust/resources/architecture/faust/audio/juce-dsp.h +119 -0
- cyfaust/resources/architecture/faust/audio/netjack-dsp.h +354 -0
- cyfaust/resources/architecture/faust/audio/oboe-dsp.h +308 -0
- cyfaust/resources/architecture/faust/audio/ofaudio-dsp.h +155 -0
- cyfaust/resources/architecture/faust/audio/opensles-android-dsp.h +631 -0
- cyfaust/resources/architecture/faust/audio/osc-dsp.h +120 -0
- cyfaust/resources/architecture/faust/audio/portaudio-dsp.h +236 -0
- cyfaust/resources/architecture/faust/audio/rtaudio-dsp.h +241 -0
- cyfaust/resources/architecture/faust/audio/samAudio.h +140 -0
- cyfaust/resources/architecture/faust/audio/teensy-dsp.h +171 -0
- cyfaust/resources/architecture/faust/dsp/cmajor-cpp-dsp.h +253 -0
- cyfaust/resources/architecture/faust/dsp/cmajorpatch-dsp.h +483 -0
- cyfaust/resources/architecture/faust/dsp/cpp-dsp-adapter.h +38 -0
- cyfaust/resources/architecture/faust/dsp/dsp-adapter.h +836 -0
- cyfaust/resources/architecture/faust/dsp/dsp-bench.h +611 -0
- cyfaust/resources/architecture/faust/dsp/dsp-checker.h +115 -0
- cyfaust/resources/architecture/faust/dsp/dsp-combiner.h +810 -0
- cyfaust/resources/architecture/faust/dsp/dsp-compute-adapter.h +159 -0
- cyfaust/resources/architecture/faust/dsp/dsp-multi.h +702 -0
- cyfaust/resources/architecture/faust/dsp/dsp-multifun.h +90 -0
- cyfaust/resources/architecture/faust/dsp/dsp-optimizer.h +511 -0
- cyfaust/resources/architecture/faust/dsp/dsp-tools.h +229 -0
- cyfaust/resources/architecture/faust/dsp/dsp.h +321 -0
- cyfaust/resources/architecture/faust/dsp/fastmath.cpp +301 -0
- cyfaust/resources/architecture/faust/dsp/faust-dynamic-engine.cpp +494 -0
- cyfaust/resources/architecture/faust/dsp/faust-dynamic-engine.h +386 -0
- cyfaust/resources/architecture/faust/dsp/faust-engine.h +75 -0
- cyfaust/resources/architecture/faust/dsp/faust-poly-engine.h +638 -0
- cyfaust/resources/architecture/faust/dsp/interpreter-dsp-c.h +288 -0
- cyfaust/resources/architecture/faust/dsp/interpreter-dsp.h +362 -0
- cyfaust/resources/architecture/faust/dsp/interpreter-machine-dsp.h +233 -0
- cyfaust/resources/architecture/faust/dsp/libfaust-box-c.h +817 -0
- cyfaust/resources/architecture/faust/dsp/libfaust-box.h +889 -0
- cyfaust/resources/architecture/faust/dsp/libfaust-c.h +116 -0
- cyfaust/resources/architecture/faust/dsp/libfaust-signal-c.h +649 -0
- cyfaust/resources/architecture/faust/dsp/libfaust-signal.h +731 -0
- cyfaust/resources/architecture/faust/dsp/llvm-dsp-adapter.h +160 -0
- cyfaust/resources/architecture/faust/dsp/llvm-dsp-c.h +524 -0
- cyfaust/resources/architecture/faust/dsp/llvm-dsp.h +575 -0
- cyfaust/resources/architecture/faust/dsp/llvm-machine-dsp.h +215 -0
- cyfaust/resources/architecture/faust/dsp/one-sample-dsp.h +477 -0
- cyfaust/resources/architecture/faust/dsp/poly-dsp.h +1079 -0
- cyfaust/resources/architecture/faust/dsp/poly-interpreter-dsp.h +143 -0
- cyfaust/resources/architecture/faust/dsp/poly-llvm-dsp.h +249 -0
- cyfaust/resources/architecture/faust/dsp/poly-wasm-dsp.h +257 -0
- cyfaust/resources/architecture/faust/dsp/proxy-dsp.h +108 -0
- cyfaust/resources/architecture/faust/dsp/proxy-osc-dsp.h +109 -0
- cyfaust/resources/architecture/faust/dsp/rnbo-dsp.h +187 -0
- cyfaust/resources/architecture/faust/dsp/sound-player.h +428 -0
- cyfaust/resources/architecture/faust/dsp/timed-dsp.h +279 -0
- cyfaust/resources/architecture/faust/dsp/wasm-dsp-imp.h +188 -0
- cyfaust/resources/architecture/faust/dsp/wasm-dsp.h +309 -0
- cyfaust/resources/architecture/faust/dsp/ysfx-dsp.h +188 -0
- cyfaust/resources/architecture/faust/export.h +61 -0
- cyfaust/resources/architecture/faust/gui/APIUI.h +726 -0
- cyfaust/resources/architecture/faust/gui/BelaOSCUI.h +170 -0
- cyfaust/resources/architecture/faust/gui/CGlue.h +667 -0
- cyfaust/resources/architecture/faust/gui/CInterface.h +142 -0
- cyfaust/resources/architecture/faust/gui/ControlSequenceUI.h +197 -0
- cyfaust/resources/architecture/faust/gui/ControlUI.h +137 -0
- cyfaust/resources/architecture/faust/gui/DaisyControlUI.h +283 -0
- cyfaust/resources/architecture/faust/gui/DaisyPatchInitControlUI.h +254 -0
- cyfaust/resources/architecture/faust/gui/DecoratorUI.h +115 -0
- cyfaust/resources/architecture/faust/gui/Esp32ControlUI.h +341 -0
- cyfaust/resources/architecture/faust/gui/Esp32Reader.h +102 -0
- cyfaust/resources/architecture/faust/gui/Esp32SensorUI.h +137 -0
- cyfaust/resources/architecture/faust/gui/FUI.h +147 -0
- cyfaust/resources/architecture/faust/gui/GTKUI.h +1414 -0
- cyfaust/resources/architecture/faust/gui/GUI.h +465 -0
- cyfaust/resources/architecture/faust/gui/JSONControl.h +48 -0
- cyfaust/resources/architecture/faust/gui/JSONUI.h +722 -0
- cyfaust/resources/architecture/faust/gui/JSONUIDecoder.h +589 -0
- cyfaust/resources/architecture/faust/gui/JuceGUI.h +2061 -0
- cyfaust/resources/architecture/faust/gui/JuceOSCUI.h +163 -0
- cyfaust/resources/architecture/faust/gui/JuceParameterUI.h +158 -0
- cyfaust/resources/architecture/faust/gui/JuceReader.h +103 -0
- cyfaust/resources/architecture/faust/gui/JuceStateUI.h +88 -0
- cyfaust/resources/architecture/faust/gui/LayoutUI.h +423 -0
- cyfaust/resources/architecture/faust/gui/LibsndfileReader.h +366 -0
- cyfaust/resources/architecture/faust/gui/MapUI.h +370 -0
- cyfaust/resources/architecture/faust/gui/MemoryReader.h +111 -0
- cyfaust/resources/architecture/faust/gui/MetaDataUI.h +357 -0
- cyfaust/resources/architecture/faust/gui/MidiUI.h +939 -0
- cyfaust/resources/architecture/faust/gui/OCVUI.h +688 -0
- cyfaust/resources/architecture/faust/gui/OSCUI.h +219 -0
- cyfaust/resources/architecture/faust/gui/PathBuilder.h +228 -0
- cyfaust/resources/architecture/faust/gui/PresetUI.h +337 -0
- cyfaust/resources/architecture/faust/gui/PrintCUI.h +152 -0
- cyfaust/resources/architecture/faust/gui/PrintUI.h +121 -0
- cyfaust/resources/architecture/faust/gui/QTUI.h +1891 -0
- cyfaust/resources/architecture/faust/gui/RosCI.h +493 -0
- cyfaust/resources/architecture/faust/gui/RosUI.h +488 -0
- cyfaust/resources/architecture/faust/gui/SaveUI.h +163 -0
- cyfaust/resources/architecture/faust/gui/SimpleParser.h +583 -0
- cyfaust/resources/architecture/faust/gui/SoundUI.h +217 -0
- cyfaust/resources/architecture/faust/gui/Soundfile.h +342 -0
- cyfaust/resources/architecture/faust/gui/Styles/Blue.qrc +5 -0
- cyfaust/resources/architecture/faust/gui/Styles/Blue.qss +177 -0
- cyfaust/resources/architecture/faust/gui/Styles/Default.qrc +5 -0
- cyfaust/resources/architecture/faust/gui/Styles/Default.qss +117 -0
- cyfaust/resources/architecture/faust/gui/Styles/Grey.qrc +5 -0
- cyfaust/resources/architecture/faust/gui/Styles/Grey.qss +174 -0
- cyfaust/resources/architecture/faust/gui/Styles/Salmon.qrc +5 -0
- cyfaust/resources/architecture/faust/gui/Styles/Salmon.qss +171 -0
- cyfaust/resources/architecture/faust/gui/UI.h +87 -0
- cyfaust/resources/architecture/faust/gui/ValueConverter.h +543 -0
- cyfaust/resources/architecture/faust/gui/WaveReader.h +364 -0
- cyfaust/resources/architecture/faust/gui/console.h +322 -0
- cyfaust/resources/architecture/faust/gui/httpdUI.h +372 -0
- cyfaust/resources/architecture/faust/gui/meta.h +39 -0
- cyfaust/resources/architecture/faust/gui/mspUI.h +580 -0
- cyfaust/resources/architecture/faust/gui/qrcodegen.h +269 -0
- cyfaust/resources/architecture/faust/gui/qrcodegen.impl.h +1025 -0
- cyfaust/resources/architecture/faust/gui/ring-buffer.h +414 -0
- cyfaust/resources/architecture/faust/midi/RtMidi.cpp +3054 -0
- cyfaust/resources/architecture/faust/midi/RtMidi.h +1034 -0
- cyfaust/resources/architecture/faust/midi/bela-midi.h +266 -0
- cyfaust/resources/architecture/faust/midi/daisy-midi.h +116 -0
- cyfaust/resources/architecture/faust/midi/esp32-midi.h +185 -0
- cyfaust/resources/architecture/faust/midi/gramophone-midi.h +107 -0
- cyfaust/resources/architecture/faust/midi/iplug2-midi.h +148 -0
- cyfaust/resources/architecture/faust/midi/jack-midi.h +247 -0
- cyfaust/resources/architecture/faust/midi/juce-midi.h +275 -0
- cyfaust/resources/architecture/faust/midi/midi.h +475 -0
- cyfaust/resources/architecture/faust/midi/rt-midi.h +315 -0
- cyfaust/resources/architecture/faust/midi/teensy-midi.h +89 -0
- cyfaust/resources/architecture/faust/misc.h +106 -0
- cyfaust/resources/architecture/faust/sound-file.h +132 -0
- cyfaust/resources/architecture/faust/unity/AudioPluginInterface.h +301 -0
- cyfaust/resources/architecture/faust/vst/faust.h +141 -0
- cyfaust/resources/architecture/faust/vst/voice.h +43 -0
- cyfaust/resources/architecture/faust/vst/vstui.h +524 -0
- cyfaust/resources/architecture/faustvst.cpp +3435 -0
- cyfaust/resources/architecture/faustvstqt.h +91 -0
- cyfaust/resources/architecture/gen-json.cpp +76 -0
- cyfaust/resources/architecture/jack-console.cpp +267 -0
- cyfaust/resources/architecture/jack-gtk-ros.cpp +139 -0
- cyfaust/resources/architecture/jack-gtk.cpp +282 -0
- cyfaust/resources/architecture/jack-internal.cpp +560 -0
- cyfaust/resources/architecture/jack-qt-chain-footer.cpp +87 -0
- cyfaust/resources/architecture/jack-qt-chain-header.cpp +92 -0
- cyfaust/resources/architecture/jack-qt.cpp +281 -0
- cyfaust/resources/architecture/jack.rs +171 -0
- cyfaust/resources/architecture/juce/README.md +84 -0
- cyfaust/resources/architecture/juce/juce-plugin.cpp +809 -0
- cyfaust/resources/architecture/juce/juce-standalone.cpp +413 -0
- cyfaust/resources/architecture/juce/plugin/plugin-llvm.jucer +184 -0
- cyfaust/resources/architecture/juce/plugin/plugin.jucer +159 -0
- cyfaust/resources/architecture/juce/standalone/standalone-llvm.jucer +216 -0
- cyfaust/resources/architecture/juce/standalone/standalone.jucer +191 -0
- cyfaust/resources/architecture/ladspa.cpp +543 -0
- cyfaust/resources/architecture/latexheader.tex +65 -0
- cyfaust/resources/architecture/lv2.cpp +2090 -0
- cyfaust/resources/architecture/lv2qtgui.h +62 -0
- cyfaust/resources/architecture/lv2ui.cpp +1966 -0
- cyfaust/resources/architecture/max-msp/README.md +109 -0
- cyfaust/resources/architecture/max-msp/faustgen-wrapper-poly.maxpat +184 -0
- cyfaust/resources/architecture/max-msp/faustgen-wrapper.maxpat +163 -0
- cyfaust/resources/architecture/max-msp/max-msp.cpp +734 -0
- cyfaust/resources/architecture/max-msp/max-msp64.cpp +789 -0
- cyfaust/resources/architecture/max-msp/py2max/README.md +277 -0
- cyfaust/resources/architecture/max-msp/py2max/py2max/__init__.py +3 -0
- cyfaust/resources/architecture/max-msp/py2max/py2max/common.py +7 -0
- cyfaust/resources/architecture/max-msp/py2max/py2max/core.py +1387 -0
- cyfaust/resources/architecture/max-msp/py2max/py2max/maxclassdb.py +318 -0
- cyfaust/resources/architecture/max-msp/py2max/py2max/utils.py +20 -0
- cyfaust/resources/architecture/max-msp/rnbo.py +1591 -0
- cyfaust/resources/architecture/max-msp/sndfile/sndfile.h +857 -0
- cyfaust/resources/architecture/max-msp/ui.js +230 -0
- cyfaust/resources/architecture/max-msp/wrapper-poly.maxpat +153 -0
- cyfaust/resources/architecture/max-msp/wrapper.maxpat +131 -0
- cyfaust/resources/architecture/minimal-bench.cpp +100 -0
- cyfaust/resources/architecture/minimal-effect.c +149 -0
- cyfaust/resources/architecture/minimal-effect.cpp +70 -0
- cyfaust/resources/architecture/minimal-fixed-point.cpp +195 -0
- cyfaust/resources/architecture/minimal-static.cpp +160 -0
- cyfaust/resources/architecture/minimal.c +103 -0
- cyfaust/resources/architecture/minimal.cpp +84 -0
- cyfaust/resources/architecture/minimal.rs +223 -0
- cyfaust/resources/architecture/module.cpp +91 -0
- cyfaust/resources/architecture/octave.cpp +471 -0
- cyfaust/resources/architecture/oscio-gtk.cpp +115 -0
- cyfaust/resources/architecture/oscio-qt.cpp +121 -0
- cyfaust/resources/architecture/owl.cpp +345 -0
- cyfaust/resources/architecture/pa-gtk.cpp +119 -0
- cyfaust/resources/architecture/pa-qt.cpp +261 -0
- cyfaust/resources/architecture/path-printer.cpp +100 -0
- cyfaust/resources/architecture/plot.cpp +128 -0
- cyfaust/resources/architecture/portaudio.rs +192 -0
- cyfaust/resources/architecture/puredata.cpp +636 -0
- cyfaust/resources/architecture/ra-qt.cpp +238 -0
- cyfaust/resources/architecture/sam/fast_pow2.h +69 -0
- cyfaust/resources/architecture/sam/fastexp.h +140 -0
- cyfaust/resources/architecture/sam/samFaustDSP.cpp +125 -0
- cyfaust/resources/architecture/sam/samFaustDSP.h +107 -0
- cyfaust/resources/architecture/scheduler.cpp +1391 -0
- cyfaust/resources/architecture/sndfile.cpp +291 -0
- cyfaust/resources/architecture/supercollider.cpp +611 -0
- cyfaust/resources/architecture/teensy/README.md +13 -0
- cyfaust/resources/architecture/teensy/teensy.cpp +214 -0
- cyfaust/resources/architecture/teensy/teensy.h +71 -0
- cyfaust/resources/architecture/thread.h +373 -0
- cyfaust/resources/architecture/vcvrack/README.md +78 -0
- cyfaust/resources/architecture/vcvrack/template/.gitignore +6 -0
- cyfaust/resources/architecture/vcvrack/template/Makefile +22 -0
- cyfaust/resources/architecture/vcvrack/template/res/FaustModule.svg +299 -0
- cyfaust/resources/architecture/vcvrack/template/src/FaustModule.cpp +942 -0
- cyfaust/resources/architecture/vst.cpp +947 -0
- cyfaust/resources/libraries/aanl.lib +900 -0
- cyfaust/resources/libraries/all.lib +36 -0
- cyfaust/resources/libraries/analyzers.lib +980 -0
- cyfaust/resources/libraries/basics.lib +2681 -0
- cyfaust/resources/libraries/compressors.lib +1341 -0
- cyfaust/resources/libraries/delays.lib +401 -0
- cyfaust/resources/libraries/demos.lib +1556 -0
- cyfaust/resources/libraries/dx7.lib +1036 -0
- cyfaust/resources/libraries/effect.lib +1645 -0
- cyfaust/resources/libraries/envelopes.lib +666 -0
- cyfaust/resources/libraries/examples/README.md +13 -0
- cyfaust/resources/libraries/examples/ambisonics/fourSourcesToOcto.dsp +20 -0
- cyfaust/resources/libraries/examples/ambisonics/oneSourceToStereo.dsp +12 -0
- cyfaust/resources/libraries/examples/analysis/FFT.dsp +26 -0
- cyfaust/resources/libraries/examples/analysis/dbmeter.dsp +19 -0
- cyfaust/resources/libraries/examples/analysis/spectralLevel.dsp +8 -0
- cyfaust/resources/libraries/examples/analysis/spectralTiltLab.dsp +20 -0
- cyfaust/resources/libraries/examples/analysis/vumeter.dsp +18 -0
- cyfaust/resources/libraries/examples/autodiff/delay/diff.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/delay/gt.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/gain/diff.dsp +7 -0
- cyfaust/resources/libraries/examples/autodiff/gain/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/gain_dc/diff.dsp +7 -0
- cyfaust/resources/libraries/examples/autodiff/gain_dc/gt.dsp +4 -0
- cyfaust/resources/libraries/examples/autodiff/gain_exp/diff.dsp +9 -0
- cyfaust/resources/libraries/examples/autodiff/gain_exp/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/gain_pow/diff.dsp +9 -0
- cyfaust/resources/libraries/examples/autodiff/gain_pow/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/gain_pow_trig/diff.dsp +12 -0
- cyfaust/resources/libraries/examples/autodiff/gain_pow_trig/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/gain_sq/diff.dsp +7 -0
- cyfaust/resources/libraries/examples/autodiff/gain_sq/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/mem/diff.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/mem/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/noise.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/noop.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/one_zero/diff.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/one_zero/gt.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/ramp.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/recursion/diff.dsp +2 -0
- cyfaust/resources/libraries/examples/autodiff/recursion/gt.dsp +1 -0
- cyfaust/resources/libraries/examples/autodiff/recursion/target.dsp +13 -0
- cyfaust/resources/libraries/examples/autodiff/tremolo/diff.dsp +14 -0
- cyfaust/resources/libraries/examples/autodiff/tremolo/diffable.lib +7 -0
- cyfaust/resources/libraries/examples/autodiff/tremolo/gt.dsp +11 -0
- cyfaust/resources/libraries/examples/delayEcho/echo.dsp +15 -0
- cyfaust/resources/libraries/examples/delayEcho/quadEcho.dsp +21 -0
- cyfaust/resources/libraries/examples/delayEcho/smoothDelay.dsp +26 -0
- cyfaust/resources/libraries/examples/delayEcho/stereoEcho.dsp +16 -0
- cyfaust/resources/libraries/examples/delayEcho/tapiir.dsp +44 -0
- cyfaust/resources/libraries/examples/dynamic/compressor.dsp +8 -0
- cyfaust/resources/libraries/examples/dynamic/distortion.dsp +8 -0
- cyfaust/resources/libraries/examples/dynamic/gateCompressor.dsp +10 -0
- cyfaust/resources/libraries/examples/dynamic/noiseGate.dsp +8 -0
- cyfaust/resources/libraries/examples/dynamic/volume.dsp +15 -0
- cyfaust/resources/libraries/examples/filtering/APF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/BPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/DNN.dsp +25 -0
- cyfaust/resources/libraries/examples/filtering/HPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/LPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/bandFilter.dsp +44 -0
- cyfaust/resources/libraries/examples/filtering/cryBaby.dsp +4 -0
- cyfaust/resources/libraries/examples/filtering/diodeLadder.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/filterBank.dsp +6 -0
- cyfaust/resources/libraries/examples/filtering/graphicEqLab.dsp +10 -0
- cyfaust/resources/libraries/examples/filtering/highShelf.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/korg35HPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/korg35LPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/lfBoost.dsp +40 -0
- cyfaust/resources/libraries/examples/filtering/lowBoost.dsp +40 -0
- cyfaust/resources/libraries/examples/filtering/lowCut.dsp +40 -0
- cyfaust/resources/libraries/examples/filtering/lowShelf.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/moogHalfLadder.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/moogLadder.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/moogVCF.dsp +6 -0
- cyfaust/resources/libraries/examples/filtering/multibandFilter.dsp +14 -0
- cyfaust/resources/libraries/examples/filtering/notch.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/oberheim.dsp +14 -0
- cyfaust/resources/libraries/examples/filtering/oberheimBPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/oberheimBSF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/oberheimHPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/oberheimLPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/parametricEqLab.dsp +10 -0
- cyfaust/resources/libraries/examples/filtering/parametricEqualizer.dsp +6 -0
- cyfaust/resources/libraries/examples/filtering/peakNotch.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/peakingEQ.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/sallenKey2ndOrder.dsp +14 -0
- cyfaust/resources/libraries/examples/filtering/sallenKey2ndOrderBPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/sallenKey2ndOrderHPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/sallenKey2ndOrderLPF.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/sallenKeyOnePole.dsp +13 -0
- cyfaust/resources/libraries/examples/filtering/sallenKeyOnePoleHPF.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/sallenKeyOnePoleLPF.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/spectralTilt.dsp +8 -0
- cyfaust/resources/libraries/examples/filtering/vcfWahLab.dsp +12 -0
- cyfaust/resources/libraries/examples/filtering/vocoder.dsp +8 -0
- cyfaust/resources/libraries/examples/filtering/wahPedal.dsp +6 -0
- cyfaust/resources/libraries/examples/gameaudio/bubble.dsp +42 -0
- cyfaust/resources/libraries/examples/gameaudio/door.dsp +58 -0
- cyfaust/resources/libraries/examples/gameaudio/fire.dsp +46 -0
- cyfaust/resources/libraries/examples/gameaudio/insects.dsp +148 -0
- cyfaust/resources/libraries/examples/gameaudio/rain.dsp +27 -0
- cyfaust/resources/libraries/examples/gameaudio/wind.dsp +23 -0
- cyfaust/resources/libraries/examples/generator/filterOsc.dsp +8 -0
- cyfaust/resources/libraries/examples/generator/noise.dsp +52 -0
- cyfaust/resources/libraries/examples/generator/noiseMetadata.dsp +74 -0
- cyfaust/resources/libraries/examples/generator/osc.dsp +17 -0
- cyfaust/resources/libraries/examples/generator/osci.dsp +17 -0
- cyfaust/resources/libraries/examples/generator/sawtoothLab.dsp +8 -0
- cyfaust/resources/libraries/examples/generator/virtualAnalog.dsp +8 -0
- cyfaust/resources/libraries/examples/generator/virtualAnalogLab.dsp +10 -0
- cyfaust/resources/libraries/examples/misc/UITester.dsp +71 -0
- cyfaust/resources/libraries/examples/misc/autopan.dsp +59 -0
- cyfaust/resources/libraries/examples/misc/capture.dsp +24 -0
- cyfaust/resources/libraries/examples/misc/drumkit.dsp +36 -0
- cyfaust/resources/libraries/examples/misc/guitarix.dsp +184 -0
- cyfaust/resources/libraries/examples/misc/matrix.dsp +17 -0
- cyfaust/resources/libraries/examples/misc/midiTester.dsp +122 -0
- cyfaust/resources/libraries/examples/misc/mixer.dsp +27 -0
- cyfaust/resources/libraries/examples/misc/statespace.dsp +39 -0
- cyfaust/resources/libraries/examples/misc/switcher.dsp +20 -0
- cyfaust/resources/libraries/examples/misc/tester.dsp +32 -0
- cyfaust/resources/libraries/examples/misc/tester2.dsp +31 -0
- cyfaust/resources/libraries/examples/old/README.md +5 -0
- cyfaust/resources/libraries/examples/old/freeverb.dsp +109 -0
- cyfaust/resources/libraries/examples/old/rewriting/Makefile +21 -0
- cyfaust/resources/libraries/examples/old/rewriting/fact.dsp +3 -0
- cyfaust/resources/libraries/examples/old/rewriting/fold.dsp +61 -0
- cyfaust/resources/libraries/examples/old/rewriting/mesh.dsp +43 -0
- cyfaust/resources/libraries/examples/old/rewriting/mesh.pd +37 -0
- cyfaust/resources/libraries/examples/old/rewriting/sample.pd +12 -0
- cyfaust/resources/libraries/examples/old/rewriting/serial.dsp +7 -0
- cyfaust/resources/libraries/examples/old/rewriting/sum.dsp +55 -0
- cyfaust/resources/libraries/examples/old/rewriting/test.pd +48 -0
- cyfaust/resources/libraries/examples/phasing/flanger.dsp +8 -0
- cyfaust/resources/libraries/examples/phasing/phaser.dsp +8 -0
- cyfaust/resources/libraries/examples/phasing/phaserFlangerLab.dsp +12 -0
- cyfaust/resources/libraries/examples/physicalModeling/brass.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/brassMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/churchBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/clarinet.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/clarinetMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/djembeMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/elecGuitarMIDI.dsp +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/englishBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/NLFeks.dsp +91 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/NLFfm.dsp +70 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/README +125 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/bass.dsp +84 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/bass.h +91 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/blowBottle.dsp +102 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/bowed.dsp +114 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/brass.dsp +103 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/clarinet.dsp +110 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/flute.dsp +116 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/fluteStk.dsp +121 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/glassHarmonica.dsp +131 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/harpsi.dsp +90 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/harpsichord.h +185 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/instrument.h +114 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/modalBar.dsp +122 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/modalBar.h +48 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/bottle.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/clarinets.pd +15 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/canon/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/canon/bass.pd +162 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/canon/canon.pd +55 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/canon/flute.pd +343 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/canon/pachelbel.mid +0 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/daisy/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/daisy/daisy.mid +0 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/daisy/daisy.pd +45 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/daisy/piano.pd +205 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/daisy/voiceForm.pd +340 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/take5/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/take5/blowHole.pd +330 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/take5/piano.pd +205 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/take5/take5.mid +0 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/take5/take5.pd +45 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/turkish-march/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/turkish-march/harpsi.pd +204 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/turkish-march/turkish-march.mid +0 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/turkish-march/turkish-march.pd +31 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/audio-out.pd +33 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/bass.pd +162 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/modalBar.pd +258 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/piano.pd +205 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/what-a-friend.pd +52 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fancy/what-a-friend/what_a_friend.mid +0 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/flutes.pd +15 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/fm.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/glassBare.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/harpsichord-poly.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/ironBare.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/midi-in.pd +111 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/modal.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/osc.pd +26 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/piano-poly.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/plucked.pd +20 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/saxophone.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/tibetan.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/trumpet.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/violin.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/voiceSynth.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/pd-patches/woodenBare.pd +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/phonemes.h +189 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/piano.dsp +255 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/piano.h +751 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/saxophony.dsp +114 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/sitar.dsp +48 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/tibetanBowl.dsp +155 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/tunedBar.dsp +123 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/uniBar.dsp +100 -0
- cyfaust/resources/libraries/examples/physicalModeling/faust-stk/voiceForm.dsp +125 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/1dDampedWaveEquation.dsp +43 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/2dKirchhoffThinPlate.dsp +75 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/BowedString.dsp +61 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/ControllableNonPhysicalString.dsp +72 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/HammeredString.dsp +74 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/PianoHammeredString.dsp +85 -0
- cyfaust/resources/libraries/examples/physicalModeling/fds/StiffString.dsp +54 -0
- cyfaust/resources/libraries/examples/physicalModeling/flute.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/fluteMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/frenchBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/germanBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/guitarMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/karplus.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/marimbaMIDI.dsp +10 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/00_BasicOscillator/harmonicOscillator.dsp +58 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/00_BasicOscillator/harmonicOscillator2.dsp +62 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/00_BasicOscillator/harmonicOscillator3.dsp +65 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/01_ParamControl/paramOsc.dsp +63 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/02_AudioParamControl/audioParamOsc.dsp +63 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/03_HammerTime/hammerOsc.dsp +71 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/04_Gravity/bouncingOsc.dsp +64 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/05_PluckedOscillator/pluckedOsc.dsp +57 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/06_BowedOscillator/bowedOsc.dsp +65 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/07_NonLinearOscillator/nlOsc.dsp +78 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/08_TwoMassChain/2massChain.dsp +75 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/09_TinyString/tinyString.dsp +101 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/10_PluckedString/pluckedString.dsp +678 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/11_BowedString/bowedString.dsp +671 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/12_TriangleMesh/triangleMesh.dsp +448 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/13_Construction/construction.dsp +1036 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/14_Polyphonic/polyTriangle.dsp +79 -0
- cyfaust/resources/libraries/examples/physicalModeling/mi-faust/15_PhysicalLFO/physicalLFO.dsp +107 -0
- cyfaust/resources/libraries/examples/physicalModeling/modularInterpInstrMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/nylonGuitarMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/old/harpe.dsp +45 -0
- cyfaust/resources/libraries/examples/physicalModeling/old/karplus.dsp +34 -0
- cyfaust/resources/libraries/examples/physicalModeling/old/karplus32.dsp +47 -0
- cyfaust/resources/libraries/examples/physicalModeling/russianBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/standardBell.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/violin.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/violinMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/vocalBP.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/vocalBPMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/vocalFOF.dsp +8 -0
- cyfaust/resources/libraries/examples/physicalModeling/vocalFOFMIDI.dsp +8 -0
- cyfaust/resources/libraries/examples/pitchShifting/pitchShifter.dsp +20 -0
- cyfaust/resources/libraries/examples/psychoacoustic/harmonicExciter.dsp +10 -0
- cyfaust/resources/libraries/examples/quantizing/quantizedChords.dsp +49 -0
- cyfaust/resources/libraries/examples/reverb/dattorro.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/fdnRev.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/freeverb.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/greyhole.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/jprev.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/reverbDesigner.dsp +12 -0
- cyfaust/resources/libraries/examples/reverb/reverbTester.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/zitaRev.dsp +8 -0
- cyfaust/resources/libraries/examples/reverb/zitaRevFDN.dsp +8 -0
- cyfaust/resources/libraries/examples/smartKeyboard/acGuitar.dsp +100 -0
- cyfaust/resources/libraries/examples/smartKeyboard/associatedEffects/elecGuitarEffect.dsp +8 -0
- cyfaust/resources/libraries/examples/smartKeyboard/associatedEffects/myEffect.dsp +5 -0
- cyfaust/resources/libraries/examples/smartKeyboard/associatedEffects/reverb.dsp +5 -0
- cyfaust/resources/libraries/examples/smartKeyboard/bells.dsp +80 -0
- cyfaust/resources/libraries/examples/smartKeyboard/bowed.dsp +87 -0
- cyfaust/resources/libraries/examples/smartKeyboard/brass.dsp +82 -0
- cyfaust/resources/libraries/examples/smartKeyboard/clarinet.dsp +113 -0
- cyfaust/resources/libraries/examples/smartKeyboard/crazyGuiro.dsp +96 -0
- cyfaust/resources/libraries/examples/smartKeyboard/drums.dsp +74 -0
- cyfaust/resources/libraries/examples/smartKeyboard/dubDub.dsp +87 -0
- cyfaust/resources/libraries/examples/smartKeyboard/elecGuitar.dsp +67 -0
- cyfaust/resources/libraries/examples/smartKeyboard/fm.dsp +78 -0
- cyfaust/resources/libraries/examples/smartKeyboard/frog.dsp +74 -0
- cyfaust/resources/libraries/examples/smartKeyboard/harp.dsp +84 -0
- cyfaust/resources/libraries/examples/smartKeyboard/midiOnly.dsp +62 -0
- cyfaust/resources/libraries/examples/smartKeyboard/multiSynth.dsp +75 -0
- cyfaust/resources/libraries/examples/smartKeyboard/toy.dsp +71 -0
- cyfaust/resources/libraries/examples/smartKeyboard/trumpet.dsp +59 -0
- cyfaust/resources/libraries/examples/smartKeyboard/turenas.dsp +114 -0
- cyfaust/resources/libraries/examples/smartKeyboard/violin.dsp +91 -0
- cyfaust/resources/libraries/examples/smartKeyboard/violin2.dsp +84 -0
- cyfaust/resources/libraries/examples/smartKeyboard/vocal.dsp +43 -0
- cyfaust/resources/libraries/examples/spat/panpot.dsp +17 -0
- cyfaust/resources/libraries/examples/spat/spat.dsp +25 -0
- cyfaust/resources/libraries/fds.lib +535 -0
- cyfaust/resources/libraries/filter.lib +1710 -0
- cyfaust/resources/libraries/filters.lib +3125 -0
- cyfaust/resources/libraries/hoa.lib +1081 -0
- cyfaust/resources/libraries/instruments.lib +263 -0
- cyfaust/resources/libraries/interpolators.lib +675 -0
- cyfaust/resources/libraries/math.lib +602 -0
- cyfaust/resources/libraries/maths.lib +798 -0
- cyfaust/resources/libraries/maxmsp.lib +237 -0
- cyfaust/resources/libraries/mi.lib +528 -0
- cyfaust/resources/libraries/misceffects.lib +998 -0
- cyfaust/resources/libraries/music.lib +496 -0
- cyfaust/resources/libraries/noises.lib +487 -0
- cyfaust/resources/libraries/oscillator.lib +450 -0
- cyfaust/resources/libraries/oscillators.lib +1838 -0
- cyfaust/resources/libraries/phaflangers.lib +235 -0
- cyfaust/resources/libraries/physmodels.lib +3990 -0
- cyfaust/resources/libraries/platform.lib +59 -0
- cyfaust/resources/libraries/quantizers.lib +310 -0
- cyfaust/resources/libraries/reducemaps.lib +235 -0
- cyfaust/resources/libraries/reverbs.lib +686 -0
- cyfaust/resources/libraries/routes.lib +262 -0
- cyfaust/resources/libraries/sf.lib +53 -0
- cyfaust/resources/libraries/signals.lib +570 -0
- cyfaust/resources/libraries/soundfiles.lib +234 -0
- cyfaust/resources/libraries/spats.lib +173 -0
- cyfaust/resources/libraries/stdfaust.lib +38 -0
- cyfaust/resources/libraries/synths.lib +322 -0
- cyfaust/resources/libraries/tonestacks.lib +427 -0
- cyfaust/resources/libraries/tubes.lib +5039 -0
- cyfaust/resources/libraries/vaeffects.lib +984 -0
- cyfaust/resources/libraries/version.lib +22 -0
- cyfaust/resources/libraries/wdmodels.lib +2276 -0
- cyfaust/resources/libraries/webaudio.lib +402 -0
- cyfaust/signal.pxd +44 -0
- cyfaust/signal.pyx +1993 -0
- cyfaust-0.1.0.dist-info/METADATA +355 -0
- cyfaust-0.1.0.dist-info/RECORD +693 -0
- cyfaust-0.1.0.dist-info/WHEEL +5 -0
- cyfaust-0.1.0.dist-info/entry_points.txt +3 -0
- cyfaust-0.1.0.dist-info/licenses/LICENSE +26 -0
|
@@ -0,0 +1,1262 @@
|
|
|
1
|
+
/************************************************************************
|
|
2
|
+
IMPORTANT NOTE : this file contains two clearly delimited sections :
|
|
3
|
+
the ARCHITECTURE section (in two parts) and the USER section. Each section
|
|
4
|
+
is governed by its own copyright and license. Please check individually
|
|
5
|
+
each section for license and copyright information.
|
|
6
|
+
*************************************************************************/
|
|
7
|
+
|
|
8
|
+
/******************* BEGIN dssi.cpp ****************/
|
|
9
|
+
|
|
10
|
+
/************************************************************************
|
|
11
|
+
FAUST Architecture File
|
|
12
|
+
Copyright (C) 2003-2019 GRAME, Centre National de Creation Musicale
|
|
13
|
+
---------------------------------------------------------------------
|
|
14
|
+
This Architecture section is free software; you can redistribute it
|
|
15
|
+
and/or modify it under the terms of the GNU General Public License
|
|
16
|
+
as published by the Free Software Foundation; either version 3 of
|
|
17
|
+
the License, or (at your option) any later version.
|
|
18
|
+
|
|
19
|
+
This program is distributed in the hope that it will be useful,
|
|
20
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
GNU General Public License for more details.
|
|
23
|
+
|
|
24
|
+
You should have received a copy of the GNU General Public License
|
|
25
|
+
along with this program; If not, see <http://www.gnu.org/licenses/>.
|
|
26
|
+
|
|
27
|
+
EXCEPTION : As a special exception, you may create a larger work
|
|
28
|
+
that contains this FAUST architecture section and distribute
|
|
29
|
+
that work under terms of your choice, so long as this FAUST
|
|
30
|
+
architecture section is not modified.
|
|
31
|
+
|
|
32
|
+
************************************************************************
|
|
33
|
+
************************************************************************/
|
|
34
|
+
|
|
35
|
+
/********************************************************************
|
|
36
|
+
* dssi.cpp - Polyphonic dssi wrapper for the FAUST language.
|
|
37
|
+
*
|
|
38
|
+
* Usage: faust -a dssi.cpp myfaustprog.dsp
|
|
39
|
+
*
|
|
40
|
+
* By Michael J. Wilson (mwilson@alumni.caltech.edu)
|
|
41
|
+
*
|
|
42
|
+
* Made with reference to:
|
|
43
|
+
* - vsti-mono.cpp by Julius Smith (http://ccrma.stanford.edu/~jos/)
|
|
44
|
+
* - ladspa.cpp by GRAME, Centre National de Creation Musicale
|
|
45
|
+
* - karplong.cpp by Chris Cannam, Steve Harris, Sean Bolton
|
|
46
|
+
*
|
|
47
|
+
* Because of the inclusion of code from ladspa.cpp, this architecture
|
|
48
|
+
* file is also released under the GNU General Public Licenses version
|
|
49
|
+
* 3. Sections which were taken from ladspa.cpp are clearly marked
|
|
50
|
+
* below, in order to trace the GPL dependency.
|
|
51
|
+
* As with faust2pd and vsti-mono.cpp, to obtain MIDI control via
|
|
52
|
+
* NoteOn/Off, Velocity, and KeyNumber, there must be a button named
|
|
53
|
+
* "gate" and sliders (or numeric entries) named "gain" and "freq" in
|
|
54
|
+
* the Faust patch specified in myfaustprog.dsp.
|
|
55
|
+
*
|
|
56
|
+
* FAUST
|
|
57
|
+
* Copyright (C) 2003-2007 GRAME, Centre National de Creation Musicale
|
|
58
|
+
* http://www.grame.fr/
|
|
59
|
+
*
|
|
60
|
+
********************************************************************/
|
|
61
|
+
|
|
62
|
+
#include "dssi.h"
|
|
63
|
+
#include "ladspa.h"
|
|
64
|
+
|
|
65
|
+
#include <math.h>
|
|
66
|
+
#include <stdlib.h>
|
|
67
|
+
#include <string.h>
|
|
68
|
+
|
|
69
|
+
#include <iostream>
|
|
70
|
+
#include <stack>
|
|
71
|
+
#include <string>
|
|
72
|
+
#include <map>
|
|
73
|
+
#include <vector>
|
|
74
|
+
#include <list>
|
|
75
|
+
|
|
76
|
+
using namespace std;
|
|
77
|
+
|
|
78
|
+
// On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
|
|
79
|
+
// flags to avoid costly denormals
|
|
80
|
+
#ifdef __SSE__
|
|
81
|
+
#include <xmmintrin.h>
|
|
82
|
+
#ifdef __SSE2__
|
|
83
|
+
#define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8040)
|
|
84
|
+
#else
|
|
85
|
+
#define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8000)
|
|
86
|
+
#endif
|
|
87
|
+
#else
|
|
88
|
+
#warning *** dssi.cpp: NO SSE FLAG (denormals may slow things down) ***
|
|
89
|
+
#define AVOIDDENORMALS
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
struct Meta : std::map<const char*, const char*>
|
|
93
|
+
{
|
|
94
|
+
void declare (const char* key, const char* value) { (*this)[key]=value; }
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
#define sym(name) xsym(name)
|
|
99
|
+
#define xsym(name) #name
|
|
100
|
+
|
|
101
|
+
inline int lsr (int x, int n) { return int(((unsigned int)x) >> n); }
|
|
102
|
+
inline int int2pow2 (int x) { int r=0; while ((1<<r)<x) r++; return r; }
|
|
103
|
+
|
|
104
|
+
/******************************************************************************
|
|
105
|
+
*******************************************************************************
|
|
106
|
+
|
|
107
|
+
VECTOR INTRINSICS
|
|
108
|
+
|
|
109
|
+
*******************************************************************************
|
|
110
|
+
*******************************************************************************/
|
|
111
|
+
|
|
112
|
+
<<includeIntrinsic>>
|
|
113
|
+
|
|
114
|
+
//---------------------Abstract User Interface--------------------
|
|
115
|
+
//
|
|
116
|
+
// Abstract definition of a User Interface to be passed to the
|
|
117
|
+
// buildUserInterface method of a Faust Signal Processor
|
|
118
|
+
//
|
|
119
|
+
//----------------------------------------------------------------
|
|
120
|
+
class UI
|
|
121
|
+
{
|
|
122
|
+
bool fStopped;
|
|
123
|
+
|
|
124
|
+
public:
|
|
125
|
+
UI() : fStopped(false) {}
|
|
126
|
+
virtual ~UI() {}
|
|
127
|
+
|
|
128
|
+
virtual void addButton(const char* label, float* zone) = 0;
|
|
129
|
+
virtual void addToggleButton(const char* label, float* zone) = 0;
|
|
130
|
+
virtual void addCheckButton(const char* label, float* zone) = 0;
|
|
131
|
+
virtual void addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step) = 0;
|
|
132
|
+
virtual void addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step) = 0;
|
|
133
|
+
virtual void addNumEntry(const char* label, float* zone, float init, float min, float max, float step) = 0;
|
|
134
|
+
|
|
135
|
+
// -- passive widgets
|
|
136
|
+
virtual void addNumDisplay(const char* label, float* zone, int precision) = 0;
|
|
137
|
+
virtual void addTextDisplay(const char* label, float* zone, char* names[], float min, float max) = 0;
|
|
138
|
+
virtual void addHorizontalBargraph(const char* label, float* zone, float min, float max) = 0;
|
|
139
|
+
virtual void addVerticalBargraph(const char* label, float* zone, float min, float max) = 0;
|
|
140
|
+
|
|
141
|
+
// -- frames and labels
|
|
142
|
+
virtual void openFrameBox(const char* label) = 0;
|
|
143
|
+
virtual void openTabBox(const char* label) = 0;
|
|
144
|
+
virtual void openHorizontalBox(const char* label) = 0;
|
|
145
|
+
virtual void openVerticalBox(const char* label) = 0;
|
|
146
|
+
virtual void closeBox() = 0;
|
|
147
|
+
|
|
148
|
+
virtual void show() = 0;
|
|
149
|
+
virtual void run() = 0;
|
|
150
|
+
|
|
151
|
+
void stop() { fStopped = true; }
|
|
152
|
+
bool stopped() { return fStopped; }
|
|
153
|
+
|
|
154
|
+
virtual void declare(float* zone, const char* key, const char* value) {}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
//------------------Abstract Signal Processor---------------------
|
|
158
|
+
//
|
|
159
|
+
// Abstract definition of a Faust Signal Processor
|
|
160
|
+
//
|
|
161
|
+
//----------------------------------------------------------------
|
|
162
|
+
class dsp
|
|
163
|
+
{
|
|
164
|
+
protected:
|
|
165
|
+
int fSampleRate;
|
|
166
|
+
public:
|
|
167
|
+
dsp() {}
|
|
168
|
+
virtual ~dsp() {}
|
|
169
|
+
virtual int getNumInputs() = 0;
|
|
170
|
+
virtual int getNumOutputs() = 0;
|
|
171
|
+
virtual void buildUserInterface(UI* interface) = 0;
|
|
172
|
+
virtual void init(int sample_rate) = 0;
|
|
173
|
+
virtual void compute(int len, float** inputs, float** outputs)= 0;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/********************END ARCHITECTURE SECTION (part 1/2)****************/
|
|
177
|
+
|
|
178
|
+
/**************************BEGIN USER SECTION **************************/
|
|
179
|
+
|
|
180
|
+
<<includeclass>>
|
|
181
|
+
|
|
182
|
+
/***************************END USER SECTION ***************************/
|
|
183
|
+
|
|
184
|
+
/*******************BEGIN ARCHITECTURE SECTION (part 2/2)***************/
|
|
185
|
+
|
|
186
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
187
|
+
// Forward declarations
|
|
188
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
189
|
+
class Plugin;
|
|
190
|
+
class DescriptorUI;
|
|
191
|
+
class Voice;
|
|
192
|
+
|
|
193
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
194
|
+
// Global data
|
|
195
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
196
|
+
// Maximum polyphony, must be at least 1 (TODO make this configurable at compile / runtime?)
|
|
197
|
+
const int MAX_POLYPHONY = 64;
|
|
198
|
+
// Descriptor
|
|
199
|
+
DSSI_Descriptor* g_dssi_descriptor;
|
|
200
|
+
// Additional data for descriptor:
|
|
201
|
+
LADSPA_Descriptor* g_ladspa_descriptor;
|
|
202
|
+
// Program descriptor:
|
|
203
|
+
DSSI_Program_Descriptor g_program_descriptor;
|
|
204
|
+
|
|
205
|
+
// Global data for the descriptor:
|
|
206
|
+
std::vector<LADSPA_PortDescriptor> g_port_descriptors;
|
|
207
|
+
std::vector<LADSPA_PortRangeHint> g_port_range_hints;
|
|
208
|
+
std::vector<const char*> g_port_names;
|
|
209
|
+
const char* g_name;
|
|
210
|
+
|
|
211
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
212
|
+
// The enclosed code is from ladspa.cpp
|
|
213
|
+
// TODO groups of port names
|
|
214
|
+
static const char* inames[] =
|
|
215
|
+
{
|
|
216
|
+
"input00", "input01", "input02", "input03", "input04",
|
|
217
|
+
"input05", "input06", "input07", "input08", "input09",
|
|
218
|
+
"input10", "input11", "input12", "input13", "input14",
|
|
219
|
+
"input15", "input16", "input17", "input18", "input19",
|
|
220
|
+
"input20", "input21", "input22", "input23", "input24",
|
|
221
|
+
"input25", "input26", "input27", "input28", "input29",
|
|
222
|
+
"input30", "input31", "input32", "input33", "input34",
|
|
223
|
+
"input35", "input36", "input37", "input38", "input39"
|
|
224
|
+
};
|
|
225
|
+
static const char* onames[] =
|
|
226
|
+
{
|
|
227
|
+
"output00", "output01", "output02", "output03", "output04",
|
|
228
|
+
"output05", "output06", "output07", "output08", "output09",
|
|
229
|
+
"output10", "output11", "output12", "output13", "output14",
|
|
230
|
+
"output15", "output16", "output17", "output18", "output19",
|
|
231
|
+
"output20", "output21", "output22", "output23", "output24",
|
|
232
|
+
"output25", "output26", "output27", "output28", "output29",
|
|
233
|
+
"output30", "output31", "output32", "output33", "output34",
|
|
234
|
+
"output35", "output36", "output37", "output38", "output39"
|
|
235
|
+
};
|
|
236
|
+
// END code from ladspa.cpp
|
|
237
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
238
|
+
|
|
239
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
240
|
+
// Global helper functions
|
|
241
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
242
|
+
char* get_metadata_if_exists(const char* key, const char* default_string)
|
|
243
|
+
{
|
|
244
|
+
// TODO probably want to free these somehow. Currently only used for ladspa descriptor
|
|
245
|
+
Meta meta;
|
|
246
|
+
static mydsp dsp;
|
|
247
|
+
dsp.metadata(&meta);
|
|
248
|
+
if(meta.find(key) != meta.end())
|
|
249
|
+
{
|
|
250
|
+
return strdup(meta[key]);
|
|
251
|
+
}
|
|
252
|
+
else
|
|
253
|
+
{
|
|
254
|
+
return strdup(default_string);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
259
|
+
// The enclosed code is from ladspa.cpp
|
|
260
|
+
std::string simplify(const std::string& src)
|
|
261
|
+
{
|
|
262
|
+
int i=0;
|
|
263
|
+
int level=2;
|
|
264
|
+
std::string dst;
|
|
265
|
+
|
|
266
|
+
while (src[i] ) {
|
|
267
|
+
|
|
268
|
+
switch (level) {
|
|
269
|
+
|
|
270
|
+
case 0 :
|
|
271
|
+
case 1 :
|
|
272
|
+
case 2 :
|
|
273
|
+
// Skip the begin of the label "--foo-"
|
|
274
|
+
// until 3 '-' have been read
|
|
275
|
+
if (src[i]=='-') { level++; }
|
|
276
|
+
break;
|
|
277
|
+
|
|
278
|
+
case 3 :
|
|
279
|
+
// copy the content, but skip non alphnum
|
|
280
|
+
// and content in parenthesis
|
|
281
|
+
switch (src[i]) {
|
|
282
|
+
case '(' :
|
|
283
|
+
case '[' :
|
|
284
|
+
level++;
|
|
285
|
+
break;
|
|
286
|
+
|
|
287
|
+
case '-' :
|
|
288
|
+
dst += '-';
|
|
289
|
+
break;
|
|
290
|
+
|
|
291
|
+
default :
|
|
292
|
+
if (isalnum(src[i])) {
|
|
293
|
+
dst+= tolower(src[i]);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
}
|
|
297
|
+
break;
|
|
298
|
+
|
|
299
|
+
default :
|
|
300
|
+
// here we are inside parenthesis and
|
|
301
|
+
// we skip the content until we are back to
|
|
302
|
+
// level 3
|
|
303
|
+
switch (src[i]) {
|
|
304
|
+
|
|
305
|
+
case '(' :
|
|
306
|
+
case '[' :
|
|
307
|
+
level++;
|
|
308
|
+
break;
|
|
309
|
+
|
|
310
|
+
case ')' :
|
|
311
|
+
case ']' :
|
|
312
|
+
level--;
|
|
313
|
+
break;
|
|
314
|
+
|
|
315
|
+
default :
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
i++;
|
|
320
|
+
}
|
|
321
|
+
return (dst.size() > 0) ? dst :src;
|
|
322
|
+
}
|
|
323
|
+
// END code from ladspa.cpp
|
|
324
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
325
|
+
|
|
326
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
327
|
+
// Single voice; use multiple for polyphony
|
|
328
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
329
|
+
class Voice : public UI
|
|
330
|
+
{
|
|
331
|
+
public:
|
|
332
|
+
Voice(int sampleRate);
|
|
333
|
+
~Voice();
|
|
334
|
+
|
|
335
|
+
// UI methods:
|
|
336
|
+
// TODO don't hardcode these so hard maybe
|
|
337
|
+
void setFreq(float val);
|
|
338
|
+
void setGate(float val);
|
|
339
|
+
void setGain(float val);
|
|
340
|
+
|
|
341
|
+
virtual void addButton(const char* label, float* zone);
|
|
342
|
+
virtual void addToggleButton(const char* label, float* zone);
|
|
343
|
+
virtual void addCheckButton(const char* label, float* zone);
|
|
344
|
+
virtual void addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step);
|
|
345
|
+
virtual void addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step);
|
|
346
|
+
virtual void addNumEntry(const char* label, float* zone, float init, float min, float max, float step);
|
|
347
|
+
|
|
348
|
+
virtual void addNumDisplay(const char* label, float* zone, int precision);
|
|
349
|
+
virtual void addTextDisplay(const char* label, float* zone, char* names[], float min, float max);
|
|
350
|
+
virtual void addHorizontalBargraph(const char* label, float* zone, float min, float max);
|
|
351
|
+
virtual void addVerticalBargraph(const char* label, float* zone, float min, float max);
|
|
352
|
+
|
|
353
|
+
virtual void openFrameBox(const char* label);
|
|
354
|
+
virtual void openTabBox(const char* label);
|
|
355
|
+
virtual void openHorizontalBox(const char* label);
|
|
356
|
+
virtual void openVerticalBox(const char* label);
|
|
357
|
+
virtual void closeBox();
|
|
358
|
+
|
|
359
|
+
virtual void show();
|
|
360
|
+
virtual void run();
|
|
361
|
+
|
|
362
|
+
// Internal control (to Faust DSP)
|
|
363
|
+
std::vector<float*> m_controls;
|
|
364
|
+
|
|
365
|
+
// TODO maybe don't make this public eventually
|
|
366
|
+
mydsp* m_mydsp;
|
|
367
|
+
|
|
368
|
+
private:
|
|
369
|
+
// Helpers for UI building:
|
|
370
|
+
// TODO organize this a bit better later...
|
|
371
|
+
bool ckAnyMatch(const char* label, const char* indexName, float **zone, float* newZone);
|
|
372
|
+
bool ckAllMatches(const char* label, float* zone);
|
|
373
|
+
void addZone(float* zone);
|
|
374
|
+
|
|
375
|
+
int m_samplerate;
|
|
376
|
+
|
|
377
|
+
float* m_freq_zone;
|
|
378
|
+
float* m_gate_zone;
|
|
379
|
+
float* m_gain_zone;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
383
|
+
// Plugin class to handle DSSI methods:
|
|
384
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
385
|
+
class Plugin : public UI
|
|
386
|
+
{
|
|
387
|
+
public:
|
|
388
|
+
// LADSPA methods:
|
|
389
|
+
static LADSPA_Handle instantiate(const LADSPA_Descriptor *, unsigned long);
|
|
390
|
+
static void connectPort(LADSPA_Handle, unsigned long, LADSPA_Data *);
|
|
391
|
+
static void activate(LADSPA_Handle);
|
|
392
|
+
static void run(LADSPA_Handle, unsigned long);
|
|
393
|
+
static void cleanup(LADSPA_Handle);
|
|
394
|
+
|
|
395
|
+
// DSSI methods:
|
|
396
|
+
static const DSSI_Program_Descriptor* getProgram(LADSPA_Handle, unsigned long);
|
|
397
|
+
static void selectProgram(LADSPA_Handle, unsigned long, unsigned long);
|
|
398
|
+
static int getMidiController(LADSPA_Handle, unsigned long);
|
|
399
|
+
static void runSynth(LADSPA_Handle, unsigned long, snd_seq_event_t *, unsigned long);
|
|
400
|
+
|
|
401
|
+
// UI methods:
|
|
402
|
+
// TODO don't hardcode these so hard maybe
|
|
403
|
+
void setFreq(float val, int voice = 0);
|
|
404
|
+
void setGate(float val, int voice = 0);
|
|
405
|
+
void setGain(float val, int voice = 0);
|
|
406
|
+
|
|
407
|
+
virtual void addButton(const char* label, float* zone);
|
|
408
|
+
virtual void addToggleButton(const char* label, float* zone);
|
|
409
|
+
virtual void addCheckButton(const char* label, float* zone);
|
|
410
|
+
virtual void addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step);
|
|
411
|
+
virtual void addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step);
|
|
412
|
+
virtual void addNumEntry(const char* label, float* zone, float init, float min, float max, float step);
|
|
413
|
+
|
|
414
|
+
virtual void addNumDisplay(const char* label, float* zone, int precision);
|
|
415
|
+
virtual void addTextDisplay(const char* label, float* zone, char* names[], float min, float max);
|
|
416
|
+
virtual void addHorizontalBargraph(const char* label, float* zone, float min, float max);
|
|
417
|
+
virtual void addVerticalBargraph(const char* label, float* zone, float min, float max);
|
|
418
|
+
|
|
419
|
+
virtual void openFrameBox(const char* label);
|
|
420
|
+
virtual void openTabBox(const char* label);
|
|
421
|
+
virtual void openHorizontalBox(const char* label);
|
|
422
|
+
virtual void openVerticalBox(const char* label);
|
|
423
|
+
virtual void closeBox();
|
|
424
|
+
|
|
425
|
+
virtual void show();
|
|
426
|
+
virtual void run();
|
|
427
|
+
|
|
428
|
+
private:
|
|
429
|
+
Plugin(int sampleRate);
|
|
430
|
+
~Plugin();
|
|
431
|
+
|
|
432
|
+
// Helper methods:
|
|
433
|
+
void updateControlZones();
|
|
434
|
+
void runImpl(unsigned long, snd_seq_event_t *, unsigned long);
|
|
435
|
+
void addSamples(size_t);
|
|
436
|
+
|
|
437
|
+
// Helpers for UI building:
|
|
438
|
+
// TODO organize this a bit better later...
|
|
439
|
+
bool ckAnyMatch(const char* label, const char* indexName);
|
|
440
|
+
bool ckAllMatches(const char* label);
|
|
441
|
+
void add_control_with_default(float default_value);
|
|
442
|
+
|
|
443
|
+
int m_samplerate;
|
|
444
|
+
|
|
445
|
+
// Voice allocation memebers (TODO maybe break voice allocator into separate class later)
|
|
446
|
+
// Note each voice is playing
|
|
447
|
+
std::vector<int> voice_notes;
|
|
448
|
+
// Queue of free voices
|
|
449
|
+
std::list<size_t> voice_free;
|
|
450
|
+
|
|
451
|
+
// Voices for polyphony
|
|
452
|
+
std::vector<Voice*> m_voices;
|
|
453
|
+
|
|
454
|
+
// Top-level inputs (from DSSI host)
|
|
455
|
+
std::vector<float*> m_inputs;
|
|
456
|
+
// Top-level outputs (to DSSI host)
|
|
457
|
+
std::vector<float*> m_outputs;
|
|
458
|
+
// Temp vector for collecting outputs TODO this is an ugly way to do it...
|
|
459
|
+
std::vector<std::vector<float> > m_temp_outputs;
|
|
460
|
+
// External control (from DSSI host)
|
|
461
|
+
std::vector<float*> m_controls;
|
|
462
|
+
|
|
463
|
+
// Control default values
|
|
464
|
+
std::vector<float> m_control_defaults;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
468
|
+
// UI class to build descriptor, analogous to ladspa.cpp's portCollector
|
|
469
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
470
|
+
const int ICONTROL = LADSPA_PORT_INPUT|LADSPA_PORT_CONTROL;
|
|
471
|
+
const int OCONTROL = LADSPA_PORT_OUTPUT|LADSPA_PORT_CONTROL;
|
|
472
|
+
|
|
473
|
+
class DescriptorUI : public UI
|
|
474
|
+
{
|
|
475
|
+
public:
|
|
476
|
+
DescriptorUI(int ins, int outs);
|
|
477
|
+
|
|
478
|
+
virtual void addButton(const char* label, float* zone) {
|
|
479
|
+
if (!ckAnyMatch(label, "gate"))
|
|
480
|
+
{
|
|
481
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_TOGGLED);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
virtual void addToggleButton(const char* label, float* zone) {
|
|
485
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_TOGGLED);
|
|
486
|
+
}
|
|
487
|
+
virtual void addCheckButton(const char* label, float* zone) {
|
|
488
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_TOGGLED);
|
|
489
|
+
}
|
|
490
|
+
virtual void addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step) {
|
|
491
|
+
if (!ckAllMatches(label))
|
|
492
|
+
{
|
|
493
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
virtual void addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step) {
|
|
497
|
+
if (!ckAllMatches(label))
|
|
498
|
+
{
|
|
499
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
virtual void addNumEntry(const char* label, float* zone, float init, float min, float max, float step) {
|
|
503
|
+
if (!ckAllMatches(label))
|
|
504
|
+
{
|
|
505
|
+
addPortDescr(ICONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
virtual void addNumDisplay(const char* label, float* zone, int precision) {
|
|
509
|
+
addPortDescr(OCONTROL, label, 0, -10000, +10000);
|
|
510
|
+
}
|
|
511
|
+
virtual void addTextDisplay(const char* label, float* zone, char* names[], float min, float max) {
|
|
512
|
+
addPortDescr(OCONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
513
|
+
}
|
|
514
|
+
virtual void addHorizontalBargraph(const char* label, float* zone, float min, float max) {
|
|
515
|
+
addPortDescr(OCONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
516
|
+
}
|
|
517
|
+
virtual void addVerticalBargraph(const char* label, float* zone, float min, float max){
|
|
518
|
+
addPortDescr(OCONTROL, label, LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE, min, max);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
virtual void openFrameBox(const char* label) { openAnyBox(label); }
|
|
522
|
+
virtual void openTabBox(const char* label) { openAnyBox(label); }
|
|
523
|
+
virtual void openHorizontalBox(const char* label) { openAnyBox(label); }
|
|
524
|
+
virtual void openVerticalBox(const char* label) { openAnyBox(label); }
|
|
525
|
+
|
|
526
|
+
virtual void closeBox() { fPrefix.pop(); }
|
|
527
|
+
|
|
528
|
+
virtual void show() {}
|
|
529
|
+
virtual void run() {}
|
|
530
|
+
|
|
531
|
+
private:
|
|
532
|
+
std::stack<std::string> fPrefix;
|
|
533
|
+
|
|
534
|
+
void addPortDescr(int type, const char* label, int hint, float min=0.0, float max=0.0);
|
|
535
|
+
|
|
536
|
+
void openAnyBox(const char* label);
|
|
537
|
+
|
|
538
|
+
bool ckAnyMatch(const char* label, const char* indexName)
|
|
539
|
+
{
|
|
540
|
+
// TODO do case-insensitive here...
|
|
541
|
+
if (strcmp(label,indexName)==0)
|
|
542
|
+
{
|
|
543
|
+
// Don't set values in the DescriptorUI
|
|
544
|
+
// TODO consolidate this later
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
return false;
|
|
548
|
+
}
|
|
549
|
+
bool ckAllMatches(const char* label)
|
|
550
|
+
{
|
|
551
|
+
bool result = false;
|
|
552
|
+
result = result || ckAnyMatch(label,"gain");
|
|
553
|
+
result = result || ckAnyMatch(label,"gate");
|
|
554
|
+
result = result || ckAnyMatch(label,"freq");
|
|
555
|
+
return result;
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
560
|
+
// DescriptorUI methods
|
|
561
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
562
|
+
DescriptorUI::DescriptorUI(int ins, int outs)
|
|
563
|
+
{
|
|
564
|
+
// Note inputs and outputs
|
|
565
|
+
for (int i = 0; i < ins; i++)
|
|
566
|
+
{
|
|
567
|
+
g_port_descriptors.push_back(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO);
|
|
568
|
+
LADSPA_PortRangeHint temp;
|
|
569
|
+
temp.HintDescriptor = 0;
|
|
570
|
+
temp.LowerBound = 0;
|
|
571
|
+
temp.UpperBound = 0;
|
|
572
|
+
g_port_range_hints.push_back(temp);
|
|
573
|
+
g_port_names.push_back(inames[i]);
|
|
574
|
+
}
|
|
575
|
+
for (int j = 0; j < outs; j++)
|
|
576
|
+
{
|
|
577
|
+
g_port_descriptors.push_back(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO);
|
|
578
|
+
LADSPA_PortRangeHint temp;
|
|
579
|
+
temp.HintDescriptor = 0;
|
|
580
|
+
temp.LowerBound = 0;
|
|
581
|
+
temp.UpperBound = 0;
|
|
582
|
+
g_port_range_hints.push_back(temp);
|
|
583
|
+
g_port_names.push_back(onames[j]);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
void DescriptorUI::addPortDescr(int type, const char* label, int hint, float min, float max)
|
|
588
|
+
{
|
|
589
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
590
|
+
// The enclosed code is derived from ladspa.cpp
|
|
591
|
+
std::string fullname = simplify(fPrefix.top() + "-" + label);
|
|
592
|
+
// TODO for debugging, I'm just using the label for now instead of the full name (since fullname can get long)
|
|
593
|
+
// char * str = strdup(fullname.c_str());
|
|
594
|
+
char * str = strdup(label);
|
|
595
|
+
// END code from ladspa.cpp
|
|
596
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
597
|
+
|
|
598
|
+
g_port_descriptors.push_back(type);
|
|
599
|
+
LADSPA_PortRangeHint temp;
|
|
600
|
+
temp.HintDescriptor = hint;
|
|
601
|
+
temp.LowerBound = min;
|
|
602
|
+
temp.UpperBound = max;
|
|
603
|
+
g_port_range_hints.push_back(temp);
|
|
604
|
+
g_port_names.push_back(str); // TODO memory leak; need to free
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
void DescriptorUI::openAnyBox(const char* label)
|
|
608
|
+
{
|
|
609
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
610
|
+
// The enclosed code is from ladspa.cpp
|
|
611
|
+
if (fPrefix.size() == 0)
|
|
612
|
+
{
|
|
613
|
+
// top level label is used as plugin name
|
|
614
|
+
g_name = label;
|
|
615
|
+
fPrefix.push(label);
|
|
616
|
+
}
|
|
617
|
+
else
|
|
618
|
+
{
|
|
619
|
+
std::string s;
|
|
620
|
+
if (label && label[0])
|
|
621
|
+
{
|
|
622
|
+
s = fPrefix.top() + "-" + label;
|
|
623
|
+
}
|
|
624
|
+
else
|
|
625
|
+
{
|
|
626
|
+
s = fPrefix.top();
|
|
627
|
+
}
|
|
628
|
+
fPrefix.push(s);
|
|
629
|
+
}
|
|
630
|
+
// END code from ladspa.cpp
|
|
631
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
635
|
+
// Plugin methods
|
|
636
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
637
|
+
Plugin::Plugin(int sampleRate) :
|
|
638
|
+
m_samplerate(sampleRate)
|
|
639
|
+
{
|
|
640
|
+
int i;
|
|
641
|
+
|
|
642
|
+
mydsp temp_mydsp;
|
|
643
|
+
|
|
644
|
+
for (i = 0; i < MAX_POLYPHONY; i++)
|
|
645
|
+
{
|
|
646
|
+
m_voices.push_back(new Voice(m_samplerate));
|
|
647
|
+
|
|
648
|
+
// Voice parameters:
|
|
649
|
+
voice_free.push_back(i);
|
|
650
|
+
// TODO using -1 to represent nothing; think of a more clear way to do this
|
|
651
|
+
voice_notes.push_back(-1);
|
|
652
|
+
}
|
|
653
|
+
for (i = 0; i < temp_mydsp.getNumInputs(); i++)
|
|
654
|
+
{
|
|
655
|
+
m_inputs.push_back(0);
|
|
656
|
+
}
|
|
657
|
+
for (i = 0; i < temp_mydsp.getNumOutputs(); i++)
|
|
658
|
+
{
|
|
659
|
+
m_outputs.push_back(0);
|
|
660
|
+
std::vector<float> temp;
|
|
661
|
+
temp.push_back(0.0);
|
|
662
|
+
m_temp_outputs.push_back(temp);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
Plugin::~Plugin()
|
|
667
|
+
{
|
|
668
|
+
size_t i;
|
|
669
|
+
for (i = 0; i < m_voices.size(); i++)
|
|
670
|
+
{
|
|
671
|
+
delete m_voices[i];
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
LADSPA_Handle Plugin::instantiate(const LADSPA_Descriptor *, unsigned long rate)
|
|
676
|
+
{
|
|
677
|
+
Plugin *plugin = new Plugin(rate);
|
|
678
|
+
size_t i;
|
|
679
|
+
|
|
680
|
+
mydsp* temp_mydsp = new mydsp();
|
|
681
|
+
temp_mydsp->buildUserInterface(plugin);
|
|
682
|
+
delete temp_mydsp;
|
|
683
|
+
|
|
684
|
+
for (i = 0; i < plugin->m_voices.size(); i++)
|
|
685
|
+
{
|
|
686
|
+
plugin->m_voices[i]->m_mydsp->buildUserInterface(plugin->m_voices[i]);
|
|
687
|
+
}
|
|
688
|
+
return plugin;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
void Plugin::connectPort(LADSPA_Handle handle, unsigned long port, LADSPA_Data *location)
|
|
692
|
+
{
|
|
693
|
+
Plugin *plugin = (Plugin *)handle;
|
|
694
|
+
|
|
695
|
+
// Map inputs, then outputs, then controls:
|
|
696
|
+
if (port < plugin->m_inputs.size())
|
|
697
|
+
{
|
|
698
|
+
*(&plugin->m_inputs[port]) = (float *)location;
|
|
699
|
+
}
|
|
700
|
+
else if (port < plugin->m_inputs.size() + plugin->m_outputs.size())
|
|
701
|
+
{
|
|
702
|
+
*(&plugin->m_outputs[port - plugin->m_inputs.size()]) = (float *)location;
|
|
703
|
+
}
|
|
704
|
+
else
|
|
705
|
+
{
|
|
706
|
+
plugin->m_controls[port - plugin->m_inputs.size() - plugin->m_outputs.size()] = (float *)location;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
void Plugin::activate(LADSPA_Handle handle)
|
|
711
|
+
{
|
|
712
|
+
Plugin *plugin = (Plugin *)handle;
|
|
713
|
+
for (size_t i = 0; i < plugin->m_voices.size(); i++)
|
|
714
|
+
{
|
|
715
|
+
plugin->m_voices[i]->m_mydsp->init(plugin->m_samplerate);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
void Plugin::run(LADSPA_Handle handle, unsigned long samples)
|
|
720
|
+
{
|
|
721
|
+
runSynth(handle, samples, 0, 0);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
void Plugin::cleanup(LADSPA_Handle handle)
|
|
725
|
+
{
|
|
726
|
+
delete (Plugin *)handle;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
const DSSI_Program_Descriptor* Plugin::getProgram(LADSPA_Handle handle, unsigned long index)
|
|
730
|
+
{
|
|
731
|
+
if (index == 0)
|
|
732
|
+
{
|
|
733
|
+
return &g_program_descriptor;
|
|
734
|
+
}
|
|
735
|
+
else
|
|
736
|
+
{
|
|
737
|
+
return NULL;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
void Plugin::selectProgram(LADSPA_Handle handle, unsigned long bank, unsigned long program)
|
|
742
|
+
{
|
|
743
|
+
Plugin *plugin = (Plugin *)handle;
|
|
744
|
+
for (size_t i = 0; i < plugin->m_controls.size(); i++)
|
|
745
|
+
{
|
|
746
|
+
*(plugin->m_controls[i]) = plugin->m_control_defaults[i];
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
int Plugin::getMidiController(LADSPA_Handle, unsigned long port)
|
|
751
|
+
{
|
|
752
|
+
// TODO this is where we need to map MIDI controllers to ports
|
|
753
|
+
return DSSI_NONE;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
void Plugin::updateControlZones()
|
|
757
|
+
{
|
|
758
|
+
for (size_t i = 0; i < m_controls.size(); i++)
|
|
759
|
+
{
|
|
760
|
+
for (size_t j = 0; j < m_voices.size(); j++)
|
|
761
|
+
{
|
|
762
|
+
*(m_voices[j]->m_controls[i]) = *(m_controls[i]);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
void Plugin::runSynth(LADSPA_Handle handle, unsigned long samples, snd_seq_event_t *events, unsigned long eventCount)
|
|
768
|
+
{
|
|
769
|
+
Plugin *plugin = (Plugin *)handle;
|
|
770
|
+
plugin->updateControlZones();
|
|
771
|
+
plugin->runImpl(samples, events, eventCount);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
void Plugin::runImpl(unsigned long sampleCount, snd_seq_event_t *events, unsigned long eventCount)
|
|
775
|
+
{
|
|
776
|
+
unsigned long pos;
|
|
777
|
+
unsigned long count;
|
|
778
|
+
unsigned long eventPos;
|
|
779
|
+
snd_seq_ev_note_t n;
|
|
780
|
+
|
|
781
|
+
size_t voice_index;
|
|
782
|
+
|
|
783
|
+
pos = 0;
|
|
784
|
+
eventPos = 0;
|
|
785
|
+
while (pos < sampleCount)
|
|
786
|
+
{
|
|
787
|
+
while ((eventPos < eventCount) &&
|
|
788
|
+
(pos >= events[eventPos].time.tick))
|
|
789
|
+
{
|
|
790
|
+
switch (events[eventPos].type)
|
|
791
|
+
{
|
|
792
|
+
case SND_SEQ_EVENT_NOTEON:
|
|
793
|
+
n = events[eventPos].data.note;
|
|
794
|
+
if (n.velocity > 0)
|
|
795
|
+
{
|
|
796
|
+
// Look for the next free voice:
|
|
797
|
+
if (!voice_free.empty())
|
|
798
|
+
{
|
|
799
|
+
// Get the index of the first free string and remove it from the list
|
|
800
|
+
voice_index = voice_free.front();
|
|
801
|
+
voice_free.pop_front();
|
|
802
|
+
|
|
803
|
+
// Play the note on that voice
|
|
804
|
+
voice_notes[voice_index] = n.note;
|
|
805
|
+
float freq = 440.0f * powf(2.0f,(((float)n.note)-69.0f)/12.0f);
|
|
806
|
+
float gain = n.velocity/127.0f;
|
|
807
|
+
setFreq(freq, voice_index); // Hz - requires Faust control-signal "freq"
|
|
808
|
+
setGain(gain, voice_index); // 0-1 - requires Faust control-signal "gain"
|
|
809
|
+
setGate(1.0f, voice_index); // 0 or 1 - requires Faust button-signal "gate"
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
break;
|
|
813
|
+
case SND_SEQ_EVENT_NOTEOFF:
|
|
814
|
+
for (voice_index = 0; voice_index < voice_notes.size(); voice_index++)
|
|
815
|
+
{
|
|
816
|
+
if (voice_notes[voice_index] == events[eventPos].data.note.note)
|
|
817
|
+
{
|
|
818
|
+
setGate(0, voice_index);
|
|
819
|
+
// TODO using -1 to represent nothing; think of a more clear way to do this
|
|
820
|
+
voice_notes[voice_index] = -1;
|
|
821
|
+
voice_free.push_back(voice_index);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
break;
|
|
825
|
+
default:
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
++eventPos;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
if ((eventPos < eventCount) && (events[eventPos].time.tick < sampleCount))
|
|
832
|
+
{
|
|
833
|
+
count = events[eventPos].time.tick - pos;
|
|
834
|
+
}
|
|
835
|
+
else
|
|
836
|
+
{
|
|
837
|
+
count = sampleCount - pos;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
addSamples(count);
|
|
841
|
+
pos += count;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
void Plugin::addSamples(size_t samples)
|
|
846
|
+
{
|
|
847
|
+
size_t i;
|
|
848
|
+
size_t j;
|
|
849
|
+
size_t v;
|
|
850
|
+
|
|
851
|
+
// TODO this isn't very efficient right now...
|
|
852
|
+
|
|
853
|
+
// Grow temp buffers to appropriate size / zero them:
|
|
854
|
+
for (i = 0; i < m_temp_outputs.size(); i++)
|
|
855
|
+
{
|
|
856
|
+
for (j = 0; j < samples; j++)
|
|
857
|
+
{
|
|
858
|
+
if (m_temp_outputs[i].size() < (j+1))
|
|
859
|
+
{
|
|
860
|
+
m_temp_outputs[i].push_back(0.0);
|
|
861
|
+
}
|
|
862
|
+
else
|
|
863
|
+
{
|
|
864
|
+
m_temp_outputs[i][j] = 0.0;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
AVOIDDENORMALS;
|
|
870
|
+
|
|
871
|
+
// Add all voices together
|
|
872
|
+
for (v = 0; v < m_voices.size(); v++)
|
|
873
|
+
{
|
|
874
|
+
m_voices[v]->m_mydsp->compute(samples, &m_inputs[0], &m_outputs[0]);
|
|
875
|
+
|
|
876
|
+
// Accumulate in temp buffer
|
|
877
|
+
for (i = 0; i < m_outputs.size(); i++)
|
|
878
|
+
{
|
|
879
|
+
for (j = 0; j < samples; j++)
|
|
880
|
+
{
|
|
881
|
+
m_temp_outputs[i][j] += m_outputs[i][j];
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
// Transfer accumulator to actual outputs
|
|
887
|
+
for (i = 0; i < m_outputs.size(); i++)
|
|
888
|
+
{
|
|
889
|
+
for (j = 0; j < samples; j++)
|
|
890
|
+
{
|
|
891
|
+
// TODO find a better way to protect against clipping.
|
|
892
|
+
m_outputs[i][j] = m_temp_outputs[i][j] / (float)MAX_POLYPHONY;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
void Plugin::setFreq(float val, int voice)
|
|
898
|
+
{
|
|
899
|
+
m_voices[voice]->setFreq(val);
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
void Plugin::setGate(float val, int voice)
|
|
903
|
+
{
|
|
904
|
+
m_voices[voice]->setGate(val);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
void Plugin::setGain(float val, int voice)
|
|
908
|
+
{
|
|
909
|
+
m_voices[voice]->setGain(val);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
void Plugin::addButton(const char* label, float* zone)
|
|
913
|
+
{
|
|
914
|
+
if (!ckAnyMatch(label, "gate"))
|
|
915
|
+
{
|
|
916
|
+
add_control_with_default(0);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
void Plugin::addToggleButton(const char* label, float* zone)
|
|
921
|
+
{
|
|
922
|
+
add_control_with_default(0);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
void Plugin::addCheckButton(const char* label, float* zone)
|
|
926
|
+
{
|
|
927
|
+
add_control_with_default(0);
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
void Plugin::addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step)
|
|
931
|
+
{
|
|
932
|
+
if (!ckAllMatches(label))
|
|
933
|
+
{
|
|
934
|
+
add_control_with_default(init);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
void Plugin::addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step)
|
|
938
|
+
{
|
|
939
|
+
if (!ckAllMatches(label))
|
|
940
|
+
{
|
|
941
|
+
add_control_with_default(init);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
void Plugin::addNumEntry(const char* label, float* zone, float init, float min, float max, float step)
|
|
945
|
+
{
|
|
946
|
+
if (!ckAllMatches(label))
|
|
947
|
+
{
|
|
948
|
+
add_control_with_default(init);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
void Plugin::addNumDisplay(const char* label, float* zone, int precision)
|
|
953
|
+
{
|
|
954
|
+
add_control_with_default(0);
|
|
955
|
+
}
|
|
956
|
+
void Plugin::addTextDisplay(const char* label, float* zone, char* names[], float min, float max)
|
|
957
|
+
{
|
|
958
|
+
add_control_with_default(0);
|
|
959
|
+
}
|
|
960
|
+
void Plugin::addHorizontalBargraph(const char* label, float* zone, float min, float max)
|
|
961
|
+
{
|
|
962
|
+
add_control_with_default(min);
|
|
963
|
+
}
|
|
964
|
+
void Plugin::addVerticalBargraph(const char* label, float* zone, float min, float max)
|
|
965
|
+
{
|
|
966
|
+
add_control_with_default(min);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
void Plugin::openFrameBox(const char* label)
|
|
970
|
+
{
|
|
971
|
+
}
|
|
972
|
+
void Plugin::openTabBox(const char* label)
|
|
973
|
+
{
|
|
974
|
+
}
|
|
975
|
+
void Plugin::openHorizontalBox(const char* label)
|
|
976
|
+
{
|
|
977
|
+
}
|
|
978
|
+
void Plugin::openVerticalBox(const char* label)
|
|
979
|
+
{
|
|
980
|
+
}
|
|
981
|
+
void Plugin::closeBox()
|
|
982
|
+
{
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
void Plugin::show()
|
|
986
|
+
{
|
|
987
|
+
}
|
|
988
|
+
void Plugin::run()
|
|
989
|
+
{
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
bool Plugin::ckAnyMatch(const char* label, const char* indexName)
|
|
993
|
+
{
|
|
994
|
+
// TODO do case-insensitive here...
|
|
995
|
+
if (strcmp(label,indexName)==0)
|
|
996
|
+
{
|
|
997
|
+
return true;
|
|
998
|
+
}
|
|
999
|
+
return false;
|
|
1000
|
+
}
|
|
1001
|
+
bool Plugin::ckAllMatches(const char* label)
|
|
1002
|
+
{
|
|
1003
|
+
bool result = false;
|
|
1004
|
+
result = result || ckAnyMatch(label,"gain");
|
|
1005
|
+
result = result || ckAnyMatch(label,"gate");
|
|
1006
|
+
result = result || ckAnyMatch(label,"freq");
|
|
1007
|
+
return result;
|
|
1008
|
+
}
|
|
1009
|
+
void Plugin::add_control_with_default(float default_value)
|
|
1010
|
+
{
|
|
1011
|
+
// TODO may need to consider different things for input and output controls...
|
|
1012
|
+
m_controls.push_back(0);
|
|
1013
|
+
m_control_defaults.push_back(default_value);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1018
|
+
// Voice methods
|
|
1019
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1020
|
+
Voice::Voice(int sampleRate) :
|
|
1021
|
+
m_samplerate(sampleRate),
|
|
1022
|
+
m_freq_zone(0),
|
|
1023
|
+
m_gate_zone(0),
|
|
1024
|
+
m_gain_zone(0)
|
|
1025
|
+
{
|
|
1026
|
+
m_mydsp = new mydsp();
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
Voice::~Voice()
|
|
1030
|
+
{
|
|
1031
|
+
delete m_mydsp;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
void Voice::setFreq(float val)
|
|
1035
|
+
{
|
|
1036
|
+
if (m_freq_zone)
|
|
1037
|
+
{
|
|
1038
|
+
*m_freq_zone = val;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
void Voice::setGate(float val)
|
|
1043
|
+
{
|
|
1044
|
+
if (m_gate_zone)
|
|
1045
|
+
{
|
|
1046
|
+
*m_gate_zone = val;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
void Voice::setGain(float val)
|
|
1051
|
+
{
|
|
1052
|
+
if (m_gain_zone)
|
|
1053
|
+
{
|
|
1054
|
+
*m_gain_zone = val;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
void Voice::addButton(const char* label, float* zone)
|
|
1059
|
+
{
|
|
1060
|
+
if (!ckAnyMatch(label, "gate", &m_gate_zone, zone))
|
|
1061
|
+
{
|
|
1062
|
+
addZone(zone);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
void Voice::addToggleButton(const char* label, float* zone)
|
|
1067
|
+
{
|
|
1068
|
+
addZone(zone);
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
void Voice::addCheckButton(const char* label, float* zone)
|
|
1072
|
+
{
|
|
1073
|
+
addZone(zone);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
void Voice::addVerticalSlider(const char* label, float* zone, float init, float min, float max, float step)
|
|
1077
|
+
{
|
|
1078
|
+
if (!ckAllMatches(label, zone))
|
|
1079
|
+
{
|
|
1080
|
+
addZone(zone);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
void Voice::addHorizontalSlider(const char* label, float* zone, float init, float min, float max, float step)
|
|
1084
|
+
{
|
|
1085
|
+
if (!ckAllMatches(label, zone))
|
|
1086
|
+
{
|
|
1087
|
+
addZone(zone);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
void Voice::addNumEntry(const char* label, float* zone, float init, float min, float max, float step)
|
|
1091
|
+
{
|
|
1092
|
+
if (!ckAllMatches(label, zone))
|
|
1093
|
+
{
|
|
1094
|
+
addZone(zone);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
void Voice::addNumDisplay(const char* label, float* zone, int precision)
|
|
1099
|
+
{
|
|
1100
|
+
addZone(zone);
|
|
1101
|
+
}
|
|
1102
|
+
void Voice::addTextDisplay(const char* label, float* zone, char* names[], float min, float max)
|
|
1103
|
+
{
|
|
1104
|
+
addZone(zone);
|
|
1105
|
+
}
|
|
1106
|
+
void Voice::addHorizontalBargraph(const char* label, float* zone, float min, float max)
|
|
1107
|
+
{
|
|
1108
|
+
addZone(zone);
|
|
1109
|
+
}
|
|
1110
|
+
void Voice::addVerticalBargraph(const char* label, float* zone, float min, float max)
|
|
1111
|
+
{
|
|
1112
|
+
addZone(zone);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
void Voice::openFrameBox(const char* label)
|
|
1116
|
+
{
|
|
1117
|
+
}
|
|
1118
|
+
void Voice::openTabBox(const char* label)
|
|
1119
|
+
{
|
|
1120
|
+
}
|
|
1121
|
+
void Voice::openHorizontalBox(const char* label)
|
|
1122
|
+
{
|
|
1123
|
+
}
|
|
1124
|
+
void Voice::openVerticalBox(const char* label)
|
|
1125
|
+
{
|
|
1126
|
+
}
|
|
1127
|
+
void Voice::closeBox()
|
|
1128
|
+
{
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
void Voice::show()
|
|
1132
|
+
{
|
|
1133
|
+
}
|
|
1134
|
+
void Voice::run()
|
|
1135
|
+
{
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
bool Voice::ckAnyMatch(const char* label, const char* indexName, float **zone, float* newZone)
|
|
1139
|
+
{
|
|
1140
|
+
// TODO do case-insensitive here...
|
|
1141
|
+
if (strcmp(label,indexName)==0)
|
|
1142
|
+
{
|
|
1143
|
+
*zone = newZone;
|
|
1144
|
+
return true;
|
|
1145
|
+
}
|
|
1146
|
+
return false;
|
|
1147
|
+
}
|
|
1148
|
+
bool Voice::ckAllMatches(const char* label, float* zone)
|
|
1149
|
+
{
|
|
1150
|
+
bool result = false;
|
|
1151
|
+
result = result || ckAnyMatch(label,"gain", &m_gain_zone, zone);
|
|
1152
|
+
result = result || ckAnyMatch(label,"gate", &m_gate_zone, zone);
|
|
1153
|
+
result = result || ckAnyMatch(label,"freq", &m_freq_zone, zone);
|
|
1154
|
+
return result;
|
|
1155
|
+
}
|
|
1156
|
+
void Voice::addZone(float* zone)
|
|
1157
|
+
{
|
|
1158
|
+
m_controls.push_back(zone);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1163
|
+
// Shared object hooks
|
|
1164
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1165
|
+
extern "C"
|
|
1166
|
+
{
|
|
1167
|
+
|
|
1168
|
+
#ifdef __GNUC__
|
|
1169
|
+
__attribute__((constructor)) void init(void)
|
|
1170
|
+
#else
|
|
1171
|
+
void _init(void)
|
|
1172
|
+
#endif
|
|
1173
|
+
{
|
|
1174
|
+
AVOIDDENORMALS;
|
|
1175
|
+
|
|
1176
|
+
if (g_dssi_descriptor == 0)
|
|
1177
|
+
{
|
|
1178
|
+
g_ladspa_descriptor = new LADSPA_Descriptor();
|
|
1179
|
+
g_dssi_descriptor = new DSSI_Descriptor();
|
|
1180
|
+
|
|
1181
|
+
mydsp* temp_mydsp = new mydsp();
|
|
1182
|
+
DescriptorUI* temp_descriptor_ui = new DescriptorUI(temp_mydsp->getNumInputs(), temp_mydsp->getNumOutputs());
|
|
1183
|
+
temp_mydsp->buildUserInterface(temp_descriptor_ui);
|
|
1184
|
+
|
|
1185
|
+
// Fill the descriptors:
|
|
1186
|
+
// TODO figure out strdup with const strings
|
|
1187
|
+
g_ladspa_descriptor->UniqueID = 0;
|
|
1188
|
+
g_ladspa_descriptor->Label = get_metadata_if_exists("name", g_name);
|
|
1189
|
+
g_ladspa_descriptor->Properties = LADSPA_PROPERTY_HARD_RT_CAPABLE;
|
|
1190
|
+
g_ladspa_descriptor->Name = get_metadata_if_exists("name", g_name);
|
|
1191
|
+
g_ladspa_descriptor->Maker = get_metadata_if_exists("author", "Maker");
|
|
1192
|
+
g_ladspa_descriptor->Copyright = get_metadata_if_exists("copyright", "Copyright");
|
|
1193
|
+
g_ladspa_descriptor->PortCount = g_port_descriptors.size();
|
|
1194
|
+
g_ladspa_descriptor->PortDescriptors = &g_port_descriptors[0];
|
|
1195
|
+
g_ladspa_descriptor->PortNames = &g_port_names[0];
|
|
1196
|
+
g_ladspa_descriptor->PortRangeHints = &g_port_range_hints[0];
|
|
1197
|
+
g_ladspa_descriptor->ImplementationData = 0;
|
|
1198
|
+
g_ladspa_descriptor->instantiate = Plugin::instantiate;
|
|
1199
|
+
g_ladspa_descriptor->connect_port = Plugin::connectPort;
|
|
1200
|
+
g_ladspa_descriptor->activate = Plugin::activate;
|
|
1201
|
+
g_ladspa_descriptor->run = Plugin::run;
|
|
1202
|
+
g_ladspa_descriptor->run_adding = 0;
|
|
1203
|
+
g_ladspa_descriptor->set_run_adding_gain = 0;
|
|
1204
|
+
g_ladspa_descriptor->deactivate = 0;
|
|
1205
|
+
g_ladspa_descriptor->cleanup = Plugin::cleanup;
|
|
1206
|
+
|
|
1207
|
+
g_dssi_descriptor->DSSI_API_Version = 1;
|
|
1208
|
+
g_dssi_descriptor->LADSPA_Plugin = g_ladspa_descriptor;
|
|
1209
|
+
g_dssi_descriptor->configure = 0;
|
|
1210
|
+
g_dssi_descriptor->get_program = Plugin::getProgram;
|
|
1211
|
+
g_dssi_descriptor->select_program = Plugin::selectProgram;
|
|
1212
|
+
g_dssi_descriptor->get_midi_controller_for_port = Plugin::getMidiController;
|
|
1213
|
+
g_dssi_descriptor->run_synth = Plugin::runSynth;
|
|
1214
|
+
g_dssi_descriptor->run_synth_adding = 0;
|
|
1215
|
+
g_dssi_descriptor->run_multiple_synths = 0;
|
|
1216
|
+
g_dssi_descriptor->run_multiple_synths_adding = 0;
|
|
1217
|
+
|
|
1218
|
+
// Program description (TODO if we eventually support multiple programs we will need to handle this differently)
|
|
1219
|
+
g_program_descriptor.Bank = 0;
|
|
1220
|
+
g_program_descriptor.Program = 0;
|
|
1221
|
+
g_program_descriptor.Name = get_metadata_if_exists("name", g_name);
|
|
1222
|
+
|
|
1223
|
+
delete temp_mydsp;
|
|
1224
|
+
delete temp_descriptor_ui;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
#ifdef __GNUC__
|
|
1229
|
+
__attribute__((destructor)) void fini(void)
|
|
1230
|
+
#else
|
|
1231
|
+
void _fini()
|
|
1232
|
+
#endif
|
|
1233
|
+
{
|
|
1234
|
+
if (g_ladspa_descriptor)
|
|
1235
|
+
{
|
|
1236
|
+
delete g_ladspa_descriptor;
|
|
1237
|
+
}
|
|
1238
|
+
if (g_dssi_descriptor)
|
|
1239
|
+
{
|
|
1240
|
+
delete g_dssi_descriptor;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
const LADSPA_Descriptor *ladspa_descriptor(unsigned long index)
|
|
1245
|
+
{
|
|
1246
|
+
return 0;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
const DSSI_Descriptor *dssi_descriptor(unsigned long index)
|
|
1250
|
+
{
|
|
1251
|
+
if (index == 0)
|
|
1252
|
+
{
|
|
1253
|
+
return g_dssi_descriptor;
|
|
1254
|
+
}
|
|
1255
|
+
else
|
|
1256
|
+
{
|
|
1257
|
+
return NULL;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
/******************** END dssi.cpp ****************/
|