computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 77eba60df7dfd1c1887ca81242ad0b15d7f66165
parent d89ca7839f7d8219f2135aaf8c69b7b97535fb8e
Author: Adam <[email protected]>
Date:   Thu,  1 Aug 2019 16:12:15 -0500

Update dtpulse.cpp

Add getByteString
Diffstat:
Msrc/dtpulse.cpp | 8++++++++
1 file changed, 8 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"; +}