Skip to content
/ Bragi Public

Bragi is a real-time, modular sound synthesizer written in Java.

License

Notifications You must be signed in to change notification settings

Achaaab/Bragi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bragi

Screenshot Bragi is a modular, real-time, sound synthesizer written in Java. It is still in progress and only has a rudimentary user interface. Following modules are provided:

  • LFO: Low Frequency Oscillator
  • VCO: Voltage Controlled Oscillator
  • DCG: Direct Current Generator
  • Keyboard: a basic keyboard based on computer keyboard (from F3 to E6)
  • Theremin: some kind of theremin (with just pitch and volume, not the incredible timbre of the real instrument)
  • Mp3Player: basic MP3 file player
  • WavPlayer: basic WAV file player
  • FlacPlayer: basic FLAC file player
  • WhiteNoiseGenerator: white noise generator
  • PinkNoiseGenerator: pink noise generator
  • Microphone: a module connected to your microphone
  • ADSR: envelope generator with Attack, Decay, Sustain and Release parameters
  • VCA: Voltage Controlled Amplifier
  • VCF: Voltage Controlled Filter (with low-pass or high-pass response)
  • Mixer: Mixer with two inputs controlled with gain sliders
  • Sampler: an experimentation to change the sample rate or sample size
  • Ditherer: an experimentation with dithering
  • Oscilloscope: basic oscilloscope
  • SpectrumAnalyzer: basic spectrum analyzer
  • Speaker: a module connected to your speakers

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Java 17+
  • Maven 3.6.1
  • Git 2.17.1

Installing

  • Clone the repository from GitHub:
git clone git@github.com:Achaaab/Bragi.git
  • Import the project Bragi in your IDE.
  • Run the test class com.github.achaaab.bragi.Test.

Examples

MP3Player connected to Speaker

var player = new Mp3Player(TEST_MP3_PATH);
var speaker = new Speaker();

player.connectOutputs(speaker);

// optional part: spectrogram with fancy effects
var spectrum = new SpectrumAnalyzer();
player.connect(spectrum);

Tremolo

var adsr = new ADSR();
var keyboard = new Keyboard();
var vco = new VCO();
var vcaEnvelope = new VCA("vca_envelope");
var speaker = new Speaker();
var lfo = new LFO();
var vcaTremolo = new VCA("vca_tremolo");

// main chain
keyboard.connect(vco);
vco.connect(vcaEnvelope);
vcaEnvelope.connect(vcaTremolo);
speaker.connectInputs(vcaTremolo, vcaTremolo);

// ADSR + tremolo
keyboard.getGate().connect(adsr.getGate());
adsr.connect(vcaEnvelope.getGain());
lfo.connect(vcaTremolo.getGain());

// some tuning
vco.setWaveform(SAWTOOTH_TRIANGULAR);
adsr.setAttack(1000.0);
adsr.setRelease(2.0);

// visualization
var oscilloscope = new Oscilloscope();
var spectrum = new SpectrumAnalyzer();
vcaTremolo.connect(oscilloscope, spectrum);

"Self" oscillating filter

var noise = new WhiteNoiseGenerator();
var vca = new VCA();
var filter = new LowPassVCF();
var speaker = new Speaker();

// very low noise (-200 dB) is enough to trigger "self" oscillation of filter
vca.setInitialGain(-200);

// maximum emphasis
filter.setEmphasis(1.0f);

noise.connect(vca);
vca.connect(filter);
speaker.connectInputs(filter, filter);

// visualization
var oscilloscope = new Oscilloscope();
var spectrum = new SpectrumAnalyzer();
filter.connect(oscilloscope, spectrum);

Built With

Contributing

I am not developing Bragi at this moment, but any contribution is welcome.

Authors

  • Jonathan Guéhenneux - Programmer - Achaaab

License

This project is licensed under the GNU General Public License (GPL) - see the LICENSE.md for the details.

Acknowledgments

I thank:

About

Bragi is a real-time, modular sound synthesizer written in Java.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages