iOS core: Morph Pad, Wavetable and Grain Cloud ported, bit-exact with Kotlin
Ported by parallel agents against reference renders. The export now records Kotlin's global voice-seed counters and every factory wavetable's data, and adds Sampler/SF2 scenarios (not ported yet). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bf5f2b53af
commit
8d85b14a67
@@ -0,0 +1,35 @@
|
||||
// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// The reference-test maker for kind "WAVE" (see TestVoice.hpp, IosGoldenInstruments.kt):
|
||||
// WaveVoice alone, patch from the slot, factory tables built up front.
|
||||
|
||||
#include <memory>
|
||||
#include "sizzle/TestVoice.hpp"
|
||||
#include "WaveTables.hpp"
|
||||
#include "WaveVoice.hpp"
|
||||
|
||||
namespace sizzle {
|
||||
namespace {
|
||||
|
||||
class WaveTestVoice final : public TestVoice {
|
||||
public:
|
||||
explicit WaveTestVoice(const TestVoiceSetup &s)
|
||||
: voice_(s.sampleRate), patch_(wavetable::WavePatch::from(s.params, s.tempoBpm)) {}
|
||||
void noteOn(int midi, int velocity) override { voice_.noteOn(midi, (float)velocity / 127.f, patch_); }
|
||||
void noteOff(int) override { voice_.noteOff(); }
|
||||
float render() override { return voice_.render(); }
|
||||
|
||||
private:
|
||||
wavetable::WaveVoice voice_;
|
||||
wavetable::WavePatch patch_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<TestVoice> makeWaveTestVoice(const TestVoiceSetup &setup) {
|
||||
wavetable::WaveTables::prewarmBlocking();
|
||||
return std::make_unique<WaveTestVoice>(setup);
|
||||
}
|
||||
|
||||
} // namespace sizzle
|
||||
Reference in New Issue
Block a user