From f16d43f9b5620fd88da12e54ac7d3325d878bd0e Mon Sep 17 00:00:00 2001 From: bidoo Date: Tue, 26 Dec 2017 11:30:28 +0100 Subject: [PATCH] dTrOY pitch mode save + makefile cleaning --- Makefile | 19 +++++++++++++------ README.md | 2 +- src/DTROY.cpp | 8 +++++--- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 10546e0..4eb6a85 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,27 @@ SLUG = Bidoo -VERSION = 0.5.9 +VERSION = 0.5.10 -CFLAGS += -Isrc/dep/audiofile +# FLAGS will be passed to both the C and C++ compiler +FLAGS += +CFLAGS += CXXFLAGS += -FLAGS += \ - -DTEST \ - -Isrc/utils/audiofile +# Careful about linking to libraries, since you can't assume much about the user's environment and library search path. +# Static libraries are fine. LDFLAGS += -SOURCES += $(wildcard src/*.cpp src/dep/audiofile/*cpp) +# Add .cpp and .c files to the build +SOURCES = $(wildcard src/*.cpp src/dep/audiofile/*cpp) +# Must include the VCV plugin Makefile framework include ../../plugin.mk +DISTRIBUTABLES += $(wildcard LICENSE*) res + +# Convenience target for packaging files into a ZIP file .PHONY: dist dist: all + rm -rf dist mkdir -p dist/$(SLUG) cp LICENSE* dist/$(SLUG)/ cp $(TARGET) dist/$(SLUG)/ diff --git a/README.md b/README.md index f4e9c75..a4f4ae5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Bidoo's plugins for [VCVRack](https://vcvrack.com) -![Version](https://img.shields.io/badge/version-0.5.9-green.svg?style=flat-square) +![Version](https://img.shields.io/badge/version-0.5.10-green.svg?style=flat-square) ![License](https://img.shields.io/badge/license-BSD3-blue.svg?style=flat-square) ![Language](https://img.shields.io/badge/language-C++-yellow.svg?style=flat-square) diff --git a/src/DTROY.cpp b/src/DTROY.cpp index 87921e9..e2fbb1d 100644 --- a/src/DTROY.cpp +++ b/src/DTROY.cpp @@ -335,11 +335,10 @@ struct DTROY : Module { json_t *toJson() override { json_t *rootJ = json_object(); - // running json_object_set_new(rootJ, "running", json_boolean(running)); - json_object_set_new(rootJ, "playMode", json_integer(playMode)); json_object_set_new(rootJ, "countMode", json_integer(countMode)); + json_object_set_new(rootJ, "pitchMode", json_boolean(pitchMode)); json_t *trigsJ = json_array(); for (int i = 0; i < 8; i++) { @@ -356,7 +355,6 @@ struct DTROY : Module { } void fromJson(json_t *rootJ) override { - // running json_t *runningJ = json_object_get(rootJ, "running"); if (runningJ) running = json_is_true(runningJ); @@ -369,6 +367,10 @@ struct DTROY : Module { if (countModeJ) countMode = json_integer_value(countModeJ); + json_t *pitchModeJ = json_object_get(rootJ, "pitchMode"); + if (pitchModeJ) + pitchMode = json_is_true(pitchModeJ); + json_t *trigsJ = json_object_get(rootJ, "trigs"); if (trigsJ) { for (int i = 0; i < 8; i++) {