Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mt-mods/soundblock
https://github.com/mt-mods/soundblock
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mt-mods/soundblock
- Owner: mt-mods
- License: other
- Created: 2019-04-29T07:10:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-21T10:01:16.000Z (about 4 years ago)
- Last Synced: 2023-03-04T00:19:56.528Z (almost 2 years ago)
- Language: Lua
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
A soundblock that emits sounds with given interval or per mesecon signal
## Api
Register custom sounds:
```lua
soundblocks.register({
filename = "default_glass_footstep.ogg",
key = "default_glass_footsteps",
name = "Glass footsteps"
})soundblocks.register({
filenames = {
"default_grass_footstep.1.ogg",
"default_grass_footstep.2.ogg",
"default_grass_footstep.3.ogg"
},
key = "default_grass_footstep",
name = "Grass footsteps"
})```
# Digiline api
```lua
if event.type == "program" then
digiline_send("soundblock", {
command = "play",
name = "default_grass_footstep.1.ogg",
-- relative position (optional)
pos = { x=0, y=10, z=0 },
-- gain, defaults to 1
gain = 1,
-- max_hear_distance, defaults to 10
hear_distance = 32
})
end
```# License
See `license.txt`
## textures/soundblock_block.png
* DWYWPL
* https://github.com/minetest-mods/mysoundblocks