Sitemap
Aries Hilton

Aries Hilton

Aries Hilton’s writing style is creative, imaginative, and visionary. He uses the Aries Storytelling Framework, a new and innovative framework! View LinkedIn!

BeatBoxer: A Customizable 3D Printed Music Box Service

©️ SunSiteVR LLC, 2023, All Rights Reserved.

5 min readDec 31, 2023

--

Author: Aries Hilton

Introduction

Using the RealityWriter method, I have generated an article about a 3D printed music box service that allows users to submit a YouTube link and receive a custom-made 3D printed music box that plays their song.

Project Overview

The 3D printed music box service is a unique and innovative way to create a personalized music box that plays your favorite song. The project aims to provide a simple and easy-to-use service that allows users to submit a YouTube link of a song with a duration of up to 5 minutes and receive a custom-made 3D printed music box that plays their song.

Problem Statement

The problem with traditional music boxes is that they are limited to playing a pre-selected set of songs. This limits the user’s ability to personalize the music box and play their favorite song. The goal of this project is to provide a solution to this problem by creating a 3D printed music box that can play any song with a duration of up to 5 minutes.

Design Objectives

The design objectives of the project are to create a 3D printed music box that is easy to use, affordable, and offers great value for money. The music box should be able to play any song with a duration of up to 5 minutes, regardless of its length or complexity. The music box should also be customizable, allowing users to choose the color and design of the music box.

Design Specifications

The design specifications of the project are as follows:

- The music box should be 3D printed using high-quality materials and precision printing techniques.
- The music box should be able to play any song with a duration of up to 5 minutes submitted by the user.
- The music box should be customizable, allowing users to choose the color and design of the music box.
- The music box should only save the instrumental part of the song, removing the vocals to ensure technical feasibility.

Design Process

The design process of the project involves the following steps:

1. Submit a YouTube link of the song you want to play.
2. Use advanced algorithms to extract the instrumental data from the video and remove the vocals.
3. Convert the instrumental data into a format that can be used to create a custom-made music box cylinder.
4. 3D print the music box cylinder using high-quality materials and precision printing techniques.
5. Insert the music box cylinder into the music box mechanism.
6. Your custom-made music box is ready to play.

Design Results

The design results of the project are as follows:

- A 3D printed music box that can play any song with a duration of up to 5 minutes submitted by the user.
- A customizable music box that allows users to choose the color and design of the music box.
- An affordable and easy-to-use music box that offers great value for money.
- The music box only saves the instrumental part of the song, removing the vocals to ensure technical feasibility.

Design Evaluation

The design evaluation of the project involves the following criteria:

- Ease of use
- Affordability
- Customizability
- Sound quality

The 3D printed music box service meets all of the above criteria and provides a unique and innovative way to create a personalized music box that plays your favorite song.

Conclusion

The 3D printed music box service is a unique and innovative way to create a personalized music box that plays your favorite song. It is easy to use, affordable, and offers great value for money. If you are looking for a unique and personalized gift for someone special, or if you simply want to create a custom-made music box for yourself, then this service is definitely worth considering.

This code is intended for research and conceptual demonstration purposes only and is not intended to function as a fully operational software program.

The code 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 non-infringement.

In no event shall the author 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 code or the use or other dealings in the code.

```python
import moviepy.editor as mp
import numpy as np
import scipy.io.wavfile as wav
from pydub import AudioSegment
from pydub.playback import play
from scipy import signal
from scipy.fft import fft, ifft
from scipy.io import wavfile
from scipy.signal import butter, lfilter

Get Aries Hilton’s stories in your inbox

Join Medium for free to get updates from this writer.

# Step 1: Receive the YouTube link of the song from the user
youtube_link = input(“Please enter the YouTube link of the song you want to play: “)

# Step 2: Extract the audio data from the video
clip = mp.VideoFileClip(youtube_link)
clip.audio.write_audiofile(“audio.wav”)

# Step 3: Remove the vocals from the audio data
def butter_bandpass(lowcut, highcut, fs, order=5):
nyq = 0.5 * fs
low = lowcut / nyq
high = highcut / nyq
b, a = butter(order, [low, high], btype=’band’)
return b, a

def butter_bandpass_filter(data, lowcut, highcut, fs, order=5):
b, a = butter_bandpass(lowcut, highcut, fs, order=order)
y = lfilter(b, a, data)
return y

def remove_vocals(audio_file):
# Load the audio file
rate, data = wavfile.read(audio_file)

# Filter the audio data to remove the vocals
filtered_data = butter_bandpass_filter(data, 300, 3000, rate, order=5)

# Save the filtered audio data to a new file
wavfile.write(“instrumental.wav”, rate, filtered_data)

remove_vocals(“audio.wav”)

# Step 4: Convert the instrumental data into a format that can be used to create a custom-made music box cylinder
def convert_to_cylinder(audio_file):
# Load the audio file
rate, data = wavfile.read(audio_file)

# Convert the audio data to a format that can be used to create a custom-made music box cylinder
cylinder_data = np.int16(data/np.max(np.abs(data)) * 32767)

# Save the cylinder data to a new file
wavfile.write(“cylinder.wav”, rate, cylinder_data)

convert_to_cylinder(“instrumental.wav”)

```
import bpy

# Step 1: Import the instrumental data into Blender
bpy.ops.import_sound(filepath=”instrumental.wav”)

# Step 2: Use the Extrude tool to create a cylinder shape that matches the dimensions of the music box cylinder
bpy.ops.mesh.primitive_cylinder_add(radius=1, depth=1)

# Step 3: Use the Boolean modifier to subtract the areas of the cylinder that are not needed
cylinder = bpy.data.objects[‘Cylinder’]
instrumental_data = bpy.data.sounds[‘instrumental.wav’]
bpy.ops.object.modifier_add(type=’BOOLEAN’)
bpy.context.object.modifiers[“Boolean”].operation = ‘DIFFERENCE’
bpy.context.object.modifiers[“Boolean”].object = cylinder
bpy.context.object.modifiers[“Boolean”].sound = instrumental_data

# Step 4: Export the 3D model as an STL file
bpy.ops.export_mesh.stl(filepath=”music_box_cylinder.stl”)

print(“The 3D model of the music box cylinder has been created and saved as an STL file.”)

```python
import serial
import time

# Step 1: Connect to the 3D printer
ser = serial.Serial(‘COM3’, 115200)

# Step 2: Send the G-code to the 3D printer
with open(‘music_box_cylinder.stl’, ‘r’) as f:
gcode = f.read()
ser.write(gcode.encode())

# Step 3: Start printing
ser.write(b’M109 S200\n’)
ser.write(b’G28\n’)
ser.write(b’G1 Z15.0 F9000\n’)
ser.write(b’G92 E0\n’)
ser.write(b’G1 F140 E30\n’)
ser.write(b’G92 E0\n’)
ser.write(b’G1 F9000\n’)
ser.write(b’G1 X0 Y0 Z0.3 F9000\n’)
ser.write(b’G1 X0 Y0 Z0.1 F9000\n’)
ser.write(b’G1 X0 Y0 Z0.0 F9000\n’)

# Step 4: Wait for the print to finish
while True:
response = ser.readline().decode().strip()
if response == ‘ok’:
break
time.sleep(0.1)

print(“The 3D model of the music box cylinder has been sent to the 3D printer and is now printing.”)
```

Dev Note: Also, you will need to replace the `COM3` value in the `serial.Serial` function with the appropriate serial port for your 3D printer.

--

--

Aries Hilton
Aries Hilton

Written by Aries Hilton

Aries Hilton’s writing style is creative, imaginative, and visionary. He uses the Aries Storytelling Framework, a new and innovative framework! View LinkedIn!