computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 0f9a2dbf4b97d33c91f3d4ca3066ab90a3865737
parent 77243e588220576f1561e208630a1e5fe501711b
Author: Adam Malone <1319733+freddyz@users.noreply.github.com>
Date:   Tue, 20 Nov 2018 17:12:41 -0600

maybe hack fixed the parens problem for now

Diffstat:
Msrc/dtpulse.cpp | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp @@ -158,8 +158,13 @@ std::string splitRecur(std::string input) { tempString = interleaveExpand(stackVec.back()); //pop top of stack stackVec.pop_back(); + if(stackVec.size() > 0) { //push this evaluated string to new top stackVec.back().push_back(tempString); + } + else { + return ""; + } } else { stackVec.back().push_back(c); @@ -175,7 +180,6 @@ std::string interleaveExpand(std::vector<std::string> blocks) { // somewhat like bash shell expansion // ["a","b","cd"] --> "abcabd" // ["ab","cde"] ----> "acbdaebcadbe" - printf("interleaveExpand %i\n",blocks.size()); std::vector<int> indices; std::vector<int> lengths; int outerIndex = 0; @@ -186,12 +190,10 @@ std::string interleaveExpand(std::vector<std::string> blocks) { for(int i = 0; i < outerLength; i++) { indices.push_back(0); lengths.push_back(blocks[i].length()); - printf("len: %i\n",blocks[i].length()); } while(outerLength && ((!allAtZero && steps < 6000 ) || steps == 0)) { if(lengths[outerIndex]) { output+=blocks[outerIndex][indices[outerIndex]]; - printf("output:%s\n",output.c_str()); indices[outerIndex]++; indices[outerIndex]%=lengths[outerIndex]; }