Play a song with a 3D printer.

Related tags

Hardwaremidi2gcode
Overview

MIDI to GCODE

Play a song with a FDM 3D printer. SLA printers don't have motors, so they cannot play music.

Warning: Be ready to turn off the 3D printer in case the motor reaches the axis limit.

Usage:

python main.py ...

Args:

  • -i: Input MIDI file.
  • -o: Output G-code file.
  • -p: Pitch multiplier.
  • -l: Length of axis (currently ignored).
  • -a: Axis to use e.g. "Y". Normally, the Y axis is loudest.
  • -r: Axis to use for rests. The "X" and "E"xtruder axes are quietest, but some printers don't move the extruder unless it is heated.
  • --home: Move to home position before playing.

Copy the gcode to the printer and print it. The gcode flavor is Marlin.

Example command:

python main.py -i a.mid -o a.gcode -a Y -r X --home

How it works:

The 3D printer moves motors, and usually makes noises. These noises are arbitrary in most prints, but if you move the motors at certain speeds, the resulting sounds may form a song.

The script computes the speeds based on a MIDI file (the song).

Future features

  • Multiple simultaneous voices and timbres using all axes.
  • Compute direction of move to stay roughly in the middle.
Owner
Patrick
10th grader in California. My interests are ML, computer graphics, robotics, and piano. Big supporter of free software and freedom in general.
Patrick
Smart EQ connect - Custom Integration for Home Assistant

Smart EQ Connect platform as a Custom Component for Home Assistant.

Rene Nulsch 2 Jan 04, 2022
Python library for the Phomemo m02s bluetooth thermal printer

Phomemo M02S Python library This is a basic Python library for controlling the Phomemo M02S bluetooth thermal printer. It probably only works on Mac &

Stargirl Flowers 28 Nov 07, 2022
A refreshed Python toolbox for building complex digital hardware

A refreshed Python toolbox for building complex digital hardware

nMigen 1k Jan 05, 2023
This Home Assistant custom component adding support for controlling Midea dehumidifiers on local network.

This custom component for Home assistant adds support for Midea dehumidifier appliances via the local area network. homeassistant-midea-dehumidifier-l

Nenad Bogojevic 91 Dec 28, 2022
šŸ± Petkit feeder components for HomeAssistant

Petkit for HomeAssistant Installing Download and copy custom_components/xiaomi_miot folder to custom_components folder in your HomeAssistant config fo

62 Dec 29, 2022
Automatic CPU speed & power optimizer for Linux

Automatic CPU speed & power optimizer for Linux based on active monitoring of laptop's battery state, CPU usage, CPU temperature and system load. Ultimately allowing you to improve battery life witho

Adnan Hodzic 3.4k Jan 07, 2023
Monitor Live USB Plug In & Plug Out Events

I/O - Live USB Monitoring Author: Jonathan Scott @jonathandata1 Date: 3/13/2021 CURRENT VERSION 1.0 This is just a simple bash script that calls a pyt

Jonathan Scott 17 Dec 03, 2022
A Fear and Greed index visualiser for Bitcoin on a SSD1351 OLED Screen

We're Doomed - A Bitcoin Fear and Greed index OLED visualiser Doom is a first-person-shooter from the 1990s. The health status monitor was one of the

VEEB 19 Dec 29, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

3 Feb 21, 2022
MicroPython driver for 74HC595 shift registers

MicroPython 74HC595 A MicroPython library for 74HC595 8-bit shift registers. There's both an SPI version and a bit-bang version, each with a slightly

Mike Causer 17 Nov 29, 2022
A python module for interacting with rolimon's, a roblox value site.

rpi - rolimon's python interaction rpi is an open source python-based rolimon's api wrapper. It provides an end-to-end pipeline in which each componen

Acier 11 Nov 08, 2022
Vvim - Keyboardless Vim interactions

This is done via a hardware glove that the user wears. The glove detects the finger's positions and translates them into key presses. It's currently a work in progress.

Boyd Kane 8 Nov 17, 2022
iot-dashboard: Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things.

Fully integrated architecture platform with a dashboard for Logistics Monitoring, Internet of Things. Written in Python. Flask applicati

2 Jul 29, 2022
Micropython-wifimanager-esp8266 - Simple Wifi Manager for ESP8266 using MicroPython

micropython-wifimanager-esp8266 Simple Wifi Manager for ESP8266 using MicroPytho

Abhinuv Nitin Pitale 1 Jan 04, 2022
Sticklog2heatmap - Draw a heatmap of RC sticks from OpenTX logs or USB HID device

sticklog2heatmap Draw a heatmap of RC sticks from OpenTX logs or USB HID device

2 Feb 02, 2022
Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

Python library to manipulate Ingenico mobile payment device like iCT220 or iWL220 equipped with Telium Manager. RS232/USB.

TAHRI Ahmed R. 72 Dec 24, 2022
Volta: A Virtual Assistant which increases your productivity with time as you use itā€¦

Volta Official Documentation Overview & Purpose Volta: A Virtual Assistant which increases your productivity with time as you use itā€¦ Volta, developed

Abeer Joshi 1 Jan 14, 2022
Monitor an EnvisaLink alarm module running Honeywell firmware, and set a Nest device to Home/Away depending on whether the alarm is Disarmed/Away.

Nestalarm Monitor an EnvisaLink alarm module running Honeywell firmware, and set a Nest device to Home/Away depending on whether the alarm is Disarmed

1 Dec 30, 2021
A modular sequencer based on Pi Pico & EuroPi

PicoSequencer A modular sequencer based on Pi Pico & EuroPi by Zeno Van Moerkerke / Keurslager Kurt For now it is 'only' a trigger sequencer, but I si

5 Oct 27, 2022
A script for performing OTA update over BLE on ESP32

A script for performing OTA update over BLE on ESP32

Felix Biego 18 Dec 15, 2022