Sound files
Example of a file that defines a single sound:
sounds = {
{
frequency = 500,
sustain = 0.3,
waveform = "triangle",
}
}
The following fields can be used to describe a sound:
- attack (in seconds)
- decay (in seconds)
- sustain (in seconds)
- sustainPunch (in seconds)
- amplification
- harmonics
- harmonicsFalloff
- tremoloDepth
- tremoloFrequency (in hertz)
- frequency (in hertz)
- frequencyDeltaSweep
- frequencyJump1Onset
- frequencyJump2Onset
- frequencyJump1Amount
- frequencyJump2Amount
- frequencySweep
- vibratoFrequency (in hertz)
- vibratoDepth (in hertz)
- flangerOffset
- flangerOffsetSweep
- repeatFrequency
- waveform ("sine", "triangle", "sawtooth", "square", "tangent", "whistle", "breaker", "whitenoise", "pinknoise", "brownnoise")
Creating a sound with JFXR
While it's possible to hand-craft sounds by hand-editing sound files, in practice most people use the GUI jfxr for sound creation.
After obtaining a sound you are satisfied with, you can "export" the sound by using the link to your sound generated by jfxr.
A script then transforms the resulting jfxr link (for example this link) into a table consumable by PewPew Live.
See this example.