diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4a6b4e..5e03eb2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: sign binaries uses: flucoma/actions/distribution@main @@ -38,7 +38,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: remove pdb files run: Remove-Item install -Recurse -Include *.pdb @@ -61,7 +61,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/sc@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: compress archive run: tar -zcvf FluCoMa-SC-Linux.tar.gz FluidCorpusManipulation @@ -73,7 +73,7 @@ jobs: path: install/FluCoMa-SC-Linux.tar.gz - id: get-version - run: echo "::set-output name=version::$(cat flucoma.version.rc)" + run: echo "version=$(cat flucoma.version.rc)" >> $GITHUB_OUTPUT working-directory: build/_deps/flucoma-core-src release: @@ -93,6 +93,14 @@ jobs: with: name: linuxbuild + - name: delete pre-existing release + uses: dev-drprasad/delete-tag-and-release@v0.2.1 + with: + delete_release: true # default: false + tag_name: ${{ needs.linuxbuild.outputs.version }} # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: package and upload uses: softprops/action-gh-release@v1 with: @@ -101,5 +109,6 @@ jobs: files: FluCoMa* prerelease: true tag_name: ${{ needs.linuxbuild.outputs.version }} + target_commitish: ${{ github.sha }} draft: false diff --git a/release-packaging/Classes/FluidKDTree.sc b/release-packaging/Classes/FluidKDTree.sc index f850d7f..53b4fb6 100644 --- a/release-packaging/Classes/FluidKDTree.sc +++ b/release-packaging/Classes/FluidKDTree.sc @@ -48,13 +48,9 @@ FluidKDTree : FluidModelObject this.prSendMsg(this.kNearestDistMsg(buffer,k)); } - kr{|trig, inputBuffer,outputBuffer, numNeighbours = 1, lookupDataSet| - /* this.numNeighbours_(numNeighbours); - lookupDataSet = lookupDataSet ? -1; - this.lookupDataSet_(lookupDataSet);*/ - + kr{|trig, inputBuffer, outputBuffer, numNeighbours, radius, lookupDataSet| ^FluidKDTreeQuery.kr(trig, - this, numNeighbours, this.radius,lookupDataSet.asUGenInput, + this, numNeighbours??{this.numNeighbours}, radius??{this.radius}, lookupDataSet.asUGenInput, inputBuffer,outputBuffer); } @@ -62,8 +58,8 @@ FluidKDTree : FluidModelObject FluidKDTreeQuery : FluidRTMultiOutUGen { - *kr{ |trig, tree, numNeighbours, radius,lookupDataSet, inputBuffer, outputBuffer | - ^this.multiNew('control',trig, tree.asUGenInput, numNeighbours, radius,lookupDataSet!?(_.asUGenInput)??{-1}, inputBuffer.asUGenInput, outputBuffer.asUGenInput) + *kr{ |trig, tree, numNeighbours, radius, lookupDataSet, inputBuffer, outputBuffer | + ^this.multiNew('control', trig, tree.asUGenInput, numNeighbours, radius, lookupDataSet!?(_.asUGenInput)??{-1}, inputBuffer.asUGenInput, outputBuffer.asUGenInput) } init { arg ... theInputs; diff --git a/release-packaging/Classes/FluidKNNRegressor.sc b/release-packaging/Classes/FluidKNNRegressor.sc index 992b67e..5f009e5 100644 --- a/release-packaging/Classes/FluidKNNRegressor.sc +++ b/release-packaging/Classes/FluidKNNRegressor.sc @@ -23,23 +23,27 @@ FluidKNNRegressor : FluidModelObject { ^this.prMakeMsg(\predict,this.id,sourceDataSet.id,targetDataSet.id) } - predict{ |sourceDataSet, targetDataSet,action| + predict{ |sourceDataSet, targetDataSet, action| actions[\predict] = [nil, action]; this.prSendMsg(this.predictMsg(sourceDataSet, targetDataSet)); } - predictPointMsg { |buffer| - ^this.prMakeMsg(\predictPoint,id, this.prEncodeBuffer(buffer)); + predictPointMsg { |sourceBuffer, targetBuffer| + ^this.prMakeMsg(\predictPoint,id, + this.prEncodeBuffer(sourceBuffer), + this.prEncodeBuffer(targetBuffer), + ["/b_query", targetBuffer.asUGenInput]); } - predictPoint { |buffer, action| - actions[\predictPoint] = [number(FluidMessageResponse,_,_),action]; - this.prSendMsg(this.predictPointMsg(buffer)); + predictPoint { |sourceBuffer, targetBuffer, action| + actions[\predictPoint] = [nil,{action.value(targetBuffer)}]; + this.predictPointMsg(sourceBuffer, targetBuffer); + this.prSendMsg(this.predictPointMsg(sourceBuffer, targetBuffer)); } - kr{|trig, inputBuffer,outputBuffer| + kr{|trig, inputBuffer, outputBuffer, numNeighbours, weight| ^FluidKNNRegressorQuery.kr(K2A.ar(trig), - this, this.numNeighbours, this.weight, + this, numNeighbours??{this.numNeighbours}, weight??{this.weight}, this.prEncodeBuffer(inputBuffer), this.prEncodeBuffer(outputBuffer)); }