VCVRack / AudibleInstruments

VCV Rack plugin based on Mutable Instruments Eurorack modules
https://vcvrack.com/AudibleInstruments.html
Other
388 stars 84 forks source link

Peaks build error #49

Open davephillips opened 6 years ago

davephillips commented 6 years ago

Fedora 23 Linux Rack master (latest pull)

g++ -Wsuggest-override -std=c++11 -DTEST -I./eurorack -Wno-unused-local-typedefs -fPIC -I../../include -I../../dep/include -DSLUG=AudibleInstruments -DVERSION=0.6.0 -MMD -MP -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/Peaks.cpp.o src/Peaks.cpp
src/Peaks.cpp: In member function ‘void Peaks::refreshLeds()’:
src/Peaks.cpp:567:39: error: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator>>’
    b[i] = std::abs(gBrightness[i]) >> 8;
                                       ^
../../compile.mk:57: recipe for target 'build/src/Peaks.cpp.o' failed
make: *** [build/src/Peaks.cpp.o] Error 1
AndrewBelt commented 6 years ago

You can delete the file if you want to build AudibleInstruments.

davephillips commented 6 years ago

Done, thanks. No problems with the rest of the build.

AndrewBelt commented 6 years ago

Could you test it again? What is your compiler and version? g++ --version

davephillips commented 6 years ago

Hey Andrew, thanks for the note, I built and loaded it without problems, will run some tests on it this evening. And: $ g++ --version g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)

AndrewBelt commented 6 years ago

That's a pretty old compiler. I'm not surprised that it has issues with C++11 stuff. Just to make sure, you restored the Peaks.cpp file after deleting it, right?

davephillips commented 6 years ago

Yes, I did a fresh pull. Peaks built and loaded perfectly, but I had no time to test last night, will do so today after the wife goes to work. :)

AndrewBelt commented 6 years ago

Well, I've disabled it until it's fixed, so it's dead code until then. I just don't want it to break the build.

davephillips commented 6 years ago

Hey Andrew, so the module itself is broken at this time ? It seems to be so, I just tested it and got no sound out of it after following a couple tutorials on YouTube. I hope it gets repaired soon, it's a cool module (i'd love to play with the Numbers Station mode). Thanks again for your help !

cschol commented 6 years ago

Andrew did some refactoring on the PR I submitted to clean up the code. Mine was working. I'll check out the code and see what it left to be done.

Hmm. It compiles, but indeed it does not work. I'll look into it.

davephillips commented 6 years ago

Cool. Meanwhile, here's what I have so far:

  1. The module will build on my old system if I remove the std:: from Peaks.cpp line 567.
  2. Alas, it doesn't work at all, i.e. no sound and/or effect from any selected mode.
  3. The Number Station option appears as a Secret Mode but remains unchecked after selection.
  4. The Triggers buttons are unresponsive manually in drum mode.
cschol commented 6 years ago
  1. Removing std:: from the abs does work on my system also (Ubuntu 16.04). I think we can do that.
  2. I got it to work. It was due to some of Andrew's refactoring, that was not complete.
  3. Fixed. The one quirk here is that "unchecking" the number station item in the menu does nothing. To exit the number station mode, you have to click one of the mode buttons due to the logic of entering the mode. This is how the real module works.

@AndrewBelt I can submit a PR to make the module work again. It still does not address some of the concerns you had with the module (context menu vs buttons, IOBuffer). I do still believe that the module should be close to the physical implementation, which includes the way the buttons work, unless it is not possible to implement in Rack (e.g. entering Number Station Mode with pressing two buttons at the same time). Using the IOBuffer is to not have to refactor some of the other methods (and introduce bugs).

gbrandt1 commented 6 years ago

for the record, chris' fix works great for me - running Peaks here B-)