Hey see over here https://github.com/enzienaudio/hvcc/issues/1
Heavy, Pd and Enzienaudio
Great, thanks!
- Edited
Hi,
I am having some difficulties using the hvcc on my laptop. I haven't tried yet it on the board.
When I did the last ssh make -C command I got this error:
''' Linking...
./build/core/default_main.o: In function main':
setup'
core/default_main.cpp:(.text+0x2ec): undefined reference to
core/default_main.cpp.text+0x2f0): undefined reference to
render'
cleanup'
core/default_main.cpp:(.text+0x2f4): undefined reference to
collect2: error: ld returned 1 exit status
Makefile:479: recipe for target '/root/Bela/projects/HeavyProjectName/HeavyProjectName' failed
make: *** [/root/Bela/projects/HeavyProjectName/HeavyProjectName] Error 1
make: Leaving directory '/root/Bela' '''
also I am getting this kind of message in IDE:
''' In file arm_acle.h: expected identifier or '(' column: 1, line: 142In file arm_acle.h: expected ')' column: 1, line: 142In file included from /root/Bela/projects/kokeilu/HvLightPipe.c:24:/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include/arm_acle.h:142:1: error: expected identifier or '('clz(uint32_t t) {/usr/xenomai/include/boilerplate/compiler.h:87:3: note: expanded from macro 'clz' ({ \ In file included from /root/Bela/projects/kokeilu/HvLightPipe.c:24:/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include/arm_acle.h:142:1: error: expected ')'/usr/xenomai/include/boilerplate/compiler.h:87:3: note: expanded from macro 'clz' ({ \ /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include/arm_acle.h:142:1: note: to match this '('/usr/xenomai/include/boilerplate/compiler.h:87:2: note: expanded from macro '__clz' ({ \ 2 errors generated.make: *** [/root/Bela/projects/kokeilu/build/HvLightPipe.o] Error 1 '''
This happens also with pd patches that have been previously compiled with Heavy compiler and have worked quite ok. I'd be really happy with any tips! Thanks!
ps. sorry it looks my message looks really messy..
The first error is due to the fact that you didn't add the file Bela/scripts/hvresources/render.cpp
(or a customized version if it) to the project. What commands did you use?
The second error, about arm_acle.h is because you need to compile the project using gcc as a compiler. This is achieved passing COMPILER=gcc
to the Make command. This is already included in the commands above, but when you build through the IDE you have to specify it in the 'Make parameters' box in the IDE. You should clean the project after you switch compiler.
- Edited
Thanks, yes the problem was as you mentioned. Dumb me, I was using terminal and didn't pay attention enough to the commands above.
But now instead I've run into trouble with the patch. I get strange behaviour. IDE console gives me "underrun detected" all the time. This use to happen earlier if running pd patches compiled with heavy with say 16 blocksize. It usually was fixed when changing to 64 blocksize. However, that doesn't work now. Also some parts of the patch seems to not working since for example debouncing of hardware switches which I have done in PD is completely all over the place. This is a patch that is identical to the patch that I used to have in it with the Heavy online version.
I updated the board yesterday. But probably nothing to do with that. Could there be some changes in the Heavy from the version that was running online?
- Edited
Actually seems to be something to do with updating the Bela. Now that I got back to previous version that I had running on the board things settled and the patch seems to work.
interesting. what version is the "old" version, and what did you update to?
the older version that I got back in is "Bela image, v0.3.1, 8 November 2017" and I updated to the current bela-master.
hmmm. Can you send an example patch and the heavy-generated files and all the steps to reproduce your issue? Probably the publicly available hvcc
is more up to date than the one that was used by Bela until their server went offline.
Here is the whole PD patch that I am running and the heavy files that I downloaded through the IDE.
https://we.tl/t-rTBGTCs6z6
Right, are these Heavy files generated with the publicly available hvcc
? Do you have an older version of those, generated by the online version of hvcc
?
And you are saying that with the older version of Bela this code was running fine, but not with the latest update from master
, correct?
How did you compile the project? With the IDE or with a script? Did you specify COMPILER=gcc
?
The ones that I sent in the latter message are generated with publicly available hvcc.
I have the older versions that were generated with online version. And you can download them from here: https://we.tl/t-Vj498MSns0
It seems so that the latest update wasn't running correctly the patch that I generated with publicly available hvcc. I haven't yet try to strip down the patch and find exactly in which objects the problem is situated. Some how the part that I use to debounce the digital ins doesn't work. Also IDE gives a lot of the underrun message and the CPU percentage was way higher than it should be. Underrun messages appear also with the older version of Bela again if I make the blocksize less than 64.
I have compiled the project earlier and now with a script. And I've basically been copy pasting the commands from here and earlier from the Bela instructions for heavy.
hmm one thing that I see is that you are running the project with 2 analog channels. This is not really supported by Heavy on Bela, and it never was. In fact, you'd have to run it with 8 analog channels for it to work correctly (we should add code to the heavy render file to check for that). I see that if I reduce the channel count to 8, the CPU usage is around 58% for both patches (this is both on the latest version of the Bela code, and on an old one (from about the time your old image was released), with 64 samples per block), with no dropouts.
I am not sure where the performance hit comes in when running with 2 analog channels, but that seems to be the cause of your issues
Finally, it seems that you are using a fairly old render.cpp
file for your heavy patch. This is not the cause of your issue, and the above mentioned warning is not in there yet. However, keep in mind for the future that, whenever you update your Bela code, you should always use the same version of the code on the board and on your computer, if you are generating a Heavy project and using the hvresources/render.cpp
file from your computer.
- Edited
HI I try to run hvcc on a tinker board, it work but I have some errors. In fact hvcc doesn't now the object "readsf~". I am suprise because is pretty basic in PD, is not attach an external library.
hvcc
only understands a subset of the Pd-vanilla objects. Here is a full list: https://github.com/CarloCattano/hvcc/blob/master/docs/14.Supported_vanilla_objects.md
[readsf~]
is not there. A good way to replace it is to manage the file loading in the wrapping code for your language/environment of choice, and maybe pass it in as one of the audio streams input [adc~]
.
Thanks for putting your time in. I didn't know that analog channel thing for sure. Also in my project it's pretty irrelevant if it's 2 or 8. So I'll start using 8 from now on!
Jukkapoika Also in my project it's pretty irrelevant if it's 2 or 8
We should really enforce it in the C++ wrapper, to minimize the chance of user error ...
hello, I tried to compile as described on 22Aug by giuliomoro, but running the last line (make -C ~/Bela PROJECT=HeavyProjectName COMPILER=gcc run) I got this error:
make: *** No rule to make target `run'. Stop.
I noticed the /Bela/projects/HeavyProjectName has been created and populated by a bunch of folders, but this is just the source code, shouldnt I be taking a single .cpp file or something so I can upload it to bela with the IDE? (sorry I am not a programmer and feel totally lost at sea...) btw I am on a Mac.
any help would be very appreciated!
I take it you are referring to the following instructions:
python2.7 ~/hvcc/hvcc.py /path/to/source/project/_main.pd -o /tmp/hvtmp -n bela -g c mkdir -p ~/Bela/projects/HeavyProjectName rsync -av ~/Bela/scripts/hvresources/render.cpp /tmp/hvtmp/c/* ~/Bela/projects/HeavyProjectName/ make -C ~/Bela PROJECT=HeavyProjectName COMPILER=gcc run
These are meant to be run directly on the board after installing the needed tools as explained earlier in that post (those tools are already available in Bela images version v0.3.6 or above).
It sounds like you are running them on the host computer just now?
There are also instructions to be run on the host computer, just a few posts down: see here https://forum.bela.io/d/636-heavy-pd-and-enzienaudio/12 . Running them on the host makes the setup easier and the compilation faster.
- Edited
giuliomoro
Grazie mille Giulio!
Yes, I was running them on the host computer (!!) will try the correct instructions as soon as life permits.
thanks again for the reply,
C.