====== jsfxr: synthesizing sounds in the browser ======
Access this browser-based synthesizer here: https://sfxr.me/
Sfxr was programmed by [[http://www.drpetter.se/project_sfxr.html|Tomas Pettersson]], and ported to JavaScript by [[https://github.com/grumdrig|Eric Fredricksen]]. Forked and improved by [[https://github.com/chr15m|Chris McCormick]]
First point: make sure that you select 44k and 16 bit in the column on the right for maximum sound quality (unless you are deliberately going for the old-school vibe).
Second point: this synthesizer doesn't protect you. The audio it outputs may contain clicks. Be SURE to edit out any clicks, and beware of clipping as well.
The concept is to pass the output of a basic oscillator through an envelope and a few effects to generate a sound. Every time you change a parameter, the sound will be played so that you can audition it.
Parameters and functions provided in jsfxr:
- Base waveform
- Envelope
- Frequency
- Vibrato
- Arpeggiation (second pitch)
- Duty cycle
- Retrigger
- Flanger
- Low-pass filter
- High-pass filter
- serialize/deserialize (get settings as text, load settings from text)
- Buttons (mutate, random, etc.)
===== Generator column (on the left) =====
The random button randomizes all of the parameter settings, likely creating a totally new sound.
This column contains buttons for presets, which load parameter settings for sounds that correspond to the labels. After loading them, you can adjust the parameters to customize the sound.
The mutate button slightly changes all of the parameter settings, creating a variation of the previous settings.
===== manual settings =====
This section of the interface allows you to really customize the sound and control the parameters of synthesis.
===== serialize/deserialize =====
Use these to get the settings as text. Once they are there, you can modify them. This is good if you want to put in a specific value. Then you can load settings from text using the deserialize button. One way to use this is to make a sound, serialize it, and send it to your friend. Then your friend can paste it in and deserialize it to get the same sound as you. In this way, you can work on the same sound or variations together with a friend remotely.
===== base waveform =====
The base waveform at the top of the interface describes what initial oscillator will be used. This decides the original characteristic of the sound.
- square https://en.wikipedia.org/wiki/Square_wave
- sawtooth https://en.wikipedia.org/wiki/Sawtooth_wave
- sine https://en.wikipedia.org/wiki/Sine_wave
- noise https://en.wikipedia.org/wiki/White_noise
===== Envelope =====
[[envelopes|We've discussed envelope here]]. This envelope control doesn't have a "release" parameter, but it has an extra "sustain punch" parameter.
===== Frequency =====
There are four frequency parameters:
- start frequency
- min freq. cutoff
- slide
- delta slide
===== vibrato =====
Vibrato is a kind of wobble to the frequency. https://en.wikipedia.org/wiki/Vibrato
Vibrato has two parameters, and you'll need to raise both to hear this effect:
- depth
- speed
===== arpeggiation =====
Arpeggiation repeats the sound at a new frequency, delayed in time. Most musical arpeggiators will repeat many times, but this one only adds one repeat.
Arpeggiation has two parameters:
- frequency mult
- change speed
===== duty cycle =====
[[https://en.wikipedia.org/wiki/Duty_cycle|Duty cycle]] refers to how wide the high-amplitude portion of a period of the wave is. Notice that duty cycle is grayed-out for sine and noise waveforms. You notice its effect more on the square wave. Duty cycle has two parameters:
- duty cycle as a percentage; you may feel that the higher the percentage, the "fatter" the sound
- sweep as a percentage per second; the same seems to be true here: the higher the percentage, the fatter the sound. the lower the percentage, the more high-end details emerge.
===== Retrigger =====
Retrigger is a buggy one, I think. It's supposed to make the sound repeat many times quickly. I could only get it to work from around 10.8 Hz and above. Retrigger has only one parameter:
- rate, expressed in Hz; the higher the rate, the more quickly it retriggers
===== flanger =====
A [[https://en.wikipedia.org/wiki/Flanging|flanger]] is an effect that sounds like sweeping or swishing, and it's produced by using a sound and a copy of the sound.
Flanger has two parameters:
- offset: the bigger the offset, the more pronounced the effect becomes.
- sweep: introduces change over time, so that you get that "jet crossing the sky" effect particularly at around 4 msec/sec.
===== low-pass filter =====
A low-pass filter cuts high frequencies. The low-pass filter has three parameters:
- cutoff frequency: sounds below this frequency are preserved; sounds above it are reduced
- cutoff sweep: creates an envelope on the cutoff frequency, reducing it over time. The time specified is how long it takes the cutoff frequency to fall to its minimum value. Keep in mind the amplitude envelope; long values here may not be audible if the amplitude envelope is short.
- resonance: how strongly the frequency range near the cutoff frequency is boosted
===== high-pass filter =====
A high-pass filter cuts low frequencies. The high-pass filter has two parameters:
- cutoff frequency: sounds above this frequency are preserved; sounds below it are reduced
- cutoff sweep: creates an envelope on the cutoff frequency, reducing it over time. The time specified is how long it takes the cutoff frequency to fall to its minimum value. Keep in mind the amplitude envelope; long values here may not be audible if the amplitude envelope is short.