Troubles with a modded object (EDIT: is this a bug in the original?)


#1

Hi there!
I made a very simple mod of fx/rngs/reverb. I'm not a coder and I just tried, unexpectedly it worked: I wanted a mono version without lowpass filter so (if I recall correctly) I copied all the files in a new folder and edited them removing everything regarding the right channel an the filter...:innocent:
As said it worked but since then I got a duplicate UUID warning, that I politely ignored...and used it successfully for a while in my live performing patch.
Since yesterday I'm the happy owner of 2 more axos and so I'm changing my setup a little bit, and I run into another problem: if I run 2 instances of my modded object they kinda feedback (maybe they write to the same buffer?), and If I run 1 rngs/reverb and 1 mod the patch don't compile.

Start compiling patch
Compiling patch... with /opt/Axoloti/app/firmware
BDIR = /home/p/axoloti/build
FIRMWARE = .
RM
APP
! /home/p/axoloti/build/xpatch.h.gch
. /home/p/axoloti/objects/rings_fx.h
. /home/p/axoloti/axoloti-factory/objects/dist/bltable.h
. /home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:6:6: error: multiple definition of 'enum rings_fx::Format'
enum Format {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:4:6: error: previous definition here
enum Format {
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:12:6: error: multiple definition of 'enum rings_fx::LFOIndex'
enum LFOIndex {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:10:6: error: previous definition here
enum LFOIndex {
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:18:8: error: redefinition of 'struct rings_fx::DataType'
struct DataType { };
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:16:8: error: previous definition of 'struct rings_fx::DataType'
struct DataType { };
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:21:8: error: redefinition of 'struct rings_fx::DataType<(rings_fx::Format)0u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:19:8: error: previous definition of 'struct rings_fx::DataType<(rings_fx::Format)0u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:35:8: error: redefinition of 'struct rings_fx::DataType<(rings_fx::Format)1u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:33:8: error: previous definition of 'struct rings_fx::DataType<(rings_fx::Format)1u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:49:8: error: redefinition of 'struct rings_fx::DataType<(rings_fx::Format)2u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:47:8: error: previous definition of 'struct rings_fx::DataType<(rings_fx::Format)2u>'
struct DataType {
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:64:7: error: redefinition of default argument for 'rings_fx::Format format'
class FxEngine {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:61:21: note: original definition appeared here
Format format = FORMAT_12_BIT>
^
In file included from /home/p/axoloti/build/xpatch.cpp:3:0:
/home/p/axoloti/axoloti-factory/objects/fx/rngs/rings_fx.h:340:7: error: redefinition of 'class rings_fx::Reverb'
class Reverb {
^
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:259:7: error: previous definition of 'class rings_fx::Reverb'
class Reverb {
^
/home/p/axoloti/build/xpatch.cpp: In member function 'void rootc::instancereverb__1::dsp(const int32_t*, const int32_t*, int32_t (&)[16], int32_t (&)[16], int, int, int, int, int)':
/home/p/axoloti/build/xpatch.cpp:5092:8: error: 'class rings_fx::Reverb' has no member named 'set_lp'
reverb.set_lp(q27_to_float(param_lowpass));
^
/home/p/axoloti/build/xpatch.cpp:5099:34: error: no matching function for call to 'rings_fx::Reverb::Process(float [16], float [16], int)'
reverb.Process(left,right,BUFSIZE);
^
/home/p/axoloti/build/xpatch.cpp:5099:34: note: candidate is:
In file included from /home/p/axoloti/build/xpatch.cpp:1:0:
/home/p/axoloti/objects/rings_fx.h:271:8: note: void rings_fx::Reverb::Process(float*, size_t)
void Process(float* left, size_t size) {
^
/home/p/axoloti/objects/rings_fx.h:271:8: note: candidate expects 2 arguments, 3 provided
Multiple include guards may be useful for:
/home/p/axoloti/objects/rings_fx.h
Makefile.patch:57: recipe for target '/home/p/axoloti/build/xpatch.bin' failed
make: *** [/home/p/axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 2
Compiling patch failed ( /home/p/axoloti/patches/VAL/board2.axp )

Sorry for the long log but I wasn't able to paste it "windowed"...

Are maybe those problems consequences of wrong uuids? Any help appreciated


#2

Guess you are somehow including rings_fx.h twice when you use the original + mod in the same patch. Which will cause troubles because you will have all functions from that header file twice, and compilers don't like that.

Haven't looked at the code from the object, but you could probably remove the include from your modded object if you will always run it next to the original.


#3

What a quick reply! Thanks!
I'm going to try that now as a workaround, but actually the ideal for me would be to use 2 or more of my modded version.


#4

Wait a minute, this happens also with the original rngs/reverb! So I'm reporting this as a bug and editing the title.


#5

Bugs can be reported on GitHub: https://github.com/axoloti/axoloti/issues

I wouldn't recommend using two of these reverbs in a patch though. They take up quite a bit of CPU, and are best used right before the stereo output to make your sound a bit wider.


#6

It is know issue that some of the MI objects can create some weird cross feedback if you use several of them in a patch. Maybe it will be fixed in future releases :slight_smile: