MIDI-Controlled Slide Whistle

Uses an Arduino Due and a stepper motor + driver to control a slide whistle made of 3d printed parts and PVC pipe. Laser-cut base plate.

Similar projects worth following
A project that uses a 3d printed rack-and-pinion, blower fan, an Arduino Due, and a laser-cut base plate in a slide whistle assembly. Project is functional, and mostly-complete, but can use a little bit of tidying-up, It may eventually incorporate limit switch to define a home position (currently requires manual homing).

How this project came to be:

Build video: 

This project was really fun, and kind of evolved in a very rambling sort of way.  It started off in a completely different direction - the plan was to get a reed-based instrument working.  At some point, I actually got a saxophone reed to work with a 3d-printed mouthpiece... just barely!  And with a 5 foot piece of PVC, it made for a pretty interesting almost-didgeridoo-like sound.  After some tweaking, I finally got a fipple to do that, too (in the build video).

Getting a fully functional PVC reed instrument is still a goal of mine, but for the time being, I decided to try out 3d printing a fipple and making a fipple flute.  The first working iteration of that fipple is featured in the Cream Cover I did last month:

Long story short, this ended up becoming a slide whistle to change notes.  It became apparent that I could re-use some code I had from the last project I did back in May-June 2020 (A "Semi Manual Electric Rail Kalimba" aka the SMERK), and that was a huge plus.

So enough of my rambling - here's the design:

Design Overview

Design philosophy is to use relatively cheap/easy-to-acquire parts like those used for 3d-printers (centrifugal blower fan, 8mm linear rail), and 3d-printed + laser cut components.

Hardware/mechanical design was all done in Fusion360.  Some things that required optimization and iteration were: 

- the fipple (part of the whistle that air is forced through).  I made a blown up and cross-sectioned version for explanation in the upcoming build video(s)

- the height and size of the pinion gear/motor mount subassembly (too large a gear = too much torque for motor)

- the fit of the O-Ring/8mm-rail Assembly (there's a tiny 3d-printed part there that holds the o-ring, whose diameter took some time to optimize, and it's still a bit too tight)

The design uses a lot of M3 heated inserts and 1/4-20 screws/tapped holes... mostly because I have tons of these.  [Achievement Unlocked: Imperial and Metric in Same Design.]

Firmware and Electrical Hardware:

The microcontroller board used is the Arduino Due with a CNC Shield v.3 w/ A4988 drivers.  This combination is a favorite of mine for getting MIDI + USB + NEMA17 Stepper Motors going quickly.  

The stepper motor is a 2A NEMA17 from STEPPERONLINE.

The microstepping configuration is set up to 1/8th microstepping.  This provides a decent balance of speed and quiet.

The firmware is sort of a rough/ongoing sketch for the Arduino Due.  I see this as sort of a quick, but generic "correlate some subset of MIDI to a stepper motor position".  It uses some dead-waits that I'll eventually design out, but for now it seems to do the job.

Warning: some variables are named for a similar project I have going (Semi-Manual Electric Rail Kalimba, so apologies for the "kalimba" and "flute" inconsistencies).  The firmware is configured to use the Y-Axis of the CNC shield as I've got some ongoing work on the X-Axis for controlling another instrument simultaneously (will post that project soon, I hope).  The code here relies on the Arduino MIDIUSB Library, which is a very simple way to get a class-compliant MIDI USB device working through the Due's Native USB port.

A pre-processor Macro "#define" for isTuning exists.  This enables the user to tune the instrument.  Connect via the programming USB port and type a number of steps.  Use those numbers to populate the "pulleyPositions.h" definitions.


- The base-plate is laser cut (.dxf's) on 1/4" clear plastic

- Most other components are 3d-printed

- 1/2" ID PVC Pipe is cut to appx 400mm in length

Some notes on this project:

This project requires laser cutting, installing heated inserts w/ a soldering iron, 3d printing and some tuning in...

Read more »

Arduino Due Sketch and Header FIles

x-zip-compressed - 5.70 kB - 08/23/2020 at 23:02


STL's, DXF's, STEP File for build

x-zip-compressed - 2.89 MB - 08/23/2020 at 17:15


Build and Design Image Files

x-zip-compressed - 36.86 MB - 08/18/2020 at 07:44



Demo of Slide Whistle in Action

MPEG-4 Video - 32.97 MB - 08/18/2020 at 07:43


View all 32 components

  • Added Bill of Materials and Some Instructions

    TheMixedSignal08/23/2020 at 17:18 0 comments

    Added some instructions (to be finished soon), and (I hope) a full Bill of Materials.  Minor Corrections/Additions to the STL/STEP/DXF zip file.

  • Build/Overall Design Video and Code Cleanup

    TheMixedSignal08/22/2020 at 23:23 0 comments

    Added a build video in the project details!

    Cleaned up the code a little bit:

    --- took out some of the bits that were hanging out from other instruments).  

    --- Have also modularized the step-taking to be a function call to keep the forever loop looking a little cleaner.


    Plan on making the instructions a bit more detailed, and clearly defining the Bill of Materials.  Also need to add in the step file/build files the little laser cut "clip" piece that helps hold the two halves of the base plate together.

  • Hello World

    TheMixedSignal08/18/2020 at 07:47 0 comments

    First build of this system - with some pre-build design iteration.  

    Features to add:

    - Limit Switch

View all 3 project logs

  • 1
    Overview and Info Gathering

    It's recommended to watch the video to get a general feel for design principles and some of what's involved in the assembly, and it would be good to carefully read through instructions before attempting!

  • 2
    Fabricate and Procure

    At this point, it's time to procure components for the build and to start fabricating.  Bill of materials is listed in Components Section of this page along with some links to parts I used.

    For the 3d-printed parts, I've used an FDM 3d printer (Creality CR-10): .stl files included, and for the base plate + connector piece, I used a laser cutter: .dxf files included. 

    In order for full thread engagement + not having screws poke through the bottom, I recomment 1/4" or thicker Acrylic for the laser cut pieces.

    For those using a print bed that's less than 300mm x 300mm --> I recommend printing the "shorter" of the two racks.  Another option (if you want the longer one) would be to design and cut a laser-cuttable rack, maybe with some sort of a 3d-printed adapter for mating to the 8mm rod.

  • 3
    Install Heated Inserts

    Note: some of these heated insert spots were never actually used in the final version, so I've tried to indicate where they aren't needed

    Using a soldering iron (either with a "normal sized' tip or with a heated insert-specific tip), install the heated inserts.  If it's your first time doing this, I recommend printing a few test pieces and trying this process out before doing it on a part you care about!

    Components w/ Heated Inserts

    - Motor Mount/Base Plate Bracket

    Whistle Top/Fipple:

    Pinion Gear:

    Stability Bracket:

    Pipe and Bearing Clamp Bracket:

    Pipe Bottom Clamp Bracket:

View all 11 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates