Play note block or midi with your minecraft

在你的 Minecraft 世界裏播放音樂吧!

Play note block or midi with your minecraft !

Introduction

Who all have dreams of playing music in minecraft :P

Require Mods and any modpacks include: CC: Tweaked

This article will teach you how to get the nbs file from midi files and then play the nbs file in minecraft.

The article will use my github project to do the demo.

Demo: Setup Video Demo Video

Introduction the playable files .nbs

In the first, we need to make the playable files, the playable files extension name is *.nbs. It mean, you need to download Minecraft Note Block Studio to make a *.nbs files from HERE, and the Minecraft Note Block Studio is an open source editor.

Making the playable files

When you need to make a playable files, you need to prepare the midi files, the example midi files Never-Gonna-Give-You-Up-3.mid will be download in HERE.

  1. Click Create a new song

  2. Click file -> Import from MIDI... and import your midi files.

When you try to import the midi file, I recommend to choose 2X, This is sampling time line from midi files.

After import your midi files, you have a issue to fix, Native minecraft only supports 1 Octave, and the CC Tweaked API also only support Native only supports 1 Octave.

It mean it is unable to play more than 1 Octave, so you need to fix the issue by simple click button like the below of the picture.

Now the issue fix, and you need to play it, and Adjustment of the correct time by feeling.

I setup 15 t/s and it look great.

Here is Important step:

  1. Click File -> Save options...

  2. Make sure you have select V5 Version.

And Click File -> Save song to output .nbs files.

Put your files to internet

The MC server using wget to download files. You need to put it your file to internet and download by direct link.

The example using wsend service to upload file.

Server Computer component in minecraft

Server Computer used to control client computer to play what node.

The server computer need two components: Advanced Computer and Wireless Modem.

Make sure the Wireless Modem is on the top of the Advanced Computer.

Client Computer component in minecraft

If your nbs files plays n tracks at the same time, you will need n clients, it is depending on your nbs file.

The Client computer need three components: Speaker, Advanced ComputerandWireless Modem.

Make sure the Wireless Modem is on the top of the Advanced Computer and the

Speaker is on the button of the Advanced Computer.

Setup Client Computer to listen mode.

Open your client computer terminal, type (you can ctrl + c and ctrl + v) :

  1. pastebin get PnXAY6JC client

  2. ./client to run the client program.

  3. type the channel number.

Each client computer has a different channel ID, with the first computer counting from 3. It mean the seconds client computer will be 4 for channel ID.

Setup Server Computer to play with your .nbs files

Open your server computer terminal, type:

  1. pastebin get tcvYgiYt server

  2. wget <your nbs download file url>

  3. ./server

  4. <Input your file names>

Conclusion

Enjoy it, This is our project, Write by mane and ricky. I know the code is not very well to written.

Write by Mane, and Prohibition of reproduction (禁止轉載).

Comments