GithubHelp home page GithubHelp logo

hsetlik / octane Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 339 KB

Wavetable Synthesizer plugin built on JUCE and C++

C++ 97.21% C 1.19% GLSL 0.25% Ruby 0.11% CMake 1.24%
cpp juce vst3 audio-unit plugin audio synthesizer wavetable-synthesizer

octane's Introduction

Octane

Polyphonic Wavetable Synthesizer

Octane is a powerful plugin synthesizer built with the JUCE framework. The flexibility of Octane lies in its four anti-aliasing wavetable oscillators, which support preset waveforms as well as user waveforms imported from an audio file.

Features

  • Intuituve drag-and-drop modulation routing system
  • 4 band-limited, anti-aliasing wavetable oscillators
  • 6 voices of polyphony
  • Four LFOs with customizable wave shapes

What is wavetable synthesis?

Wavetable synthesis is a type of digital audio synthesis which produces waveforms based on data stored in a 'wavetable'. A wavetable is a digital representation of a single cycle of some waveform- usually stored as a small, single-channel audio file. A wavetable oscillator works based on interpolation between sample values in the wavetable. Each call for the next sample from the oscillator will advance the point in the wavetable from which the next sample will be calculatd. The oscillator's phase within the wavetable is advanced based on the oscillator's frequency. In other words, wavetable synths work by calculating sample values based on cycling through the wavetable at the given frequency.

In practice this means that wavetable synthesizers like Octane are a great tool for creating rich synth sounds beyond the limits of other types of synthesis. This provides a world of flexibility and options for musicians and producers.

Wavetable oscillator considerations

Since wavetable synthesis works by reproducing a waveform based on interpolating between table values to reproduce a waveform at any frequency, the upper harmonics of that waveform change along with the oscillator's frequency. This is where the nature of digital audio poses an issue. At higher pitches, this means that many of the waveform's upper harmonics surpass the Nyquist frequency. The Nyquist frequency is equal to one half the oscillator's sample rate. 44.1kHz is a widely favored sample rate for this reason, the Nyquist frequency is 22.05kHz-- just outside the upper limits of human hearing. The upper harmonics above the Nyquist frequency are reproduced at a lower frequency than the fundamental thanks to the phenomenon of aliasing. At higher pitches, aliasing can result in very unpleasant distortion in the oscillator's sound.

Limiting upper harmonics

To prevent that distortion, I made use of a concept known as bandlimiting. Bandlimiting allows the upper harmonics which pass the Nyquist frequency to be removed from the signal while all others remain intact. The process of creating band-limited wavetables requires a bit of more complex math but the core concept is fairly simple.

The bandlimiting algorithm

Each oscillator has a a set of 10 wavetables; each of which has had all its harmonics above some frequency removed. The process of generating these tables is the core of the bandlimiting algorithm. Each table goes through this process with its own maximum frequecy.

  1. The original wavetable is represented as an array of complex numbers. The imaginary part of the array stores the wave data, while the real part values are all set to zero to start.
  2. The complex number arrays are put into a Fast Fourier Transform algorithm to convert the wave from the time domain to the frequency domain.
  3. The array members which represent harmonics above the wavetable's designated maximum frequency are set to zero.
  4. The complex number arrays are again put into the FFT algorithm to convert the frequency domain representation of the wave back into a discrete time representation.
  5. The maximum frequency is divided by two and the next table is created.

Based on its spectral content, each table has a designated frequency range. The function to get the next sample from the oscillator requires a frequency parameter which is needed to determine which table should be used to calculate the output sample.

octane's People

Contributors

hsetlik avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

koson sountrock

octane's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.