Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
013784a
implements Makefile build flow
clwe Jun 28, 2020
0e77485
adds 6 in/out audio through pd patch, sets buffer size to 64 samples …
clwe Jun 28, 2020
c769b1b
PD: revert to PD v.0.50-2, implements knob send, lights receive and a…
clwe Jun 30, 2020
9b140ac
PD: adds switch send, switch lights receive, adds examples/gain.pd, i…
clwe Jun 30, 2020
e01f2c1
Pd: added vco.pd example
mxa Jul 1, 2020
1ae8bdb
PD: implements display from pd patch and changes message sending met…
clwe Jul 1, 2020
c0f7dc1
Merge branch 'master' of https://gitlab.chair.audio/chair-audio/VCV-P…
clwe Jul 1, 2020
3915322
Pd: added vco.pd example
mxa Jul 1, 2020
c56cc38
PD: fixes initial display, display pd version
clwe Jul 1, 2020
bd57f49
Merge branch 'master' of https://gitlab.chair.audio/chair-audio/VCV-P…
clwe Jul 1, 2020
1539633
PD: reset global arrays on script reload to fix wrong lights display
clwe Jul 1, 2020
e78546c
Pd: added and updated examples
mxa Jul 1, 2020
90fe800
Pd: added and updated examples
mxa Jul 1, 2020
ae0d392
Pd: updated rainbow example
mxa Jul 1, 2020
49b65e3
PD: audio output correction factor x4, shows version before loading p…
clwe Jul 1, 2020
3f0c62a
Merge branch 'master' of https://gitlab.chair.audio/chair-audio/VCV-P…
clwe Jul 1, 2020
27d18ef
PD: audio output correction factor is x5
clwe Jul 1, 2020
713613f
implements Makefile build flow
clwe Jun 28, 2020
3dadb3f
adds 6 in/out audio through pd patch, sets buffer size to 64 samples …
clwe Jun 28, 2020
dcad136
PD: revert to PD v.0.50-2, implements knob send, lights receive and a…
clwe Jun 30, 2020
b5816de
PD: adds switch send, switch lights receive, adds examples/gain.pd, i…
clwe Jun 30, 2020
d439edd
PD: implements display from pd patch and changes message sending met…
clwe Jul 1, 2020
67cd901
Pd: added vco.pd example
mxa Jul 1, 2020
5bbc3dd
PD: fixes initial display, display pd version
clwe Jul 1, 2020
910dea5
Pd: added vco.pd example
mxa Jul 1, 2020
6b82cc6
PD: reset global arrays on script reload to fix wrong lights display
clwe Jul 1, 2020
486c28e
Pd: added and updated examples
mxa Jul 1, 2020
b26fbd9
Pd: added and updated examples
mxa Jul 1, 2020
65c7ba1
PD: audio output correction factor x4, shows version before loading p…
clwe Jul 1, 2020
f9f07f9
Pd: updated rainbow example
mxa Jul 1, 2020
572ae13
PD: audio output correction factor is x5
clwe Jul 1, 2020
59e8f38
Added info to README.md
mxa Jul 1, 2020
2d87486
Pd: updated rainbow example
mxa Jul 2, 2020
8b2b43a
merged makefile
mxa Jul 2, 2020
04ec3b7
Pd: re-upload previous rainbow.pd destroyed by automerge #%!
mxa Jul 2, 2020
3a12288
Pd: added template.pd
mxa Jul 2, 2020
f52a4d7
PD: adds windows build flags, builds with new libpd build variable 'B…
clwe Jul 6, 2020
21ffb83
PD: implements FM in VCO.pd example patch
clwe Jul 6, 2020
4666581
PD: removes amplitude scaling factor from libpd engine audio inputs (…
clwe Jul 6, 2020
28ef6e2
Merge branch 'master' of https://github.com/VCVRack/VCV-Prototype int…
clwe Jul 6, 2020
e94779a
merges Makefile to integrate VULT
clwe Jul 6, 2020
78085de
Pd: remove comma cludge in rainbow.pd
mxa Jul 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ LUAJIT ?= 1
PYTHON ?= 0
SUPERCOLLIDER ?= 0
VULT ?= 1
LIBPD ?= 1

# Vult depends on both LuaJIT and QuickJS
ifeq ($(VULT), 1)
Expand All @@ -37,6 +38,32 @@ $(efsw):
cd efsw && cp lib/libefsw-static-release.a $(DEP_PATH)/lib/
cd efsw && cp -R include/efsw $(DEP_PATH)/include/

# LibPD
ifeq ($(LIBPD), 1)
libpd := dep/lib/libpd.a
SOURCES += src/LibPDEngine.cpp
OBJECTS += $(libpd)
DEPS += $(libpd)
FLAGS += -Idep/include/libpd

ifdef ARCH_WIN
FLAGS += -DPD_INTERNAL -D_WIN32
LDFLAGS += -shared -Wl,--export-all-symbols -lws2_32 -lkernel32 -static-libgcc
endif


$(libpd):
$(WGET) "https://github.com/chairaudio/libpd/archive/master.tar.gz"
$(SHA256) master.tar.gz 9edfd4a7423009a61069fb4b2fa027a62705ffa0dcf23bbb6c220f1c6e709d3d
cd dep && $(UNTAR) ../master.tar.gz
$(WGET) "https://github.com/pure-data/pure-data/archive/0.50-2.tar.gz"
$(SHA256) 0.50-2.tar.gz 0bdc9503d25f71e05ce6d321dd853f4e8082fdea211a59439eddd8105cc8761e
cd dep/libpd-master/pure-data && $(UNTAR) ../../../0.50-2.tar.gz --strip-components=1
cd dep/libpd-master && make MULTI=true BUILD_LIBPD_STATIC=true ADDITIONAL_CFLAGS='-DPD_LONGINTTYPE="long long"'
cd dep/libpd-master && $(MAKE) install prefix="$(DEP_PATH)"
endif


# Duktape
ifeq ($(DUKTAPE), 1)
SOURCES += src/DuktapeEngine.cpp
Expand All @@ -63,7 +90,6 @@ endif
$(quickjs):
cd dep && git clone "https://github.com/JerrySievert/QuickJS.git"
cd dep/QuickJS && git checkout 807adc8ca9010502853d471bd8331cdc1d376b94
cd dep/QuickJS && $(MAKE) $(QUICKJS_MAKE_FLAGS)
cd dep/QuickJS && $(MAKE) $(QUICKJS_MAKE_FLAGS) install
endif

Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Supported scripting languages:
- JavaScript (ES2020) (.js)
- [Lua](https://www.lua.org/) (.lua)
- [Vult](https://github.com/modlfo/vult) (.vult)
- [Pure Data](https://puredata.info) (.pd)
- [Add your own below](#adding-a-script-engine)

[Discussion thread](https://community.vcvrack.com/t/vcv-prototype/3271)
Expand Down Expand Up @@ -116,6 +117,23 @@ sudo apt install premake4
sudo pacman -S premake
```

## Build
### Add path to Rack-SDK
```bash
export RACK_DIR=/set/path/to/Rack-SDK/
```

### load submodules
```bash
git submodule update --init --recursive
```

### Make
```bash
make dep
make
```

## Adding a script engine

- Add your scripting language library to the build system so it builds with `make dep`, following the Duktape example in `Makefile`.
Expand All @@ -131,4 +149,5 @@ sudo pacman -S premake
- [Andrew Belt](https://github.com/AndrewBelt): host code, Duktape (JavaScript, not used), LuaJIT (Lua), Python (in development)
- [Jerry Sievert](https://github.com/JerrySievert): QuickJS (JavaScript)
- [Leonardo Laguna Ruiz](https://github.com/modlfo): Vult
- [CHAIR](https://chair.audio) [Clemens Wegener (libpd), Max Neupert (patches)] : libpd
- add your name here
113 changes: 113 additions & 0 deletions examples/gain.pd
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#N canvas 860 318 890 742 12;
#X obj 117 30 adc~ 1 2 3 4 5 6, f 47;
#X obj 118 261 dac~ 1 2 3 4 5 6, f 47;
#X obj 117 98 *~ 1;
#X obj 182 98 *~ 1;
#X obj 246 98 *~ 1;
#X obj 312 98 *~ 1;
#X obj 376 98 *~ 1;
#X obj 442 98 *~ 1;
#X obj 21 422 print toVCV;
#X msg 171 365 L3 \$1 0 0;
#X msg 247 365 L4 \$1 0 0;
#X msg 397 365 L6 \$1 0 0;
#X msg 21 365 L1 \$1 0 0;
#X msg 96 365 L2 \$1 0 0;
#X msg 322 365 L5 \$1 0 0;
#X obj 118 229 *~ 1;
#X obj 183 228 *~ 1;
#X obj 247 228 *~ 1;
#X obj 313 228 *~ 1;
#X obj 377 228 *~ 1;
#X obj 443 228 *~ 1;
#X msg 21 521 S1 \$1 0 0;
#X msg 96 522 S2 \$1 0 0;
#X msg 171 522 S3 \$1 0 0;
#X msg 247 523 S4 \$1 0 0;
#X msg 322 523 S5 \$1 0 0;
#X msg 397 523 S6 \$1 0 0;
#X obj 20 30 r fromVCV;
#X obj 142 70 route K1 K2 K3 K4 K5 K6, f 56;
#X obj 143 169 route S1 S2 S3 S4 S5 S6, f 56;
#X obj 143 198 == 0;
#X obj 208 198 == 0;
#X obj 272 198 == 0;
#X obj 338 198 == 0;
#X obj 402 198 == 0;
#X obj 468 198 == 0;
#X obj 21 307 r fromVCV;
#X obj 21 336 route K1 K2 K3 K4 K5 K6, f 65;
#X obj 21 492 route S1 S2 S3 S4 S5 S6, f 65;
#X obj 21 463 r fromVCV;
#X obj 19 134 r fromVCV;
#X obj 21 569 print toVCV;
#X text 558 52 Usually we'd interpolate here with line~ but VCVRack
is already sending one message persample so there seems hardly a point
to complicate this example., f 38;
#X text 560 368 Just using the red channels in the RGB triplet for
the LED., f 35;
#X text 561 492 Same for the switch., f 35;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 0 2 4 0;
#X connect 0 3 5 0;
#X connect 0 4 6 0;
#X connect 0 5 7 0;
#X connect 2 0 15 0;
#X connect 3 0 16 0;
#X connect 4 0 17 0;
#X connect 5 0 18 0;
#X connect 6 0 19 0;
#X connect 7 0 20 0;
#X connect 9 0 8 0;
#X connect 10 0 8 0;
#X connect 11 0 8 0;
#X connect 12 0 8 0;
#X connect 13 0 8 0;
#X connect 14 0 8 0;
#X connect 15 0 1 0;
#X connect 16 0 1 1;
#X connect 17 0 1 2;
#X connect 18 0 1 3;
#X connect 19 0 1 4;
#X connect 20 0 1 5;
#X connect 21 0 41 0;
#X connect 22 0 41 0;
#X connect 23 0 41 0;
#X connect 24 0 41 0;
#X connect 25 0 41 0;
#X connect 26 0 41 0;
#X connect 27 0 28 0;
#X connect 28 0 2 1;
#X connect 28 1 3 1;
#X connect 28 2 4 1;
#X connect 28 3 5 1;
#X connect 28 4 6 1;
#X connect 28 5 7 1;
#X connect 29 0 30 0;
#X connect 29 1 31 0;
#X connect 29 2 32 0;
#X connect 29 3 33 0;
#X connect 29 4 34 0;
#X connect 29 5 35 0;
#X connect 30 0 15 1;
#X connect 31 0 16 1;
#X connect 32 0 17 1;
#X connect 33 0 18 1;
#X connect 34 0 19 1;
#X connect 35 0 20 1;
#X connect 36 0 37 0;
#X connect 37 0 12 0;
#X connect 37 1 13 0;
#X connect 37 2 9 0;
#X connect 37 3 10 0;
#X connect 37 4 14 0;
#X connect 37 5 11 0;
#X connect 38 0 21 0;
#X connect 38 1 22 0;
#X connect 38 2 23 0;
#X connect 38 3 24 0;
#X connect 38 4 25 0;
#X connect 38 5 26 0;
#X connect 39 0 38 0;
#X connect 40 0 29 0;
Loading