Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 5.42 KB

README.md

File metadata and controls

54 lines (34 loc) · 5.42 KB

synth_jxrs

A screenshot of the application, a synthesizer with several knobs

synth_jxrs is a software audio synthesizer for sound design and music, with basic MIDI controller support and FM synthesis. At the moment, it's a standalone application rather than a plugin and isn't very useful in combination with other music production software, although I do plan to look into VST development and either turn this project into a VST plugin or use what I've learned with this project to make one from scratch.

This application is a personal project I've been working on in my free time, as an educational project. My college education was in music and music technology, and I've loved synthesizers and electronic music for years, so I've always wanted to make something of my own. Digital Signal Processing is complicated but very interesting. In the future, I plan to do some more research to understand audio filter design to add a customizable filter to the synthesizer for subtractive sound shaping, as well as the related topic of convolution in order to smooth out audio artifacts generated by the wavetable lookup method used for oscillation.

Current features

  • Four oscillators generate five types of soundwaves: sine, triangle, square, sawtooth, and noise. Oscillation is done via a wavetable lookup method, where arrays of pregenerated amplitude values for each waveshape are calculated at startup and then referenced at different "phase" speeds based on frequency needed. This introduces some noise to the signal, which I hope to fix in the future with some sort of convolution algorithm.
  • MIDI support: currently, the application will listen to MIDI input from the first input port it detects. The user can retry the MIDI connection at any point if it fails. Hopefully this will soon be improved so the user can choose from available MIDI ports. MIDI input only detects note-on and note-off currently, and won't do anything with information from pitch bend or modulation wheels.
  • Frequency modulation: each oscillator can output its signal either to the master amplifier or to one other oscillator in order to have its amplitude modulate the target oscillator's frequency.

Using the application

Synthesizers can be loud. Please be cautious with gain (volume) knobs, and be aware that other soundwaves get much, much louder than sine waves. I recommend setting gain knobs generously very low before enabling any bypassed oscillators or changing the waveform from sine, in order to protect your ears.

If you're trying to test the application without a MIDI controller, ensure all oscillators you're using as well as the amplifier are set to "Constant" mode.

Navigating the oscillator:

A screenshot of one of the synthesizer's oscillators with numbered labels
  1. Bypass: When this switch is off (to the left), the oscillator is not generating sound (it is bypassed). Click on the switch to enable the oscillator.
  2. Waveform: Select the shape of the signal generated by this oscillator. Waveforms other than sine can be quite loud.
  3. Frequency/Pitch: This panel has two modes:
    • MIDI: The pitch of this oscillator is controlled by MIDI input. The "Pitch" knob can detune the oscillator by up to 12 semitones (notes) up or down, while the "Fine" knob can detune the oscillator on a more detailed level, up to 50 cents up or down.
    • CONSTANT: The pitch of this oscillator is a constant value. This tab only has one knob, to set the frequency.
  4. Gain: The volume gain for this oscillator, in decibels. Currently ranges from -60 to 0.
  5. Output: The output target for this oscillator. Any oscillator that should produce sound directly should output to "Amp". Otherwise, it can output to another oscillator to modulate that oscillator's frequency. Selecting the oscillator's own number is the same as directing it to "Amp".
  6. Mod: The FM range of this oscillator. If this value is 100, then FM inputs can modulate this oscillator's frequency by 100Hz up or down.

Navigating the amplifier:

A screenshot of the synthesizer's amplifier with numbered labels
  1. Gain: The overall gain for the whole application, from -60 to 0 dB.
  2. Mode: MIDI mode allows the duration and timing of sound to be tied to MIDI signals, while Constant mode lets the audio play indefinitely.
  3. Attack: The duration (in seconds) it takes a note to reach its peak amplitude after the note starts.
  4. Decay: The duration (in seconds) it takes a note to decay to its sustain amplitude after the attack.
  5. Sustain: The amplitude a note "sustains" at for as long as it's held. 0 is nothing, and 1 is the peak/max amplitude of the sound.
  6. Release: The duration (in seconds) it takes the sound to fade to nothing after the note ends.
  7. Reset MIDI: This button tells the application to restart the MIDI listener in order to retry connecting to a MIDI device.

Building the application

The application doesn't require any special settings. Just run cargo build or cargo run with a compatible version of Cargo/Rust installed.


'Made with Slint' logo