/MCSynth

Minecraft Commandblock music track builder

Primary LanguageJavaScript

MCSynth

Better Minecraft MIDI Synthesis Helper

代码整理优化中,目前版本尚无法运行,请期待更新,谢谢!

W.I.P, No working release is available yet.

About

This project helps you build better music tracks in Minecraft. Similar to the trail of noteblocks generated by the NoteBlock Studio, this project builds you better-looking tracks. We use RCON and command-blocks rather than MCEdit. Instead of redstone repeaters and noteblocks, we use pure command blocks to /playsound and do the timing. This enables more accurate timing (20 ticks per second) and better sounds (through /playsound). Resource packs are used to add custom instrument or even vocal.

One-Command Mod

WARNING: This part is deprecated and should no longer be used. Use RCON instead

Setup

This project works as "One-Command mod", however, as the code is very long, the setup is divided into several command blocks:

  1. Place a command block in an open area (nothing above it). Make sure it is in your Spawn chunk (Where you are when you create a world).
  2. Copy&Paste MCSynth into it and activate by placing a redstone torch to the side. Do NOT place anything (button/lever/pressure plate/yourself) on the top of it.
  3. After the machine is assembled, a welcome message should appear in the chat. You should see an "abnormal" command block with a sign "Place Piano Roll Code Here" on it.
  4. Copy&Paste PianoRoll into it.
  5. Look around and look for a single command block. It should be located within 6 blocks in positive Z direction.
  6. Copy&Paste soundfont code into it and activate in the same way as Step2. Find more about soundfonts in the Soundfonts section
  7. If you need multiple soundfonts, continue installation. You can always find a commandblock placed for you in the Z+ direction.

Pre-settings

This mod only works in SINGLEPLAYER with CHEAT COMMANDS ENABLED. Always start a new world as it can overwrite structures. After the machine is assembled, several settings will be changed:

  • Difficulty is set to peaceful
  • Mobs will not spawn
  • Entities around you will be removed automatically
  • Fire will not expand
  • Killed entities will not drop
  • Commandblock messages and command feedbacks will not be shown

Building

Beginning

  1. Before starting, fly towards positive Z or negative Z for at lease 20 blocks. Any structure may be destroyed in the X direction so make sure the track won't overlap the commandblocks.
  2. Look at your inventory, you should have been given a Chiken Spawn Egg with name START. You can begin building by placing it and a track will be built starting from the designated position.
  3. If you cannot find the egg, just grab one from your creative inventory and name it "START" (case-sensitive) with an anvil. Do NOT /summon as the coordinates will be inaccurate.
  4. Before placing, find a block that has is in the middle of the chunk. In debug screen (F3) find "Chunk: X1 Y1 Z1 in X2 Y2 Z2", the block should have Z1=7or8 and 2<Y1<10. (X1, X2, Y2, Z2 does not matter)
  5. Place the egg!

Working

Just follow the guide in your chat message. The position of the snowman indicates where the next block will be placed. Click on the roll to move the snowman. The piano notes screen will be brought up at the same time. The snowman will be moved automatically forward after a note is placed. Click Next/Previous to quickly move between areas(bars), make sure to use Next to allocate new areas. Do not stick on the piano notes screen as new areas will NOT be initialized in this way. If you set your notelength, more than one block will be placed, wait for the snowman to stop before performing any operation. If you do not use a custom generated soundfont, do NOT set notelength to more than 1(1/32 note)

RCON

Use node to run index.js under the rcon-js folder. Follow the instructions.

WARNING: Code not cleaned up. Work In Progress.

注意: 当前代码未完成

Notice: You need a craftbukkit server to process huge amounts of RCON requests properly. Vanilla Minecraft executes RCON commands as fast as TCP connection, crashing the ticking mechanism easily. Craftbukkit solves this by aligning commands to game ticks.

License

The MIT License (MIT) Copyright (c) 2016 ilufang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.