AudibleInstruments icon indicating copy to clipboard operation
AudibleInstruments copied to clipboard

Peaks build error

Open davephillips opened this issue 7 years ago • 12 comments

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

davephillips avatar Mar 13 '18 11:03 davephillips

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

AndrewBelt avatar Mar 13 '18 11:03 AndrewBelt

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

davephillips avatar Mar 13 '18 13:03 davephillips

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

AndrewBelt avatar Mar 13 '18 21:03 AndrewBelt

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)

davephillips avatar Mar 13 '18 23:03 davephillips

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?

AndrewBelt avatar Mar 14 '18 01:03 AndrewBelt

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. :)

davephillips avatar Mar 14 '18 11:03 davephillips

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.

AndrewBelt avatar Mar 14 '18 11:03 AndrewBelt

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 !

davephillips avatar Mar 14 '18 13:03 davephillips

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.

cschol avatar Mar 23 '18 22:03 cschol

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.

davephillips avatar Mar 23 '18 22:03 davephillips

  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).

cschol avatar Mar 23 '18 23:03 cschol

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

gbrandt1 avatar Mar 30 '18 11:03 gbrandt1