Skip to content

Commit

Permalink
dTrOY pitch mode save + makefile cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-bouffier committed Dec 26, 2017
1 parent 40849df commit f16d43f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Bidoo's plugins for [VCVRack](https://vcvrack.com)

<!-- Version and License Badges -->
![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)

Expand Down
8 changes: 5 additions & 3 deletions src/DTROY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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);
Expand All @@ -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++) {
Expand Down

0 comments on commit f16d43f

Please sign in to comment.