An open API service indexing awesome lists of open source software.

https://github.com/blackboxaudio/neuron

Collection of C++ audio DSP components ⚡
https://github.com/blackboxaudio/neuron

audio-development audio-processing audio-programming bbx-audio blackboxaudio cpp cpp-library digital-signal-processing dsp dsp-library

Last synced: 3 months ago
JSON representation

Collection of C++ audio DSP components ⚡

Awesome Lists containing this project

README

          

# `neuron`

[![Build](https://github.com/blackboxaudio/neuron/actions/workflows/ci.build.yml/badge.svg)](https://github.com/blackboxaudio/neuron/actions/workflows/ci.build.yml)
[![Test](https://github.com/blackboxaudio/neuron/actions/workflows/ci.test.yml/badge.svg)](https://github.com/blackboxaudio/neuron/actions/workflows/ci.test.yml)
[![neuron: v0.1.0](https://img.shields.io/badge/Version-v0.1.0-blue.svg)](https://github.com/blackboxaudio/neuron)
[![License](https://img.shields.io/badge/License-MIT-yellow)](https://github.com/blackboxaudio/neuron/blob/develop/LICENSE)

> Collection of C++ audio DSP components ⚡

## Overview

`neuron` is an open-source DSP (Digital Signal Processing) library that provides a wide-ranging suite of components for building audio software.

It can be used for a variety of applications, including:

- [JUCE](https://juce.com/) audio plugins
- Embedded hardware such as the [Electrosmith Daisy](https://electro-smith.com/collections/daisy) (see [Flora](https://github.com/blackboxaudio/flora))
- [VCV Rack](https://vcvrack.com/) modules

## Features

`neuron` currently lacks wide support for features because it is in early stages, however the following are in its immediate roadmap:

- Dynamics
- Compressor
- Limiter
- Effects
- Chorus
- Delay
- Echo
- Flanger
- Phaser
- Reverb
- Saturation
- Wavefolding
- Filters
- LP/HP/BP Filter
- Ladder Filter
- Modulators
- ADSR Envelope Generator
- AHD Envelope Generator
- Envelope Follower
- Low-Frequency Oscillator
- Synthesis
- Amplitude Modulation
- Frequency Modulation
- Granular
- Phase Distortion
- Utilities
- Clock
- DC Block
- Delay Line
- Sampler
- Wavetable

## Getting Started

Clone this repository:
```bash
git clone https://github.com/blackboxaudio/neuron
cd neuron/
```

Build the library:
```bash
make
```

## Using the Library

```c++
#include "neuron/neuron.h"

// Create a DSP context (sample rate,
// number of channels, buffer size).
static neuron::Context context {
44100,
1,
128,
};

// Create an oscillator with an initial
// frequency of 440Hz.
static neuron::Oscillator osc(context, 440.0f);

// Write to the buffer with samples
// generated from the oscillator
for(size_t idx = 0; idx < 128; idx++) {
buffer[idx] = osc.Generate();
}
```

Enable the `NEO_PLUGIN_SUPPORT` compile option in CMake to include necessary bits for JUCE integration:

```cmake
# Set option for neuron to enable plugin support (e.g. std::atomic)
set(NEO_PLUGIN_SUPPORT ON)

...
```