The Electric Flute
Intro: The Electric Flute
Ok, first.. Yes, this isn't really a "flute" :)
It's actually a "recorder", but this project will allow it to make sounds like a flute, recorder, or even weird space noises. Kids love this project!
We'll turn a $1.00 recorder into an electric instrument complete with breath "blow" sensor!
A Propeller Platform running some synthesizer code provides the sound for this fun instrument.
You'll have a choice of converting the instrument to become fully electronic, or adding synth features to the existing instrument.
Here's what you'll need
* A Propeller Platform (Gadget Gangster)
* A Protoplus Module (Gadget Gangster)
* Five 10K resistors (Radio Shack)
* Four Tact switches (Radio Shack)
* A Piezo Transducer (Radio Shack)
* Some wire (Radio Shack)
* A toy recorder (Local Discount Store)
* A soldering iron & hot glue gun
We are going to create two different circuits for our instrument. (Picture 2)
The switch circuit for our four tact "finger" switches, and a piezo circuit for our breath "blow" sensor.
It's actually a "recorder", but this project will allow it to make sounds like a flute, recorder, or even weird space noises. Kids love this project!
We'll turn a $1.00 recorder into an electric instrument complete with breath "blow" sensor!
A Propeller Platform running some synthesizer code provides the sound for this fun instrument.
You'll have a choice of converting the instrument to become fully electronic, or adding synth features to the existing instrument.
Here's what you'll need
* A Propeller Platform (Gadget Gangster)
* A Protoplus Module (Gadget Gangster)
* Five 10K resistors (Radio Shack)
* Four Tact switches (Radio Shack)
* A Piezo Transducer (Radio Shack)
* Some wire (Radio Shack)
* A toy recorder (Local Discount Store)
* A soldering iron & hot glue gun
We are going to create two different circuits for our instrument. (Picture 2)
The switch circuit for our four tact "finger" switches, and a piezo circuit for our breath "blow" sensor.
STEP 1: Connecting Cable
You'll need to obtain some wire for seven connection points between the instrument and the Propeller Platform.
In my version of the project, I used some twisted pair network cable with the ends cut off.
* Note: if you use twisted pair cable as I have, you will want to reduce the resistors on the tact switches from 10k to 1.2k as the cable will have some internal resistance of it's own.
In my version of the project, I used some twisted pair network cable with the ends cut off.
* Note: if you use twisted pair cable as I have, you will want to reduce the resistors on the tact switches from 10k to 1.2k as the cable will have some internal resistance of it's own.
STEP 2: Child's Recorder
Start by obtaining an inexpensive child's recorder from your local dollar discount store.
I found this one for $1.00 at the local Dollar General
I found this one for $1.00 at the local Dollar General
STEP 3: Recorder+ OR Fully Electric Instrument
It's Decision Time!
At this point, you've got a choice...
1)Recorder+ You could attach the tact switches between the finger holes of the recorder. Doing this will allow the recorder to work as it was designed with the switches being available for electric sounds and effects.
2)Fully Electric Instrument In our design, I filled each of the finger holes down the front of the recorder with hot glue, then attached the tact switches over four of the original holes.
At this point, you've got a choice...
1)Recorder+ You could attach the tact switches between the finger holes of the recorder. Doing this will allow the recorder to work as it was designed with the switches being available for electric sounds and effects.
2)Fully Electric Instrument In our design, I filled each of the finger holes down the front of the recorder with hot glue, then attached the tact switches over four of the original holes.
STEP 4: Adding the Breath "blow" Switch
Using hot glue, attach the Piezo Transducer to the end of your instrument. This will act as the breath or "blow" switch giving you an additional trigger.
STEP 5: Preparing the Switches
Using some solder, tin the switch connections ahead of time to make it easier to attach the wire.
Pay special attention to use connections which are "diagonal" from each other. Using the top pin on one side, then the bottom pin of the other side of each switch. Connections "straight" across with short out.
Pay special attention to use connections which are "diagonal" from each other. Using the top pin on one side, then the bottom pin of the other side of each switch. Connections "straight" across with short out.
STEP 6: The Power Side of the Switches
Carefully solder one of the wires connecting to each of the pins on one side of the switches. This line with be the 3v power side of each of the tact switches. Be careful to connect to only the pin you prepared ahead of time.
If you are using twisted-pair cable, use ORANGE for this step.
If you are using twisted-pair cable, use ORANGE for this step.
STEP 7: Connecting the Switch Wires
Using four other wires, solder each line to other side of each of the tact switches.
The code code I used was:
Switch 1 - BLUE
Switch 2 - BLUE/WHITE
Switch 3 - GREEN
Switch 4 - GREEN/WHITE
The code code I used was:
Switch 1 - BLUE
Switch 2 - BLUE/WHITE
Switch 3 - GREEN
Switch 4 - GREEN/WHITE
STEP 8: Connecting the Piezoelectric Transducer
Connect the black and red wires of the Peizo Transducer. I used some black tape to hold everything in place.
Piezoelectric Positive (red) - BROWN/WHITE
Piezoelectric Negative (black) - BROWN
Piezoelectric Positive (red) - BROWN/WHITE
Piezoelectric Negative (black) - BROWN
STEP 9: The "pull-down" Resistors.
Each switch uses a resistor tied to ground as a "pull down". These resistors keep the switches from floating states.
Starting at P1, Insert and solder the 10k resistors into the Protoplus Module as shown.
Skip P0, P2, P4, P6, and P8 leaving plenty of room for each resistor.
(Reminder: If you used twisted pair, you may want to substitute P1,P3,P5 & P7 with 1.2k resistors)
Starting at P1, Insert and solder the 10k resistors into the Protoplus Module as shown.
Skip P0, P2, P4, P6, and P8 leaving plenty of room for each resistor.
(Reminder: If you used twisted pair, you may want to substitute P1,P3,P5 & P7 with 1.2k resistors)
STEP 10: Adding the Ground Wire
Add a wire from the one side of the resistors to GND.
STEP 11: Connecting the Switches to the ProtoPlus.
Strip and tin the other side of your cable. Insert the other side of the switch connections into the ProtoPlus as shown.
P1 - BLUE
P2 - BLUE/WHITE
P3 - GREEN
P4 - GREEN/WHITE
P1 - BLUE
P2 - BLUE/WHITE
P3 - GREEN
P4 - GREEN/WHITE
STEP 12: Connecting the Piezoelectric to the ProtoPlus
Now connect the two wires coming from the Piezo Transducer as shown below.
P9 - BROWN/WHITE
GND - BROWN
Also, connect the ORANGE wire to V33 (3.3v)
P9 - BROWN/WHITE
GND - BROWN
Also, connect the ORANGE wire to V33 (3.3v)
STEP 13: Build the Rest of the ProtoPlus Module.
It's time to build the rest of the ProtoPlus Module.
Dig out the pins, resistors, caps, and RCA connectors and follow the instructions here to assemble the Audio/Video output of the module.
While you don't really have to build the video portion of the circuit for this project, we think it's a good idea as the "Electronic Flute" could easily become "Electronic Flute Hero" with a little video game coding.
https://www.instructables.com/id/Add-Video-Audio-to-your-Microcontroller-Project/?ALLSTEPS
Dig out the pins, resistors, caps, and RCA connectors and follow the instructions here to assemble the Audio/Video output of the module.
While you don't really have to build the video portion of the circuit for this project, we think it's a good idea as the "Electronic Flute" could easily become "Electronic Flute Hero" with a little video game coding.
https://www.instructables.com/id/Add-Video-Audio-to-your-Microcontroller-Project/?ALLSTEPS
STEP 14: Test Software
Time to install some software!
Let's start with a little test program to see if all the switches and breath "blow" sensor are working correctly.
1) Download and Install Propeller Tool from Parallax.com.
2) Download and unzip the test program as shown below.
Open "Electric Flute Test.spin" and use F11 to send it to your Propeller Platform.
Open Parallax Serial Terminal (installed with Propeller Tool) and select the COM port, and click Enable. Switch presses and blows should be displayed on the screen. This simple program allows you to easily debug your circuit, just in case something isn't connected quite right.
Let's start with a little test program to see if all the switches and breath "blow" sensor are working correctly.
1) Download and Install Propeller Tool from Parallax.com.
2) Download and unzip the test program as shown below.
Open "Electric Flute Test.spin" and use F11 to send it to your Propeller Platform.
Open Parallax Serial Terminal (installed with Propeller Tool) and select the COM port, and click Enable. Switch presses and blows should be displayed on the screen. This simple program allows you to easily debug your circuit, just in case something isn't connected quite right.
STEP 15: Playing the Electric Flute
Once you are seeing good results from the test program, download the "Electric Flute" program and extract it.
Open "Electric Flute.spin" and send it to your Propeller Platform with F11.
Grab your instrument and start playing!
This version of the software plays notes C E G A when the buttons are pressed, and notes D F B C when the buttons are pressed and the instrument is blown.
Open "Electric Flute.spin" and send it to your Propeller Platform with F11.
Grab your instrument and start playing!
This version of the software plays notes C E G A when the buttons are pressed, and notes D F B C when the buttons are pressed and the instrument is blown.
STEP 16: Advanced Changes
The audio magic behind "Electric Flute" is a synthesizer program running on the Propeller Platform called, SIDCOG.
The Commodore 64 computer had an amazing sound chip called the SID chip. SIDCOG is a software emulation of the same chip. By experimenting with the program settings, the SIDCOG software used in "Electric Flute", can be programmed to sound like anything from a piano, flute, violin, drums, or even crazy space sounds.
Here's how to change the sound settings:
The Octave of the instrument can be adjusted on line 25 of "Electric Flute.spin". Simply change the 11 to another number between 1 and 15.
The other settings can be changed in the file "SIDSynth.spin", starting at line 25.
attack := 5
delay := 5
sustain := 3
release :=1
volume : =5
cutoff := 200
PWN := 2048
Try these:
Trumpet
attack := 6
delay := 0
sustain := 8
release :=0
volume : =5
cutoff := 200
PWN := 2048
Violin
attack := 10
delay := 8
sustain := 10
release :=9
volume : =5
cutoff := 200
PWN := 2048
Each time you make a change, save the file, then jump over to "Electric Flute.spin" and re-upload to your Propeller Platform with F10. Hint: Play with the PWN and cutoff numbers for those crazy space sounds.
Have fun with this electric instrument!
Spin on!
Jeff Ledger
The Commodore 64 computer had an amazing sound chip called the SID chip. SIDCOG is a software emulation of the same chip. By experimenting with the program settings, the SIDCOG software used in "Electric Flute", can be programmed to sound like anything from a piano, flute, violin, drums, or even crazy space sounds.
Here's how to change the sound settings:
The Octave of the instrument can be adjusted on line 25 of "Electric Flute.spin". Simply change the 11 to another number between 1 and 15.
The other settings can be changed in the file "SIDSynth.spin", starting at line 25.
attack := 5
delay := 5
sustain := 3
release :=1
volume : =5
cutoff := 200
PWN := 2048
Try these:
Trumpet
attack := 6
delay := 0
sustain := 8
release :=0
volume : =5
cutoff := 200
PWN := 2048
Violin
attack := 10
delay := 8
sustain := 10
release :=9
volume : =5
cutoff := 200
PWN := 2048
Each time you make a change, save the file, then jump over to "Electric Flute.spin" and re-upload to your Propeller Platform with F10. Hint: Play with the PWN and cutoff numbers for those crazy space sounds.
Have fun with this electric instrument!
Spin on!
Jeff Ledger
15 Comments
TheOriginalNerd 5 years ago
This is really a creative idea. Glad you got it and shared it! Thanks!
susanrm 12 years ago
dropkick 12 years ago
Flutes are the oldest known musical instrument
The instrument we call a Recorder actually is a flute. Just a different type.
All flutes used to be this form.
Side blown flutes or transverse flutes are a newer incarnation of the instrument.
clarie91s 11 years ago
mrmerino 12 years ago
mdlmusic 12 years ago
I have been trying to come up with an electronic bagpipe chanter using cheap Casio keyboards that I gutted and a piece of PVC pipe for the chanter and have gotten close, but still haven't perfected it yet. You've inspired me to keep working on it.
agis68 12 years ago
gana_anaq2 12 years ago
I have some improuvement ideea to make the toy even more realistic.
Your child is puting the mouth for no sense on the toy. if you add inside a pressure sensor like a membrane attached to a piezzo speaker and you will go the output to an analog input and in the software modify gain or frecquency in a function like this : Freqency = (integer)(analog.read) + (integer)(frequence.value.actual button pressed.)
and for more complex sounds make a dependency between the buttons. like :
output.frecqency=freq.butt1+ freq.butt2 +....
mogui 12 years ago
Sometimes when I make an instrument by hand I give it a nice finish by wrapping it with nylon or cotton cord and then applying lacquer. This will hide all of your wires and black tape. Some hanging tassels would compliment this nicely. The cat would appreciate it.
Yes this project could be done very well with an Arduino. The cleverness in this design, beyond the original idea, is using the piezo as a breath sensor. This can be adapted to various other projects as well. Nice going!
The Propellor is more powerful than the basic Arduino, but what is needed here is a simple tone generator which is well within the capabilities of the 16 MHz Arduino. You can play with the crystal frequency of the Arduino to get an evenly divisible frequency for the tones you wish to produce. You can choose the processor you wish to learn.
Your tones can be pentatonic (or switchable to pentatonic), and if you make multiple instruments in the same pentatonic key, several children can play anything at the same time and there will be no dissonance! Everything will sound good. Imagine the creativity.
RonanOD 12 years ago
NDL32694 12 years ago
:)
rarebeasts 12 years ago
linuxkid 12 years ago
vicvelcro 12 years ago
Next time my niece and nephew come around, I'll see if they're interested in giving it a go.
mikeasaurus 12 years ago