Showing preview only (4,722K chars total). Download the full file or copy to clipboard to get everything.
Repository: eh2k/squares-and-circles
Branch: main
Commit: 410eddc485f8
Files: 465
Total size: 4.4 MB
Directory structure:
gitextract_pmlbt8sa/
├── .clangd
├── .github/
│ └── workflows/
│ └── build.yml
├── .gitignore
├── .gitmodules
├── README.md
├── app/
│ ├── SEQ/
│ │ └── patterns_303.h
│ ├── index.json
│ ├── squares-and-circles-loader.sha
│ └── upload.py
├── doc/
│ ├── .conv.sh
│ ├── .screenshots.py
│ └── output-routing.xml
├── lib/
│ ├── .fetch_deps.py
│ ├── MoogLadders/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── src/
│ │ ├── Filters.h
│ │ ├── HuovilainenModel.h
│ │ ├── ImprovedModel.h
│ │ ├── KrajeskiModel.h
│ │ ├── LadderFilterBase.h
│ │ ├── MicrotrackerModel.h
│ │ ├── MusicDSPModel.h
│ │ ├── NoiseGenerator.h
│ │ ├── OberheimVariationModel.h
│ │ ├── RKSimulationModel.h
│ │ ├── SimplifiedModel.h
│ │ ├── StilsonModel.h
│ │ └── Util.h
│ ├── SAM/
│ │ ├── README.md
│ │ ├── ReciterTabs.h
│ │ ├── RenderTabs.h
│ │ ├── SamTabs.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── reciter.c
│ │ ├── reciter.h
│ │ ├── render.c
│ │ ├── render.h
│ │ ├── sam.c
│ │ └── sam.h
│ ├── bbd/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bbd_filter.cc
│ │ ├── bbd_filter.h
│ │ ├── bbd_line.cc
│ │ └── bbd_line.h
│ ├── braids/
│ │ ├── README.md
│ │ ├── analog_oscillator.cc
│ │ ├── analog_oscillator.h
│ │ ├── chords_stack.cc
│ │ ├── digital_oscillator.cc
│ │ ├── digital_oscillator.h
│ │ ├── envelope.h
│ │ ├── excitation.h
│ │ ├── macro_oscillator.cc
│ │ ├── macro_oscillator.h
│ │ ├── parameter_interpolation.h
│ │ ├── quantizer.cc
│ │ ├── quantizer.h
│ │ ├── quantizer_scales.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ ├── settings.cc
│ │ ├── settings.h
│ │ ├── svf.h
│ │ └── vco_jitter_source.h
│ ├── claps/
│ │ ├── cp808.h
│ │ └── cp909.h
│ ├── clouds/
│ │ └── dsp/
│ │ └── fx/
│ │ ├── diffuser.h
│ │ ├── fx_engine.h
│ │ ├── pitch_shifter.h
│ │ └── reverb.h
│ ├── drumsynth/
│ │ ├── drumsynth.cpp
│ │ ├── drumsynth.h
│ │ └── drumsynth_claps.h
│ ├── faust/
│ │ ├── build.sh
│ │ ├── djembe.dsp
│ │ ├── djembe.dsp.h
│ │ ├── rev_dattorro.dsp
│ │ ├── rev_dattorro.dsp.h
│ │ └── ui.hxx
│ ├── fft/
│ │ ├── fft4g.c
│ │ └── fft4g.h
│ ├── fv1/
│ │ ├── README.md
│ │ ├── factory.json
│ │ └── spn/
│ │ ├── OEM1_4.spn
│ │ └── dance_ir_h_l.spn
│ ├── marbles/
│ │ ├── note_filter.h
│ │ ├── ramp/
│ │ │ ├── ramp.h
│ │ │ ├── ramp_divider.h
│ │ │ ├── ramp_extractor.cc
│ │ │ ├── ramp_extractor.h
│ │ │ ├── ramp_generator.h
│ │ │ └── slave_ramp.h
│ │ ├── random/
│ │ │ ├── discrete_distribution_quantizer.cc
│ │ │ ├── discrete_distribution_quantizer.h
│ │ │ ├── distributions.h
│ │ │ ├── lag_processor.cc
│ │ │ ├── lag_processor.h
│ │ │ ├── output_channel.cc
│ │ │ ├── output_channel.h
│ │ │ ├── quantizer.cc
│ │ │ ├── quantizer.h
│ │ │ ├── random_generator.h
│ │ │ ├── random_sequence.h
│ │ │ ├── random_stream.h
│ │ │ ├── t_generator.cc
│ │ │ ├── t_generator.h
│ │ │ ├── x_y_generator.cc
│ │ │ └── x_y_generator.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ └── scale_recorder.h
│ ├── misc/
│ │ ├── Biquad.cpp
│ │ ├── Biquad.h
│ │ ├── analyze_fft.hxx
│ │ ├── cubic_spline.hxx
│ │ ├── dspinst.h
│ │ ├── euclidean.h
│ │ ├── nes_noise.hxx
│ │ ├── noise.hxx
│ │ └── patterns_303.h
│ ├── msfa/
│ │ ├── aligned_buf.h
│ │ ├── controllers.h
│ │ ├── doc/
│ │ │ └── origin.url
│ │ ├── dx7note.cc
│ │ ├── dx7note.h
│ │ ├── env.cc
│ │ ├── env.h
│ │ ├── exp2.cc
│ │ ├── exp2.h
│ │ ├── fm_core.cc
│ │ ├── fm_core.h
│ │ ├── fm_op_kernel.cc
│ │ ├── fm_op_kernel.h
│ │ ├── freqlut.cc
│ │ ├── freqlut.h
│ │ ├── lfo.cc
│ │ ├── lfo.h
│ │ ├── midinotes.h
│ │ ├── module.h
│ │ ├── patch.cc
│ │ ├── patch.h
│ │ ├── pitchenv.cc
│ │ ├── pitchenv.h
│ │ ├── porta.cc
│ │ ├── porta.h
│ │ ├── sin.cc
│ │ ├── sin.h
│ │ └── synth.h
│ ├── open303/
│ │ └── src/
│ │ ├── GlobalDefinitions.h
│ │ ├── GlobalFunctions.cpp
│ │ ├── GlobalFunctions.h
│ │ ├── rosic_AnalogEnvelope.cpp
│ │ ├── rosic_AnalogEnvelope.h
│ │ ├── rosic_BiquadFilter.cpp
│ │ ├── rosic_BiquadFilter.h
│ │ ├── rosic_BlendOscillator.cpp
│ │ ├── rosic_BlendOscillator.h
│ │ ├── rosic_DecayEnvelope.cpp
│ │ ├── rosic_DecayEnvelope.h
│ │ ├── rosic_EllipticQuarterBandFilter.cpp
│ │ ├── rosic_EllipticQuarterBandFilter.h
│ │ ├── rosic_FunctionTemplates.cpp
│ │ ├── rosic_FunctionTemplates.h
│ │ ├── rosic_LeakyIntegrator.cpp
│ │ ├── rosic_LeakyIntegrator.h
│ │ ├── rosic_MidiNoteEvent.cpp
│ │ ├── rosic_MidiNoteEvent.h
│ │ ├── rosic_NumberManipulations.cpp
│ │ ├── rosic_NumberManipulations.h
│ │ ├── rosic_OnePoleFilter.cpp
│ │ ├── rosic_OnePoleFilter.h
│ │ ├── rosic_Open303.cpp
│ │ ├── rosic_Open303.h
│ │ ├── rosic_RealFunctions.cpp
│ │ ├── rosic_RealFunctions.h
│ │ ├── rosic_TeeBeeFilter.cpp
│ │ ├── rosic_TeeBeeFilter.h
│ │ ├── sequencer/
│ │ │ ├── rosic_AcidPattern.cpp
│ │ │ ├── rosic_AcidPattern.h
│ │ │ ├── rosic_AcidSequencer.cpp
│ │ │ └── rosic_AcidSequencer.h
│ │ └── wavetable_gen/
│ │ ├── fft4g.h
│ │ ├── rosic_Complex.cpp
│ │ ├── rosic_Complex.h
│ │ ├── rosic_FourierTransformerRadix2.cpp
│ │ ├── rosic_FourierTransformerRadix2.h
│ │ ├── rosic_MipMappedWaveTable.cpp
│ │ └── rosic_MipMappedWaveTable.h
│ ├── peaks/
│ │ ├── drums/
│ │ │ ├── bass_drum.cc
│ │ │ ├── bass_drum.h
│ │ │ ├── excitation.h
│ │ │ ├── fm_drum.cc
│ │ │ ├── fm_drum.h
│ │ │ ├── high_hat.cc
│ │ │ ├── high_hat.h
│ │ │ ├── snare_drum.cc
│ │ │ ├── snare_drum.h
│ │ │ └── svf.h
│ │ ├── gate_processor.h
│ │ ├── modulations/
│ │ │ ├── bouncing_ball.h
│ │ │ ├── lfo.cc
│ │ │ ├── lfo.h
│ │ │ ├── mini_sequencer.h
│ │ │ ├── multistage_envelope.cc
│ │ │ └── multistage_envelope.h
│ │ ├── number_station/
│ │ │ ├── number_station.cc
│ │ │ └── number_station.h
│ │ ├── pulse_processor/
│ │ │ ├── pulse_randomizer.cc
│ │ │ ├── pulse_randomizer.h
│ │ │ ├── pulse_shaper.cc
│ │ │ └── pulse_shaper.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── plaits/
│ │ ├── dsp/
│ │ │ ├── chords/
│ │ │ │ ├── chord_bank.cc
│ │ │ │ └── chord_bank.h
│ │ │ ├── downsampler/
│ │ │ │ └── 4x_downsampler.h
│ │ │ ├── drums/
│ │ │ │ ├── analog_bass_drum.h
│ │ │ │ ├── analog_snare_drum.h
│ │ │ │ ├── hi_hat.h
│ │ │ │ ├── synthetic_bass_drum.h
│ │ │ │ └── synthetic_snare_drum.h
│ │ │ ├── dsp.h
│ │ │ ├── engine/
│ │ │ │ ├── additive_engine.cc
│ │ │ │ ├── additive_engine.h
│ │ │ │ ├── bass_drum_engine.cc
│ │ │ │ ├── bass_drum_engine.h
│ │ │ │ ├── chord_engine.cc
│ │ │ │ ├── chord_engine.h
│ │ │ │ ├── engine.h
│ │ │ │ ├── fm_engine.cc
│ │ │ │ ├── fm_engine.h
│ │ │ │ ├── grain_engine.cc
│ │ │ │ ├── grain_engine.h
│ │ │ │ ├── hi_hat_engine.cc
│ │ │ │ ├── hi_hat_engine.h
│ │ │ │ ├── modal_engine.cc
│ │ │ │ ├── modal_engine.h
│ │ │ │ ├── noise_engine.cc
│ │ │ │ ├── noise_engine.h
│ │ │ │ ├── particle_engine.cc
│ │ │ │ ├── particle_engine.h
│ │ │ │ ├── snare_drum_engine.cc
│ │ │ │ ├── snare_drum_engine.h
│ │ │ │ ├── speech_engine.cc
│ │ │ │ ├── speech_engine.h
│ │ │ │ ├── string_engine.cc
│ │ │ │ ├── string_engine.h
│ │ │ │ ├── swarm_engine.cc
│ │ │ │ ├── swarm_engine.h
│ │ │ │ ├── virtual_analog_engine.cc
│ │ │ │ ├── virtual_analog_engine.h
│ │ │ │ ├── waveshaping_engine.cc
│ │ │ │ ├── waveshaping_engine.h
│ │ │ │ ├── wavetable_engine.cc
│ │ │ │ └── wavetable_engine.h
│ │ │ ├── engine2/
│ │ │ │ ├── arpeggiator.h
│ │ │ │ ├── chiptune_engine.cc
│ │ │ │ ├── chiptune_engine.h
│ │ │ │ ├── phase_distortion_engine.cc
│ │ │ │ ├── phase_distortion_engine.h
│ │ │ │ ├── six_op_engine.cc
│ │ │ │ ├── six_op_engine.h
│ │ │ │ ├── string_machine_engine.cc
│ │ │ │ ├── string_machine_engine.h
│ │ │ │ ├── virtual_analog_vcf_engine.cc
│ │ │ │ ├── virtual_analog_vcf_engine.h
│ │ │ │ ├── wave_terrain_engine.cc
│ │ │ │ └── wave_terrain_engine.h
│ │ │ ├── envelope.h
│ │ │ ├── fm/
│ │ │ │ ├── algorithms.cc
│ │ │ │ ├── algorithms.h
│ │ │ │ ├── dx_units.cc
│ │ │ │ ├── dx_units.h
│ │ │ │ ├── envelope.h
│ │ │ │ ├── lfo.h
│ │ │ │ ├── operator.h
│ │ │ │ ├── patch.h
│ │ │ │ └── voice.h
│ │ │ ├── fx/
│ │ │ │ ├── diffuser.h
│ │ │ │ ├── ensemble.h
│ │ │ │ ├── fx_engine.h
│ │ │ │ ├── low_pass_gate.h
│ │ │ │ ├── overdrive.h
│ │ │ │ └── sample_rate_reducer.h
│ │ │ ├── noise/
│ │ │ │ ├── clocked_noise.h
│ │ │ │ ├── dust.h
│ │ │ │ ├── fractal_random_generator.h
│ │ │ │ ├── particle.h
│ │ │ │ └── smooth_random_generator.h
│ │ │ ├── oscillator/
│ │ │ │ ├── formant_oscillator.h
│ │ │ │ ├── grainlet_oscillator.h
│ │ │ │ ├── harmonic_oscillator.h
│ │ │ │ ├── nes_triangle_oscillator.h
│ │ │ │ ├── oscillator.h
│ │ │ │ ├── sine_oscillator.h
│ │ │ │ ├── string_synth_oscillator.h
│ │ │ │ ├── super_square_oscillator.h
│ │ │ │ ├── variable_saw_oscillator.h
│ │ │ │ ├── variable_shape_oscillator.h
│ │ │ │ ├── vosim_oscillator.h
│ │ │ │ ├── wavetable_oscillator.h
│ │ │ │ └── z_oscillator.h
│ │ │ ├── physical_modelling/
│ │ │ │ ├── delay_line.h
│ │ │ │ ├── modal_voice.cc
│ │ │ │ ├── modal_voice.h
│ │ │ │ ├── resonator.cc
│ │ │ │ ├── resonator.h
│ │ │ │ ├── string.cc
│ │ │ │ ├── string.h
│ │ │ │ ├── string_voice.cc
│ │ │ │ └── string_voice.h
│ │ │ ├── speech/
│ │ │ │ ├── lpc_speech_synth.cc
│ │ │ │ ├── lpc_speech_synth.h
│ │ │ │ ├── lpc_speech_synth_controller.cc
│ │ │ │ ├── lpc_speech_synth_controller.h
│ │ │ │ ├── lpc_speech_synth_phonemes.cc
│ │ │ │ ├── lpc_speech_synth_words.cc
│ │ │ │ ├── lpc_speech_synth_words.h
│ │ │ │ ├── naive_speech_synth.cc
│ │ │ │ ├── naive_speech_synth.h
│ │ │ │ ├── sam_speech_synth.cc
│ │ │ │ └── sam_speech_synth.h
│ │ │ ├── voice.cc
│ │ │ └── voice.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── rings/
│ │ ├── dsp/
│ │ │ ├── dsp.h
│ │ │ ├── fm_voice.cc
│ │ │ ├── fm_voice.h
│ │ │ ├── follower.h
│ │ │ ├── fx/
│ │ │ │ ├── chorus.h
│ │ │ │ ├── ensemble.h
│ │ │ │ ├── fx_engine.h
│ │ │ │ └── reverb.h
│ │ │ ├── limiter.h
│ │ │ ├── note_filter.h
│ │ │ ├── onset_detector.h
│ │ │ ├── part.cc
│ │ │ ├── part.h
│ │ │ ├── patch.h
│ │ │ ├── performance_state.h
│ │ │ ├── plucker.h
│ │ │ ├── resonator.cc
│ │ │ ├── resonator.h
│ │ │ ├── string.cc
│ │ │ ├── string.h
│ │ │ ├── string_synth_envelope.h
│ │ │ ├── string_synth_oscillator.h
│ │ │ ├── string_synth_part.cc
│ │ │ ├── string_synth_part.h
│ │ │ ├── string_synth_voice.h
│ │ │ └── strummer.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── soundpipe/
│ │ ├── revsc.c
│ │ ├── revsc.h
│ │ ├── soundpipe.c
│ │ └── soundpipe.h
│ ├── stmlib/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── algorithms/
│ │ │ ├── note_stack.h
│ │ │ ├── pattern_predictor.h
│ │ │ ├── tiny_map.h
│ │ │ └── voice_allocator.h
│ │ ├── dsp/
│ │ │ ├── atan.cc
│ │ │ ├── atan.h
│ │ │ ├── atan_approximations.py
│ │ │ ├── cosine_oscillator.h
│ │ │ ├── delay_line.h
│ │ │ ├── dsp.h
│ │ │ ├── filter.h
│ │ │ ├── hysteresis_filter.h
│ │ │ ├── hysteresis_quantizer.h
│ │ │ ├── limiter.h
│ │ │ ├── parameter_interpolator.h
│ │ │ ├── polyblep.h
│ │ │ ├── rsqrt.h
│ │ │ ├── sample_rate_converter.h
│ │ │ ├── units.cc
│ │ │ └── units.h
│ │ ├── makefile.inc
│ │ ├── midi/
│ │ │ └── midi.h
│ │ ├── stmlib.h
│ │ └── utils/
│ │ ├── buffer_allocator.h
│ │ ├── crc32.h
│ │ ├── dsp.h
│ │ ├── gate_flags.h
│ │ ├── murmurhash3.h
│ │ ├── random.cc
│ │ ├── random.h
│ │ ├── ring_buffer.h
│ │ └── stream_buffer.h
│ ├── streams/
│ │ ├── audio_cv_meter.h
│ │ ├── compressor.cc
│ │ ├── compressor.h
│ │ ├── envelope.cc
│ │ ├── envelope.h
│ │ ├── filter_controller.h
│ │ ├── follower.cc
│ │ ├── follower.h
│ │ ├── gain.h
│ │ ├── lorenz_generator.cc
│ │ ├── lorenz_generator.h
│ │ ├── meta_parameters.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ ├── svf.cc
│ │ ├── svf.h
│ │ ├── vactrol.cc
│ │ └── vactrol.h
│ └── xz_lzma2/
│ ├── xz.h
│ ├── xz_config.h
│ ├── xz_dec_lzma2.c
│ ├── xz_lzma2.h
│ └── xz_private.h
├── src/
│ ├── CV/
│ │ ├── EnvFollower.cpp
│ │ ├── EnvGen.cpp
│ │ ├── LFO.cpp
│ │ └── V_OCT.cpp
│ ├── DRUMS/
│ │ ├── 808ish-BD.cpp
│ │ ├── 808ish-HiHat.cpp
│ │ ├── 808ish-SD.cpp
│ │ ├── Claps.cpp
│ │ ├── Djembe.cpp
│ │ ├── DrumSynth.cpp
│ │ ├── FM-Drum.cpp
│ │ ├── RZ-1.cpp
│ │ ├── TR707.cpp
│ │ └── TR909-HiHat.cpp
│ ├── FILTER/
│ │ ├── MoogLadder.cpp
│ │ ├── SVF.cpp
│ │ └── TeeBee.cpp
│ ├── FX/
│ │ ├── Delay.cpp
│ │ ├── JU60_chorus.cpp
│ │ ├── Rev-Dattorro.cpp
│ │ ├── Reverb.cpp
│ │ └── ReverbSC.cpp
│ ├── GND/
│ │ ├── FFT.cpp
│ │ └── Scope.cpp
│ ├── M-OSC/
│ │ └── Waveforms.cpp
│ ├── MIDI/
│ │ ├── Clock.cpp
│ │ ├── Monitor.cpp
│ │ └── VAx6.cpp
│ ├── NOISE/
│ │ ├── 808_squares.cpp
│ │ ├── NES.cpp
│ │ └── WhitePink.cpp
│ ├── SEQ/
│ │ ├── 303-Patterns.cpp
│ │ ├── EuclidArp.cpp
│ │ ├── EuclidRythm.cpp
│ │ └── TuringMachine.cpp
│ ├── SPEECH/
│ │ ├── LPC.cpp
│ │ └── SAM.cpp
│ ├── SYNTH/
│ │ ├── DxFM.cpp
│ │ ├── Open303.cpp
│ │ ├── Resonator.cpp
│ │ └── plaits.cpp
│ ├── build.sh
│ ├── dump.py
│ ├── squares-and-circles-api.h
│ ├── test.cxx
│ └── test.sh
└── test/
└── test_midi.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .clangd
================================================
Diagnostics:
Suppress:
- "xunused-includes"
- "xasm_invalid_output_constraint"
CompileFlags:
Add:
- "-I./"
- "-I./lib/"
================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
- name: build
run: |
git submodule update --init
bash -ex ./src/build.sh --rebuild
- name: deploy
run: |
git remote add --mirror=fetch secondary https://${{ secrets.CODEBERG_AUTH }}@codeberg.org/eh2k/squares-and-circles.git
git fetch origin
git push secondary --all --force
================================================
FILE: .gitignore
================================================
.pio
.vscode
.test
*.elf
*.log
*.txt
*.bin.h
src/__pycache__/app_hex.cpython-310.pyc
.build/
.venv/
================================================
FILE: .gitmodules
================================================
[submodule "lib/udynlink"]
path = lib/udynlink
url = https://github.com/eh2k/udynlink.git
================================================
FILE: README.md
================================================
> Feedback welcome: Feel free to leave a message or any hints in the ["General Feedback"](https://github.com/eh2k/squares-and-circles/issues/1) issue.
# □︎●︎ [](https://eh2k.github.io/□●/flash/?firmware) [](https://www.modulargrid.net/e/modules/browser?SearchName=squares+and+circles&SearchShowothers=1)
<!-- ⧉⦾ ⧇ ⟥⧂ -->
**squares-and-circles** is an alternate firmware for the Eurorack module Ornament & Crime (O_C), specifically targeting the Teensy 4.0.
> <a href="CHANGELOG.txt">CHANGELOG.txt</a>
## ■ Demos
| [](https://www.youtube.com/watch?v=WQj3YqGpxRU) | [](https://youtu.be/QdlwETEaE3A) | [](https://youtu.be/lb-pbm1ddRw) | [](https://youtu.be/J1vmVwwdVU4)
|--|--|--|--|
## Acknowledgments & Credits
Thanks to the creators of ornament & crime (o_C) and PJRC for the Teensy, and all those who have worked on the [code and algorithms](https://github.com/eh2k/squares-and-circles/wiki/credits) that are reused here, especially Mutable Instruments.
They served a great source of learning and provided a huge playground and the foundation for this project.
## Motivation / Challenge
<img align="right" src="doc/u_oc.png" width=160px />
Given are the following ingredients: Two buttons, two encoders and a 128x64 display. Sixteen I/O ports (4x trigs, 4x cv and 4x dac) and a Cortex-M7.
Damn many possibilities to complicate it. Mono, stereo and then again CV. A tricky task to design a simple UI logic, not get lost in menu diving, and to get as much out of the hardware as possible (work in progress).
## Concept
Similar to the Monomachine and Machinedrum, this device features four fully configurable engine instances. Each instance can be assigned a synthesizer, effects, or sequencer engine, which can be controlled via trigger inputs, CV inputs, or clock signals.
The available engine types include drums, synthesizers, oscillators, sequencers, and audio processors. The hardware ports and the generated output signals can be internally routed to any engine. For example, you can route the mono audio signal from an oscillator engine to a neighboring effects engine with stereo outputs, enabling seamless signal chaining.
* [Short Press [LEFT]/[RIGHT]] scrolls through the 4 machine-tracks.
* [Long press [LEFT]] enters the machine-selection-page.
* [Long press [RIGHT]] enters the menu-page.
* [Long press left or right [ENCODER]] shows the modulation popup
* [Long press [L-ENCODER] + [R-ENCODER]] saves the patch - will be restored at startup
- DEBUG: skip restore - press [RIGHT] button while startup ).
<br/>
<div style="page-break-after: always;"></div>
# Machines <sup>[wiki](https://github.com/eh2k/squares-and-circles/wiki/%E2%96%A1%EF%B8%8E%E2%97%8F%EF%B8%8E-Machines-&-Engines)</sup>
<img align="right" src="doc/menu_engines.png" width=196px />
* [Long press [LEFT]] enters the machine-selection-page.<br/>
* [Short press [R-ENCODER]] loads the selected engine.<br/>
* [Long press [R-ENCODER]] loads the selected engine - extended mode.<br/>
* Load & reset I/O settings
* Load & keep IO settings <img align="right" src="doc/engine_load_resetio.png" width=196px />
* Copy #1-4 (parameter values + modulations + I/O settings)
<br/>
---
###### Screenshots
<img src="doc/engines.png" />
---
## Engines
* **GND**
* `---`
* [Scope](https://github.com/eh2k/squares-and-circles/wiki/Scope)
* [FFT](https://github.com/eh2k/squares-and-circles/wiki/FFT)
* **CV**
* [V_OCT](https://github.com/eh2k/squares-and-circles/wiki/V_OCT)
* [Slew](https://github.com/eh2k/squares-and-circles/wiki/Slew)
* [EnvGen_AD](https://github.com/eh2k/squares-and-circles/wiki/EnvGen_AD)
* [EnvGen_ADSR](https://github.com/eh2k/squares-and-circles/wiki/EnvGen_ADSR)
* [LFO](https://github.com/eh2k/squares-and-circles/wiki/LFO)
* [EnvFollower](https://github.com/eh2k/squares-and-circles/wiki/EnvFollower)
* **Drums**
* [Analog-BD](https://github.com/eh2k/squares-and-circles/wiki/Analog-BD),
* [Analog-SD](https://github.com/eh2k/squares-and-circles/wiki/Analog-SD),
* [Analog-HH](https://github.com/eh2k/squares-and-circles/wiki/Analog-HH),
* [Analog-HH2](https://github.com/eh2k/squares-and-circles/wiki/Analog-HH2),
* [909ish-BD](https://github.com/eh2k/squares-and-circles/wiki/909ish-BD),
* [909ish-SD](https://github.com/eh2k/squares-and-circles/wiki/909ish-SD),
* [TR909-HiHat](https://github.com/eh2k/squares-and-circles/wiki/TR909_HiHats)
* [808ish-BD](https://github.com/eh2k/squares-and-circles/wiki/808ish-BD),
* [808ish-SD](https://github.com/eh2k/squares-and-circles/wiki/808ish-SD),
* [808ish-HiHat](https://github.com/eh2k/squares-and-circles/wiki/808ish-HiHat),
* [TR707](https://github.com/eh2k/squares-and-circles/wiki/TR707),
* [RZ-1](https://github.com/eh2k/squares-and-circles/wiki/RZ-1),
* [FM-Drum](https://github.com/eh2k/squares-and-circles/wiki/FM-Drum)
* [Djembe](https://github.com/eh2k/squares-and-circles/wiki/Djembe)
* [Claps](https://github.com/eh2k/squares-and-circles/wiki/Claps)
* **M-OSC**
* [Waveforms](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)
* [Virt.Analog](https://github.com/eh2k/squares-and-circles/wiki/Virt.Analog)
* [Waveshaping](https://github.com/eh2k/squares-and-circles/wiki/Waveshaping)
* [2-OP-FM](https://github.com/eh2k/squares-and-circles/wiki/2-OP-FM)
* [Formant/PD](https://github.com/eh2k/squares-and-circles/wiki/Formant-PD)
* [Harmonic](https://github.com/eh2k/squares-and-circles/wiki/Harmonic)
* [Wavetable](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)
* [Chord](https://github.com/eh2k/squares-and-circles/wiki/Waveforms)
* **SYNTH**
* [Resonator](https://github.com/eh2k/squares-and-circles/wiki/Resonator)
* [DxFM](https://github.com/eh2k/squares-and-circles/wiki/DxFM)
* [DxFM_BNK1-3](lib/plaits/resources.cc#L41)
* [Open303](https://github.com/eh2k/squares-and-circles/wiki/Open303)
* [ClassicVAVCF](lib/plaits/dsp/engine2/virtual_analog_vcf_engine.cc)
* **FX**
* [Reverb](https://github.com/eh2k/squares-and-circles/wiki/clouds_reverb)
* [ReverbSC](https://github.com/eh2k/squares-and-circles/wiki/ReverbSC)
* [Rev-Dattorro](https://github.com/eh2k/squares-and-circles/wiki/Rev-Dattorro)
* [Delay](https://github.com/eh2k/squares-and-circles/wiki/Delay)
* [Gated-Reverb](https://github.com/eh2k/squares-and-circles/wiki/Gated-Reverb)
* [Reverb-HP-LP](https://github.com/eh2k/squares-and-circles/wiki/Reverb-HP-LP)
* [JU60_chorus](https://github.com/eh2k/squares-and-circles/wiki/JU60_chorus)
* **NOISE**
* [White/Pink](https://github.com/eh2k/squares-and-circles/wiki/White_Pink_noise)
* [NES_noise](https://github.com/eh2k/squares-and-circles/wiki/NES_noise)
* [808_squares](https://github.com/eh2k/squares-and-circles/wiki/808_squares)
* **FILTER**
* [SVF](https://github.com/eh2k/squares-and-circles/wiki/filter_plaits_svf)
* [MoogLadder](https://github.com/eh2k/squares-and-circles/wiki/moog_ladder)
* [TeeBee](https://github.com/eh2k/squares-and-circles/wiki/filter_teebee)
* **SPEECH**
* [LPC](https://github.com/eh2k/squares-and-circles/wiki/LPC)
* [SAM](https://github.com/eh2k/squares-and-circles/wiki/SAM)
* **MIDI**
* [Monitor](https://github.com/eh2k/squares-and-circles/wiki/Monitor)
* [Clock](https://github.com/eh2k/squares-and-circles/wiki/Clock)
* [VAx6](https://github.com/eh2k/squares-and-circles/wiki/VAx6)
* **SEQ**
* [EuclidRythm](https://github.com/eh2k/squares-and-circles/wiki/EuclidRythm)
* [EuclidArp](https://github.com/eh2k/squares-and-circles/wiki/EuclidArp)
* [TuringMachine](https://github.com/eh2k/squares-and-circles/wiki/TM)
* [303-Patterns](https://github.com/eh2k/squares-and-circles/wiki/303-Patterns)
## Machine/Engine
Machines/Engines are controlled by individual parameters.
>[Short press left/right [ENCODER]] changes parameter selection<br/>
>[Rotate left/right [ENCODER]] changes parameter value
### Modulations
>[Long press left or right [ENCODER]] shows/hides the modulation popup*
For each parameter a modulation can be assigned:
* **CV**: <img align="right" src="doc/mod_cv.png" width=196px />
* SRC:
* `C1`, `C2`, `C3`, `C4` - Analog inputs
* OP: `THRU`, `SLEW`, `S&H`, `T&H`
* THRU - Thru Input
* SLEW - Slew Limiter
- Rising
- Falling
* S&H - Sample and Hold
- Trig Source
* T&H - Track and Hold
- Gate Source
* `+` - Constant internal voltage
* 10V with 1/1000 resolution - nice for fine adjustments (detuning etc)
* Hints:
* Parameter 0 (top-left) is primarily used for V/OCT control. Therefore, a single V/OCT signal or CV input can be shared by applying modulation to parameter 0 with an attenuverter set to +1, within the -3V to +6V range. It is also possible to select the V/OCT input in the io-configuration page.
* All other parameters can be modulated via CV-input with a assumed voltage-range of -4V..4V at 2kHz sample rate.
* Be aware the CV-range is probably limited by hardware to: -3.5v..6.5V
* **RND**: Trigger generates a random voltage <img align="right" src="doc/mod_rnd.png" width=196px />
* TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
<br/>
<br/>
* **ENV**: Triggered Envelope (Attack, Decay) <img align="right" src="doc/mod_env.png" width=196px />
* TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* ATTACK
* DECAY
* **LFO**: Free/Triggered Sine-LFO <img align="right" src="doc/mod_lfo.png" width=196px />
* TRIG: `-`, `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* SHAPE: `SIN`, `TRI`, `SQR`, `STEPS`, `NOISE`
* FREQUENCY: `0-127`
* WAVEFORM: `0-127`
* **EF**: Envelope Follower <img align="right" src="doc/mod_ef.png" width=196px />
* SRC: `C1`, `C2`, `C3`, `C4`
* ATTACK
* RELEASE
* **TM**: Turing Machine <img align="right" src="doc/mod_tm.png" width=196px />
* TRIG: `!`, `CLK`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* PROB: `0-9` (0-100%)
* STEPS: `1-16`
* **SEQ**: 4-Step Sequencer <img align="right" src="doc/mod_seq.png" width=196px />
* TRIG: `!`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`, `CLK/1`, `CLK/4`, `CLK/16`, `CLK/32`, `CLK/96`
* RESET: `-`, `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* 4-STEPS: `-64..64`
>`!` = current engine trigger<br/>
>`CLK` = internal clock<br/>
All modulations have an attenuverter parameter (-/+).
* The modulation-voltage is attenuverted/multiplied by -1..+1;
<div style="page-break-after: always;"></div>
## I/O-Configuration
>[Long press [RIGHT]] enters the I/O-Configuration page.
The I/O-Configuration page lets you virtually patch the engine with the hardware ports and internal gate/cv signals ($1a-$4d). Depending on the engine interface, trigger, gate, accent and V/OCT can be configured. In addition to the trigger, which is set with a rising edge, a gate state is also provided, that can be processed by the engine. Engines like Closed/Open-HiHats have an additional accent input - this works technically like a second trigger. The V/OCT input can optionally be quantized and transposed. In addition to the Tx inputs, the Cx inputs can also be used as a source for triggers and accents. The output can be configured as mono or stereo. Several engines can share the same output - the signal is mixed.
### Ctrl / Inputs
<img align="right" src="doc/inputs.png" width=196px />
*In case the Engine supports Triggers/Gates - Trigger Input is configurable:*
* **Trig-Input**:
* `-`
* `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* `$1-$9`
*In case the Engine supports Clock-Input - Clock-Source is configurable:*
* **Clock-Source**:
* `CLK` - global clock -> Midi/Clock/Timing settings.
* `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* `$1-$9`
*In case the Engine supports Accents (Closed/Open HiHat) - Accent Input is configurable:*
* **Accent-Input**:
* `-`
* `T1`, `T2`, `T3`, `T4`, `C1`, `C2`, `C3`, `C4`
* `$1-$9`
<img align="right" src="doc/inputs2.png" width=196px />
*In case the Engine is an AUDIO_PROCESSOR - Input signal mix is configurable:*
* **Aux-Input**: `-`, `C1`, `C2`, `C3`, `C4`
* AUX-IN: -3V..3V for additional audio source for effects (prefer CV4).
* **Insert-1**: Feed-in signal from engine-1
* **Insert-2**: Feed-in signal from engine-2
* **Insert-3**: Feed-in signal from engine-3
* **Insert-Aux**: Feed-in signal from aux-input
<br/>
*In case the Engine supports V/OCT - V/OCT Input is configurable:*
* **CV-Input**: `-`, `C1`, `C2`, `C3`, `C4`
* V/OCT: -3V..6V for frequency-control (default)
* **Quantizer**: [Off, Semitones, Ionian, Dorian, ...](lib/braids/quantizer_scales.h)
* **ROOT**: `C`, `C#`, `D`, `D#`, `E`, `F`, `F#`, `G`, `G#`, `A`, `A#`, `B`
* **Transpose**: -48 to 24 (semitone per step)
* **FINE**: semitone/128
### Mix / Outputs
<img align="right" src="doc/outputs2.png" width=196px />
* **Level**: Output volume level
- can result in distortion
- not available on CV-Engines
* **Pan**: Stereo panning
- on stereo engines with mono output, panning is also used for mixing
* **Output**
* `-`, `A`, `A+B`, `B`, `C`, `C+D`, `D`
- The option `-(no output)` is useful if the signal is to be routed into an AUDIO_PROCESSOR engine
* **Stereo**
* Experimental stereo feature - see STERIOLIZED Flag ;-)
<br/>
<div style="page-break-after: always;"></div>
## CLOCK+TIMING+MIDI-Settings
>[Long press [LEFT] + [RIGHT]] for getting to the CLOCK+TIMING+MIDI-Settings page.
<img align="right" src="doc/config_midi1.png" width=196px />
### - **CLOCK-Source**:
* `-` none
* `INT` Internal Clock-Source (BPM)
* `T1` T1 as Clock-Input (4ppqn)
* `MIDI` Clock received from MIDI
> Default Clock-Source for `SEQ/...` engines. <br/>
> Clock-Source is also used by engines like `FX/Delay` (clocked sync) or `MIDI/Clock`
<img align="right" src="doc/config_midi2.png" width=196px />
### - **TRIG-In-Delay**:
* `0-50ms`Trigger input processing delay in ms. Usecase: sync trig signals with midi or CV
<img align="right" src="doc/config_midi0.png" width=196px />
### - **MIDI-Control**:
- `-` disabled
- In case OC_T40
- `USB+T1` [T1 input can be used as MIDI-Input](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime#-midi-expander)
- else
- `MIDI/USB` the USB-MIDI and/or hardware Midi-Input
In case the MIDI-Control is enabled, you can setup the Midi-Channel for each engine.
> Each engine can be assigned to a MIDI-Channel - it is possible to control single mono engines together polyphonically (for this all engines have to be set to the same midi channel). [Midi-Engines](app/MIDI/VAx6.cpp) consume the MIDI-Stream directly, therefore the MIDI-Messages are not converted as incoming CVs or triggers.
#### Midi-Control
* Engines can be loaded/selected by midi program change
* Default Parameter CC-Mappings
````
| HEX | DEC | parameter-index | CH |
|-----|-----|-----------------|----|
| 07 | 07 | LEVEL | * |
| 0A | 10 | PAN | * |
| 10 | 16 | 0 | * |
| 11 | 17 | 1 | * |
| 12 | 18 | 2 | * |
| 13 | 19 | 3 | * |
| 14 | 20 | 4 | * |
| 15 | 21 | 5 | * |
| 16 | 22 | 6 | * |
| 17 | 23 | 7 | * |
````
> CC 48-56 (HEX 30-38) for LSB (14Bit CC)
* **Midi-Channel**: `-`, `1`...`16`
- The Midi messages are translated to analog events
- Trig: NoteOn
- Gate: NoteOn until NoteOff
- CV: 0V = Key 60
- [Multi-Trig-Drum-Engines](https://github.com/eh2k/squares-and-circles/wiki/DrumSynth)
- In case trigger to `-` - individual drums/instruments are triggered by individual keys:
- GM Standard Drum Map: https://github.com/eh2k/squares-and-circles/wiki/TR707#midi-mapping
- or Keys 60-75 for instrument 1-16
# Patch Storage
<img align="right" src="doc/patch_storage_load.png" width=196px />
> [Press `L-ENC + R-ENC`] to enter the patch storage page
* Use `L-ENC` for patch slot selection
* Use `R-ENC` for LOAD/SAVE
* Load `empty` - restores all engines to `GND/-`
# Supported Hardware
* [Ornament-and-Crime T4.0](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime)
* [Squares-and-Circles DSM0](https://github.com/eh2k/squares-and-circles/wiki/Squares&Circles-D_SM-Prototype)
* [O_C T4.1](https://github.com/eh2k/squares-and-circles/wiki/O_C_T41)
## Hardware setup procedure
> Use [](https://eh2k.github.io/□●/flash/?firmware) to enter callibration mode, or execute advanced setup commands </br>
>Press and hold the [LEFT] button during power-on to enter the setup procedure.
### Display setup
<img align="right" src="doc/display_setup.png" width=196px />
* Press left encoder to flip180.
* Press right encoder for changing display brightness (50%, maximal).
### Encoder setup
<img align="right" src="doc/encoder_setup.png" width=196px />
* Check the encoder rotation direction.
* Press encoder for reversed setup.
<br/>
<br/>
### DAC calibration
<img align="right" src="doc/dac_calib.png" width=196px />
To calibrate the DAC, use a multimeter to accurately set the reference voltages at `0V`, `-2V` and `+2V`.
Start with DAC1 (channel A) - connect the multimeter typically using alligator clip on a patch cable inserted in the jack. Use the right encoder to set the voltage as accurately as possible (press the encoder for coarse adjustment). Do it on all outputs - use the left encoder for channel selection. After calibrating `0V` on all outputs, press [right] to step to the `-2V` calibration. Repeat the procedure and press [right] to calibrating `+2V`.
### ADC calibration
<img align="right" src="doc/adc_calib.png" width=196px />
To calibrate the ADC `0V` reference, remove all patch cables from the module. Use the right encoder to adjust the offset (press the encoder for fast adjustment). Do it on all cv-inputs, select the channel with the left encoder. Press [right] to enter the `-2V` calibration. Now you need to connect the DAC outputs to the cv-inputs. The DAC output produces the reference voltage, that is calibrated on the input. Repeat the calibration procedure and step to the `+2V` calibration.
### I/O Test:
<img align="right" src="doc/io_test.png" width=196px />
* Test/Verify your TRIG or CV inputs.
* The output voltage is set by the cv input voltage (DACx = ADCx).
<br/>
## ⧉ Conclusions and the future
The project started as a kind of personal research in embedded DSP that I did over half a year. At some point, it turned out by chance that the O_C was very well suited for this by only upgrading the Teensy. Apart from the small optional [mod](https://github.com/eh2k/squares-and-circles/wiki/Ornament%E2%80%90and%E2%80%90Crime#optional-dac-voltage-range-mod--5v5v-range) on the DAC voltage range, the current O_C hardware unfortunately has some unchangeable limitations for audio applications. As you know, the Teensy 4.0 doesn't have "high-end" ADCs and a limited amount of RAM. On the other hand, it is the the combination of limitations that make the project unique.
I have mixed feelings about the user interface and the firmware concept. On the one hand, the two buttons and the two encoders are sufficient and actually practical for a multifunction module, but on the other hand, something is missing. Additional buttons/encoders could definitely simplify the operation/interaction - let's see if this [puzzle](https://github.com/eh2k/squares-and-circles/wiki/Squares&Circles-D_SM-Prototype) can be solved.
## License
The application code respectively the suite of machines/engines and the third-party source files are published under permissive software licenses.
For the exact license and copyright holder - see the header of individual source code files or readme/license file in the sub folder.
The firmware as a whole is for personal use only.
If you are considering commercial distributing hardware with this firmware, please contact me (eh2k◯gmx.de).
<!--
````
_______________
|***************|
|* *|
|* *|
|***************|
| |
| [BL] [BR] |
| |
| (EL) (ER) |
| |
|( ) ( ) ( ) ( )|
| |
|( ) ( ) ( ) ( )|
| |
|( ) ( ) ( ) ( )|
|_______________|
````
-->
================================================
FILE: app/SEQ/patterns_303.h
================================================
#include <inttypes.h>
constexpr uint8_t REST = 0x0;
/* between 0x0 and 0xA, the VCO voltage pins, so these notes arent really
* 'effective' in that they all sound the same.
*/
// lowest octave
constexpr uint8_t C1 = 0x0B;
constexpr uint8_t C1_SHARP = 0x0C;
constexpr uint8_t D1 = 0x0D;
constexpr uint8_t D1_SHARP = 0x0E;
constexpr uint8_t E1 = 0x0F;
constexpr uint8_t F1 = 0x10;
constexpr uint8_t F1_SHARP = 0x11;
constexpr uint8_t G1 = 0x12;
constexpr uint8_t G1_SHARP = 0x13;
// middle octave
constexpr uint8_t A1 = 0x14;
constexpr uint8_t A1_SHARP = 0x15;
constexpr uint8_t B1 = 0x16;
constexpr uint8_t C2 = 0x17;
constexpr uint8_t C2_SHARP = 0x18;
constexpr uint8_t D2 = 0x19;
constexpr uint8_t D2_SHARP = 0x1A;
constexpr uint8_t E2 = 0x1B;
constexpr uint8_t F2 = 0x1C;
constexpr uint8_t F2_SHARP = 0x1D;
constexpr uint8_t G2 = 0x1E;
constexpr uint8_t G2_SHARP = 0x1F;
// high octave
constexpr uint8_t A2 = 0x20;
constexpr uint8_t A2_SHARP = 0x21;
constexpr uint8_t B2 = 0x22;
constexpr uint8_t C3 = 0x23;
constexpr uint8_t C3_SHARP = 0x24;
constexpr uint8_t D3 = 0x25;
constexpr uint8_t D3_SHARP = 0x26;
constexpr uint8_t E3 = 0x27;
constexpr uint8_t F3 = 0x28;
constexpr uint8_t F3_SHARP = 0x29;
constexpr uint8_t G3 = 0x2A;
constexpr uint8_t G3_SHARP = 0x2B;
constexpr uint8_t A3 = 0x2C;
constexpr uint8_t A3_SHARP = 0x2D;
constexpr uint8_t B3 = 0x2E;
constexpr uint8_t C4 = 0x2F;
constexpr uint8_t C4_SHARP = 0x30;
constexpr uint8_t D4 = 0x31;
constexpr uint8_t D4_SHARP = 0x32;
constexpr uint8_t E4 = 0x33;
constexpr uint8_t F4 = 0x34;
constexpr uint8_t F4_SHARP = 0x35;
constexpr uint8_t G4 = 0x36;
constexpr uint8_t G4_SHARP = 0x37;
constexpr uint8_t A4 = 0x38;
constexpr uint8_t A4_SHARP = 0x39;
constexpr uint8_t B4 = 0x3A;
constexpr uint8_t C5 = 0x3B;
constexpr uint8_t C5_SHARP = 0x3C;
constexpr uint8_t D5 = 0x3D;
constexpr uint8_t D5_SHARP = 0x3E;
// no more notes!
constexpr uint8_t NOTE_MASK = 0x3F;
constexpr uint8_t SLIDE = 0x80;
constexpr uint8_t ACCENT = 0x40;
//"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"
// Daft Punk - Da Funk
const uint8_t da_funk[16] = {A2_SHARP, F4, D3 | SLIDE, C5, A3_SHARP | SLIDE | ACCENT, G3, F2_SHARP | SLIDE | ACCENT, G3_SHARP,
A4_SHARP | SLIDE, A2, C4 | SLIDE, D4 | SLIDE | ACCENT, F3, D3 | SLIDE, F2 | SLIDE, D3_SHARP | SLIDE};
================================================
FILE: app/index.json
================================================
{
"apps": [
"CV/EnvFollower.bin",
"CV/EnvGen.bin",
"CV/LFO.bin",
"CV/V_OCT.bin",
"DRUMS/808ish-BD.bin",
"DRUMS/808ish-HiHat.bin",
"DRUMS/808ish-SD.bin",
"DRUMS/Claps.bin",
"DRUMS/Djembe.bin",
"DRUMS/DrumSynth.bin",
"DRUMS/FM-Drum.bin",
"DRUMS/RZ-1.bin",
"DRUMS/TR707.bin",
"DRUMS/TR909-HiHat.bin",
"FILTER/MoogLadder.bin",
"FILTER/SVF.bin",
"FILTER/TeeBee.bin",
"FX/Delay.bin",
"FX/FV1emu.bin",
"FX/Gated-Reverb.bin",
"FX/JU60_chorus.bin",
"FX/Rev-Dattorro.bin",
"FX/Reverb-HP-LP.bin",
"FX/Reverb.bin",
"FX/ReverbSC.bin",
"GND/FFT.bin",
"GND/Scope.bin",
"M-OSC/Waveforms.bin",
"MIDI/Clock.bin",
"MIDI/Monitor.bin",
"MIDI/VAx6.bin",
"NOISE/808_squares.bin",
"NOISE/NES.bin",
"NOISE/WhitePink.bin",
"SEQ/303-Patterns.bin",
"SEQ/EuclidArp.bin",
"SEQ/EuclidRythm.bin",
"SEQ/TuringMachine.bin",
"SPEECH/LPC.bin",
"SPEECH/SAM.bin",
"SYNTH/DxFM.bin",
"SYNTH/Open303.bin",
"SYNTH/Resonator.bin",
"SYNTH/plaits.bin"
]
}
================================================
FILE: app/squares-and-circles-loader.sha
================================================
0e8b51c
================================================
FILE: app/upload.py
================================================
#!/usr/bin/env python3
import json
import zlib
import os, glob
import sys
try:
import usb.core
import usb.util
except ImportError:
print("pyusb is required. Install with: pip install pyusb")
sys.exit(1)
class bcolors:
HEADER = "\033[95m"
OKBLUE = "\033[94m"
OKCYAN = "\033[96m"
OKGREEN = "\033[92m"
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
BOLD = "\033[1m"
UNDERLINE = "\033[4m"
print("-------------------------------------------------")
os.chdir(os.path.dirname(os.path.abspath(__file__)))
USB_VENDOR_ID = 0x16C0
USB_INTERFACE = 3
USB_ENDPOINT = 5
USB_TIMEOUT_MS = 5000
def _safe_usb_string(device, index):
if not index:
return ""
try:
return usb.util.get_string(device, index) or ""
except usb.core.USBError:
return ""
def _find_bulk_endpoint(interface, direction):
for endpoint in interface:
if usb.util.endpoint_direction(endpoint.bEndpointAddress) != direction:
continue
if usb.util.endpoint_type(endpoint.bmAttributes) != usb.util.ENDPOINT_TYPE_BULK:
continue
if endpoint.bEndpointAddress & 0x0F == USB_ENDPOINT:
return endpoint
for endpoint in interface:
if usb.util.endpoint_direction(endpoint.bEndpointAddress) != direction:
continue
if usb.util.endpoint_type(endpoint.bmAttributes) == usb.util.ENDPOINT_TYPE_BULK:
return endpoint
return None
def open_device():
devices = list(usb.core.find(find_all=True, idVendor=USB_VENDOR_ID) or [])
if not devices:
return None
selected = None
for device in devices:
product = _safe_usb_string(device, device.iProduct)
if product.startswith("S&C") or product.startswith("Squares&Circles"):
selected = device
break
if selected is None:
selected = devices[0]
#selected.set_configuration()
config = selected.get_active_configuration()
interface = usb.util.find_descriptor(config, bInterfaceNumber=USB_INTERFACE)
if interface is None:
raise RuntimeError(f"USB interface {USB_INTERFACE} not found")
if selected.is_kernel_driver_active(USB_INTERFACE):
selected.detach_kernel_driver(USB_INTERFACE)
usb.util.claim_interface(selected, USB_INTERFACE)
ep_out = _find_bulk_endpoint(interface, usb.util.ENDPOINT_OUT)
ep_in = _find_bulk_endpoint(interface, usb.util.ENDPOINT_IN)
if ep_out is None or ep_in is None:
usb.util.release_interface(selected, USB_INTERFACE)
raise RuntimeError("Bulk IN/OUT endpoints not found")
return selected, ep_out, ep_in
def close_device(device):
if device is None:
return
try:
usb.util.release_interface(device, USB_INTERFACE)
except Exception:
pass
usb.util.dispose_resources(device)
device_bundle = open_device()
if device_bundle is None:
print(" -> S&C Device not found")
exit(1)
else:
dev, ep_out, ep_in = device_bundle
product = _safe_usb_string(dev, dev.iProduct)
serial_number = _safe_usb_string(dev, dev.iSerialNumber)
print(" -> S&C Device found:", product or "Unknown", serial_number)
def usb_write(ep_out, payload):
ep_out.write(payload, timeout=USB_TIMEOUT_MS)
def usb_read_until_nul(ep_in, timeout_ms=USB_TIMEOUT_MS, chunk_size=512):
data = bytearray()
while True:
chunk = ep_in.read(chunk_size, timeout=timeout_ms)
for byte in chunk:
if byte == 0:
return data.decode(errors="replace")
data.append(byte)
def get_blobs(ep_out, ep_in):
usb_write(ep_out, b"blobs\0")
buffer = usb_read_until_nul(ep_in)
try:
blobs = json.loads(buffer)
except Exception as e:
print(buffer)
print("Error parsing blobs:", e)
return []
for blob in blobs[:]:
if os.path.exists(blob["name"]) == False:
del blobs[blobs.index(blob)]
continue
with open(blob["name"], "rb") as f:
blob["crc32_local"] = "%X" % zlib.crc32(f.read())
#print("blobs:", json.dumps(blobs, indent=2))
return blobs
def update_blob(ep_out, ep_in, filename):
blob = bytearray()
blob.extend("WRI".encode()[:3] + bytes([0]))
blob.extend(filename.encode() + bytes([0]))
blob.extend(bytes(0x0 for _ in range(4 - (len(blob) % 4))))
blob.extend(os.path.getsize(filename).to_bytes(4, "little"))
crc32 = 0
with open(filename, "rb") as f:
crc32 =zlib.crc32(f.read())
blob.extend(crc32.to_bytes(4, "little"))
f.seek(0)
blob.extend(f.read())
blob.extend(bytes(0xFF for _ in range(64 - (len(blob) % 64))))
#return
for i in range(0, len(blob), 512):
chunk = blob[i : i + 512]
usb_write(ep_out, chunk)
r = usb_read_until_nul(ep_in)
print(r)
if r.startswith("ERR"):
return False
#r = usb_read_until_nul(ep_in)
#print(r)
#crc_ret = int.from_bytes(r[4:8], "little")
#print("FLASH RESULT:", "%X" % crc32, "%X" % crc_ret)
return True
def reset(ep_out):
usb_write(ep_out, b"ui:reset\0")
print("Reset command sent")
#dev.read(endpoint_in.bEndpointAddress, 64, 1000).tobytes()
updated = False
map = {}
if device_bundle is None:
print("-> S&C Device not connected")
exit(1)
dev, ep_out, ep_in = device_bundle
try:
print("-> S&C Device connected")
print("-------------------------------------------------")
for blob in get_blobs(ep_out, ep_in):
map[blob["name"]] = blob
if blob["crc32"] != blob["crc32_local"]:
print(
bcolors.WARNING,
blob,
bcolors.ENDC,
)
updated |= update_blob(ep_out, ep_in, blob["name"])
#else:
# print(bcolors.OKBLUE, blob, bcolors.ENDC)
# glob for .bin files in current directory
for local_file in glob.glob("*/*.bin"):
local_file = local_file.replace("\\", "/")
if local_file.endswith(".bin") and local_file not in map:
print(bcolors.WARNING, "NEW FILE:", local_file, bcolors.ENDC)
#updated |= update_blob(local_file)
if updated:
reset(ep_out)
else:
print("all apps up to date")
finally:
close_device(dev)
================================================
FILE: doc/.conv.sh
================================================
set +x
cd $(dirname $0)
montage -background '#25282c' -tile 5x -geometry +10+10 gnd_*.png cv_*.png drums_*.png mosc_*.png synth_*.png noise_*.png fx_*.png midi_*.png filter_*.png seq_*.png engines.png
for f in $1; do
convert $f -sample 256x128 ${f%.*}.png
done
================================================
FILE: doc/.screenshots.py
================================================
import base64
import math, struct
from array import array
e = "////Bwfn52dnZ2dnZ+fnBwf//4eHZ2d/fwcHBwcfH///5+fn5+fnBwfn539///8HB+fnZ2dnZ2dn5+cHB////////////////////////39/Px8fH4+Ph8fHx+Pj4+Pj4+Pj4+PHx8eHj48fHx8/f3////////////////////////8AAH9/YGBgYGBgf38AAP//eXnm5h4e4OB4ePj4Hx/5+QcH+fkYGIGBHh7//wAAf39gYGBgYGB/fwAA/////////////38/Hw+Hw+Hw+Pz8/v///////////////////////////////////vz8+PDhw4cPHz9//////////////4aGnp4GBoaGnp5mZmZm5+f4+GdnhoZ5eX5+//8eHv//fn6BgRgYn58YGB8fBgb+/h4e5uZ+fmZmhob///////9/HwMB4Pj8////wb6+vsH/5+vtgO//gLa2tr7/+ba21uH/gLa2tr7/2Lq6usb////////8+OABAx9/////////h4fn5wAAn5+BgX5+ZmZhYWFhAADn5+bmYGBhYX5+h4fm5mdnAAAHB5iYfn4eHv//eHjn5wYGHh4ZGf//////BwAA+P/////////Bvr6+wf+Avr7d4/+A9vb2/v/+jvb6/P/Bvr6+wf/n6+2A7//////////////4AAAH//////9nZ+Hh4OAZGZmZ+PhmZpiY4OCGhgEB//9mZn5+ZmZ5eXl5/v5mZvj4BwdmZnh4//9gYIeHHh6AgP7+///////AAAA//////////////////////////////////////////////////////////////////////z8AAMD//////35+Z2d/f2BgYWF5eWZm+fkHB5mZmJgfH/7+4OBgYObmfn4BAXh4BwcGBuDgZmbh4QAABweAgB8fn5/////////88IABDz9///////////////////////////////////////////////////////////9/Pw8BgPD8////////AAD+/gYGBgYGBv7+AAD//xgYh4eBgZ6e4eF5efj45+ceHoaGgIB+fgAABwfm5gcHgICYmGdn5uYBAf/////////////8+PDhw4cPHz9/f/////////////////////////////////////9/fz8fD4fD4fD4/P/////////////g4Ofn5ubm5ubm5+fg4P//5ubn5+fn5+f//+bm+fn5+eDg///5+ebm4OD+/v//+Pj5+fn5/v7h4f7+///////////////////////+/Pz48PHx4+PDx8fHj4+Pj4+Pj4+Pj8fHx8Pj4/Hx8Pj8/P7//////////////////w=="
a = "AH9BQSIcAH8JGSlGAD9AQEA/AH8CDAJ/AEZJSUkxACAQCAQCAAZJSSkeAD5BQUE+AAZJSSkeAABEfUAAAEhUVFQgAH8IBAR4AAgICAgIAEF/SUk2AH9BQSIcAAAAAAAAAAAAAAAAAAAAAAAAHD4+PhwcIiIiHBwiIiIcHCIiIhwCAgICAgKCgoKCggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCgoKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuAYBAIBAQY4wAAAAQECBBjgAAAAAPCQkJAQAMCAQECAAIBAQECAAIBAQIDAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4BgEAgEBAACAgICBgYKEGOAAAAAA8JCQkGAAwAAAAMAAwIBAQIAAgEBAQAAA8IBAQIAAAAAAAAAAAAAAAAAAAwwQIEBAgICAgIBAQCAQDAMAAAAABwAAAAAABwAAAAAAAwUFBQEAAQICAQ8AAAAAAAAAAAAAAAAAAAAAAAAAAAADDBAgQECAgICAgEBAIBAMAwAAAAAHAAAAAAADBAQCBwAHAAAABwADBAQEAgAHAAAABwAAAAAAAAAAAAAAAAAAAAAAgEAgICAgIECAAAAAAAAAAACAgICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQCAgICAgQIAAAAAAAAAAAICAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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iIiIiIiIiIiIiIiIiIiIiIiI/w=="
io_test = "////////+wP7//9/v9/v9/8H+/v7B//////////7+wP7+/8D29vb+//n29vbO//7+wP7+///////////////////////////////////////////////////////////////////////////////////////////////////////BwcHBwcGBgYHBwcHBwcHBwcGBgYHBwcHBwcHBwcHBgcHBwYGBgYGBwYGBgYHBwcHBgcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH//8AAAAAAgL+AgIA/hIyUowAAIT+gAAAAAAAAAAAfIKCgnwAAABAwAAAAAAAAAAAfIKCgkQADjDAMA4AAIT+gAAAAAAAAAAAEBAQEBAAfIKCgnwAAMDAAAAAfIKCgnwAfIKCgnwAhMKikowADjDAMA4AAAAAAAAAAAAAAAAAAAD//wAAAAAICPgICAD4SMhIMAAQCIhIMAAAAAAAAADwCAgI8AAAAAEAAAAAAAAAAADwCAgIEAA4wADAOAAQCIhIMAAAAAAAAABAQPBAQADwCAgI8AAAAAAAAADwCAgI8ADwCAgI8AAQCIhIMAA4wADAOAAAAAAAAAAAAAAAAAAAAP//AAAAACAg4yAgAOMgICHCACIjomIiAAAAAAAAAMEiIiLBAAAABQMAAAAAAAAAAMEiIiJBAOAAAwDgACIjomIiAAAAAAAAAAAAwQAAAMEiIiLBAAADAwAAAMEiIiLBAMEiIiLBAEIjIiLCAOAAAwDgAAAAAAAAAAAAAAAAAAAA//8AAAAAgICPgIAAj4GDhQgABAgIiQYAAAAAAAAAB4iIiAcAAAAUDAAAAAAAAAAAB4iIiAQAgAMMA4AABAgIiQYAAAAAAAAAAQEHAQEAB4iIiAcAAAwMAAAAB4iIiAcAB4iIiAcACIyKiQgAgAMMA4AAAAAAAAAAAAAAAAAAAAD//wAAAAAAAD8AAAA/BAwUIwAMCgk/CAAAAAAAAAAfICAgHwAAAFAwAAAAAAAAAAAfICAgEQADDDAMAwAMCgk/CAAAAAAAAAAEBB8EBAAfICAgHwAAMDAAAAAfICAgHwAfICAgHwAhMCgkIwADDDAMAwAAAAAAAAAAAAAAAAAAAP//iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIj4+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiI/w=="
display_setup = "////A/v7d4////sD+///59vb2zv/A9vb2+f/A///////D7e7tw//498/3+P/////////59vb2zv/A9vb2/v/+/sD+/v/A////wP/A9vb2+f/////////////////////////////////////////////////////////////////BwcGBgYHBwcHBgYGBwcGBgYGBwcGBwcHBwcGBgYGBgcGBwcHBgcHBwYHBwcHBwcHBwcGBgYGBwcGBgYGBgcHBwYHBwcHBgYGBwcGBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcH//8AAAAA8JCQkGAA8JCQkGAA8JCQkBAAYJCQkBAAYJCQkBAAAGBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAAAAHAAAAAADHAAECBAAHBAQEBADEREREQwDEBAQEwwCAQ0NAgAAAgIAAAAAAAAAAAADAQEBAQADAAAAAAAAAQMBAAADAQEBAgAAAgMAAAACAQEBAgACAQEBAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAAAAAAAAAAAAB8QEBAQAAICAgICAB8SEhIQAB8BAgQfAA8QEBAIAAANDQAAAAAAAAAAAB8CAgIAAB8QEBAQAAAQHxAAAB8CAgIBAAAQHxAAAA0SEhINAA8QEBAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAAAAAA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REQgACBUVFR4ABygoKB8AAAAAAAAAAAAAAAAAAAAAAAAPECBAQENAQCAQDwAAAAAAAAAPEBAQCAAOERERDgAAEB8QAAAOERERDgAfAgEBAgAAAAAAAAAAAAAAAAD4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiI+A=="
screenshots = { "io_test" : io_test,
"splash": e,
"osc": osc,
"encoder_setup" : encoder_setup,
"display_setup" : display_setup,
"dac_calib" : dac_calib,
"adc_calib" : adc_calib,
"engine" : a,
"modulation" : mod,
"menu" : c,
"config" : config,
"config_midi" : config_midi,
"config_fx" : config_fx,
}
mult4 = lambda n: int(math.ceil(n/4))*4
mult8 = lambda n: int(math.ceil(n/8))*8
lh = lambda n: struct.pack("<h", n)
li = lambda n: struct.pack("<i", n)
def bmp(rows, w):
h, wB = len(rows), int(mult8(w)/8)
s, pad = li(mult4(wB)*h+0x20), [0]*(mult4(wB)-wB)
s = li(mult4(w)*h+0x20)
return (b"BM" + s + b"\x00\x00\x00\x00\x20\x00\x00\x00\x0C\x00\x00\x00" +
lh(w) + lh(h) + b"\x01\x00\x01\x00\xff\xff\xff\x00\x00\x00" +
b"".join([bytes(row+pad) for row in reversed(rows)]))
def getPixel(buffer, x, y):
return buffer[x + int(y / 8) * 128] & (1 << (y & 7)) == 0
def setPixel(row, x, c):
if c:
row[int(x/8)] |= (0b10000000 >> (x % 8))
else:
row[int(x/8)] &= ~(0b10000000 >> (x % 8))
for key in screenshots:
s = base64.b64decode(screenshots[key])
print(len(s))
rrr = []
for y in range(64): # comma, or other
r = list(s[y*16:][:16])
for x in range(128):
setPixel(r, x, getPixel(s, x, y))
rrr.append(r)
smile = [[0xFF,0xFF], [0x81,0xFF], [0xA5,0xFF], [0x81,0xFF], [0xA5,0xFF], [0xBD,0xFF], [0x81,0xFF], [0xFF,0xFF]]
f = open(key + ".bmp", "wb")
f.write(bmp(rrr, 128))
f.close()
================================================
FILE: doc/output-routing.xml
================================================
<mxfile host="app.diagrams.net" modified="2022-05-01T09:43:04.750Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" etag="ipP1wIMTQGRE3NMpLXNX" version="17.5.0" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7V1Nc9s4Ev01rpo92EWA4Ncxjh1vdhJXdpxMkrlsqSyOpYkseiU6tufXD2URMtkQCRACiKasXCJRMEg2XjceuhuNI//t7ePFYnQ3+ZiN09kR9caPR/7ZEaXES+Liv9WVp/WVIA7XF24W03HZ6OXC1fTvlP9lefV+Ok6XtYZ5ls3y6V394nU2n6fXee3aaLHIHurN/sxm9bvejW5S4cLV9WgmXv06HeeT9dWYRi/X/51Obyb8ziRM1r/cjnjj8k2Wk9E4e6hc8s+P/LeLLMvXn24f36azlfC4XL6+f/o6+/AjvPjPf5f/H305/fXz5e/H687edfmTzSss0nlutmt/3fXP0ey+lNf55cX7y/PiWnnXZf7ERbnI7ufjdNUdOfJPHybTPL26G12vfn0owFNcm+S3s/LnP7N5XqKBFKI6vZmNlquh9IrPy3yR/dgMx6r1RrarnxVft3zAn+kiTx8rg12+/kWa3ab54qloUv7KyoF8qn99qMCivDSpIII3G5VAvNn0+yLs4kMp7+2y//X7p/Sn9yP06enF3YzR33+cX5TDtVX2dO9kT0JcwifNwvf3Tvgb0SIRPm0WPts74TMPl/CZIPyLN+8vBbEXPRVTdCoXuTWLAUBLqCg41qfgwoEILkQmt2ggcvM9ZIKLByI4RpEJjojU6uzNWwmn9RwKsC4/6rkmRyI7WsuvjZc6lB8kl+4FKDKctQDbuKVDAUKC6F6A4sJ0LcA2fuhUg7EJMBAEKE4c8/GblYel+Ha94snT67qw6pJNH6f5t9Xnk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K8j9k8Oz6f30zn6VJQm+XD9HY2ej5HuadphsKFqDDJ8KPdayCkMNnLoHkR/W++ILfi7oVIvKs8XaRZ8eFdMaF761/xCZVuiUxslaqQQmdQqqI3ij42StC7SvP7O3ySDLfUTdsuSRg105Hkb49/n0afP/0vnYy//PHh/p58/OOvY/NeEbf1h8B0ZPIkV9Va5uuTXF1NhCHwxWkHOkJZxMSiT6/4usiyvNq8WLhMPmbjdNXiHw==</diagram></mxfile>
================================================
FILE: lib/.fetch_deps.py
================================================
import subprocess
import os
import io
import urllib.request
import zipfile
import shutil
subprocess.run('git submodule update --init', shell=True)
from os.path import isdir, join
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
platform = env.PioPlatform()
board = env.BoardConfig()
print(env["PIOENV"])
================================================
FILE: lib/MoogLadders/LICENSE
================================================
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
================================================
FILE: lib/MoogLadders/README.md
================================================
# Moog Ladder Filters
This project contains different digital implementations of the classic 4-pole, 24 dB/octave analog filter introduced in 1965. The filter is well-regarded to add a nice character to any sound source, either synthesized or acoustic.
The ladder structure consists of four one-pole filters and a global negative feedback loop. Several academics have attempted to discretize this filter, and some academic publications on the topic can be found in the `research/` directory.
The filter classes do not rely on external libraries and can be used with little to no modification in other DSP projects. Every filter has been modified from its original implementation for code clarity and/or runtime performance. The project includes a test app that will pass white noise through each of the implemented filter variants.
# Filter Tuning & A Word of Warning
Each model is unique. The newest is from 2015 while the oldest dates back over 20 years. Some try to remain true to their analog counterpart, where others are more approximate. The filters have not been rigorously verified for all combinations of cutoff, resonance, and sampling rate. Some are purposely built to self-oscillate, but beware the occasional blow-up with parameters that exceed some undiscovered value.
# Models & Licenses
“Closed-Source Friendly” indicates if the individual license permits redistribution in a closed-source product (like a VST plugin). Filtered output audio is fair game for any kind of sample library or music production, commercial or otherwise. In the case of copyright-only code, it is possible to contact the original author to request an explicit license.
Implementation | License | Original Source | Closed-Source Friendly
------------- | ------------- | ----------------- | -----------------
Simplified | Custom | DAFX | No
Huovilainen | LGPLv3 | CSound | If dynamically linked
Stilson | Unlicense | Moog~ by D. Lowenfels | Yes
Microtracker | Unlicense | Magnus Jonsson | Yes
Krajeski | Unlicense | Aaron Krajeski | Yes
MusicDSP | Suggested CC-BY-SA | MusicDSP.org | Yes
Oberheim | Custom | Will Pirkle | Yes
Improved | ISC | Via Author | Yes
RKSimulation | BSD | Bob~ by Miller Puckette | Yes
# ToDo
Community contributions are welcome.
* Several filters have extra parameters that could be exposed (drive, thermal coefficients, Q, etc).
* Many filters could be easily modified for HPF or other types of output.
* Filter response graphs.
* The Huovilainen and Simplified models need to be oversampled and nyquist filtered.
# License
If not otherwise stated in the header of a file, all other code in this project is released under the Unlicense.
================================================
FILE: lib/MoogLadders/src/Filters.h
================================================
#pragma once
#ifndef FILTERS_H
#define FILTERS_H
#include <stdint.h>
#include <array>
#include "Util.h"
class BiQuadBase
{
public:
BiQuadBase()
{
bCoef = {{0.0f, 0.0f, 0.0f}};
aCoef = {{0.0f, 0.0f}};
w = {{0.0f, 0.0f}};
}
~BiQuadBase()
{
}
// DF-II impl
void Process(float * samples, const uint32_t n)
{
float out = 0;
for (int s = 0; s < n; ++s)
{
out = bCoef[0] * samples[s] + w[0];
w[0] = bCoef[1] * samples[s] - aCoef[0] * out + w[1];
w[1] = bCoef[2] * samples[s] - aCoef[1] * out;
samples[s] = out;
}
}
float Tick(float s)
{
float out = bCoef[0] * s + w[0];
w[0] = bCoef[1] * s - aCoef[0] * out + w[1];
w[1] = bCoef[2] * s - aCoef[1] * out;
return out;
}
void SetBiquadCoefs(std::array<float, 3> b, std::array<float, 2> a)
{
bCoef = b;
aCoef = a;
}
protected:
std::array<float, 3> bCoef; // b0, b1, b2
std::array<float, 2> aCoef; // a1, a2
std::array<float, 2> w; // delays
};
class RBJFilter : public BiQuadBase
{
public:
enum FilterType
{
LOWPASS,
HIGHPASS,
BANDPASS,
ALLPASS,
NOTCH,
PEAK,
LOW_SHELF,
HIGH_SHELF
};
RBJFilter(FilterType type = FilterType::LOWPASS, float cutoff = 1, float sampleRate = 44100) : sampleRate(sampleRate), t(type)
{
Q = 1;
A = 1;
a = {{0.0f, 0.0f, 0.0f}};
b = {{0.0f, 0.0f, 0.0f}};
SetCutoff(cutoff);
}
~RBJFilter()
{
}
void UpdateCoefficients()
{
cosOmega = cos(omega);
sinOmega = sin(omega);
switch (t)
{
case LOWPASS:
{
alpha = sinOmega / (2.0 * Q);
b[0] = (1 - cosOmega) / 2;
b[1] = 1 - cosOmega;
b[2] = b[0];
a[0] = 1 + alpha;
a[1] = -2 * cosOmega;
a[2] = 1 - alpha;
} break;
case HIGHPASS:
{
alpha = sinOmega / (2.0 * Q);
b[0] = (1 + cosOmega) / 2;
b[1] = -(1 + cosOmega);
b[2] = b[0];
a[0] = 1 + alpha;
a[1] = -2 * cosOmega;
a[2] = 1 - alpha;
} break;
case BANDPASS:
{
alpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);
b[0] = sinOmega / 2;
b[1] = 0;
b[2] = -b[0];
a[0] = 1 + alpha;
a[1] = -2 * cosOmega;
a[2] = 1 - alpha;
} break;
case ALLPASS:
{
alpha = sinOmega / (2.0 * Q);
b[0] = 1 - alpha;
b[1] = -2 * cosOmega;
b[2] = 1 + alpha;
a[0] = b[2];
a[1] = b[1];
a[2] = b[0];
} break;
case NOTCH:
{
alpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);
b[0] = 1;
b[1] = -2 * cosOmega;
b[2] = 1;
a[0] = 1 + alpha;
a[1] = b[1];
a[2] = 1 - alpha;
} break;
case PEAK:
{
alpha = sinOmega * sinhf(logf(2.0) / 2.0 * Q * omega/sinOmega);
b[0] = 1 + (alpha * A);
b[1] = -2 * cosOmega;
b[2] = 1 - (alpha * A);
a[0] = 1 + (alpha / A);
a[1] = b[1];
a[2] = 1 - (alpha / A);
} break;
case LOW_SHELF:
{
alpha = sinOmega / 2.0 * sqrt( (A + 1.0 / A) * (1.0 / Q - 1.0) + 2.0);
b[0] = A * ((A + 1) - ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));
b[1] = 2 * A * ((A - 1) - ((A + 1) * cosOmega));
b[2] = A * ((A + 1) - ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));
a[0] = ((A + 1) + ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));
a[1] = -2 * ((A - 1) + ((A + 1) * cosOmega));
a[2] = ((A + 1) + ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));
} break;
case HIGH_SHELF:
{
alpha = sinOmega / 2.0 * sqrt( (A + 1.0 / A) * (1.0 / Q - 1.0) + 2.0);
b[0] = A * ((A + 1) + ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));
b[1] = -2 * A * ((A - 1) + ((A + 1) * cosOmega));
b[2] = A * ((A + 1) + ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));
a[0] = ((A + 1) - ((A - 1) * cosOmega) + (2 * sqrtf(A) * alpha));
a[1] = 2 * ((A - 1) - ((A + 1) * cosOmega));
a[2] = ((A + 1) - ((A - 1) * cosOmega) - (2 * sqrtf(A) * alpha));
} break;
}
// Normalize filter coefficients
float factor = 1.0f / a[0];
std::array<float, 2> aNorm;
std::array<float, 3> bNorm;
aNorm[0] = a[1] * factor;
aNorm[1] = a[2] * factor;
bNorm[0] = b[0] * factor;
bNorm[1] = b[1] * factor;
bNorm[2] = b[2] * factor;
SetBiquadCoefs(bNorm, aNorm);
}
// In Hertz, 0 to Nyquist
void SetCutoff(float c)
{
omega = HZ_TO_RAD(c) / sampleRate;
UpdateCoefficients();
}
float GetCutoff()
{
return omega;
}
// Arbitrary, from 0.01f to ~20
void SetQValue(float q)
{
Q = q;
UpdateCoefficients();
}
float GetQValue()
{
return Q;
}
void SetType(FilterType newType)
{
t = newType;
UpdateCoefficients();
}
FilterType GetType()
{
return t;
}
private:
float sampleRate;
float omega;
float cosOmega;
float sinOmega;
float Q;
float alpha;
float A;
std::array<float, 3> a;
std::array<float, 3> b;
FilterType t;
};
// +/-0.05dB above 9.2Hz @ 44,100Hz
class PinkingFilter
{
double b0, b1, b2, b3, b4, b5, b6;
public:
PinkingFilter() : b0(0), b1(0), b2(0), b3(0), b4(0), b5(0), b6(0) {}
float process(const float s)
{
b0 = 0.99886 * b0 + s * 0.0555179;
b1 = 0.99332 * b1 + s * 0.0750759;
b2 = 0.96900 * b2 + s * 0.1538520;
b3 = 0.86650 * b3 + s * 0.3104856;
b4 = 0.55000 * b4 + s * 0.5329522;
b5 = -0.7616 * b5 - s * 0.0168980;
const double pink = (b0 + b1 + b2 + b3 + b4 + b5 + b6 + (s * 0.5362)) * 0.11;
b6 = s * 0.115926;
return pink;
}
};
class BrowningFilter
{
float l;
public:
BrowningFilter() : l(0) {}
float process(const float s)
{
float brown = (l + (0.02f * s)) / 1.02f;
l = brown;
return brown * 3.5f; // compensate for gain
}
};
#endif
================================================
FILE: lib/MoogLadders/src/HuovilainenModel.h
================================================
// Based on implementation in CSound5 (LGPLv2.1)
// https://github.com/csound/csound/blob/develop/COPYING
#pragma once
#ifndef HUOVILAINEN_LADDER_H
#define HUOVILAINEN_LADDER_H
#include "LadderFilterBase.h"
/*
Huovilainen developed an improved and physically correct model of the Moog
Ladder filter that builds upon the work done by Smith and Stilson. This model
inserts nonlinearities inside each of the 4 one-pole sections on account of the
smoothly saturating function of analog transistors. The base-emitter voltages of
the transistors are considered with an experimental value of 1.22070313 which
maintains the characteristic sound of the analog Moog. This model also permits
self-oscillation for resonances greater than 1. The model depends on five
hyperbolic tangent functions (tanh) for each sample, and an oversampling factor
of two (preferably higher, if possible). Although a more faithful
representation of the Moog ladder, these dependencies increase the processing
time of the filter significantly. Lastly, a half-sample delay is introduced for
phase compensation at the final stage of the filter.
References: Huovilainen (2004), Huovilainen (2010), DAFX - Zolzer (ed) (2nd ed)
Original implementation: Victor Lazzarini for CSound5
Considerations for oversampling:
http://music.columbia.edu/pipermail/music-dsp/2005-February/062778.html
http://www.synthmaker.co.uk/dokuwiki/doku.php?id=tutorials:oversampling
*/
class HuovilainenMoog : public LadderFilterBase
{
public:
HuovilainenMoog(float sampleRate) : LadderFilterBase(sampleRate), thermal(0.000025)
{
memset(stage, 0, sizeof(stage));
memset(delay, 0, sizeof(delay));
memset(stageTanh, 0, sizeof(stageTanh));
SetCutoff(1000.0f);
SetResonance(0.10f);
}
virtual ~HuovilainenMoog()
{
}
virtual void Process(float * samples, uint32_t n) override
{
for (int s = 0; s < n; ++s)
{
// Oversample
for (int j = 0; j < 2; j++)
{
float input = samples[s] - resQuad * delay[5];
delay[0] = stage[0] = delay[0] + tune * (tanh(input * thermal) - stageTanh[0]);
for (int k = 1; k < 4; k++)
{
input = stage[k-1];
stage[k] = delay[k] + tune * ((stageTanh[k-1] = tanh(input * thermal)) - (k != 3 ? stageTanh[k] : tanh(delay[k] * thermal)));
delay[k] = stage[k];
}
// 0.5 sample delay for phase compensation
delay[5] = (stage[3] + delay[4]) * 0.5;
delay[4] = stage[3];
}
samples[s] = delay[5];
}
}
virtual void SetResonance(float r) override
{
resonance = r;
resQuad = 4.0 * resonance * acr;
}
virtual void SetCutoff(float c) override
{
cutoff = c;
double fc = cutoff / sampleRate;
double f = fc * 0.5; // oversampled
double fc2 = fc * fc;
double fc3 = fc * fc * fc;
double fcr = 1.8730 * fc3 + 0.4955 * fc2 - 0.6490 * fc + 0.9988;
acr = -3.9364 * fc2 + 1.8409 * fc + 0.9968;
tune = (1.0 - exp(-((2 * MOOG_PI) * f * fcr))) / thermal;
SetResonance(resonance);
}
private:
double stage[4];
double stageTanh[3];
double delay[6];
double thermal;
double tune;
double acr;
double resQuad;
};
#endif
================================================
FILE: lib/MoogLadders/src/ImprovedModel.h
================================================
/*
Copyright 2012 Stefano D'Angelo <zanga.mail@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#ifndef IMPROVED_LADDER_H
#define IMPROVED_LADDER_H
#include "LadderFilterBase.h"
/*
This model is based on a reference implementation of an algorithm developed by
Stefano D'Angelo and Vesa Valimaki, presented in a paper published at ICASSP in 2013.
This improved model is based on a circuit analysis and compared against a reference
Ngspice simulation. In the paper, it is noted that this particular model is
more accurate in preserving the self-oscillating nature of the real filter.
References: "An Improved Virtual Analog Model of the Moog Ladder Filter"
Original Implementation: D'Angelo, Valimaki
*/
// Thermal voltage (26 milliwats at room temperature)
#define VT 0.312
class ImprovedMoog : public LadderFilterBase
{
public:
ImprovedMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
memset(V, 0, sizeof(V));
memset(dV, 0, sizeof(dV));
memset(tV, 0, sizeof(tV));
drive = 1.0f;
SetCutoff(1000.0f); // normalized cutoff frequency
SetResonance(0.1f); // [0, 4]
}
virtual ~ImprovedMoog() { }
virtual void Process(float * samples, uint32_t n) override
{
double dV0, dV1, dV2, dV3;
for (int i = 0; i < n; i++)
{
dV0 = -g * (tanh((drive * samples[i] + resonance * V[3]) / (2.0 * VT)) + tV[0]);
V[0] += (dV0 + dV[0]) / (2.0 * sampleRate);
dV[0] = dV0;
tV[0] = tanh(V[0] / (2.0 * VT));
dV1 = g * (tV[0] - tV[1]);
V[1] += (dV1 + dV[1]) / (2.0 * sampleRate);
dV[1] = dV1;
tV[1] = tanh(V[1] / (2.0 * VT));
dV2 = g * (tV[1] - tV[2]);
V[2] += (dV2 + dV[2]) / (2.0 * sampleRate);
dV[2] = dV2;
tV[2] = tanh(V[2] / (2.0 * VT));
dV3 = g * (tV[2] - tV[3]);
V[3] += (dV3 + dV[3]) / (2.0 * sampleRate);
dV[3] = dV3;
tV[3] = tanh(V[3] / (2.0 * VT));
samples[i] = V[3];
}
}
virtual void SetResonance(float r) override
{
if (r > 1.0)
r = 1.0;
if (r < 0.001)
r = 0.001;
resonance = r * 6.844399855f;
}
virtual void SetCutoff(float c) override
{
#define CUTOFF_MAX (20000.0f)
cutoff = c;
if (cutoff > CUTOFF_MAX) {
cutoff = CUTOFF_MAX;
}
x = (MOOG_PI * cutoff) / sampleRate;
g = 4.0 * MOOG_PI * VT * cutoff * (1.0 - x) / (1.0 + x);
}
private:
double V[4];
double dV[4];
double tV[4];
double x;
double g;
double drive;
};
#endif
================================================
FILE: lib/MoogLadders/src/KrajeskiModel.h
================================================
#pragma once
#ifndef KRAJESKI_LADDER_H
#define KRAJESKI_LADDER_H
#include "LadderFilterBase.h"
#include "Util.h"
/*
This class implements Tim Stilson's MoogVCF filter
using 'compromise' poles at z = -0.3
Several improments are built in, such as corrections
for cutoff and resonance parameters, removal of the
necessity of the separation table, audio rate update
of cutoff and resonance and a smoothly saturating
tanh() function, clamping output and creating inherent
nonlinearities.
This code is Unlicensed (i.e. public domain); in an email exchange on
4.21.2018 Aaron Krajeski stated: "That work is under no copyright.
You may use it however you might like."
Source: http://song-swap.com/MUMT618/aaron/Presentation/demo.html
*/
class KrajeskiMoog final : public LadderFilterBase
{
public:
KrajeskiMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
memset(state, 0, sizeof(state));
memset(delay, 0, sizeof(delay));
drive = 1.0;
gComp = 1.0;
SetCutoff(1000.0f);
SetResonance(0.1f);
}
virtual ~KrajeskiMoog() { }
virtual void Process(float * samples, const uint32_t n) override
{
for (int s = 0; s < n; ++s)
{
state[0] = tanh(drive * (samples[s] - 4 * gRes * (state[4] - gComp * samples[s])));
for(int i = 0; i < 4; i++)
{
state[i+1] = fclamp(g * (0.3 / 1.3 * state[i] + 1 / 1.3 * delay[i] - state[i + 1]) + state[i + 1], -1e30, 1e30);
delay[i] = state[i];
}
samples[s] = state[4];
}
}
virtual void SetResonance(float r) override
{
resonance = r;
gRes = resonance * (1.0029 + 0.0526 * wc - 0.926 * pow(wc, 2) + 0.0218 * pow(wc, 3));
}
virtual void SetCutoff(float c) override
{
cutoff = c;
wc = 2 * MOOG_PI * cutoff / sampleRate;
g = 0.9892 * wc - 0.4342 * pow(wc, 2) + 0.1381 * pow(wc, 3) - 0.0202 * pow(wc, 4);
}
private:
double state[5];
double delay[5];
double wc; // The angular frequency of the cutoff.
double g; // A derived parameter for the cutoff frequency
double gRes; // A similar derived parameter for resonance.
double gComp; // Compensation factor.
double drive; // A parameter that controls intensity of nonlinearities.
inline float fclamp(float in, float min, float max){
return fmin(fmax(in, min), max);
}
};
#endif
================================================
FILE: lib/MoogLadders/src/LadderFilterBase.h
================================================
#pragma once
#ifndef LADDER_FILTER_BASE_H
#define LADDER_FILTER_BASE_H
#include "Util.h"
class LadderFilterBase
{
public:
LadderFilterBase(float sampleRate) : sampleRate(sampleRate) {}
virtual ~LadderFilterBase() {}
virtual void Process(float * samples, uint32_t n) = 0;
virtual void SetResonance(float r) = 0;
virtual void SetCutoff(float c) = 0;
float GetResonance() { return resonance; }
float GetCutoff() { return cutoff; }
protected:
float cutoff;
float resonance;
float sampleRate;
};
#endif
================================================
FILE: lib/MoogLadders/src/MicrotrackerModel.h
================================================
// Based on an implementation by Magnus Jonsson
// https://github.com/magnusjonsson/microtracker (unlicense)
#pragma once
#ifndef MICROTRACKER_MODEL_H
#define MICROTRACKER_MODEL_H
#include "LadderFilterBase.h"
#include "Util.h"
class MicrotrackerMoog : public LadderFilterBase
{
public:
MicrotrackerMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
p0 = p1 = p2 = p3 = p32 = p33 = p34 = 0.0;
SetCutoff(1000.0f);
SetResonance(0.10f);
}
virtual ~MicrotrackerMoog() {}
virtual void Process(float * samples, uint32_t n) override
{
double k = resonance * 4;
for (int s = 0; s < n; ++s)
{
// Coefficients optimized using differential evolution
// to make feedback gain 4.0 correspond closely to the
// border of instability, for all values of omega.
double out = p3 * 0.360891 + p32 * 0.417290 + p33 * 0.177896 + p34 * 0.0439725;
p34 = p33;
p33 = p32;
p32 = p3;
p0 += (fast_tanh(samples[s] - k * out) - fast_tanh(p0)) * cutoff;
p1 += (fast_tanh(p0) - fast_tanh(p1)) * cutoff;
p2 += (fast_tanh(p1) - fast_tanh(p2)) * cutoff;
p3 += (fast_tanh(p2) - fast_tanh(p3)) * cutoff;
samples[s] = out;
}
}
virtual void SetResonance(float r) override
{
resonance = r;
}
virtual void SetCutoff(float c) override
{
cutoff = c * 2 * MOOG_PI / sampleRate;
cutoff = moog_min(cutoff, 1);
}
private:
double p0;
double p1;
double p2;
double p3;
double p32;
double p33;
double p34;
};
#endif
================================================
FILE: lib/MoogLadders/src/MusicDSPModel.h
================================================
// This file is unlicensed and uncopyright as found at:
// http://www.musicdsp.org/showone.php?id=24
// Considering how widely this same code has been used in ~100 projects on GitHub with
// various licenses, it might be reasonable to suggest that the license is CC-BY-SA
#pragma once
#ifndef MUSICDSP_MOOG_H
#define MUSICDSP_MOOG_H
#include "LadderFilterBase.h"
#include "Util.h"
class MusicDSPMoog : public LadderFilterBase
{
public:
MusicDSPMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
memset(stage, 0, sizeof(stage));
memset(delay, 0, sizeof(delay));
SetCutoff(1000.0f);
SetResonance(0.10f);
}
virtual ~MusicDSPMoog()
{
}
virtual void Process(float * samples, uint32_t n) override
{
for (int s = 0; s < n; ++s)
{
float x = samples[s] - resonance * stage[3];
// Four cascaded one-pole filters (bilinear transform)
stage[0] = x * p + delay[0] * p - k * stage[0];
stage[1] = stage[0] * p + delay[1] * p - k * stage[1];
stage[2] = stage[1] * p + delay[2] * p - k * stage[2];
stage[3] = stage[2] * p + delay[3] * p - k * stage[3];
// Clipping band-limited sigmoid
stage[3] -= (stage[3] * stage[3] * stage[3]) / 6.0;
delay[0] = x;
delay[1] = stage[0];
delay[2] = stage[1];
delay[3] = stage[2];
samples[s] = stage[3];
}
}
virtual void SetResonance(float r) override
{
resonance = r * (t2 + 6.0 * t1) / (t2 - 6.0 * t1);
}
virtual void SetCutoff(float c) override
{
cutoff = 2.0 * c / sampleRate;
p = cutoff * (1.8 - 0.8 * cutoff);
k = 2.0 * sin(cutoff * MOOG_PI * 0.5) - 1.0;
t1 = (1.0 - p) * 1.386249;
t2 = 12.0 + t1 * t1;
SetResonance(resonance);
}
private:
double stage[4];
double delay[4];
double p;
double k;
double t1;
double t2;
};
#endif
================================================
FILE: lib/MoogLadders/src/NoiseGenerator.h
================================================
#pragma once
#ifndef NOISE_GENERATOR_H
#define NOISE_GENERATOR_H
#include <vector>
#include <stdint.h>
#include <exception>
#include <array>
#include <random>
#include "Util.h"
#include "Filters.h"
struct WhiteNoiseSource
{
WhiteNoiseSource() : dist(-1, 1) {}
std::mt19937 engine;
std::uniform_real_distribution<float> dist;
};
// Full spectrum noise
struct WhiteNoise : public WhiteNoiseSource
{
float operator()() { return dist(engine); }
};
// Pink noise has a decrease of 3dB/Octave
struct PinkNoise : public WhiteNoiseSource
{
float operator()() { return f.process(dist(engine)); }
PinkingFilter f;
};
// Brown noise has a decrease of 6dB/Octave
struct BrownNoise : public WhiteNoiseSource
{
float operator()() { return f.process(dist(engine)); }
BrowningFilter f;
};
// Note! This noise is only valid for 44100 because of the hard-coded filter coefficients
struct NoiseGenerator
{
enum NoiseType
{
WHITE,
PINK,
BROWN,
};
std::vector<float> produce(NoiseType t, int sampleRate, int channels, float seconds)
{
int samplesToGenerate = sampleRate * seconds * channels;
std::vector<float> samples;
samples.resize(samplesToGenerate);
switch (t)
{
case NoiseType::WHITE:
{
WhiteNoise n;
for(int s = 0; s < samplesToGenerate; s++) samples[s] = n();
} break;
case NoiseType::PINK:
{
PinkNoise n;
for(int s = 0; s < samplesToGenerate; s++) samples[s] = n();
} break;
case NoiseType::BROWN:
{
BrownNoise n;
for(int s = 0; s < samplesToGenerate; s++) samples[s] = n();
} break;
default: throw std::runtime_error("Invalid noise type");
}
return samples;
}
};
#endif
================================================
FILE: lib/MoogLadders/src/OberheimVariationModel.h
================================================
// See: http://www.willpirkle.com/forum/licensing-and-book-code/licensing-and-using-book-code/
// The license is "You may also use the code from the FX and Synth books without licensing or fees.
// The code is for you to develop your own plugins for your own use or for commercial use."
#pragma once
#ifndef OBERHEIM_VARIATION_LADDER_H
#define OBERHEIM_VARIATION_LADDER_H
#include "LadderFilterBase.h"
#include "Util.h"
class VAOnePole
{
public:
VAOnePole(float sr) : sampleRate(sr)
{
Reset();
}
void Reset()
{
alpha = 1.0;
beta = 0.0;
gamma = 1.0;
delta = 0.0;
epsilon = 0.0;
a0 = 1.0;
feedback = 0.0;
z1 = 0.0;
}
double Tick(double s)
{
s = s * gamma + feedback + epsilon * GetFeedbackOutput();
double vn = (a0 * s - z1) * alpha;
double out = vn + z1;
z1 = vn + out;
return out;
}
void SetFeedback(double fb) { feedback = fb; }
double GetFeedbackOutput(){ return beta * (z1 + feedback * delta); }
void SetAlpha(double a) { alpha = a; };
void SetBeta(double b) { beta = b; };
private:
float sampleRate;
double alpha;
double beta;
double gamma;
double delta;
double epsilon;
double a0;
double feedback;
double z1;
};
class OberheimVariationMoog : public LadderFilterBase
{
public:
OberheimVariationMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
LPF1 = new VAOnePole(sampleRate);
LPF2 = new VAOnePole(sampleRate);
LPF3 = new VAOnePole(sampleRate);
LPF4 = new VAOnePole(sampleRate);
saturation = 1.0;
Q = 3.0;
SetCutoff(1000.f);
SetResonance(0.1f);
}
virtual ~OberheimVariationMoog()
{
delete LPF1;
delete LPF2;
delete LPF3;
delete LPF4;
}
virtual void Process(float * samples, uint32_t n) noexcept override
{
for (int s = 0; s < n; ++s)
{
float input = samples[s];
double sigma =
LPF1->GetFeedbackOutput() +
LPF2->GetFeedbackOutput() +
LPF3->GetFeedbackOutput() +
LPF4->GetFeedbackOutput();
input *= 1.0 + K;
// calculate input to first filter
double u = (input - K * sigma) * alpha0;
u = tanh(saturation * u);
double stage1 = LPF1->Tick(u);
double stage2 = LPF2->Tick(stage1);
double stage3 = LPF3->Tick(stage2);
double stage4 = LPF4->Tick(stage3);
// Oberheim variations
samples[s] =
oberheimCoefs[0] * u +
oberheimCoefs[1] * stage1 +
oberheimCoefs[2] * stage2 +
oberheimCoefs[3] * stage3 +
oberheimCoefs[4] * stage4;
}
}
virtual void SetResonance(float r) override
{
// this maps resonance = 1->10 to K = 0 -> 4
K = (4.0) * (r - 1.0)/(10.0 - 1.0);
}
virtual void SetCutoff(float c) override
{
cutoff = c;
// prewarp for BZT
double wd = 2.0 * MOOG_PI * cutoff;
double T = 1.0 / sampleRate;
double wa = (2.0 / T) * tan(wd * T / 2.0);
double g = wa * T / 2.0;
// Feedforward coeff
double G = g / (1.0 + g);
LPF1->SetAlpha(G);
LPF2->SetAlpha(G);
LPF3->SetAlpha(G);
LPF4->SetAlpha(G);
LPF1->SetBeta(G*G*G / (1.0 + g));
LPF2->SetBeta(G*G / (1.0 + g));
LPF3->SetBeta(G / (1.0 + g));
LPF4->SetBeta(1.0 / (1.0 + g));
gamma = G*G*G*G;
alpha0 = 1.0 / (1.0 + K * gamma);
// Oberheim variations / LPF4
oberheimCoefs[0] = 0.0;
oberheimCoefs[1] = 0.0;
oberheimCoefs[2] = 0.0;
oberheimCoefs[3] = 0.0;
oberheimCoefs[4] = 1.0;
}
private:
VAOnePole * LPF1;
VAOnePole * LPF2;
VAOnePole * LPF3;
VAOnePole * LPF4;
double K;
double gamma;
double alpha0;
double Q;
double saturation;
double oberheimCoefs[5];
};
#endif
================================================
FILE: lib/MoogLadders/src/RKSimulationModel.h
================================================
/*
Copyright (c) 2015, Miller Puckette. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#ifndef RK_SIMULATION_LADDER_H
#define RK_SIMULATION_LADDER_H
#include "LadderFilterBase.h"
#include "Util.h"
/*
Imitates a Moog resonant filter by Runge-Kutte numerical integration of
a differential equation approximately describing the dynamics of the circuit.
Useful references:
* Tim Stilson
"Analyzing the Moog VCF with Considerations for Digital Implementation"
Sections 1 and 2 are a reasonably good introduction but the
model they use is highly idealized.
* Timothy E. Stinchcombe
"Analysis of the Moog Transistor Ladder and Derivative Filters"
Long, but a very thorough description of how the filter works including
its nonlinearities
* Antti Huovilainen
"Non-linear digital implementation of the moog ladder filter"
Comes close to giving a differential equation for a reasonably realistic
model of the filter
The differential equations are:
y1' = k * (S(x - r * y4) - S(y1))
y2' = k * (S(y1) - S(y2))
y3' = k * (S(y2) - S(y3))
y4' = k * (S(y3) - S(y4))
where k controls the cutoff frequency, r is feedback (<= 4 for stability), and S(x) is a saturation function.
*/
class RKSimulationMoog : public LadderFilterBase
{
public:
RKSimulationMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
memset(state, 0, sizeof(state));
saturation = 3.0;
saturationInv = 1.0 / saturation;
oversampleFactor = 1;
stepSize = 1.0 / (oversampleFactor * sampleRate);
SetCutoff(1000.f);
SetResonance(1.0f);
}
virtual ~RKSimulationMoog()
{
}
virtual void Process(float * samples, uint32_t n) override
{
for (int s = 0; s < n; ++s)
{
for (int j = 0; j < oversampleFactor; j++)
{
rungekutteSolver(samples[s], state);
}
samples[s] = state[3];
}
}
virtual void SetResonance(float r) override
{
// 0 to 10
resonance = r;
}
virtual void SetCutoff(float c) override
{
cutoff = (2.0 * MOOG_PI * c);
}
private:
void calculateDerivatives(float input, double * dstate, double * state)
{
double satstate0 = clip(state[0], saturation, saturationInv);
double satstate1 = clip(state[1], saturation, saturationInv);
double satstate2 = clip(state[2], saturation, saturationInv);
dstate[0] = cutoff * (clip(input - resonance * state[3], saturation, saturationInv) - satstate0);
dstate[1] = cutoff * (satstate0 - satstate1);
dstate[2] = cutoff * (satstate1 - satstate2);
dstate[3] = cutoff * (satstate2 - clip(state[3], saturation, saturationInv));
}
void rungekutteSolver(float input, double * state)
{
int i;
double deriv1[4], deriv2[4], deriv3[4], deriv4[4], tempState[4];
calculateDerivatives(input, deriv1, state);
for (i = 0; i < 4; i++)
tempState[i] = state[i] + 0.5 * stepSize * deriv1[i];
calculateDerivatives(input, deriv2, tempState);
for (i = 0; i < 4; i++)
tempState[i] = state[i] + 0.5 * stepSize * deriv2[i];
calculateDerivatives(input, deriv3, tempState);
for (i = 0; i < 4; i++)
tempState[i] = state[i] + stepSize * deriv3[i];
calculateDerivatives(input, deriv4, tempState);
for (i = 0; i < 4; i++)
state[i] += (1.0 / 6.0) * stepSize * (deriv1[i] + 2.0 * deriv2[i] + 2.0 * deriv3[i] + deriv4[i]);
}
double state[4];
double saturation, saturationInv;
int oversampleFactor;
double stepSize;
};
#endif
================================================
FILE: lib/MoogLadders/src/SimplifiedModel.h
================================================
/* -------------------------------------------------------------------------
* This source code is provided without any warranties as published in
* DAFX book 2nd edition, copyright Wiley & Sons 2011, available at
* http://www.dafx.de. It may be used for educational purposes and not
* for commercial applications without further permission.
* -------------------------------------------------------------------------
*/
#pragma once
#ifndef SIMPLIFIED_LADDER_H
#define SIMPLIFIED_LADDER_H
#include "LadderFilterBase.h"
/*
The simplified nonlinear Moog filter is based on the full Huovilainen model,
with five nonlinear (tanh) functions (4 first-order sections and a feedback).
Like the original, this model needs an oversampling factor of at least two when
these nonlinear functions are used to reduce possible aliasing. This model
maintains the ability to self oscillate when the feedback gain is >= 1.0.
References: DAFX - Zolzer (ed) (2nd ed)
Original implementation: Valimaki, Bilbao, Smith, Abel, Pakarinen, Berners (DAFX)
This is a transliteration into C++ of the original matlab source (moogvcf.m)
Considerations for oversampling:
http://music.columbia.edu/pipermail/music-dsp/2005-February/062778.html
http://www.synthmaker.co.uk/dokuwiki/doku.php?id=tutorials:oversampling
*/
class SimplifiedMoog : public LadderFilterBase
{
public:
SimplifiedMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
// To keep the overall level approximately constant, comp should be set
// to 0.5 resulting in a 6 dB passband gain decrease at the maximum resonance
// (compared to a 12 dB decrease in the original Moog model
gainCompensation = 0.5;
memset(stage, 0, sizeof(stage));
memset(stageZ1, 0, sizeof(stageZ1));
memset(stageTanh, 0, sizeof(stageTanh));
SetCutoff(1000.0f);
SetResonance(0.10f);
}
virtual ~SimplifiedMoog()
{
}
// This system is nonlinear so we are probably going to create a signal with components that exceed nyquist.
// To prevent aliasing distortion, we need to oversample this processing chunk. Where do these extra samples
// come from? Todo! We can use polynomial interpolation to generate the extra samples, but this is expensive.
// The cheap solution is to zero-stuff the incoming sample buffer.
// With resampling, numSamples should be 2x the frame size of the existing sample rate.
// The output of this filter needs to be run through a decimator to return to the original samplerate.
virtual void Process(float * samples, uint32_t n) override
{
// Processing still happens at sample rate...
for (int s = 0; s < n; ++s)
{
for (int stageIdx = 0; stageIdx < 4; ++stageIdx)
{
if (stageIdx)
{
input = stage[stageIdx-1];
stageTanh[stageIdx-1] = tanh(input);
stage[stageIdx] = (h * stageZ1[stageIdx] + h0 * stageTanh[stageIdx-1]) + (1.0 - g) * (stageIdx != 3 ? stageTanh[stageIdx] : tanh(stageZ1[stageIdx]));
}
else
{
input = samples[s] - ((4.0 * resonance) * (output - gainCompensation * samples[s]));
stage[stageIdx] = (h * tanh(input) + h0 * stageZ1[stageIdx]) + (1.0 - g) * stageTanh[stageIdx];
}
stageZ1[stageIdx] = stage[stageIdx];
}
output = stage[3];
SNAP_TO_ZERO(output);
samples[s] = output;
}
}
virtual void SetResonance(float r) override
{
resonance = r;
}
virtual void SetCutoff(float c) override
{
cutoff = c;
// Not being oversampled at the moment... * 2 when functional
float fs2 = sampleRate;
// Normalized cutoff [0, 1] in radians: ((2*pi) * cutoff / samplerate)
g = (2 * MOOG_PI) * cutoff / fs2; // feedback coefficient at fs*2 because of doublesampling
g *= MOOG_PI / 1.3; // correction factor that allows _cutoff to be supplied Hertz
// FIR part with gain g
h = g / 1.3;
h0 = g * 0.3 / 1.3;
}
private:
double output;
double lastStage;
double stage[4];
double stageZ1[4];
double stageTanh[3];
double input;
double h;
double h0;
double g;
float gainCompensation;
};
#endif
================================================
FILE: lib/MoogLadders/src/StilsonModel.h
================================================
// Copyright (c) 2003, David Lowenfels
// Released as the moog~ pd extern.
// This code is Unlicensed (i.e. public domain); in an email exchange on
// 6.14.2019 David Lowenfels stated "You're welcome to use the Moog~ code,
// license it free as in beer or whatever :)"
#pragma once
#ifndef STILSON_LADDER_H
#define STILSON_LADDER_H
#include "LadderFilterBase.h"
/*
A digital model of the classic Moog filter was presented first by Stilson and
Smith. This model uses a cascade of one-pole IIR filters in series with a global
feedback to produce resonance. A digital realization of this filter introduces a
unit delay, effectively making it a fifth-order filter. Unfortunately, this
delay also has the effect of coupling the cutoff and resonance parameters,
uncharacteristic of the uncoupled control of the original Moog ladder. As a
compromise, a zero can be inserted at z = -0.3 inside each one pole section to
minimize the coupling the parameters (humans are not particularly sensitive to
variations in Q factor). Although fast coefficient updates can be achieved since
the nonlinearities of the Moog are not considered, the filter becomes unstable
with very large resonance values and does not enter self-oscillation.
References: Stilson and Smith (1996), DAFX - Zolzer (ed) (2nd ed)
Original implementation: Tim Stilson, David Lowenfels
*/
static float S_STILSON_GAINTABLE[199] =
{
0.999969, 0.990082, 0.980347, 0.970764, 0.961304, 0.951996, 0.94281, 0.933777, 0.924866, 0.916077,
0.90741, 0.898865, 0.890442, 0.882141 , 0.873962, 0.865906, 0.857941, 0.850067, 0.842346, 0.834686,
0.827148, 0.819733, 0.812378, 0.805145, 0.798004, 0.790955, 0.783997, 0.77713, 0.770355, 0.763672,
0.75708 , 0.75058, 0.744141, 0.737793, 0.731537, 0.725342, 0.719238, 0.713196, 0.707245, 0.701355,
0.695557, 0.689819, 0.684174, 0.678558, 0.673035, 0.667572, 0.66217, 0.65686, 0.651581, 0.646393,
0.641235, 0.636169, 0.631134, 0.62619, 0.621277, 0.616425, 0.611633, 0.606903, 0.602234, 0.597626,
0.593048, 0.588531, 0.584045, 0.579651, 0.575287 , 0.570953, 0.566681, 0.562469, 0.558289, 0.554169,
0.550079, 0.546051, 0.542053, 0.538116, 0.53421, 0.530334, 0.52652, 0.522736, 0.518982, 0.515289,
0.511627, 0.507996 , 0.504425, 0.500885, 0.497375, 0.493896, 0.490448, 0.487061, 0.483704, 0.480377,
0.477081, 0.473816, 0.470581, 0.467377, 0.464203, 0.46109, 0.457977, 0.454926, 0.451874, 0.448883,
0.445892, 0.442932, 0.440033, 0.437134, 0.434265, 0.431427, 0.428619, 0.425842, 0.423096, 0.42038,
0.417664, 0.415009, 0.412354, 0.409729, 0.407135, 0.404572, 0.402008, 0.399506, 0.397003, 0.394501,
0.392059, 0.389618, 0.387207, 0.384827, 0.382477, 0.380127, 0.377808, 0.375488, 0.37323, 0.370972,
0.368713, 0.366516, 0.364319, 0.362122, 0.359985, 0.357849, 0.355713, 0.353607, 0.351532, 0.349457,
0.347412, 0.345398, 0.343384, 0.34137, 0.339417, 0.337463, 0.33551, 0.333588, 0.331665, 0.329773,
0.327911, 0.32605, 0.324188, 0.322357, 0.320557, 0.318756, 0.316986, 0.315216, 0.313446, 0.311707,
0.309998, 0.308289, 0.30658, 0.304901, 0.303223, 0.301575, 0.299927, 0.298309, 0.296692, 0.295074,
0.293488, 0.291931, 0.290375, 0.288818, 0.287262, 0.285736, 0.284241, 0.282715, 0.28125, 0.279755,
0.27829, 0.276825, 0.275391, 0.273956, 0.272552, 0.271118, 0.269745, 0.268341, 0.266968, 0.265594,
0.264252, 0.262909, 0.261566, 0.260223, 0.258911, 0.257599, 0.256317, 0.255035, 0.25375
};
class StilsonMoog : public LadderFilterBase
{
public:
StilsonMoog(float sampleRate) : LadderFilterBase(sampleRate)
{
memset(state, 0, sizeof(state));
SetCutoff(1000.0f);
SetResonance(0.10f);
}
virtual ~StilsonMoog()
{
}
virtual void Process(float * samples, uint32_t n) override
{
float localState;
for (int s = 0; s < n; ++s)
{
// Scale by arbitrary value on account of our saturation function
const float input = samples[s] * 0.65f;
// Negative Feedback
output = 0.25 * (input - output);
for (int pole = 0; pole < 4; ++pole)
{
localState = state[pole];
output = moog_saturate(output + p * (output - localState));
state[pole] = output;
output = moog_saturate(output + localState);
}
SNAP_TO_ZERO(output);
samples[s] = output;
output *= Q; // Scale stateful output by Q
}
}
virtual void SetResonance(float r) override
{
r = moog_min(r, 1);
resonance = r;
double ix;
double ixfrac;
int ixint;
ix = p * 99;
ixint = floor(ix);
ixfrac = ix - ixint;
Q = r * moog_lerp(ixfrac, S_STILSON_GAINTABLE[ixint + 99], S_STILSON_GAINTABLE[ixint + 100]);
}
virtual void SetCutoff(float c) override
{
cutoff = c;
// Normalized cutoff between [0, 1]
double fc = (cutoff) / sampleRate;
double x2 = fc * fc;
double x3 = fc * fc * fc;
// Frequency & amplitude correction (Cubic Fit)
p = -0.69346 * x3 - 0.59515 * x2 + 3.2937 * fc - 1.0072;
SetResonance(resonance);
}
private:
double p;
double Q;
double state[4];
double output;
};
#endif
================================================
FILE: lib/MoogLadders/src/Util.h
================================================
#pragma once
#ifndef MOOG_UTIL_H
#define MOOG_UTIL_H
#include <cmath>
#include <stdint.h>
#define MOOG_E 2.71828182845904523536028747135266250
#define MOOG_LOG2E 1.44269504088896340735992468100189214
#define MOOG_LOG10E 0.434294481903251827651128918916605082
#define MOOG_LN2 0.693147180559945309417232121458176568
#define MOOG_LN10 2.30258509299404568401799145468436421
#define MOOG_PI 3.14159265358979323846264338327950288
#define MOOG_PI_2 1.57079632679489661923132169163975144
#define MOOG_PI_4 0.785398163397448309615660845819875721
#define MOOG_1_PI 0.318309886183790671537767526745028724
#define MOOG_2_PI 0.636619772367581343075535053490057448
#define MOOG_2_SQRTPI 1.12837916709551257389615890312154517
#define MOOG_SQRT2 1.41421356237309504880168872420969808
#define MOOG_SQRT1_2 0.707106781186547524400844362104849039
#define MOOG_INV_PI_2 0.159154943091895
#define NO_COPY(C) C(const C &) = delete; C & operator = (const C &) = delete
#define NO_MOVE(C) NO_COPY(C); C(C &&) = delete; C & operator = (const C &&) = delete
#define SNAP_TO_ZERO(n) if (! (n < -1.0e-8 || n > 1.0e-8)) n = 0;
// Linear interpolation, used to crossfade a gain table
inline float moog_lerp(float amount, float a, float b)
{
return (1.0f - amount) * a + amount * b;
}
inline float moog_min(float a, float b)
{
a = b - a;
a += fabs(a);
a *= 0.5f;
a = b - a;
return a;
}
// Clamp without branching
// If input - _limit < 0, then it really substracts, and the 0.5 to make it half the 2 inputs.
// If > 0 then they just cancel, and keeps input normal.
// The easiest way to understand it is check what happends on both cases.
inline float moog_saturate(float input)
{
float x1 = fabs(input + 0.95f);
float x2 = fabs(input - 0.95f);
return 0.5f * (x1 - x2);
}
// Imitate the (tanh) clipping function of a transistor pair.
// to 4th order, tanh is x - x*x*x/3; this cubic's
// plateaus are at +/- 1 so clip to 1 and evaluate the cubic.
// This is pretty coarse - for instance if you clip a sinusoid this way you
// can sometimes hear the discontinuity in 4th derivative at the clip point
inline float clip(float value, float saturation, float saturationinverse)
{
float v2 = (value * saturationinverse > 1 ? 1 :
(value * saturationinverse < -1 ? -1:
value * saturationinverse));
return (saturation * (v2 - (1./3.) * v2 * v2 * v2));
}
#define HZ_TO_RAD(f) (MOOG_PI_2 * f)
#define RAD_TO_HZ(omega) (MOOG_INV_PI_2 * omega)
#ifdef __GNUC__
#define ctz(N) __builtin_ctz(N)
#else
template<typename T>
inline int ctz(T x)
{
int p, b;
for (p = 0, b = 1; !(b & x); b <<= 1, ++p)
;
return p;
}
#endif
inline double fast_tanh(double x)
{
double x2 = x * x;
return x * (27.0 + x2) / (27.0 + 9.0 * x2);
}
#endif
================================================
FILE: lib/SAM/README.md
================================================
https://github.com/s-macke/SAM
SAM
===
Software Automatic Mouth - Tiny Speech Synthesizer
What is SAM?
============
Sam is a very small Text-To-Speech (TTS) program written in C, that runs on most popular platforms.
It is an adaption to C of the speech software SAM (Software Automatic Mouth) for the Commodore C64 published
in the year 1982 by Don't Ask Software (now SoftVoice, Inc.). It includes a Text-To-Phoneme converter called reciter and a Phoneme-To-Speech routine for the
final output. It is so small that it will work also on embedded computers. On my computer it takes
less than 39KB (much smaller on embedded devices as the executable-overhead is not necessary) of disk space and is a fully stand alone program.
For immediate output it uses the SDL-library, otherwise it can save .wav files.
An online version and executables for Windows can be found on the web site: http://simulationcorner.net/index.php?page=sam
Compile
=======
Simply type "make" in your command prompt.
In order to compile without SDL remove the SDL statements from the CFLAGS and LFLAGS variables in the file "Makefile".
It should compile on every UNIX-like operating system. For Windows you need Cygwin or MinGW( + libsdl).
Fork
====
Take a look at https://github.com/vidarh/SAM for a more refactored and cleaner version of the code.
Usage
=====
type
./sam I am Sam
for the first output.
If you have disabled SDL try
./sam -wav i_am_sam.wav I am Sam
to get a wav file. This file can be played by many media players available for the PC.
you can try other options like
-pitch number
-speed number
-throat number
-mouth number
Some typical values written in the original manual are:
DESCRIPTION SPEED PITCH THROAT MOUTH
Elf 72 64 110 160
Little Robot 92 60 190 190
Stuffy Guy 82 72 110 105
Little Old Lady 82 32 145 145
Extra-Terrestrial 100 64 150 200
SAM 72 64 128 128
It can even sing
look at the file "sing"
for a small example.
For the phoneme input table look in the Wiki.
A description of additional features can be found in the original manual at
http://www.retrobits.net/atari/sam.shtml
or in the manual of the equivalent Apple II program
http://www.apple-iigs.info/newdoc/sam.pdf
Adaption To C
=============
This program (disassembly at http://hitmen.c02.at/html/tools_sam.html) was converted semi-automatic into C by converting each assembler opcode.
e. g.
lda 56 => A = mem[56];
jmp 38018 => goto pos38018;
inc 38 => mem[38]++;
. .
. .
Then it was manually rewritten to remove most of the
jumps and register variables in the code and rename the variables to proper names.
Most of the description below is a result of this rewriting process.
Unfortunately it is still unreadable. But you should see from where I started :)
Short description
=================
First of all I will limit myself here to a very coarse description.
There are very many exceptions defined in the source code that I will not explain.
Also a lot of code is unknown for me e. g. Code47503.
For a complete understanding of the code I need more time and especially more eyes have a look on the code.
Reciter
-------
It changes the english text to phonemes by a ruleset shown in the wiki.
The rule
" ANT(I)", "AY",
means that if he find an "I" with previous letters " ANT", exchange the I by the phoneme "AY".
There are some special signs in this rules like
#
&
@
^
+
:
%
which can mean e. g. that there must be a vocal or a consonant or something else.
With the -debug option you will get the corresponding rules and the resulting phonemes.
Output
------
Here is the full tree of subroutine calls:
SAMMain()
Parser1()
Parser2()
Insert()
CopyStress()
SetPhonemeLength()
Code48619()
Code41240()
Insert()
Code48431()
Insert()
Code48547
Code47574
Special1
Code47503
Code48227
SAMMain() is the entry routine and calls all further routines.
Parser1 transforms the phoneme input and transforms it to three tables
phonemeindex[]
stress[]
phonemelength[] (zero at this moment)
This tables are now changed:
Parser2 exchanges some phonemes by others and inserts new.
CopyStress adds 1 to the stress under some circumstances
SetPhonemeLength sets phoneme lengths.
Code48619 changes the phoneme lengths
Code41240 adds some additional phonemes
Code48431 has some extra rules
The wiki shows all possible phonemes and some flag fields.
The final content of these tables can be seen with the -debug command.
In the function PrepareOutput() these tables are partly copied into the small tables:
phonemeindexOutput[]
stressOutput[]
phonemelengthOutput[]
for output.
Final Output
------------
Except of some special phonemes the output is build by a linear combination:
A = A1 * sin ( f1 * t ) +
A2 * sin ( f2 * t ) +
A3 * rect( f3 * t )
where rect is a rectangular function with the same periodicity like sin.
It seems really strange, but this is really enough for most types of phonemes.
Therefore the above phonemes are converted with some tables to
pitches[]
frequency1[] = f1
frequency2[] = f2
frequency3[] = f3
amplitude1[] = A1
amplitude2[] = A2
amplitude3[] = A3
Above formula is calculated in one very good omptimized routine.
It only consist of 26 commands:
48087: LDX 43 ; get phase
CLC
LDA 42240,x ; load sine value (high 4 bits)
ORA TabAmpl1,y ; get amplitude (in low 4 bits)
TAX
LDA 42752,x ; multiplication table
STA 56 ; store
LDX 42 ; get phase
LDA 42240,x ; load sine value (high 4 bits)
ORA TabAmpl2,y ; get amplitude (in low 4 bits)
TAX
LDA 42752,x ; multiplication table
ADC Var56 ; add with previous values
STA 56 ; and store
LDX 41 ; get phase
LDA 42496,x ; load rect value (high 4 bits)
ORA TabAmpl3,y ; get amplitude (in low 4 bits)
TAX
LDA 42752,x ; multiplication table
ADC 56 ; add with previous values
ADC #136
LSR A ; get highest 4 bits
LSR A
LSR A
LSR A
STA 54296 ;SID main output command
The rest is handled in a special way. At the moment I cannot figure out in which way.
But it seems that it uses some noise (e. g. for "s") using a table with random values.
License
=======
The software is a reverse-engineered version of a software
published more than 34 years ago by "Don't ask Software".
The company no longer exists. Any attempt to contact the original
authors failed. Hence S.A.M. can be best described as Abandonware
(http://en.wikipedia.org/wiki/Abandonware)
As long this is the case I cannot put my code under any specific open
source software license. However the software might be used under the
"Fair Use" act (https://en.wikipedia.org/wiki/FAIR_USE_Act) in the USA.
Contact
=======
If you have questions don' t hesitate to ask me.
If you discovered some new knowledge about the code please mail me.
Sebastian Macke
Email: sebastian@macke.de
================================================
FILE: lib/SAM/ReciterTabs.h
================================================
#ifndef RECITERTABS_H
#define RECITERTABS_H
//some flags
const unsigned char tab36376[] =
{
0, 0, 0, 0, 0, 0, 0, 0, // 0-7
0, 0, 0, 0, 0, 0, 0, 0, // 8-15
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 2, 2, 2, 2, 2, 130, // ' ', '!'
0, 0, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 2, 2, 2, 2,
2, 192, 168, 176, 172, 192, 160, 184, // '@', 'A'
160, 192, 188, 160, 172, 168, 172, 192,
160, 160, 172, 180, 164, 192, 168, 168,
176, 192, 188, 0, 0, 0, 2, 0, // 'X', 'Y', 'Z', '[',
32, 32, 155, 32, 192, 185, 32, 205,
163, 76, 138, 142
};
const unsigned char rules[] =
{
']','A'|0x80,
' ','(','A','.',')', '=','E','H','4','Y','.',' '|0x80,
'(','A',')',' ', '=','A','H'|0x80,
' ','(','A','R','E',')',' ', '=','A','A','R'|0x80,
' ','(','A','R',')','O', '=','A','X','R'|0x80,
'(','A','R',')','#', '=','E','H','4','R'|0x80,
' ','^','(','A','S',')','#', '=','E','Y','4','S'|0x80,
'(','A',')','W','A', '=','A','X'|0x80,
'(','A','W',')', '=','A','O','5'|0x80,
' ',':','(','A','N','Y',')', '=','E','H','4','N','I','Y'|0x80,
'(','A',')','^','+','#', '=','E','Y','5'|0x80,
'#',':','(','A','L','L','Y',')', '=','U','L','I','Y'|0x80,
' ','(','A','L',')','#', '=','U','L'|0x80,
'(','A','G','A','I','N',')', '=','A','X','G','E','H','4','N'|0x80,
'#',':','(','A','G',')','E', '=','I','H','J'|0x80,
'(','A',')','^','%', '=','E','Y'|0x80,
'(','A',')','^','+',':','#', '=','A','E'|0x80,
' ',':','(','A',')','^','+',' ', '=','E','Y','4'|0x80,
' ','(','A','R','R',')', '=','A','X','R'|0x80,
'(','A','R','R',')', '=','A','E','4','R'|0x80,
' ','^','(','A','R',')',' ', '=','A','A','5','R'|0x80,
'(','A','R',')', '=','A','A','5','R'|0x80,
'(','A','I','R',')', '=','E','H','4','R'|0x80,
'(','A','I',')', '=','E','Y','4'|0x80,
'(','A','Y',')', '=','E','Y','5'|0x80,
'(','A','U',')', '=','A','O','4'|0x80,
'#',':','(','A','L',')',' ', '=','U','L'|0x80,
'#',':','(','A','L','S',')',' ', '=','U','L','Z'|0x80,
'(','A','L','K',')', '=','A','O','4','K'|0x80,
'(','A','L',')','^', '=','A','O','L'|0x80,
' ',':','(','A','B','L','E',')', '=','E','Y','4','B','U','L'|0x80,
'(','A','B','L','E',')', '=','A','X','B','U','L'|0x80,
'(','A',')','V','O', '=','E','Y','4'|0x80,
'(','A','N','G',')','+', '=','E','Y','4','N','J'|0x80,
'(','A','T','A','R','I',')', '=','A','H','T','A','A','4','R','I','Y'|0x80,
'(','A',')','T','O','M', '=','A','E'|0x80,
'(','A',')','T','T','I', '=','A','E'|0x80,
' ','(','A','T',')',' ', '=','A','E','T'|0x80,
' ','(','A',')','T', '=','A','H'|0x80,
'(','A',')', '=','A','E'|0x80,
']','B'|0x80,
' ','(','B',')',' ', '=','B','I','Y','4'|0x80,
' ','(','B','E',')','^','#', '=','B','I','H'|0x80,
'(','B','E','I','N','G',')', '=','B','I','Y','4','I','H','N','X'|0x80,
' ','(','B','O','T','H',')',' ', '=','B','O','W','4','T','H'|0x80,
' ','(','B','U','S',')','#', '=','B','I','H','4','Z'|0x80,
'(','B','R','E','A','K',')', '=','B','R','E','Y','5','K'|0x80,
'(','B','U','I','L',')', '=','B','I','H','4','L'|0x80,
'(','B',')', '=','B'|0x80,
']','C'|0x80,
' ','(','C',')',' ', '=','S','I','Y','4'|0x80,
' ','(','C','H',')','^', '=','K'|0x80,
'^','E','(','C','H',')', '=','K'|0x80,
'(','C','H','A',')','R','#', '=','K','E','H','5'|0x80,
'(','C','H',')', '=','C','H'|0x80,
' ','S','(','C','I',')','#', '=','S','A','Y','4'|0x80,
'(','C','I',')','A', '=','S','H'|0x80,
'(','C','I',')','O', '=','S','H'|0x80,
'(','C','I',')','E','N', '=','S','H'|0x80,
'(','C','I','T','Y',')', '=','S','I','H','T','I','Y'|0x80,
'(','C',')','+', '=','S'|0x80,
'(','C','K',')', '=','K'|0x80,
'(','C','O','M','M','O','D','O','R','E',')','=','K','A','A','4','M','A','H','D','O','H','R'|0x80,
'(','C','O','M',')', '=','K','A','H','M'|0x80,
'(','C','U','I','T',')', '=','K','I','H','T'|0x80,
'(','C','R','E','A',')', '=','K','R','I','Y','E','Y'|0x80,
'(','C',')', '=','K'|0x80,
']','D'|0x80,
' ','(','D',')',' ', '=','D','I','Y','4'|0x80,
' ','(','D','R','.',')',' ', '=','D','A','A','4','K','T','E','R'|0x80,
'#',':','(','D','E','D',')',' ', '=','D','I','H','D'|0x80,
'.','E','(','D',')',' ', '=','D'|0x80,
'#',':','^','E','(','D',')',' ', '=','T'|0x80,
' ','(','D','E',')','^','#', '=','D','I','H'|0x80,
' ','(','D','O',')',' ', '=','D','U','W'|0x80,
' ','(','D','O','E','S',')', '=','D','A','H','Z'|0x80,
'(','D','O','N','E',')',' ', '=','D','A','H','5','N'|0x80,
'(','D','O','I','N','G',')', '=','D','U','W','4','I','H','N','X'|0x80,
' ','(','D','O','W',')', '=','D','A','W'|0x80,
'#','(','D','U',')','A', '=','J','U','W'|0x80,
'#','(','D','U',')','^','#', '=','J','A','X'|0x80,
'(','D',')', '=','D'|0x80,
']','E'|0x80,
' ','(','E',')',' ', '=','I','Y','I','Y','4'|0x80,
'#',':','(','E',')',' ','='|0x80,
'\'',':','^','(','E',')',' ','='|0x80,
' ',':','(','E',')',' ', '=','I','Y'|0x80,
'#','(','E','D',')',' ', '=','D'|0x80,
'#',':','(','E',')','D',' ','='|0x80,
'(','E','V',')','E','R', '=','E','H','4','V'|0x80,
'(','E',')','^','%', '=','I','Y','4'|0x80,
'(','E','R','I',')','#', '=','I','Y','4','R','I','Y'|0x80,
'(','E','R','I',')', '=','E','H','4','R','I','H'|0x80,
'#',':','(','E','R',')','#', '=','E','R'|0x80,
'(','E','R','R','O','R',')', '=','E','H','4','R','O','H','R'|0x80,
'(','E','R','A','S','E',')', '=','I','H','R','E','Y','5','S'|0x80,
'(','E','R',')','#', '=','E','H','R'|0x80,
'(','E','R',')', '=','E','R'|0x80,
' ','(','E','V','E','N',')', '=','I','Y','V','E','H','N'|0x80,
'#',':','(','E',')','W','='|0x80,
'@','(','E','W',')', '=','U','W'|0x80,
'(','E','W',')', '=','Y','U','W'|0x80,
'(','E',')','O', '=','I','Y'|0x80,
'#',':','&','(','E','S',')',' ', '=','I','H','Z'|0x80,
'#',':','(','E',')','S',' ','='|0x80,
'#',':','(','E','L','Y',')',' ', '=','L','I','Y'|0x80,
'#',':','(','E','M','E','N','T',')', '=','M','E','H','N','T'|0x80,
'(','E','F','U','L',')', '=','F','U','H','L'|0x80,
'(','E','E',')', '=','I','Y','4'|0x80,
'(','E','A','R','N',')', '=','E','R','5','N'|0x80,
' ','(','E','A','R',')','^', '=','E','R','5'|0x80,
'(','E','A','D',')', '=','E','H','D'|0x80,
'#',':','(','E','A',')',' ', '=','I','Y','A','X'|0x80,
'(','E','A',')','S','U', '=','E','H','5'|0x80,
'(','E','A',')', '=','I','Y','5'|0x80,
'(','E','I','G','H',')', '=','E','Y','4'|0x80,
'(','E','I',')', '=','I','Y','4'|0x80,
' ','(','E','Y','E',')', '=','A','Y','4'|0x80,
'(','E','Y',')', '=','I','Y'|0x80,
'(','E','U',')', '=','Y','U','W','5'|0x80,
'(','E','Q','U','A','L',')', '=','I','Y','4','K','W','U','L'|0x80,
'(','E',')', '=','E','H'|0x80,
']','F'|0x80,
' ','(','F',')',' ', '=','E','H','4','F'|0x80,
'(','F','U','L',')', '=','F','U','H','L'|0x80,
'(','F','R','I','E','N','D',')', '=','F','R','E','H','5','N','D'|0x80,
'(','F','A','T','H','E','R',')', '=','F','A','A','4','D','H','E','R'|0x80,
'(','F',')','F','='|0x80,
'(','F',')', '=','F'|0x80,
']','G'|0x80,
' ','(','G',')',' ', '=','J','I','Y','4'|0x80,
'(','G','I','V',')', '=','G','I','H','5','V'|0x80,
' ','(','G',')','I','^', '=','G'|0x80,
'(','G','E',')','T', '=','G','E','H','5'|0x80,
'S','U','(','G','G','E','S',')', '=','G','J','E','H','4','S'|0x80,
'(','G','G',')', '=','G'|0x80,
' ','B','#','(','G',')', '=','G'|0x80,
'(','G',')','+', '=','J'|0x80,
'(','G','R','E','A','T',')', '=','G','R','E','Y','4','T'|0x80,
'(','G','O','N',')','E', '=','G','A','O','5','N'|0x80,
'#','(','G','H',')','='|0x80,
' ','(','G','N',')', '=','N'|0x80,
'(','G',')', '=','G'|0x80,
']','H'|0x80,
' ','(','H',')',' ', '=','E','Y','4','C','H'|0x80,
' ','(','H','A','V',')', '=','/','H','A','E','6','V'|0x80,
' ','(','H','E','R','E',')', '=','/','H','I','Y','R'|0x80,
' ','(','H','O','U','R',')', '=','A','W','5','E','R'|0x80,
'(','H','O','W',')', '=','/','H','A','W'|0x80,
'(','H',')','#', '=','/','H'|0x80,
'(','H',')','='|0x80,
']','I'|0x80,
' ','(','I','N',')', '=','I','H','N'|0x80,
' ','(','I',')',' ', '=','A','Y','4'|0x80,
'(','I',')',' ', '=','A','Y'|0x80,
'(','I','N',')','D', '=','A','Y','5','N'|0x80,
'S','E','M','(','I',')', '=','I','Y'|0x80,
' ','A','N','T','(','I',')', '=','A','Y'|0x80,
'(','I','E','R',')', '=','I','Y','E','R'|0x80,
'#',':','R','(','I','E','D',')',' ', '=','I','Y','D'|0x80,
'(','I','E','D',')',' ', '=','A','Y','5','D'|0x80,
'(','I','E','N',')', '=','I','Y','E','H','N'|0x80,
'(','I','E',')','T', '=','A','Y','4','E','H'|0x80,
'(','I','\'',')', '=','A','Y','5'|0x80,
' ',':','(','I',')','^','%', '=','A','Y','5'|0x80,
' ',':','(','I','E',')',' ', '=','A','Y','4'|0x80,
'(','I',')','%', '=','I','Y'|0x80,
'(','I','E',')', '=','I','Y','4'|0x80,
' ','(','I','D','E','A',')', '=','A','Y','D','I','Y','5','A','H'|0x80,
'(','I',')','^','+',':','#', '=','I','H'|0x80,
'(','I','R',')','#', '=','A','Y','R'|0x80,
'(','I','Z',')','%', '=','A','Y','Z'|0x80,
'(','I','S',')','%', '=','A','Y','Z'|0x80,
'I','^','(','I',')','^','#', '=','I','H'|0x80,
'+','^','(','I',')','^','+', '=','A','Y'|0x80,
'#',':','^','(','I',')','^','+', '=','I','H'|0x80,
'(','I',')','^','+', '=','A','Y'|0x80,
'(','I','R',')', '=','E','R'|0x80,
'(','I','G','H',')', '=','A','Y','4'|0x80,
'(','I','L','D',')', '=','A','Y','5','L','D'|0x80,
' ','(','I','G','N',')', '=','I','H','G','N'|0x80,
'(','I','G','N',')',' ', '=','A','Y','4','N'|0x80,
'(','I','G','N',')','^', '=','A','Y','4','N'|0x80,
'(','I','G','N',')','%', '=','A','Y','4','N'|0x80,
'(','I','C','R','O',')', '=','A','Y','4','K','R','O','H'|0x80,
'(','I','Q','U','E',')', '=','I','Y','4','K'|0x80,
'(','I',')', '=','I','H'|0x80,
']','J'|0x80,
' ','(','J',')',' ', '=','J','E','Y','4'|0x80,
'(','J',')', '=','J'|0x80,
']','K'|0x80,
' ','(','K',')',' ', '=','K','E','Y','4'|0x80,
' ','(','K',')','N','='|0x80,
'(','K',')', '=','K'|0x80,
']','L'|0x80,
' ','(','L',')',' ', '=','E','H','4','L'|0x80,
'(','L','O',')','C','#', '=','L','O','W'|0x80,
'L','(','L',')','='|0x80,
'#',':','^','(','L',')','%', '=','U','L'|0x80,
'(','L','E','A','D',')', '=','L','I','Y','D'|0x80,
' ','(','L','A','U','G','H',')', '=','L','A','E','4','F'|0x80,
'(','L',')', '=','L'|0x80,
']','M'|0x80,
' ','(','M',')',' ', '=','E','H','4','M'|0x80,
' ','(','M','R','.',')',' ', '=','M','I','H','4','S','T','E','R'|0x80,
' ','(','M','S','.',')', '=','M','I','H','5','Z'|0x80,
' ','(','M','R','S','.',')',' ', '=','M','I','H','4','S','I','X','Z'|0x80,
'(','M','O','V',')', '=','M','U','W','4','V'|0x80,
'(','M','A','C','H','I','N',')', '=','M','A','H','S','H','I','Y','5','N'|0x80,
'M','(','M',')','='|0x80,
'(','M',')', '=','M'|0x80,
']','N'|0x80,
' ','(','N',')',' ', '=','E','H','4','N'|0x80,
'E','(','N','G',')','+', '=','N','J'|0x80,
'(','N','G',')','R', '=','N','X','G'|0x80,
'(','N','G',')','#', '=','N','X','G'|0x80,
'(','N','G','L',')','%', '=','N','X','G','U','L'|0x80,
'(','N','G',')', '=','N','X'|0x80,
'(','N','K',')', '=','N','X','K'|0x80,
' ','(','N','O','W',')',' ', '=','N','A','W','4'|0x80,
'N','(','N',')','='|0x80,
'(','N','O','N',')','E', '=','N','A','H','4','N'|0x80,
'(','N',')', '=','N'|0x80,
']','O'|0x80,
' ','(','O',')',' ', '=','O','H','4','W'|0x80,
'(','O','F',')',' ', '=','A','H','V'|0x80,
' ','(','O','H',')',' ', '=','O','W','5'|0x80,
'(','O','R','O','U','G','H',')', '=','E','R','4','O','W'|0x80,
'#',':','(','O','R',')',' ', '=','E','R'|0x80,
'#',':','(','O','R','S',')',' ', '=','E','R','Z'|0x80,
'(','O','R',')', '=','A','O','R'|0x80,
' ','(','O','N','E',')', '=','W','A','H','N'|0x80,
'#','(','O','N','E',')',' ', '=','W','A','H','N'|0x80,
'(','O','W',')', '=','O','W'|0x80,
' ','(','O','V','E','R',')', '=','O','W','5','V','E','R'|0x80,
'P','R','(','O',')','V', '=','U','W','4'|0x80,
'(','O','V',')', '=','A','H','4','V'|0x80,
'(','O',')','^','%', '=','O','W','5'|0x80,
'(','O',')','^','E','N', '=','O','W'|0x80,
'(','O',')','^','I','#', '=','O','W','5'|0x80,
'(','O','L',')','D', '=','O','W','4','L'|0x80,
'(','O','U','G','H','T',')', '=','A','O','5','T'|0x80,
'(','O','U','G','H',')', '=','A','H','5','F'|0x80,
' ','(','O','U',')', '=','A','W'|0x80,
'H','(','O','U',')','S','#', '=','A','W','4'|0x80,
'(','O','U','S',')', '=','A','X','S'|0x80,
'(','O','U','R',')', '=','O','H','R'|0x80,
'(','O','U','L','D',')', '=','U','H','5','D'|0x80,
'(','O','U',')','^','L', '=','A','H','5'|0x80,
'(','O','U','P',')', '=','U','W','5','P'|0x80,
'(','O','U',')', '=','A','W'|0x80,
'(','O','Y',')', '=','O','Y'|0x80,
'(','O','I','N','G',')', '=','O','W','4','I','H','N','X'|0x80,
'(','O','I',')', '=','O','Y','5'|0x80,
'(','O','O','R',')', '=','O','H','5','R'|0x80,
'(','O','O','K',')', '=','U','H','5','K'|0x80,
'F','(','O','O','D',')', '=','U','W','5','D'|0x80,
'L','(','O','O','D',')', '=','A','H','5','D'|0x80,
'M','(','O','O','D',')', '=','U','W','5','D'|0x80,
'(','O','O','D',')', '=','U','H','5','D'|0x80,
'F','(','O','O','T',')', '=','U','H','5','T'|0x80,
'(','O','O',')', '=','U','W','5'|0x80,
'(','O','\'',')', '=','O','H'|0x80,
'(','O',')','E', '=','O','W'|0x80,
'(','O',')',' ', '=','O','W'|0x80,
'(','O','A',')', '=','O','W','4'|0x80,
' ','(','O','N','L','Y',')', '=','O','W','4','N','L','I','Y'|0x80,
' ','(','O','N','C','E',')', '=','W','A','H','4','N','S'|0x80,
'(','O','N','\'','T',')', '=','O','W','4','N','T'|0x80,
'C','(','O',')','N', '=','A','A'|0x80,
'(','O',')','N','G', '=','A','O'|0x80,
' ',':','^','(','O',')','N', '=','A','H'|0x80,
'I','(','O','N',')', '=','U','N'|0x80,
'#',':','(','O','N',')', '=','U','N'|0x80,
'#','^','(','O','N',')', '=','U','N'|0x80,
'(','O',')','S','T', '=','O','W'|0x80,
'(','O','F',')','^', '=','A','O','4','F'|0x80,
'(','O','T','H','E','R',')', '=','A','H','5','D','H','E','R'|0x80,
'R','(','O',')','B', '=','R','A','A'|0x80,
'^','R','(','O',')',':','#', '=','O','W','5'|0x80,
'(','O','S','S',')',' ', '=','A','O','5','S'|0x80,
'#',':','^','(','O','M',')', '=','A','H','M'|0x80,
'(','O',')', '=','A','A'|0x80,
']','P'|0x80,
' ','(','P',')',' ', '=','P','I','Y','4'|0x80,
'(','P','H',')', '=','F'|0x80,
'(','P','E','O','P','L',')', '=','P','I','Y','5','P','U','L'|0x80,
'(','P','O','W',')', '=','P','A','W','4'|0x80,
'(','P','U','T',')',' ', '=','P','U','H','T'|0x80,
'(','P',')','P','='|0x80,
'(','P',')','S','='|0x80,
'(','P',')','N','='|0x80,
'(','P','R','O','F','.',')', '=','P','R','O','H','F','E','H','4','S','E','R'|0x80,
'(','P',')', '=','P'|0x80,
']','Q'|0x80,
' ','(','Q',')',' ', '=','K','Y','U','W','4'|0x80,
'(','Q','U','A','R',')', '=','K','W','O','H','5','R'|0x80,
'(','Q','U',')', '=','K','W'|0x80,
'(','Q',')', '=','K'|0x80,
']','R'|0x80,
' ','(','R',')',' ', '=','A','A','5','R'|0x80,
' ','(','R','E',')','^','#', '=','R','I','Y'|0x80,
'(','R',')','R','='|0x80,
'(','R',')', '=','R'|0x80,
']','S'|0x80,
' ','(','S',')',' ', '=','E','H','4','S'|0x80,
'(','S','H',')', '=','S','H'|0x80,
'#','(','S','I','O','N',')', '=','Z','H','U','N'|0x80,
'(','S','O','M','E',')', '=','S','A','H','M'|0x80,
'#','(','S','U','R',')','#', '=','Z','H','E','R'|0x80,
'(','S','U','R',')','#', '=','S','H','E','R'|0x80,
'#','(','S','U',')','#', '=','Z','H','U','W'|0x80,
'#','(','S','S','U',')','#', '=','S','H','U','W'|0x80,
'#','(','S','E','D',')', '=','Z','D'|0x80,
'#','(','S',')','#', '=','Z'|0x80,
'(','S','A','I','D',')', '=','S','E','H','D'|0x80,
'^','(','S','I','O','N',')', '=','S','H','U','N'|0x80,
'(','S',')','S','='|0x80,
'.','(','S',')',' ', '=','Z'|0x80,
'#',':','.','E','(','S',')',' ', '=','Z'|0x80,
'#',':','^','#','(','S',')',' ', '=','S'|0x80,
'U','(','S',')',' ', '=','S'|0x80,
' ',':','#','(','S',')',' ', '=','Z'|0x80,
'#','#','(','S',')',' ', '=','Z'|0x80,
' ','(','S','C','H',')', '=','S','K'|0x80,
'(','S',')','C','+','='|0x80,
'#','(','S','M',')', '=','Z','U','M'|0x80,
'#','(','S','N',')','\'', '=','Z','U','M'|0x80,
'(','S','T','L','E',')', '=','S','U','L'|0x80,
'(','S',')', '=','S'|0x80,
']','T'|0x80,
' ','(','T',')',' ', '=','T','I','Y','4'|0x80,
' ','(','T','H','E',')',' ','#', '=','D','H','I','Y'|0x80,
' ','(','T','H','E',')',' ', '=','D','H','A','X'|0x80,
'(','T','O',')',' ', '=','T','U','X'|0x80,
' ','(','T','H','A','T',')', '=','D','H','A','E','T'|0x80,
' ','(','T','H','I','S',')',' ', '=','D','H','I','H','S'|0x80,
' ','(','T','H','E','Y',')', '=','D','H','E','Y'|0x80,
' ','(','T','H','E','R','E',')', '=','D','H','E','H','R'|0x80,
'(','T','H','E','R',')', '=','D','H','E','R'|0x80,
'(','T','H','E','I','R',')', '=','D','H','E','H','R'|0x80,
' ','(','T','H','A','N',')',' ', '=','D','H','A','E','N'|0x80,
' ','(','T','H','E','M',')',' ', '=','D','H','A','E','N'|0x80,
'(','T','H','E','S','E',')',' ', '=','D','H','I','Y','Z'|0x80,
' ','(','T','H','E','N',')', '=','D','H','E','H','N'|0x80,
'(','T','H','R','O','U','G','H',')', '=','T','H','R','U','W','4'|0x80,
'(','T','H','O','S','E',')', '=','D','H','O','H','Z'|0x80,
'(','T','H','O','U','G','H',')',' ', '=','D','H','O','W'|0x80,
'(','T','O','D','A','Y',')', '=','T','U','X','D','E','Y'|0x80,
'(','T','O','M','O',')','R','R','O','W','=','T','U','M','A','A','5'|0x80,
'(','T','O',')','T','A','L', '=','T','O','W','5'|0x80,
' ','(','T','H','U','S',')', '=','D','H','A','H','4','S'|0x80,
'(','T','H',')', '=','T','H'|0x80,
'#',':','(','T','E','D',')', '=','T','I','X','D'|0x80,
'S','(','T','I',')','#','N', '=','C','H'|0x80,
'(','T','I',')','O', '=','S','H'|0x80,
'(','T','I',')','A', '=','S','H'|0x80,
'(','T','I','E','N',')', '=','S','H','U','N'|0x80,
'(','T','U','R',')','#', '=','C','H','E','R'|0x80,
'(','T','U',')','A', '=','C','H','U','W'|0x80,
' ','(','T','W','O',')', '=','T','U','W'|0x80,
'&','(','T',')','E','N',' ','='|0x80,
'(','T',')', '=','T'|0x80,
']','U'|0x80,
' ','(','U',')',' ', '=','Y','U','W','4'|0x80,
' ','(','U','N',')','I', '=','Y','U','W','N'|0x80,
' ','(','U','N',')', '=','A','H','N'|0x80,
' ','(','U','P','O','N',')', '=','A','X','P','A','O','N'|0x80,
'@','(','U','R',')','#', '=','U','H','4','R'|0x80,
'(','U','R',')','#', '=','Y','U','H','4','R'|0x80,
'(','U','R',')', '=','E','R'|0x80,
'(','U',')','^',' ', '=','A','H'|0x80,
'(','U',')','^','^', '=','A','H','5'|0x80,
'(','U','Y',')', '=','A','Y','5'|0x80,
' ','G','(','U',')','#','='|0x80,
'G','(','U',')','%','='|0x80,
'G','(','U',')','#', '=','W'|0x80,
'#','N','(','U',')', '=','Y','U','W'|0x80,
'@','(','U',')', '=','U','W'|0x80,
'(','U',')', '=','Y','U','W'|0x80,
']','V'|0x80,
' ','(','V',')',' ', '=','V','I','Y','4'|0x80,
'(','V','I','E','W',')', '=','V','Y','U','W','5'|0x80,
'(','V',')', '=','V'|0x80,
']','W'|0x80,
' ','(','W',')',' ', '=','D','A','H','4','B','U','L','Y','U','W'|0x80,
' ','(','W','E','R','E',')', '=','W','E','R'|0x80,
'(','W','A',')','S','H', '=','W','A','A'|0x80,
'(','W','A',')','S','T', '=','W','E','Y'|0x80,
'(','W','A',')','S', '=','W','A','H'|0x80,
'(','W','A',')','T', '=','W','A','A'|0x80,
'(','W','H','E','R','E',')', '=','W','H','E','H','R'|0x80,
'(','W','H','A','T',')', '=','W','H','A','H','T'|0x80,
'(','W','H','O','L',')', '=','/','H','O','W','L'|0x80,
'(','W','H','O',')', '=','/','H','U','W'|0x80,
'(','W','H',')', '=','W','H'|0x80,
'(','W','A','R',')','#', '=','W','E','H','R'|0x80,
'(','W','A','R',')', '=','W','A','O','R'|0x80,
'(','W','O','R',')','^', '=','W','E','R'|0x80,
'(','W','R',')', '=','R'|0x80,
'(','W','O','M',')','A', '=','W','U','H','M'|0x80,
'(','W','O','M',')','E', '=','W','I','H','M'|0x80,
'(','W','E','A',')','R', '=','W','E','H'|0x80,
'(','W','A','N','T',')', '=','W','A','A','5','N','T'|0x80,
'A','N','S','(','W','E','R',')', '=','E','R'|0x80,
'(','W',')', '=','W'|0x80,
']','X'|0x80,
' ','(','X',')',' ', '=','E','H','4','K','R'|0x80,
' ','(','X',')', '=','Z'|0x80,
'(','X',')', '=','K','S'|0x80,
']','Y'|0x80,
' ','(','Y',')',' ', '=','W','A','Y','4'|0x80,
'(','Y','O','U','N','G',')', '=','Y','A','H','N','X'|0x80,
' ','(','Y','O','U','R',')', '=','Y','O','H','R'|0x80,
' ','(','Y','O','U',')', '=','Y','U','W'|0x80,
' ','(','Y','E','S',')', '=','Y','E','H','S'|0x80,
' ','(','Y',')', '=','Y'|0x80,
'F','(','Y',')', '=','A','Y'|0x80,
'P','S','(','Y','C','H',')', '=','A','Y','K'|0x80,
'#',':','^','(','Y',')', '=','I','Y'|0x80,
'#',':','^','(','Y',')','I', '=','I','Y'|0x80,
' ',':','(','Y',')',' ', '=','A','Y'|0x80,
' ',':','(','Y',')','#', '=','A','Y'|0x80,
' ',':','(','Y',')','^','+',':','#', '=','I','H'|0x80,
' ',':','(','Y',')','^','#', '=','A','Y'|0x80,
'(','Y',')', '=','I','H'|0x80,
']','Z'|0x80,
' ','(','Z',')',' ', '=','Z','I','Y','4'|0x80,
'(','Z',')', '=','Z'|0x80,
'j'|0x80
};
const unsigned char rules2[] =
{
'(','A',')', '='|0x80,
'(','!',')', '=','.'|0x80,
'(','"',')',' ', '=','-','A','H','5','N','K','W','O','W','T','-'|0x80,
'(','"',')', '=','K','W','O','W','4','T','-'|0x80,
'(','#',')', '=',' ','N','A','H','4','M','B','E','R'|0x80,
'(','$',')', '=',' ','D','A','A','4','L','E','R'|0x80,
'(','%',')', '=',' ','P','E','R','S','E','H','4','N','T'|0x80,
'(','&',')', '=',' ','A','E','N','D'|0x80,
'(','\'',')', '='|0x80,
'(','*',')', '=',' ','A','E','4','S','T','E','R','I','H','S','K'|0x80,
'(','+',')', '=',' ','P','L','A','H','4','S'|0x80,
'(',',',')', '=',','|0x80,
' ','(','-',')',' ', '=','-'|0x80,
'(','-',')', '='|0x80,
'(','.',')', '=',' ','P','O','Y','N','T'|0x80,
'(','/',')', '=',' ','S','L','A','E','4','S','H'|0x80,
'(','0',')', '=',' ','Z','I','Y','4','R','O','W'|0x80,
' ','(','1','S','T',')', '=','F','E','R','4','S','T'|0x80,
' ','(','1','0','T','H',')', '=','T','E','H','4','N','T','H'|0x80,
'(','1',')', '=',' ','W','A','H','4','N'|0x80,
' ','(','2','N','D',')', '=','S','E','H','4','K','U','N','D'|0x80,
'(','2',')', '=',' ','T','U','W','4'|0x80,
' ','(','3','R','D',')', '=','T','H','E','R','4','D'|0x80,
'(','3',')', '=',' ','T','H','R','I','Y','4'|0x80,
'(','4',')', '=',' ','F','O','H','4','R'|0x80,
' ','(','5','T','H',')', '=','F','I','H','4','F','T','H'|0x80,
'(','5',')', '=',' ','F','A','Y','4','V'|0x80,
' ','(','6','4',')',' ', '=','S','I','H','4','K','S','T','I','Y',' ','F','O','H','R'|0x80,
'(','6',')', '=',' ','S','I','H','4','K','S'|0x80,
'(','7',')', '=',' ','S','E','H','4','V','U','N'|0x80,
' ','(','8','T','H',')', '=','E','Y','4','T','H'|0x80,
'(','8',')', '=',' ','E','Y','4','T'|0x80,
'(','9',')', '=',' ','N','A','Y','4','N'|0x80,
'(',':',')', '=','.'|0x80,
'(',';',')', '=','.'|0x80,
'(','<',')', '=',' ','L','E','H','4','S',' ','D','H','A','E','N'|0x80,
'(','=',')', '=',' ','I','Y','4','K','W','U','L','Z'|0x80,
'(','>',')', '=',' ','G','R','E','Y','4','T','E','R',' ','D','H','A','E','N'|0x80,
'(','?',')', '=','?'|0x80,
'(','@',')', '=',' ','A','E','6','T'|0x80,
'(','^',')', '=',' ','K','A','E','4','R','I','X','T'|0x80,
']','A'|0x80
};
//26 items. From 'A' to 'Z'
// positions for mem62 and mem63 for each character
const unsigned char tab37489[] =
{
0, 149, 247, 162, 57, 197, 6, 126,
199, 38, 55, 78, 145, 241, 85, 161,
254, 36, 69, 45, 167, 54, 83, 46,
71, 218
};
const unsigned char tab37515[] =
{
125, 126, 126, 127, 128, 129, 130, 130,
130, 132, 132, 132, 132, 132, 133, 135,
135, 136, 136, 137, 138, 139, 139, 140,
140, 140
};
#endif
================================================
FILE: lib/SAM/RenderTabs.h
================================================
#ifndef RENDERTABS_H
#define RENDERTABS_H
const unsigned char tab48426[5] = { 0x18, 0x1A, 0x17, 0x17, 0x17 };
const unsigned char tab47492[] =
{
0 , 0 , 0xE0 , 0xE6 , 0xEC , 0xF3 , 0xF9 , 0 ,
6 , 0xC , 6
};
const unsigned char amplitudeRescale[] =
{
0 , 1 , 2 , 2 , 2 , 3 , 3 , 4 ,
4 , 5 , 6 , 8 , 9 ,0xB ,0xD ,0xF, 0 //17 elements?
};
// Used to decide which phoneme's blend lengths. The candidate with the lower score is selected.
// tab45856
const unsigned char blendRank[] =
{
0 , 0x1F , 0x1F , 0x1F , 0x1F , 2 , 2 , 2 ,
2 , 2 , 2 , 2 , 2 , 2 , 5 , 5 ,
2 ,0xA , 2 , 8 , 5 , 5 ,0xB ,0xA ,
9 , 8 , 8 , 0xA0 , 8 , 8 , 0x17 , 0x1F ,
0x12 , 0x12 , 0x12 , 0x12 , 0x1E , 0x1E , 0x14 , 0x14 ,
0x14 , 0x14 , 0x17 , 0x17 , 0x1A , 0x1A , 0x1D , 0x1D ,
2 , 2 , 2 , 2 , 2 , 2 , 0x1A , 0x1D ,
0x1B , 0x1A , 0x1D , 0x1B , 0x1A , 0x1D , 0x1B , 0x1A ,
0x1D , 0x1B , 0x17 , 0x1D , 0x17 , 0x17 , 0x1D , 0x17 ,
0x17 , 0x1D , 0x17 , 0x17 , 0x1D , 0x17 , 0x17 , 0x17
};
// Number of frames at the end of a phoneme devoted to interpolating to next phoneme's final value
//tab45696
const unsigned char outBlendLength[] =
{
0 , 2 , 2 , 2 , 2 , 4 , 4 , 4 ,
4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
4 , 4 , 3 , 2 , 4 , 4 , 2 , 2 ,
2 , 2 , 2 , 1 , 1 , 1 , 1 , 1 ,
1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 ,
2 , 1 , 0 , 1 , 0 , 1 , 0 , 5 ,
5 , 5 , 5 , 5 , 4 , 4 , 2 , 0 ,
1 , 2 , 0 , 1 , 2 , 0 , 1 , 2 ,
0 , 1 , 2 , 0 , 2 , 2 , 0 , 1 ,
3 , 0 , 2 , 3 , 0 , 2 , 0xA0 , 0xA0
};
// Number of frames at beginning of a phoneme devoted to interpolating to phoneme's final value
// tab45776
const unsigned char inBlendLength[] =
{
0 , 2 , 2 , 2 , 2 , 4 , 4 , 4 ,
4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 ,
4 , 4 , 3 , 3 , 4 , 4 , 3 , 3 ,
3 , 3 , 3 , 1 , 2 , 3 , 2 , 1 ,
3 , 3 , 3 , 3 , 1 , 1 , 3 , 3 ,
3 , 2 , 2 , 3 , 2 , 3 , 0 , 0 ,
5 , 5 , 5 , 5 , 4 , 4 , 2 , 0 ,
2 , 2 , 0 , 3 , 2 , 0 , 4 , 2 ,
0 , 3 , 2 , 0 , 2 , 2 , 0 , 2 ,
3 , 0 , 3 , 3 , 0 , 3 , 0xB0 , 0xA0
};
// Looks like it's used as bit flags
// High bits masked by 248 (11111000)
//
// 32: S* 241 11110001
// 33: SH 226 11100010
// 34: F* 211 11010011
// 35: TH 187 10111011
// 36: /H 124 01111100
// 37: /X 149 10010101
// 38: Z* 1 00000001
// 39: ZH 2 00000010
// 40: V* 3 00000011
// 41: DH 3 00000011
// 43: ** 114 01110010
// 45: ** 2 00000010
// 67: ** 27 00011011
// 70: ** 25 00011001
// tab45936
const unsigned char sampledConsonantFlags[] =
{
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0xF1 , 0xE2 , 0xD3 , 0xBB , 0x7C , 0x95 , 1 , 2 ,
3 , 3 , 0 , 0x72 , 0 , 2 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0x1B , 0 , 0 , 0x19 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
};
//tab45056
unsigned char freq1data[]=
{
0x00 ,0x13 ,0x13 ,0x13 ,0x13 , 0xA , 0xE ,0x12
, 0x18 ,0x1A ,0x16 ,0x14 ,0x10 ,0x14 , 0xE ,0x12
, 0xE ,0x12 ,0x12 ,0x10 , 0xC , 0xE , 0xA ,0x12
, 0xE ,0xA , 8 , 6 , 6 , 6 , 6 ,0x11
, 6 , 6 , 6 , 6 ,0xE , 0x10 , 9 ,0xA
, 8 ,0xA , 6 , 6 , 6 , 5 , 6 , 0
, 0x12 , 0x1A , 0x14 , 0x1A , 0x12 ,0xC , 6 , 6
, 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6
, 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6
, 6 ,0xA ,0xA , 6 , 6 , 6 , 0x2C , 0x13
};
//tab451356
unsigned char freq2data[]=
{
0x00 , 0x43 , 0x43 , 0x43 , 0x43 , 0x54 , 0x48 , 0x42 ,
0x3E , 0x28 , 0x2C , 0x1E , 0x24 , 0x2C , 0x48 , 0x30 ,
0x24 , 0x1E , 0x32 , 0x24 , 0x1C , 0x44 , 0x18 , 0x32 ,
0x1E , 0x18 , 0x52 , 0x2E , 0x36 , 0x56 , 0x36 , 0x43 ,
0x49 , 0x4F , 0x1A , 0x42 , 0x49 , 0x25 , 0x33 , 0x42 ,
0x28 , 0x2F , 0x4F , 0x4F , 0x42 , 0x4F , 0x6E , 0x00 ,
0x48 , 0x26 , 0x1E , 0x2A , 0x1E , 0x22 , 0x1A , 0x1A ,
0x1A , 0x42 , 0x42 , 0x42 , 0x6E , 0x6E , 0x6E , 0x54 ,
0x54 , 0x54 , 0x1A , 0x1A , 0x1A , 0x42 , 0x42 , 0x42 ,
0x6D , 0x56 , 0x6D , 0x54 , 0x54 , 0x54 , 0x7F , 0x7F
};
//tab45216
unsigned char freq3data[]=
{
0x00 , 0x5B , 0x5B , 0x5B , 0x5B , 0x6E , 0x5D , 0x5B ,
0x58 , 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0 , 0 , 0 , 5 ,0xA , 2 ,
0xE ,0xD ,0xC ,0xD ,0xC , 8 , 0 , 1 ,
0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 ,
1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 ,0xA , 0 , 0 ,0xA , 0 , 0 , 0
};
const unsigned char ampl3data[] =
{
0 , 0 , 0 , 0 , 0 , 8 , 7 , 8 ,
8 , 1 , 1 , 0 , 1 , 0 , 7 , 5 ,
1 , 0 , 6 , 1 , 0 , 7 , 0 , 5 ,
1 , 0 , 8 , 0 , 0 , 3 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ,
0 , 0 , 0 , 0 , 0 , 1 ,0xE , 1 ,
9 , 1 , 0 , 1 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 7 , 0 , 0 , 5 , 0 , 0x13 , 0x10
};
//tab42240
const signed char sinus[256] =
{0,3,6,9,12,16,19,22,25,28,31,34,37,40,43,46,49,51,54,57,60,63,65,68,71,73,76,78,81,83,85,88,90,92,94,96,98,100,102,104,106,107,109,111,112,113,115,116,117,118,120,121,122,122,123,124,125,125,126,126,126,127,127,127,127,127,127,127,126,126,126,125,125,124,123,122,122,121,120,118,117,116,115,113,112,111,109,107,106,104,102,100,98,96,94,92,90,88,85,83,81,78,76,73,71,68,65,63,60,57,54,51,49,46,43,40,37,34,31,28,25,22,19,16,12,9,6,3,0,-3,-6,-9,-12,-16,-19,-22,-25,-28,-31,-34,-37,-40,-43,-46,-49,-51,-54,-57,-60,-63,-65,-68,-71,-73,-76,-78,-81,-83,-85,-88,-90,-92,-94,-96,-98,-100,-102,-104,-106,-107,-109,-111,-112,-113,-115,-116,-117,-118,-120,-121,-122,-122,-123,-124,-125,-125,-126,-126,-126,-127,-127,-127,-127,-127,-127,-127,-126,-126,-126,-125,-125,-124,-123,-122,-122,-121,-120,-118,-117,-116,-115,-113,-112,-111,-109,-107,-106,-104,-102,-100,-98,-96,-94,-92,-90,-88,-85,-83,-81,-78,-76,-73,-71,-68,-65,-63,-60,-57,-54,-51,-49,-46,-43,-40,-37,-34,-31,-28,-25,-22,-19,-16,-12,-9,-6,-3};
//tab42496
const unsigned char rectangle[] =
{
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 , 0x90 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 ,
0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70 , 0x70
};
//random data ?
const unsigned char sampleTable[0x500] =
{
//00
0x38 , 0x84 , 0x6B , 0x19 , 0xC6 , 0x63 , 0x18 , 0x86
, 0x73 , 0x98 , 0xC6 , 0xB1 , 0x1C , 0xCA , 0x31 , 0x8C
, 0xC7 , 0x31 , 0x88 , 0xC2 , 0x30 , 0x98 , 0x46 , 0x31
, 0x18 , 0xC6 , 0x35 ,0xC , 0xCA , 0x31 ,0xC , 0xC6
//20
, 0x21 , 0x10 , 0x24 , 0x69 , 0x12 , 0xC2 , 0x31 , 0x14
, 0xC4 , 0x71 , 8 , 0x4A , 0x22 , 0x49 , 0xAB , 0x6A
, 0xA8 , 0xAC , 0x49 , 0x51 , 0x32 , 0xD5 , 0x52 , 0x88
, 0x93 , 0x6C , 0x94 , 0x22 , 0x15 , 0x54 , 0xD2 , 0x25
//40
, 0x96 , 0xD4 , 0x50 , 0xA5 , 0x46 , 0x21 , 8 , 0x85
, 0x6B , 0x18 , 0xC4 , 0x63 , 0x10 , 0xCE , 0x6B , 0x18
, 0x8C , 0x71 , 0x19 , 0x8C , 0x63 , 0x35 ,0xC , 0xC6
, 0x33 , 0x99 , 0xCC , 0x6C , 0xB5 , 0x4E , 0xA2 , 0x99
//60
, 0x46 , 0x21 , 0x28 , 0x82 , 0x95 , 0x2E , 0xE3 , 0x30
, 0x9C , 0xC5 , 0x30 , 0x9C , 0xA2 , 0xB1 , 0x9C , 0x67
, 0x31 , 0x88 , 0x66 , 0x59 , 0x2C , 0x53 , 0x18 , 0x84
, 0x67 , 0x50 , 0xCA , 0xE3 ,0xA , 0xAC , 0xAB , 0x30
//80
, 0xAC , 0x62 , 0x30 , 0x8C , 0x63 , 0x10 , 0x94 , 0x62
, 0xB1 , 0x8C , 0x82 , 0x28 , 0x96 , 0x33 , 0x98 , 0xD6
, 0xB5 , 0x4C , 0x62 , 0x29 , 0xA5 , 0x4A , 0xB5 , 0x9C
, 0xC6 , 0x31 , 0x14 , 0xD6 , 0x38 , 0x9C , 0x4B , 0xB4
//A0
, 0x86 , 0x65 , 0x18 , 0xAE , 0x67 , 0x1C , 0xA6 , 0x63
, 0x19 , 0x96 , 0x23 , 0x19 , 0x84 , 0x13 , 8 , 0xA6
, 0x52 , 0xAC , 0xCA , 0x22 , 0x89 , 0x6E , 0xAB , 0x19
, 0x8C , 0x62 , 0x34 , 0xC4 , 0x62 , 0x19 , 0x86 , 0x63
//C0
, 0x18 , 0xC4 , 0x23 , 0x58 , 0xD6 , 0xA3 , 0x50 , 0x42
, 0x54 , 0x4A , 0xAD , 0x4A , 0x25 , 0x11 , 0x6B , 0x64
, 0x89 , 0x4A , 0x63 , 0x39 , 0x8A , 0x23 , 0x31 , 0x2A
, 0xEA , 0xA2 , 0xA9 , 0x44 , 0xC5 , 0x12 , 0xCD , 0x42
//E0
, 0x34 , 0x8C , 0x62 , 0x18 , 0x8C , 0x63 , 0x11 , 0x48
, 0x66 , 0x31 , 0x9D , 0x44 , 0x33 , 0x1D , 0x46 , 0x31
, 0x9C , 0xC6 , 0xB1 ,0xC , 0xCD , 0x32 , 0x88 , 0xC4
, 0x73 , 0x18 , 0x86 , 0x73 , 8 , 0xD6 , 0x63 , 0x58
//100
, 7 , 0x81 , 0xE0 , 0xF0 , 0x3C , 7 , 0x87 , 0x90
, 0x3C , 0x7C ,0xF , 0xC7 , 0xC0 , 0xC0 , 0xF0 , 0x7C
, 0x1E , 7 , 0x80 , 0x80 , 0 , 0x1C , 0x78 , 0x70
, 0xF1 , 0xC7 , 0x1F , 0xC0 ,0xC , 0xFE , 0x1C , 0x1F
//120
, 0x1F ,0xE ,0xA , 0x7A , 0xC0 , 0x71 , 0xF2 , 0x83
, 0x8F , 3 ,0xF ,0xF ,0xC , 0 , 0x79 , 0xF8
, 0x61 , 0xE0 , 0x43 ,0xF , 0x83 , 0xE7 , 0x18 , 0xF9
, 0xC1 , 0x13 , 0xDA , 0xE9 , 0x63 , 0x8F ,0xF , 0x83
//140
, 0x83 , 0x87 , 0xC3 , 0x1F , 0x3C , 0x70 , 0xF0 , 0xE1
, 0xE1 , 0xE3 , 0x87 , 0xB8 , 0x71 ,0xE , 0x20 , 0xE3
, 0x8D , 0x48 , 0x78 , 0x1C , 0x93 , 0x87 , 0x30 , 0xE1
, 0xC1 , 0xC1 , 0xE4 , 0x78 , 0x21 , 0x83 , 0x83 , 0xC3
//160
, 0x87 , 6 , 0x39 , 0xE5 , 0xC3 , 0x87 , 7 ,0xE
, 0x1C , 0x1C , 0x70 , 0xF4 , 0x71 , 0x9C , 0x60 , 0x36
, 0x32 , 0xC3 , 0x1E , 0x3C , 0xF3 , 0x8F ,0xE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20 , 0x49 , 0xE0 , 0xF8 ,0xC , 0x60 , 0xF0
//220
, 0x17 , 0x1A , 0x41 , 0xAA , 0xA4 , 0xD0 , 0x8D , 0x12
, 0x82 , 0x1E , 0x1E , 3 , 0xF8 , 0x3E , 3 ,0xC
, 0x73 , 0x80 , 0x70 , 0x44 , 0x26 , 3 , 0x24 , 0xE1
, 0x3E , 4 , 0x4E , 4 , 0x1C , 0xC1 , 9 , 0xCC
//240
, 0x9E , 0x90 , 0x21 , 7 , 0x90 , 0x43 , 0x64 , 0xC0
, 0xF , 0xC6 , 0x90 , 0x9C , 0xC1 , 0x5B , 3 , 0xE2
, 0x1D , 0x81 , 0xE0 , 0x5E , 0x1D , 3 , 0x84 , 0xB8
, 0x2C ,0xF , 0x80 , 0xB1 , 0x83 , 0xE0 , 0x30 , 0x41
//260
, 0x1E , 0x43 , 0x89 , 0x83 , 0x50 , 0xFC , 0x24 , 0x2E
, 0x13 , 0x83 , 0xF1 , 0x7C , 0x4C , 0x2C , 0xC9 ,0xD
, 0x83 , 0xB0 , 0xB5 , 0x82 , 0xE4 , 0xE8 , 6 , 0x9C
, 7 , 0xA0 , 0x99 , 0x1D , 7 , 0x3E , 0x82 , 0x8F
//280
, 0x70 , 0x30 , 0x74 , 0x40 , 0xCA , 0x10 , 0xE4 , 0xE8
, 0xF , 0x92 , 0x14 , 0x3F , 6 , 0xF8 , 0x84 , 0x88
, 0x43 , 0x81 ,0xA , 0x34 , 0x39 , 0x41 , 0xC6 , 0xE3
, 0x1C , 0x47 , 3 , 0xB0 , 0xB8 , 0x13 ,0xA , 0xC2
//2A0
, 0x64 , 0xF8 , 0x18 , 0xF9 , 0x60 , 0xB3 , 0xC0 , 0x65
, 0x20 , 0x60 , 0xA6 , 0x8C , 0xC3 , 0x81 , 0x20 , 0x30
, 0x26 , 0x1E , 0x1C , 0x38 , 0xD3 , 1 , 0xB0 , 0x26
, 0x40 , 0xF4 ,0xB , 0xC3 , 0x42 , 0x1F , 0x85 , 0x32
//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 , 0xFC , 1 , 0xBC , 0x80
, 0x13 , 0x1E , 0 , 0x7F , 0xE1 , 0x40 , 0x7F , 0xA0
, 0x7F , 0xB0 , 0 , 0x3F , 0xC0 , 0x1F , 0xC0 , 0x38
, 0xF , 0xF0 , 0x1F , 0x80 , 0xFF , 1 , 0xFC , 3
//4e0
, 0xF1 , 0x7E , 1 , 0xFE , 1 , 0xF0 , 0xFF , 0
, 0x7F , 0xC0 , 0x1D , 7 , 0xF0 ,0xF , 0xC0 , 0x7E
, 6 , 0xE0 , 7 , 0xE0 ,0xF , 0xF8 , 6 , 0xC1
, 0xFE , 1 , 0xFC , 3 , 0xE0 ,0xF , 0 , 0xFC
};
#endif
================================================
FILE: lib/SAM/SamTabs.h
================================================
#ifndef SAMTABS_H
#define SAMTABS_H
//tab40672
const unsigned char stressInputTable[] =
{
'*', '1', '2', '3', '4', '5', '6', '7', '8'
};
//tab40682
const unsigned char signInputTable1[]={
' ', '.', '?', ',', '-', 'I', 'I', 'E',
'A', 'A', 'A', 'A', 'U', 'A', 'I', 'E',
'U', 'O', 'R', 'L', 'W', 'Y', 'W', 'R',
'L', 'W', 'Y', 'M', 'N', 'N', 'D', 'Q',
'S', 'S', 'F', 'T', '/', '/', 'Z', 'Z',
'V', 'D', 'C', '*', 'J', '*', '*', '*',
'E', 'A', 'O', 'A', 'O', 'U', 'B', '*',
'*', 'D', '*', '*', 'G', '*', '*', 'G',
'*', '*', 'P', '*', '*', 'T', '*', '*',
'K', '*', '*', 'K', '*', '*', 'U', 'U',
'U'
};
//tab40763
const unsigned char signInputTable2[] =
{
'*', '*', '*', '*', '*', 'Y', 'H', 'H',
'E', 'A', 'H', 'O', 'H', 'X', 'X', 'R',
'X', 'H', 'X', 'X', 'X', 'X', 'H', '*',
'*', '*', '*', '*', '*', 'X', 'X', '*',
'*', 'H', '*', 'H', 'H', 'X', '*', 'H',
'*', 'H', 'H', '*', '*', '*', '*', '*',
'Y', 'Y', 'Y', 'W', 'W', 'W', '*', '*',
'*', '*', '*', '*', '*', '*', '*', 'X',
'*', '*', '*', '*', '*', '*', '*', '*',
'*', '*', '*', 'X', '*', '*', 'L', 'M',
'N'
};
//loc_9F8C
const unsigned char flags[]={
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0xA4 , 0xA4 , 0xA4 ,
0xA4 , 0xA4 , 0xA4 , 0x84 , 0x84 , 0xA4 , 0xA4 , 0x84 ,
0x84 , 0x84 , 0x84 , 0x84 , 0x84 , 0x84 , 0x44 , 0x44 ,
0x44 , 0x44 , 0x44 , 0x4C , 0x4C , 0x4C , 0x48 , 0x4C ,
0x40 , 0x40 , 0x40 , 0x40 , 0x40 , 0x40 , 0x44 , 0x44 ,
0x44 , 0x44 , 0x48 , 0x40 , 0x4C , 0x44 , 0x00 , 0x00 ,
0xB4 , 0xB4 , 0xB4 , 0x94 , 0x94 , 0x94 , 0x4E , 0x4E ,
0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E , 0x4E ,
0x4E , 0x4E , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B ,
0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x4B , 0x80 , 0xC1 ,
0xC1
};
//??? flags overlap flags2
//loc_9FDA
const unsigned char flags2[] =
{
0x80 , 0xC1 , 0xC1 , 0xC1 , 0xC1 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x10 ,
0x10 , 0x10 , 0x10 , 0x08 , 0x0C , 0x08 , 0x04 , 0x40 ,
0x24 , 0x20 , 0x20 , 0x24 , 0x00 , 0x00 , 0x24 , 0x20 ,
0x20 , 0x24 , 0x20 , 0x20 , 0x00 , 0x20 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x04 , 0x04 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x04 , 0x04 , 0x04 ,
0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
};
//tab45616???
const unsigned char phonemeStressedLengthTable[] =
{
0x00 , 0x12 , 0x12 , 0x12 , 8 ,0xB , 9 ,0xB ,
0xE ,0xF ,0xB , 0x10 ,0xC , 6 , 6 ,0xE ,
0xC ,0xE ,0xC ,0xB , 8 , 8 ,0xB ,0xA ,
9 , 8 , 8 , 8 , 8 , 8 , 3 , 5 ,
2 , 2 , 2 , 2 , 2 , 2 , 6 , 6 ,
8 , 6 , 6 , 2 , 9 , 4 , 2 , 1 ,
0xE ,0xF ,0xF ,0xF ,0xE ,0xE , 8 , 2 ,
2 , 7 , 2 , 1 , 7 , 2 , 2 , 7 ,
2 , 2 , 8 , 2 , 2 , 6 , 2 , 2 ,
7 , 2 , 4 , 7 , 1 , 4 , 5 , 5
};
//tab45536???
const unsigned char phonemeLengthTable[] =
{
0 , 0x12 , 0x12 , 0x12 , 8 , 8 , 8 , 8 ,
8 ,0xB , 6 ,0xC ,0xA , 5 , 5 ,0xB ,
0xA ,0xA ,0xA , 9 , 8 , 7 , 9 , 7 ,
6 , 8 , 6 , 7 , 7 , 7 , 2 , 5 ,
2 , 2 , 2 , 2 , 2 , 2 , 6 , 6 ,
7 , 6 , 6 , 2 , 8 , 3 , 1 , 0x1E ,
0xD ,0xC ,0xC ,0xC ,0xE , 9 , 6 , 1 ,
2 , 5 , 1 , 1 , 6 , 1 , 2 , 6 ,
1 , 2 , 8 , 2 , 2 , 4 , 2 , 2 ,
6 , 1 , 4 , 6 , 1 , 4 , 0xC7 , 0xFF
};
/*
Ind | phoneme | flags |
-----|---------|----------|
0 | * | 00000000 |
1 | .* | 00000000 |
2 | ?* | 00000000 |
3 | ,* | 00000000 |
4 | -* | 00000000 |
VOWELS
5 | IY | 10100100 |
6 | IH | 10100100 |
7 | EH | 10100100 |
8 | AE | 10100100 |
9 | AA | 10100100 |
10 | AH | 10100100 |
11 | AO | 10000100 |
17 | OH | 10000100 |
12 | UH | 10000100 |
16 | UX | 10000100 |
15 | ER | 10000100 |
13 | AX | 10100100 |
14 | IX | 10100100 |
DIPHTONGS
48 | EY | 10110100 |
49 | AY | 10110100 |
50 | OY | 10110100 |
51 | AW | 10010100 |
52 | OW | 10010100 |
53 | UW | 10010100 |
21 | YX | 10000100 |
20 | WX | 10000100 |
18 | RX | 10000100 |
19 | LX | 10000100 |
37 | /X | 01000000 |
30 | DX | 01001000 |
22 | WH | 01000100 |
VOICED CONSONANTS
23 | R* | 01000100 |
24 | L* | 01000100 |
25 | W* | 01000100 |
26 | Y* | 01000100 |
27 | M* | 01001100 |
28 | N* | 01001100 |
29 | NX | 01001100 |
54 | B* | 01001110 |
57 | D* | 01001110 |
60 | G* | 01001110 |
44 | J* | 01001100 |
38 | Z* | 01000100 |
39 | ZH | 01000100 |
40 | V* | 01000100 |
41 | DH | 01000100 |
unvoiced CONSONANTS
32 | S* | 01000000 |
33 | SH | 01000000 |
34 | F* | 01000000 |
35 | TH | 01000000 |
66 | P* | 01001011 |
69 | T* | 01001011 |
72 | K* | 01001011 |
42 | CH | 01001000 |
36 | /H | 01000000 |
43 | ** | 01000000 |
45 | ** | 01000100 |
46 | ** | 00000000 |
47 | ** | 00000000 |
55 | ** | 01001110 |
56 | ** | 01001110 |
58 | ** | 01001110 |
59 | ** | 01001110 |
61 | ** | 01001110 |
62 | ** | 01001110 |
63 | GX | 01001110 |
64 | ** | 01001110 |
65 | ** | 01001110 |
67 | ** | 01001011 |
68 | ** | 01001011 |
70 | ** | 01001011 |
71 | ** | 01001011 |
73 | ** | 01001011 |
74 | ** | 01001011 |
75 | KX | 01001011 |
76 | ** | 01001011 |
77 | ** | 01001011 |
SPECIAL
78 | UL | 10000000 |
79 | UM | 11000001 |
80 | UN | 11000001 |
31 | Q* | 01001100 |
*/
#endif
================================================
FILE: lib/SAM/debug.c
================================================
#include<stdio.h>
extern const unsigned char signInputTable1[];
extern const unsigned char signInputTable2[];
void PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLength, unsigned char *stress)
{
int i = 0;
printf("===========================================\n");
printf("Internal Phoneme presentation:\n\n");
printf(" idx phoneme length stress\n");
printf("------------------------------\n");
while((phonemeindex[i] != 255) && (i < 255))
{
if (phonemeindex[i] < 81)
{
printf(" %3i %c%c %3i %i\n",
phonemeindex[i],
signInputTable1[phonemeindex[i]],
signInputTable2[phonemeindex[i]],
phonemeLength[i],
stress[i]
);
} else
{
printf(" %3i ?? %3i %i\n", phonemeindex[i], phonemeLength[i], stress[i]);
}
i++;
}
printf("===========================================\n");
printf("\n");
}
void PrintOutput(
unsigned char *flag,
unsigned char *f1,
unsigned char *f2,
unsigned char *f3,
unsigned char *a1,
unsigned char *a2,
unsigned char *a3,
unsigned char *p)
{
printf("===========================================\n");
printf("Final data for speech output:\n\n");
int i = 0;
printf(" flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch\n");
printf("------------------------------------------------\n");
while(i < 255)
{
printf("%5i %5i %5i %5i %5i %5i %5i %5i\n", flag[i], a1[i], f1[i], a2[i], f2[i], a3[i], f3[i], p[i]);
i++;
}
printf("===========================================\n");
}
extern unsigned char GetRuleByte(unsigned short mem62, unsigned char Y);
void PrintRule(int offset)
{
int i = 1;
unsigned char A = 0;
printf("Applying rule: ");
do
{
A = GetRuleByte(offset, i);
if ((A&127) == '=') printf(" -> "); else printf("%c", A&127);
i++;
} while ((A&128)==0);
printf("\n");
}
================================================
FILE: lib/SAM/debug.h
================================================
#ifndef DEBUG_H
#define DEBUG_H
void PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLength, unsigned char *stress);
void PrintOutput(
unsigned char *flag,
unsigned char *f1,
unsigned char *f2,
unsigned char *f3,
unsigned char *a1,
unsigned char *a2,
unsigned char *a3,
unsigned char *p);
void PrintRule(int offset);
#endif
================================================
FILE: lib/SAM/reciter.c
================================================
#include <stdio.h>
#include <string.h>
#include "reciter.h"
#include "ReciterTabs.h"
#include "debug.h"
extern unsigned char A, X, Y;
extern int debug;
static unsigned char inputtemp[256]; // secure copy of input tab36096
void Code37055(unsigned char mem59)
{
X = mem59;
X--;
A = inputtemp[X];
Y = A;
A = tab36376[Y];
return;
}
void Code37066(unsigned char mem58)
{
X = mem58;
X++;
A = inputtemp[X];
Y = A;
A = tab36376[Y];
}
unsigned char GetRuleByte(unsigned short mem62, unsigned char Y)
{
unsigned int address = mem62;
if (mem62 >= 37541)
{
address -= 37541;
return rules2[address+Y];
}
address -= 32000;
return rules[address+Y];
}
int TextToPhonemes(unsigned char *input) // Code36484
{
//unsigned char *tab39445 = &mem[39445]; //input and output
//unsigned char mem29;
unsigned char mem56; //output position for phonemes
unsigned char mem57;
unsigned char mem58;
unsigned char mem59;
unsigned char mem60;
unsigned char mem61;
unsigned short mem62; // memory position of current rule
unsigned char mem64; // position of '=' or current character
unsigned char mem65; // position of ')'
unsigned char mem66; // position of '('
unsigned char mem36653;
inputtemp[0] = 32;
// secure copy of input
// because input will be overwritten by phonemes
X = 1;
Y = 0;
do
{
//pos36499:
A = input[Y] & 127;
if ( A >= 112) A = A & 95;
else if ( A >= 96) A = A & 79;
inputtemp[X] = A;
X++;
Y++;
} while (Y != 255);
X = 255;
inputtemp[X] = 27;
mem61 = 255;
pos36550:
A = 255;
mem56 = 255;
pos36554:
while(1)
{
mem61++;
X = mem61;
A = inputtemp[X];
mem64 = A;
if (A == '[')
{
mem56++;
X = mem56;
A = 155;
input[X] = 155;
//goto pos36542;
// Code39771(); //Code39777();
return 1;
}
//pos36579:
if (A != '.') break;
X++;
Y = inputtemp[X];
A = tab36376[Y] & 1;
if(A != 0) break;
mem56++;
X = mem56;
A = '.';
input[X] = '.';
} //while
//pos36607:
A = mem64;
Y = A;
A = tab36376[A];
mem57 = A;
if((A&2) != 0)
{
mem62 = 37541;
goto pos36700;
}
//pos36630:
A = mem57;
if(A != 0) goto pos36677;
A = 32;
inputtemp[X] = ' ';
mem56++;
X = mem56;
if (X > 120) goto pos36654;
input[X] = A;
goto pos36554;
// -----
//36653 is unknown. Contains position
pos36654:
input[X] = 155;
A = mem61;
mem36653 = A;
// mem29 = A; // not used
// Code36538(); das ist eigentlich
return 1;
//Code39771();
//go on if there is more input ???
mem61 = mem36653;
goto pos36550;
pos36677:
A = mem57 & 128;
if(A == 0)
{
//36683: BRK
return 0;
}
// go to the right rules for this character.
X = mem64 - 'A';
mem62 = tab37489[X] | (tab37515[X]<<8);
// -------------------------------------
// go to next rule
// -------------------------------------
pos36700:
// find next rule
Y = 0;
do
{
mem62 += 1;
A = GetRuleByte(mem62, Y);
} while ((A & 128) == 0);
Y++;
//pos36720:
// find '('
while(1)
{
A = GetRuleByte(mem62, Y);
if (A == '(') break;
Y++;
}
mem66 = Y;
//pos36732:
// find ')'
do
{
Y++;
A = GetRuleByte(mem62, Y);
} while(A != ')');
mem65 = Y;
//pos36741:
// find '='
do
{
Y++;
A = GetRuleByte(mem62, Y);
A = A & 127;
} while (A != '=');
mem64 = Y;
X = mem61;
mem60 = X;
// compare the string within the bracket
Y = mem66;
Y++;
//pos36759:
while(1)
{
mem57 = inputtemp[X];
A = GetRuleByte(mem62, Y);
if (A != mem57) goto pos36700;
Y++;
if(Y == mem65) break;
X++;
mem60 = X;
}
// the string in the bracket is correct
//pos36787:
A = mem61;
mem59 = mem61;
pos36791:
while(1)
{
mem66--;
Y = mem66;
A = GetRuleByte(mem62, Y);
mem57 = A;
//36800: BPL 36805
if ((A & 128) != 0) goto pos37180;
X = A & 127;
A = tab36376[X] & 128;
if (A == 0) break;
X = mem59-1;
A = inputtemp[X];
if (A != mem57) goto pos36700;
mem59 = X;
}
//pos36833:
A = mem57;
if (A == ' ') goto pos36895;
if (A == '#') goto pos36910;
if (A == '.') goto pos36920;
if (A == '&') goto pos36935;
if (A == '@') goto pos36967;
if (A == '^') goto pos37004;
if (A == '+') goto pos37019;
if (A == ':') goto pos37040;
// Code42041(); //Error
//36894: BRK
return 0;
// --------------
pos36895:
Code37055(mem59);
A = A & 128;
if(A != 0) goto pos36700;
pos36905:
mem59 = X;
goto pos36791;
// --------------
pos36910:
Code37055(mem59);
A = A & 64;
if(A != 0) goto pos36905;
goto pos36700;
// --------------
pos36920:
Code37055(mem59);
A = A & 8;
if(A == 0) goto pos36700;
pos36930:
mem59 = X;
goto pos36791;
// --------------
pos36935:
Code37055(mem59);
A = A & 16;
if(A != 0) goto pos36930;
A = inputtemp[X];
if (A != 72) goto pos36700;
X--;
A = inputtemp[X];
if ((A == 67) || (A == 83)) goto pos36930;
goto pos36700;
// --------------
pos36967:
Code37055(mem59);
A = A & 4;
if(A != 0) goto pos36930;
A = inputtemp[X];
if (A != 72) goto pos36700;
if ((A != 84) && (A != 67) && (A != 83)) goto pos36700;
mem59 = X;
goto pos36791;
// --------------
pos37004:
Code37055(mem59);
A = A & 32;
if(A == 0) goto pos36700;
pos37014:
mem59 = X;
goto pos36791;
// --------------
pos37019:
X = mem59;
X--;
A = inputtemp[X];
if ((A == 'E') || (A == 'I') || (A == 'Y')) goto pos37014;
goto pos36700;
// --------------
pos37040:
Code37055(mem59);
A = A & 32;
if(A == 0) goto pos36791;
mem59 = X;
goto pos37040;
//---------------------------------------
pos37077:
X = mem58+1;
A = inputtemp[X];
if (A != 'E') goto pos37157;
X++;
Y = inputtemp[X];
X--;
A = tab36376[Y] & 128;
if(A == 0) goto pos37108;
X++;
A = inputtemp[X];
if (A != 'R') goto pos37113;
pos37108:
mem58 = X;
goto pos37184;
pos37113:
if ((A == 83) || (A == 68)) goto pos37108; // 'S' 'D'
if (A != 76) goto pos37135; // 'L'
X++;
A = inputtemp[X];
if (A != 89) goto pos36700;
goto pos37108;
pos37135:
if (A != 70) goto pos36700;
X++;
A = inputtemp[X];
if (A != 85) goto pos36700;
X++;
A = inputtemp[X];
if (A == 76) goto pos37108;
goto pos36700;
pos37157:
if (A != 73) goto pos36700;
X++;
A = inputtemp[X];
if (A != 78) goto pos36700;
X++;
A = inputtemp[X];
if (A == 71) goto pos37108;
//pos37177:
goto pos36700;
// -----------------------------------------
pos37180:
A = mem60;
mem58 = A;
pos37184:
Y = mem65 + 1;
//37187: CPY 64
// if(? != 0) goto pos37194;
if(Y == mem64) goto pos37455;
mem65 = Y;
//37196: LDA (62),y
A = GetRuleByte(mem62, Y);
mem57 = A;
X = A;
A = tab36376[X] & 128;
if(A == 0) goto pos37226;
X = mem58+1;
A = inputtemp[X];
if (A != mem57) goto pos36700;
mem58 = X;
goto pos37184;
pos37226:
A = mem57;
if (A == 32) goto pos37295; // ' '
if (A == 35) goto pos37310; // '#'
if (A == 46) goto pos37320; // '.'
if (A == 38) goto pos37335; // '&'
if (A == 64) goto pos37367; // ''
if (A == 94) goto pos37404; // ''
if (A == 43) goto pos37419; // '+'
if (A == 58) goto pos37440; // ':'
if (A == 37) goto pos37077; // '%'
//pos37291:
// Code42041(); //Error
//37294: BRK
return 0;
// --------------
pos37295:
Code37066(mem58);
A = A & 128;
if(A != 0) goto pos36700;
pos37305:
mem58 = X;
goto pos37184;
// --------------
pos37310:
Code37066(mem58);
A = A & 64;
if(A != 0) goto pos37305;
goto pos36700;
// --------------
pos37320:
Code37066(mem58);
A = A & 8;
if(A == 0) goto pos36700;
pos37330:
mem58 = X;
goto pos37184;
// --------------
pos37335:
Code37066(mem58);
A = A & 16;
if(A != 0) goto pos37330;
A = inputtemp[X];
if (A != 72) goto pos36700;
X++;
A = inputtemp[X];
if ((A == 67) || (A == 83)) goto pos37330;
goto pos36700;
// --------------
pos37367:
Code37066(mem58);
A = A & 4;
if(A != 0) goto pos37330;
A = inputtemp[X];
if (A != 72) goto pos36700;
if ((A != 84) && (A != 67) && (A != 83)) goto pos36700;
mem58 = X;
goto pos37184;
// --------------
pos37404:
Code37066(mem58);
A = A & 32;
if(A == 0) goto pos36700;
pos37414:
mem58 = X;
goto pos37184;
// --------------
pos37419:
X = mem58;
X++;
A = inputtemp[X];
if ((A == 69) || (A == 73) || (A == 89)) goto pos37414;
goto pos36700;
// ----------------------
pos37440:
Code37066(mem58);
A = A & 32;
if(A == 0) goto pos37184;
mem58 = X;
goto pos37440;
pos37455:
Y = mem64;
mem61 = mem60;
#ifdef SAM_DEBUG
PrintRule(mem62);
#endif
pos37461:
//37461: LDA (62),y
A = GetRuleByte(mem62, Y);
mem57 = A;
A = A & 127;
if (A != '=')
{
mem56++;
X = mem56;
input[X] = A;
}
//37478: BIT 57
//37480: BPL 37485 //not negative flag
if ((mem57 & 128) == 0) goto pos37485; //???
goto pos36554;
pos37485:
Y++;
goto pos37461;
}
================================================
FILE: lib/SAM/reciter.h
================================================
#ifndef RECITER_C
#define RECITER_C
//int TextToPhonemes(char *input, char *output);
int TextToPhonemes(unsigned char *input);
#endif
================================================
FILE: lib/SAM/render.c
================================================
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "render.h"
#include "RenderTabs.h"
#include "debug.h"
extern int debug;
unsigned char wait1 = 7;
unsigned char wait2 = 6;
extern unsigned char A, X, Y;
extern unsigned char mem44;
extern unsigned char mem47;
extern unsigned char mem49;
extern unsigned char mem39;
extern unsigned char mem50;
extern unsigned char mem51;
extern unsigned char mem53;
extern unsigned char mem56;
extern unsigned char speed;
extern unsigned char pitch;
extern int singmode;
extern unsigned char phonemeIndexOutput[60]; //tab47296
extern unsigned char stressOutput[60]; //tab47365
extern unsigned char phonemeLengthOutput[60]; //tab47416
unsigned char pitches[256]; // tab43008
unsigned char frequency1[256];
unsigned char frequency2[256];
unsigned char frequency3[256];
unsigned char amplitude1[256];
unsigned char amplitude2[256];
unsigned char amplitude3[256];
unsigned char sampledConsonantFlag[256]; // tab44800
void AddInflection(unsigned char mem48, unsigned char phase1);
unsigned char trans(unsigned char mem39212, unsigned char mem39213);
// contains the final soundbuffer
extern int bufferpos;
extern void (*SAM_write_buffer)(int pos, char value);
//timetable for more accurate c64 simulation
int timetable[5][5] =
{
{162, 167, 167, 127, 128},
{226, 60, 60, 0, 0},
{225, 60, 59, 0, 0},
{200, 0, 0, 54, 55},
{199, 0, 0, 54, 54}
};
static unsigned oldtimetableindex = 0;
void Output8BitAry(int index, unsigned char ary[5])
{
int k;
bufferpos += timetable[oldtimetableindex][index];
oldtimetableindex = index;
// write a little bit in advance
for(k=0; k<5; k++)
SAM_write_buffer(bufferpos/50 + k, ary[k]);
}
void Output8Bit(int index, unsigned char A)
{
unsigned char ary[5] = {A,A,A,A,A};
Output8BitAry(index, ary);
}
//written by me because of different table positions.
// mem[47] = ...
// 168=pitches
// 169=frequency1
// 170=frequency2
// 171=frequency3
// 172=amplitude1
// 173=amplitude2
// 174=amplitude3
unsigned char Read(unsigned char p, unsigned char Y)
{
switch(p)
{
case 168: return pitches[Y];
case 169: return frequency1[Y];
case 170: return frequency2[Y];
case 171: return frequency3[Y];
case 172: return amplitude1[Y];
case 173: return amplitude2[Y];
case 174: return amplitude3[Y];
}
printf("Error reading to tables");
return 0;
}
void Write(unsigned char p, unsigned char Y, unsigned char value)
{
switch(p)
{
case 168: pitches[Y] = value; return;
case 169: frequency1[Y] = value; return;
case 170: frequency2[Y] = value; return;
case 171: frequency3[Y] = value; return;
case 172: amplitude1[Y] = value; return;
case 173: amplitude2[Y] = value; return;
case 174: amplitude3[Y] = value; return;
}
printf("Error writing to tables\n");
}
// -------------------------------------------------------------------------
//Code48227
// Render a sampled sound from the sampleTable.
//
// Phoneme Sample Start Sample End
// 32: S* 15 255
// 33: SH 257 511
// 34: F* 559 767
// 35: TH 583 767
// 36: /H 903 1023
// 37: /X 1135 1279
// 38: Z* 84 119
// 39: ZH 340 375
// 40: V* 596 639
// 41: DH 596 631
//
// 42: CH
// 43: ** 399 511
//
// 44: J*
// 45: ** 257 276
// 46: **
//
// 66: P*
// 67: ** 743 767
// 68: **
//
// 69: T*
// 70: ** 231 255
// 71: **
//
// The SampledPhonemesTable[] holds flags indicating if a phoneme is
// voiced or not. If the upper 5 bits are zero, the sample is voiced.
//
// Samples in the sampleTable are compressed, with bits being converted to
// bytes from high bit to low, as follows:
//
// unvoiced 0 bit -> X
// unvoiced 1 bit -> 5
//
// voiced 0 bit -> 6
// voiced 1 bit -> 24
//
// Where X is a value from the table:
//
// { 0x18, 0x1A, 0x17, 0x17, 0x17 };
//
// The index into this table is determined by masking off the lower
// 3 bits from the SampledPhonemesTable:
//
// index = (SampledPhonemesTable[i] & 7) - 1;
//
// For voices samples, samples are interleaved between voiced output.
// Code48227()
void RenderSample(unsigned char *mem66)
{
int tempA;
// current phoneme's index
mem49 = Y;
// mask low three bits and subtract 1 get value to
// convert 0 bits on unvoiced samples.
A = mem39&7;
X = A-1;
// store the result
mem56 = X;
// determine which offset to use from table { 0x18, 0x1A, 0x17, 0x17, 0x17 }
// T, S, Z 0 0x18
// CH, J, SH, ZH 1 0x1A
// P, F*, V, TH, DH 2 0x17
// /H 3 0x17
// /X 4 0x17
// get value from the table
mem53 = tab48426[X];
mem47 = X; //46016+mem[56]*256
// voiced sample?
A = mem39 & 248;
if(A == 0)
{
// voiced phoneme: Z*, ZH, V*, DH
Y = mem49;
A = pitches[mem49] >> 4;
// jump to voiced portion
goto pos48315;
}
Y = A ^ 255;
pos48274:
// step through the 8 bits in the sample
mem56 = 8;
// get the next sample from the table
// mem47*256 = offset to start of samples
A = sampleTable[mem47*256+Y];
pos48280:
// left shift to get the high bit
tempA = A;
A = A << 1;
//48281: BCC 48290
// bit not set?
if ((tempA & 128) == 0)
{
// convert the bit to value from table
X = mem53;
//mem[54296] = X;
// output the byte
Output8Bit(1, (X&0x0f) * 16);
// if X != 0, exit loop
if(X != 0) goto pos48296;
}
// output a 5 for the on bit
Output8Bit(2, 5 * 16);
//48295: NOP
pos48296:
X = 0;
// decrement counter
mem56--;
// if not done, jump to top of loop
if (mem56 != 0) goto pos48280;
// increment position
Y++;
if (Y != 0) goto pos48274;
// restore values and return
mem44 = 1;
Y = mem49;
return;
unsigned char phase1;
pos48315:
// handle voiced samples here
// number of samples?
phase1 = A ^ 255;
Y = *mem66;
do
{
//pos48321:
// shift through all 8 bits
mem56 = 8;
//A = Read(mem47, Y);
// fetch value from table
A = sampleTable[mem47*256+Y];
// loop 8 times
//pos48327:
do
{
//48327: ASL A
//48328: BCC 48337
// left shift and check high bit
tempA = A;
A = A << 1;
if ((tempA & 128) != 0)
{
// if bit set, output 26
X = 26;
Output8Bit(3, (X&0xf)*16);
} else
{
//timetable 4
// bit is not set, output a 6
X=6;
Output8Bit(4, (X&0xf)*16);
}
mem56--;
} while(mem56 != 0);
// move ahead in the table
Y++;
// continue until counter done
phase1++;
} while (phase1 != 0);
// if (phase1 != 0) goto pos48321;
// restore values and return
A = 1;
mem44 = 1;
*mem66 = Y;
Y = mem49;
return;
}
// RENDER THE PHONEMES IN THE LIST
//
// The phoneme list is converted into sound through the steps:
//
// 1. Copy each phoneme <length> number of times into the frames list,
// where each frame represents 10 milliseconds of sound.
//
// 2. Determine the transitions lengths between phonemes, and linearly
// interpolate the values across the frames.
//
// 3. Offset the pitches by the fundamental frequency.
//
// 4. Render the each frame.
//void Code47574()
void Render()
{
unsigned char phase1 = 0; //mem43
unsigned char phase2=0;
unsigned char phase3=0;
unsigned char mem66=0;
unsigned char mem38=0;
unsigned char mem40=0;
unsigned char speedcounter=0; //mem45
unsigned char mem48=0;
int i;
if (phonemeIndexOutput[0] == 255) return; //exit if no data
A = 0;
X = 0;
mem44 = 0;
// CREATE FRAMES
//
// The length parameter in the list corresponds to the number of frames
// to expand the phoneme to. Each frame represents 10 milliseconds of time.
// So a phoneme with a length of 7 = 7 frames = 70 milliseconds duration.
//
// The parameters are copied from the phoneme to the frame verbatim.
// pos47587:
do
{
// get the index
Y = mem44;
// get the phoneme at the index
A = phonemeIndexOutput[mem44];
mem56 = A;
// if terminal phoneme, exit the loop
if (A == 255) break;
// period phoneme *.
if (A == 1)
{
// add rising inflection
A = 1;
mem48 = 1;
//goto pos48376;
AddInflection(mem48, phase1);
}
/*
if (A == 2) goto pos48372;
*/
// question mark phoneme?
if (A == 2)
{
// create falling inflection
mem48 = 255;
AddInflection(mem48, phase1);
}
// pos47615:
// get the stress amount (more stress = higher pitch)
phase1 = tab47492[stressOutput[Y] + 1];
// get number of frames to write
phase2 = phonemeLengthOutput[Y];
Y = mem56;
// copy from the source to the frames list
do
{
frequency1[X] = freq1data[Y]; // F1 frequency
frequency2[X] = freq2data[Y]; // F2 frequency
frequency3[X] = freq3data[Y]; // F3 frequency
amplitude1[X] = ampl1data[Y]; // F1 amplitude
amplitude2[X] = ampl2data[Y]; // F2 amplitude
amplitude3[X] = ampl3data[Y]; // F3 amplitude
sampledConsonantFlag[X] = sampledConsonantFlags[Y]; // phoneme data for sampled consonants
pitches[X] = pitch + phase1; // pitch
X++;
phase2--;
} while(phase2 != 0);
mem44++;
} while(mem44 != 0);
// -------------------
//pos47694:
// CREATE TRANSITIONS
//
// Linear transitions are now created to smoothly connect the
// end of one sustained portion of a phoneme to the following
// phoneme.
//
// To do this, three tables are used:
//
// Table Purpose
// ========= ==================================================
// blendRank Determines which phoneme's blend values are used.
//
// blendOut The number of frames at the end of the phoneme that
// will be used to transition to the following phoneme.
//
// blendIn The number of frames of the following phoneme that
// will be used to transition into that phoneme.
//
// In creating a transition between two phonemes, the phoneme
// with the HIGHEST rank is used. Phonemes are ranked on how much
// their identity is based on their transitions. For example,
// vowels are and diphthongs are identified by their sustained portion,
// rather than the transitions, so they are given low values. In contrast,
// stop consonants (P, B, T, K) and glides (Y, L) are almost entirely
// defined by their transitions, and are given high rank values.
//
// Here are the rankings used by SAM:
//
// Rank Type Phonemes
// 2 All vowels IY, IH, etc.
// 5 Diphthong endings YX, WX, ER
// 8 Terminal liquid consonants LX, WX, YX, N, NX
// 9 Liquid consonants L, RX, W
// 10 Glide R, OH
// 11 Glide WH
// 18 Voiceless fricatives S, SH, F, TH
// 20 Voiced fricatives Z, ZH, V, DH
// 23 Plosives, stop consonants P, T, K, KX, DX, CH
// 26 Stop consonants J, GX, B, D, G
// 27-29 Stop consonants (internal) **
// 30 Unvoiced consonants /H, /X and Q*
// 160 Nasal M
//
// To determine how many frames to use, the two phonemes are
// compared using the blendRank[] table. The phoneme with the
// higher rank is selected. In case of a tie, a blend of each is used:
//
// if blendRank[phoneme1] == blendRank[phomneme2]
// // use lengths from each phoneme
// outBlendFrames = outBlend[phoneme1]
// inBlendFrames = outBlend[phoneme2]
// else if blendRank[phoneme1] > blendRank[phoneme2]
// // use lengths from first phoneme
// outBlendFrames = outBlendLength[phoneme1]
// inBlendFrames = inBlendLength[phoneme1]
// else
// // use lengths from the second phoneme
// // note that in and out are SWAPPED!
// outBlendFrames = inBlendLength[phoneme2]
// inBlendFrames = outBlendLength[phoneme2]
//
// Blend lengths can't be less than zero.
//
// Transitions are assumed to be symetrical, so if the transition
// values for the second phoneme are used, the inBlendLength and
// outBlendLength values are SWAPPED.
//
// For most of the parameters, SAM interpolates over the range of the last
// outBlendFrames-1 and the first inBlendFrames.
//
// The exception to this is the Pitch[] parameter, which is interpolates the
// pitch from the CENTER of the current phoneme to the CENTER of the next
// phoneme.
//
// Here are two examples. First, For example, consider the word "SUN" (S AH N)
//
// Phoneme Duration BlendWeight OutBlendFrames InBlendFrames
// S 2 18 1 3
// AH 8 2 4 4
// N 7 8 1 2
//
// The formant transitions for the output frames are calculated as follows:
//
// flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch
// ------------------------------------------------
// S
// 241 0 6 0 73 0 99 61 Use S (weight 18) for transition instead of AH (weight 2)
// 241 0 6 0 73 0 99 61 <-- (OutBlendFrames-1) = (1-1) = 0 frames
// AH
// 0 2 10 2 66 0 96 59 * <-- InBlendFrames = 3 frames
// 0 4 14 3 59 0 93 57 *
// 0 8 18 5 52 0 90 55 *
// 0 15 22 9 44 1 87 53
// 0 15 22 9 44 1 87 53
// 0 15 22 9 44 1 87 53 Use N (weight 8) for transition instead of AH (weight 2).
// 0 15 22 9 44 1 87 53 Since N is second phoneme, reverse the IN and OUT values.
// 0 11 17 8 47 1 98 56 * <-- (InBlendFrames-1) = (2-1) = 1 frames
// N
// 0 8 12 6 50 1 109 58 * <-- OutBlendFrames = 1
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
//
// Now, consider the reverse "NUS" (N AH S):
//
// flags ampl1 freq1 ampl2 freq2 ampl3 freq3 pitch
// ------------------------------------------------
// N
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61
// 0 5 6 5 54 0 121 61 Use N (weight 8) for transition instead of AH (weight 2)
// 0 5 6 5 54 0 121 61 <-- (OutBlendFrames-1) = (1-1) = 0 frames
// AH
// 0 8 11 6 51 0 110 59 * <-- InBlendFrames = 2
// 0 11 16 8 48 0 99 56 *
// 0 15 22 9 44 1 87 53 Use S (weight 18) for transition instead of AH (weight 2)
// 0 15 22 9 44 1 87 53 Since S is second phoneme, reverse the IN and OUT values.
// 0 9 18 5 51 1 90 55 * <-- (InBlendFrames-1) = (3-1) = 2
// 0 4 14 3 58 1 93 57 *
// S
// 241 2 10 2 65 1 96 59 * <-- OutBlendFrames = 1
// 241 0 6 0 73 0 99 61
A = 0;
mem44 = 0;
mem49 = 0; // mem49 starts at as 0
X = 0;
while(1) //while No. 1
{
// get the current and following phoneme
Y = phonemeIndexOutput[X];
A = phonemeIndexOutput[X+1];
X++;
// exit loop at end token
if (A == 255) break;//goto pos47970;
// get the ranking of each phoneme
X = A;
mem56 = blendRank[A];
A = blendRank[Y];
// compare the rank - lower rank value is stronger
if (A == mem56)
{
// same rank, so use out blend lengths from each phoneme
phase1 = outBlendLength[Y];
phase2 = outBlendLength[X];
} else
if (A < mem56)
{
// first phoneme is stronger, so us it's blend lengths
phase1 = inBlendLength[X];
phase2 = outBlendLength[X];
} else
{
// second phoneme is stronger, so use it's blend lengths
// note the out/in are swapped
phase1 = outBlendLength[Y];
phase2 = inBlendLength[Y];
}
Y = mem44;
A = mem49 + phonemeLengthOutput[mem44]; // A is mem49 + length
mem49 = A; // mem49 now holds length + position
A = A + phase2; //Maybe Problem because of carry flag
//47776: ADC 42
speedcounter = A;
mem47 = 168;
phase3 = mem49 - phase1; // what is mem49
A = phase1 + phase2; // total transition?
mem38 = A;
X = A;
X -= 2;
if ((X & 128) == 0)
do //while No. 2
{
//pos47810:
// mem47 is used to index the tables:
// 168 pitches[]
// 169 frequency1
// 170 frequency2
// 171 frequency3
// 172 amplitude1
// 173 amplitude2
// 174 amplitude3
mem40 = mem38;
if (mem47 == 168) // pitch
{
// unlike the other values, the pitches[] interpolates from
// the middle of the current phoneme to the middle of the
// next phoneme
unsigned char mem36, mem37;
// half the width of the current phoneme
mem36 = phonemeLengthOutput[mem44] >> 1;
// half the width of the next phoneme
mem37 = phonemeLengthOutput[mem44+1] >> 1;
// sum the values
mem40 = mem36 + mem37; // length of both halves
mem37 += mem49; // center of next phoneme
mem36 = mem49 - mem36; // center index of current phoneme
A = Read(mem47, mem37); // value at center of next phoneme - end interpolation value
//A = mem[address];
Y = mem36; // start index of interpolation
mem53 = A - Read(mem47, mem36); // value to center of current phoneme
} else
{
// value to interpolate to
A = Read(mem47, speedcounter);
// position to start interpolation from
Y = phase3;
// value to interpolate from
mem53 = A - Read(mem47, phase3);
}
//Code47503(mem40);
// ML : Code47503 is division with remainder, and mem50 gets the sign
// calculate change per frame
signed char m53 = (signed char)mem53;
mem50 = mem53 & 128;
unsigned char m53abs = abs(m53);
mem51 = m53abs % mem40; //abs((char)m53) % mem40;
mem53 = (unsigned char)((signed char)(m53) / mem40);
// interpolation range
X = mem40; // number of frames to interpolate over
Y = phase3; // starting frame
// linearly interpolate values
mem56 = 0;
//47907: CLC
//pos47908:
while(1) //while No. 3
{
A = Read(mem47, Y) + mem53; //carry alway cleared
mem48 = A;
Y++;
X--;
if(X == 0) break;
mem56 += mem51;
if (mem56 >= mem40) //???
{
mem56 -= mem40; //carry? is set
//if ((mem56 & 128)==0)
if ((mem50 & 128)==0)
{
//47935: BIT 50
//47937: BMI 47943
if(mem48 != 0) mem48++;
} else mem48--;
}
//pos47945:
Write(mem47, Y, mem48);
} //while No. 3
//pos47952:
mem47++;
//if (mem47 != 175) goto pos47810;
} while (mem47 != 175); //while No. 2
//pos47963:
mem44++;
X = mem44;
} //while No. 1
//goto pos47701;
//pos47970:
// add the length of this phoneme
mem48 = mem49 + phonemeLengthOutput[mem44];
// ASSIGN PITCH CONTOUR
//
// This su
gitextract_pmlbt8sa/
├── .clangd
├── .github/
│ └── workflows/
│ └── build.yml
├── .gitignore
├── .gitmodules
├── README.md
├── app/
│ ├── SEQ/
│ │ └── patterns_303.h
│ ├── index.json
│ ├── squares-and-circles-loader.sha
│ └── upload.py
├── doc/
│ ├── .conv.sh
│ ├── .screenshots.py
│ └── output-routing.xml
├── lib/
│ ├── .fetch_deps.py
│ ├── MoogLadders/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── src/
│ │ ├── Filters.h
│ │ ├── HuovilainenModel.h
│ │ ├── ImprovedModel.h
│ │ ├── KrajeskiModel.h
│ │ ├── LadderFilterBase.h
│ │ ├── MicrotrackerModel.h
│ │ ├── MusicDSPModel.h
│ │ ├── NoiseGenerator.h
│ │ ├── OberheimVariationModel.h
│ │ ├── RKSimulationModel.h
│ │ ├── SimplifiedModel.h
│ │ ├── StilsonModel.h
│ │ └── Util.h
│ ├── SAM/
│ │ ├── README.md
│ │ ├── ReciterTabs.h
│ │ ├── RenderTabs.h
│ │ ├── SamTabs.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── reciter.c
│ │ ├── reciter.h
│ │ ├── render.c
│ │ ├── render.h
│ │ ├── sam.c
│ │ └── sam.h
│ ├── bbd/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bbd_filter.cc
│ │ ├── bbd_filter.h
│ │ ├── bbd_line.cc
│ │ └── bbd_line.h
│ ├── braids/
│ │ ├── README.md
│ │ ├── analog_oscillator.cc
│ │ ├── analog_oscillator.h
│ │ ├── chords_stack.cc
│ │ ├── digital_oscillator.cc
│ │ ├── digital_oscillator.h
│ │ ├── envelope.h
│ │ ├── excitation.h
│ │ ├── macro_oscillator.cc
│ │ ├── macro_oscillator.h
│ │ ├── parameter_interpolation.h
│ │ ├── quantizer.cc
│ │ ├── quantizer.h
│ │ ├── quantizer_scales.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ ├── settings.cc
│ │ ├── settings.h
│ │ ├── svf.h
│ │ └── vco_jitter_source.h
│ ├── claps/
│ │ ├── cp808.h
│ │ └── cp909.h
│ ├── clouds/
│ │ └── dsp/
│ │ └── fx/
│ │ ├── diffuser.h
│ │ ├── fx_engine.h
│ │ ├── pitch_shifter.h
│ │ └── reverb.h
│ ├── drumsynth/
│ │ ├── drumsynth.cpp
│ │ ├── drumsynth.h
│ │ └── drumsynth_claps.h
│ ├── faust/
│ │ ├── build.sh
│ │ ├── djembe.dsp
│ │ ├── djembe.dsp.h
│ │ ├── rev_dattorro.dsp
│ │ ├── rev_dattorro.dsp.h
│ │ └── ui.hxx
│ ├── fft/
│ │ ├── fft4g.c
│ │ └── fft4g.h
│ ├── fv1/
│ │ ├── README.md
│ │ ├── factory.json
│ │ └── spn/
│ │ ├── OEM1_4.spn
│ │ └── dance_ir_h_l.spn
│ ├── marbles/
│ │ ├── note_filter.h
│ │ ├── ramp/
│ │ │ ├── ramp.h
│ │ │ ├── ramp_divider.h
│ │ │ ├── ramp_extractor.cc
│ │ │ ├── ramp_extractor.h
│ │ │ ├── ramp_generator.h
│ │ │ └── slave_ramp.h
│ │ ├── random/
│ │ │ ├── discrete_distribution_quantizer.cc
│ │ │ ├── discrete_distribution_quantizer.h
│ │ │ ├── distributions.h
│ │ │ ├── lag_processor.cc
│ │ │ ├── lag_processor.h
│ │ │ ├── output_channel.cc
│ │ │ ├── output_channel.h
│ │ │ ├── quantizer.cc
│ │ │ ├── quantizer.h
│ │ │ ├── random_generator.h
│ │ │ ├── random_sequence.h
│ │ │ ├── random_stream.h
│ │ │ ├── t_generator.cc
│ │ │ ├── t_generator.h
│ │ │ ├── x_y_generator.cc
│ │ │ └── x_y_generator.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ └── scale_recorder.h
│ ├── misc/
│ │ ├── Biquad.cpp
│ │ ├── Biquad.h
│ │ ├── analyze_fft.hxx
│ │ ├── cubic_spline.hxx
│ │ ├── dspinst.h
│ │ ├── euclidean.h
│ │ ├── nes_noise.hxx
│ │ ├── noise.hxx
│ │ └── patterns_303.h
│ ├── msfa/
│ │ ├── aligned_buf.h
│ │ ├── controllers.h
│ │ ├── doc/
│ │ │ └── origin.url
│ │ ├── dx7note.cc
│ │ ├── dx7note.h
│ │ ├── env.cc
│ │ ├── env.h
│ │ ├── exp2.cc
│ │ ├── exp2.h
│ │ ├── fm_core.cc
│ │ ├── fm_core.h
│ │ ├── fm_op_kernel.cc
│ │ ├── fm_op_kernel.h
│ │ ├── freqlut.cc
│ │ ├── freqlut.h
│ │ ├── lfo.cc
│ │ ├── lfo.h
│ │ ├── midinotes.h
│ │ ├── module.h
│ │ ├── patch.cc
│ │ ├── patch.h
│ │ ├── pitchenv.cc
│ │ ├── pitchenv.h
│ │ ├── porta.cc
│ │ ├── porta.h
│ │ ├── sin.cc
│ │ ├── sin.h
│ │ └── synth.h
│ ├── open303/
│ │ └── src/
│ │ ├── GlobalDefinitions.h
│ │ ├── GlobalFunctions.cpp
│ │ ├── GlobalFunctions.h
│ │ ├── rosic_AnalogEnvelope.cpp
│ │ ├── rosic_AnalogEnvelope.h
│ │ ├── rosic_BiquadFilter.cpp
│ │ ├── rosic_BiquadFilter.h
│ │ ├── rosic_BlendOscillator.cpp
│ │ ├── rosic_BlendOscillator.h
│ │ ├── rosic_DecayEnvelope.cpp
│ │ ├── rosic_DecayEnvelope.h
│ │ ├── rosic_EllipticQuarterBandFilter.cpp
│ │ ├── rosic_EllipticQuarterBandFilter.h
│ │ ├── rosic_FunctionTemplates.cpp
│ │ ├── rosic_FunctionTemplates.h
│ │ ├── rosic_LeakyIntegrator.cpp
│ │ ├── rosic_LeakyIntegrator.h
│ │ ├── rosic_MidiNoteEvent.cpp
│ │ ├── rosic_MidiNoteEvent.h
│ │ ├── rosic_NumberManipulations.cpp
│ │ ├── rosic_NumberManipulations.h
│ │ ├── rosic_OnePoleFilter.cpp
│ │ ├── rosic_OnePoleFilter.h
│ │ ├── rosic_Open303.cpp
│ │ ├── rosic_Open303.h
│ │ ├── rosic_RealFunctions.cpp
│ │ ├── rosic_RealFunctions.h
│ │ ├── rosic_TeeBeeFilter.cpp
│ │ ├── rosic_TeeBeeFilter.h
│ │ ├── sequencer/
│ │ │ ├── rosic_AcidPattern.cpp
│ │ │ ├── rosic_AcidPattern.h
│ │ │ ├── rosic_AcidSequencer.cpp
│ │ │ └── rosic_AcidSequencer.h
│ │ └── wavetable_gen/
│ │ ├── fft4g.h
│ │ ├── rosic_Complex.cpp
│ │ ├── rosic_Complex.h
│ │ ├── rosic_FourierTransformerRadix2.cpp
│ │ ├── rosic_FourierTransformerRadix2.h
│ │ ├── rosic_MipMappedWaveTable.cpp
│ │ └── rosic_MipMappedWaveTable.h
│ ├── peaks/
│ │ ├── drums/
│ │ │ ├── bass_drum.cc
│ │ │ ├── bass_drum.h
│ │ │ ├── excitation.h
│ │ │ ├── fm_drum.cc
│ │ │ ├── fm_drum.h
│ │ │ ├── high_hat.cc
│ │ │ ├── high_hat.h
│ │ │ ├── snare_drum.cc
│ │ │ ├── snare_drum.h
│ │ │ └── svf.h
│ │ ├── gate_processor.h
│ │ ├── modulations/
│ │ │ ├── bouncing_ball.h
│ │ │ ├── lfo.cc
│ │ │ ├── lfo.h
│ │ │ ├── mini_sequencer.h
│ │ │ ├── multistage_envelope.cc
│ │ │ └── multistage_envelope.h
│ │ ├── number_station/
│ │ │ ├── number_station.cc
│ │ │ └── number_station.h
│ │ ├── pulse_processor/
│ │ │ ├── pulse_randomizer.cc
│ │ │ ├── pulse_randomizer.h
│ │ │ ├── pulse_shaper.cc
│ │ │ └── pulse_shaper.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── plaits/
│ │ ├── dsp/
│ │ │ ├── chords/
│ │ │ │ ├── chord_bank.cc
│ │ │ │ └── chord_bank.h
│ │ │ ├── downsampler/
│ │ │ │ └── 4x_downsampler.h
│ │ │ ├── drums/
│ │ │ │ ├── analog_bass_drum.h
│ │ │ │ ├── analog_snare_drum.h
│ │ │ │ ├── hi_hat.h
│ │ │ │ ├── synthetic_bass_drum.h
│ │ │ │ └── synthetic_snare_drum.h
│ │ │ ├── dsp.h
│ │ │ ├── engine/
│ │ │ │ ├── additive_engine.cc
│ │ │ │ ├── additive_engine.h
│ │ │ │ ├── bass_drum_engine.cc
│ │ │ │ ├── bass_drum_engine.h
│ │ │ │ ├── chord_engine.cc
│ │ │ │ ├── chord_engine.h
│ │ │ │ ├── engine.h
│ │ │ │ ├── fm_engine.cc
│ │ │ │ ├── fm_engine.h
│ │ │ │ ├── grain_engine.cc
│ │ │ │ ├── grain_engine.h
│ │ │ │ ├── hi_hat_engine.cc
│ │ │ │ ├── hi_hat_engine.h
│ │ │ │ ├── modal_engine.cc
│ │ │ │ ├── modal_engine.h
│ │ │ │ ├── noise_engine.cc
│ │ │ │ ├── noise_engine.h
│ │ │ │ ├── particle_engine.cc
│ │ │ │ ├── particle_engine.h
│ │ │ │ ├── snare_drum_engine.cc
│ │ │ │ ├── snare_drum_engine.h
│ │ │ │ ├── speech_engine.cc
│ │ │ │ ├── speech_engine.h
│ │ │ │ ├── string_engine.cc
│ │ │ │ ├── string_engine.h
│ │ │ │ ├── swarm_engine.cc
│ │ │ │ ├── swarm_engine.h
│ │ │ │ ├── virtual_analog_engine.cc
│ │ │ │ ├── virtual_analog_engine.h
│ │ │ │ ├── waveshaping_engine.cc
│ │ │ │ ├── waveshaping_engine.h
│ │ │ │ ├── wavetable_engine.cc
│ │ │ │ └── wavetable_engine.h
│ │ │ ├── engine2/
│ │ │ │ ├── arpeggiator.h
│ │ │ │ ├── chiptune_engine.cc
│ │ │ │ ├── chiptune_engine.h
│ │ │ │ ├── phase_distortion_engine.cc
│ │ │ │ ├── phase_distortion_engine.h
│ │ │ │ ├── six_op_engine.cc
│ │ │ │ ├── six_op_engine.h
│ │ │ │ ├── string_machine_engine.cc
│ │ │ │ ├── string_machine_engine.h
│ │ │ │ ├── virtual_analog_vcf_engine.cc
│ │ │ │ ├── virtual_analog_vcf_engine.h
│ │ │ │ ├── wave_terrain_engine.cc
│ │ │ │ └── wave_terrain_engine.h
│ │ │ ├── envelope.h
│ │ │ ├── fm/
│ │ │ │ ├── algorithms.cc
│ │ │ │ ├── algorithms.h
│ │ │ │ ├── dx_units.cc
│ │ │ │ ├── dx_units.h
│ │ │ │ ├── envelope.h
│ │ │ │ ├── lfo.h
│ │ │ │ ├── operator.h
│ │ │ │ ├── patch.h
│ │ │ │ └── voice.h
│ │ │ ├── fx/
│ │ │ │ ├── diffuser.h
│ │ │ │ ├── ensemble.h
│ │ │ │ ├── fx_engine.h
│ │ │ │ ├── low_pass_gate.h
│ │ │ │ ├── overdrive.h
│ │ │ │ └── sample_rate_reducer.h
│ │ │ ├── noise/
│ │ │ │ ├── clocked_noise.h
│ │ │ │ ├── dust.h
│ │ │ │ ├── fractal_random_generator.h
│ │ │ │ ├── particle.h
│ │ │ │ └── smooth_random_generator.h
│ │ │ ├── oscillator/
│ │ │ │ ├── formant_oscillator.h
│ │ │ │ ├── grainlet_oscillator.h
│ │ │ │ ├── harmonic_oscillator.h
│ │ │ │ ├── nes_triangle_oscillator.h
│ │ │ │ ├── oscillator.h
│ │ │ │ ├── sine_oscillator.h
│ │ │ │ ├── string_synth_oscillator.h
│ │ │ │ ├── super_square_oscillator.h
│ │ │ │ ├── variable_saw_oscillator.h
│ │ │ │ ├── variable_shape_oscillator.h
│ │ │ │ ├── vosim_oscillator.h
│ │ │ │ ├── wavetable_oscillator.h
│ │ │ │ └── z_oscillator.h
│ │ │ ├── physical_modelling/
│ │ │ │ ├── delay_line.h
│ │ │ │ ├── modal_voice.cc
│ │ │ │ ├── modal_voice.h
│ │ │ │ ├── resonator.cc
│ │ │ │ ├── resonator.h
│ │ │ │ ├── string.cc
│ │ │ │ ├── string.h
│ │ │ │ ├── string_voice.cc
│ │ │ │ └── string_voice.h
│ │ │ ├── speech/
│ │ │ │ ├── lpc_speech_synth.cc
│ │ │ │ ├── lpc_speech_synth.h
│ │ │ │ ├── lpc_speech_synth_controller.cc
│ │ │ │ ├── lpc_speech_synth_controller.h
│ │ │ │ ├── lpc_speech_synth_phonemes.cc
│ │ │ │ ├── lpc_speech_synth_words.cc
│ │ │ │ ├── lpc_speech_synth_words.h
│ │ │ │ ├── naive_speech_synth.cc
│ │ │ │ ├── naive_speech_synth.h
│ │ │ │ ├── sam_speech_synth.cc
│ │ │ │ └── sam_speech_synth.h
│ │ │ ├── voice.cc
│ │ │ └── voice.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── rings/
│ │ ├── dsp/
│ │ │ ├── dsp.h
│ │ │ ├── fm_voice.cc
│ │ │ ├── fm_voice.h
│ │ │ ├── follower.h
│ │ │ ├── fx/
│ │ │ │ ├── chorus.h
│ │ │ │ ├── ensemble.h
│ │ │ │ ├── fx_engine.h
│ │ │ │ └── reverb.h
│ │ │ ├── limiter.h
│ │ │ ├── note_filter.h
│ │ │ ├── onset_detector.h
│ │ │ ├── part.cc
│ │ │ ├── part.h
│ │ │ ├── patch.h
│ │ │ ├── performance_state.h
│ │ │ ├── plucker.h
│ │ │ ├── resonator.cc
│ │ │ ├── resonator.h
│ │ │ ├── string.cc
│ │ │ ├── string.h
│ │ │ ├── string_synth_envelope.h
│ │ │ ├── string_synth_oscillator.h
│ │ │ ├── string_synth_part.cc
│ │ │ ├── string_synth_part.h
│ │ │ ├── string_synth_voice.h
│ │ │ └── strummer.h
│ │ ├── resources.cc
│ │ └── resources.h
│ ├── soundpipe/
│ │ ├── revsc.c
│ │ ├── revsc.h
│ │ ├── soundpipe.c
│ │ └── soundpipe.h
│ ├── stmlib/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── algorithms/
│ │ │ ├── note_stack.h
│ │ │ ├── pattern_predictor.h
│ │ │ ├── tiny_map.h
│ │ │ └── voice_allocator.h
│ │ ├── dsp/
│ │ │ ├── atan.cc
│ │ │ ├── atan.h
│ │ │ ├── atan_approximations.py
│ │ │ ├── cosine_oscillator.h
│ │ │ ├── delay_line.h
│ │ │ ├── dsp.h
│ │ │ ├── filter.h
│ │ │ ├── hysteresis_filter.h
│ │ │ ├── hysteresis_quantizer.h
│ │ │ ├── limiter.h
│ │ │ ├── parameter_interpolator.h
│ │ │ ├── polyblep.h
│ │ │ ├── rsqrt.h
│ │ │ ├── sample_rate_converter.h
│ │ │ ├── units.cc
│ │ │ └── units.h
│ │ ├── makefile.inc
│ │ ├── midi/
│ │ │ └── midi.h
│ │ ├── stmlib.h
│ │ └── utils/
│ │ ├── buffer_allocator.h
│ │ ├── crc32.h
│ │ ├── dsp.h
│ │ ├── gate_flags.h
│ │ ├── murmurhash3.h
│ │ ├── random.cc
│ │ ├── random.h
│ │ ├── ring_buffer.h
│ │ └── stream_buffer.h
│ ├── streams/
│ │ ├── audio_cv_meter.h
│ │ ├── compressor.cc
│ │ ├── compressor.h
│ │ ├── envelope.cc
│ │ ├── envelope.h
│ │ ├── filter_controller.h
│ │ ├── follower.cc
│ │ ├── follower.h
│ │ ├── gain.h
│ │ ├── lorenz_generator.cc
│ │ ├── lorenz_generator.h
│ │ ├── meta_parameters.h
│ │ ├── resources.cc
│ │ ├── resources.h
│ │ ├── svf.cc
│ │ ├── svf.h
│ │ ├── vactrol.cc
│ │ └── vactrol.h
│ └── xz_lzma2/
│ ├── xz.h
│ ├── xz_config.h
│ ├── xz_dec_lzma2.c
│ ├── xz_lzma2.h
│ └── xz_private.h
├── src/
│ ├── CV/
│ │ ├── EnvFollower.cpp
│ │ ├── EnvGen.cpp
│ │ ├── LFO.cpp
│ │ └── V_OCT.cpp
│ ├── DRUMS/
│ │ ├── 808ish-BD.cpp
│ │ ├── 808ish-HiHat.cpp
│ │ ├── 808ish-SD.cpp
│ │ ├── Claps.cpp
│ │ ├── Djembe.cpp
│ │ ├── DrumSynth.cpp
│ │ ├── FM-Drum.cpp
│ │ ├── RZ-1.cpp
│ │ ├── TR707.cpp
│ │ └── TR909-HiHat.cpp
│ ├── FILTER/
│ │ ├── MoogLadder.cpp
│ │ ├── SVF.cpp
│ │ └── TeeBee.cpp
│ ├── FX/
│ │ ├── Delay.cpp
│ │ ├── JU60_chorus.cpp
│ │ ├── Rev-Dattorro.cpp
│ │ ├── Reverb.cpp
│ │ └── ReverbSC.cpp
│ ├── GND/
│ │ ├── FFT.cpp
│ │ └── Scope.cpp
│ ├── M-OSC/
│ │ └── Waveforms.cpp
│ ├── MIDI/
│ │ ├── Clock.cpp
│ │ ├── Monitor.cpp
│ │ └── VAx6.cpp
│ ├── NOISE/
│ │ ├── 808_squares.cpp
│ │ ├── NES.cpp
│ │ └── WhitePink.cpp
│ ├── SEQ/
│ │ ├── 303-Patterns.cpp
│ │ ├── EuclidArp.cpp
│ │ ├── EuclidRythm.cpp
│ │ └── TuringMachine.cpp
│ ├── SPEECH/
│ │ ├── LPC.cpp
│ │ └── SAM.cpp
│ ├── SYNTH/
│ │ ├── DxFM.cpp
│ │ ├── Open303.cpp
│ │ ├── Resonator.cpp
│ │ └── plaits.cpp
│ ├── build.sh
│ ├── dump.py
│ ├── squares-and-circles-api.h
│ ├── test.cxx
│ └── test.sh
└── test/
└── test_midi.sh
SYMBOL INDEX (918 symbols across 377 files)
FILE: app/upload.py
class bcolors (line 16) | class bcolors:
function _safe_usb_string (line 37) | def _safe_usb_string(device, index):
function _find_bulk_endpoint (line 46) | def _find_bulk_endpoint(interface, direction):
function open_device (line 62) | def open_device():
function close_device (line 97) | def close_device(device):
function usb_write (line 119) | def usb_write(ep_out, payload):
function usb_read_until_nul (line 123) | def usb_read_until_nul(ep_in, timeout_ms=USB_TIMEOUT_MS, chunk_size=512):
function get_blobs (line 133) | def get_blobs(ep_out, ep_in):
function update_blob (line 154) | def update_blob(ep_out, ep_in, filename):
function reset (line 183) | def reset(ep_out):
FILE: doc/.screenshots.py
function bmp (line 39) | def bmp(rows, w):
function getPixel (line 48) | def getPixel(buffer, x, y):
function setPixel (line 51) | def setPixel(row, x, c):
FILE: lib/MoogLadders/src/Filters.h
function class (line 11) | class BiQuadBase
function Process (line 28) | void Process(float * samples, const uint32_t n)
function Tick (line 40) | float Tick(float s)
function SetBiquadCoefs (line 48) | void SetBiquadCoefs(std::array<float, 3> b, std::array<float, 2> a)
function class (line 60) | class RBJFilter : public BiQuadBase
function UpdateCoefficients (line 92) | void UpdateCoefficients()
function SetCutoff (line 205) | void SetCutoff(float c)
function GetCutoff (line 211) | float GetCutoff()
function SetQValue (line 217) | void SetQValue(float q)
function GetQValue (line 223) | float GetQValue()
function SetType (line 228) | void SetType(FilterType newType)
function FilterType (line 234) | FilterType GetType()
function class (line 258) | class PinkingFilter
function class (line 277) | class BrowningFilter
FILE: lib/MoogLadders/src/HuovilainenModel.h
function class (line 33) | class HuovilainenMoog : public LadderFilterBase
function virtual (line 46) | virtual ~HuovilainenMoog()
function virtual (line 51) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 75) | virtual void SetResonance(float r) override
function virtual (line 81) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/ImprovedModel.h
function class (line 38) | class ImprovedMoog : public LadderFilterBase
function virtual (line 54) | virtual ~ImprovedMoog() { }
function virtual (line 56) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 86) | virtual void SetResonance(float r) override
function virtual (line 95) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/KrajeskiModel.h
function virtual (line 44) | virtual ~KrajeskiMoog() { }
function virtual (line 46) | virtual void Process(float * samples, const uint32_t n) override
function virtual (line 62) | virtual void SetResonance(float r) override
function virtual (line 68) | virtual void SetCutoff(float c) override
function fclamp (line 85) | inline float fclamp(float in, float min, float max){
FILE: lib/MoogLadders/src/LadderFilterBase.h
function class (line 8) | class LadderFilterBase
FILE: lib/MoogLadders/src/MicrotrackerModel.h
function class (line 12) | class MicrotrackerMoog : public LadderFilterBase
function virtual (line 24) | virtual ~MicrotrackerMoog() {}
function virtual (line 26) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 49) | virtual void SetResonance(float r) override
function virtual (line 54) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/MusicDSPModel.h
function class (line 14) | class MusicDSPMoog : public LadderFilterBase
function virtual (line 27) | virtual ~MusicDSPMoog()
function virtual (line 32) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 56) | virtual void SetResonance(float r) override
function virtual (line 61) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/NoiseGenerator.h
type WhiteNoiseSource (line 15) | struct WhiteNoiseSource
function WhiteNoiseSource (line 36) | struct BrownNoise : public WhiteNoiseSource
type NoiseGenerator (line 43) | struct NoiseGenerator
FILE: lib/MoogLadders/src/OberheimVariationModel.h
function class (line 13) | class VAOnePole
function Reset (line 22) | void Reset()
function Tick (line 34) | double Tick(double s)
function SetFeedback (line 43) | void SetFeedback(double fb) { feedback = fb; }
function GetFeedbackOutput (line 44) | double GetFeedbackOutput(){ return beta * (z1 + feedback * delta); }
function SetAlpha (line 45) | void SetAlpha(double a) { alpha = a; }
function SetBeta (line 46) | void SetBeta(double b) { beta = b; }
function class (line 61) | class OberheimVariationMoog : public LadderFilterBase
function virtual (line 80) | virtual ~OberheimVariationMoog()
function virtual (line 88) | virtual void Process(float * samples, uint32_t n) noexcept override
function virtual (line 122) | virtual void SetResonance(float r) override
function virtual (line 128) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/RKSimulationModel.h
function class (line 65) | class RKSimulationMoog : public LadderFilterBase
function virtual (line 85) | virtual ~RKSimulationMoog()
function virtual (line 89) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 102) | virtual void SetResonance(float r) override
function virtual (line 108) | virtual void SetCutoff(float c) override
function rungekutteSolver (line 127) | void rungekutteSolver(float input, double * state)
FILE: lib/MoogLadders/src/SimplifiedModel.h
function class (line 32) | class SimplifiedMoog : public LadderFilterBase
FILE: lib/MoogLadders/src/StilsonModel.h
function class (line 56) | class StilsonMoog : public LadderFilterBase
function virtual (line 67) | virtual ~StilsonMoog()
function virtual (line 72) | virtual void Process(float * samples, uint32_t n) override
function virtual (line 98) | virtual void SetResonance(float r) override
function virtual (line 114) | virtual void SetCutoff(float c) override
FILE: lib/MoogLadders/src/Util.h
function moog_lerp (line 30) | inline float moog_lerp(float amount, float a, float b)
function moog_min (line 35) | inline float moog_min(float a, float b)
function moog_saturate (line 48) | inline float moog_saturate(float input)
function clip (line 60) | inline float clip(float value, float saturation, float saturationinverse)
function ctz (line 75) | int ctz(T x)
function fast_tanh (line 84) | inline double fast_tanh(double x)
FILE: lib/SAM/debug.c
function PrintPhonemes (line 6) | void PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLe...
function PrintOutput (line 36) | void PrintOutput(
function PrintRule (line 62) | void PrintRule(int offset)
FILE: lib/SAM/reciter.c
function Code37055 (line 12) | void Code37055(unsigned char mem59)
function Code37066 (line 22) | void Code37066(unsigned char mem58)
function GetRuleByte (line 31) | unsigned char GetRuleByte(unsigned short mem62, unsigned char Y)
function TextToPhonemes (line 44) | int TextToPhonemes(unsigned char *input) // Code36484
FILE: lib/SAM/render.c
function Output8BitAry (line 66) | void Output8BitAry(int index, unsigned char ary[5])
function Output8Bit (line 75) | void Output8Bit(int index, unsigned char A)
function Read (line 97) | unsigned char Read(unsigned char p, unsigned char Y)
function Write (line 113) | void Write(unsigned char p, unsigned char Y, unsigned char value)
function RenderSample (line 187) | void RenderSample(unsigned char *mem66)
function Render (line 358) | void Render()
function AddInflection (line 948) | void AddInflection(unsigned char mem48, unsigned char phase1)
function SetMouthThroat (line 997) | void SetMouthThroat(unsigned char mouth, unsigned char throat)
function trans (line 1062) | unsigned char trans(unsigned char mem39212, unsigned char mem39213)
FILE: lib/SAM/sam.c
function SetInput (line 48) | void SetInput(char *_input)
function SetSpeed (line 58) | void SetSpeed(unsigned char _speed) {speed = _speed;}
function SetPitch (line 59) | void SetPitch(unsigned char _pitch) {pitch = _pitch;}
function SetMouth (line 60) | void SetMouth(unsigned char _mouth) {mouth = _mouth;}
function SetThroat (line 61) | void SetThroat(unsigned char _throat) {throat = _throat;}
function EnableSingmode (line 62) | void EnableSingmode() {singmode = 1;}
function GetBufferLength (line 64) | int GetBufferLength(){return bufferpos;}
function write_buffer (line 89) | void write_buffer(int pos, char value)
function Init (line 94) | void Init()
function SAMMain (line 149) | int SAMMain()
function PrepareOutput (line 189) | void PrepareOutput()
function InsertBreath (line 234) | void InsertBreath()
function CopyStress (line 298) | void CopyStress()
function Insert (line 341) | void Insert(unsigned char position/*var57*/, unsigned char mem60, unsign...
function Parser1 (line 408) | int Parser1()
function SetPhonemeLength (line 538) | void SetPhonemeLength()
function Code41240 (line 558) | void Code41240()
function Parser2 (line 625) | void Parser2()
function AdjustLengths (line 1074) | void AdjustLengths()
function Code47503 (line 1432) | void Code47503(unsigned char mem52)
FILE: lib/bbd/bbd_filter.cc
function cdouble (line 8) | cdouble BBD_Filter_Spec::transfer(cdouble::value_type frequency) const n...
function interpolate_row (line 20) | static void interpolate_row(cdouble::value_type d, unsigned rows, unsign...
function BBD_Filter_Coef (line 36) | BBD_Filter_Coef BBD::compute_filter(float fs, unsigned steps, const BBD_...
type j60 (line 74) | namespace j60 {
FILE: lib/bbd/bbd_filter.h
type std (line 4) | typedef std::complex<float> cdouble;
function BBD_Filter_Kind (line 6) | enum class BBD_Filter_Kind {
FILE: lib/bbd/bbd_line.h
function class (line 8) | class BBD_Line {
FILE: lib/braids/analog_oscillator.cc
type braids (line 36) | namespace braids {
FILE: lib/braids/analog_oscillator.h
function namespace (line 39) | namespace braids {
FILE: lib/braids/chords_stack.cc
type braids (line 17) | namespace braids {
function renderChordSine (line 25) | inline void renderChordSine(
function renderChordSaw (line 96) | inline void renderChordSaw(
function calc_triangle_raw (line 197) | inline int16_t calc_triangle_raw(uint32_t phase) {
function renderChordTriangle (line 203) | inline void renderChordTriangle(
function renderChordSquare (line 284) | inline void renderChordSquare(
function renderChordWavetable (line 385) | inline void renderChordWavetable(
FILE: lib/braids/digital_oscillator.cc
type braids (line 40) | namespace braids {
type PhonemeDefinition (line 440) | struct PhonemeDefinition {
type WavetableDefinition (line 1467) | struct WavetableDefinition {
FILE: lib/braids/digital_oscillator.h
function namespace (line 39) | namespace braids {
FILE: lib/braids/envelope.h
function namespace (line 34) | namespace braids {
FILE: lib/braids/excitation.h
function namespace (line 34) | namespace braids {
FILE: lib/braids/macro_oscillator.cc
type braids (line 38) | namespace braids {
FILE: lib/braids/macro_oscillator.h
function namespace (line 41) | namespace braids {
FILE: lib/braids/quantizer.cc
type braids (line 34) | namespace braids {
FILE: lib/braids/quantizer.h
function namespace (line 34) | namespace braids {
FILE: lib/braids/quantizer_scales.h
function namespace (line 34) | namespace braids {
FILE: lib/braids/resources.cc
type braids (line 39) | namespace braids {
FILE: lib/braids/resources.h
function namespace (line 41) | namespace braids {
FILE: lib/braids/settings.cc
type braids (line 36) | namespace braids {
FILE: lib/braids/settings.h
function namespace (line 34) | namespace braids {
function class (line 224) | class Settings {
FILE: lib/braids/svf.h
function namespace (line 37) | namespace braids {
FILE: lib/braids/vco_jitter_source.h
function namespace (line 40) | namespace braids {
FILE: lib/clouds/dsp/fx/diffuser.h
function namespace (line 36) | namespace clouds {
FILE: lib/clouds/dsp/fx/fx_engine.h
function namespace (line 39) | namespace clouds {
function Lp (line 217) | inline void Lp(float& state, float coefficient) {
function Hp (line 222) | inline void Hp(float& state, float coefficient) {
function SetLFOFrequency (line 265) | inline void SetLFOFrequency(LFOIndex index, float frequency) {
function Start (line 270) | inline void Start(Context* c) {
FILE: lib/clouds/dsp/fx/pitch_shifter.h
function namespace (line 35) | namespace clouds {
FILE: lib/clouds/dsp/fx/reverb.h
function namespace (line 36) | namespace clouds {
FILE: lib/drumsynth/drumsynth.cpp
function dB2amp (line 46) | inline float dB2amp(float dB)
class Envelope (line 51) | class Envelope
method init (line 56) | void init(const EnvArgs *args)
method calc_c (line 84) | inline float calc_c(float start, float end, int len)
method process (line 94) | inline void process(uint32_t t, float stretch)
method finished (line 126) | inline bool finished()
method value (line 131) | inline float value()
class Oscillator (line 146) | class Oscillator
method Init (line 149) | void Init(float freq)
method reset (line 157) | inline void reset()
method pitch (line 162) | inline void pitch(float pitch)
method duty (line 167) | inline void duty(float duty)
method Square (line 172) | inline void Square(float &out)
method Saw (line 177) | inline void Saw(float &out)
method Tri (line 182) | inline void Tri(float &out)
method Metallic (line 190) | inline void Metallic(float &out2)
method Sine (line 206) | inline void Sine(float &out)
type drum_synth_Part (line 223) | struct drum_synth_Part
method init (line 243) | void init(const PartArgs *part)
method free (line 286) | void free()
method waveshaper_transform (line 292) | float waveshaper_transform(float a)
method reset (line 300) | inline void reset()
method process_frame (line 311) | inline void process_frame(float f, const DrumParams *params, float *ou...
function DrumSynth (line 477) | DrumSynth drum_synth_init(const DrumModel *inst, void *(*malloc)(size_t ...
function drum_synth_deinit (line 502) | void drum_synth_deinit(DrumSynth p, void (*free)(void* ptr))
function drum_synth_reset (line 519) | void drum_synth_reset(DrumSynth inst)
function drum_synth_process_frame (line 530) | void drum_synth_process_frame(DrumSynth inst, int part, float freq, cons...
function drum_synth_load_models (line 578) | int drum_synth_load_models(const uint8_t *drumkit, DrumModel _instModel[...
function drum_synth_process_ws (line 690) | float drum_synth_process_ws(DrumSynth inst, int part, float x)
FILE: lib/drumsynth/drumsynth.h
type EnvXY (line 32) | struct EnvXY
type EnvArgs (line 38) | struct EnvArgs
type WS_XY (line 44) | struct WS_XY
type WSArgs (line 50) | struct WSArgs
type BiquadMode (line 56) | enum BiquadMode : uint32_t
type BiquadArgs (line 68) | struct BiquadArgs
type OscType (line 76) | enum OscType : uint32_t
type OscArgs (line 91) | struct OscArgs
type AmpMod (line 100) | struct AmpMod
type VCFArgs (line 106) | struct VCFArgs
type PartFlags (line 114) | enum PartFlags : uint32_t
type PartArgs (line 121) | struct PartArgs
type DrumModel (line 137) | struct DrumModel
type DrumParams (line 145) | struct DrumParams
type DrumKit (line 155) | struct DrumKit
FILE: lib/faust/djembe.dsp.h
function mydsp_faustpower2_f (line 23) | static float mydsp_faustpower2_f(float value) {
type mydsp (line 35) | typedef struct {
function mydsp (line 116) | mydsp* newmydsp() {
function deletemydsp (line 121) | void deletemydsp(mydsp* dsp) {
function metadatamydsp (line 125) | void metadatamydsp(MetaGlue* m) {
function getSampleRatemydsp (line 171) | int getSampleRatemydsp(mydsp* dsp) {
function getNumInputsmydsp (line 175) | int getNumInputsmydsp(mydsp* dsp) {
function getNumOutputsmydsp (line 178) | int getNumOutputsmydsp(mydsp* dsp) {
function classInitmydsp (line 182) | void classInitmydsp(int sample_rate) {
function instanceResetUserInterfacemydsp (line 185) | void instanceResetUserInterfacemydsp(mydsp* dsp) {
function instanceClearmydsp (line 192) | void instanceClearmydsp(mydsp* dsp) {
function instanceConstantsmydsp (line 391) | void instanceConstantsmydsp(mydsp* dsp, int sample_rate) {
function instanceInitmydsp (line 461) | void instanceInitmydsp(mydsp* dsp, int sample_rate) {
function initmydsp (line 467) | void initmydsp(mydsp* dsp, int sample_rate) {
function buildUserInterfacemydsp (line 472) | void buildUserInterfacemydsp(mydsp* dsp, UIGlue* ui_interface) {
function computemydsp (line 481) | void computemydsp(mydsp* dsp, int count, FAUSTFLOAT** inputs, FAUSTFLOAT...
FILE: lib/faust/rev_dattorro.dsp.h
type mydsp (line 32) | typedef struct {
function mydsp (line 77) | mydsp* newmydsp() {
function deletemydsp (line 82) | void deletemydsp(mydsp* dsp) {
function metadatamydsp (line 86) | void metadatamydsp(MetaGlue* m) {
function getSampleRatemydsp (line 109) | int getSampleRatemydsp(mydsp* dsp) {
function getNumInputsmydsp (line 113) | int getNumInputsmydsp(mydsp* dsp) {
function getNumOutputsmydsp (line 116) | int getNumOutputsmydsp(mydsp* dsp) {
function classInitmydsp (line 120) | void classInitmydsp(int sample_rate) {
function instanceResetUserInterfacemydsp (line 123) | void instanceResetUserInterfacemydsp(mydsp* dsp) {
function instanceClearmydsp (line 132) | void instanceClearmydsp(mydsp* dsp) {
function instanceConstantsmydsp (line 360) | void instanceConstantsmydsp(mydsp* dsp, int sample_rate) {
function instanceInitmydsp (line 366) | void instanceInitmydsp(mydsp* dsp, int sample_rate) {
function initmydsp (line 372) | void initmydsp(mydsp* dsp, int sample_rate) {
function buildUserInterfacemydsp (line 377) | void buildUserInterfacemydsp(mydsp* dsp, UIGlue* ui_interface) {
function computemydsp (line 394) | void computemydsp(mydsp* dsp, int count, FAUSTFLOAT** inputs, FAUSTFLOAT...
FILE: lib/faust/ui.hxx
type MetaGlue (line 3) | struct MetaGlue
method declare (line 6) | void declare(const char *ui, const char *key, const char *value)
type UIGlue (line 11) | struct UIGlue
method declare (line 19) | void declare(const char *ui, float *zone, const char *key, const char ...
function note_to_frequency (line 39) | float note_to_frequency(float note)
FILE: lib/fft/fft4g.c
function cdft (line 290) | void cdft(int n, int isgn, float *a, int *ip, float *w)
function rdft (line 315) | void rdft(int n, int isgn, float *a, int *ip, float *w)
function ddct (line 362) | void ddct(int n, int isgn, float *a, int *ip, float *w)
function ddst (line 421) | void ddst(int n, int isgn, float *a, int *ip, float *w)
function dfct (line 480) | void dfct(int n, float *a, float *t, int *ip, float *w)
function dfst (line 576) | void dfst(int n, float *a, float *t, int *ip, float *w)
function makewt (line 668) | void makewt(int nw, int *ip, float *w)
function makect (line 698) | void makect(int nc, int *ip, float *c)
function bitrv2 (line 720) | void bitrv2(int n, int *ip, float *a)
function bitrv2conj (line 820) | void bitrv2conj(int n, int *ip, float *a)
function cftfsub (line 929) | void cftfsub(int n, float *a, float *w)
function cftbsub (line 981) | void cftbsub(int n, float *a, float *w)
function cft1st (line 1033) | void cft1st(int n, float *a, float *w)
function cftmdl (line 1138) | void cftmdl(int n, int l, float *a, float *w)
function rftfsub (line 1265) | void rftfsub(int n, float *a, int nc, float *c)
function rftbsub (line 1290) | void rftbsub(int n, float *a, int nc, float *c)
function dctsub (line 1317) | void dctsub(int n, float *a, int nc, float *c)
function dstsub (line 1338) | void dstsub(int n, float *a, int nc, float *c)
FILE: lib/marbles/note_filter.h
function namespace (line 35) | namespace marbles {
FILE: lib/marbles/ramp/ramp.h
function namespace (line 34) | namespace marbles {
FILE: lib/marbles/ramp/ramp_divider.h
function namespace (line 39) | namespace marbles {
function class (line 53) | class RampDivider {
FILE: lib/marbles/ramp/ramp_extractor.cc
type marbles (line 43) | namespace marbles {
function IsWithinTolerance (line 51) | inline bool IsWithinTolerance(float x, float y, float error) {
FILE: lib/marbles/ramp/ramp_extractor.h
function namespace (line 46) | namespace marbles {
FILE: lib/marbles/ramp/ramp_generator.h
function namespace (line 34) | namespace marbles {
FILE: lib/marbles/ramp/slave_ramp.h
function namespace (line 36) | namespace marbles {
FILE: lib/marbles/random/discrete_distribution_quantizer.cc
type marbles (line 36) | namespace marbles {
FILE: lib/marbles/random/discrete_distribution_quantizer.h
function namespace (line 37) | namespace marbles {
FILE: lib/marbles/random/distributions.h
function namespace (line 40) | namespace marbles {
FILE: lib/marbles/random/lag_processor.cc
type marbles (line 36) | namespace marbles {
FILE: lib/marbles/random/lag_processor.h
function namespace (line 36) | namespace marbles {
FILE: lib/marbles/random/output_channel.cc
type marbles (line 38) | namespace marbles {
FILE: lib/marbles/random/output_channel.h
function namespace (line 37) | namespace marbles {
function class (line 54) | class OutputChannel {
FILE: lib/marbles/random/quantizer.cc
type marbles (line 36) | namespace marbles {
FILE: lib/marbles/random/quantizer.h
function namespace (line 38) | namespace marbles {
function class (line 92) | class Quantizer {
FILE: lib/marbles/random/random_generator.h
function namespace (line 37) | namespace marbles {
FILE: lib/marbles/random/random_sequence.h
function namespace (line 38) | namespace marbles {
FILE: lib/marbles/random/random_stream.h
function namespace (line 39) | namespace marbles {
FILE: lib/marbles/random/t_generator.cc
type marbles (line 37) | namespace marbles {
FILE: lib/marbles/random/t_generator.h
function namespace (line 42) | namespace marbles {
FILE: lib/marbles/random/x_y_generator.cc
type marbles (line 35) | namespace marbles {
FILE: lib/marbles/random/x_y_generator.h
function namespace (line 40) | namespace marbles {
FILE: lib/marbles/resources.cc
type marbles (line 35) | namespace marbles {
FILE: lib/marbles/resources.h
function namespace (line 41) | namespace marbles {
FILE: lib/marbles/scale_recorder.h
function namespace (line 35) | namespace marbles {
FILE: lib/misc/Biquad.cpp
function tan_pi_f (line 32) | inline float tan_pi_f(float f) // stmlib::OnePole::tan<FREQUENCY_FAST>(Fc)
FILE: lib/misc/Biquad.h
function class (line 33) | class Biquad
function process (line 59) | inline float Biquad::process(float in)
function process (line 77) | inline float Biquad::process(float in, float& _z1, float& _z2)
FILE: lib/misc/analyze_fft.hxx
class AnalyzeFFT (line 121) | class AnalyzeFFT
method multiply_16tx16t_add_16bx16b (line 131) | inline int32_t multiply_16tx16t_add_16bx16b(uint32_t a, uint32_t b)
method sqrt_uint32 (line 145) | inline uint32_t sqrt_uint32(uint32_t in)
method sqrt_uint32_approx (line 154) | inline uint32_t sqrt_uint32_approx(uint32_t in)
method apply_window_to_fft_buffer (line 162) | static void apply_window_to_fft_buffer(void *buffer, const void *window)
method AnalyzeFFT (line 178) | AnalyzeFFT()
method process (line 185) | bool process(const int16_t *in, size_t len, int16_t gain = 1)
method display (line 216) | void display(uint8_t *display, int offset = 7)
FILE: lib/misc/cubic_spline.hxx
function cspline_init (line 20) | void cspline_init(cspline *s, const float *x, const float *y, int N, int...
function cspline_eval (line 80) | float cspline_eval(const cspline *s, float x)
function cspline_free (line 115) | void cspline_free(cspline *spline)
FILE: lib/misc/dspinst.h
function signed_saturate_rshift (line 34) | static inline int32_t signed_saturate_rshift(int32_t val, int bits, int ...
function saturate16 (line 55) | static inline int16_t saturate16(int32_t val)
function signed_multiply_32x16b (line 72) | static inline int32_t signed_multiply_32x16b(int32_t a, uint32_t b)
function signed_multiply_32x16t (line 85) | static inline int32_t signed_multiply_32x16t(int32_t a, uint32_t b)
function multiply_32x32_rshift32 (line 98) | static inline int32_t multiply_32x32_rshift32(int32_t a, int32_t b)
function multiply_32x32_rshift32_rounded (line 111) | static inline int32_t multiply_32x32_rshift32_rounded(int32_t a, int32_t b)
function multiply_accumulate_32x32_rshift32_rounded (line 124) | static inline int32_t multiply_accumulate_32x32_rshift32_rounded(int32_t...
function multiply_subtract_32x32_rshift32_rounded (line 137) | static inline int32_t multiply_subtract_32x32_rshift32_rounded(int32_t s...
function pack_16t_16t (line 151) | static inline uint32_t pack_16t_16t(int32_t a, int32_t b)
function pack_16t_16b (line 164) | static inline uint32_t pack_16t_16b(int32_t a, int32_t b)
function pack_16b_16b (line 177) | static inline uint32_t pack_16b_16b(int32_t a, int32_t b)
function signed_add_16_and_16 (line 201) | static inline uint32_t signed_add_16_and_16(uint32_t a, uint32_t b)
function signed_subtract_16_and_16 (line 210) | static inline int32_t signed_subtract_16_and_16(int32_t a, int32_t b)
function signed_halving_add_16_and_16 (line 219) | static inline int32_t signed_halving_add_16_and_16(int32_t a, int32_t b)
function signed_halving_subtract_16_and_16 (line 228) | static inline int32_t signed_halving_subtract_16_and_16(int32_t a, int32...
function signed_multiply_accumulate_32x16b (line 237) | static inline int32_t signed_multiply_accumulate_32x16b(int32_t sum, int...
function signed_multiply_accumulate_32x16t (line 246) | static inline int32_t signed_multiply_accumulate_32x16t(int32_t sum, int...
function logical_and (line 255) | static inline uint32_t logical_and(uint32_t a, uint32_t b)
function multiply_16tx16t_add_16bx16b (line 263) | static inline int32_t multiply_16tx16t_add_16bx16b(uint32_t a, uint32_t b)
function multiply_16tx16b_add_16bx16t (line 272) | static inline int32_t multiply_16tx16b_add_16bx16t(uint32_t a, uint32_t b)
function multiply_accumulate_16tx16t_add_16bx16b (line 280) | static inline int64_t multiply_accumulate_16tx16t_add_16bx16b(int64_t su...
function multiply_accumulate_16tx16b_add_16bx16t (line 287) | static inline int64_t multiply_accumulate_16tx16b_add_16bx16t(int64_t su...
function multiply_16bx16b (line 295) | static inline int32_t multiply_16bx16b(uint32_t a, uint32_t b)
function multiply_16bx16t (line 304) | static inline int32_t multiply_16bx16t(uint32_t a, uint32_t b)
function multiply_16tx16b (line 313) | static inline int32_t multiply_16tx16b(uint32_t a, uint32_t b)
function multiply_16tx16t (line 322) | static inline int32_t multiply_16tx16t(uint32_t a, uint32_t b)
function substract_32_saturate (line 331) | static inline int32_t substract_32_saturate(uint32_t a, uint32_t b)
function FRACMUL_SHL (line 342) | static inline int32_t FRACMUL_SHL(int32_t x, int32_t y, int z)
function get_q_psr (line 358) | static inline uint32_t get_q_psr(void)
function clr_q_psr (line 367) | static inline void clr_q_psr(void)
FILE: lib/misc/euclidean.h
function simple_pattern (line 37) | void simple_pattern(uint8_t *pattern, int len, int pulses, int rotate)
function bjorklund_pattern (line 64) | void bjorklund_pattern(uint8_t *pattern, int len, int pulses, int rotate)
FILE: lib/misc/nes_noise.hxx
class NESNoise (line 35) | class NESNoise
method NESNoise (line 38) | NESNoise()
method init (line 45) | void init(uint16_t shift_reg = 1, uint8_t mode_bit = 1, uint8_t period...
method T (line 53) | T generateSample(T level)
FILE: lib/misc/noise.hxx
type WhiteNoise (line 33) | struct WhiteNoise
method WhiteNoise (line 37) | WhiteNoise()
method next (line 42) | int32_t next() // 0 to INT32_MAX
method nextf (line 57) | float nextf(float min, float max)
type BrownNoise (line 63) | struct BrownNoise
method init (line 68) | void init()
method nextf (line 73) | float nextf(float min, float max)
type PinkNoise (line 86) | struct PinkNoise
method nextf (line 93) | float nextf(float min, float max)
FILE: lib/msfa/controllers.h
function class (line 34) | class FmMod {
function class (line 71) | class Controllers {
FILE: lib/msfa/dx7note.cc
function midinote_to_logfreq (line 29) | int32_t midinote_to_logfreq(int midinote) {
function logfreq_round2semi (line 36) | int32_t logfreq_round2semi(int freq) {
function osc_freq (line 51) | int32_t osc_freq(int midinote, int mode, int coarse, int fine, int detun...
function ScaleVelocity (line 88) | int ScaleVelocity(int velocity, int sensitivity) {
function ScaleRate (line 95) | int ScaleRate(int midinote, int sensitivity) {
function ScaleCurve (line 114) | int ScaleCurve(int group, int depth, int curve) {
function ScaleLevel (line 131) | int ScaleLevel(int midinote, int break_pt, int left_depth, int right_depth,
FILE: lib/msfa/dx7note.h
type VoiceStatus (line 31) | struct VoiceStatus {
function class (line 37) | class Dx7Note {
FILE: lib/msfa/env.h
function class (line 27) | class Env {
FILE: lib/msfa/exp2.cc
function dtanh (line 245) | static double dtanh(double y) {
FILE: lib/msfa/exp2.h
function class (line 19) | class Exp2 {
function lookup (line 37) | inline
function class (line 50) | class Tanh {
function lookup (line 63) | inline
FILE: lib/msfa/fm_core.cc
function n_out (line 64) | int n_out(const FmAlgorithm &alg) {
FILE: lib/msfa/fm_core.h
function class (line 26) | class FmOperatorInfo {
type FmOperatorFlags (line 32) | enum FmOperatorFlags {
function class (line 42) | class FmAlgorithm {
function class (line 47) | class FmCore {
FILE: lib/msfa/fm_op_kernel.cc
function hasNeon (line 30) | static bool hasNeon() {
function hasNeon (line 42) | static bool hasNeon() {
FILE: lib/msfa/fm_op_kernel.h
type FmOpParams (line 20) | struct FmOpParams {
function class (line 27) | class FmOpKernel {
FILE: lib/msfa/freqlut.h
function class (line 19) | class Freqlut {
FILE: lib/msfa/lfo.h
function class (line 21) | class Lfo {
FILE: lib/msfa/module.h
function class (line 22) | class Module {
FILE: lib/msfa/patch.cc
function UnpackPatch (line 21) | void UnpackPatch(const char bulk[128], char patch[156]) {
function PackPatch (line 53) | void PackPatch(const char patch[156], char bulk[128]) {
FILE: lib/msfa/pitchenv.h
function class (line 22) | class PitchEnv {
FILE: lib/msfa/porta.h
type Porta (line 22) | struct Porta {
FILE: lib/msfa/sin.h
function class (line 19) | class Sin {
function lookup (line 46) | inline
FILE: lib/msfa/synth.h
type __int32 (line 24) | typedef __int32 int32_t;
type __int16 (line 26) | typedef __int16 SInt16;
function T (line 51) | static T min(const T& a, const T& b) {
function T (line 56) | static T max(const T& a, const T& b) {
FILE: lib/open303/src/GlobalDefinitions.h
type real_t (line 14) | typedef float real_t;
type real_t (line 16) | typedef double real_t;
type UINT64 (line 40) | typedef unsigned __int64 UINT64;
type UINT64 (line 42) | typedef unsigned long long UINT64;
type INT64 (line 47) | typedef signed __int64 INT64;
type INT64 (line 49) | typedef signed long long INT64;
type UINT32 (line 54) | typedef unsigned __int32 UINT32;
type UINT32 (line 56) | typedef unsigned long UINT32;
function real_t (line 65) | inline real_t dummyFunction(real_t x) { return x; }
FILE: lib/open303/src/GlobalFunctions.h
function namespace (line 8) | namespace rosic { //[eh2k] start namespace
FILE: lib/open303/src/rosic_AnalogEnvelope.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_BiquadFilter.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_BlendOscillator.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_DecayEnvelope.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_EllipticQuarterBandFilter.h
function namespace (line 9) | namespace rosic
FILE: lib/open303/src/rosic_FunctionTemplates.h
function namespace (line 9) | namespace rosic
FILE: lib/open303/src/rosic_LeakyIntegrator.cpp
function real_t (line 45) | real_t LeakyIntegrator::getNormalizer(real_t tau1, real_t tau2, real_t fs)
FILE: lib/open303/src/rosic_LeakyIntegrator.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_MidiNoteEvent.h
function namespace (line 6) | namespace rosic
FILE: lib/open303/src/rosic_NumberManipulations.h
function namespace (line 8) | namespace rosic
FILE: lib/open303/src/rosic_OnePoleFilter.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/rosic_Open303.h
function empty (line 27) | bool empty()
function clear (line 32) | void clear()
function push_front (line 42) | void push_front(T &e)
function remove (line 47) | void remove(T &e)
function namespace (line 54) | namespace rosic
FILE: lib/open303/src/rosic_RealFunctions.h
function namespace (line 12) | namespace rosic
FILE: lib/open303/src/rosic_TeeBeeFilter.h
function namespace (line 10) | namespace rosic
FILE: lib/open303/src/sequencer/rosic_AcidPattern.h
function namespace (line 8) | namespace rosic
FILE: lib/open303/src/sequencer/rosic_AcidSequencer.cpp
function AcidPattern (line 56) | AcidPattern* AcidSequencer::getPattern(int index)
FILE: lib/open303/src/sequencer/rosic_AcidSequencer.h
function namespace (line 7) | namespace rosic
FILE: lib/open303/src/wavetable_gen/fft4g.h
function cdft (line 278) | void cdft(int n, int isgn, real_t *a, int *ip, real_t *w)
function rdft (line 303) | void rdft(int n, int isgn, real_t *a, int *ip, real_t *w)
function ddct (line 350) | void ddct(int n, int isgn, real_t *a, int *ip, real_t *w)
function ddst (line 409) | void ddst(int n, int isgn, real_t *a, int *ip, real_t *w)
function dfct (line 468) | void dfct(int n, real_t *a, real_t *t, int *ip, real_t *w)
function dfst (line 564) | void dfst(int n, real_t *a, real_t *t, int *ip, real_t *w)
function makewt (line 656) | void makewt(int nw, int *ip, real_t *w)
function makect (line 686) | void makect(int nc, int *ip, real_t *c)
function bitrv2 (line 708) | void bitrv2(int n, int *ip, real_t *a)
function bitrv2conj (line 808) | void bitrv2conj(int n, int *ip, real_t *a)
function cftfsub (line 917) | void cftfsub(int n, real_t *a, real_t *w)
function cftbsub (line 969) | void cftbsub(int n, real_t *a, real_t *w)
function cft1st (line 1021) | void cft1st(int n, real_t *a, real_t *w)
function cftmdl (line 1126) | void cftmdl(int n, int l, real_t *a, real_t *w)
function rftfsub (line 1253) | void rftfsub(int n, real_t *a, int nc, real_t *c)
function rftbsub (line 1278) | void rftbsub(int n, real_t *a, int nc, real_t *c)
function dctsub (line 1305) | void dctsub(int n, real_t *a, int nc, real_t *c)
function dstsub (line 1326) | void dstsub(int n, real_t *a, int nc, real_t *c)
FILE: lib/open303/src/wavetable_gen/rosic_Complex.cpp
function real_t (line 32) | real_t Complex::getRadius()
function real_t (line 37) | real_t Complex::getAngle()
function Complex (line 68) | Complex Complex::getConjugate()
function Complex (line 73) | Complex Complex::getReciprocal()
FILE: lib/open303/src/wavetable_gen/rosic_Complex.h
function operator (line 54) | bool operator==(const Complex& z) const
function operator (line 63) | bool operator!=(const Complex& z) const
FILE: lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.cpp
type rosic (line 2) | namespace rosic
FILE: lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.h
function namespace (line 13) | namespace rosic
FILE: lib/open303/src/wavetable_gen/rosic_MipMappedWaveTable.h
function namespace (line 9) | namespace rosic
FILE: lib/peaks/drums/bass_drum.cc
type peaks (line 37) | namespace peaks {
FILE: lib/peaks/drums/bass_drum.h
function namespace (line 39) | namespace peaks {
FILE: lib/peaks/drums/excitation.h
function namespace (line 34) | namespace peaks {
FILE: lib/peaks/drums/fm_drum.cc
type peaks (line 36) | namespace peaks {
FILE: lib/peaks/drums/fm_drum.h
function namespace (line 36) | namespace peaks {
FILE: lib/peaks/drums/high_hat.cc
type peaks (line 38) | namespace peaks {
FILE: lib/peaks/drums/high_hat.h
function namespace (line 39) | namespace peaks {
FILE: lib/peaks/drums/snare_drum.cc
type peaks (line 38) | namespace peaks {
FILE: lib/peaks/drums/snare_drum.h
function namespace (line 41) | namespace peaks {
FILE: lib/peaks/drums/svf.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/gate_processor.h
function namespace (line 36) | namespace peaks {
FILE: lib/peaks/modulations/bouncing_ball.h
function namespace (line 41) | namespace peaks {
FILE: lib/peaks/modulations/lfo.cc
type peaks (line 38) | namespace peaks {
FILE: lib/peaks/modulations/lfo.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/modulations/mini_sequencer.h
function namespace (line 38) | namespace peaks {
FILE: lib/peaks/modulations/multistage_envelope.cc
type peaks (line 35) | namespace peaks {
FILE: lib/peaks/modulations/multistage_envelope.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/number_station/number_station.cc
type peaks (line 36) | namespace peaks {
FILE: lib/peaks/number_station/number_station.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/pulse_processor/pulse_randomizer.cc
type peaks (line 38) | namespace peaks {
FILE: lib/peaks/pulse_processor/pulse_randomizer.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/pulse_processor/pulse_shaper.cc
type peaks (line 37) | namespace peaks {
FILE: lib/peaks/pulse_processor/pulse_shaper.h
function namespace (line 37) | namespace peaks {
FILE: lib/peaks/resources.cc
type peaks (line 39) | namespace peaks {
FILE: lib/peaks/resources.h
function namespace (line 41) | namespace peaks {
FILE: lib/plaits/dsp/chords/chord_bank.cc
type plaits (line 37) | namespace plaits {
FILE: lib/plaits/dsp/chords/chord_bank.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/downsampler/4x_downsampler.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/drums/analog_bass_drum.h
function namespace (line 42) | namespace plaits {
FILE: lib/plaits/dsp/drums/analog_snare_drum.h
function namespace (line 43) | namespace plaits {
FILE: lib/plaits/dsp/drums/hi_hat.h
function namespace (line 45) | namespace plaits {
function class (line 147) | class SwingVCA {
function class (line 156) | class LinearVCA {
function Init (line 173) | void Init() {
function Render (line 184) | void Render(
FILE: lib/plaits/dsp/drums/synthetic_bass_drum.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/drums/synthetic_snare_drum.h
function namespace (line 44) | namespace plaits {
FILE: lib/plaits/dsp/dsp.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/engine/additive_engine.cc
type plaits (line 36) | namespace plaits {
function Bump (line 102) | inline float Bump(float x, float centroid, float slope) {
FILE: lib/plaits/dsp/engine/additive_engine.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine/bass_drum_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/bass_drum_engine.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/engine/chord_engine.cc
type plaits (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine/chord_engine.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/engine/engine.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/engine/fm_engine.cc
type plaits (line 36) | namespace plaits {
FILE: lib/plaits/dsp/engine/fm_engine.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/engine/grain_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/grain_engine.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/engine/hi_hat_engine.cc
type plaits (line 32) | namespace plaits {
FILE: lib/plaits/dsp/engine/hi_hat_engine.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/engine/modal_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/modal_engine.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine/noise_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/noise_engine.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/engine/particle_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/particle_engine.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/engine/snare_drum_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/snare_drum_engine.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/engine/speech_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/speech_engine.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/engine/string_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/string_engine.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine/swarm_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine/swarm_engine.h
function namespace (line 42) | namespace plaits {
FILE: lib/plaits/dsp/engine/virtual_analog_engine.cc
type plaits (line 35) | namespace plaits {
function Squash (line 61) | inline float Squash(float x) {
FILE: lib/plaits/dsp/engine/virtual_analog_engine.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/engine/waveshaping_engine.cc
type plaits (line 39) | namespace plaits {
function Tame (line 56) | float Tame(float f0, float harmonics, float order) {
FILE: lib/plaits/dsp/engine/waveshaping_engine.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine/wavetable_engine.cc
type plaits (line 35) | namespace plaits {
function Clamp (line 93) | inline float Clamp(float x, float amount) {
FILE: lib/plaits/dsp/engine/wavetable_engine.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine2/arpeggiator.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/engine2/chiptune_engine.cc
type plaits (line 33) | namespace plaits {
FILE: lib/plaits/dsp/engine2/chiptune_engine.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/engine2/phase_distortion_engine.cc
type plaits (line 39) | namespace plaits {
FILE: lib/plaits/dsp/engine2/phase_distortion_engine.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/engine2/six_op_engine.cc
type plaits (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine2/six_op_engine.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/engine2/string_machine_engine.cc
type plaits (line 35) | namespace plaits {
FILE: lib/plaits/dsp/engine2/string_machine_engine.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/engine2/virtual_analog_vcf_engine.cc
type plaits (line 37) | namespace plaits {
FILE: lib/plaits/dsp/engine2/virtual_analog_vcf_engine.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/engine2/wave_terrain_engine.cc
type plaits (line 36) | namespace plaits {
function TerrainLookup (line 53) | inline float TerrainLookup(float x, float y, const int8_t* terrain) {
function InterpolateIntegratedWave (line 74) | inline float InterpolateIntegratedWave(
function TerrainLookupWT (line 93) | inline float TerrainLookupWT(float x, float y, int bank) {
function Squash (line 123) | inline float Squash(float x, float a) {
FILE: lib/plaits/dsp/engine2/wave_terrain_engine.h
function namespace (line 42) | namespace plaits {
FILE: lib/plaits/dsp/envelope.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/fm/algorithms.cc
type plaits (line 31) | namespace plaits {
type fm (line 33) | namespace fm {
FILE: lib/plaits/dsp/fm/algorithms.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/fm/dx_units.cc
type plaits (line 31) | namespace plaits {
type fm (line 33) | namespace fm {
FILE: lib/plaits/dsp/fm/dx_units.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/fm/envelope.h
function namespace (line 52) | namespace plaits {
FILE: lib/plaits/dsp/fm/lfo.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/fm/operator.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/fm/patch.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/fm/voice.h
function namespace (line 44) | namespace plaits {
FILE: lib/plaits/dsp/fx/diffuser.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/fx/ensemble.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/fx/fx_engine.h
function namespace (line 39) | namespace plaits {
function Lp (line 216) | inline void Lp(float& state, float coefficient) {
function Hp (line 221) | inline void Hp(float& state, float coefficient) {
function SetLFOFrequency (line 264) | inline void SetLFOFrequency(LFOIndex index, float frequency) {
function Start (line 268) | inline void Start(Context* c) {
FILE: lib/plaits/dsp/fx/low_pass_gate.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/fx/overdrive.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/fx/sample_rate_reducer.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/noise/clocked_noise.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/noise/dust.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/noise/fractal_random_generator.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/noise/particle.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/noise/smooth_random_generator.h
function namespace (line 35) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/formant_oscillator.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/grainlet_oscillator.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/harmonic_oscillator.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/nes_triangle_oscillator.h
function namespace (line 41) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/oscillator.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/sine_oscillator.h
function namespace (line 41) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/string_synth_oscillator.h
function namespace (line 47) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/super_square_oscillator.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/variable_saw_oscillator.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/variable_shape_oscillator.h
function namespace (line 45) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/vosim_oscillator.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/wavetable_oscillator.h
function namespace (line 39) | namespace plaits {
FILE: lib/plaits/dsp/oscillator/z_oscillator.h
function namespace (line 40) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/delay_line.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/modal_voice.cc
type plaits (line 42) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/modal_voice.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/resonator.cc
type plaits (line 39) | namespace plaits {
function NthHarmonicCompensation (line 59) | inline float NthHarmonicCompensation(int n, float stiffness) {
FILE: lib/plaits/dsp/physical_modelling/resonator.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/string.cc
type plaits (line 41) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/string.h
function namespace (line 41) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/string_voice.cc
type plaits (line 38) | namespace plaits {
FILE: lib/plaits/dsp/physical_modelling/string_voice.h
function namespace (line 37) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth.cc
type plaits (line 38) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth.h
function namespace (line 36) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth_controller.cc
type plaits (line 38) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth_controller.h
function namespace (line 36) | namespace plaits {
type LPCSpeechSynthWordBankData (line 95) | struct LPCSpeechSynthWordBankData {
function class (line 100) | class LPCSpeechSynthWordBank {
function class (line 156) | class LPCSpeechSynthController {
FILE: lib/plaits/dsp/speech/lpc_speech_synth_phonemes.cc
type plaits (line 32) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth_words.cc
type plaits (line 35) | namespace plaits {
FILE: lib/plaits/dsp/speech/lpc_speech_synth_words.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/speech/naive_speech_synth.cc
type plaits (line 40) | namespace plaits {
FILE: lib/plaits/dsp/speech/naive_speech_synth.h
function namespace (line 38) | namespace plaits {
FILE: lib/plaits/dsp/speech/sam_speech_synth.cc
type plaits (line 40) | namespace plaits {
FILE: lib/plaits/dsp/speech/sam_speech_synth.h
function namespace (line 34) | namespace plaits {
FILE: lib/plaits/dsp/voice.cc
type plaits (line 32) | namespace plaits {
FILE: lib/plaits/dsp/voice.h
function namespace (line 67) | namespace plaits {
FILE: lib/plaits/resources.cc
type plaits (line 39) | namespace plaits {
FILE: lib/plaits/resources.h
function namespace (line 41) | namespace plaits {
FILE: lib/rings/dsp/dsp.h
function namespace (line 37) | namespace rings {
FILE: lib/rings/dsp/fm_voice.cc
type rings (line 39) | namespace rings {
FILE: lib/rings/dsp/fm_voice.h
function namespace (line 43) | namespace rings {
FILE: lib/rings/dsp/follower.h
function namespace (line 39) | namespace rings {
FILE: lib/rings/dsp/fx/chorus.h
function namespace (line 39) | namespace rings {
FILE: lib/rings/dsp/fx/ensemble.h
function namespace (line 39) | namespace rings {
FILE: lib/rings/dsp/fx/fx_engine.h
function namespace (line 39) | namespace rings {
function Lp (line 217) | inline void Lp(float& state, float coefficient) {
function Hp (line 222) | inline void Hp(float& state, float coefficient) {
function SetLFOFrequency (line 265) | inline void SetLFOFrequency(LFOIndex index, float frequency) {
function Start (line 269) | inline void Start(Context* c) {
FILE: lib/rings/dsp/fx/reverb.h
function namespace (line 36) | namespace rings {
FILE: lib/rings/dsp/limiter.h
function namespace (line 39) | namespace rings {
FILE: lib/rings/dsp/note_filter.h
function namespace (line 35) | namespace rings {
FILE: lib/rings/dsp/onset_detector.h
function namespace (line 39) | namespace rings {
FILE: lib/rings/dsp/part.cc
type rings (line 41) | namespace rings {
FILE: lib/rings/dsp/part.h
function namespace (line 51) | namespace rings {
FILE: lib/rings/dsp/patch.h
function namespace (line 32) | namespace rings {
FILE: lib/rings/dsp/performance_state.h
function namespace (line 32) | namespace rings {
FILE: lib/rings/dsp/plucker.h
function namespace (line 40) | namespace rings {
FILE: lib/rings/dsp/resonator.cc
type rings (line 37) | namespace rings {
FILE: lib/rings/dsp/resonator.h
function namespace (line 40) | namespace rings {
FILE: lib/rings/dsp/string.cc
type rings (line 40) | namespace rings {
FILE: lib/rings/dsp/string.h
function namespace (line 41) | namespace rings {
FILE: lib/rings/dsp/string_synth_envelope.h
function namespace (line 34) | namespace rings {
FILE: lib/rings/dsp/string_synth_oscillator.h
function namespace (line 38) | namespace rings {
FILE: lib/rings/dsp/string_synth_part.cc
type rings (line 33) | namespace rings {
type ChordNote (line 302) | struct ChordNote {
FILE: lib/rings/dsp/string_synth_part.h
function namespace (line 47) | namespace rings {
FILE: lib/rings/dsp/string_synth_voice.h
function namespace (line 36) | namespace rings {
FILE: lib/rings/dsp/strummer.h
function namespace (line 37) | namespace rings {
FILE: lib/rings/resources.cc
type rings (line 39) | namespace rings {
FILE: lib/rings/resources.h
function namespace (line 41) | namespace rings {
FILE: lib/soundpipe/revsc.c
function sp_revsc_init (line 53) | int sp_revsc_init(sp_data *sp, sp_revsc *p)
function delay_line_max_samples (line 89) | static int delay_line_max_samples(SPFLOAT sr, SPFLOAT iPitchMod, int n)
function delay_line_bytes_alloc (line 98) | static int delay_line_bytes_alloc(SPFLOAT sr, SPFLOAT iPitchMod, int n)
function next_random_lineseg (line 106) | static void next_random_lineseg(sp_revsc *p, sp_revsc_dl *lp, int n)
function init_delay_line (line 133) | static int init_delay_line(sp_revsc *p, sp_revsc_dl *lp, int n)
function sp_revsc_compute (line 160) | int sp_revsc_compute(sp_data *sp, sp_revsc *p, SPFLOAT *in1, SPFLOAT *in...
FILE: lib/soundpipe/revsc.h
type sp_revsc_dl (line 4) | typedef struct {
type sp_revsc (line 17) | typedef struct {
FILE: lib/soundpipe/soundpipe.c
function sp_rand (line 4) | uint32_t sp_rand(sp_data *sp)
FILE: lib/soundpipe/soundpipe.h
type SPFLOAT (line 6) | typedef float SPFLOAT;
type sp_auxdata (line 11) | typedef struct sp_auxdata {
type sp_data (line 16) | typedef struct {
FILE: lib/stmlib/algorithms/note_stack.h
function namespace (line 52) | namespace stmlib {
FILE: lib/stmlib/algorithms/pattern_predictor.h
function namespace (line 37) | namespace stmlib {
FILE: lib/stmlib/algorithms/tiny_map.h
function namespace (line 37) | namespace stmlib {
FILE: lib/stmlib/algorithms/voice_allocator.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/dsp/atan.cc
type stmlib (line 31) | namespace stmlib {
FILE: lib/stmlib/dsp/atan.h
function namespace (line 38) | namespace stmlib {
FILE: lib/stmlib/dsp/atan_approximations.py
function dumb (line 4) | def dumb(f):
function pade (line 7) | def pade(f):
function poly3taylor (line 10) | def poly3taylor(f):
function poly3gradient (line 18) | def poly3gradient(f, a=3.736e-01):
function poly5mdsp (line 27) | def poly5mdsp(f, a=3.1755e-01, b=2.033e-01):
function poly5gradient (line 38) | def poly5gradient(f, a=3.260e-01, b=1.823e-01):
function poly11mdsp (line 50) | def poly11mdsp(f):
function compute_filter_settings (line 67) | def compute_filter_settings(cutoff, resonance):
function evaluate (line 74) | def evaluate(groundtruth_f, approximate_g):
FILE: lib/stmlib/dsp/cosine_oscillator.h
function namespace (line 37) | namespace stmlib {
FILE: lib/stmlib/dsp/delay_line.h
function namespace (line 37) | namespace stmlib {
FILE: lib/stmlib/dsp/dsp.h
function namespace (line 37) | namespace stmlib {
FILE: lib/stmlib/dsp/filter.h
function namespace (line 38) | namespace stmlib {
FILE: lib/stmlib/dsp/hysteresis_filter.h
function namespace (line 34) | namespace stmlib {
FILE: lib/stmlib/dsp/hysteresis_quantizer.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/dsp/limiter.h
function namespace (line 39) | namespace stmlib {
FILE: lib/stmlib/dsp/parameter_interpolator.h
function namespace (line 34) | namespace stmlib {
FILE: lib/stmlib/dsp/polyblep.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/dsp/rsqrt.h
function namespace (line 34) | namespace stmlib {
function fast_rsqrt_carmack (line 52) | static inline float fast_rsqrt_carmack(float x) {
function fast_rsqrt_accurate (line 65) | static inline float fast_rsqrt_accurate(float fp0) {
FILE: lib/stmlib/dsp/sample_rate_converter.h
type SampleRateConversionDirection (line 38) | enum SampleRateConversionDirection {
function Push (line 52) | inline void Push(float value) {
function Load (line 61) | inline void Load(const float* x_state) {
function Save (line 66) | inline void Save(float* x_state) {
function Push (line 82) | inline void Push(float value) {
function Load (line 90) | inline void Load(const float* x_state) {
function Save (line 94) | inline void Save(float* x_state) {
function const (line 109) | float operator()(const float* x, const IR& h) const {
function Init (line 163) | inline void Init() { }
function Process (line 165) | inline void Process(const float* in, float* out, size_t input_size) {
function Init (line 178) | inline void Init() { }
function Process (line 180) | inline void Process(const float* in, float* out, size_t input_size) {
function Init (line 199) | inline void Init() {
function Process (line 205) | inline void Process(const float* in, float* out, size_t input_size) {
function Init (line 235) | inline void Init() {
function Process (line 242) | inline void Process(const float* in, float* out, size_t input_size) {
FILE: lib/stmlib/dsp/units.cc
type stmlib (line 31) | namespace stmlib {
FILE: lib/stmlib/dsp/units.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/midi/midi.h
function namespace (line 32) | namespace stmlib_midi {
FILE: lib/stmlib/stmlib.h
function StaticAssertImplementation (line 72) | void StaticAssertImplementation() {
function namespace (line 76) | namespace stmlib {
FILE: lib/stmlib/utils/buffer_allocator.h
function namespace (line 34) | namespace stmlib {
FILE: lib/stmlib/utils/crc32.h
function crc32 (line 92) | uint32_t crc32(uint32_t crc, const void *buf, size_t size) {
FILE: lib/stmlib/utils/dsp.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/utils/gate_flags.h
function namespace (line 49) | namespace stmlib {
FILE: lib/stmlib/utils/murmurhash3.h
function rotl32 (line 6) | uint32_t rotl32 ( uint32_t x, int8_t r )
function fmix32 (line 11) | uint32_t fmix32 ( uint32_t h )
function MurmurHash3_x86_32 (line 22) | void MurmurHash3_x86_32 ( const void * key, int len,
FILE: lib/stmlib/utils/random.cc
type stmlib (line 31) | namespace stmlib {
FILE: lib/stmlib/utils/random.h
function namespace (line 34) | namespace stmlib {
FILE: lib/stmlib/utils/ring_buffer.h
function namespace (line 35) | namespace stmlib {
FILE: lib/stmlib/utils/stream_buffer.h
function namespace (line 37) | namespace stmlib {
FILE: lib/streams/audio_cv_meter.h
function namespace (line 34) | namespace streams {
FILE: lib/streams/compressor.cc
type streams (line 35) | namespace streams {
FILE: lib/streams/compressor.h
function namespace (line 39) | namespace streams {
FILE: lib/streams/envelope.cc
type streams (line 39) | namespace streams {
FILE: lib/streams/envelope.h
function namespace (line 36) | namespace streams {
FILE: lib/streams/filter_controller.h
function namespace (line 34) | namespace streams {
FILE: lib/streams/follower.cc
type streams (line 36) | namespace streams {
FILE: lib/streams/follower.h
function namespace (line 38) | namespace streams {
FILE: lib/streams/gain.h
function namespace (line 32) | namespace streams {
FILE: lib/streams/lorenz_generator.cc
type streams (line 33) | namespace streams {
FILE: lib/streams/lorenz_generator.h
function namespace (line 36) | namespace streams {
FILE: lib/streams/meta_parameters.h
function namespace (line 34) | namespace streams {
FILE: lib/streams/resources.cc
type streams (line 35) | namespace streams {
FILE: lib/streams/resources.h
function namespace (line 41) | namespace streams {
FILE: lib/streams/svf.cc
type streams (line 35) | namespace streams {
FILE: lib/streams/svf.h
function namespace (line 34) | namespace streams {
FILE: lib/streams/vactrol.cc
type streams (line 36) | namespace streams {
FILE: lib/streams/vactrol.h
function namespace (line 37) | namespace streams {
FILE: lib/xz_lzma2/xz.h
type xz_mode (line 51) | enum xz_mode {
type xz_ret (line 107) | enum xz_ret {
type xz_buf (line 135) | struct xz_buf {
type xz_dec (line 148) | struct xz_dec
type xz_dec_lzma2 (line 154) | struct xz_dec_lzma2
type xz_mode (line 154) | enum xz_mode
type xz_ret (line 163) | enum xz_ret
type xz_dec_lzma2 (line 163) | struct xz_dec_lzma2
type xz_ret (line 167) | enum xz_ret
type xz_dec_lzma2 (line 167) | struct xz_dec_lzma2
type xz_buf (line 168) | struct xz_buf
type xz_dec_lzma2 (line 171) | struct xz_dec_lzma2
FILE: lib/xz_lzma2/xz_config.h
function get_unaligned_le32 (line 79) | static inline uint32_t get_unaligned_le32(const uint8_t *buf)
function get_unaligned_be32 (line 89) | static inline uint32_t get_unaligned_be32(const uint8_t *buf)
function put_unaligned_le32 (line 99) | static inline void put_unaligned_le32(uint32_t val, uint8_t *buf)
function put_unaligned_be32 (line 109) | static inline void put_unaligned_be32(uint32_t val, uint8_t *buf)
FILE: lib/xz_lzma2/xz_dec_lzma2.c
type dictionary (line 44) | struct dictionary {
type rc_dec (line 95) | struct rc_dec {
type lzma_len_dec (line 115) | struct lzma_len_dec {
type lzma_dec (line 132) | struct lzma_dec {
type lzma2_dec (line 214) | struct lzma2_dec {
type xz_dec_lzma2 (line 253) | struct xz_dec_lzma2 {
function dict_reset (line 286) | static void dict_reset(struct dictionary *dict, struct xz_buf *b)
function dict_limit (line 300) | static void dict_limit(struct dictionary *dict, size_t out_max)
function dict_has_space (line 309) | static inline bool dict_has_space(const struct dictionary *dict)
function dict_get (line 320) | static inline uint32_t dict_get(const struct dictionary *dict, uint32_t ...
function dict_put (line 333) | static inline void dict_put(struct dictionary *dict, uint8_t byte)
function dict_repeat (line 346) | static bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t...
function dict_uncompressed (line 374) | static void dict_uncompressed(struct dictionary *dict, struct xz_buf *b,
function dict_flush (line 427) | static uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)
function rc_reset (line 455) | static void rc_reset(struct rc_dec *rc)
function rc_read_init (line 466) | static bool rc_read_init(struct rc_dec *rc, struct xz_buf *b)
function rc_limit_exceeded (line 480) | static inline bool rc_limit_exceeded(const struct rc_dec *rc)
function rc_is_finished (line 489) | static inline bool rc_is_finished(const struct rc_dec *rc)
function __always_inline (line 495) | static __always_inline void rc_normalize(struct rc_dec *rc)
function __always_inline (line 514) | static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
function __always_inline (line 536) | static __always_inline uint32_t rc_bittree(struct rc_dec *rc,
function __always_inline (line 552) | static __always_inline void rc_bittree_reverse(struct rc_dec *rc,
function rc_direct (line 570) | static inline void rc_direct(struct rc_dec *rc, uint32_t *dest, uint32_t...
type xz_dec_lzma2 (line 589) | struct xz_dec_lzma2
function lzma_literal (line 598) | static void lzma_literal(struct xz_dec_lzma2 *s)
function lzma_len (line 636) | static void lzma_len(struct xz_dec_lzma2 *s, struct lzma_len_dec *l,
function lzma_match (line 663) | static void lzma_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
function lzma_rep_match (line 705) | static void lzma_rep_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
function lzma_main (line 739) | static bool lzma_main(struct xz_dec_lzma2 *s)
function lzma_reset (line 784) | static void lzma_reset(struct xz_dec_lzma2 *s)
function lzma_props (line 816) | static bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)
function lzma2_lzma (line 863) | static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
function xz_dec_lzma2_run (line 948) | enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s,
type xz_dec_lzma2 (line 1125) | struct xz_dec_lzma2
type xz_mode (line 1125) | enum xz_mode
type xz_dec_lzma2 (line 1128) | struct xz_dec_lzma2
function xz_dec_lzma2_reset (line 1149) | enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props)
function xz_dec_lzma2_end (line 1187) | void xz_dec_lzma2_end(struct xz_dec_lzma2 *s)
FILE: lib/xz_lzma2/xz_lzma2.h
type lzma_state (line 42) | enum lzma_state {
function lzma_state_literal (line 64) | static inline void lzma_state_literal(enum lzma_state *state)
function lzma_state_match (line 75) | static inline void lzma_state_match(enum lzma_state *state)
function lzma_state_long_rep (line 81) | static inline void lzma_state_long_rep(enum lzma_state *state)
function lzma_state_short_rep (line 87) | static inline void lzma_state_short_rep(enum lzma_state *state)
function lzma_state_is_literal (line 93) | static inline bool lzma_state_is_literal(enum lzma_state state)
function lzma_get_dist_state (line 147) | static inline uint32_t lzma_get_dist_state(uint32_t len)
FILE: lib/xz_lzma2/xz_private.h
type xz_dec_lzma2 (line 59) | struct xz_dec_lzma2
type xz_mode (line 59) | enum xz_mode
type xz_ret (line 68) | enum xz_ret
type xz_dec_lzma2 (line 68) | struct xz_dec_lzma2
type xz_ret (line 72) | enum xz_ret
type xz_dec_lzma2 (line 72) | struct xz_dec_lzma2
type xz_buf (line 73) | struct xz_buf
type xz_dec_lzma2 (line 76) | struct xz_dec_lzma2
FILE: src/CV/EnvFollower.cpp
function draw (line 49) | void draw(int x0, int y)
function push (line 59) | void push(int y)
FILE: src/CV/EnvGen.cpp
function draw_envelope (line 129) | void draw_envelope(int base_line = 58, int height = 16)
FILE: src/DRUMS/Claps.cpp
function sprint_inst_name (line 60) | int sprint_inst_name(char *tmp, int inst_selection)
function free_instrument (line 148) | void free_instrument()
function engine_free (line 158) | void engine_free()
function load_instrument (line 164) | void load_instrument(uint8_t num)
FILE: src/DRUMS/DrumSynth.cpp
function map_as_multiple (line 112) | void map_as_multiple(uint8_t a, uint8_t b)
function is_maped_as_multiple (line 123) | bool is_maped_as_multiple(uint8_t a, uint8_t b)
FILE: src/FILTER/MoogLadder.cpp
function NoteToFrequency (line 41) | inline float NoteToFrequency(float midi_note)
FILE: src/FILTER/SVF.cpp
function clamp (line 34) | inline float clamp(float x, float a, float b)
type SVFilter (line 40) | struct SVFilter
method process (line 43) | inline void process(float input, float kf, float kq)
class Filter (line 54) | class Filter
method set_f_q (line 60) | void set_f_q(float f, float q)
method process (line 67) | inline auto process(float input)
FILE: src/FILTER/TeeBee.cpp
type TB303_filter (line 48) | struct TB303_filter
method init (line 63) | void init(int32_t _oversampling = 1)
method calculateEnvModScalerAndOffset (line 101) | void calculateEnvModScalerAndOffset(real_t cutoff, real_t envMod) // O...
method process (line 122) | void process(bool trig, float _cutoff, float _q, float _envMod, float ...
FILE: src/FX/Delay.cpp
function DelayRead (line 51) | inline const float DelayRead(stmlib::DelayLine<uint16_t, delay_len> *lin...
function DelayWrite (line 56) | inline void DelayWrite(stmlib::DelayLine<uint16_t, delay_len> *line_, co...
function calc_t_step32 (line 84) | void calc_t_step32()
function sync_params (line 99) | void sync_params()
FILE: src/FX/JU60_chorus.cpp
type Juno60_Chorus (line 48) | struct Juno60_Chorus
method lfo_tri (line 56) | float lfo_tri(float phase_inc_)
type Mode (line 67) | struct Mode
method setMode (line 90) | void setMode(const Mode &mode)
method Juno60_Chorus (line 99) | Juno60_Chorus()
method process (line 110) | void process(float *inOut, float *outR, uint32_t len)
type Juno60_Chorus_BBD (line 131) | struct Juno60_Chorus_BBD
type Mode (line 144) | struct Mode
method setMode (line 167) | void setMode(const Mode &mode)
method Juno60_Chorus_BBD (line 176) | Juno60_Chorus_BBD()
method lfo_tri (line 190) | void lfo_tri(float phase_inc_, float *out)
method process (line 203) | void process(float *inOut, float *outR, uint32_t len)
function set (line 249) | void set(float *target, const float *src, float amp)
function mix (line 255) | void mix(float *target, const float *src, float amp)
FILE: src/GND/FFT.cpp
type Complex (line 42) | struct Complex
function set (line 70) | void set(float *target, const float *src, float amp, float offset)
function fft_read (line 127) | float fft_read(int s, int e)
function draw_spectrum (line 139) | void draw_spectrum(int yy, int hh)
FILE: src/GND/Scope.cpp
function set (line 52) | void set(float *target, const float *src, float amp, float offset)
FILE: src/M-OSC/Waveforms.cpp
type braids (line 54) | namespace braids
FILE: src/MIDI/Clock.cpp
function clk_change (line 57) | uint8_t clk_change(uint8_t clk)
FILE: src/MIDI/VAx6.cpp
type plaits (line 39) | namespace plaits
class VirtualAnalogEngine (line 41) | class VirtualAnalogEngine
method VirtualAnalogEngine (line 44) | VirtualAnalogEngine() {}
method LoadUserData (line 49) | void LoadUserData(const uint8_t *user_data) {}
FILE: src/NOISE/808_squares.cpp
class SquareOscillator (line 30) | class SquareOscillator
method reset (line 33) | inline void reset()
method freq (line 38) | inline void freq(float freq)
method duty (line 43) | inline void duty(float duty)
method process (line 52) | inline void process(float &out2)
function update_oscillators (line 83) | void update_oscillators()
FILE: src/SEQ/303-Patterns.cpp
function note_to_voct (line 60) | inline int32_t note_to_voct(uint8_t note)
function voct_to_note (line 67) | inline uint8_t voct_to_note(int32_t voct)
FILE: src/SEQ/EuclidArp.cpp
function fpsin (line 58) | int16_t fpsin(int16_t i)
function fpcos (line 89) | inline int16_t fpcos(int16_t i)
function draw_eclid_cyrcle (line 118) | void draw_eclid_cyrcle(int x, int y, uint8_t pattern[64], int _len, int ...
function update_seq_pattern (line 276) | void update_seq_pattern()
FILE: src/SEQ/EuclidRythm.cpp
function fpsin (line 46) | int16_t fpsin(int16_t i)
function fpcos (line 77) | inline int16_t fpcos(int16_t i)
function draw_eclid_cyrcle (line 99) | void draw_eclid_cyrcle(int x, int y, uint8_t pattern[64], int _len, int ...
function update_seq_pattern (line 225) | void update_seq_pattern()
FILE: src/SEQ/TuringMachine.cpp
function Seed (line 49) | inline void Seed(uint32_t seed)
function Rand (line 54) | inline uint32_t Rand()
function note_from_scale (line 62) | int32_t note_from_scale(uint8_t bits)
function output (line 76) | int32_t output(uint32_t mode, const char **name)
FILE: src/SPEECH/LPC.cpp
type plaits (line 19) | namespace plaits
function NoteToFrequency (line 187) | inline float NoteToFrequency(float midi_note)
FILE: src/SPEECH/SAM.cpp
function init_phenoms (line 53) | static void init_phenoms()
function say (line 82) | void say()
FILE: src/SYNTH/DxFM.cpp
type dxfm (line 40) | struct dxfm
function initControllers (line 112) | static void initControllers()
function loadDXPatch (line 125) | static uint8_t loadDXPatch(uint8_t prog)
function applyRate (line 165) | static void applyRate(float rate)
FILE: src/SYNTH/plaits.cpp
function engine_free (line 73) | void engine_free()
function alloc_engine (line 80) | void alloc_engine(size_t mem = 48)
function is_drum (line 92) | bool is_drum()
function init_params (line 97) | void init_params(float hh, float tt, float mm, const plaits::PostProcess...
FILE: src/dump.py
function md5sum (line 5) | def md5sum(data):
FILE: src/squares-and-circles-api.h
function linToExp (line 103) | inline float linToExp(float in, float inMin, float inMax, float outMin, ...
type UI_EVENT_t (line 162) | struct UI_EVENT_t
function __ui_event_handler (line 179) | void __ui_event_handler()
type MIDI_EVENT_t (line 188) | struct MIDI_EVENT_t
function __midi_event_handler (line 201) | void __midi_event_handler()
function namespace (line 212) | namespace engine
function setMode (line 364) | inline void setMode(uint32_t mode) // 1: compact_mode, 2: sample_view
function isParamModulated (line 401) | inline uint32_t isParamModulated(const void *valuePtr)
function isParamSelected (line 405) | inline uint32_t isParamSelected(const void *valuePtr)
type EventType (line 418) | enum EventType : uint16_t
function namespace (line 431) | namespace engine_sync
function namespace (line 467) | namespace machine
function namespace (line 498) | namespace gfx
function namespace (line 528) | namespace machine
type sample (line 546) | struct sample
type sample_info (line 547) | struct sample_info
type FRESULT (line 571) | enum FRESULT : int
type FIL_IMPL (line 583) | struct FIL_IMPL
type FIL (line 585) | typedef struct
type UINT (line 590) | typedef unsigned int UINT;
type BYTE (line 591) | typedef unsigned char BYTE;
type WORD (line 592) | typedef uint16_t WORD;
type DWORD (line 593) | typedef uint32_t DWORD;
type QWORD (line 594) | typedef uint64_t QWORD;
type WORD (line 595) | typedef WORD WCHAR;
type DWORD (line 596) | typedef DWORD FSIZE_t;
type DIR_IMPL (line 615) | struct DIR_IMPL
type DIR (line 617) | typedef struct
type FILINFO (line 624) | typedef struct
FILE: src/test.cxx
function write_wav (line 32) | void write_wav(const std::vector<int16_t> &buffer, int nchannels, const ...
function __ui_event_handler (line 79) | void __ui_event_handler()
function qz_lookup (line 157) | int16_t qz_lookup(int8_t note)
function qz_process (line 163) | int32_t qz_process(int32_t pitch, int8_t *note)
function drawWaveform (line 168) | void drawWaveform(void *wavefrom, int x = 0, int y = -1)
function write_frame (line 205) | void write_frame()
function main (line 244) | int main()
Condensed preview — 465 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,812K chars).
[
{
"path": ".clangd",
"chars": 140,
"preview": "Diagnostics:\n Suppress:\n - \"xunused-includes\"\n - \"xasm_invalid_output_constraint\"\nCompileFlags:\n Add:\n - \"-I."
},
{
"path": ".github/workflows/build.yml",
"chars": 541,
"preview": "name: Build\n\non: [push]\n\njobs:\n build:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v2\n with"
},
{
"path": ".gitignore",
"chars": 99,
"preview": ".pio\n.vscode\n.test\n*.elf\n*.log\n*.txt\n*.bin.h\nsrc/__pycache__/app_hex.cpython-310.pyc\n.build/\n.venv/"
},
{
"path": ".gitmodules",
"chars": 92,
"preview": "[submodule \"lib/udynlink\"]\n\tpath = lib/udynlink\n\turl = https://github.com/eh2k/udynlink.git\n"
},
{
"path": "README.md",
"chars": 20875,
"preview": "> Feedback welcome: Feel free to leave a message or any hints in the [\"General Feedback\"](https://github.com/eh2k/square"
},
{
"path": "app/SEQ/patterns_303.h",
"chars": 2342,
"preview": "#include <inttypes.h>\n\nconstexpr uint8_t REST = 0x0;\n\n/* between 0x0 and 0xA, the VCO voltage pins, so these notes arent"
},
{
"path": "app/index.json",
"chars": 1091,
"preview": "{\n \"apps\": [\n \"CV/EnvFollower.bin\",\n \"CV/EnvGen.bin\",\n \"CV/LFO.bin\",\n \"CV/V_OCT.bin\",\n \"DRUMS/808ish-BD."
},
{
"path": "app/squares-and-circles-loader.sha",
"chars": 8,
"preview": "0e8b51c\n"
},
{
"path": "app/upload.py",
"chars": 6352,
"preview": "#!/usr/bin/env python3\n\nimport json\nimport zlib\nimport os, glob\nimport sys\n\ntry:\n import usb.core\n import usb.util"
},
{
"path": "doc/.conv.sh",
"chars": 268,
"preview": "set +x\n\ncd $(dirname $0)\n\nmontage -background '#25282c' -tile 5x -geometry +10+10 gnd_*.png cv_*.png drums_*.png mosc_*."
},
{
"path": "doc/.screenshots.py",
"chars": 19736,
"preview": "import base64\nimport math, struct\nfrom array import array\n\ne = \"////Bwfn52dnZ2dnZ+fnBwf//4eHZ2d/fwcHBwcfH///5+fn5+fnBwfn"
},
{
"path": "doc/output-routing.xml",
"chars": 4562,
"preview": "<mxfile host=\"app.diagrams.net\" modified=\"2022-05-01T09:43:04.750Z\" agent=\"5.0 (X11; Linux x86_64) AppleWebKit/537.36 (K"
},
{
"path": "lib/.fetch_deps.py",
"chars": 331,
"preview": "import subprocess\nimport os\nimport io\nimport urllib.request\nimport zipfile\nimport shutil\n\nsubprocess.run('git submodule "
},
{
"path": "lib/MoogLadders/LICENSE",
"chars": 1211,
"preview": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, c"
},
{
"path": "lib/MoogLadders/README.md",
"chars": 2670,
"preview": "# Moog Ladder Filters\n\nThis project contains different digital implementations of the classic 4-pole, 24 dB/octave analo"
},
{
"path": "lib/MoogLadders/src/Filters.h",
"chars": 5525,
"preview": "#pragma once\n\n#ifndef FILTERS_H\n#define FILTERS_H\n\n#include <stdint.h>\n#include <array>\n\n#include \"Util.h\"\n\nclass BiQuad"
},
{
"path": "lib/MoogLadders/src/HuovilainenModel.h",
"chars": 3106,
"preview": "// Based on implementation in CSound5 (LGPLv2.1)\n// https://github.com/csound/csound/blob/develop/COPYING\n\n#pragma once\n"
},
{
"path": "lib/MoogLadders/src/ImprovedModel.h",
"chars": 3087,
"preview": "/*\nCopyright 2012 Stefano D'Angelo <zanga.mail@gmail.com>\n\nPermission to use, copy, modify, and/or distribute this softw"
},
{
"path": "lib/MoogLadders/src/KrajeskiModel.h",
"chars": 2262,
"preview": "#pragma once\n\n#ifndef KRAJESKI_LADDER_H\n#define KRAJESKI_LADDER_H\n\n#include \"LadderFilterBase.h\"\n#include \"Util.h\"\n\n/*\nT"
},
{
"path": "lib/MoogLadders/src/LadderFilterBase.h",
"chars": 522,
"preview": "#pragma once\n\n#ifndef LADDER_FILTER_BASE_H\n#define LADDER_FILTER_BASE_H\n\n#include \"Util.h\"\n\nclass LadderFilterBase\n{\npub"
},
{
"path": "lib/MoogLadders/src/MicrotrackerModel.h",
"chars": 1462,
"preview": "// Based on an implementation by Magnus Jonsson\n// https://github.com/magnusjonsson/microtracker (unlicense)\n\n#pragma on"
},
{
"path": "lib/MoogLadders/src/MusicDSPModel.h",
"chars": 1778,
"preview": "// This file is unlicensed and uncopyright as found at:\n// http://www.musicdsp.org/showone.php?id=24\n// Considering how "
},
{
"path": "lib/MoogLadders/src/NoiseGenerator.h",
"chars": 1648,
"preview": "#pragma once\n\n#ifndef NOISE_GENERATOR_H\n#define NOISE_GENERATOR_H\n\n#include <vector>\n#include <stdint.h>\n#include <excep"
},
{
"path": "lib/MoogLadders/src/OberheimVariationModel.h",
"chars": 3553,
"preview": "// See: http://www.willpirkle.com/forum/licensing-and-book-code/licensing-and-using-book-code/\n// The license is \"You ma"
},
{
"path": "lib/MoogLadders/src/RKSimulationModel.h",
"chars": 4619,
"preview": "/*\nCopyright (c) 2015, Miller Puckette. All rights reserved.\n\nRedistribution and use in source and binary forms, with or"
},
{
"path": "lib/MoogLadders/src/SimplifiedModel.h",
"chars": 4026,
"preview": "/* -------------------------------------------------------------------------\n * This source code is provided without any"
},
{
"path": "lib/MoogLadders/src/StilsonModel.h",
"chars": 4974,
"preview": "// Copyright (c) 2003, David Lowenfels\n// Released as the moog~ pd extern.\n\n// This code is Unlicensed (i.e. public doma"
},
{
"path": "lib/MoogLadders/src/Util.h",
"chars": 2794,
"preview": "#pragma once\n\n#ifndef MOOG_UTIL_H\n#define MOOG_UTIL_H\n\n#include <cmath>\n#include <stdint.h>\n\n#define MOOG_E 2.71"
},
{
"path": "lib/SAM/README.md",
"chars": 7105,
"preview": "https://github.com/s-macke/SAM\n\nSAM\n===\n\nSoftware Automatic Mouth - Tiny Speech Synthesizer \n\n\nWhat is SAM?\n============"
},
{
"path": "lib/SAM/ReciterTabs.h",
"chars": 29667,
"preview": "#ifndef RECITERTABS_H\n#define RECITERTABS_H\n\n//some flags\nconst unsigned char tab36376[] =\n{\n 0, 0, 0, 0, 0, 0, 0, 0,"
},
{
"path": "lib/SAM/RenderTabs.h",
"chars": 18786,
"preview": "#ifndef RENDERTABS_H\n#define RENDERTABS_H\n\nconst unsigned char tab48426[5] = { 0x18, 0x1A, 0x17, 0x17, 0x17 };\n\nconst un"
},
{
"path": "lib/SAM/SamTabs.h",
"chars": 5806,
"preview": "#ifndef SAMTABS_H\n#define SAMTABS_H\n\n//tab40672\nconst unsigned char stressInputTable[] =\n{\n '*', '1', '2', '3', '4', "
},
{
"path": "lib/SAM/debug.c",
"chars": 2055,
"preview": "#include<stdio.h>\n\nextern const unsigned char signInputTable1[];\nextern const unsigned char signInputTable2[];\n\nvoid Pri"
},
{
"path": "lib/SAM/debug.h",
"chars": 376,
"preview": "#ifndef DEBUG_H\n#define DEBUG_H\n\nvoid PrintPhonemes(unsigned char *phonemeindex, unsigned char *phonemeLength, unsigned "
},
{
"path": "lib/SAM/reciter.c",
"chars": 10097,
"preview": "#include <stdio.h>\n#include <string.h>\n#include \"reciter.h\"\n#include \"ReciterTabs.h\"\n#include \"debug.h\"\n\nextern unsigned"
},
{
"path": "lib/SAM/reciter.h",
"chars": 137,
"preview": "#ifndef RECITER_C\n#define RECITER_C\n\n//int TextToPhonemes(char *input, char *output);\n\nint TextToPhonemes(unsigned char "
},
{
"path": "lib/SAM/render.c",
"chars": 31593,
"preview": "#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include \"render.h\"\n#include \"RenderTabs.h\"\n\n#include \"debug"
},
{
"path": "lib/SAM/render.h",
"chars": 122,
"preview": "#ifndef RENDER_H\n#define RENDER_H\n\nvoid Render();\nvoid SetMouthThroat(unsigned char mouth, unsigned char throat);\n\n#endi"
},
{
"path": "lib/SAM/sam.c",
"chars": 40846,
"preview": "#include <stdio.h>\n#include <string.h>\n#include <stdlib.h>\n#include \"debug.h\"\n#include \"sam.h\"\n#include \"render.h\"\n#incl"
},
{
"path": "lib/SAM/sam.h",
"chars": 1416,
"preview": "#ifndef SAM_H\n#define SAM_H\n\nvoid SetInput(char *_input);\nvoid SetSpeed(unsigned char _speed);\nvoid SetPitch(unsigned ch"
},
{
"path": "lib/bbd/LICENSE",
"chars": 1338,
"preview": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or"
},
{
"path": "lib/bbd/README.md",
"chars": 308,
"preview": "# https://github.com/jpcima/bbd-delay-experimental\nTesting grounds for newer BBD delay implementation\n\n## Reference\n\n- H"
},
{
"path": "lib/bbd/bbd_filter.cc",
"chars": 2850,
"preview": "#include \"bbd_filter.h\"\n#include <vector>\n#include <algorithm>\n#include <cmath>\n#include <cassert>\n\n#ifdef M_PI\ncdouble "
},
{
"path": "lib/bbd/bbd_filter.h",
"chars": 1136,
"preview": "#pragma once\n#include <memory>\n#include <complex>\ntypedef std::complex<float> cdouble;\n\nenum class BBD_Filter_Kind {\n "
},
{
"path": "lib/bbd/bbd_line.cc",
"chars": 3131,
"preview": "#include \"bbd_line.h\"\n#include <algorithm>\n#include <cassert>\n\nvoid BBD_Line::setup(unsigned ns, const BBD_Filter_Coef &"
},
{
"path": "lib/bbd/bbd_line.h",
"chars": 3063,
"preview": "#pragma once\n#include \"bbd_filter.h\"\n#include <algorithm>\n#include <vector>\n#include <memory>\n#include <complex>\n\nclass "
},
{
"path": "lib/braids/README.md",
"chars": 8442,
"preview": "# Synthesis Models\n\n## Classic Analog Waveforms\n\n| # | Model | Description | Timbre "
},
{
"path": "lib/braids/analog_oscillator.cc",
"chars": 16687,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/analog_oscillator.h",
"chars": 4334,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/chords_stack.cc",
"chars": 15872,
"preview": "//https://github.com/boourns/eurorack/blob/master/braids/stack.cc\n\n#include \"braids/digital_oscillator.h\"\n\n#include <alg"
},
{
"path": "lib/braids/digital_oscillator.cc",
"chars": 82097,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/digital_oscillator.h",
"chars": 10569,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/envelope.h",
"chars": 3149,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/excitation.h",
"chars": 2338,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/macro_oscillator.cc",
"chars": 14346,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/macro_oscillator.h",
"chars": 3634,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/parameter_interpolation.h",
"chars": 4421,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/quantizer.cc",
"chars": 3770,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/quantizer.h",
"chars": 2310,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/quantizer_scales.h",
"chars": 6158,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/resources.cc",
"chars": 389190,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/resources.h",
"chars": 6985,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/settings.cc",
"chars": 8009,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/settings.h",
"chars": 10174,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/svf.h",
"chars": 3119,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/braids/vco_jitter_source.h",
"chars": 2636,
"preview": "// Copyright 2012 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/claps/cp808.h",
"chars": 224012,
"preview": "const uint8_t FLASHMEM cp808_raw[] = {\n 0xb9, 0xff, 0xb5, 0xff, 0x05, 0x00, 0x05, 0x00, 0x88, 0x00, 0x15, 0x00,\n 0xc6,"
},
{
"path": "lib/claps/cp909.h",
"chars": 242733,
"preview": "const uint8_t FLASHMEM cp909_raw[] = {\n 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xa8, 0xff, 0x18, 0x00, 0x8f, 0xff,\n 0x37,"
},
{
"path": "lib/clouds/dsp/fx/diffuser.h",
"chars": 3321,
"preview": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/clouds/dsp/fx/fx_engine.h",
"chars": 7885,
"preview": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/clouds/dsp/fx/pitch_shifter.h",
"chars": 3258,
"preview": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/clouds/dsp/fx/reverb.h",
"chars": 5068,
"preview": "// Copyright 2014 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/drumsynth/drumsynth.cpp",
"chars": 19612,
"preview": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of"
},
{
"path": "lib/drumsynth/drumsynth.h",
"chars": 3388,
"preview": "// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free of"
},
{
"path": "lib/drumsynth/drumsynth_claps.h",
"chars": 64833,
"preview": "#include <inttypes.h>\n#ifndef FLASHMEM\n#include \"pgmspace.h\"\n#endif\nconst uint8_t drum_synth_claps[] FLASHMEM = {\n\t0xa, "
},
{
"path": "lib/faust/build.sh",
"chars": 53,
"preview": "\n\nfor f in *.dsp; do\nfaust ./$f -lang c > ./$f.h\ndone"
},
{
"path": "lib/faust/djembe.dsp",
"chars": 353,
"preview": "//faust ./djembe.dsp -cn djembe > ./djembe.hxx\n\nimport(\"stdfaust.lib\");\n\nfreq = hslider(\"Freq\",0.5,0,1000,0.01):si.smoo;"
},
{
"path": "lib/faust/djembe.dsp.h",
"chars": 21847,
"preview": "/* ------------------------------------------------------------\nname: \"djembe\"\nCode generated with Faust 2.37.3 (https:/"
},
{
"path": "lib/faust/rev_dattorro.dsp",
"chars": 563,
"preview": "//faust ./rev_dattorro.dsp -cn rev_dattorro > ./rev_dattorro.hxx\n\nimport(\"stdfaust.lib\");\n\ndw = hslider(\"[0]D/W\",0.5,0,1"
},
{
"path": "lib/faust/rev_dattorro.dsp.h",
"chars": 14092,
"preview": "/* ------------------------------------------------------------\nname: \"rev_dattorro\"\nCode generated with Faust 2.37.3 (h"
},
{
"path": "lib/faust/ui.hxx",
"chars": 1540,
"preview": "#include <math.h>\n\nstruct MetaGlue\n{\n const char *metaInterface;\n void declare(const char *ui, const char *key, co"
},
{
"path": "lib/fft/fft4g.c",
"chars": 38144,
"preview": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modi"
},
{
"path": "lib/fft/fft4g.h",
"chars": 492,
"preview": "/*\n * http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html\n * Copyright Takuya OOURA, 1996-2001\n *\n * You may use, copy, modi"
},
{
"path": "lib/fv1/README.md",
"chars": 1235,
"preview": "# FV-1.emu\nThe [Spin Semi FV-1 DSP chip](http://www.spinsemi.com/products.html) emulator.\n\n#### HowTo | Knowledge\n\n* [DS"
},
{
"path": "lib/fv1/factory.json",
"chars": 458,
"preview": "[\n {\n \"name\": \"FV1/Gated-Reverb\",\n \"pot0\": \"PreD\",\n \"pot1\": \"G-Time\",\n \"pot2\": \"Damp\",\n "
},
{
"path": "lib/fv1/spn/OEM1_4.spn",
"chars": 3458,
"preview": ";OEM1_4 Gated Reverb\r\n\r\n;pot0 = gate time\r\n;pot1 = predelay\r\n;pot2 = damping\r\n\r\n;gated reverb by FIR technique. Good for"
},
{
"path": "lib/fv1/spn/dance_ir_h_l.spn",
"chars": 4195,
"preview": ";dance patchfor disco mixers: \r\n;pot1 = Reverb to infinite RT, scales in and out levels\r\n;pot2 = High pass filter (2 pol"
},
{
"path": "lib/marbles/note_filter.h",
"chars": 2598,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/ramp.h",
"chars": 1604,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/ramp_divider.h",
"chars": 3133,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/ramp_extractor.cc",
"chars": 11326,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/ramp_extractor.h",
"chars": 3883,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/ramp_generator.h",
"chars": 1944,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/ramp/slave_ramp.h",
"chars": 3785,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/discrete_distribution_quantizer.cc",
"chars": 3933,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/discrete_distribution_quantizer.h",
"chars": 2446,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/distributions.h",
"chars": 5323,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/lag_processor.cc",
"chars": 3134,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/lag_processor.h",
"chars": 1949,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/output_channel.cc",
"chars": 4912,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/output_channel.h",
"chars": 3605,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/quantizer.cc",
"chars": 4300,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/quantizer.h",
"chars": 3506,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/random_generator.h",
"chars": 2092,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/random_sequence.h",
"chars": 7797,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/random_stream.h",
"chars": 2544,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/t_generator.cc",
"chars": 13191,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/t_generator.h",
"chars": 5645,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/x_y_generator.cc",
"chars": 6593,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/random/x_y_generator.h",
"chars": 3576,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/resources.cc",
"chars": 340785,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/resources.h",
"chars": 7116,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/marbles/scale_recorder.h",
"chars": 4192,
"preview": "// Copyright 2015 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/misc/Biquad.cpp",
"chars": 5343,
"preview": "//\n// Biquad.cpp\n//\n// Created by Nigel Redmon on 11/24/12\n// EarLevel Engineering: earlevel.com\n// Copyright 2012 N"
},
{
"path": "lib/misc/Biquad.h",
"chars": 2095,
"preview": "//\n// Biquad.h\n//\n// Created by Nigel Redmon on 11/24/12\n// EarLevel Engineering: earlevel.com\n// Copyright 2012 Nig"
},
{
"path": "lib/misc/analyze_fft.hxx",
"chars": 11341,
"preview": "\n// code based on Teensy Audio analyse_fft1024.cpp\n\n#pragma once\n\n#include <arm_math.h>\n\n#ifndef FLASHMEM\n#include \"pgms"
},
{
"path": "lib/misc/cubic_spline.hxx",
"chars": 2472,
"preview": "\n/*\n * Based on: https://medium.com/@martinmikkelsen/cubic-splines-in-the-c-language-4463fe9a3a83\n */\n\n#include <stdio.h"
},
{
"path": "lib/misc/dspinst.h",
"chars": 13229,
"preview": "/* Audio Library for Teensy 3.X\n * Copyright (c) 2014, Paul Stoffregen, paul@pjrc.com\n *\n * Development of this audio li"
},
{
"path": "lib/misc/euclidean.h",
"chars": 3480,
"preview": "\n// Copyright (C)2023 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free o"
},
{
"path": "lib/misc/nes_noise.hxx",
"chars": 3327,
"preview": "\n// Copyright (C)2023 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free o"
},
{
"path": "lib/misc/noise.hxx",
"chars": 2993,
"preview": "\n// Copyright (C)2021 - Eduard Heidt\n//\n// Author: Eduard Heidt (eh2k@gmx.de)\n//\n// Permission is hereby granted, free o"
},
{
"path": "lib/misc/patterns_303.h",
"chars": 22379,
"preview": "#include <inttypes.h>\n\nconstexpr uint8_t REST = 0x0;\n\n/* between 0x0 and 0xA, the VCO voltage pins, so these notes arent"
},
{
"path": "lib/msfa/aligned_buf.h",
"chars": 1112,
"preview": "/*\r\n * Copyright 2013 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/controllers.h",
"chars": 2959,
"preview": "/*\n Copyright 2013 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use "
},
{
"path": "lib/msfa/doc/origin.url",
"chars": 327,
"preview": "https://github.com/google/music-synthesizer-for-android/tree/master/app/src/main/jni\nhttps://github.com/asb2m10/dexed/tr"
},
{
"path": "lib/msfa/dx7note.cc",
"chars": 11744,
"preview": "/*\n Copyright 2016-2017 Pascal Gauthier.\n Copyright 2012 Google Inc.\n\n Licensed under the Apache License, Version "
},
{
"path": "lib/msfa/dx7note.h",
"chars": 2199,
"preview": "/*\n Copyright 2016-2017 Pascal Gauthier.\n Copyright 2012 Google Inc.\n\n Licensed under the Apache License, Version "
},
{
"path": "lib/msfa/env.cc",
"chars": 6085,
"preview": "/*\r\n * Copyright 2017 Pascal Gauthier.\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version"
},
{
"path": "lib/msfa/env.h",
"chars": 2303,
"preview": "/*\n * Copyright 2017 Pascal Gauthier. \n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2"
},
{
"path": "lib/msfa/exp2.cc",
"chars": 40731,
"preview": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/exp2.h",
"chars": 2092,
"preview": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/fm_core.cc",
"chars": 5426,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/fm_core.h",
"chars": 1403,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may no"
},
{
"path": "lib/msfa/fm_op_kernel.cc",
"chars": 9531,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may no"
},
{
"path": "lib/msfa/fm_op_kernel.h",
"chars": 1692,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/freqlut.cc",
"chars": 12268,
"preview": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/freqlut.h",
"chars": 723,
"preview": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/lfo.cc",
"chars": 2734,
"preview": "/*\r\n * Copyright 2013 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may no"
},
{
"path": "lib/msfa/lfo.h",
"chars": 1140,
"preview": "/*\r\n * Copyright 2013 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/midinotes.h",
"chars": 2032,
"preview": "/*************************************************\n MIDI note values\n ************************************************"
},
{
"path": "lib/msfa/module.h",
"chars": 921,
"preview": "/*\n * Copyright 2012 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/patch.cc",
"chars": 2728,
"preview": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/patch.h",
"chars": 766,
"preview": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/pitchenv.cc",
"chars": 2801,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/pitchenv.h",
"chars": 1306,
"preview": "/*\n * Copyright 2013 Google Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "lib/msfa/porta.cc",
"chars": 1140,
"preview": "/*\n Copyright 2019 Jean Pierre Cimalando.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you m"
},
{
"path": "lib/msfa/porta.h",
"chars": 798,
"preview": "/*\n Copyright 2019 Jean Pierre Cimalando.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you m"
},
{
"path": "lib/msfa/sin.cc",
"chars": 23013,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/sin.h",
"chars": 1795,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/msfa/synth.h",
"chars": 1711,
"preview": "/*\r\n * Copyright 2012 Google Inc.\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may n"
},
{
"path": "lib/open303/src/GlobalDefinitions.h",
"chars": 2811,
"preview": "#ifndef GlobalDefinitions_h\r\n#define GlobalDefinitions_h\r\n\r\n#include <float.h>\r\n#include <inttypes.h>\r\n\r\n#define INLINE "
},
{
"path": "lib/open303/src/GlobalFunctions.cpp",
"chars": 34,
"preview": "#include \"GlobalFunctions.h\"\r\n\r\n\r\n"
},
{
"path": "lib/open303/src/GlobalFunctions.h",
"chars": 14376,
"preview": "#ifndef GlobalFunctions_h\r\n#define GlobalFunctions_h\r\n\r\n#include <math.h>\r\n#include <stdlib.h>\r\n#include \"GlobalDefiniti"
},
{
"path": "lib/open303/src/rosic_AnalogEnvelope.cpp",
"chars": 4583,
"preview": "#include \"rosic_AnalogEnvelope.h\"\r\nusing namespace rosic;\r\n\r\n//---------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_AnalogEnvelope.h",
"chars": 9584,
"preview": "#ifndef rosic_AnalogEnvelope_h\r\n#define rosic_AnalogEnvelope_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r"
},
{
"path": "lib/open303/src/rosic_BiquadFilter.cpp",
"chars": 4695,
"preview": "#include \"rosic_BiquadFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-----------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_BiquadFilter.h",
"chars": 3214,
"preview": "#ifndef rosic_BiquadFilter_h\r\n#define rosic_BiquadFilter_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r\nn"
},
{
"path": "lib/open303/src/rosic_BlendOscillator.cpp",
"chars": 1962,
"preview": "#include \"rosic_BlendOscillator.h\"\r\nusing namespace rosic;\r\n\r\n//--------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_BlendOscillator.h",
"chars": 5971,
"preview": "#ifndef rosic_BlendOscillator_h\r\n#define rosic_BlendOscillator_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_NumberManipulat"
},
{
"path": "lib/open303/src/rosic_DecayEnvelope.cpp",
"chars": 1682,
"preview": "#include \"rosic_DecayEnvelope.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_DecayEnvelope.h",
"chars": 3156,
"preview": "#ifndef rosic_DecayEnvelope_h\r\n#define rosic_DecayEnvelope_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r"
},
{
"path": "lib/open303/src/rosic_EllipticQuarterBandFilter.cpp",
"chars": 503,
"preview": "#include \"rosic_EllipticQuarterBandFilter.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------"
},
{
"path": "lib/open303/src/rosic_EllipticQuarterBandFilter.h",
"chars": 3486,
"preview": "#ifndef rosic_EllipticQuarterBandFilter_h\r\n#define rosic_EllipticQuarterBandFilter_h\r\n\r\n#include <string.h> // for memmo"
},
{
"path": "lib/open303/src/rosic_FunctionTemplates.cpp",
"chars": 82,
"preview": "#include \"rosic_FunctionTemplates.h\"\r\nusing namespace rosic;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
},
{
"path": "lib/open303/src/rosic_FunctionTemplates.h",
"chars": 11492,
"preview": "#ifndef rosic_FunctionTemplates_h\r\n#define rosic_FunctionTemplates_h\r\n\r\n// rosic includes:\r\n//#include \"GlobalDefinition"
},
{
"path": "lib/open303/src/rosic_LeakyIntegrator.cpp",
"chars": 2481,
"preview": "#include \"rosic_LeakyIntegrator.h\"\r\nusing namespace rosic;\r\n\r\n//--------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_LeakyIntegrator.h",
"chars": 2696,
"preview": "#ifndef rosic_LeakyIntegrator_h\r\n#define rosic_LeakyIntegrator_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h"
},
{
"path": "lib/open303/src/rosic_MidiNoteEvent.cpp",
"chars": 1273,
"preview": "#include \"rosic_MidiNoteEvent.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_MidiNoteEvent.h",
"chars": 2387,
"preview": "#ifndef rosic_MidiNoteEvent_h\r\n#define rosic_MidiNoteEvent_h\r\n\r\n#include \"GlobalDefinitions.h\"\r\n\r\nnamespace rosic\r\n{\r\n\r\n"
},
{
"path": "lib/open303/src/rosic_NumberManipulations.cpp",
"chars": 74,
"preview": "#include \"rosic_NumberManipulations.h\"\r\nusing namespace rosic;\r\n\r\n\r\n\r\n\r\n\r\n"
},
{
"path": "lib/open303/src/rosic_NumberManipulations.h",
"chars": 2610,
"preview": "#ifndef rosic_NumberManipulations_h\r\n#define rosic_NumberManipulations_h\r\n\r\n// rosic includes:\r\n#include \"GlobalDefiniti"
},
{
"path": "lib/open303/src/rosic_OnePoleFilter.cpp",
"chars": 3388,
"preview": "#include \"rosic_OnePoleFilter.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_OnePoleFilter.h",
"chars": 3731,
"preview": "#ifndef rosic_OnePoleFilter_h\r\n#define rosic_OnePoleFilter_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_RealFunctions.h\"\r\n\r"
},
{
"path": "lib/open303/src/rosic_Open303.cpp",
"chars": 9445,
"preview": "#include \"rosic_Open303.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_Open303.h",
"chars": 16529,
"preview": "#ifndef rosic_Open303_h\r\n#define rosic_Open303_h\r\n\r\n#include \"rosic_MidiNoteEvent.h\"\r\n#include \"rosic_BlendOscillator.h\""
},
{
"path": "lib/open303/src/rosic_RealFunctions.cpp",
"chars": 60,
"preview": "#include \"rosic_RealFunctions.h\"\r\nusing namespace rosic;\r\n\r\n"
},
{
"path": "lib/open303/src/rosic_RealFunctions.h",
"chars": 5491,
"preview": "#ifndef rosic_RealFunctions_h\r\n#define rosic_RealFunctions_h\r\n\r\n// standard library includes:\r\n#include <math.h>\r\n#inclu"
},
{
"path": "lib/open303/src/rosic_TeeBeeFilter.cpp",
"chars": 2999,
"preview": "#include \"rosic_TeeBeeFilter.h\"\r\nusing namespace rosic;\r\n\r\n//-----------------------------------------------------------"
},
{
"path": "lib/open303/src/rosic_TeeBeeFilter.h",
"chars": 11548,
"preview": "#ifndef rosic_TeeBeeFilter_h\r\n#define rosic_TeeBeeFilter_h\r\n\r\n// standard-library includes:\r\n#include <stdlib.h> "
},
{
"path": "lib/open303/src/sequencer/rosic_AcidPattern.cpp",
"chars": 1259,
"preview": "#include \"rosic_AcidPattern.h\"\r\nusing namespace rosic;\r\n\r\nAcidPattern::AcidPattern()\r\n{\r\n numSteps = 16;\r\n stepLengt"
},
{
"path": "lib/open303/src/sequencer/rosic_AcidPattern.h",
"chars": 4511,
"preview": "#ifndef rosic_AcidPattern_h\r\n#define rosic_AcidPattern_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_RealFunctions.h\"\r\n#i"
},
{
"path": "lib/open303/src/sequencer/rosic_AcidSequencer.cpp",
"chars": 2457,
"preview": "#include \"rosic_AcidSequencer.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------"
},
{
"path": "lib/open303/src/sequencer/rosic_AcidSequencer.h",
"chars": 9051,
"preview": "#ifndef rosic_AcidSequencer_h\r\n#define rosic_AcidSequencer_h\r\n\r\n// rosic-indcludes:\r\n#include \"rosic_AcidPattern.h\"\r\n\r\nn"
},
{
"path": "lib/open303/src/wavetable_gen/fft4g.h",
"chars": 37937,
"preview": "/*\nFast Fourier/Cosine/Sine Transform\n dimension :one\n data length :power of 2\n decimation :frequency\n ra"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_Complex.cpp",
"chars": 1874,
"preview": "#include \"rosic_Complex.h\"\r\nusing namespace rosic;\r\n\r\n//----------------------------------------------------------------"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_Complex.h",
"chars": 7704,
"preview": "#ifndef rosic_Complex_h\r\n#define rosic_Complex_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_RealFunctions.h\"\r\n\r\nnamespac"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.cpp",
"chars": 9741,
"preview": "#include \"rosic_FourierTransformerRadix2.h\"\r\nnamespace rosic\r\n{\r\n#include \"fft4g.h\"\r\n}\r\n\r\nusing namespace rosic;\r\n\r\n//--"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_FourierTransformerRadix2.h",
"chars": 7802,
"preview": "#ifndef rosic_FourierTransformerRadix2_h\r\n#define rosic_FourierTransformerRadix2_h\r\n\r\n// standard includes:\r\n#include <s"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_MipMappedWaveTable.cpp",
"chars": 8638,
"preview": "#include \"rosic_MipMappedWaveTable.h\"\r\n#include <algorithm>\r\nusing namespace rosic;\r\n\r\nMipMappedWaveTable::MipMappedWave"
},
{
"path": "lib/open303/src/wavetable_gen/rosic_MipMappedWaveTable.h",
"chars": 9337,
"preview": "#ifndef rosic_MipMappedWaveTable_h\r\n#define rosic_MipMappedWaveTable_h\r\n\r\n// rosic-indcludes:\r\n#include \"../rosic_Functi"
},
{
"path": "lib/peaks/drums/bass_drum.cc",
"chars": 2818,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/bass_drum.h",
"chars": 3016,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/excitation.h",
"chars": 2365,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/fm_drum.cc",
"chars": 6263,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/fm_drum.h",
"chars": 3465,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/high_hat.cc",
"chars": 3259,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/high_hat.h",
"chars": 2044,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/snare_drum.cc",
"chars": 3336,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/snare_drum.h",
"chars": 3218,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
},
{
"path": "lib/peaks/drums/svf.h",
"chars": 3105,
"preview": "// Copyright 2013 Emilie Gillet.\n//\n// Author: Emilie Gillet (emilie.o.gillet@gmail.com)\n//\n// Permission is hereby gran"
}
]
// ... and 265 more files (download for full content)
About this extraction
This page contains the full source code of the eh2k/squares-and-circles GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 465 files (4.4 MB), approximately 1.2M tokens, and a symbol index with 918 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.