diff --git a/.gitignore b/.gitignore index 2b31187f..5bbaf0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,16 @@ /disabledplugins /build /dist +/dep /patches .DS_Store /autosave.vcv /settings.json /screenshots .vs/ +<<<<<<< HEAD Fundamental.zip +======= +_ReSharper.Caches/ +*.zip +>>>>>>> XCUR diff --git a/Makefile b/Makefile index eb28daab..eda6111a 100644 --- a/Makefile +++ b/Makefile @@ -150,8 +150,8 @@ ifdef ARCH_WIN cd dist && zip -q -9 -r $(DIST_NAME).zip Rack # Make NSIS installer # pacman -S mingw-w64-x86_64-nsis - makensis -DVERSION=$(VERSION) installer.nsi - mv installer.exe dist/$(DIST_NAME).exe + #makensis -DVERSION=$(VERSION) installer.nsi + #mv installer.exe dist/$(DIST_NAME).exe endif # Rack SDK diff --git a/build.txt b/build.txt new file mode 100644 index 00000000..acdc3583 --- /dev/null +++ b/build.txt @@ -0,0 +1,36 @@ +Clone this repository with git clone https://github.com/VCVRack/Rack.git and cd Rack. Make sure there are no spaces in your absolute path, since this breaks the Makefile-based build system. + +Clone submodules. + +git submodule update --init --recursive +Build dependencies locally. You may add -j4 (or your number of logical cores) to your make commands to parallelize builds. This may take 15-60 minutes. + +make dep +Build Rack. This may take 1-5 minutes. + +make +Run Rack. + +make run +Building Rack plugins +Complete the Setting up your development environment section. + +Plugins can be built in two ways: + +Build Rack from source and build plugins in the plugins/ folder. (Recommended for advanced developers.) +Download an official Rack build and Rack-SDK-1.1.2.zip, and build plugins anywhere you like. (Easiest/fastest.) +Download or clone the plugin source code, e.g. + +git clone https://github.com/VCVRack/Fundamental.git +Clone the git repo’s submodules. + +cd Fundamental +git submodule update --init --recursive +If using the Rack SDK, set the RACK_DIR environment variable by prefixing each of the following commands with RACK_DIR=. + +Build plugin dependencies. (Most plugins don’t require this step.) + +make dep +Build the plugin. + +make \ No newline at end of file diff --git a/dep/glfw b/dep/glfw index 0fb001cf..d9ab59ef 160000 --- a/dep/glfw +++ b/dep/glfw @@ -1 +1 @@ -Subproject commit 0fb001cf43da351bf6f7eea1cf8db5ae86cefc78 +Subproject commit d9ab59efc781c392128a449361a381fcc93cf6f3 diff --git a/dep/osdialog b/dep/osdialog index e5db5de6..7be48961 160000 --- a/dep/osdialog +++ b/dep/osdialog @@ -1 +1 @@ -Subproject commit e5db5de6444f4b2c4e1390c67b3efd718080c3da +Subproject commit 7be4896180c9f78363d71e1d4510748b0ab01670 diff --git a/include/midi.hpp b/include/midi.hpp index f1bd35d4..f4296994 100644 --- a/include/midi.hpp +++ b/include/midi.hpp @@ -17,6 +17,13 @@ namespace midi { struct Message { uint8_t size = 3; uint8_t bytes[3] = {}; + uint8_t *longMessage = NULL; + + void setSysex(uint8_t *msg, uint8_t len) + { + size=len; + longMessage = msg; + } void setSize(uint8_t size) { assert(size <= 3); diff --git a/src/app/PortWidget.cpp b/src/app/PortWidget.cpp index 31dfff90..3b3fc62a 100644 --- a/src/app/PortWidget.cpp +++ b/src/app/PortWidget.cpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace rack { @@ -65,13 +66,20 @@ void PortWidget::onButton(const event::Button& e) { if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { CableWidget* cw = APP->scene->rack->getTopCable(this); if (cw) { - // history::CableRemove - history::CableRemove* h = new history::CableRemove; - h->setCable(cw); - APP->history->push(h); - - APP->scene->rack->removeCable(cw); - delete cw; + if ((APP->window->getMods() & RACK_MOD_MASK) == RACK_MOD_CTRL) { + int id = APP->scene->rack->nextCableColorId++; + APP->scene->rack->nextCableColorId %= settings::cableColors.size(); + cw->color = settings::cableColors[id]; + } else + { + // history::CableRemove + history::CableRemove *h = new history::CableRemove; + h->setCable(cw); + APP->history->push(h); + + APP->scene->rack->removeCable(cw); + delete cw; + } } e.consume(this); diff --git a/src/rtmidi.cpp b/src/rtmidi.cpp index df24af92..d6a26b1f 100644 --- a/src/rtmidi.cpp +++ b/src/rtmidi.cpp @@ -68,7 +68,10 @@ struct RtMidiOutputDevice : midi::OutputDevice { } void sendMessage(midi::Message message) override { - rtMidiOut->sendMessage(message.bytes, message.size); + if(message.size > 3) + rtMidiOut->sendMessage(message.longMessage, message.size); + else + rtMidiOut->sendMessage(message.bytes, message.size); } }; diff --git a/src/settings.cpp b/src/settings.cpp index a7278f8b..8463fa58 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -142,7 +142,7 @@ void fromJson(json_t* rootJ) { if (realTimeJ) realTime = json_boolean_value(realTimeJ); - json_t* sampleRateJ = json_object_get(rootJ, "sampleRate"); + json_t *sampleRateJ = json_object_get(rootJ, "sampleRate"); if (sampleRateJ) sampleRate = json_number_value(sampleRateJ);