hey thanks giuliomoro this works perfectly! i actually and honestly like this solution far better then the online service, since i often work on this stuff abroad in the train or in a bus while driving to a gig. thanks heaps!!
Heavy, Pd and Enzienaudio
- Edited
Great. There is something else that needs to be said: if you want to make the process even faster, you can run hvcc
on your own computer.
Preparation:
- Search online for instructions to install
python2.7
andpip
(on Mac,python
is already installed*) - install
hvcc
, same as above:git clone https://github.com/giuliomoro/hvcc.git cd hvcc/ pip install -r requirements.txt
Usage (almost same as above):
python2.7 ~/hvcc/hvcc.py /path/to/source/project/_main.pd -o /tmp/hvtmp -n bela -g c
ssh root@192.168.7.2 mkdir -p Bela/projects/HeavyProjectName
rsync -av /path/to/Bela/scripts/hvresources/render.cpp /tmp/hvtmp/c/* root@192.168.7.2:Bela/projects/HeavyProjectName/
ssh root@192.168.7.2 make -C Bela PROJECT=HeavyProjectName COMPILER=gcc run
make sure you bring up a page with the IDE at least once after every reboot of the board before you run the above, so that the date is set appropriately on the board and you avoid problems during the build.
* On my Mac, I have two versions of python 2.7, not sure how that happened, but pip
installs packages for the one I invoke by calling python
, and not for the one I obtain calling python2.7
.
EDIT: on 26/12/2018 I edited this post to clone from github.com/giuliomoro/hvcc
instead of github.com/enzienaudio/hvcc
thanks for the further instructions. will try them as well at some point. right now i am happy with the onboard solution, the speed is decent.
- Edited
Does someone have the table of all the supported pd objects from the Enzienaudio website?
The link given on the Github site doesn't work of course anymore because the Enzienaudio homepage is down.
And of course didn't cross my mind to do it myself when they were ending the support of the Heavy..
Hey see over here https://github.com/enzienaudio/hvcc/issues/1
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!