From 4c16b647d59e4fa56b8fc718704e413c64676dab Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 8 Mar 2023 22:24:45 +0100 Subject: [PATCH] Build with JUCE 7.0.2 --- .drone.yml | 38 ++++++++++++++++++++++++++++++++++++ Dockerfile | 13 ++++++++++++ README.md | 4 ++++ Source/CustomLookAndFeel.cpp | 12 ++++++------ 4 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d7c42ae --- /dev/null +++ b/.drone.yml @@ -0,0 +1,38 @@ +--- +kind: pipeline +type: kubernetes +name: Build paulxstretch + +trigger: + branch: + exclude: + - main + event: + - push + +steps: + - name: Init git submodules with themes + image: alpine/git + commands: + - git submodule update --init --recursive + - name: Build and push the docker image + image: plugins/docker + when: + branch: + - dev + settings: + registry: git.badhouseplants.net + username: allanger + password: + from_secret: GITEA_TOKEN + repo: git.badhouseplants.net/${DRONE_REPO} + tags: latest + + # - name: Build the Linux version + # image: ubuntu + # commands: + # - apt update -y + # - apt install -y build-essential libasound2 cmake fftw-dev pkg-config libx11-dev x11-xserver-utils libxrandr-dev libxinerama-dev libxcursor-dev libfreetype6-dev libfftw3-dev libasound2-dev libjack-dev + # - cmake -B build -S $DRONE_WORKSPACE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev + # - cmake --build build + # diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2e35f9f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu AS builder +RUN apt-get update -y &&\ + apt-get install -y build-essential libasound2 cmake fftw-dev pkg-config libx11-dev x11-xserver-utils libxrandr-dev libxinerama-dev libxcursor-dev libfreetype6-dev libfftw3-dev libasound2-dev libjack-dev +COPY . /src +WORKDIR /src +RUN cmake -B build -S /src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Wno-dev +RUN cmake --build build + +FROM ubuntu +COPY --from=builder /src/build/PaulXStretch_artefacts/Release/ /release +CMD ["mv", "/release", "/out"] + + diff --git a/README.md b/README.md index dc52f3a..1125a69 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ### PaulXStretch - Plugin for extreme time stretching and other spectral processing of audio +## Dev Notes: +### Install the linux version using Docker. +I've created a docker image that you can use to install the current dev version of the plugin + This application/plugin is based on the PaulStretch algorithm. (Paul’s Extreme Time Stretch, originally developed by Nasca Octavian Paul), and specifically the PaulXStretch version from Xenakios. The UI has been updated and adapted for various screen sizes. PaulXStretch is only suitable for radical transformation of sounds. It is not suitable at all for subtle time or pitch corrections and such. Ambient music and sound design are probably the most suitable use cases. It can turn any short audio into an hours long ambient soundscape without batting an eye! diff --git a/Source/CustomLookAndFeel.cpp b/Source/CustomLookAndFeel.cpp index 3cfcb79..1a28b8d 100644 --- a/Source/CustomLookAndFeel.cpp +++ b/Source/CustomLookAndFeel.cpp @@ -345,8 +345,8 @@ void CustomLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool i switch (o) { - case TabbedButtonBar::TabsAtLeft: t = t.rotated (float_Pi * -0.5f).translated (area.getX(), area.getBottom()); break; - case TabbedButtonBar::TabsAtRight: t = t.rotated (float_Pi * 0.5f).translated (area.getRight(), area.getY()); break; + case TabbedButtonBar::TabsAtLeft: t = t.rotated (MathConstants::pi * -0.5f).translated (area.getX(), area.getBottom()); break; + case TabbedButtonBar::TabsAtRight: t = t.rotated (MathConstants::pi * 0.5f).translated (area.getRight(), area.getY()); break; case TabbedButtonBar::TabsAtTop: case TabbedButtonBar::TabsAtBottom: t = t.translated (area.getX(), area.getY()); break; default: jassertfalse; break; @@ -447,8 +447,8 @@ void CustomLookAndFeel::drawTabButtonText (TabBarButton& button, Graphics& g, bo switch (button.getTabbedButtonBar().getOrientation()) { - case TabbedButtonBar::TabsAtLeft: t = t.rotated (float_Pi * -0.5f).translated (area.getX(), area.getBottom()); break; - case TabbedButtonBar::TabsAtRight: t = t.rotated (float_Pi * 0.5f).translated (area.getRight(), area.getY()); break; + case TabbedButtonBar::TabsAtLeft: t = t.rotated (MathConstants::pi * -0.5f).translated (area.getX(), area.getBottom()); break; + case TabbedButtonBar::TabsAtRight: t = t.rotated (MathConstants::pi * 0.5f).translated (area.getRight(), area.getY()); break; case TabbedButtonBar::TabsAtTop: case TabbedButtonBar::TabsAtBottom: t = t.translated (area.getX(), area.getY()); break; default: jassertfalse; break; @@ -903,8 +903,8 @@ void CustomLookAndFeel::drawRotarySlider (Graphics& g, int x, int y, int width, } const auto thumbWidth = lineW ; // * 1.5f; - const Point thumbPoint (bounds.getCentreX() + arcRadius * std::cos (toAngle - float_Pi * 0.5f), - bounds.getCentreY() + arcRadius * std::sin (toAngle - float_Pi * 0.5f)); + const Point thumbPoint (bounds.getCentreX() + arcRadius * std::cos (toAngle - MathConstants::pi * 0.5f), + bounds.getCentreY() + arcRadius * std::sin (toAngle - MathConstants::pi * 0.5f)); g.setColour (findColour (Slider::thumbColourId)); g.fillEllipse (Rectangle (thumbWidth, thumbWidth).withCentre (thumbPoint));