Tuesday, April 13, 2010

How to apply effects to your voice in Team Fortress 2

Recently I've started using effects on my voice while playing TF2 and some people were asking me how I did it. Some people were also telling me to shut the hell up, but more people still were telling me to say funny things or various movie quotes into my microphone. I showcased the effects on my favorite server at nom-nom-nom.us and it was received warmly, as long as I didn't talk too much and risk lashback for being just plain annoying. I said I would upload a video for demonstration purposes and write a tutorial. I've finished the video, now It's on to the tutorial. If you can follow these instructions, you should be ready to add a touch of mystique, character, or just plain WTF to your gaming sessions.

Here's what you'll need to get going:
  • A microphone (no, REALLY?) I suggest a USB mic. These are getting easier to find and you could probably find one at a big store that has an electronics or music section. My advice? Just go to your local video game shop and buy a used Hannah Montana or Rock Band microphone, they're all the same and they all work! You probably already have a Rock Band microphone laying around anyway.
  • A sound editing program. I'm not talking something cheesy and built-in with your operating system. You need a real sound editing program. It must be able to work with VST plugins. Remember that, it's important. I suggest FL Studio. I wanted to use Adobe Audition, but it only ran VST plugins in post-processing (not live). FL Studio can run them and process the sound live which is what we need. Both Audition and FL Studio cost $$$ but FL studio has a free demo version. I can't tell you if that works or not, because I believe the demo version blocks plugins or something. There may be freeware floating around somewhere that you could use too, but that's your own adventure as I'll be teaching how to do all this through FL Studio.
  • Virtual Audio Cable. This program lets you pipe audio between programs by creating fake inputs and outputs. This program also costs money, but the trial version will work for what we're doing. However, the trial version has a robot voice that blurts out "TRIAL!" ever 15 seconds or so. This won't be too big of a problem since nobody will hear it unless you're talking way too much. You can hear the voice say TRIAL a couple times in my video.
  • Voxengo Recorder. This is a free VST plugin that can reroute audio by quickly recording it and outputting it somewhere. You won't need this for when you're playing games, but you will need it to get set up.
  • OPTIONAL: Autotune. I'm guessing most of you that are here just want to learn how to autotune your voice in-game. That's another VST plugin you'll need then. FL Studio has tons of effects you can use but you'll need this if you want Autotune.
Now you've either got everything you need and are ready to get started or you already gave up while looking at the list. In case of the latter, you gave it a good try, go drink some milk and reflect on your life. In the case of the former, let's begin.

  1. Plug your microphone in.
  2. Install FL Studio and get everything running. Once you've got it all going, close it, you just needed to make sure it was installed correctly.
  3. Install Virtual Audio Cable. Once that's installed visit the control panel that it has installed in your start menu. Make sure the number of cables is set to 1 and that the LINE box is checked. You don't need to mess with anything else. Once those settings are met, close the control panel; the actual program runs in the background.
  4. Install/extract the VST plugin for Voxengo Recorder. You may not actually need to install anything, but you need to get all the files unpacked until you find the file named VoxengoRecorder.dll. This is the plugin.
  5. Place the VoxengoRecorder.dll file in the directory called VstPlugins. It should be its own file in C>Program Files.
  6. If you're installing autotune as well. Find Autotune's .dll file and put it in the same VstPlugins directory.
  7. Now open up FL studio.
  9. Under INPUT/OUTPUT select ASIO4ALL. The window should change slightly, select the new ASIO PANEL button.
  10. On the ASIO panel, click the wrench button in the lower right for advanced options, this adds more options that you need. To the left of the window you should see some selections. These are sound tools that FL Studio has detected and we're going to pick the ones we want to work with. NOTE: When you select an audio device, FL Studio lays claim to it and other programs can have trouble using it.
  11. Press the plus sign (+) next to a device to expand it's options. Turn Virtual Audio Cable ON and turn on the 'OUT' extension but TURN OFF THE 'IN'.
  12. Locate your microphone in the list of devices and turn it and any extensions it has on.
  13. Your sound card will probably have many options. Make sure that the main button is turned on and most of the extension should be on by default too. If you can't get sound later on, try enabling more sound devices in this menu. You're done with this window for now.
  14. Back in main FL Studio, access the mixer by pressing F9 or under VIEW>MIXER.
  15. On the mixer find the IN selector to the right and select your microphone. It'll have the same name it did in the ASIO panel. Once you've selected your mic as the input, you should be able to affect the mixer visibly by talking or tapping the mic, but you probably won't hear anything yet.
  16. Then locate the OUT selector on the bottom of the little window and select Virtual Cable 1 1. What you've just done is told FL Studio to get its audio from your microphone and output it to the Virtual Audio Cable.
  17. Now all the slots that lay between the IN and OUT are the effects you want to use. You'll see that Fruity Limiter is already placed in at the bottom of the list. You click on an effect's name to show or hide it. The small light can be clicked to turn it off or on. The volume knob does what it sounds like it does. Sound that comes through the selected input will be put through all the effects you've added in order starting at the top and then the result is played through the selected output.
  18. Now we'll add effects and plugins. Select the pulldown button next to an open effects slot to get the selector for things you can put there. The first one we'll add is Voxengo Recorder. To get to it you have to select "more" from the list and locate it under "VST plugins." Check off it's box to add it to the main list and hit the refresh button. Now it should be in the list with the other effects and you can add it into an available slot. If you're going to use autotune or other external VST plugins you just repeat this process while locating and enabling them as well.
  19. Use the pulldown bar again to select Fruity Limiter and move it up one notch to slot 7 from slot 8. Now move Voxengo Recorder into slot 8.
  20. Now click on Voxengo Recorder to open its window in case it's not already opened. Under "Output to" select MME, not file. Under MME device, select your computer's main sound software, probably "Microsoft Sound Mapper". When you press START Voxengo Recorder will now steal the sound as it passes through and play it through your computer so you can hear and check yourself. This is needed because otherwise the sound would just be routed into Virtual Audio Cable and you wouldn't hear it. Voxengo is just for monitoring though, you should turn it off when you're all set up unless you want to hear yourself talking in-game.
  21. Start Voxengo Recorder and make sure the sound it being played into a device you can hear. Once you can hear yourself, adjust the microphone's levels with Fruity Limiter until it sounds good. Remember to move Fruity limiter above Voxengo Recorder in the effect order or else you'll be hearing your microphone signal before it is processed by the limiter. Make sure Voxengo Recorder is always the last effect in the order, or else your signal may be different from what you hear when broadcast.
  22. Now you can add any other effect you want from FL Studio's expansive list of built-in effects. Some good ones are Flanger, Phaser, and Reverb. Just don't make your voice to crazy and drowned in effects or else it won't be understandable online. Try to think that a voice transmitted over the internet is only half as understandable as the voice you're monitoring on your computer and you've got a good idea of how much you should modify your voice. To remove an effect that you've added and free up a slot, use its dropdown bar and select (none).
  23. Now to review: I showed you how to get the things you need, install them, select the right devices in FL Studio, choose the right input and output, and how to add and remove effects.
  24. One last thing, back on the desktop, right-click your volume icon and access the recording devices menu. How to do this can differ depending on which version of Windows you have. Google it if you get lost. Your virtual cable should be in the list somewhere. If you're not sure which one it is and you only have the trial version, watch the levels for a while. The one you want should jump up for a moment every once in a while because of the robot voice that says "Trial". Make sure it is the selected recording device with a checkmark next to it by right clicking it and selecting "enable", or by selecting it and choosing the "set default" option. Sometimes these won't work until you disable another device that has the checkmark next to it. Once you've got your Virtual Cable selected it'll be what TF2 accesses for microphone input.
  25. Before actually going online, open TF2 and go to VOICE in the options window. There you can perform a mic check by yourself to get the levels right.
Here's a demonstration video!

Though I suggest watching it on its real youtube page instead of a tiny window.

Monday, August 10, 2009

"Kill bar" guitar finished- Real guitar with Guitar Hero strum bar for killswitch

I had this idea a really long time ago and when we suddenly found out we had the extra parts lying around we decided to build it. This is for people like me who enjoy playing guitar and enjoy playing Guitar Hero. Its functions just like a normal guitar, but a strum bar from a Guitar Hero controller was wired into it and it serves as a killswitch.
For those of you who don't know, a killswitch is a function of a guitar that lets you rapidly turn the signal on and off, making a choppy sound. You can do this either by turning one pickup on and one off and rapidly switching between them with the pickup selector, or by wiring in your own button that shorts out the signal to "kill" it.
Usually a killswitch is just a button; pressing it kills the signal. To play rapidly you have to be able to press and depress the button really fast, and I had the idea of using a strum bar from a Guitar Hero controller as a sweet joke and a really useful killswitch. Unlike normal killswitches that you can only press in over and over, you can strum up and down with the strum bar which allows whoever's playing the guitar to killswitch incomprehensably faster than anyone else, to the point that you can't even discern pitch. Of course, you can also just strum down with your thumb on the bar for the classic killswitch sound.
And now... MAKING OF!
DISCLAIMER: These pictures are click-for-huge, but they all look pretty awful when magnified that much. That's what you get when you're trying to archive stuff and all you've got is an iPhone.

This is the strum bar from a wireless RedOctane Guitar Hero controller for Playstation 2. I had since moved on to 360 and this controller was pretty much useless since I had the infinietly superior SG style lying around, so I did what any nerd worth is own soldering iron would do and tore it apart.
The design of the strum bar is exceedingly simple: the bar is a plastic thing that sits on a couple pillars and as you push it up or down a pair of feet hit one of the switches seen in the above photo, detecting whether an up-strum or a down-strum (how else do you think it could tell to let you navigate menus, magic?) The electronic part of this project would be super easy because a killswitch is only a switch that shorts out the signal in a guitar. All I have to do is solder the switches on the little circuit board like I would any other switch and viola, easy killswitch. For simplicity's sake we're keeping the entire board in one piece for the project, since it's full of convinient mounting holes for the bar support and screw wells and, well, it's got switches lined up and soldered to it already! The only challenge will be cutting up the guitar to mount the board inside.
Lucky for us, the guitar, a 1983-86 Peavy Patriot, had a giant cavity already routed into it, even though the only component was a volume knob. We did some simple measurements (CRAM BOARD INSIDE, FIT GOOD) and set about making ultra-sure we'd cut the right size hole for the strum bar to poke through.
First we cut into the nearest heavy paper we could find (the box from an Adams Family VHS, classy) and slowly adjusted until the size was just right. We kept the piece as a template for our other cuts.
That tiny hammer is useless. Seriously, there isn't a single task on this earth it would be suitable for, except for posing for strange building pictures for the point of misleading people who don't read these explanatory paragraphs.
Using our paper template, we cut a slot into some real wood estimated to be the same thickness of the part of the guitar we're cutting up. We ran into our first problems here. On an Guitar Hero controller, the strum bar comes up a little out of the case and remains in place because the plastic case bumps up to allow room for the plastic "wings" that stick out to either side and rest on the support columns, allowing the waggling motion. Without it the strum bar doesn't stick out as far, but that isn't the problem. The problem was in the width of the slot. We cut it to just the right size for the strum bar, but since it doesn't stick out as far as far in our design there's a small width gain as it moves in either direction, causing it to stick because the plastic piece continues to get wider after going under the surface. If we cut the hole wide enough to avoid this there would be an awkward empty space on either side that only disappeared when the strum bar was all the way in one direction. We fixed this problem by filing the walls of the cut at an angle to allow some wiggle room and avoid sticking.
This is the board connected to our practice-wood photographed for maximum disorienting value. We drilled screw holes without measuring and as a result it was a terrible fit. That was to be expected though, we were just making sure the board would connect in the way we wanted.

Here's our cut into the guitar finally. We cut holes in the corners and then squared it out with a coping saw and finally getting it nice and smooth with files. We superglued our Adams Family-based template to the guitar as a guide.

Here's the first try at inserting the strum bar through the slot we cut. It works! But we still need to get a way to make it stick in the guitar instead of just floating there. We decided to use the screw wells that were cut into the strum bar's support columns. They connected everything together, so it would make a pretty easy connection to the guitar as well. We went out and got some much longer screws so they would reach as far as we needed and got to drilling. As we held the board in place, we found there was no good way to mark the spots where we needed to drill, as the surface was too rough to make scratches recognizeable and pencils were too wide. We solved this by burning a pencil away and sticking the graphite rods through the screw well.

Useful science: if you set a pencil on fire you will be left with an intact graphite rod.
With our drilling locations properly marked, we got to drilling and it was a perfect fit. We had to adjust the height a little to keep the strum bar from sticking, and the end result feels just like a Guitar Hero controller. On to wiring.
Here's the board connected to the guitar looking way more complex that it actually is. All those components are from its past life and we'll just be soldering to the two switches in the middle, leaving the other parts in place to make it look more impressive.
A close-up. As you can see, we drilled through the front of the guitar and all the way through the other side of the board, holding things in place with nuts.
Here's the board soldered to the volume knob. Again it looks way more complicated than it is. You can see in the bottom right that we found out the board gets in the way of the output jack a little bit, so we cut a notch into the board. The signal goes from the pickups (out the little hole in the upper-left of the board) and connects directly to the switches that are activated by the strum bar, then to the volume potentiometer and finally to the output jack. The killswitch works by connecting the positive and negative signal when a switch is pressed, causing them to cancel each other out and resulting in silence as long as the switch is pressed.
And here is a demo video: