QC

DIY Synth

Transform your Arduino UNO Q into a live musical instrument, play a drum machine and a polyphonic synthesizer in minutes!

Devices and components

Arduino® UNO™ Q 2 GB

Modulino™ button

Modulino™ buttons

Modulino™ movement

Distance Modulino™

Software and tools

Arduino Applications Lab

Project description

Hardware setup

Downloading and importing the project into Arduino App Lab

Open a browser on the UNO Q and navigate to this project page on Arduino Project Hub.

Download the project ZIP file from the Arduino App Lab section and save it. For example, in the Downloads folder.

Find the Arduino App Lab icon on the desktop or applications menu and double-click it.

In App Lab, click Create a new app, then choose Import app. In the file chooser, navigate to your Downloads folder, select the ZIP you just downloaded, and click Open.

App Lab extracts the project to ~/ArduinoApps/modulino-udp-pure-data-bridge/ and opens it automatically.

~/ArduinoApps/modulino-udp-pure-data-bridge/

With the project open, click the Run button. App Lab compiles and uploads the sketch to the microcontroller and starts the Python bridge at the same time. When the status indicator turns green or you see the sine wave animation on the board's LED matrix, both parts are working.

The different components of the project

sketch/sketch.ino

btn_event - Address, button 0, button 1, button 2

btn_event

Knob_event - Address, direction of rotation (−1 / 0 / +1), pressed

knob_event

dist_event - Address, distance in mm

dist_event

imu_event - Address, X/Y/Z acceleration, roll, pitch, yaw

imu_event

python/main.py

localhost:7400

http://IP_ADDRESS:7000

pd/main.pd

main.pd

.pd

pd/

main.pd - Main patch, open this one

main.pd

udp_io.pd - Receives UDP messages and routes them by sensor type

udp_io.pd

transport.pd - Manages tempo, play/stop and beatgrid

transport.pd

drum.pd - Drum machine engine

drum.pd

synth.pd - Polyphonic synthesizer

synth.pd

Project execution

Install PipeWire (first setup)

sudo apt-get update

sudo apt-get install -y pipewire pipewire-jack pipewire-audio-client-libraries wireplumber

sudo reboot

Connect a Bluetooth speaker

Make sure the Bluetooth speaker is turned on and in pairing mode.

Click the Bluetooth icon in the system tray (bottom right of the screen).

Choose Devices (or Connect New Device) from the menu.

The Bluetooth manager window will open. Click Search (or Scan) to discover nearby devices.

Double-click your speaker in the device list. When the status changes to Connected, you can close the window.

Run the Pure Data patch

~/ArduinoApps/modulino-udp-pure-data-bridge/

main.pd

main.pd

pd/

✓ Audio → Bluetooth: bluez_output.78_2B_64_36_BB_E8.playback_FL

Play the instrument

main.pd

Turn audio on: Click the AUDIO ON toggle in the upper left corner of the patch. The toggle turns orange.

Press play: Click the PLAY button in the Transport section. The beat grid starts cycling and you hear the default drum pattern.

Hardware controls

Rotating the knob controls the tempo (BPM). Clockwise = faster, counterclockwise = slower.

Pressing the button switches between Play and Stop.

Pressing button 1 (B0) turns the kick channel in the drum machine on or off.

Pressing button 2 (B1) turns the snare channel in the drums on or off.

Pressing button 3 (B2) turns the hi-hat channel in the drum machine on or off.

Using the Distance sensor changes the pitch of the synthesizer. Move your hand closer to increase the pitch, move your hand further away to lower it.

Motion sensor tilt (X-axis tilt) controls a user-selectable effect (wah frequency, wah Q, master filter, synth level or off) - default: wah frequency.

Motion sensor tilt (Y-axis tilt) controls another user-selectable effect - default: wah Q.

Additional manual commands

Audio ON: Enables audio output from Pure Data.

Master Volume: Control the full audio output level.

Drum machine: Change the drum pattern by clicking on each cell.

Print messages to console: Enable to see incoming values. Useful for debugging.

Range: Adjust the min and max values for X and Y tilt.

X fx and Y fy: Select which effect is assigned to each axis of the modulino movement.

Wave : Select between different waveform (since, saw, square and noise).

Dist limit: set the furthest threshold for the modulino distance, after this threshold the synth will be silent.

Checking live sensor values

http://IP_ADDRESS:7000

3D printed model assembly instructions

Arduino UNO-Q

Arduino module distance

Arduino Modulino Button

Arduino Modulino Movement

Arduino Modulino Buttons

Qwiic cables 5x5 cm

10 M3x6 screws

4 M3x10 screws

Screwdriver

FDM 3D printer (print bed size 160x90 mm minimum)

3D printing filament

(optional) a small pliers

Printing Tips

Button pad

Tilting cross

Tilt plane

Tilt Knob

the holes for the power cable in the upper left corner of the base;

the protruding joints of the inclination plane.

Assembly steps

Connect the UnoQ and Modulinos with the Qwiic cables, following this order: UnoQ -> Motion -> Buttons -> Button -> Distance.

Gently press the tilt cross (if printed with a flat side, face down) into the joint on the right side of the base, until it clicks into place.

Place the Modulino movement on the tilt plane, the button on the Modulino distance and screw them together with 2 M3x10 screws.

Run the cables in and out of the Modulino distance around the hooks below the tilt plane.

Gently press the resulting tilt assembly onto the tilt cross, until it clicks into place.

Bend down the four Button Pad spacers along the weak lines.

Place the Button Pad over the Modulino Buttons, and then screw them both in the spot next to the Tilt module, using M3x10 screws.

Screw the Modulino Button into the location right next to the Buttons, on the left.

Screw the Modulino Distance into the left inclined seat.

Screw the lid onto the base.

Arduino Applications Lab




Note: Content and images are from: https://projecthub.arduino.cc/, with some modifications.
If you want it removed due to copyright reasons, please leave a comment. Thank you.
I want to share this article more widely so that everyone knows about Arduino and your project.

SendData

Điều khiển trạng thái qua Firebase Trạng thái hiện tại: Đang tải... ĐỔI TRẠNG THÁI