Mercurial > hg > beaglert
changeset 492:e9821d65b9ba prerelease
Heavy: your patch on the enzienaudio website should be called bela. You need to update that from your enzienaudio.com account.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 21 Jun 2016 17:36:58 +0100 |
parents | 89212ad6a0bf |
children | a23d74e2f6cb a5867381a97b |
files | scripts/build_pd_heavy.sh scripts/hvresources/heavy_render.cpp |
diffstat | 2 files changed, 11 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/build_pd_heavy.sh Tue Jun 21 17:24:20 2016 +0100 +++ b/scripts/build_pd_heavy.sh Tue Jun 21 17:36:58 2016 +0100 @@ -3,7 +3,6 @@ # shell script for automatic uploading/compiling of pd patch onto bbb # Christian Heinrichs 2015 # -# example usage: sh upload-and-compile.sh -f bwg-tests -q -e trap "{ echo "";exit 0; }" 2 @@ -47,7 +46,7 @@ { printf "\nUSAGE: build_pd.sh [[-i input folder containing _main.pd file ]\ [-o output folder for temp heavy project .c files (default $projectpath)]\ - [-b bbb path to copy to (default ~/Bela)] | [-h] | [-w|--watch] | [-n|--noupload] | [-r|--release arg]\n" + [-b remote path to copy to (default ~/Bela)] | [-h] | [-w|--watch] | [-n|--noupload] | [-r|--release arg]\n" printf "\nexample: build_pd.sh -i ../projects/heavy/pd/hello-world -o ../projects/heavy/hello-world\n" echo "If --watch is selected, the script will check every 1s for any file that is modified in the source folder, which re-triggers\ the building process. @@ -87,7 +86,7 @@ shift done -[ -z "$ENZIENAUDIO_COM_PATCH_NAME" ] && ENZIENAUDIO_COM_PATCH_NAME=bbb +[ -z "$ENZIENAUDIO_COM_PATCH_NAME" ] && ENZIENAUDIO_COM_PATCH_NAME=bela [ "$NO_UPLOAD" -eq 0 ] && [ -z "$pdpath" ] && { echo "Error: a path to the source folder should be provided"; exit 1; } if [ -z "$release" ] @@ -155,20 +154,16 @@ touch $reference_time_file # Transfer the files - rsync -ac --out-format=" %n" --no-t --delete-after --exclude='HvContext*' --exclude=build --exclude=$BBB_PROJECT_NAME "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER" &&\ + rsync -ac --out-format=" %n" --no-t --delete-during --exclude='HvContext_'$ENZIENAUDIO_COM_PATCH_NAME'.*' --exclude=build --exclude=$BBB_PROJECT_NAME "$projectpath"/ "$BBB_NETWORK_TARGET_FOLDER" &&\ { [ $NO_UPLOAD -eq 1 ] || scp "$projectpath"/HvContext* $BBB_NETWORK_TARGET_FOLDER; } ||\ { echo "ERROR: while synchronizing files with the BBB. Is the board connected?"; exit 1; } # TODO: rsync should upload a list of modified files, so that the corresponding objects can be deleted - # TODO: this should be run only when Heavy_bbb.h changes. Otherwise render is recompiled every time for no good reason + # TODO: this should be run only when Heavy_bela.h changes. Otherwise render is recompiled every time for no good reason #ssh $BBB_ADDRESS "rm -rf ${BBB_PROJECT_FOLDER}/build/render.*" #produce a list of files which content has changed (not just the date) - #TODO: could be made faster (perhaps) by backing up the folder locally instead of bbb - # UPDATED_FILES=`rsync -naic --log-format="%f" "$projectpath" "$BBB_BELA_HOME"/source | grep -v "\.$"` - # echo "UPDATEDFILES : $UPDATED_FILES" - # exit 2 - # remove old executable + # remove old executable to force re-linking #if [ $NO_UPLOAD -eq 0 ]; then # ssh $BBB_ADDRESS "rm -rf "$BBB_PROJECT_FOLDER/$BBB_PROJECT_NAME; #fi; @@ -239,4 +234,3 @@ uploadBuildRun done fi; -#ssh -t root@192.168.7.2 "kill -s 2 \`pidof heavy_template\` 2>/dev/null; sleep 0.5; rm -f ~/$filename_bbb/Release/source/heavy/HvContext_bbb.? ~/$filename_bbb/Release/heavy_template && make all -C ~/$filename_bbb/Release" &>/dev/null
--- a/scripts/hvresources/heavy_render.cpp Tue Jun 21 17:24:20 2016 +0100 +++ b/scripts/hvresources/heavy_render.cpp Tue Jun 21 17:36:58 2016 +0100 @@ -15,7 +15,7 @@ #include <Midi.h> #include <Scope.h> #include <cmath> -#include <Heavy_bbb.h> +#include <Heavy_bela.h> #include <string.h> #include <stdlib.h> #include <string.h> @@ -25,7 +25,7 @@ * HEAVY CONTEXT & BUFFERS */ -Hv_bbb *gHeavyContext; +Hv_bela *gHeavyContext; float *gHvInputBuffers = NULL, *gHvOutputBuffers = NULL; unsigned int gHvInputChannels = 0, gHvOutputChannels = 0; @@ -173,7 +173,7 @@ hvMidiHashes[kmmChannelPressure] = hv_stringToHash("__hv_touch"); hvMidiHashes[kmmPitchBend] = hv_stringToHash("__hv_bendin"); - gHeavyContext = hv_bbb_new(context->audioSampleRate); + gHeavyContext = hv_bela_new(context->audioSampleRate); gHvInputChannels = hv_getNumInputChannels(gHeavyContext); gHvOutputChannels = hv_getNumOutputChannels(gHeavyContext); @@ -359,9 +359,9 @@ // replacement for bang~ object - //hv_vscheduleMessageForReceiver(gHeavyContext, "bbb_bang", 0.0f, "b"); + //hv_vscheduleMessageForReceiver(gHeavyContext, "bela_bang", 0.0f, "b"); - hv_bbb_process_inline(gHeavyContext, gHvInputBuffers, gHvOutputBuffers, context->audioFrames); + hv_bela_process_inline(gHeavyContext, gHvInputBuffers, gHvOutputBuffers, context->audioFrames); // Bela digital out // Bela digital out at signal-rate @@ -430,7 +430,7 @@ void cleanup(BelaContext *context, void *userData) { - hv_bbb_free(gHeavyContext); + hv_bela_free(gHeavyContext); if(gHvInputBuffers != NULL) free(gHvInputBuffers); if(gHvOutputBuffers != NULL)