# CircuitPython Trombone Champ Controller

## Overview

https://youtube.com/shorts/g4BJd21aPNE

![](https://cdn-learn.adafruit.com/assets/assets/000/115/485/medium800/projects_edited_P1380914.jpg?1664475148)

Few instruments inspire greatness like the trombone. Whether it's a swinging big band tune or a two-step ska jam, the trombone can be heard sliding into glory. This explains why the internet has embraced the rhythm game [Trombone Champ](https://www.trombonechamp.com/). The game adapts the classic concepts of music games' past for the brass icon.

In this project, you'll build a custom 3D printed trombone controller for the game. An Adafruit QT Py RP2040 running CircuitPython code conducts an arcade button and NeoSlider to melodiously play through the game's unique controls.

The 3D printed trombone's slide is attached to the NeoSlider's shaft like a giant potentiometer knob. The potentiometer moves the mouse cursor up and down the screen, affecting the game's pitch like a real trombone.

![projects_slide_1.gif](https://cdn-learn.adafruit.com/assets/assets/000/115/486/medium640thumb/projects_slide_1.jpg?1664476429)

An arcade button takes care of the toots in the game, sending a space bar command every time its pressed. For those long, sustained notes you can hold down the arcade button without having to worry about your embouchure.

![projects_buttonPress_1.gif](https://cdn-learn.adafruit.com/assets/assets/000/115/487/medium640thumb/projects_buttonPress_1.jpg?1664476526)

## Prerequisite Guides
[Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040/overview)
[Adafruit NeoSlider](Adafruit%20NeoSlider)
## Parts
### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### Adafruit NeoSlider I2C QT Slide Potentiometer with 4 NeoPixels

[Adafruit NeoSlider I2C QT Slide Potentiometer with 4 NeoPixels](https://www.adafruit.com/product/5295)
Our family of I2C-friendly user interface elements grows by one with this new product that makes it plug-n-play-easy to add a 75mm long slide potentiometer to any microcontroller or microcomputer with an I2C port.

Each breakout is 3" long and 0.8" wide, with a single linear...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5295)
[Related Guides to the Product](https://learn.adafruit.com/products/5295/guides)
![Long rectangular breakout board with a slide potentiometer changing colors as a hand moves up and down.](https://cdn-shop.adafruit.com/product-videos/640x480/5295-05.jpg)

### Arcade Button with LED - 30mm Translucent Clear

[Arcade Button with LED - 30mm Translucent Clear](https://www.adafruit.com/product/3491)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. Particularly because they have&nbsp; **LEDs built right in!** &nbsp;That's right, you'll be button-mashing amidst a wash of beautiful light with these lil'...

In Stock
[Buy Now](https://www.adafruit.com/product/3491)
[Related Guides to the Product](https://learn.adafruit.com/products/3491/guides)
![Video of 30mm translucent clear LED arcade button flashing on and off.](https://cdn-shop.adafruit.com/product-videos/640x480/3491-03.jpg)

### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
![Angled shot of STEMMA QT / Qwiic JST SH 4-pin Cable.](https://cdn-shop.adafruit.com/640x480/4210-00.jpg)

### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
![Silicone Cover Stranded-Core Wire - 30AWG in Various Colors laid out beside each other. ](https://cdn-shop.adafruit.com/640x480/2051-01.jpg)

### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
![Angled shot of a pink/purple woven USB cable plugged into a laptop port and a small dev board.](https://cdn-shop.adafruit.com/640x480/5044-04.jpg)

### Part: M2.5 Thread Screws
quantity: 1
Black Nylon Machine Screw and Stand-off Set
[M2.5 Thread Screws](https://www.adafruit.com/product/3299)

# CircuitPython Trombone Champ Controller

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/115/470/medium800/projects_edited_P1380920.jpg?1664474482)

The Trombone Champ Controller may be assembled with 3D printed parts, described below. The parts print with no supports, however you may want to use a brim since most of the parts have thin walls.

The STL files can be downloaded directly here.

[tromboneChampController3Dfiles.zip](https://cdn-learn.adafruit.com/assets/assets/000/115/492/original/tromboneChampController3Dfiles.zip?1664477378)
Since a trombone has an intricate looped shape, the model is comprised of seven .STL files. Each part has tabs that connect with M2.5 screws. It can be helpful to think of the trombone in two parts: the main horn loop and the slide loop.

Main Horn Loop Parts

- **mainHorn\_v0**
- **hornBend\_v1**
- **arcadeMount\_v1**
- **hornElectronics\_v1**

Slide Loop Parts

- **potSlide\_v0**
- **slideBend\_v0**
- **innerSlide\_v1**

![projects_edited_P1380880.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/471/medium640/projects_edited_P1380880.jpg?1664474497)

The main horn loop has a mounting hole for the arcade button, cutouts for the QT Py's STEMMA QT and USB ports and mounts for the NeoSlider.

![projects_edited_P1380911.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/472/medium640/projects_edited_P1380911.jpg?1664474515)

The slide loop attaches to the NeoSlider's slide pot and inserts into the main horn loop to mimic a trombone's slide.

![projects_edited_P1380918.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/473/medium640/projects_edited_P1380918.jpg?1664474527)

## Other Materials

If you don't want to 3D print the trombone, you could use cardboard tubes or PVC pipe to construct a similar shape.

# CircuitPython Trombone Champ Controller

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/115/467/medium800/projects_tromboneChampFritz_bb.jpg?1664391179)

Arcade Button

- **Button GND** to **Button LED GND**
- **Button GND** to **board GND**
- **Button LED anode** to **board A0**
- **Button input** to **board A1**

NeoSlider (Connected with a STEMMA QT cable)

- **STEMMA SCL** to **board STEMMA SCL**
- **STEMMA SDA** to **board STEMMA SDA**
- **STEMMA VIN** to **board STEMMA 3V**
- **STEMMA GND** to **board STEMMA GND**

# CircuitPython Trombone Champ Controller

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_qtpy_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# CircuitPython Trombone Champ Controller

## Code the Controller

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below. It will download as a zipped folder.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Trombone_Champ_Controller/code.py

## Upload the Code and Libraries to the QT Py RP2040

After downloading the Project Bundle, plug your QT Py RP2040 into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

Your QT Py RP2040&nbsp; **CIRCUITPY&nbsp;** drive should look like this after copying the&nbsp; **lib** &nbsp;folder and the&nbsp; **code.py&nbsp;** file.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/Trombone_Champ_Controller.png )

## How the CircuitPython Code Works
First, the arcade button and its LED are set up as an input and an output, respectively. The arcade button's pin is passed to `Debouncer()` to utilize the `adafruit_debouncer` library. Then, `keyboard` and `mouse` objects are set up with the `usb_hid` libraries. Finally, the `neoslider` is set up to work over I2C.

```python
# LED for button
led = DigitalInOut(board.A0)
led.direction = Direction.OUTPUT

#  button setup
key_pin = DigitalInOut(board.A1)
key_pin.direction = Direction.INPUT
key_pin.pull = Pull.UP
switch = Debouncer(key_pin)
# button to toot in the game (can be any key or a mouse click)
key_pressed = Keycode.SPACE

# keyboard object
time.sleep(1)  # Sleep for a bit to avoid a race condition on some systems
keyboard = Keyboard(usb_hid.devices)

#  mouse object
mouse = Mouse(usb_hid.devices)

# NeoSlider Setup
neoslider = Seesaw(board.STEMMA_I2C(), 0x30)
pot = AnalogInput(neoslider, 18)
pixels = neopixel.NeoPixel(neoslider, 14, 4, pixel_order=neopixel.GRB)
```

## Rainbows and Variables
A function from the NeoSlider example code, `potentiometer_to_color()`, is created to map the potentiometer's values to color values. This has the NeoSlider's NeoPixels display a rainbow swirl effect when the slider is used.

Three variables are created before the loop. `last_value` will track the last read value from the potentiometer. `diff` will track the difference between the current reading from the potentiometer and `last_value`.

`mouse_sensitivity` is used for the cursor movement. You can adjust this value to move the cursor faster or slower depending on your trombone slide preferences.

```python
#  scale pot value to rainbow colors
def potentiometer_to_color(value):
    return value / 1023 * 255

#  last value of the potentiometer
last_value = 0
#  difference between last_value and current value
diff = 0
#  mouse movement sensitivity
#  increase value for faster movement, decrease for slower
mouse_sensitivity = 8
```

## Reading Inputs
In the loop, `y` reads the value of the potentiometer. `switch.update()` reads the arcade button's state. `pixels.fill()` changes the color of the NeoSlider's NeoPixels to the mapped color of the rainbow depending on the potentiometer's value.

```python
#  read the slide pot's value (range of 0 to 1023)
    y = pot.value
	#  debouncer update
    switch.update()
    # colorwheel for neoslider neopixels
    pixels.fill(colorwheel(potentiometer_to_color(pot.value)))
```

## The Toot
To toot the trombone in the game, you need to press any key on the keyboard or click the mouse. This project uses the arcade button to do this.

If the arcade button is pressed, the arcade button's LED lights up and a space bar keycode is pressed. The keycode will be active the entire time that the arcade button is held down. When the arcade button is released, the LED is turned off and the space bar keycode is released.

```python
#  if button released
    if switch.rose:
		#  turn off button LED
        led.value = False
		#  release all keyboard keys
        keyboard.release_all()
	#  if button pressed
    if switch.fell:
		#  turn on button LED
        led.value = True
		#  press the space bar
        keyboard.press(key_pressed)
```

## The Slide
The game changes the pitch of the trombone, imitating a trombone's slide, by moving the mouse cursor up and down on the screen. The NeoSlider is used to achieve this.

The current value of the potentiometer is compared to the last value. If the values don't match, then the cursor will move. If the last value was larger, then the cursor moves in a negative value. If the last value was smaller, then the cursor moves in a positive value.

`diff` is used to scale the cursor movement depending on the difference between the current potentiometer reading and the previous reading.

If the value of the potentiometer does not change, then the cursor does not move. This is important for the trombone playing in the game.

```auto
#  if the current value of the pot is different from the last value
    if y != last_value:
		#  if the last value was bigger
        if last_value &gt; y:
			#  find the difference
            diff = abs(last_value - y)
			#  divide by 10
            diff = diff / 10
			#  move cursor negative for range of difference
            for i in range(diff):
                mouse.move(y=-(mouse_sensitivity))
		#  if last value was smaller
        if last_value &lt; y:
			#  find the difference
            diff = abs(last_value - y)
			#  divide by 10
            diff = diff / 10
			#  move cursor positive for range of difference
            for i in range(diff):
                mouse.move(y=mouse_sensitivity)
		#  reset last value
        last_value = y
	#  if value is 0
    if y == 0:
		#  slight movement
        mouse.move(y=-2)
	#  if value is 1023
    if y == 1023:
		#  slight movement
        mouse.move(y=2)
```

# CircuitPython Trombone Champ Controller

## Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/115/459/medium800/projects_edited_P1380848.jpg?1664389039)

## Ground Connections
Solder a wire between the arcade button's two **GND** legs to connect them together. One leg is for the button and the other is for the button's LED.

![projects_edited_P1380853.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/460/medium640/projects_edited_P1380853.jpg?1664389048)

Solder a wire from one of the button's **GND legs** to the QT Py's **GND pin**.

![projects_edited_P1380861.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/461/medium640/projects_edited_P1380861.jpg?1664389096)

## Arcade Button LED
Solder a wire to the button's **LED's anode**.

![projects_edited_P1380863.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/462/medium640/projects_edited_P1380863.jpg?1664389127)

Solder the **LED anode's** wire to the QT Py's **pin A0**.

![projects_edited_P1380864.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/463/medium640/projects_edited_P1380864.jpg?1664389156)

## Arcade Button Input
Solder a wire to the **button's input** leg.

![projects_edited_P1380869.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/464/medium640/projects_edited_P1380869.jpg?1664389187)

Solder the **button's input** wire to the QT Py's **pin A1**.

![projects_edited_P1380872.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/465/medium640/projects_edited_P1380872.jpg?1664389224)

That completes the soldering for this project!

# CircuitPython Trombone Champ Controller

## Assembly

## Main Horn Loop
Attach the main horn piece to the main horn bend with M2.5 screws and nuts.

![projects_edited_P1380882.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/474/medium640/projects_edited_P1380882.jpg?1664474559)

Run the QT Py and the arcade button wires through the arcade button mount and the main horn bend.

![projects_edited_P1380887.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/475/medium640/projects_edited_P1380887.jpg?1664474621)

Mount the arcade button mount to the main horn bend with M2.5 screws and nuts. Insert the arcade button into the mounting hole.

![projects_edited_P1380889.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/476/medium640/projects_edited_P1380889.jpg?1664474658)

Plug a STEMMA QT cable into the QT Py's STEMMA port. Then, insert the QT Py vertically into the horn electronics piece. Line up the QT Py's USB port and STEMMA cable with the holes.

![projects_edited_P1380895.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/477/medium640/projects_edited_P1380895.jpg?1664474698)

Mount the horn electronics piece to the main horn loop with M2.5 screws and nuts.

![projects_edited_P1380897.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/478/medium640/projects_edited_P1380897.jpg?1664474773)

## Slide Loop
Attach the slide bend to the inner slide piece with M2.5 screws and nuts.

![projects_edited_P1380903.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/479/medium640/projects_edited_P1380903.jpg?1664474807)

Attach the potentiometer slide to the slide bend with M2.5 screws and nuts. The potentiometer slide should have its potentiometer mounting hole facing the inside of the assembly.

![projects_edited_P1380906.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/480/medium640/projects_edited_P1380906.jpg?1664474834)

Plug the other end of the STEMMA QT cable into the NeoSlider's bottom STEMMA port. The front logo should be oriented right-side up in the top left-hand corner with the STEMMA QT cable coming out the opposite side of the board.

![projects_edited_P1380899.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/481/medium640/projects_edited_P1380899.jpg?1664474896)

![projects_edited_P1380900.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/482/medium640/projects_edited_P1380900.jpg?1664474905)

Insert the NeoSlider's knob into the mounting hole on the slide loop. Mount the NeoSlider to the mounting holes on the horn electronics piece. The holes are undersized, so M2.5 screws should attach without needing any nuts.

![projects_edited_P1380909.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/483/medium640/projects_edited_P1380909.jpg?1664474988)

That completes the assembly!

![projects_edited_P1380920.jpg](https://cdn-learn.adafruit.com/assets/assets/000/115/484/medium640/projects_edited_P1380920.jpg?1664475081)

# CircuitPython Trombone Champ Controller

## Usage

![](https://cdn-learn.adafruit.com/assets/assets/000/115/488/medium800thumb/projects_mozartGif.jpg?1664476749)

Plug your QT Py into your computer via USB. Then, launch Trombone Champ and pick out your favorite song to play with your newly assembled trombone controller.

To toot, press the arcade button to send a space bar key press. The arcade button's built-in LED will light-up every time its pressed.

![projects_buttonPlay.gif](https://cdn-learn.adafruit.com/assets/assets/000/115/490/medium640thumb/projects_buttonPlay.jpg?1664477138)

Slide the NeoSlider up and down to change the pitch of the trombone in the game. The 3D printed trombone's slide moves much like a real trombone for the full brass section experience minus the spit valve.

![projects_slidePlayer.gif](https://cdn-learn.adafruit.com/assets/assets/000/115/491/medium640thumb/projects_slidePlayer.jpg?1664477192)

https://youtu.be/z2mU5FlzMlg

## Going Further

This project could be adapted as a MIDI controller or other more traditional musical application. You could also use it as inspiration for other custom game controllers or change up the components, code or housing to better suit your needs.


## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

Out of Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### Adafruit NeoSlider I2C QT Slide Potentiometer with 4 NeoPixels

[Adafruit NeoSlider I2C QT Slide Potentiometer with 4 NeoPixels](https://www.adafruit.com/product/5295)
Our family of I2C-friendly user interface elements grows by one with this new product that makes it plug-n-play-easy to add a 75mm long slide potentiometer to any microcontroller or microcomputer with an I2C port.

Each breakout is 3" long and 0.8" wide, with a single linear...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5295)
[Related Guides to the Product](https://learn.adafruit.com/products/5295/guides)
### Arcade Button with LED - 30mm Translucent Clear

[Arcade Button with LED - 30mm Translucent Clear](https://www.adafruit.com/product/3491)
A button is a button, and a switch is a switch, but these translucent arcade buttons are in a class of their own. Particularly because they have&nbsp; **LEDs built right in!** &nbsp;That's right, you'll be button-mashing amidst a wash of beautiful light with these lil'...

In Stock
[Buy Now](https://www.adafruit.com/product/3491)
[Related Guides to the Product](https://learn.adafruit.com/products/3491/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
### Pink and Purple Woven USB A to USB C Cable - 2 meters long

[Pink and Purple Woven USB A to USB C Cable - 2 meters long](https://www.adafruit.com/product/5044)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers and more.&nbsp; [If you want something just like it but for Micro B, we have a B...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5044)
[Related Guides to the Product](https://learn.adafruit.com/products/5044/guides)
### Black Nylon Machine Screw and Stand-off Set – M2.5 Thread

[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)
Totaling 380 pieces, this **M2.5 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M2.5 size screws fit almost all of the Adafruit breakout/dev board mounting holes...

In Stock
[Buy Now](https://www.adafruit.com/product/3299)
[Related Guides to the Product](https://learn.adafruit.com/products/3299/guides)

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Adafruit NeoSlider](https://learn.adafruit.com/adafruit-neoslider.md)
- [Computer Space Mini Arcade](https://learn.adafruit.com/computer-space-mini-arcade.md)
- [How to Build a Testing Jig](https://learn.adafruit.com/how-to-build-a-testing-fixture.md)
- [Tyrell Desktop Synthesizer](https://learn.adafruit.com/tyrell-desktop-synthesizer.md)
- [Kitty Toe Bean Keypad with Color TFT](https://learn.adafruit.com/kitty-toe-bean-paw-keypad-color-tct.md)
- [NFC Raspberry Pi Media Player](https://learn.adafruit.com/nfc-raspberry-pi-media-player.md)
- [Mini Pinball Table with Gemma M0](https://learn.adafruit.com/mini-pinball-table-with-gemma-m0.md)
- [reef-pi Guide 2: Power Controller](https://learn.adafruit.com/reef-pi-power-controller.md)
- [BrainCraft Camera Case](https://learn.adafruit.com/braincraft-camera-case.md)
- [Stand for Feather ESP32 with Reverse TFT](https://learn.adafruit.com/stand-for-feather-esp32-with-reverse-tft.md)
- [BLE Light Switch with Feather nRF52840 and Crickit](https://learn.adafruit.com/bluetooth-light-switch-with-crickit-and-nrf52840.md)
- [RGB LED Matrix Cube with 25,000 LEDs](https://learn.adafruit.com/rgb-led-matrix-cube-for-pi.md)
- [Hexpad](https://learn.adafruit.com/hexpad.md)
- [Arcade Bonnet Controller](https://learn.adafruit.com/arcade-bonnet-controller.md)
- [PyPortal Weather Station](https://learn.adafruit.com/pyportal-weather-station.md)
- [PyPortal Air Quality Display](https://learn.adafruit.com/pyportal-air-quality-display.md)
