Special Effects

Hey guys, Our first topic is making special effects with explosions and fire. The goal is to make a way to make safe special effects explosions and make them look realistic. Movie quality special effects on the chaep and/or on the safe. Please, dont copy the ideas of others. And we still except all other transmissions of diffrent ideas.

Topic by impossiblecorey   |  last reply


How to build a remotely activated spring-loaded glass-smashing special fx rig?

Hi all, I need to design/build a special fx rig that I can use to remotely break glass doors in a cabinet for a tv show. I've looked at the glass poppers sold at fx shops but they use squibs; this is a hidden camera prank show and the victim of the gag has to believe the glass smashed because they were singing in a high-pitched voice, so I can't use the squibs (the victim will hear them go off). Also, the glass is candy glass. I am imagining something like the hammer on a gun; something that I can cock and leave set in the cabinet, then perhaps pull a string to trigger it into hitting the glass. Anyone have better ideas? Many thanks, Damian

Question by damianzuch   |  last reply


SEEKING: I need a safe way/fx rig to explode a watermelon on a tv show...? Answered

Hi gang, I'm working on a show and I need to make a live audience believe that their 'telepathic psychic powers' have made a watermelon explode. I can build a booth with a lexan/plexiglass window so that watermelon doesn't spray the audience, this will also allow me to hide special fx rigs in it. I've done a somewhat similar rig before where I made the watermelon fall unnoticed through a trap door while a nozzle simultaneously sprayed watermelon guts against the plexi (so it looked like it exploded but didn't really). This time I'd really like to make it blow up.  I have a pyrotech license and have access to some basic explosives, but I think I would prefer to explore compressed air-based explosions. Anyway, any ideas would be appreciated. Please find a rough sketch attached. Many thanks! DAZU

Question by damianzuch   |  last reply


Popsicle Stick Guitar, LED Coffee Table Panel, Junkbot Planter

  Popsicle Stick Guitar LED Coffee Table Panel Junkbot Planters Laptop Hard Cover Portable Workbench Adjustable Round Bag Survival Stoves Wooden Kids' Pull Toy Moveable Garden Giant Ball from House M.D Special FX Bald Cap Desktop Zen Garden LED Projector Lamp Easy Origami Pallet House  

Topic by randofo 


How do I convert a USB Plasma Sphere to battery power?

I'm trying to make a "tesla cane" (just a cane topped off with a working plasma sphere) for my cousin's steampunk-themed wedding. I already have a USB Plasma ball (Model is here: http://www.thinkgeek.com/geektoys/science/964e/?), and I'd like to make it run off battery power. I'm good at soldering and dealing with small wires, but I've never measured voltage or anything like that. Advice? Has anyone attempted a project like this before? It seems like there are tons of "convert batteries to USB" tutorials but not many of the reverse. :)Thanks in advance!

Question by    |  last reply


what do i use to make a mold of my face?

Instead of using plaster, I saw on a show someone mix up a powder that he said was made with some kind of seaweed. It was the show "Unwrapped "on the Food Channel. He was making a jello mold of his face, I'm trying to get the name of this powder He uses it because it sets fast and does not stick to skin. also he got the idea while at the dentist getting a cast of his teeth Thank you. Tony Romano

Question by    |  last reply


Bulding up a new PC, which one would you think be the best? Answered

Intel ·ASUS P7P55D - Intel P55 Chipset  - LGA 1156  - DDR3 (2133MHZ OC), 2x PCI Express 2.0 x16 (CrossFire Support) - Special Features - TurboV EVO OC Processor (2nd Micro Processor onboard) 12+2 Xtreme Phase Power, T Probe (Active cooling Microchip), Asus EPU · Intel Core i5 750 Lynnfield Processor - 2.66GHz Quad Core, 45nm, LGA 1156, 8MB L3, 2.5GT/s DMI Interface ·Patriot 2048MB DDR3 1333MHZ MEM x2 ·9800GT 1GB FORSA GRAPHICS CARD or AMD ·Jetway 770 Socket AM2+/AM3,AMD™ 770 Chipset and AMD™ S700 Chipset ,Supports AMD Socket AM3/AM2+/AM2:AMD Phenom series processors, Athlon 64 X2 / Athlon 64 FX / Athlon 64 / Sempron processors,HT 3.0,Dual Channel DDR2/DDR3 memory technology ·AMD Phenom™ x4  Quad Core (9650) 2.3GHz Processor ·Patriot 2048MB DDR3 1333MHZ MEM x2 ·9800GT 1GB FORSA GRAPHICS CARD

Question by Ortaega   |  last reply


#HackHalloween with Instructables AND littleBits!

Have you already created a bitified Halloween project for Instructables' Halloween contest? Forget double toil and double trouble - you can submit your project to littleBits' #HackHalloween contest for double the chances to win! Just make sure it include Bits ;) (^**> Click here for all the spooky details <**^) PRIZES You can win a GoPro camera and up to $3000 worth of Bits! JUDGES Get your work in front of the amazing likes of …. Neil Huxley, Creative Director for Commercials at Digital Domain We <3 Neil's special FX skillz. Check out James Cameron’s “Avatar” and Zack Snyder’s “Watchmen” to see what we mean. Tony DeRose, Oscar Winning Scientist at Pixar Tony combines his years of working at Pixar with his love of learning to inspire young inventors. CHALLENGE First, invent a creepy costume or hair-raising prank OR use one you've already made! Next, film your own scary movie featuring your frightful masterpiece! TO ENTER Submit your video and documentation of your littleBits creation on YouTube and the Community Project Page with the hashtag #HackHalloween by midnight EST on SUNDAY, NOVEMBER 1st. The petrifying project possibilities are endless! You can…. - Trick out your pumpkin by making it a hack-o’-lantern - Amp up your Halloween gear! Time to pull out that glowing skeleton costume. - Make a trick AND treat candy bowl: a prank to petrify costumed candy-grabbers. Muuahhahahahahaha! - Create that creaky, spooky sound coming from around the corner Want to host a meetup with your friends? We've put together a nifty workshop guide for you.

Topic by liza.stark   |  last reply


Halloween: Angel Wings, Werewolf Costume, Jack-o-Lanterns

Sign-up for our newsletter here. Oct. 26, 2007 Welcome back! Our favorite holiday of the year is almost here and we're celebrating with a special newsletter! Here are some great Instructables to provide some inspiration for our DIY Halloween 2007 Contest. Be sure to take some photos or video of your creepy creations and enter to win some awesome prizes, including a trip to Maker Faire 2008! For those who are in the Bay Area in California, come by our Halloween Costume Ball tomorrow night! We want to see your costume! And for those who are near Boston, check out the Show &amp; Tell at MITERSnext Friday, November 2. So what are you waiting for? Check out these Instructables and get started! How to make a pair of Angel Wings In this Instructable I will explain how to make a pair of wings which could be used to dress up as an angel, bird, or anything else with feathered wings!posted by T0BY on Oct 23, 2007 Realistic Werewolf Costume Create your own werewolf costume! Moving jaw, padded body, lots of fur!posted by missmonster on Oct 20, 2007 How to convert an old swingset into a guillotine prop for Halloween Reuse an old pile of lumber that used to be a wooden swing set for a nice prop for Halloween.posted by Strapped-4-Cache on Oct 14, 2007 Life-size Skeleton Pumpkin Carving! I've been doing these skulls for several years, but recently I got the idea that I could make a whole skeleton out of pumpkins.posted by mcraghead on Aug 21, 2007 Over $5,000 in prizes! How to Apply Elf Ears Want elf ears on your head? Then show this Instructable to a friend because you can't put them on yourself!posted by jforbess on Oct 12, 2007 How to make a cardboard costume helmet Helmets are usually one of the hardest and most expensive parts to make for a cool Halloween costume so here's a simple method using cardboard.posted by Honus on Oct 4, 2006 DIY Girl Pirate Costume HOW-TO Do you feel that the Girl Pirate Costumes you find in the stores are too expensive and not original? Well, make your own!posted by threadbanger on Oct 25, 2007 Solid-state Halloween controller and how to build a Haunted House Halloween is my favorite holiday, so every year I create some sort of a haunted house - all for the neighborhood kids, of course!posted by ewilhelm on Oct 1, 2006 Pirate Cannon - A working replica of a naval cannon that fires pneumatically Halloween has been a pirate theme around here for a while. I had the sword, I had the treasure chest, I needed a cannon. posted by Part Time Chef.com on Nov 4, 2006 Special FX: Almost-free Squirting Blood Effect This instructable will show you how to make a Swiffer WetJet mop into a sweet squirting blood effect. posted by that_one_guy on Jun 23, 2007 Tips for Halloween pumpkin pictures Carving a Jack-O-Lantern is fun, taking loving pictures of the spooky glowing face is even more fun. posted by ewilhelm on Oct 31, 2007 Win a free trip to Maker Faire 2008! Laser Vortex Use a laser pointer, small motor, and a mirror to create an effect similar to what you might see at Halloween Horror Nights but on a smaller scale and much cheaper.posted by mever on Oct 18, 2006 Be a Ghostbuster for Halloween! This is an over-the-top costume, but come Halloween it is oh sooo worth it. People go absolutely flippin' nuts when they see the whole getup.posted by Honus on Oct 4, 2006 Realistic Wound FX In this following you will see how to make a simple, yet realistic and reusable, latex wound effect on a tight budget. posted by Pull and Twist on Jul 17, 2007 Biohazard beer barrel A cheap and easy cooler that belches fog into your party. posted by zieak on Nov 1, 2006 T-Rex Rooftopper Make your own roof explode with this gigantic invader. posted by hirerob on Oct 31, 2006 Nazgul Mask for $15-20 This is a quick, 2-hour project I pieced together for one of my students who requested a Nazgul King mask for a production he was working on. posted by Drakz on Oct 27, 2006 How to build a Five Foot Tall Jacob's ladder This classic climbing arc completes any mad scientist's dungeon. Don't touch the electrodes: they're at 12 kV! posted by ewilhelm on Dec 13, 2005 Travelling Mexican Wrestling Ring If you're dressed as a wrestler, you need to wrestle. And if you need to wrestle, you need a ring to wrestle in. posted by rachel on Nov 19, 2006 Now go build something spookily awesome, and I'll see you next week! - Eric

Topic by lebowski 


The animatronic project Is finished

Here my instructableMy Animatronic Mod ProjectIn 2003 I made a casemod MONSTERMOD ( picture 1), Just a creature sculpture tearing out of a PC case.And It Didnt Move . So , I want the next MONSTERMOD to MOVE.Maybe to tell me that I have email.... Picture people's PCs having Heads .There favorite movie star or rock star maybe a animal. Maybe like Hal from 2001Space Odyssey .But, My animatronic Mod Has no A.I. But maybe one day. Im programmingthe 16 servo movements into the PC and press the play to play the movements a lipsync routine.Well, For Over 2 years now I have been working My Animatronic Mod.My Animatronic Mod is a floating creature head over a desktop case.( picture 2 IMG_1383.jpg)It controlled my a 2 Mini SSC II (http://www.seetron.com) this allow the computer to control 16 RC servos.16 RC servos = 16 Movements .I made the teeth out of dental acrylic, The samething denture are made of.Teeth and fangs are made 1st in tooth color dental acrylic and shaped.Then are placed in dental wax .,the mold is a silicone putty is place on the teeth allow to setup overnight.To demold the wax is melted away with boiling water leaving the teeth in the silicone putty sockets.This is called the lost wax process.( picture 3,4,)After I made the eyes out of dental acrylic ,Which is a molded ping pong ball is 40 mm .In half 20 mm sandwhich in between the 2 halves is a metal small metal ball 10mm give me a ball joint and socket.The iris is a painted metal washer. The veins are silk yarn And is cover with clear dental acrylic .The white of the eyes was changed to black color ,To give more of a alien look. ( picture 6,7)I molding the finished eyes alginate and casting them in ultracal 30, ( picture 8) Ultracal 30 is the hardest plaster made.And place them in the sculpture.This will be for Proper registration for the eyes in the skull.( picture 9 )I had to sculpt face in Roma Plastilina Clay ( picture 10)and mold it in silicone( picture 11a,11b, 11 ) This molding process called a matrix mold . A layer of water clay cover theentire clay sculpture and Ultracal 30 is place on top of the water clay .After setup ,Its demolded and water clay removed .This water clay has made a space for the silicone.Matrix molda thin layer of water clay is place ( picture 12 ) and made the core A .This gave me the thickest for the skin .Molded core A in silicone and a thin layer of water clay is place in this mold also this made core B.And this gave the thickest of the Skull. Now I have 2 molds.( picture 13,14 )Mold 1 is the Skin moldMold 2 is the skull moldI casted foam rubber in mold 1 ( picture 15,)http://www.monstermakers.com/foam.htmlTo make the foam rubber skin337 gms. base67 grams foaming agent33 grams curing agent15 flow enhancer24 grams gelling agent4 grams ammoniaThe room temp73 degrees 40%Using a Sunbeam MixMaster Mixer1. Speed #1 - 1 minute (to blend all components)2. Speed #10 - 3 minutes : blend all3. Speed #3 - 4 minutes : refine4. Speed #1 - 30 seconds :refine5. Speed #1 - 30 seconds : ADD GELLING AGENT ( picture 16 )6. Speed #1 - 30 seconds : Backturn the bowlFoam rubber can be tricky.Mold 1 was place in a Hot box oven for 11 hours at 125 degrees .= A very soft and flexable skin ( picture 15,16 )Hot box oven 3'x 3'x 3 " plywood box with foil insulation with a single burner. This must be watched.( picture 17,18,19)I casted urethane Plastic from smoothon.com in mold 2.This gave me the Skull,The skull was trimed and dental acrylic teeth and eyes were place inside the skull .The mechanics were place using R/C servos.The skin was painted with PAX ( is a flexible paint). The skin was glue on rubber cement to the skull .And the hair was glued rubber cement also and placed.Hair is from National Fiber Technology ,Hair 1 was Blended Black and Brown modacrylic with White and Brown Mohair and Natural Goat hair.And hair 2 Black with gray texturized modacrylic with Yak and Horse hair.The PCMy motherboard (MSI KT6) and AMD 2500xp video card (MSI 6600)The case is LIAN LI PC-V800B .To make the lip sync move ,I used VSA , Visual Show Automation , http://www.brookshiresoftware.comThis aloud me to make a lip sync animation routine. Synchronize with graphical audio MP3 file.Not only that My Animatronic Mod looks Wicked ,It Talks Back.(Picture 1st floor) ( Picture 2nd floor)I designed the animatronic so I could repair it if needed, And the support pipe is like a swing arm so I can work on the PC too. By removing the back of the skull. Inside there are 2 floors the bottom floor has 6 servos :1 Head Up + Down2 Eyes Up + Down and left + right2 Eyelids1 Jaw2nd floor 7 servos3 right,left and center Brows1 Nose3 upper lip wireAnd also 2 servos are in the Jaw for lower lip wireand 1 left + right servo gimbal= 16 servosWhen uncovered ,Here is 32 feet of servo cable.(picture32 feet )The only thing connecting to the PC and the Animatronic is a modular cable (Lookslike a phone cable). Which is plug into a modular adapter that plug into the PC's serial port . The end of the modular cable plug in Mini SSCII Serial Servo Controller.you would be surprise how many people are into making monsters. Ive beenmaking monsters , masks and makeup fx for 30 years now.I put my 2 hobbies that Ienjoy together.Computers and making monsters.Im a dental lab tech. for 20 years now .I make dentures for a living.Thank You so muchGary WillettTo see Video Demos http://www.youtube.com/willettfxhttp://www.servocity.com..................For Servoshttp://www.nftech.com/ ...................For Hairhttp://www.smooth-on.com/ ............ Silicone,Urethane PlasticbooksTechniques of Three-Dimensional Makeup by Lee Baygan Special Make-Up Effects (Paperback)by Vincent Kehoe Men, Makeup & Monsters: Hollywood's Masters of Illusion and FX (Paperback)by Anthony TimponeStop-Motion Puppet Sculpting: A Manual of Foam Injection, Build-Up and Finishing Techniques (Paperback)by Tom Brierton Stop-Motion Armature Machining: A Construction Manual (Paperback)by Tom Brierton MagazineCinefex

Topic by willettfx   |  last reply


: Arduino + Adafruit wave sheild + IR + Keypad sound board

Hi , was wondering if you could point me in the right direction I'm very new to Arduino I built last year a simple board with adafruit wave shield and added a simple 12 digit key pad to play 12 sounds + power up I have got the codes for the KEYES IR receiver so know the IR is correctly connected and library loaded im trying to integrate the IR code so can change the sounds by IR remote ideally with option of the buttons (if have to loose the buttons and just use remote that's fine) have copied the code below for how it works now just buttons   I found some code for Cylon Pumpkin that works great with just the remote but would also like to integrate the 12 digit keypad Thank you in advance for any help or pointers you can suggest Richard CODE FOR 12 DIGIT BUTTON PRESS /* ADAVOICE is an Arduino-based voice pitch changer plus WAV playback. Fun for Halloween costumes, comic convention getups and other shenanigans! Hardware requirements: - Arduino Uno, Duemilanove or Diecimila (not Mega or Leonardo compatible). - Adafruit Wave Shield - Speaker attached to Wave Shield output - Battery for portable use If using the voice pitch changer, you will also need: - Adafruit Microphone Breakout - 10K potentiometer for setting pitch (or hardcode in sketch) If using the WAV playback, you will also need: - SD card - Keypad, buttons or other sensor(s) for triggering sounds Software requirements: - WaveHC library for Arduino - Demo WAV files on FAT-formatted SD card This example sketch uses a 3x4 keypad for triggering sounds...but with some changes could be adapted to use several discrete buttons, Hall effect sensors, force-sensing resistors (FSRs), I2C keypads, etc. (or if you just want the voice effect, no buttons at all). Connections: - 3.3V to mic amp+, 1 leg of potentiometer and Arduino AREF pin - GND to mic amp-, opposite leg of potentiometer - Analog pin 0 to mic amp output - Analog pin 1 to center tap of potentiometer - Wave Shield output to speaker or amplifier - Matrix is wired to pins A2, A3, A4, A5 (rows) and 6, 7, 8 (columns) - Wave shield is assumed wired as in product tutorial Potentiometer sets playback pitch. Pitch adjustment does NOT work in realtime -- audio sampling requires 100% of the ADC. Pitch setting is read at startup (or reset) and after a WAV finishes playing. POINT SPEAKER AWAY FROM MIC to avoid feedback. Written by Adafruit industries, with portions adapted from the 'PiSpeakHC' sketch included with WaveHC library. */ #include #include SdReader card; // This object holds the information for the card FatVolume vol; // This holds the information for the partition on the card FatReader root; // This holds the information for the volumes root directory FatReader file; // This object represent the WAV file for a pi digit or period WaveHC wave; // This is the only wave (audio) object, -- we only play one at a time #define error(msg) error_P(PSTR(msg)) // Macro allows error messages in flash memory #define ADC_CHANNEL 0 // Microphone on Analog pin 0 // Wave shield DAC: digital pins 2, 3, 4, 5 #define DAC_CS_PORT PORTD #define DAC_CS PORTD2 #define DAC_CLK_PORT PORTD #define DAC_CLK PORTD3 #define DAC_DI_PORT PORTD #define DAC_DI PORTD4 #define DAC_LATCH_PORT PORTD #define DAC_LATCH PORTD5 uint16_t in = 0, out = 0, xf = 0, nSamples; // Audio sample counters uint8_t adc_save; // Default ADC mode // WaveHC didn't declare it's working buffers private or static, // so we can be sneaky and borrow the same RAM for audio sampling! extern uint8_t buffer1[PLAYBUFFLEN], // Audio sample LSB buffer2[PLAYBUFFLEN]; // Audio sample MSB #define XFADE 16 // Number of samples for cross-fade #define MAX_SAMPLES (PLAYBUFFLEN - XFADE) // Remaining available audio samples // Keypad information: uint8_t rows[] = { A2, A3, A4, A5 }, // Keypad rows connect to these pins cols[] = { 6, 7, 8, 9 }, // Keypad columns connect to these pins r = 0, // Current row being examined prev = 255, // Previous key reading (or 255 if none) count = 0; // Counter for button debouncing #define DEBOUNCE 10 // Number of iterations before button 'takes' // Keypad/WAV information. Number of elements here should match the // number of keypad rows times the number of columns, plus one: const char *sound[] = { "Crashing" , "Damaged", "InFlight" , "PowerUp" , // Row 1 = Darth Vader sounds "Brkdown3" , "Brkdown2" , "Brkdown" , "PowerUp" , // Row 2 = Godzilla sounds "Landing", "drain" , "Shutdown" , "PowerUp" , // Row 3 = Dug the dog sounds "Silent", "TakeOff", "Vortex" , "PowerUp" , // Row 4 = Cartoon/SFX sound "PowerUp" }; // Extra item = boot sound //////////////////////////////////// SETUP void setup() { uint8_t i; Serial.begin(9600); // The WaveHC library normally initializes the DAC pins...but only after // an SD card is detected and a valid file is passed. Need to init the // pins manually here so that voice FX works even without a card. pinMode(2, OUTPUT); // Chip select pinMode(3, OUTPUT); // Serial clock pinMode(4, OUTPUT); // Serial data pinMode(5, OUTPUT); // Latch digitalWrite(2, HIGH); // Set chip select high // Init SD library, show root directory. Note that errors are displayed // but NOT regarded as fatal -- the program will continue with voice FX! if(!card.init()) SerialPrint_P("Card init. failed!"); else if(!vol.init(card)) SerialPrint_P("No partition!"); else if(!root.openRoot(vol)) SerialPrint_P("Couldn't open dir"); else { PgmPrintln("Files found:"); root.ls(); // Play startup sound (last file in array). playfile(sizeof(sound) / sizeof(sound[0]) - 1); } // Optional, but may make sampling and playback a little smoother: // Disable Timer0 interrupt. This means delay(), millis() etc. won't // work. Comment this out if you really, really need those functions. TIMSK0 = 0; // Set up Analog-to-Digital converter: analogReference(EXTERNAL); // 3.3V to AREF adc_save = ADCSRA; // Save ADC setting for restore later // Set keypad rows to outputs, set to HIGH logic level: for(i=0; i pinMode(rows[i], OUTPUT); digitalWrite(rows[i], HIGH); } // Set keypad columns to inputs, enable pull-up resistors: for(i=0; i pinMode(cols[i], INPUT); digitalWrite(cols[i], HIGH); } while(wave.isplaying); // Wait for startup sound to finish... startPitchShift(); // and start the pitch-shift mode by default. } //////////////////////////////////// LOOP // As written here, the loop function scans a keypad to triggers sounds // (stopping and restarting the voice effect as needed). If all you need // is a couple of buttons, it may be easier to tear this out and start // over with some simple digitalRead() calls. void loop() { uint8_t c, button; // Set current row to LOW logic state... digitalWrite(rows[r], LOW); // ...then examine column buttons for a match... for(c=0; c if(digitalRead(cols[c]) == LOW) { // First match. button = r * sizeof(cols) + c; // Get button index. if(button == prev) { // Same button as before? if(++count >= DEBOUNCE) { // Yes. Held beyond debounce threshold? if(wave.isplaying) wave.stop(); // Stop current WAV (if any) else stopPitchShift(); // or stop voice effect playfile(button); // and play new sound. while(digitalRead(cols[c]) == LOW); // Wait for button release. prev = 255; // Reset debounce values. count = 0; } } else { // Not same button as prior pass. prev = button; // Record new button and count = 0; // restart debounce counter. } } } // Restore current row to HIGH logic state and advance row counter... digitalWrite(rows[r], HIGH); if(++r >= sizeof(rows)) { // If last row scanned... r = 0; // Reset row counter // If no new sounds have been triggered at this point, and if the // pitch-shifter is not running, re-start it... if(!wave.isplaying && !(TIMSK2 & _BV(TOIE2))) startPitchShift(); } } //////////////////////////////////// HELPERS // Open and start playing a WAV file void playfile(int idx) { char filename[13]; (void)sprintf(filename,"%s.wav", sound[idx]); Serial.print("File: "); Serial.println(filename); if(!file.open(root, filename)) { PgmPrint("Couldn't open file "); Serial.print(filename); return; } if(!wave.create(file)) { PgmPrintln("Not a valid WAV"); return; } wave.play(); } //////////////////////////////////// PITCH-SHIFT CODE void startPitchShift() { // Read analog pitch setting before starting audio sampling: int pitch = analogRead(1); Serial.print("Pitch: "); Serial.println(pitch); // Right now the sketch just uses a fixed sound buffer length of // 128 samples. It may be the case that the buffer length should // vary with pitch for better results...further experimentation // is required here. nSamples = 128; //nSamples = F_CPU / 3200 / OCR2A; // ??? //if(nSamples > MAX_SAMPLES) nSamples = MAX_SAMPLES; //else if(nSamples < (XFADE * 2)) nSamples = XFADE * 2; memset(buffer1, 0, nSamples + XFADE); // Clear sample buffers memset(buffer2, 2, nSamples + XFADE); // (set all samples to 512) // WaveHC library already defines a Timer1 interrupt handler. Since we // want to use the stock library and not require a special fork, Timer2 // is used for a sample-playing interrupt here. As it's only an 8-bit // timer, a sizeable prescaler is used (32:1) to generate intervals // spanning the desired range (~4.8 KHz to ~19 KHz, or +/- 1 octave // from the sampling frequency). This does limit the available number // of speed 'steps' in between (about 79 total), but seems enough. TCCR2A = _BV(WGM21) | _BV(WGM20); // Mode 7 (fast PWM), OC2 disconnected TCCR2B = _BV(WGM22) | _BV(CS21) | _BV(CS20); // 32:1 prescale OCR2A = map(pitch, 0, 1023, F_CPU / 32 / (9615 / 2), // Lowest pitch = -1 octave F_CPU / 32 / (9615 * 2)); // Highest pitch = +1 octave // Start up ADC in free-run mode for audio sampling: DIDR0 |= _BV(ADC0D); // Disable digital input buffer on ADC0 ADMUX = ADC_CHANNEL; // Channel sel, right-adj, AREF to 3.3V regulator ADCSRB = 0; // Free-run mode ADCSRA = _BV(ADEN) | // Enable ADC _BV(ADSC) | // Start conversions _BV(ADATE) | // Auto-trigger enable _BV(ADIE) | // Interrupt enable _BV(ADPS2) | // 128:1 prescale... _BV(ADPS1) | // ...yields 125 KHz ADC clock... _BV(ADPS0); // ...13 cycles/conversion = ~9615 Hz TIMSK2 |= _BV(TOIE2); // Enable Timer2 overflow interrupt sei(); // Enable interrupts } void stopPitchShift() { ADCSRA = adc_save; // Disable ADC interrupt and allow normal use TIMSK2 = 0; // Disable Timer2 Interrupt } ISR(ADC_vect, ISR_BLOCK) { // ADC conversion complete // Save old sample from 'in' position to xfade buffer: buffer1[nSamples + xf] = buffer1[in]; buffer2[nSamples + xf] = buffer2[in]; if(++xf >= XFADE) xf = 0; // Store new value in sample buffers: buffer1[in] = ADCL; // MUST read ADCL first! buffer2[in] = ADCH; if(++in >= nSamples) in = 0; } ISR(TIMER2_OVF_vect) { // Playback interrupt uint16_t s; uint8_t w, inv, hi, lo, bit; int o2, i2, pos; // Cross fade around circular buffer 'seam'. if((o2 = (int)out) == (i2 = (int)in)) { // Sample positions coincide. Use cross-fade buffer data directly. pos = nSamples + xf; hi = (buffer2[pos] << 2) | (buffer1[pos] >> 6); // Expand 10-bit data lo = (buffer1[pos] << 2) | buffer2[pos]; // to 12 bits } if((o2 < i2) && (o2 > (i2 - XFADE))) { // Output sample is close to end of input samples. Cross-fade to // avoid click. The shift operations here assume that XFADE is 16; // will need adjustment if that changes. w = in - out; // Weight of sample (1-n) inv = XFADE - w; // Weight of xfade pos = nSamples + ((inv + xf) % XFADE); s = ((buffer2[out] << 8) | buffer1[out]) * w + ((buffer2[pos] << 8) | buffer1[pos]) * inv; hi = s >> 10; // Shift 14 bit result lo = s >> 2; // down to 12 bits } else if (o2 > (i2 + nSamples - XFADE)) { // More cross-fade condition w = in + nSamples - out; inv = XFADE - w; pos = nSamples + ((inv + xf) % XFADE); s = ((buffer2[out] << 8) | buffer1[out]) * w + ((buffer2[pos] << 8) | buffer1[pos]) * inv; hi = s >> 10; // Shift 14 bit result lo = s >> 2; // down to 12 bits } else { // Input and output counters don't coincide -- just use sample directly. hi = (buffer2[out] << 2) | (buffer1[out] >> 6); // Expand 10-bit data lo = (buffer1[out] << 2) | buffer2[out]; // to 12 bits } // Might be possible to tweak 'hi' and 'lo' at this point to achieve // different voice modulations -- robot effect, etc.? DAC_CS_PORT &= ~_BV(DAC_CS); // Select DAC // Clock out 4 bits DAC config (not in loop because it's constant) DAC_DI_PORT &= ~_BV(DAC_DI); // 0 = Select DAC A, unbuffered DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_DI_PORT |= _BV(DAC_DI); // 1X gain, enable = 1 DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); for(bit=0x08; bit; bit>>=1) { // Clock out first 4 bits of data if(hi & bit) DAC_DI_PORT |= _BV(DAC_DI); else DAC_DI_PORT &= ~_BV(DAC_DI); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); } for(bit=0x80; bit; bit>>=1) { // Clock out last 8 bits of data if(lo & bit) DAC_DI_PORT |= _BV(DAC_DI); else DAC_DI_PORT &= ~_BV(DAC_DI); DAC_CLK_PORT |= _BV(DAC_CLK); DAC_CLK_PORT &= ~_BV(DAC_CLK); } DAC_CS_PORT |= _BV(DAC_CS); // Unselect DAC if(++out >= nSamples) out = 0; } CODE I FOUND FOR IR  ClyonPumpkin That I want to integrate in above   /* * Text-to-speech example to speak the first n digits of pi. * The number is stored in flash, each digit is spoken one at a time. */ #include #include #include SdReader card;    // This object holds the information for the card FatVolume vol;    // This holds the information for the partition on the card FatReader root;   // This holds the information for the volumes root directory FatReader file;   // This object represent the WAV file for a pi digit or period WaveHC wave;      // This is the only wave (audio) object, since we will only play one at a time char eyesound[13]="eye2.wav"; int mute = 0; /* * Define macro to put error messages in flash memory */ #define error(msg) error_P(PSTR(msg)) // IR Remote code int RECV_PIN = 9;  // pin 11 used by SD card interface so select pin 9 for IR IRrecv irrecv(RECV_PIN); decode_results results; long lasttime=0, lastcode=0, timediff=0; //////////////////////////////////// SETUP void setup() {   // set up Serial library at 9600 bps   Serial.begin(9600);               if (!card.init()) {     error("Card init. failed!");   }   if (!vol.init(card)) {     error("No partition!");   }   if (!root.openRoot(vol)) {     error("Couldn't open dir");   }   irrecv.enableIRIn(); // Start the IR receiver } /////////////////////////////////// LOOP void loop() {   if(mute == 0) playcomplete(eyesound);   // check for keypress happened   if (irrecv.decode(&results;)) {      Serial.println(results.value, HEX);      switch (results.value) {        case 0x83228B74:    // 1          playcomplete("command.wav");          break;        case 0x83228F70:    // 2          playcomplete("entertan.wav");          break;        case 0x8322906F:    // 3          playcomplete("extermin.wav");          break;        case 0x83228A75:    // 4          playcomplete("leader.wav");          break;        case 0x8322847B:    // 5          playcomplete("survivor.wav");          break;         case 0x83227887:    // 6          playcomplete("atention.wav");          break;        case 0x8322629D:    // vol up          mute = 0;         // mute off          break;         case 0x83226E91:    // mute          { Serial.println("mute detected");            timediff=millis()-lasttime;            Serial.println(timediff);            if(lastcode!=results.value || (lastcode==results.value && (timediff>1600)) ) {               if( mute == 0 ) { // is mute off?                  Serial.println("toggle off to on");                  mute = 1;      // turn on                  // delay(1000);    // wait a bit for debounce                  break;                 }               if( mute == 1 ) { // is mute on?                  mute = 0;      // turn off                  Serial.println("toggle on to off");                  break;                 }              } // end if             break;           } // end case        } // end switch      lastcode = results.value;      lasttime = millis();      irrecv.resume();   // Receive the next value   } } /////////////////////////////////// HELPERS /* * print error message and halt */ void error_P(const char *str) {   PgmPrint("Error: ");   SerialPrint_P(str);   sdErrorCheck();   while(1); } /* * print error message and halt if SD I/O error */ void sdErrorCheck(void) {   if (!card.errorCode()) return;   PgmPrint("\r\nSD I/O error: ");   Serial.print(card.errorCode(), HEX);   PgmPrint(", ");   Serial.println(card.errorData(), HEX);   while(1); } /* * Play a file and wait for it to complete */ void playcomplete(char *name) {   playfile(name);   while (wave.isplaying);     // see if an error occurred while playing   sdErrorCheck(); } /* * Open and start playing a WAV file */ void playfile(char *name) {   if (wave.isplaying) {// already playing something, so stop it!     wave.stop(); // stop it   }   if (!file.open(root, name)) {     PgmPrintln("Couldn't open file ");     Serial.print(name);     return;   }   if (!wave.create(file)) {     PgmPrintln("Not a valid WAV");     return;   }   // ok time to play!   wave.play(); }

Topic by SithLordIII