File: soundset.lua

package info (click to toggle)
enigma 1.30%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 76,132 kB
  • sloc: xml: 162,251; cpp: 67,393; ansic: 28,606; makefile: 1,986; sh: 1,298; yacc: 288; perl: 84; sed: 16
file content (189 lines) | stat: -rw-r--r-- 6,668 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
--
-- This file demonstrates how to add a sound set to Enigma.
--
-- Sound effects are triggered by so-called "sound events". These sound
-- events usually have a name (like "dooropen") and an associated location
-- (the coordinates of the door) which affects the way a sound effect is
-- played.
--
-- The sound event is converted into a real sound effect using tables
-- similar to the one below.  Each entry in the table is either a string
-- like "enigma/st-coinslot", which is interpreted as the file
-- "soundsets/enigma/st-coinslot.wav" with some default properties, or a
-- list of sound attributes enclosed in curly braces "{ ... }".
--
-- Here is a complete example of such an attribute list:
--
--      dooropen = { file="my_soundset/open-door", volume=0.9, priority=4 },
--
-- The meaning of these attributes is as follows:
--
--      file     - Path and name of the sound file for this event, without
--                 the".wav" extension.
--
--      volume   - The sound volume: 1.0 is standard, 0.0 is silent.
--
--      priority - If many effects are active at the same time, high-priority
--                 effects can replace lower-priority effects. Use an integer
--                 between 1 and 10 (default 1). This property does not yet
--                 work within Enigma 1.01.
--
--      global   - Either "true" or "false".  If true, no stereo effects are
--                 applied and there is no attenuation.  Used for menu sound,
--                 level end sounds, etc. Default is "false".
--
--      loop     - "true" or "false".  If true, the sound repeats infinitely
--                 until canceled. Default is "false". 
--
--      damp_max, damp_inc, damp_mult, damp_min, damp_tick
--               - Parameters for sound damping.  Sounds from noisy objects
--                 like light passengers are damped to reduce the noise.
--                 For this, the sound event's frequency is estimated.
--                 damp_max calibrates the maximal damping factor (high means
--                 quiet), damp_inc how fast the damping accumulates,
--                 damp_mult is an overall factor, damp_min defines a lower
--                 bound for the damping entries (beyond which they are
--                 removed from memory) and damp_tick the factor that's
--                 applied all 0.1 seconds. See sound.hh for details.
--                 Defaults: 10.0, 1.0, 1.0, 0.5, 0.9.
--
-- To design a new sound set, proceed as follows.
--
-- 1) Create a new folder containing a copy of this file (named "soundset.lua")
--    and the wav files you want to use.  
--
-- 2) Move this new folder into Enigma's "soundsets" folder in your user path.
--    (Possibly you have to create it.) The directory structure should look
--    something like this:
--
--      (user path)/soundsets/my_sounds/
--                                     /soundset.lua
--                                     /high_pitch.wav
--                                     /soundfile_13.wav
--                                     ...
--
-- 3) Run Enigma and choose "My Soundset" in the options menu.  Since this
--    file's sound set does not map any sound effect to a wav file, you should
--    hear nothing. 
--
-- 4) Edit the contents of this file to your liking.  You can access the
--    default sound files in the "soundsets/enigma" directory, e.g.:
--        ...
--        coinsloton = { file="enigma/st-coinslot" },
--        ...
--    When using own sound files, remember to add the subfolder, like in
--        ...
--        coinsloton = { file="my_sounds/soundfile_13" },
--        ...
--    No extension ".wav"! It's added automatically. Make sure that the
--    extension is in lower case letters.
--
-- 5) Replace "MY_SOUNDSET" by a suitable variable name, and "My Soundset"
--    by the name you want to see in the sound options menu.  Remember to
--    make it short enough to fit on the button.
--
-- If you need inspiration, take a look at "sound-defaults.lua" shipped with
-- Enigma, which contains the default sound table.
--
-- If you have questions, don't hesitate to ask.  Have fun!
--

soundtable_MY_SOUNDSET = {
    [""]           = "",        -- empty sound
    ballcollision  = "",
    blockerdown    = "",
    blockerup      = "",
    bomb_black     = "",
    bomb_white     = "",
    bottle         = "",
    bumper         = "",
    cloth          = "",
    coinslotoff    = "",
    coinsloton     = "",
    crack          = "",
    doorclose      = "",
    dooropen       = "",
    drown          = "",
    dynamite       = "",
    electric       = "",
    exit           = "",
    extinguish     = "",
    fakeoxyd       = "",
    falldown       = "",
    finished       = "",
    floordestroy   = "",
    fourswitch     = "",
    glass          = "",
    hitfloor       = "",
    impulse        = "",
    intro          = "",
    invrotate      = "",
    itemtransform  = "",
    jump           = "",
    jumppad        = "",
    landmine       = "",
    laserloop      = "",
    laseron        = "",
    laseroff       = "",
    lock           = "",
    magneton       = "",
    magnetoff      = "",
    mail           = "",
    menuexit        = "",
    menumove        = "",
    menuok          = "",
    menustop        = "",
    menuswitch      = "",
    metal          = "",
    mirrorturn     = "",
    movebig        = "",
    moveslow       = "",
    movesmall      = "",
    oxydclose      = "",
    oxydopen       = "",
    oxydopened     = "",
    pickup         = "",
    puller         = "",
    puzzlerotate   = "",
    quake          = "",
    rubberband     = "",
    scissors       = "",
    seedgrow       = "",
    shatter        = "",
    shattersmall   = "",
    shogunoff      = "",
    shogunon       = "",
    skull          = "",
    spade          = "",
    squish         = "",
    stone          = "",
    stonedestroy   = "",
    stonepaint     = "",
    stonetransform = "",
    swamp          = "",
    switchmarbles  = "",
    switchoff      = "",
    switchon       = "",
    switchplayer   = "",
    sword          = "",
    thief          = "",
    triggerdown    = "",
    triggerup      = "",
    turnstileleft  = "",
    turnstileright = "",
    umbrellaoff    = "",
    umbrellaon     = "",
    umbrellawarn   = "",
    unlock         = "",
    vortexclose    = "",
    vortexopen     = "",
    warp           = "",
    wood           = "",
    yinyang        = "",
}

-- Remove "--" from the line below to add missing sound entries
-- from the default sound set.
--copy_missing (soundtable_enigma, soundtable_MY_SOUNDSET)

AddSoundSet ("My Soundset", soundtable_MY_SOUNDSET)