diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/LICENSE.txt b/mods/ITEMS/REDSTONE/mesecons_noteblock/LICENSE.txt deleted file mode 100644 index ec3fc39643..0000000000 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -Licensing information - -* All code: GPLv3 by Mesecons Mod Developer Team, contributors and Wuzzy -* mesecons_noteblock_temp_bass_guitar.ogg: CC0 -* mesecons_noteblock_temp_stick.ogg: CC0 -* Other sounds and data: CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/) by Mesecons Mod Developer Team and contributors - -Note: All “temp” sounds are subject to be replaced in later versions. diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/README.txt b/mods/ITEMS/REDSTONE/mesecons_noteblock/README.txt new file mode 100644 index 0000000000..dd6822a365 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/README.txt @@ -0,0 +1,57 @@ +Credits of sound files: + +Note: Most sounds have not been used verbatim, but tweaked a little to be more suitable for the noteblock mod. + +### Sounds licensed CC0: + + * by freesound.org user AmateurJ + * Source: https://freesound.org/people/AmateurJ/sounds/399523/ +* mesecons_noteblock_bass_drum.ogg + * by freesound.org user Mattc90 + * Source: https://freesound.org/people/Mattc90/sounds/264285/ +* mesecons_noteblock_bell.ogg + * by opengameart.org user Brandon75689 + * Source: https://opengameart.org/content/point-bell +* mesecons_noteblock_chime.ogg + * by freesound.org user + * Source: https://freesound.org/people/ikonochris/sounds/213380/ +* mesecons_noteblock_cowbell.ogg + * by freesound.org user timgormly + * Source: https://freesound.org/people/timgormly/sounds/159760/ +* mesecons_noteblock_flute.ogg + * by freesound.org user menegass + * Source: https://freesound.org/people/menegass/sounds/107307/ +* mesecons_noteblock_bass_guitar.ogg + * by freesound.org user Vres + * Source: https://freesound.org/people/Vres/sounds/133024/ +* mesecons_noteblock_hit.ogg + * by freesound.org user rubberduck + * Source: https://opengameart.org/content/100-cc0-sfx +* mesecons_noteblock_piano_digital.ogg + * by freesound.org user monotraum + * Source: https://freesound.org/people/monotraum/sounds/208889/ +* mesecons_noteblock_squarewave.ogg + * by Wuzzy +* mesecons_noteblock_xylophone_metal.ogg + * by freesound.org user JappeHallunken + * Source: https://freesound.org/people/JappeHallunken/sounds/501300/ +* mesecons_noteblock_xylophone_wood.ogg + * by freesound.org user connersaw8 + * Source: https://freesound.org/people/connersaw8/sounds/125271/ + +### Sounds licensed CC BY 3.0: + +* mesecons_noteblock_bass_guitar.ogg + * by freesound.org user Kyster + * Source: https://freesound.org/people/Kyster/sounds/117707/ +* mesecons_noteblock_didgeridoo.ogg + * by freesound.org user InspectorJ + * Source: https://freesound.org/people/InspectorJ/sounds/398272/ + +Everything else: +Created by Mesecons authors, licensed CC BY 3.0. + +-------------------- +License links: +* CC0: http://creativecommons.org/publicdomain/zero/1.0/ +* CC BY 3.0: http://creativecommons.org/licenses/by/3.0/ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua index 8080e82f0e..5ac18ea427 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/init.lua @@ -10,6 +10,17 @@ S("• Glass: Sticks").."\n".. S("• Wood: Bass guitar").."\n".. S("• Stone: Bass drum").."\n".. S("• Sand or gravel: Snare drum").."\n".. +S("• Block of Gold: Bell").."\n".. +S("• Clay: Flute").."\n".. +S("• Packed Ice: Chime").."\n".. +S("• Wool: Guitar").."\n".. +S("• Bone Block: Xylophne").."\n".. +S("• Block of Iron: Iron xylophne").."\n".. +S("• Soul Sand: Cow bell").."\n".. +S("• Pumpkin: Didgeridoo").."\n".. +S("• Block of Emerald: Square wave").."\n".. +S("• Hay Bale: Banjo").."\n".. +S("• Glowstone: Electric piano").."\n".. S("• Anything else: Piano").."\n\n".. S("The note block will only play a note when it is below air, otherwise, it stays silent."), @@ -98,19 +109,38 @@ mesecon.noteblock_play = function (pos, param2) local param2_to_pitch = function(param2) return 2^((param2-12)/12) end + local pitched = false local soundname, pitch - if minetest.get_item_group(block_below_name, "material_glass") ~= 0 then - soundname="mesecons_noteblock_stick" - pitch = param2_to_pitch(param2) + if block_below_name == "mcl_core:goldblock" then + soundname="mesecons_noteblock_bell" + elseif block_below_name == "mcl_core:clay" then + soundname="mesecons_noteblock_flute" + elseif block_below_name == "mcl_core:packed_ice" then + soundname="mesecons_noteblock_chime" + elseif block_below_name == "mcl_core:bone_block" then + soundname="mesecons_noteblock_xylophone_wood" + elseif block_below_name == "mcl_core:ironblock" then + soundname="mesecons_noteblock_xylophone_metal" + elseif block_below_name == "mcl_nether:soul_sand" then + soundname="mesecons_noteblock_cowbell" + elseif block_below_name == "mcl_farming:pumpkin" or block_below_name == "mcl_farming:pumpkin_face" or block_below_name == "mcl_farming:pumpkin_face_light" then + soundname="mesecons_noteblock_didgeridoo" + elseif block_below_name == "mcl_core:emeraldblock" then + soundname="mesecons_noteblock_squarewave" + elseif block_below_name == "mcl_farming:hay_block" then + soundname="mesecons_noteblock_banjo" + elseif block_below_name == "mcl_nether:glowstone" then + soundname="mesecons_noteblock_piano_digital" + elseif minetest.get_item_group(block_below_name, "wool") ~= 0 then + soundname="mesecons_noteblock_guitar" + elseif minetest.get_item_group(block_below_name, "material_glass") ~= 0 then + soundname="mesecons_noteblock_hit" elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then soundname="mesecons_noteblock_bass_guitar" - pitch = param2_to_pitch(param2) elseif minetest.get_item_group(block_below_name, "material_sand") ~= 0 then soundname="mesecons_noteblock_snare" - pitch = param2_to_pitch(param2) elseif minetest.get_item_group(block_below_name, "material_stone") ~= 0 then - soundname="mesecons_noteblock_kick" - pitch = param2_to_pitch(param2) + soundname="mesecons_noteblock_bass_drum" else -- Default: One of 25 piano notes soundname = soundnames_piano[param2] @@ -118,6 +148,10 @@ mesecon.noteblock_play = function (pos, param2) if param2 == 24 then pitch = 2^(1/12) end + pitched = true + end + if not pitched then + pitch = param2_to_pitch(param2) end minetest.sound_play(soundname, diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr index 1c8a8b05d7..b3fe222477 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.de.tr @@ -1,11 +1,22 @@ # textdomain: mesecons_noteblock Note Block=Notenblock A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.=Ein Notenblock ist ein musikalischer Block, der eine von vielen Noten von verschiedenen Instrumenten spielt, wenn er geschlagen oder mit Redstoneenergie versorgt wird. -Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=Benutzen Sie den Notenblock, um die nächste Musiknote zu wählen (es gibt 25 Halbtöne, oder 2 Oktaven). Das gespielte Instrument hängt vom Material des Blocks unter dem Notenblock ab: +Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=Benutzen Sie den Notenblock, um die nächste Musiknote zu wählen (es gibt 25 Halbtöne bzw. oder 2 Oktaven). Das gespielte Instrument hängt vom Material des Blocks unter dem Notenblock ab: • Glass: Sticks=• Glas: Stöcke • Wood: Bass guitar=• Holz: Bassgitarre • Stone: Bass drum=• Stein: Basstrommel • Sand or gravel: Snare drum=• Sand oder Kies: Kleine Trommel +• Block of Gold: Bell=• Goldblock: Glocke +• Clay: Flute=• Ton: Flöte +• Packed Ice: Chime=• Packeis: Glockenspiel +• Wool: Guitar=• Wolle: Gitarre +• Bone Block: Xylophne=• Knochenblock: Xylophon +• Block of Iron: Iron xylophne=• Eisenblock: Eisenxylophon +• Soul Sand: Cow bell=• Seelensand: Kuhglocke +• Pumpkin: Didgeridoo=• Kürbis: Didgeridoo +• Block of Emerald: Square wave=• Smaragdblock: Rechteckschwingung +• Hay Bale: Banjo=• Heuballen: Banjo +• Glowstone: Electric piano=• Leuchtstein: E-Piano • Anything else: Piano=• Alles andere: Klavier The note block will only play a note when it is below air, otherwise, it stays silent.=Der Notenblock wird nur eine Note spielen, wenn er sich unter Luft befindet, sonst bleibt er stumm. Plays a musical note when powered by redstone power=Spielt eine Musiknote, wenn mit Redstoneenergie versorgt diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt index a1d9db8462..d0daa96a68 100644 --- a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/template.txt @@ -7,5 +7,16 @@ Use the note block to choose the next musical note (there are 25 semitones, or 2 • Stone: Bass drum= • Sand or gravel: Snare drum= • Anything else: Piano= +• Block of Gold: Bell +• Clay: Flute +• Packed Ice: Chime +• Wool: Guitar +• Bone Block: Xylophne +• Block of Iron: Iron xylophne +• Soul Sand: Cow bell +• Pumpkin: Didgeridoo +• Block of Emerald: Square wave +• Hay Bale: Banjo +• Glowstone: Electric piano The note block will only play a note when it is below air, otherwise, it stays silent.= Plays a musical note when powered by redstone power= diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_banjo.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_banjo.ogg new file mode 100644 index 0000000000..62d93d5795 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_banjo.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_drum.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_drum.ogg new file mode 100644 index 0000000000..c470537edb Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_drum.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg index eaa531b2ff..48069d8e7d 100644 Binary files a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bass_guitar.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bell.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bell.ogg new file mode 100644 index 0000000000..6758e2c758 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_bell.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_chime.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_chime.ogg new file mode 100644 index 0000000000..4c13126347 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_chime.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_cowbell.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_cowbell.ogg new file mode 100644 index 0000000000..32b4c9fbe7 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_cowbell.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_didgeridoo.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_didgeridoo.ogg new file mode 100644 index 0000000000..221cd8446d Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_didgeridoo.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_flute.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_flute.ogg new file mode 100644 index 0000000000..3a8bbc6abe Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_flute.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_guitar.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_guitar.ogg new file mode 100644 index 0000000000..1dcd5b8384 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_guitar.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_hit.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_hit.ogg new file mode 100644 index 0000000000..cf8a5bfd74 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_hit.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg deleted file mode 100644 index c73b71178e..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_piano_digital.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_piano_digital.ogg new file mode 100644 index 0000000000..6461a70055 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_piano_digital.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_squarewave.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_squarewave.ogg new file mode 100644 index 0000000000..b6bc5c445c Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_squarewave.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_stick.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_stick.ogg deleted file mode 100644 index 1fc2c04bb9..0000000000 Binary files a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_stick.ogg and /dev/null differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_metal.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_metal.ogg new file mode 100644 index 0000000000..2d99327f71 Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_metal.ogg differ diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_wood.ogg b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_wood.ogg new file mode 100644 index 0000000000..5598f62d6e Binary files /dev/null and b/mods/ITEMS/REDSTONE/mesecons_noteblock/sounds/mesecons_noteblock_xylophone_wood.ogg differ