Commitok összehasonlítása
3 Commit-ok
| Szerző | SHA1 | Dátum | |
|---|---|---|---|
|
|
8652740bcf | ||
|
|
def8dd4d98 | ||
|
|
35cf01a163 |
116
.gitea/workflows/build.yml
Normal file
116
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
name: Build InstaLPEQ
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
tags: ['v*']
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
env:
|
||||||
|
PLUGIN_NAME: InstaLPEQ
|
||||||
|
GITEA_URL: https://1git.eu
|
||||||
|
GITEA_REPO: hariel/InstaLPEQ
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y build-essential cmake git pkg-config \
|
||||||
|
libasound2-dev libfreetype6-dev libx11-dev libxrandr-dev \
|
||||||
|
libxcursor-dev libxinerama-dev libwebkit2gtk-4.1-dev \
|
||||||
|
libcurl4-openssl-dev zip curl
|
||||||
|
|
||||||
|
- name: Clone JUCE
|
||||||
|
run: git clone --depth 1 https://github.com/juce-framework/JUCE.git ../JUCE
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
- name: Build Release
|
||||||
|
run: cmake --build build --config Release --parallel $(nproc)
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
cd build/${PLUGIN_NAME}_artefacts/Release
|
||||||
|
zip -r ${GITHUB_WORKSPACE}/${PLUGIN_NAME}-VST3-Linux-x64.zip VST3/${PLUGIN_NAME}.vst3
|
||||||
|
cd ${GITHUB_WORKSPACE}
|
||||||
|
[ -f "build/${PLUGIN_NAME}_artefacts/Release/Standalone/${PLUGIN_NAME}" ] && zip -j ${PLUGIN_NAME}-Standalone-Linux-x64.zip build/${PLUGIN_NAME}_artefacts/Release/Standalone/${PLUGIN_NAME} || true
|
||||||
|
|
||||||
|
- name: Upload to Gitea Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
|
# Find existing release or create new one
|
||||||
|
RELEASE_ID=$(curl -s "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases/tags/${TAG}" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
| python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))" 2>/dev/null)
|
||||||
|
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "None" ] || [ "$RELEASE_ID" = "" ]; then
|
||||||
|
RELEASE_ID=$(curl -s -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${TAG}\", \"body\": \"${PLUGIN_NAME} ${TAG}\"}" \
|
||||||
|
| python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))")
|
||||||
|
fi
|
||||||
|
echo "Release ID: $RELEASE_ID"
|
||||||
|
# Upload assets
|
||||||
|
for f in ${PLUGIN_NAME}-*-Linux-*.zip; do
|
||||||
|
echo "Uploading $f..."
|
||||||
|
curl -s -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=$(basename $f)" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary "@$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Clone JUCE
|
||||||
|
run: git clone --depth 1 https://github.com/juce-framework/JUCE.git ../JUCE || true
|
||||||
|
|
||||||
|
- name: Configure CMake (Universal)
|
||||||
|
run: cmake -B build -G Xcode -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
|
||||||
|
|
||||||
|
- name: Build Release
|
||||||
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
cd build/${PLUGIN_NAME}_artefacts/Release
|
||||||
|
zip -r ${GITHUB_WORKSPACE}/${PLUGIN_NAME}-VST3-macOS.zip VST3/${PLUGIN_NAME}.vst3
|
||||||
|
[ -d "AU/${PLUGIN_NAME}.component" ] && zip -r ${GITHUB_WORKSPACE}/${PLUGIN_NAME}-AU-macOS.zip AU/${PLUGIN_NAME}.component || true
|
||||||
|
cd ${GITHUB_WORKSPACE}
|
||||||
|
[ -d "build/${PLUGIN_NAME}_artefacts/Release/Standalone" ] && zip -r ${PLUGIN_NAME}-Standalone-macOS.zip build/${PLUGIN_NAME}_artefacts/Release/Standalone/${PLUGIN_NAME}.app || true
|
||||||
|
|
||||||
|
- name: Upload to Gitea Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
|
# Get release ID (created by linux job)
|
||||||
|
RELEASE_ID=$(curl -s "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases/tags/${TAG}" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
| python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))")
|
||||||
|
# If release doesn't exist yet, create it
|
||||||
|
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "None" ]; then
|
||||||
|
RELEASE_ID=$(curl -s -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${TAG}\", \"body\": \"${PLUGIN_NAME} ${TAG}\"}" \
|
||||||
|
| python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))")
|
||||||
|
fi
|
||||||
|
# Upload assets
|
||||||
|
for f in ${PLUGIN_NAME}-*-macOS*.zip; do
|
||||||
|
curl -s -X POST "${GITEA_URL}/api/v1/repos/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=$(basename $f)" \
|
||||||
|
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary "@$f"
|
||||||
|
done
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.22)
|
cmake_minimum_required(VERSION 3.22)
|
||||||
project(InstaLPEQ VERSION 1.3.0)
|
project(InstaLPEQ VERSION 1.3.2)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|||||||
@@ -192,20 +192,41 @@ juce::AudioBuffer<float> FIREngine::generateFIR (const std::vector<EQBand>& band
|
|||||||
|
|
||||||
// Extract actual magnitude from FFT result
|
// Extract actual magnitude from FFT result
|
||||||
// Format: [DC_real, Nyquist_real, bin1_real, bin1_imag, bin2_real, bin2_imag, ...]
|
// Format: [DC_real, Nyquist_real, bin1_real, bin1_imag, bin2_real, bin2_imag, ...]
|
||||||
|
// Evaluate at log-spaced frequencies (equal weight per octave)
|
||||||
|
// This matches musical content much better than linear spacing
|
||||||
|
// (linear gives 77% weight to 5k-22k where music has little energy)
|
||||||
|
const int numPoints = 512;
|
||||||
double powerSum = 0.0;
|
double powerSum = 0.0;
|
||||||
int count = 0;
|
double binRes = sr / (double) fftSize; // Hz per bin
|
||||||
|
|
||||||
for (int i = 1; i < fftSize / 2; ++i)
|
for (int p = 0; p < numPoints; ++p)
|
||||||
{
|
{
|
||||||
float re = analysisBuf[i * 2];
|
// Log-spaced 20 Hz — 20 kHz
|
||||||
float im = analysisBuf[i * 2 + 1];
|
double freq = 20.0 * std::pow (1000.0, (double) p / (double) (numPoints - 1));
|
||||||
powerSum += (double) (re * re + im * im);
|
|
||||||
count++;
|
// Interpolate magnitude from FFT bins
|
||||||
|
double binFloat = freq / binRes;
|
||||||
|
int bin = (int) binFloat;
|
||||||
|
double frac = binFloat - (double) bin;
|
||||||
|
|
||||||
|
if (bin < 1 || bin >= fftSize / 2 - 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
float re0 = analysisBuf[bin * 2];
|
||||||
|
float im0 = analysisBuf[bin * 2 + 1];
|
||||||
|
float re1 = analysisBuf[(bin + 1) * 2];
|
||||||
|
float im1 = analysisBuf[(bin + 1) * 2 + 1];
|
||||||
|
|
||||||
|
double mag0 = std::sqrt ((double) (re0 * re0 + im0 * im0));
|
||||||
|
double mag1 = std::sqrt ((double) (re1 * re1 + im1 * im1));
|
||||||
|
double mag = mag0 * (1.0 - frac) + mag1 * frac;
|
||||||
|
|
||||||
|
powerSum += mag * mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count > 0)
|
if (numPoints > 0)
|
||||||
{
|
{
|
||||||
double avgPower = powerSum / (double) count;
|
double avgPower = powerSum / (double) numPoints;
|
||||||
float rmsGain = (float) std::sqrt (avgPower);
|
float rmsGain = (float) std::sqrt (avgPower);
|
||||||
float makeupDb = -20.0f * std::log10 (std::max (rmsGain, 1e-10f));
|
float makeupDb = -20.0f * std::log10 (std::max (rmsGain, 1e-10f));
|
||||||
autoMakeupDb.store (makeupDb);
|
autoMakeupDb.store (makeupDb);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ private:
|
|||||||
NodeParameterPanel nodePanel;
|
NodeParameterPanel nodePanel;
|
||||||
|
|
||||||
juce::Label titleLabel { {}, "INSTALPEQ" };
|
juce::Label titleLabel { {}, "INSTALPEQ" };
|
||||||
juce::Label versionLabel { {}, "v1.3.0" };
|
juce::Label versionLabel { {}, "v1.3.2" };
|
||||||
juce::ToggleButton bypassToggle;
|
juce::ToggleButton bypassToggle;
|
||||||
juce::Label bypassLabel { {}, "BYPASS" };
|
juce::Label bypassLabel { {}, "BYPASS" };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user