Game Development Reference
In-Depth Information
SOUND_JUMP
SOUND_PICKUP
SOUND_POWERUP
SOUND_RANDOM
SOUND_SHOOT
DATA
The Codea editor also allows you to fine-tune the different parameters for a sound as a Base64-
encoded string, which can be passed to a function to play sound based on the encoded characters in
the string. The custom sound is typically of type DATA followed by the string that specifies the settings.
sound(DATA, "ZbBAJgBAQEBAQEBAQEBAMqqQPXtbpz3NzMw+QABAf0BAQEBAQEBA")
Alternatively, synthesizer waveforms can be used to make sound. Following are the types of
waveforms that Codea has in-built support for:
SOUND_NOISE
SOUND_SAWTOOTH
SOUND_SINEWAVE
SOUND_SQUAREWAVE
These waveforms can be fine-tuned by passing the parameters to the sound function:
function touched(touch)
sound({
Waveform = SOUND_NOISE,
AttackTime = 1.2,
SustainTime = 1
})
end
The other settings that can be fine-tuned are
AttackTime
SustainTime
SustainPunch
DecayTime
StartFrequency
MinimumFrequency
Slide
DeltaSlide
VibratoDepth
z
 
Search WWH ::




Custom Search