├── .astylerc
├── .github
└── CONTRIBUTING.md
├── .gitignore
├── .gitmodules
├── CHANGELOG.md
├── Component.plist
├── Core.json
├── Distribution.xml
├── Entitlements.plist
├── Info.plist
├── LICENSE-GPLv3.txt
├── LICENSE-dist.md
├── LICENSE.md
├── Makefile
├── README.md
├── Rack.rc
├── adapters
└── standalone.cpp
├── arch.mk
├── cacert.pem
├── compile.mk
├── dep.mk
├── dep
└── Makefile
├── docs
├── .gitignore
├── Doxyfile
├── Makefile
├── index.md
└── logo.png
├── helper.py
├── icon.icns
├── icon.ico
├── include
├── Quantity.hpp
├── app
│ ├── AudioDisplay.hpp
│ ├── Browser.hpp
│ ├── CableWidget.hpp
│ ├── CircularShadow.hpp
│ ├── Knob.hpp
│ ├── LedDisplay.hpp
│ ├── LightWidget.hpp
│ ├── MenuBar.hpp
│ ├── MidiDisplay.hpp
│ ├── ModuleLightWidget.hpp
│ ├── ModuleWidget.hpp
│ ├── MultiLightWidget.hpp
│ ├── ParamWidget.hpp
│ ├── PortWidget.hpp
│ ├── RackScrollWidget.hpp
│ ├── RackWidget.hpp
│ ├── RailWidget.hpp
│ ├── Scene.hpp
│ ├── SliderKnob.hpp
│ ├── SvgButton.hpp
│ ├── SvgKnob.hpp
│ ├── SvgPanel.hpp
│ ├── SvgPort.hpp
│ ├── SvgScrew.hpp
│ ├── SvgSlider.hpp
│ ├── SvgSwitch.hpp
│ ├── Switch.hpp
│ ├── TipWindow.hpp
│ └── common.hpp
├── arch.hpp
├── asset.hpp
├── audio.hpp
├── color.hpp
├── common.hpp
├── componentlibrary.hpp
├── context.hpp
├── dsp
│ ├── approx.hpp
│ ├── common.hpp
│ ├── convert.hpp
│ ├── digital.hpp
│ ├── fft.hpp
│ ├── filter.hpp
│ ├── fir.hpp
│ ├── midi.hpp
│ ├── minblep.hpp
│ ├── ode.hpp
│ ├── resampler.hpp
│ ├── ringbuffer.hpp
│ ├── vumeter.hpp
│ └── window.hpp
├── engine
│ ├── Cable.hpp
│ ├── Engine.hpp
│ ├── Light.hpp
│ ├── LightInfo.hpp
│ ├── Module.hpp
│ ├── Param.hpp
│ ├── ParamHandle.hpp
│ ├── ParamQuantity.hpp
│ ├── Port.hpp
│ └── PortInfo.hpp
├── gamepad.hpp
├── helpers.hpp
├── history.hpp
├── keyboard.hpp
├── library.hpp
├── logger.hpp
├── math.hpp
├── midi.hpp
├── midiloopback.hpp
├── mutex.hpp
├── network.hpp
├── patch.hpp
├── plugin.hpp
├── plugin
│ ├── Model.hpp
│ ├── Plugin.hpp
│ └── callbacks.hpp
├── rack.hpp
├── rack0.hpp
├── random.hpp
├── rtaudio.hpp
├── rtmidi.hpp
├── settings.hpp
├── simd
│ ├── Vector.hpp
│ ├── common.hpp
│ ├── functions.hpp
│ ├── sse_mathfun.h
│ └── sse_mathfun_extension.h
├── string.hpp
├── system.hpp
├── tag.hpp
├── ui
│ ├── Button.hpp
│ ├── ChoiceButton.hpp
│ ├── Label.hpp
│ ├── List.hpp
│ ├── Menu.hpp
│ ├── MenuEntry.hpp
│ ├── MenuItem.hpp
│ ├── MenuLabel.hpp
│ ├── MenuOverlay.hpp
│ ├── MenuSeparator.hpp
│ ├── OptionButton.hpp
│ ├── ProgressBar.hpp
│ ├── RadioButton.hpp
│ ├── ScrollWidget.hpp
│ ├── Scrollbar.hpp
│ ├── SequentialLayout.hpp
│ ├── Slider.hpp
│ ├── TextField.hpp
│ ├── Tooltip.hpp
│ ├── TooltipOverlay.hpp
│ └── common.hpp
├── weakptr.hpp
├── widget
│ ├── FramebufferWidget.hpp
│ ├── OpaqueWidget.hpp
│ ├── OpenGlWidget.hpp
│ ├── SvgWidget.hpp
│ ├── TransformWidget.hpp
│ ├── TransparentWidget.hpp
│ ├── Widget.hpp
│ ├── ZoomWidget.hpp
│ └── event.hpp
└── window
│ ├── Svg.hpp
│ └── Window.hpp
├── installer.nsi
├── plugin.mk
├── plugins
└── .gitignore
├── presets
├── CV-CC
│ ├── 0_CC 0-15.vcvm
│ ├── 1_CC 16-31.vcvm
│ ├── 2_CC 32-47.vcvm
│ ├── 3_CC 48-63.vcvm
│ ├── 4_CC 64-79.vcvm
│ ├── 5_CC 80-95.vcvm
│ ├── 6_CC 96-111.vcvm
│ └── 7_CC 112-127.vcvm
├── CV-Gate
│ ├── 0_C-1-D#0.vcvm
│ ├── 1_C0-D#1.vcvm
│ ├── 2_C1-D#2.vcvm
│ ├── 3_C2-D#3.vcvm
│ ├── 4_C3-D#4.vcvm
│ ├── 5_C4-D#5.vcvm
│ ├── 6_C5-D#6.vcvm
│ ├── 7_C6-D#7.vcvm
│ ├── 8_C7-D#8.vcvm
│ └── 9_C8-D#9.vcvm
├── MIDICCToCVInterface
│ ├── 0_CC 0-15.vcvm
│ ├── 1_CC 16-31.vcvm
│ ├── 2_CC 32-47.vcvm
│ ├── 3_CC 48-63.vcvm
│ ├── 4_CC 64-79.vcvm
│ ├── 5_CC 80-95.vcvm
│ ├── 6_CC 96-111.vcvm
│ └── 7_CC 112-127.vcvm
└── MIDITriggerToCVInterface
│ ├── 0_C-1-D#0.vcvm
│ ├── 1_C0-D#1.vcvm
│ ├── 2_C1-D#2.vcvm
│ ├── 3_C2-D#3.vcvm
│ ├── 4_C3-D#4.vcvm
│ ├── 5_C4-D#5.vcvm
│ ├── 6_C5-D#6.vcvm
│ ├── 7_C6-D#7.vcvm
│ ├── 8_C7-D#8.vcvm
│ └── 9_C8-D#9.vcvm
├── res
├── ComponentLibrary
│ ├── ADAT.svg
│ ├── BefacoBigKnob.svg
│ ├── BefacoBigKnob_bg.svg
│ ├── BefacoPush_0.svg
│ ├── BefacoPush_1.svg
│ ├── BefacoSlidePot.svg
│ ├── BefacoSlidePotHandle.svg
│ ├── BefacoSwitch.svg
│ ├── BefacoSwitch_0.svg
│ ├── BefacoSwitch_1.svg
│ ├── BefacoSwitch_2.svg
│ ├── BefacoTinyKnobWhite_bg.svg
│ ├── BefacoTinyPointBlack.svg
│ ├── CKD6_0.svg
│ ├── CKD6_1.svg
│ ├── CKSSThreeHorizontal_0.svg
│ ├── CKSSThreeHorizontal_1.svg
│ ├── CKSSThreeHorizontal_2.svg
│ ├── CKSSThree_0.svg
│ ├── CKSSThree_1.svg
│ ├── CKSSThree_2.svg
│ ├── CKSS_0.svg
│ ├── CKSS_1.svg
│ ├── CL1362.svg
│ ├── Davies1900hBlack.svg
│ ├── Davies1900hBlack_bg.svg
│ ├── Davies1900hLargeBlack.svg
│ ├── Davies1900hLargeBlack_bg.svg
│ ├── Davies1900hLargeRed.svg
│ ├── Davies1900hLargeRed_bg.svg
│ ├── Davies1900hLargeWhite.svg
│ ├── Davies1900hLargeWhite_bg.svg
│ ├── Davies1900hRed.svg
│ ├── Davies1900hRed_bg.svg
│ ├── Davies1900hWhite.svg
│ ├── Davies1900hWhite_bg.svg
│ ├── LargeLight.svg
│ ├── MIDI_DIN.svg
│ ├── MediumLight.svg
│ ├── NKK_0.svg
│ ├── NKK_1.svg
│ ├── NKK_2.svg
│ ├── PB61303.svg
│ ├── PJ301M-dark.svg
│ ├── PJ301M.svg
│ ├── PJ3410.svg
│ ├── Plug.svg
│ ├── PlugPort.svg
│ ├── Rail-hcdark.svg
│ ├── Rail-light.svg
│ ├── Rail.svg
│ ├── Rogan1PBlue.svg
│ ├── Rogan1PBlue_fg.svg
│ ├── Rogan1PGreen.svg
│ ├── Rogan1PGreen_fg.svg
│ ├── Rogan1PRed.svg
│ ├── Rogan1PRed_fg.svg
│ ├── Rogan1PSBlue.svg
│ ├── Rogan1PSBlue_fg.svg
│ ├── Rogan1PSGreen.svg
│ ├── Rogan1PSGreen_fg.svg
│ ├── Rogan1PSRed.svg
│ ├── Rogan1PSRed_fg.svg
│ ├── Rogan1PSWhite.svg
│ ├── Rogan1PSWhite_fg.svg
│ ├── Rogan1PS_bg.svg
│ ├── Rogan1PWhite.svg
│ ├── Rogan1PWhite_fg.svg
│ ├── Rogan1P_bg.svg
│ ├── Rogan2PBlue.svg
│ ├── Rogan2PBlue_fg.svg
│ ├── Rogan2PGreen.svg
│ ├── Rogan2PGreen_fg.svg
│ ├── Rogan2PRed.svg
│ ├── Rogan2PRed_fg.svg
│ ├── Rogan2PSBlue.svg
│ ├── Rogan2PSBlue_fg.svg
│ ├── Rogan2PSGreen.svg
│ ├── Rogan2PSGreen_fg.svg
│ ├── Rogan2PSRed.svg
│ ├── Rogan2PSRed_fg.svg
│ ├── Rogan2PSWhite.svg
│ ├── Rogan2PSWhite_fg.svg
│ ├── Rogan2PS_bg.svg
│ ├── Rogan2PWhite.svg
│ ├── Rogan2PWhite_fg.svg
│ ├── Rogan2P_bg.svg
│ ├── Rogan2SGray.svg
│ ├── Rogan2SGray_fg.svg
│ ├── Rogan2S_bg.svg
│ ├── Rogan3PBlue.svg
│ ├── Rogan3PBlue_fg.svg
│ ├── Rogan3PGreen.svg
│ ├── Rogan3PGreen_fg.svg
│ ├── Rogan3PRed.svg
│ ├── Rogan3PRed_fg.svg
│ ├── Rogan3PSBlue.svg
│ ├── Rogan3PSBlue_fg.svg
│ ├── Rogan3PSGreen.svg
│ ├── Rogan3PSGreen_fg.svg
│ ├── Rogan3PSRed.svg
│ ├── Rogan3PSRed_fg.svg
│ ├── Rogan3PSWhite.svg
│ ├── Rogan3PSWhite_fg.svg
│ ├── Rogan3PS_bg.svg
│ ├── Rogan3PWhite.svg
│ ├── Rogan3PWhite_fg.svg
│ ├── Rogan3P_bg.svg
│ ├── Rogan5PSGray.svg
│ ├── Rogan5PSGray_fg.svg
│ ├── Rogan5PS_bg.svg
│ ├── Rogan6PSWhite.svg
│ ├── Rogan6PSWhite_fg.svg
│ ├── Rogan6PS_bg.svg
│ ├── RoundBigBlackKnob.svg
│ ├── RoundBigBlackKnob_bg.svg
│ ├── RoundBlackKnob.svg
│ ├── RoundBlackKnob_bg.svg
│ ├── RoundHugeBlackKnob.svg
│ ├── RoundHugeBlackKnob_bg.svg
│ ├── RoundLargeBlackKnob.svg
│ ├── RoundLargeBlackKnob_bg.svg
│ ├── RoundSmallBlackKnob.svg
│ ├── RoundSmallBlackKnob_bg.svg
│ ├── ScrewBlack.svg
│ ├── ScrewSilver.svg
│ ├── SmallLight.svg
│ ├── SynthTechAlco.svg
│ ├── SynthTechAlco_bg.svg
│ ├── TL1105_0.svg
│ ├── TL1105_1.svg
│ ├── TinyLight.svg
│ ├── Trimpot.svg
│ ├── Trimpot_bg.svg
│ ├── USB_B.svg
│ ├── VCVBezel.svg
│ ├── VCVButton_0.svg
│ ├── VCVButton_1.svg
│ ├── VCVSlider.svg
│ ├── VCVSliderHandle.svg
│ └── VCVSliderLight.svg
├── Core
│ ├── Audio16-dark.svg
│ ├── Audio16.svg
│ ├── Audio2-dark.svg
│ ├── Audio2.svg
│ ├── Audio8-dark.svg
│ ├── Audio8.svg
│ ├── CV_MIDI-dark.svg
│ ├── CV_MIDI.svg
│ ├── CV_MIDICC-dark.svg
│ ├── CV_MIDICC.svg
│ ├── Gate_MIDI-dark.svg
│ ├── Gate_MIDI.svg
│ ├── MIDICC_CV-dark.svg
│ ├── MIDICC_CV.svg
│ ├── MIDIMap-dark.svg
│ ├── MIDIMap.svg
│ ├── MIDI_CV-dark.svg
│ ├── MIDI_CV.svg
│ ├── MIDI_Gate-dark.svg
│ ├── MIDI_Gate.svg
│ ├── Notes-dark.svg
│ └── Notes.svg
├── fonts
│ ├── DSEG-LICENSE.txt
│ ├── DSEG7ClassicMini-Bold.ttf
│ ├── DSEG7ClassicMini-BoldItalic.ttf
│ ├── DSEG7ClassicMini-Italic.ttf
│ ├── DSEG7ClassicMini-Light.ttf
│ ├── DSEG7ClassicMini-LightItalic.ttf
│ ├── DSEG7ClassicMini-Regular.ttf
│ ├── DejaVuSans-LICENSE.txt
│ ├── DejaVuSans.ttf
│ ├── Noto-LICENSE.txt
│ ├── NotoEmoji-Medium.ttf
│ ├── NotoSansJP-Medium.otf
│ ├── NotoSansSC-Medium.otf
│ ├── Nunito-Bold.ttf
│ ├── Nunito-LICENSE.txt
│ ├── ShareTechMono-Regular-LICENSE.txt
│ └── ShareTechMono-Regular.ttf
└── icon.png
├── src
├── Quantity.cpp
├── app
│ ├── AudioDisplay.cpp
│ ├── Browser.cpp
│ ├── CableWidget.cpp
│ ├── CircularShadow.cpp
│ ├── Knob.cpp
│ ├── LedDisplay.cpp
│ ├── LightWidget.cpp
│ ├── MenuBar.cpp
│ ├── MidiDisplay.cpp
│ ├── ModuleLightWidget.cpp
│ ├── ModuleWidget.cpp
│ ├── MultiLightWidget.cpp
│ ├── ParamWidget.cpp
│ ├── PortWidget.cpp
│ ├── RackScrollWidget.cpp
│ ├── RackWidget.cpp
│ ├── RailWidget.cpp
│ ├── Scene.cpp
│ ├── SliderKnob.cpp
│ ├── SvgButton.cpp
│ ├── SvgKnob.cpp
│ ├── SvgPanel.cpp
│ ├── SvgPort.cpp
│ ├── SvgScrew.cpp
│ ├── SvgSlider.cpp
│ ├── SvgSwitch.cpp
│ ├── Switch.cpp
│ └── TipWindow.cpp
├── asset.cpp
├── asset.mm
├── audio.cpp
├── color.cpp
├── common.cpp
├── context.cpp
├── core
│ ├── Audio.cpp
│ ├── Blank.cpp
│ ├── CV_MIDI.cpp
│ ├── CV_MIDICC.cpp
│ ├── Gate_MIDI.cpp
│ ├── MIDICC_CV.cpp
│ ├── MIDIMap.cpp
│ ├── MIDI_CV.cpp
│ ├── MIDI_Gate.cpp
│ ├── Notes.cpp
│ ├── plugin.cpp
│ └── plugin.hpp
├── dep.cpp
├── dsp
│ └── minblep.cpp
├── engine
│ ├── Cable.cpp
│ ├── Engine.cpp
│ ├── LightInfo.cpp
│ ├── Module.cpp
│ ├── ParamQuantity.cpp
│ └── PortInfo.cpp
├── gamepad.cpp
├── history.cpp
├── keyboard.cpp
├── library.cpp
├── logger.cpp
├── midi.cpp
├── midiloopback.cpp
├── network.cpp
├── patch.cpp
├── plugin.cpp
├── plugin
│ ├── Model.cpp
│ └── Plugin.cpp
├── random.cpp
├── rtaudio.cpp
├── rtaudio.mm
├── rtmidi.cpp
├── settings.cpp
├── string.cpp
├── system.cpp
├── tag.cpp
├── ui
│ ├── Button.cpp
│ ├── ChoiceButton.cpp
│ ├── Label.cpp
│ ├── List.cpp
│ ├── Menu.cpp
│ ├── MenuEntry.cpp
│ ├── MenuItem.cpp
│ ├── MenuLabel.cpp
│ ├── MenuOverlay.cpp
│ ├── MenuSeparator.cpp
│ ├── OptionButton.cpp
│ ├── ProgressBar.cpp
│ ├── RadioButton.cpp
│ ├── ScrollWidget.cpp
│ ├── Scrollbar.cpp
│ ├── SequentialLayout.cpp
│ ├── Slider.cpp
│ ├── TextField.cpp
│ ├── Tooltip.cpp
│ └── common.cpp
├── widget
│ ├── FramebufferWidget.cpp
│ ├── OpenGlWidget.cpp
│ ├── SvgWidget.cpp
│ ├── Widget.cpp
│ ├── ZoomWidget.cpp
│ └── event.cpp
└── window
│ ├── Svg.cpp
│ └── Window.cpp
├── template.vcv
├── translations
├── de.json
├── en.json
├── es.json
├── fr.json
├── it.json
├── ja.json
└── zh.json
└── valgrind.supp
/.astylerc:
--------------------------------------------------------------------------------
1 | # astyle settings file
2 |
3 | # Requires Artistic Style 3.1
4 | # http://astyle.sourceforge.net/
5 |
6 | # Usage:
7 | # astyle --suffix=none --options=.astylerc filename.cpp
8 | # or recursively
9 | # astyle --suffix=none --options=.astylerc -r 'include/*' 'src/*'
10 | # or using find
11 | # find src include -type f | xargs astyle --suffix=none --options=.astylerc
12 |
13 | style=java
14 | indent=tab=2
15 | attach-closing-while
16 | indent-switches
17 | indent-preproc-block
18 | indent-preproc-define
19 | indent-col1-comments
20 | pad-oper
21 | pad-comma
22 | pad-header
23 | unpad-paren
24 | align-pointer=type
25 | align-reference=type
26 | break-closing-braces
27 | break-one-line-headers
28 | attach-return-type
29 | attach-return-type-decl
30 | keep-one-line-statements
31 | close-templates
32 |
--------------------------------------------------------------------------------
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 | VCV Rack is [open-source](https://opensource.org/osd) and [free software](https://www.gnu.org/philosophy/free-sw.en.html) but not open-contribution.
3 | VCV is unable to accept outside code contributions to Rack itself.
4 |
5 | However there are several ways you can be involved in the Rack project.
6 | - Answer questions in the [VCV communities](https://vcvrack.com/manual/Communities).
7 | - [Develop your own Rack plugin](https://vcvrack.com/manual/PluginDevelopmentTutorial), or help maintain an existing plugin.
8 | - Apply for a [job at VCV](https://vcvrack.com/jobs).
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore all dotfiles except git dotfiles
2 | .*
3 | !.git*
4 |
5 | # Binaries and build targets
6 | *.a
7 | *.so
8 | *.dylib
9 | *.dll
10 | *.exe
11 | *.res
12 | *.d
13 | *.dSYM
14 | *.vcvplugin
15 | /build
16 | /Rack
17 | /dep
18 | /dist
19 |
20 | # Rack folders
21 | /plugins
22 | /disabledplugins
23 | /patches
24 | /presets
25 | /licenses
26 | /autosave
27 | /settings.json
28 | /screenshots
29 | /selections
30 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "dep/nanovg"]
2 | path = dep/nanovg
3 | url = https://github.com/VCVRack/nanovg.git
4 | ignore = untracked
5 | [submodule "dep/nanosvg"]
6 | path = dep/nanosvg
7 | url = https://github.com/memononen/nanosvg.git
8 | ignore = untracked
9 | [submodule "dep/osdialog"]
10 | path = dep/osdialog
11 | url = https://github.com/AndrewBelt/osdialog.git
12 | ignore = untracked
13 | [submodule "dep/oui-blendish"]
14 | path = dep/oui-blendish
15 | url = https://github.com/VCVRack/oui-blendish.git
16 | ignore = untracked
17 | [submodule "dep/rtaudio"]
18 | path = dep/rtaudio
19 | url = https://github.com/VCVRack/rtaudio.git
20 | ignore = untracked
21 | [submodule "dep/glfw"]
22 | path = dep/glfw
23 | url = https://github.com/VCVRack/glfw.git
24 | ignore = untracked
25 | [submodule "dep/fuzzysearchdatabase"]
26 | path = dep/fuzzysearchdatabase
27 | url = https://bitbucket.org/j_norberg/fuzzysearchdatabase.git
28 | [submodule "dep/filesystem"]
29 | path = dep/filesystem
30 | url = https://github.com/gulrak/filesystem.git
31 | [submodule "dep/pffft"]
32 | path = dep/pffft
33 | url = https://bitbucket.org/jpommier/pffft.git
34 | [submodule "dep/rtmidi"]
35 | path = dep/rtmidi
36 | url = https://github.com/VCVRack/rtmidi.git
37 | [submodule "dep/tinyexpr"]
38 | path = dep/tinyexpr
39 | url = https://github.com/codeplea/tinyexpr.git
40 | [submodule "dep/speexdsp"]
41 | path = dep/speexdsp
42 | url = https://gitlab.xiph.org/xiph/speexdsp.git
43 | ignore = untracked
44 | [submodule "dep/simde"]
45 | path = dep/simde
46 | url = https://github.com/simd-everywhere/simde.git
47 |
--------------------------------------------------------------------------------
/Component.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | BundleHasStrictIdentifier
7 | BundleIsVersionChecked
8 | BundleIsRelocatable
9 | BundleOverwriteActionupgrade
10 | RootRelativeBundlePathVCV Rack 2 Free.app
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Distribution.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | VCV Rack 2 Free
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Component.pkg
20 |
--------------------------------------------------------------------------------
/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.get-task-allow
6 | com.apple.security.cs.allow-jit
7 | com.apple.security.cs.allow-unsigned-executable-memory
8 | com.apple.security.cs.disable-executable-page-protection
9 | com.apple.security.cs.disable-library-validation
10 | com.apple.security.device.audio-input
11 | com.apple.security.device.camera
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleInfoDictionaryVersion6.0
6 | CFBundleDevelopmentRegionEnglish
7 | CFBundleNameVCV Rack 2 Free
8 | CFBundleDisplayNameVCV Rack 2 Free
9 | CFBundleIdentifiercom.vcvrack.rack2
10 | CFBundleVersion{RACK_VERSION}
11 | CFBundlePackageTypeAPPL
12 | CFBundleSignatureRACK
13 | CFBundleExecutableRack
14 | CFBundleIconFileicon
15 | CFBundleShortVersionString{RACK_VERSION}
16 | NSHumanReadableCopyrightCopyright © VCV
17 | NSPrincipalClassNSApplication
18 | NSHighResolutionCapable
19 | NSMicrophoneUsageDescriptionThis is required for using line input from audio interfaces.
20 |
21 | CFBundleDocumentTypes
22 |
23 |
24 | CFBundleTypeExtensions
25 |
26 | vcv
27 |
28 | CFBundleTypeIconFileicon.icns
29 | CFBundleTypeNameVCV Rack Patch
30 | CFBundleTypeRoleEditor
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Rack.rc:
--------------------------------------------------------------------------------
1 | GLFW_ICON ICON icon.ico
--------------------------------------------------------------------------------
/arch.mk:
--------------------------------------------------------------------------------
1 | ifdef CROSS_COMPILE
2 | MACHINE := $(CROSS_COMPILE)
3 | else
4 | MACHINE ?= $(shell $(CC) -dumpmachine)
5 | endif
6 |
7 | ifneq (,$(findstring x86_64-,$(MACHINE)))
8 | ARCH_X64 := 1
9 | ARCH_CPU := x64
10 | else ifneq (,$(findstring arm64-,$(MACHINE)))
11 | ARCH_ARM64 := 1
12 | ARCH_CPU := arm64
13 | else ifneq (,$(findstring aarch64-,$(MACHINE)))
14 | ARCH_ARM64 := 1
15 | ARCH_CPU := arm64
16 | else
17 | $(error Could not determine CPU architecture of $(MACHINE))
18 | endif
19 |
20 | ifneq (,$(findstring -darwin,$(MACHINE)))
21 | ARCH_MAC := 1
22 | ARCH_OS := mac
23 | else ifneq (,$(findstring -mingw32,$(MACHINE)))
24 | ARCH_WIN := 1
25 | ARCH_OS := win
26 | else ifneq (,$(findstring -linux,$(MACHINE)))
27 | ARCH_LIN := 1
28 | ARCH_OS := lin
29 | else
30 | $(error Could not determine operating system of $(MACHINE))
31 | endif
32 |
33 | ARCH_NAME = $(ARCH_OS)-$(ARCH_CPU)
34 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | /html
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 |
2 | all: doxygen
3 |
4 | doxygen:
5 | doxygen Doxyfile
6 | # Fix 700 and 500 permissions that Doxygen generates for some reason
7 | find html -type d -exec chmod 755 {} \;
8 | find html -type f -exec chmod 644 {} \;
9 |
10 | run: doxygen
11 | http-server html
12 |
13 | upload: doxygen
14 | rsync html/ vcvrack.com:docs-v2/ -ruz --info=progress2 --delete
15 |
16 | clean:
17 | rm -rfv html
18 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | This documentation is generated by [Doxygen](https://www.doxygen.nl/index.html) as a convenience to Rack plugin developers and might not include certain functions, macros, and structures that are present in header files.
2 | It is therefore recommended to refer to Rack's header files as a true reference.
3 |
--------------------------------------------------------------------------------
/docs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCVRack/Rack/768d859187d64aed4d3d3db1f9c3aef596676116/docs/logo.png
--------------------------------------------------------------------------------
/icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCVRack/Rack/768d859187d64aed4d3d3db1f9c3aef596676116/icon.icns
--------------------------------------------------------------------------------
/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VCVRack/Rack/768d859187d64aed4d3d3db1f9c3aef596676116/icon.ico
--------------------------------------------------------------------------------
/include/app/AudioDisplay.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | struct AudioDriverChoice : LedDisplayChoice {
14 | audio::Port* port;
15 | void onAction(const ActionEvent& e) override;
16 | void step() override;
17 | };
18 |
19 |
20 | struct AudioDeviceChoice : LedDisplayChoice {
21 | audio::Port* port;
22 | void onAction(const ActionEvent& e) override;
23 | void step() override;
24 | };
25 |
26 |
27 | struct AudioSampleRateChoice : LedDisplayChoice {
28 | audio::Port* port;
29 | void onAction(const ActionEvent& e) override;
30 | void step() override;
31 | };
32 |
33 |
34 | struct AudioBlockSizeChoice : LedDisplayChoice {
35 | audio::Port* port;
36 | void onAction(const ActionEvent& e) override;
37 | void step() override;
38 | };
39 |
40 |
41 | struct AudioDeviceMenuChoice : AudioDeviceChoice {
42 | void onAction(const ActionEvent& e) override;
43 | };
44 |
45 |
46 | /** Designed for Audio-8 and Audio-16 module. */
47 | struct AudioDisplay : LedDisplay {
48 | AudioDriverChoice* driverChoice;
49 | LedDisplaySeparator* driverSeparator;
50 | AudioDeviceChoice* deviceChoice;
51 | LedDisplaySeparator* deviceSeparator;
52 | AudioSampleRateChoice* sampleRateChoice;
53 | LedDisplaySeparator* sampleRateSeparator;
54 | AudioBlockSizeChoice* bufferSizeChoice;
55 | void setAudioPort(audio::Port* port);
56 | };
57 |
58 |
59 | /** A virtual audio port graphic that displays an audio menu when clicked. */
60 | struct AudioButton : SvgButton {
61 | audio::Port* port;
62 | void setAudioPort(audio::Port* port);
63 | void onAction(const ActionEvent& e) override;
64 | };
65 |
66 |
67 | /** Appends menu items to the given menu with driver, device, etc.
68 | Useful alternative to putting an AudioDisplay on your module's panel.
69 | */
70 | void appendAudioMenu(ui::Menu* menu, audio::Port* port);
71 |
72 |
73 | } // namespace app
74 | } // namespace rack
75 |
--------------------------------------------------------------------------------
/include/app/Browser.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | PRIVATE void browserInit();
11 | PRIVATE widget::Widget* browserCreate();
12 |
13 |
14 | } // namespace app
15 | } // namespace rack
16 |
--------------------------------------------------------------------------------
/include/app/CircularShadow.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | struct CircularShadow : widget::TransparentWidget {
11 | float blurRadius;
12 | float opacity;
13 |
14 | CircularShadow();
15 | void draw(const DrawArgs& args) override;
16 | };
17 |
18 |
19 | } // namespace app
20 | } // namespace rack
21 |
--------------------------------------------------------------------------------
/include/app/Knob.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 |
6 |
7 | namespace rack {
8 | namespace app {
9 |
10 |
11 | /** Implements vertical dragging behavior for ParamWidgets */
12 | struct Knob : ParamWidget {
13 | struct Internal;
14 | Internal* internal;
15 |
16 | /** Drag horizontally instead of vertically. */
17 | bool horizontal = false;
18 | /** Enables per-sample value smoothing while dragging.
19 | Alternatively, use ParamQuantity::smoothEnabled.
20 | */
21 | bool smooth = true;
22 | /** Enables value snapping to the nearest integer.
23 | Alternatively, use ParamQuantity::snapEnabled.
24 | */
25 | bool snap = false;
26 | /** Multiplier for mouse movement to adjust knob value */
27 | float speed = 1.f;
28 | /** Force dragging to linear, e.g. for sliders. */
29 | bool forceLinear = false;
30 | /** Angles in radians.
31 | For drawing and handling the global radial knob setting.
32 | */
33 | float minAngle = -M_PI;
34 | float maxAngle = M_PI;
35 |
36 | Knob();
37 | ~Knob();
38 | void initParamQuantity() override;
39 | void onHover(const HoverEvent& e) override;
40 | void onButton(const ButtonEvent& e) override;
41 | void onDragStart(const DragStartEvent& e) override;
42 | void onDragEnd(const DragEndEvent& e) override;
43 | void onDragMove(const DragMoveEvent& e) override;
44 | void onDragLeave(const DragLeaveEvent& e) override;
45 | void onHoverScroll(const HoverScrollEvent& e) override;
46 | void onLeave(const LeaveEvent& e) override;
47 | /** Called when user clicks the knob without moving it.
48 | Useful for handling emulating push-knobs in hardware.
49 | */
50 | void onAction(const ActionEvent& e) override {}
51 | };
52 |
53 |
54 | } // namespace app
55 | } // namespace rack
56 |
--------------------------------------------------------------------------------
/include/app/LedDisplay.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace app {
10 |
11 |
12 | struct LedDisplay : widget::Widget {
13 | void draw(const DrawArgs& args) override;
14 | void drawLayer(const DrawArgs& args, int layer) override;
15 | };
16 |
17 | struct LedDisplaySeparator : widget::Widget {
18 | LedDisplaySeparator();
19 | void draw(const DrawArgs& args) override;
20 | };
21 |
22 | struct LedDisplayChoice : widget::OpaqueWidget {
23 | std::string text;
24 | std::string fontPath;
25 | math::Vec textOffset;
26 | NVGcolor color;
27 | NVGcolor bgColor;
28 | LedDisplayChoice();
29 | void draw(const DrawArgs& args) override;
30 | void drawLayer(const DrawArgs& args, int layer) override;
31 | void onButton(const ButtonEvent& e) override;
32 | };
33 |
34 | struct LedDisplayTextField : ui::TextField {
35 | std::string fontPath;
36 | math::Vec textOffset;
37 | NVGcolor color;
38 | NVGcolor bgColor;
39 | LedDisplayTextField();
40 | void draw(const DrawArgs& args) override;
41 | void drawLayer(const DrawArgs& args, int layer) override;
42 | int getTextPosition(math::Vec mousePos) override;
43 | };
44 |
45 |
46 | } // namespace app
47 | } // namespace rack
48 |
--------------------------------------------------------------------------------
/include/app/LightWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | struct LightWidget : widget::TransparentWidget {
11 | NVGcolor bgColor = nvgRGBA(0, 0, 0, 0);
12 | NVGcolor color = nvgRGBA(0, 0, 0, 0);
13 | NVGcolor borderColor = nvgRGBA(0, 0, 0, 0);
14 |
15 | void draw(const DrawArgs& args) override;
16 | void drawLayer(const DrawArgs& args, int layer) override;
17 | virtual void drawBackground(const DrawArgs& args);
18 | virtual void drawLight(const DrawArgs& args);
19 | virtual void drawHalo(const DrawArgs& args);
20 | };
21 |
22 |
23 | } // namespace app
24 | } // namespace rack
25 |
--------------------------------------------------------------------------------
/include/app/MenuBar.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 |
6 |
7 | namespace rack {
8 | namespace app {
9 |
10 |
11 | PRIVATE widget::Widget* createMenuBar();
12 | PRIVATE void appendLanguageMenu(ui::Menu* menu);
13 |
14 |
15 | } // namespace app
16 | } // namespace rack
17 |
--------------------------------------------------------------------------------
/include/app/MidiDisplay.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | struct MidiDriverChoice : LedDisplayChoice {
14 | midi::Port* port;
15 | void onAction(const ActionEvent& e) override;
16 | void step() override;
17 | };
18 |
19 |
20 | struct MidiDeviceChoice : LedDisplayChoice {
21 | midi::Port* port;
22 | void onAction(const ActionEvent& e) override;
23 | void step() override;
24 | };
25 |
26 |
27 | struct MidiChannelChoice : LedDisplayChoice {
28 | midi::Port* port;
29 | void onAction(const ActionEvent& e) override;
30 | void step() override;
31 | };
32 |
33 |
34 | struct MidiDisplay : LedDisplay {
35 | MidiDriverChoice* driverChoice;
36 | LedDisplaySeparator* driverSeparator;
37 | MidiDeviceChoice* deviceChoice;
38 | LedDisplaySeparator* deviceSeparator;
39 | MidiChannelChoice* channelChoice;
40 | void setMidiPort(midi::Port* port);
41 | };
42 |
43 |
44 | /** A virtual MIDI port graphic that displays an MIDI menu when clicked. */
45 | struct MidiButton : SvgButton {
46 | midi::Port* port;
47 | void setMidiPort(midi::Port* port);
48 | void onAction(const ActionEvent& e) override;
49 | };
50 |
51 |
52 | /** Appends menu items to the given menu with driver, device, etc.
53 | Useful alternative to putting a MidiDisplay on your module's panel.
54 | */
55 | void appendMidiMenu(ui::Menu* menu, midi::Port* port);
56 |
57 |
58 | } // namespace app
59 | } // namespace rack
60 |
--------------------------------------------------------------------------------
/include/app/ModuleLightWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace app {
10 |
11 |
12 | /** A MultiLightWidget that points to a module's Light or a range of lights
13 | Will access firstLightId, firstLightId + 1, etc. for each added color
14 | */
15 | struct ModuleLightWidget : MultiLightWidget {
16 | struct Internal;
17 | Internal* internal;
18 |
19 | engine::Module* module = NULL;
20 | int firstLightId = -1;
21 |
22 | ModuleLightWidget();
23 | ~ModuleLightWidget();
24 | engine::Light* getLight(int colorId);
25 | engine::LightInfo* getLightInfo();
26 | void createTooltip();
27 | void destroyTooltip();
28 |
29 | void step() override;
30 | void onHover(const HoverEvent& e) override;
31 | void onEnter(const EnterEvent& e) override;
32 | void onLeave(const LeaveEvent& e) override;
33 | };
34 |
35 |
36 | } // namespace app
37 | } // namespace rack
38 |
--------------------------------------------------------------------------------
/include/app/MultiLightWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | /** Mixes a list of colors based on a list of brightness values */
11 | struct MultiLightWidget : LightWidget {
12 | /** Colors of each value state */
13 | std::vector baseColors;
14 |
15 | int getNumColors();
16 | void addBaseColor(NVGcolor baseColor);
17 | /** Sets the color to a linear combination of the baseColors with the given weights */
18 | void setBrightnesses(const std::vector& brightnesses);
19 | };
20 |
21 |
22 | } // namespace app
23 | } // namespace rack
24 |
--------------------------------------------------------------------------------
/include/app/ParamWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | /** Manages an engine::Param on a ModuleWidget. */
14 | struct ParamWidget : widget::OpaqueWidget {
15 | struct Internal;
16 | Internal* internal;
17 |
18 | engine::Module* module = NULL;
19 | int paramId = -1;
20 |
21 | ParamWidget();
22 | ~ParamWidget();
23 | /** Configures ParamQuantity properties based on the type of ParamWidget.
24 | This seems a bit hacky, but it's easier than requiring plugin developers to set `ParamQuantity::randomizeEnabled`, etc.
25 | */
26 | virtual void initParamQuantity() {}
27 | engine::ParamQuantity* getParamQuantity();
28 | void createTooltip();
29 | void destroyTooltip();
30 |
31 | void step() override;
32 | void draw(const DrawArgs& args) override;
33 |
34 | void onButton(const ButtonEvent& e) override;
35 | void onDoubleClick(const DoubleClickEvent& e) override;
36 | void onEnter(const EnterEvent& e) override;
37 | void onLeave(const LeaveEvent& e) override;
38 |
39 | void createContextMenu();
40 | /** Override to add custom menu items at the bottom of the parameter context menu.
41 | It is recommended to add a MenuSeparator before other menu items.
42 |
43 | menu->addChild(new MenuSeparator);
44 | */
45 | virtual void appendContextMenu(ui::Menu* menu) {}
46 | void resetAction();
47 | };
48 |
49 |
50 | } // namespace app
51 | } // namespace rack
52 |
--------------------------------------------------------------------------------
/include/app/PortWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | /** Manages an engine::Port on a ModuleWidget. */
14 | struct PortWidget : widget::OpaqueWidget {
15 | struct Internal;
16 | Internal* internal;
17 |
18 | engine::Module* module = NULL;
19 | engine::Port::Type type = engine::Port::INPUT;
20 | int portId = -1;
21 |
22 | PortWidget();
23 | ~PortWidget();
24 | engine::Port* getPort();
25 | engine::PortInfo* getPortInfo();
26 | void createTooltip();
27 | void destroyTooltip();
28 | void createContextMenu();
29 | virtual void appendContextMenu(ui::Menu* menu) {}
30 | void deleteTopCableAction();
31 |
32 | void step() override;
33 | void draw(const DrawArgs& args) override;
34 |
35 | void onButton(const ButtonEvent& e) override;
36 | void onEnter(const EnterEvent& e) override;
37 | void onLeave(const LeaveEvent& e) override;
38 | void onDragStart(const DragStartEvent& e) override;
39 | void onDragEnd(const DragEndEvent& e) override;
40 | void onDragDrop(const DragDropEvent& e) override;
41 | void onDragEnter(const DragEnterEvent& e) override;
42 | void onDragLeave(const DragLeaveEvent& e) override;
43 | };
44 |
45 |
46 | } // namespace app
47 | } // namespace rack
48 |
--------------------------------------------------------------------------------
/include/app/RackScrollWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace app {
10 |
11 |
12 | struct RackScrollWidget : ui::ScrollWidget {
13 | struct Internal;
14 | Internal* internal;
15 |
16 | widget::ZoomWidget* zoomWidget;
17 | RackWidget* rackWidget;
18 |
19 | PRIVATE RackScrollWidget();
20 | PRIVATE ~RackScrollWidget();
21 |
22 | void reset();
23 | /** Gets the top-left scroll offset in grid coordinates.
24 | */
25 | math::Vec getGridOffset();
26 | void setGridOffset(math::Vec gridOffset);
27 | float getZoom();
28 | /** Sets the zoom level, with a pivot at the center of the scroll viewport.
29 | */
30 | void setZoom(float zoom);
31 | void setZoom(float zoom, math::Vec pivot);
32 | /** Sets offset and zoom to fit module bounding box to view. */
33 | void zoomToModules();
34 | /** Sets offset and zoom to fit given bound (in module coordinates) to view. */
35 | void zoomToBound(math::Rect bound);
36 |
37 | void step() override;
38 | void draw(const DrawArgs& args) override;
39 | void onHoverKey(const HoverKeyEvent& e) override;
40 | void onHoverScroll(const HoverScrollEvent& e) override;
41 | void onHover(const HoverEvent& e) override;
42 | void onButton(const ButtonEvent& e) override;
43 | };
44 |
45 |
46 | } // namespace app
47 | } // namespace rack
48 |
--------------------------------------------------------------------------------
/include/app/RailWidget.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | struct RailWidget : widget::TransparentWidget {
11 | struct Internal;
12 | Internal* internal;
13 |
14 | RailWidget();
15 | ~RailWidget();
16 | void step() override;
17 | void draw(const DrawArgs& args) override;
18 | };
19 |
20 |
21 | } // namespace app
22 | } // namespace rack
23 |
--------------------------------------------------------------------------------
/include/app/Scene.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace app {
10 |
11 |
12 | struct Scene : widget::OpaqueWidget {
13 | struct Internal;
14 | Internal* internal;
15 |
16 | // Convenience variables for accessing important widgets
17 | RackScrollWidget* rackScroll;
18 | RackWidget* rack;
19 | widget::Widget* menuBar;
20 | widget::Widget* browser;
21 |
22 | /** The last mouse position in the Scene.
23 | DEPRECATED. Use getMousePos() instead.
24 | */
25 | math::Vec mousePos;
26 |
27 | PRIVATE Scene();
28 | PRIVATE ~Scene();
29 | math::Vec getMousePos();
30 | void step() override;
31 | void draw(const DrawArgs& args) override;
32 | void onHover(const HoverEvent& e) override;
33 | void onDragHover(const DragHoverEvent& e) override;
34 | void onHoverKey(const HoverKeyEvent& e) override;
35 | void onPathDrop(const PathDropEvent& e) override;
36 | };
37 |
38 |
39 | } // namespace app
40 | } // namespace rack
41 |
--------------------------------------------------------------------------------
/include/app/SliderKnob.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | struct SliderKnob : Knob {
11 | SliderKnob();
12 |
13 | void onHover(const HoverEvent& e) override;
14 | void onButton(const ButtonEvent& e) override;
15 | };
16 |
17 |
18 | } // namespace app
19 | } // namespace rack
20 |
--------------------------------------------------------------------------------
/include/app/SvgButton.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | struct SvgButton : widget::OpaqueWidget {
14 | widget::FramebufferWidget* fb;
15 | CircularShadow* shadow;
16 | widget::SvgWidget* sw;
17 | std::vector> frames;
18 |
19 | SvgButton();
20 | void addFrame(std::shared_ptr svg);
21 | void onButton(const ButtonEvent& e) override;
22 | void onDragStart(const DragStartEvent& e) override;
23 | void onDragEnd(const DragEndEvent& e) override;
24 | void onDragDrop(const DragDropEvent& e) override;
25 | };
26 |
27 |
28 | DEPRECATED typedef SvgButton SVGButton;
29 |
30 |
31 | } // namespace app
32 | } // namespace rack
33 |
--------------------------------------------------------------------------------
/include/app/SvgKnob.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 |
10 | namespace rack {
11 | namespace app {
12 |
13 |
14 | /** A knob which rotates an SVG and caches it in a framebuffer */
15 | struct SvgKnob : Knob {
16 | widget::FramebufferWidget* fb;
17 | CircularShadow* shadow;
18 | widget::TransformWidget* tw;
19 | widget::SvgWidget* sw;
20 |
21 | SvgKnob();
22 | void setSvg(std::shared_ptr svg);
23 | DEPRECATED void setSVG(std::shared_ptr svg) {
24 | setSvg(svg);
25 | }
26 | void onChange(const ChangeEvent& e) override;
27 | };
28 |
29 |
30 | DEPRECATED typedef SvgKnob SVGKnob;
31 |
32 |
33 | } // namespace app
34 | } // namespace rack
35 |
--------------------------------------------------------------------------------
/include/app/SvgPanel.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | struct PanelBorder : widget::TransparentWidget {
14 | void draw(const DrawArgs& args) override;
15 | };
16 |
17 |
18 | struct SvgPanel : widget::Widget {
19 | widget::FramebufferWidget* fb;
20 | widget::SvgWidget* sw;
21 | PanelBorder* panelBorder;
22 | std::shared_ptr svg;
23 |
24 | SvgPanel();
25 | void step() override;
26 | void setBackground(std::shared_ptr svg);
27 | };
28 |
29 |
30 | DEPRECATED typedef SvgPanel SVGPanel;
31 |
32 |
33 | struct ThemedSvgPanel : SvgPanel {
34 | std::shared_ptr lightSvg;
35 | std::shared_ptr darkSvg;
36 |
37 | void setBackground(std::shared_ptr lightSvg, std::shared_ptr darkSvg) {
38 | this->lightSvg = lightSvg;
39 | this->darkSvg = darkSvg;
40 | SvgPanel::setBackground(settings::preferDarkPanels ? darkSvg : lightSvg);
41 | }
42 |
43 | void step() override {
44 | SvgPanel::setBackground(settings::preferDarkPanels ? darkSvg : lightSvg);
45 | SvgPanel::step();
46 | }
47 | };
48 |
49 |
50 | } // namespace app
51 | } // namespace rack
52 |
--------------------------------------------------------------------------------
/include/app/SvgPort.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 |
10 | namespace rack {
11 | namespace app {
12 |
13 |
14 | struct SvgPort : PortWidget {
15 | widget::FramebufferWidget* fb;
16 | CircularShadow* shadow;
17 | widget::SvgWidget* sw;
18 |
19 | SvgPort();
20 | void setSvg(std::shared_ptr svg);
21 | DEPRECATED void setSVG(std::shared_ptr svg) {
22 | setSvg(svg);
23 | }
24 | };
25 |
26 |
27 | DEPRECATED typedef SvgPort SVGPort;
28 |
29 |
30 | struct ThemedSvgPort : SvgPort {
31 | std::shared_ptr lightSvg;
32 | std::shared_ptr darkSvg;
33 |
34 | void setSvg(std::shared_ptr lightSvg, std::shared_ptr darkSvg) {
35 | this->lightSvg = lightSvg;
36 | this->darkSvg = darkSvg;
37 | SvgPort::setSvg(settings::preferDarkPanels ? darkSvg : lightSvg);
38 | }
39 |
40 | void step() override {
41 | SvgPort::setSvg(settings::preferDarkPanels ? darkSvg : lightSvg);
42 | SvgPort::step();
43 | }
44 | };
45 |
46 |
47 | } // namespace app
48 | } // namespace rack
49 |
--------------------------------------------------------------------------------
/include/app/SvgScrew.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | /** If you don't add these to your ModuleWidget, they will fall out of the rack... */
14 | struct SvgScrew : widget::Widget {
15 | widget::FramebufferWidget* fb;
16 | widget::SvgWidget* sw;
17 |
18 | SvgScrew();
19 | void setSvg(std::shared_ptr svg);
20 | };
21 |
22 |
23 | DEPRECATED typedef SvgScrew SVGScrew;
24 |
25 |
26 | struct ThemedSvgScrew : SvgScrew {
27 | std::shared_ptr lightSvg;
28 | std::shared_ptr darkSvg;
29 |
30 | void setSvg(std::shared_ptr lightSvg, std::shared_ptr darkSvg) {
31 | this->lightSvg = lightSvg;
32 | this->darkSvg = darkSvg;
33 | SvgScrew::setSvg(settings::preferDarkPanels ? darkSvg : lightSvg);
34 | }
35 |
36 | void step() override {
37 | SvgScrew::setSvg(settings::preferDarkPanels ? darkSvg : lightSvg);
38 | SvgScrew::step();
39 | }
40 | };
41 |
42 |
43 |
44 | } // namespace app
45 | } // namespace rack
46 |
--------------------------------------------------------------------------------
/include/app/SvgSlider.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace app {
10 |
11 |
12 | /** Behaves like a knob but linearly moves an widget::SvgWidget between two points.
13 | Can be used for horizontal or vertical linear faders.
14 | */
15 | struct SvgSlider : app::SliderKnob {
16 | widget::FramebufferWidget* fb;
17 | widget::SvgWidget* background;
18 | widget::SvgWidget* handle;
19 | /** Intermediate positions will be interpolated between these positions */
20 | math::Vec minHandlePos, maxHandlePos;
21 |
22 | SvgSlider();
23 | void setBackgroundSvg(std::shared_ptr svg);
24 | void setHandleSvg(std::shared_ptr svg);
25 | void setHandlePos(math::Vec minHandlePos, math::Vec maxHandlePos);
26 | void setHandlePosCentered(math::Vec minHandlePosCentered, math::Vec maxHandlePosCentered);
27 | void onChange(const ChangeEvent& e) override;
28 |
29 | DEPRECATED void setBackgroundSVG(std::shared_ptr svg) {
30 | setBackgroundSvg(svg);
31 | }
32 | DEPRECATED void setHandleSVG(std::shared_ptr svg) {
33 | setHandleSvg(svg);
34 | }
35 | DEPRECATED void setSVGs(std::shared_ptr backgroundSvg, std::shared_ptr handleSvg) {
36 | setBackgroundSvg(backgroundSvg);
37 | setHandleSvg(handleSvg);
38 | }
39 | };
40 |
41 |
42 | DEPRECATED typedef SvgSlider SVGSlider;
43 |
44 |
45 | } // namespace app
46 | } // namespace rack
47 |
--------------------------------------------------------------------------------
/include/app/SvgSwitch.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 | namespace app {
11 |
12 |
13 | /** A ParamWidget with multiple frames corresponding to its value */
14 | struct SvgSwitch : Switch {
15 | struct Internal;
16 | Internal* internal;
17 |
18 | widget::FramebufferWidget* fb;
19 | CircularShadow* shadow;
20 | widget::SvgWidget* sw;
21 | std::vector> frames;
22 |
23 | /** Use frames 0 and 1 when the mouse is pressed and released, instead of using the param value as the frame index.
24 | */
25 | bool latch = false;
26 |
27 | SvgSwitch();
28 | ~SvgSwitch();
29 | /** Adds an SVG file to represent the next switch position */
30 | void addFrame(std::shared_ptr svg);
31 |
32 | void onDragStart(const DragStartEvent& e) override;
33 | void onDragEnd(const DragEndEvent& e) override;
34 | void onChange(const ChangeEvent& e) override;
35 | };
36 |
37 |
38 | DEPRECATED typedef SvgSwitch SVGSwitch;
39 |
40 |
41 | } // namespace app
42 | } // namespace rack
43 |
--------------------------------------------------------------------------------
/include/app/Switch.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | /** A ParamWidget that represents an integer.
11 | Increases by 1 each time it is clicked.
12 | When maxValue is reached, the next click resets to minValue.
13 | In momentary mode, the value is instead set to maxValue when the mouse is held and minValue when released.
14 | */
15 | struct Switch : ParamWidget {
16 | struct Internal;
17 | Internal* internal;
18 |
19 | /** Instead of incrementing values on each click, sets maxValue on press and minValue on release.
20 | */
21 | bool momentary = false;
22 |
23 | Switch();
24 | ~Switch();
25 | void initParamQuantity() override;
26 | void step() override;
27 | void onDoubleClick(const DoubleClickEvent& e) override;
28 | void onDragStart(const DragStartEvent& e) override;
29 | void onDragEnd(const DragEndEvent& e) override;
30 | };
31 |
32 |
33 | } // namespace app
34 | } // namespace rack
35 |
--------------------------------------------------------------------------------
/include/app/TipWindow.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace app {
8 |
9 |
10 | PRIVATE widget::Widget* tipWindowCreate();
11 |
12 |
13 | } // namespace app
14 | } // namespace rack
15 |
--------------------------------------------------------------------------------
/include/app/common.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include
5 | #include
6 | #include
7 |
8 |
9 | namespace rack {
10 |
11 |
12 | /** Rack's custom UI widgets that control the Rack state and engine.
13 | */
14 | namespace app {
15 |
16 |
17 | // A 1HPx3U module should be 15x380 pixels. Thus the width of a module should be a factor of 15.
18 | static const float RACK_GRID_WIDTH = 15;
19 | static const float RACK_GRID_HEIGHT = 380;
20 | static const math::Vec RACK_GRID_SIZE = math::Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT);
21 | static const math::Vec RACK_OFFSET = RACK_GRID_SIZE.mult(math::Vec(2000, 100));
22 |
23 |
24 | } // namespace app
25 | } // namespace rack
26 |
--------------------------------------------------------------------------------
/include/arch.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | // Check CPU
4 | #if defined __x86_64__
5 | #define ARCH_X64 1
6 | #endif
7 | #if defined __aarch64__
8 | #define ARCH_ARM64 1
9 | #endif
10 |
11 | // Check OS
12 | #if defined _WIN32
13 | #define ARCH_WIN 1
14 | #endif
15 | #if defined __APPLE__
16 | #define ARCH_MAC 1
17 | #endif
18 | #if defined __linux__
19 | #define ARCH_LIN 1
20 | #endif
21 |
--------------------------------------------------------------------------------
/include/asset.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 |
7 |
8 | namespace plugin {
9 | struct Plugin;
10 | } // namespace plugin
11 |
12 |
13 | namespace engine {
14 | struct Module;
15 | } // namespace engine
16 |
17 |
18 | /** Handles common path locations */
19 | namespace asset {
20 |
21 |
22 | PRIVATE void init();
23 |
24 | /** Returns the path of a system asset. Read-only files. */
25 | std::string system(std::string filename = "");
26 |
27 | /** Returns the path of a user asset. Readable/writable files. */
28 | std::string user(std::string filename = "");
29 |
30 | /** Returns the path of an asset in the plugin's dir. Read-only files.
31 |
32 | Examples:
33 |
34 | asset::plugin(pluginInstance, "samples/00.wav") // "//plugins/MyPlugin/samples/00.wav"
35 | */
36 | std::string plugin(plugin::Plugin* plugin, std::string filename = "");
37 |
38 |
39 | // Set these before calling init() to override the default paths
40 | extern std::string systemDir;
41 | extern std::string userDir;
42 | extern std::string oldUserDir;
43 | // Only defined on Mac
44 | extern std::string bundlePath;
45 |
46 |
47 | } // namespace asset
48 | } // namespace rack
49 |
--------------------------------------------------------------------------------
/include/context.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 |
7 |
8 | namespace history {
9 | struct State;
10 | } // namespace history
11 |
12 |
13 | namespace engine {
14 | struct Engine;
15 | } // namespace engine
16 |
17 |
18 | namespace window {
19 | struct Window;
20 | } // namespace window
21 |
22 |
23 | namespace patch {
24 | struct Manager;
25 | } // namespace patch
26 |
27 |
28 | namespace widget {
29 | struct EventState;
30 | } // namespace widget
31 |
32 |
33 | namespace app {
34 | struct Scene;
35 | } // namespace app
36 |
37 |
38 | namespace midiloopback {
39 | struct Context;
40 | } // namespace midiloopback
41 |
42 |
43 | /** Rack instance state
44 | */
45 | struct Context {
46 | widget::EventState* event = NULL;
47 | app::Scene* scene = NULL;
48 | engine::Engine* engine = NULL;
49 | window::Window* window = NULL;
50 | history::State* history = NULL;
51 | patch::Manager* patch = NULL;
52 | midiloopback::Context* midiLoopbackContext = NULL;
53 |
54 | ~Context();
55 | };
56 |
57 |
58 | /** Returns the global Context pointer */
59 | Context* contextGet();
60 | /** Sets the context for this thread.
61 | You must set the context when preparing each thread if the code uses the APP macro in that thread.
62 | */
63 | void contextSet(Context* context);
64 |
65 | /** Deprecated. Use contextGet() or the APP macro to get the current Context. */
66 | DEPRECATED inline Context* appGet() {
67 | return contextGet();
68 | }
69 |
70 | /** Accesses the global Context pointer. Just an alias for contextGet(). */
71 | #define APP rack::contextGet()
72 |
73 |
74 | } // namespace rack
75 |
--------------------------------------------------------------------------------
/include/dsp/convert.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace dsp {
8 |
9 |
10 | /** 24-bit integer, using int32_t for conversions. */
11 | struct
12 | #ifdef __clang__
13 | __attribute__((packed, aligned(1)))
14 | #else
15 | __attribute__((packed, aligned(1), gcc_struct))
16 | #endif
17 | Int24 {
18 | int32_t i : 24;
19 | Int24() {}
20 | Int24(int32_t i) : i(i) {}
21 | operator int32_t() {return i;}
22 | };
23 | static_assert(sizeof(Int24) == 3, "Int24 type must be 3 bytes");
24 |
25 |
26 | /** Converts between normalized types.
27 | */
28 | template
29 | To convert(From x) = delete;
30 |
31 |
32 | /** Trivial conversions */
33 | template <>
34 | inline float convert(float x) {return x;}
35 |
36 |
37 | /** Integer to float */
38 | template <>
39 | inline float convert(int8_t x) {return x / 128.f;}
40 | template <>
41 | inline float convert(int16_t x) {return x / 32768.f;}
42 | template <>
43 | inline float convert(Int24 x) {return x / 8388608.f;}
44 | template <>
45 | inline float convert(int32_t x) {return x / 2147483648.f;}
46 | template <>
47 | inline float convert(int64_t x) {return x / 9223372036854775808.f;}
48 |
49 |
50 | /** Float to integer */
51 | template <>
52 | inline int8_t convert(float x) {return std::min(std::llround(x * 128.f), 127LL);}
53 | template <>
54 | inline int16_t convert(float x) {return std::min(std::llround(x * 32768.f), 32767LL);}
55 | template <>
56 | inline Int24 convert(float x) {return std::min(std::llround(x * 8388608.f), 8388607LL);}
57 | template <>
58 | inline int32_t convert(float x) {return std::min(std::llround(x * 2147483648.f), 2147483647LL);}
59 | template <>
60 | inline int64_t convert(float x) {return std::min(std::llround(x * 9223372036854775808.f), 9223372036854775807LL);}
61 |
62 |
63 | /** Buffer conversion */
64 | template
65 | void convert(const From* in, To* out, size_t len) {
66 | for (size_t i = 0; i < len; i++) {
67 | out[i] = convert(in[i]);
68 | }
69 | }
70 |
71 |
72 | } // namespace dsp
73 | } // namespace rack
74 |
--------------------------------------------------------------------------------
/include/dsp/minblep.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 | namespace dsp {
7 |
8 |
9 | /** Computes the minimum-phase bandlimited step (MinBLEP)
10 | z: number of zero-crossings
11 | o: oversample factor
12 | output: must be length `2 * z * o`.
13 | https://www.cs.cmu.edu/~eli/papers/icmc01-hardsync.pdf
14 | */
15 | void minBlepImpulse(int z, int o, float* output);
16 |
17 |
18 | template
19 | struct MinBlepGenerator {
20 | T buf[2 * Z] = {};
21 | int pos = 0;
22 | float impulse[2 * Z * O + 1];
23 |
24 | MinBlepGenerator() {
25 | minBlepImpulse(Z, O, impulse);
26 | impulse[2 * Z * O] = 1.f;
27 | }
28 |
29 | /** Places a discontinuity with magnitude `x` at -1 < p <= 0 relative to the current frame */
30 | void insertDiscontinuity(float p, T x) {
31 | if (!(-1 < p && p <= 0))
32 | return;
33 | for (int j = 0; j < 2 * Z; j++) {
34 | float minBlepIndex = ((float)j - p) * O;
35 | int index = (pos + j) % (2 * Z);
36 | buf[index] += x * (-1.f + math::interpolateLinear(impulse, minBlepIndex));
37 | }
38 | }
39 |
40 | T process() {
41 | T v = buf[pos];
42 | buf[pos] = T(0);
43 | pos = (pos + 1) % (2 * Z);
44 | return v;
45 | }
46 | };
47 |
48 |
49 | } // namespace dsp
50 | } // namespace rack
51 |
--------------------------------------------------------------------------------
/include/engine/Cable.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace engine {
8 |
9 |
10 | struct Cable {
11 | /** Unique ID for referring to the cable in the engine.
12 | Between 0 and 2^53 since this is serialized with JSON.
13 | Assigned when added to the engine.
14 | */
15 | int64_t id = -1;
16 | Module* inputModule = NULL;
17 | int inputId = -1;
18 | Module* outputModule = NULL;
19 | int outputId = -1;
20 |
21 | json_t* toJson();
22 | void fromJson(json_t* rootJ);
23 | PRIVATE static void jsonStripIds(json_t* rootJ);
24 | };
25 |
26 |
27 | } // namespace engine
28 | } // namespace rack
29 |
--------------------------------------------------------------------------------
/include/engine/Light.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 | namespace engine {
7 |
8 |
9 | struct Light {
10 | /** The square of the brightness.
11 | Unstable API. Use set/getBrightness().
12 | */
13 | float value = 0.f;
14 |
15 | /** Sets the brightness immediately with no light decay. */
16 | void setBrightness(float brightness) {
17 | value = brightness;
18 | }
19 |
20 | float getBrightness() {
21 | return value;
22 | }
23 |
24 | /** Emulates light decay with slow fall but immediate rise.
25 | Default lambda set to roughly 2 screen frames.
26 | */
27 | void setBrightnessSmooth(float brightness, float deltaTime, float lambda = 30.f) {
28 | if (brightness < value) {
29 | // Fade out light
30 | value += (brightness - value) * lambda * deltaTime;
31 | }
32 | else {
33 | // Immediately illuminate light
34 | value = brightness;
35 | }
36 | }
37 | /** DEPRECATED Alias for setBrightnessSmooth() */
38 | void setSmoothBrightness(float brightness, float deltaTime) {
39 | setBrightnessSmooth(brightness, deltaTime);
40 | }
41 |
42 | /** Use `setBrightnessSmooth(brightness, sampleTime * frames)` instead. */
43 | DEPRECATED void setBrightnessSmooth(float brightness, int frames = 1) {
44 | setBrightnessSmooth(brightness, frames / 44100.f);
45 | }
46 | };
47 |
48 |
49 | } // namespace engine
50 | } // namespace rack
51 |
--------------------------------------------------------------------------------
/include/engine/LightInfo.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 | namespace engine {
7 |
8 |
9 | struct Module;
10 |
11 |
12 | struct LightInfo {
13 | Module* module = NULL;
14 | int lightId = -1;
15 |
16 | /** The name of the light, using sentence capitalization.
17 | e.g. "Level", "Oscillator phase", "Mode CV".
18 |
19 | Don't use the word "light" or "LED" in the name.
20 | Since this text is often prepended or appended to the name, the name will appear as e.g. "Level light light".
21 | */
22 | std::string name;
23 |
24 | /** An optional one-sentence description of the light. */
25 | std::string description;
26 |
27 | virtual ~LightInfo() {}
28 | virtual std::string getName();
29 | virtual std::string getDescription();
30 | };
31 |
32 |
33 | } // namespace engine
34 | } // namespace rack
35 |
--------------------------------------------------------------------------------
/include/engine/Param.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace engine {
8 |
9 |
10 | struct Param {
11 | /** Unstable API. Use setValue() and getValue() instead. */
12 | float value = 0.f;
13 |
14 | float getValue() {
15 | return value;
16 | }
17 |
18 | void setValue(float value) {
19 | this->value = value;
20 | }
21 | };
22 |
23 |
24 | } // namespace engine
25 | } // namespace rack
26 |
--------------------------------------------------------------------------------
/include/engine/ParamHandle.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 |
8 | namespace rack {
9 | namespace engine {
10 |
11 |
12 | /** A weak handle to a Param. Managed by Engine */
13 | struct ParamHandle {
14 | /** Do not set these directly.
15 | Use Engine ParamHandle methods.
16 | */
17 | int64_t moduleId = -1;
18 | int paramId = 0;
19 | Module* module = NULL;
20 |
21 | std::string text;
22 | NVGcolor color;
23 | };
24 |
25 |
26 | } // namespace engine
27 | } // namespace rack
28 |
--------------------------------------------------------------------------------
/include/engine/PortInfo.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | namespace engine {
8 |
9 |
10 | struct Module;
11 |
12 |
13 | struct PortInfo {
14 | Module* module = NULL;
15 | Port::Type type = Port::INPUT;
16 | int portId = -1;
17 |
18 | /** The name of the port, using sentence capitalization.
19 | e.g. "Sine", "Pitch input", "Mode CV".
20 |
21 | Don't use the words "input" or "output" in the name.
22 | Since this text is often prepended or appended to the name, the name will appear as e.g. "Sine input input", "Input: Sine input".
23 | */
24 | std::string name;
25 |
26 | /** An optional one-sentence description of the parameter. */
27 | std::string description;
28 |
29 | virtual ~PortInfo() {}
30 | virtual std::string getName();
31 | /** Returns name with "input" or "output" appended. */
32 | std::string getFullName();
33 | virtual std::string getDescription();
34 | };
35 |
36 |
37 | } // namespace engine
38 | } // namespace rack
39 |
--------------------------------------------------------------------------------
/include/gamepad.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 |
5 | namespace rack {
6 | /** Gamepad/joystick/controller MIDI driver */
7 | namespace gamepad {
8 |
9 |
10 | PRIVATE void init();
11 | PRIVATE void step();
12 |
13 |
14 | } // namespace gamepad
15 | } // namespace rack
16 |
--------------------------------------------------------------------------------
/include/keyboard.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 |
6 | namespace rack {
7 | /** Computer keyboard MIDI driver */
8 | namespace keyboard {
9 |
10 |
11 | PRIVATE void init();
12 | void press(int key);
13 | void release(int key);
14 | /** pos is in the unit box. */
15 | void mouseMove(math::Vec pos);
16 |
17 |
18 | } // namespace keyboard
19 | } // namespace rack
20 |
--------------------------------------------------------------------------------
/include/library.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include