Merge branch '3d-audio' of github.com:jameshball/osci-render into 3d-audio

pull/218/head
James Ball 2024-02-11 13:44:22 +00:00
commit 2c7d6398fd
7 zmienionych plików z 235 dodań i 48 usunięć

Wyświetl plik

@ -3,6 +3,7 @@ on:
push:
branches:
- release
- 3d-audio
jobs:
build-linux:
name: Build Linux
@ -18,7 +19,9 @@ jobs:
- name: "Run script"
run: |
export OS="linux"
./ci/build.sh
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3
@ -40,7 +43,9 @@ jobs:
- name: "Run script"
run: |
export OS="mac"
./ci/build.sh
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3
@ -62,7 +67,9 @@ jobs:
- name: "Run script"
run: |
export OS="win"
./ci/build.sh
source ./ci/setup-env.sh
source ./ci/test.sh
source ./ci/build.sh
shell: bash
- name: Upload Artifact
uses: actions/upload-artifact@v3

Wyświetl plik

@ -1,6 +1,11 @@
<a href="https://osci-render.com"><img width="100%" src="images/osci-wide-tagline.png" /></a>
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2a3cfe583d8c49fc8aa8e496bd79133b)](https://app.codacy.com/gh/jameshball/osci-render/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
<p align="center">
<a href="https://app.codacy.com/gh/jameshball/osci-render/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade" alt="Codacy">
<img src="https://app.codacy.com/project/badge/Grade/2a3cfe583d8c49fc8aa8e496bd79133b" /></a>
<a href="https://discord.gg/ekjpQvT68C" alt="Discord">
<img src="https://dcbadge.vercel.app/api/server/ekjpQvT68C?style=flat&theme=default-inverted" /></a>
</p>
Open-source synthesizer for making music by drawing objects, text, and images on an oscilloscope using audio. Allows for 3D rendering of `.obj` files, `.svg` images, `.txt` files, and Blender scenes on Windows, macOS, and Linux.

Wyświetl plik

@ -0,0 +1,48 @@
#include <JuceHeader.h>
class MyTest : public juce::UnitTest {
public:
MyTest() : juce::UnitTest("Foobar testing") {}
void runTest() override {
beginTest("Part 1");
expect(true);
beginTest("Part 2");
expect(true);
}
};
class MyTest2 : public juce::UnitTest {
public:
MyTest2() : juce::UnitTest("Foobar testing 2") {}
void runTest() override {
beginTest("Part A");
expect(true);
beginTest("Part B");
expect(true);
}
};
static MyTest2 test2;
int main(int argc, char* argv[]) {
juce::UnitTestRunner runner;
runner.runAllTests();
for (int i = 0; i < runner.getNumResults(); ++i) {
const juce::UnitTestRunner::TestResult* result = runner.getResult(i);
if (result->failures > 0) {
return 1;
}
}
return 0;
}

Wyświetl plik

@ -2,50 +2,6 @@
PLUGIN="osci-render"
# linux specific stiff
if [ $OS = "linux" ]; then
sudo apt-get update
sudo apt-get install clang git ladspa-sdk freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0 juce-tools xvfb
fi
ROOT=$(cd "$(dirname "$0")/.."; pwd)
cd "$ROOT"
echo "$ROOT"
rm -Rf bin
mkdir bin
BRANCH=${GITHUB_REF##*/}
echo "$BRANCH"
cd "$ROOT/ci"
rm -Rf bin
mkdir bin
# Get the Projucer
cd "$ROOT/ci/bin"
PROJUCER_OS=$OS
if [ "$OS" = "win" ]; then
PROJUCER_OS="windows"
elif [ "$OS" = "mac" ]; then
PROJUCER_OS="osx"
fi
curl -s -S -L "https://api.juce.com/api/v1/download/juce/latest/$PROJUCER_OS" -o Projucer.zip
unzip Projucer.zip
# Set Projucer path based on OS
if [ "$OS" = "mac" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.app/Contents/MacOS/Projucer"
elif [ "$OS" = "linux" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer"
else
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.exe"
fi
# Set global path
GLOBAL_PATH_COMMAND="$PROJUCER_PATH --set-global-search-path $PROJUCER_OS 'defaultJuceModulePath' '$ROOT/ci/bin/JUCE/modules'"
eval "$GLOBAL_PATH_COMMAND"
# Resave jucer file
RESAVE_COMMAND="$PROJUCER_PATH --resave '$ROOT/$PLUGIN.jucer'"
eval "$RESAVE_COMMAND"
@ -94,3 +50,5 @@ if [ "$OS" = "win" ]; then
cp "$ROOT/Builds/VisualStudio2022/x64/Release/Standalone Plugin/$PLUGIN.exe" "$ROOT/bin"
cp -r "$ROOT/Builds/VisualStudio2022/x64/Release/VST3/$PLUGIN.vst3/Contents/x86_64-win/$PLUGIN.vst3" "$ROOT/bin"
fi
cd "$ROOT"

48
ci/setup-env.sh 100755
Wyświetl plik

@ -0,0 +1,48 @@
#!/bin/bash -e
ls -R
# linux specific stiff
if [ $OS = "linux" ]; then
sudo apt-get update
sudo apt-get install clang git ladspa-sdk freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0 juce-tools xvfb
fi
ROOT=$(pwd)
echo "$ROOT"
rm -Rf bin
mkdir bin
BRANCH=${GITHUB_REF##*/}
echo "$BRANCH"
cd "$ROOT/ci"
rm -Rf bin
mkdir bin
# Get the Projucer
cd "$ROOT/ci/bin"
PROJUCER_OS=$OS
if [ "$OS" = "win" ]; then
PROJUCER_OS="windows"
elif [ "$OS" = "mac" ]; then
PROJUCER_OS="osx"
fi
curl -s -S -L "https://api.juce.com/api/v1/download/juce/latest/$PROJUCER_OS" -o Projucer.zip
unzip Projucer.zip
# Set Projucer path based on OS
if [ "$OS" = "mac" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.app/Contents/MacOS/Projucer"
elif [ "$OS" = "linux" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer"
else
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.exe"
fi
# Set global path
GLOBAL_PATH_COMMAND="$PROJUCER_PATH --set-global-search-path $PROJUCER_OS 'defaultJuceModulePath' '$ROOT/ci/bin/JUCE/modules'"
eval "$GLOBAL_PATH_COMMAND"
cd "$ROOT"

48
ci/test.sh 100755
Wyświetl plik

@ -0,0 +1,48 @@
#!/bin/bash -e
PLUGIN="osci-render-test"
# Resave jucer file
RESAVE_COMMAND="$PROJUCER_PATH --resave '$ROOT/$PLUGIN.jucer'"
eval "$RESAVE_COMMAND"
# Build mac version
if [ "$OS" = "mac" ]; then
cd "$ROOT/Builds/Test/MacOSX"
xcodebuild -configuration Release || exit 1
cd "build/Release"
find .
echo "Running the test"
# Run the test
./"$PLUGIN"
fi
# Build linux version
if [ "$OS" = "linux" ]; then
cd "$ROOT/Builds/Test/LinuxMakefile"
make CONFIG=Release
cd build
echo "Running the test"
# Run the test using the binary
xvfb-run -a -s "-screen 0 1280x720x24" ./$PLUGIN
fi
# Build Win version
if [ "$OS" = "win" ]; then
VS_WHERE="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
MSBUILD_EXE=$("$VS_WHERE" -latest -requires Microsoft.Component.MSBuild -find "MSBuild\**\Bin\MSBuild.exe")
echo $MSBUILD_EXE
cd "$ROOT/Builds/Test/VisualStudio2022"
"$MSBUILD_EXE" "$PLUGIN.sln" "//p:VisualStudioVersion=16.0" "//m" "//t:Build" "//p:Configuration=Release" "//p:Platform=x64" "//p:PreferredToolArchitecture=x64"
cd "x64/Release/ConsoleApp"
echo "Running the test"
ls
# Run the test using the .exe file
./osci-render-test.exe
fi
cd "$ROOT"

Wyświetl plik

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="Dt5Xh7" name="osci-render-test" projectType="consoleapp"
useAppConfig="0" addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1">
<MAINGROUP id="ztPpnM" name="osci-render-test">
<GROUP id="{4373FA2A-1E20-AAA6-40E0-740C13D88B75}" name="Source">
<GROUP id="{9D1E8A66-A99C-4333-3CF8-A86432FE09A7}" name="obj">
<FILE id="V3Q6n2" name="Frustum.cpp" compile="1" resource="0" file="Source/obj/Frustum.cpp"/>
<FILE id="m9wauB" name="Frustum.h" compile="0" resource="0" file="Source/obj/Frustum.h"/>
</GROUP>
<GROUP id="{2FFB1E70-C58F-FC28-4D59-AF861B331B54}" name="shape">
<FILE id="J5Nnzj" name="CircleArc.cpp" compile="1" resource="0" file="Source/shape/CircleArc.cpp"/>
<FILE id="oNmrlE" name="CircleArc.h" compile="0" resource="0" file="Source/shape/CircleArc.h"/>
<FILE id="u8e3mP" name="CubicBezierCurve.cpp" compile="1" resource="0"
file="Source/shape/CubicBezierCurve.cpp"/>
<FILE id="aJoApp" name="CubicBezierCurve.h" compile="0" resource="0"
file="Source/shape/CubicBezierCurve.h"/>
<FILE id="bbtKzH" name="Line.cpp" compile="1" resource="0" file="Source/shape/Line.cpp"/>
<FILE id="Q4bPoy" name="Line.h" compile="0" resource="0" file="Source/shape/Line.h"/>
<FILE id="tZJGSA" name="Point.cpp" compile="1" resource="0" file="Source/shape/Point.cpp"/>
<FILE id="LaJfn7" name="Point.h" compile="0" resource="0" file="Source/shape/Point.h"/>
<FILE id="sRz2K2" name="QuadraticBezierCurve.cpp" compile="1" resource="0"
file="Source/shape/QuadraticBezierCurve.cpp"/>
<FILE id="DB78dq" name="QuadraticBezierCurve.h" compile="0" resource="0"
file="Source/shape/QuadraticBezierCurve.h"/>
<FILE id="NrZ4bk" name="Shape.cpp" compile="1" resource="0" file="Source/shape/Shape.cpp"/>
<FILE id="QmxyPg" name="Shape.h" compile="0" resource="0" file="Source/shape/Shape.h"/>
</GROUP>
<FILE id="bQ1rDR" name="TestMain.cpp" compile="1" resource="0" file="Source/TestMain.cpp"/>
</GROUP>
</MAINGROUP>
<MODULES>
<MODULE id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
<MODULE id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="1"/>
</MODULES>
<JUCEOPTIONS JUCE_STRICT_REFCOUNTEDPOINTER="1"/>
<EXPORTFORMATS>
<LINUX_MAKE targetFolder="Builds/Test/LinuxMakefile">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug" targetName="osci-render-test"/>
<CONFIGURATION isDebug="0" name="Release" targetName="osci-render-test"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_events" path="../../../JUCE/modules"/>
</MODULEPATHS>
</LINUX_MAKE>
<VS2022 targetFolder="Builds/Test/VisualStudio2022">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug" targetName="osci-render-test"/>
<CONFIGURATION isDebug="0" name="Release" targetName="osci-render-test"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_events" path="../../../JUCE/modules"/>
</MODULEPATHS>
</VS2022>
<XCODE_MAC targetFolder="Builds/Test/MacOSX">
<CONFIGURATIONS>
<CONFIGURATION isDebug="1" name="Debug" targetName="osci-render-test"/>
<CONFIGURATION isDebug="0" name="Release" targetName="osci-render-test"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_core" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_data_structures" path="../../../JUCE/modules"/>
<MODULEPATH id="juce_events" path="../../../JUCE/modules"/>
</MODULEPATHS>
</XCODE_MAC>
</EXPORTFORMATS>
</JUCERPROJECT>