computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit a1a85a8ff296af601a0e52cf0a893b3138b02e60
parent e9df9a5ee50de50bf2174793e717bb77100aa2da
Author: Adam M <[email protected]>
Date:   Thu,  1 Aug 2019 16:53:23 -0500

Merge branch 'folypace' of https://github.com/freddyz/computerscare-vcv-modules into folypace

Diffstat:
Msrc/dtpulse.cpp | 8++++++++
Msrc/dtpulse.hpp | 2++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/dtpulse.cpp b/src/dtpulse.cpp @@ -1221,4 +1221,12 @@ float Quantizer::quantizeEven(float input,int iTranspose) { float Quantizer::quantizeEven(float input) { return quantizeEven(input,0); } +std::string getByteString(float f) { + unsigned char const * p = reinterpret_cast<unsigned char const *>(&f); +for (std::size_t i = 0; i != sizeof(float); ++i) +{ + std::printf("The byte #%zu is 0x%02X\n", i, p[i]); +} + return "horse"; +} diff --git a/src/dtpulse.hpp b/src/dtpulse.hpp @@ -140,6 +140,7 @@ class Quantizer { bool matchesAny(std::string val, std::vector<std::string> whitelist); bool is_digits(const std::string &str); void padTo(std::string &str, const size_t num, const char paddingChar ); + std::vector <int> parseString(std::string expr); std::vector <int> parseDt(std::string input, int offset, std::string lookup); std::vector <int> parseLookup(std::string input, int offset, std::string lookup); @@ -166,3 +167,4 @@ void whoKnowsLaundry(std::string input); void whoKnowsQuantize(std::string input); std::vector<int> getIndicesFromTokenStack(std::vector<Token> tokens); std::vector<int> duplicateIntVector(std::vector<int> input); +std::string getByteString(float f);