Skip to content

Commit

Permalink
Auto build update (#366)
Browse files Browse the repository at this point in the history
* - cherry picked logic server fix into master

* added status badges [no-ci]

* - cleaned up unit tests && added run_unit_test commandline tool

* - removed annoying SNEX test files
- added unit test compilation to CI export
- added build_ci.bat script

* - fixed some compile-time routing matrix classes

* - update build script

* - update macOS build script

Co-authored-by: Christoph Hart <[email protected]>
  • Loading branch information
christoph-hart and Christoph Hart authored Oct 25, 2022
1 parent cf4d6c1 commit 03a8568
Show file tree
Hide file tree
Showing 28 changed files with 270 additions and 689 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

![](http://hise.audio/images/github.png)

**Build Status macOS:**
[![build_hise_macos](https://github.com/christophhart/HISE/actions/workflows/build_hise_macos.yml/badge.svg)](https://github.com/christophhart/HISE/actions/workflows/build_hise_macos.yml)

**Build Status Windows:**
[![build_hise](https://github.com/christophhart/HISE/actions/workflows/build_hise.yml/badge.svg)](https://github.com/christophhart/HISE/actions/workflows/build_hise.yml)

**The open source framework for sample based instruments.**

Expand Down
6 changes: 4 additions & 2 deletions hi_backend/snex_workbench/WorkbenchProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,13 +843,15 @@ void DspNetworkCompileExporter::writeDebugFileAndShowSolution()

auto isUsingVs2017 = HelperClasses::isUsingVisualStudio2017(settings);

auto vsString = isUsingVs2017 ? "VisualStudio2017" : "VisualStudio2022";
auto vsVersion = isUsingVs2017 ? "15.0" : "17.0";


auto currentExecutable = File::getSpecialLocation(File::currentExecutableFile);


#if JUCE_WINDOWS
auto vsString = isUsingVs2017 ? "VisualStudio2017" : "VisualStudio2022";
auto vsVersion = isUsingVs2017 ? "15.0" : "17.0";

debugExecutable = debugExecutable.getChildFile(vsString).getChildFile("x64/Debug/App/HISE Debug.exe");

// If this hits, then you have a mismatch between VS2022 and VS2017...
Expand Down
10 changes: 0 additions & 10 deletions hi_core/hi_core/StandaloneProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,7 @@ StandaloneProcessor::StandaloneProcessor()



#if HI_RUN_UNIT_TESTS

UnitTestRunner runner;

runner.setAssertOnFailure(false);

runner.runAllTests();



#endif


LOG_START("Create Main Processor");
Expand Down
6 changes: 2 additions & 4 deletions hi_dsp_library/dsp_nodes/RoutingNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,9 @@ struct matrix_helpers
break;
case SpecialType::LeftToRight:
FloatVectorOperations::copy(ptrs[1], ptrs[0], d.getNumSamples());
FloatVectorOperations::clear(ptrs[0], d.getNumSamples());
break;
case SpecialType::RightToLeft:
FloatVectorOperations::copy(ptrs[0], ptrs[1], d.getNumSamples());
FloatVectorOperations::clear(ptrs[1], d.getNumSamples());
break;
case SpecialType::SwapChannels:
{
Expand All @@ -641,9 +639,9 @@ struct matrix_helpers
constexpr int r = MatrixType::getChannel(1);

if constexpr (l == 0 && r == 0)
return SpecialType::RightToLeft;
else if constexpr (l == 1 && r == 1)
return SpecialType::LeftToRight;
else if constexpr (l == 1 && r == 1)
return SpecialType::RightToLeft;
else if constexpr (l == 0 && r == -1)
return SpecialType::LeftOnly;
else if constexpr (l == -1 && r == 1)
Expand Down
154 changes: 0 additions & 154 deletions hi_modules/synthesisers/synths/NoiseSynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,157 +65,6 @@ void NoiseVoice::calculateBlock(int startSample, int numSamples)
const int startIndex = startSample;
const int samplesToCopy = numSamples;

#if HI_RUN_UNIT_TESTS

auto signalType = static_cast<NoiseSynth*>(getOwnerSynth())->getTestSignal();

switch (signalType)
{
case hise::NoiseSynth::Normal:
{
while (--numSamples >= 0)
{
const float currentSample = getNextValue();

// Stereo mode assumed
voiceBuffer.setSample(0, startSample, currentSample);

voiceUptime += uptimeDelta;

++startSample;
}
break;
}
case hise::NoiseSynth::DC:
{
FloatVectorOperations::fill(voiceBuffer.getWritePointer(0, startSample), 1.0f, samplesToCopy);
break;
}

case hise::NoiseSynth::Ramp:
{
while (--numSamples >= 0)
{
const float delta1 = 1.0f / (float)INT16_MAX;
const float uptimeToUse = (float)((int)voiceUptime % INT16_MAX);
const float value = uptimeToUse * delta1;

voiceBuffer.setSample(0, startSample, value);

voiceUptime += uptimeDelta;
++startSample;
}

break;
}
case hise::NoiseSynth::DiracTrain:
{
if (auto voicePitchValues = getOwnerSynth()->getPitchValuesForVoice())
{
voicePitchValues += startSample;

while (--numSamples >= 0)
{
if (voiceUptime == 0.0 && lastUptime == -1.0)
voiceBuffer.setSample(0, startSample, -1.0f);
else if (voiceUptime >= 256.0)
{
voiceUptime -= 256.0;
voiceBuffer.setSample(0, startSample, 1.0f);
}
else
voiceBuffer.setSample(0, startSample, 0.0f);

voiceUptime += uptimeDelta * *voicePitchValues++;
lastUptime = voiceUptime;
++startSample;
}
}
else
{
while (--numSamples >= 0)
{
if (voiceUptime == 0.0)
voiceBuffer.setSample(0, startSample, -1.0f);
else if (voiceUptime >= 256.0)
{
voiceUptime -= 256.0;
voiceBuffer.setSample(0, startSample, 1.0f);
}
else
voiceBuffer.setSample(0, startSample, 0.0f);

voiceUptime += uptimeDelta;
lastUptime = voiceUptime;
++startSample;
}
}



break;
}
case hise::NoiseSynth::Square:
{
if (auto voicePitchValues = getOwnerSynth()->getPitchValuesForVoice())
{
voicePitchValues += startSample;


while (--numSamples >= 0)
{
voiceUptime += uptimeDelta * *voicePitchValues++;

auto prevUptime = (int)(voiceUptime / 128.0);

if (prevUptime % 2 == 0)
{
voiceUptime -= 256.0;
voiceBuffer.setSample(0, startSample, 1.0f);
}
else
{
voiceBuffer.setSample(0, startSample, -1.0f);
}

++startSample;
}
}
else
{
while (--numSamples >= 0)
{
voiceUptime += uptimeDelta;

auto prevUptime = (int)(voiceUptime / 128.0);

if (prevUptime % 2 == 0)
{
voiceUptime -= 256.0;
voiceBuffer.setSample(0, startSample, 1.0f);
}
else
{
voiceBuffer.setSample(0, startSample, -1.0f);
}

++startSample;
}

}


break;
}

case hise::NoiseSynth::numTestSignals:
break;
default:
break;
}

#else

while (--numSamples >= 0)
{
const float currentSample = getNextValue();
Expand All @@ -228,9 +77,6 @@ void NoiseVoice::calculateBlock(int startSample, int numSamples)
++startSample;
}


#endif

if (auto modValues = getOwnerSynth()->getVoiceGainValues())
{
FloatVectorOperations::multiply(voiceBuffer.getWritePointer(0, startIndex), modValues + startIndex, samplesToCopy);
Expand Down
11 changes: 5 additions & 6 deletions hi_scripting/scripting/api/DspUnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#if HI_RUN_UNIT_TESTS

#include "JuceHeader.h"
#include <ipp.h>

using namespace hise;

Expand Down Expand Up @@ -206,8 +205,8 @@ class DspUnitTests : public UnitTest

Array<var> channels;

channels.add(var(lData));
channels.add(var(rData));
channels.add(var(lData.get()));
channels.add(var(rData.get()));

try
{
Expand Down Expand Up @@ -390,7 +389,7 @@ class ModulationTests : public UnitTest

// Setup

auto effect = Helpers::addVoiceEffectToOptionalGroup<StereoEffect>(bp);
Helpers::addVoiceEffectToOptionalGroup<StereoEffect>(bp);

auto lfo = Helpers::addTimeModulator<StereoEffect, LfoModulator>(bp, 0);

Expand Down Expand Up @@ -900,8 +899,8 @@ class ModulationTests : public UnitTest
squareLFO->setAttribute(LfoModulator::Parameters::FadeIn, 0.0f, dontSendNotification);
seqLFO->setAttribute(LfoModulator::Parameters::FadeIn, 0.0f, dontSendNotification);

seqLFO->getSliderPackData(0)->setNumSliders(2);
seqLFO->getSliderPackData(0)->setValue(1, 0.0f, dontSendNotification);
seqLFO->getSliderPack(0)->setNumSliders(2);
seqLFO->getSliderPack(0)->setValue(1, 0.0f, dontSendNotification);

// Process
squareLFO->setBypassed(true);
Expand Down
2 changes: 1 addition & 1 deletion hi_scripting/scripting/api/GlobalServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ struct GlobalServer: public ControlledObject
}

private:

#if USE_BACKEND
bool initialised = true;
#else
Expand Down
Loading

0 comments on commit 03a8568

Please sign in to comment.