Wikipedia:Reference desk/Archives/Computing/2011 February 23

= February 23 =

"Studio magic"
Music producers are able to take a singer who can barely sing and make them sound reasonably good. My question, then, is if a program exists, or could be written, which could do the same thing. Here are some of the things I would expect it to do:

1) Add background music, as in a karaoke machine.

2) Adjust pitch, when the singer goes off-pitch.

3) Adjust timing, when the singer goes off the target pace.

4) Mute all sounds when the singer should be silent, so no breathing noise or coughs come through.

5) Filter out high frequencies, so you don't hear too much hiss from S's.

6) If this works for one singer, then perhaps multiple singers could be used, each recorded separately, and combined.

So, the goal would be to make a song recognizable as having the singer's voice, but better. Is this doable with current technology ? If not, why not ? StuRat (talk) 00:13, 23 February 2011 (UTC)


 * First, the technology:
 * 1) any multi-track audio program can do this
 * 2) this is Auto-Tune, which is a plugin for several professional audio suites
 * 3) this is tempo quantisation; it's straightforward for some instruments (particularly when given a MIDI signal rather than actual audio) but figuring out what this actually means for a singer is hard. A decent producer with full-featured Digital Audio Workstation software can manually stretch a phrase (without pitch-shifting it) to fit the tempo, but automating that seems unlikely (for any normal kind of singing); most singing isn't terribly amenable to beat detection
 * 4) this is just a graphic equaliser
 * 5) this is a noise gate
 * 6) again, just multitrack
 * A half-decent karaoke machine does a bit of this (1,4,5,6 and could do some limited 2), all with basic, inflexible, dumb settings. But human voices and actual vocal performances are very nuanced and highly diverse, and if you tried automating this you'd either get something largely ineffective (that's a karaoke machine) or that altered the sound and made it sound obviously artificial. Distinguishing what makes Aretha Franklin and Suzanne Vega "good" and you and I "bad" (so as to know what knobs to twist to turn the latter into the former) is a real AI challenge. -- Finlay McWalter ☻ Talk 01:23, 23 February 2011 (UTC)


 * 4) can be done better with an automated "de-esser", which again most DAW software has, although producers would probably want to spot-fix this with EQ. -- Finlay McWalter ☻ Talk 01:26, 23 February 2011 (UTC)


 * Also, don't underestimate the power of reverb and chorus. These effects are easy to add in realtime or in post-production, using free software and/or professional/commercial tools.  Reverb and chorus can make a vocal sound much fuller than it actually is; but, like auto-tune, if over-used, create a very synthetic sounding vocal that may sound unpleasant.  We also have an article on overdubbing, a special-effect use of multitrack recording.


 * Regarding software: you can do all of this in Audacity. If you need the effect to work in real-time, you can try a line-in plugin for WinAMP and search for DSP effects plugins.  I have found the latency in many free software tools to be unsuitable for real-time audio effects.  You might find a low-cost DSP or analog signal conditioner electronics box at a professional music store; these usually do the trick better if latency is an issue.  Nimur (talk) 01:44, 23 February 2011 (UTC)

Thanks so far. Just to clarify, I'd like to use a camera analogy. There are cameras that allow you to adjust the zoom, focal length, aperture/f-stop, etc., manually, and those which are "point and click". I'm looking for software that's like the latter. You pick a song and sing into the microphone, and it "fixes" it, no questions asked. Is there anything like that out there ? StuRat (talk) 02:18, 23 February 2011 (UTC)


 * How is the software supposed to know if the singer is off-pitch or out of time? Will it have a transcription of how the song should be sung, or will it be able to access a recording?  There is text-to-speech software that can customise voices (albeit not without work) and allow them to mimic individuals, and many text-to-speech systems can sing melodies, so something in the general area would be possible, but again only if you know what it's supposed to sound like.  (Although many auto-tuned vocals don't sound anything like the original singer.) --Colapeninsula (talk) 16:02, 23 February 2011 (UTC)


 * It would work like a karaoke machine; you would pick a song and it would read the lyrics to you while you sing them, then it would add in background music. The difference is that it would also correct mistakes in pitch and timing, and perhaps a few others. StuRat (talk) 23:30, 23 February 2011 (UTC)

Microsoft Group Policy
I'm helping someone manage a few Windows XP + 7 machines for family. I've modified quite a few GP settings. (These aren't security related - several features are most easily changed via Group Policy settings).

I'm sure there is a way to effectively save these GP settings so they can be applied to other PCs, but I can't figure out from documentation how it's done. Some GP settings have well-known registry equivalents which makes it easy (.reg file) but others don't. As a home user, what's the quickest simplest way to save a number of GP settings so they can be easily applied to future installations? FT2 (Talk 03:12, 23 February 2011 (UTC)

Chaining .avi or .mkv files
I have a series of .avi files. I want to take a group of files that were recorded with different dimensions (i.e. one 1280x1024, one 640x480) and mash them into a single video.

I have a program that can convert .avi to a couple of other formats (been working with .mkv mostly). Windows movie maker has resulted in poor quality in the past and it takes forever, so I'd like to avoid using it.

Any ideas? SDY (talk) 03:13, 23 February 2011 (UTC)


 * Take a look at VirtualDub. It's free, doesn't install anything (just run the program from any folder) and allows quite a wide range of basic functions sufficient for your needs. It would not be hard to convert your files individually to the same format, then cut and append them into a single video. There's an input format converter here if you need to import from other formats than AVI. It can take a bit of getting used to, but it does the job well and is simple and very well supported. FT2 (Talk 03:25, 23 February 2011 (UTC)

Ubuntu Desktop 10.04 LTS - Changing the Screen Resolution
I am running Ubuntu Desktop 10.04 LTS in a virtual machine using Oracle VirtualBox on my workstation. The VM's screen resolution is set by default to 640x480, and I want to change it to 1200x900 - how do I do this? I know that the problem isn't with the VirtualBox settings because I have previously installed OpenSolaris in another VM, and that VM's default screen resolution was 1024x768. So the issue lies inside the Ubuntu VM. Thanks. Rocketshiporion ♫ 04:25, 23 February 2011 (UTC)


 * Sorry for being pedantic, but let me start by correcting a bit of confusion in the question. There is no such thing as "the Ubuntu VM".  The VM is the machine that Ubuntu is running on -- only this machine happens to be constructed out of software rather than hardware.  Concerning the question, Ubuntu generates its display using the X Window system, and for this to work, X needs to have a driver for the virtual machine you are using.  There is no guarantee that OpenSolaris and Ubuntu are using the same X driver, so there is no guarantee that they have the same capabilities.  The first thing to try, though, is to go into your System menu to the section dealing with the display and see whether you can manually alter the display resolution.  (Sorry, I'm in Windows rather than Ubuntu at the moment and can't remember the exact labels for the menus.) Looie496 (talk) 04:44, 23 February 2011 (UTC)


 * I'm well aware that the Ubuntu OS and the VM are two seperate entities. Sorry about any confusion; I was merely using Ubuntu VM as a short-form of virtual machine on which the Ubuntu Desktop operating-system is installed. But back to the actual question. I went to System -> Preferences -> Monitors and tried to change the screen resolution setting, but the only options provided in the drop-down menu are 640x480 and 800x800. Might there perhaps be some way to incfrease the screen resolution to 1200x900 via the command line? Thanks. Rocketshiporion ♫ 05:59, 23 February 2011 (UTC)


 * I haven't used VirtualBox, but if it's like VMware then you need to install a special video driver to get decent graphics support. Otherwise it falls back on a generic driver with limited features (probably VESA). You could go an entirely different route, like connecting via VNC or SSH with X forwarding, in which case you wouldn't need the graphics driver because you wouldn't be using the (virtual) graphics card. -- BenRG (talk) 07:49, 23 February 2011 (UTC)


 * I can't connect to the VM via VNC or SSH because I'm not remoting into the VM. VirtualBox runs as an application locally on my workstation, and the VM runs in a normal window. And resizing the window in which the VM is running makes no difference whatsoever to the VM's screen size. Rocketshiporion ♫ 08:12, 23 February 2011 (UTC)


 * Are you using the Open Source Edition or the proprietary version of Oracle VirtualBox (does it give  you have usb support ect)? Chapter 4. Guest Additions might give you the info your looking for.  --Aspro (talk) 10:17, 23 February 2011 (UTC)


 * The VM almost certainly has a virtual network card with an IP address that you can connect to, and if not you can add one. VMware has three options: host-only networking (equivalent to virtual Ethernet cards on the host and guest connected by a crossover cable), NAT (the host acts as a NAT router for the guest) and bridged (the guest acts as though it's on the same network as the host). I think VirtualBox has the same three options. Resizing the window will not solve your problem (as you discovered). -- BenRG (talk) 10:37, 23 February 2011 (UTC)


 * I have had this precise problem. My suggestion would be to ensure that your initial step on running your VM is to Install the Ubuntu distro, rather than running it Live.  It's easy to miss this instruction and produces the problem above. --Phil Holmes (talk) 18:09, 23 February 2011 (UTC)


 * I think you mean placing the ISO of Ubuntu on Desktop instead off trying to run it from a Ubuntu disc in the DVD drive.--Aspro (talk) 18:20, 23 February 2011 (UTC)


 * No. What I said was what I meant.  I had downloaded an ISO of a customised version of Ubuntu, and selected it as the boot medium for VirtualBox.  Its default run mechanism was "live", which runs it off the .iso.  To install it and establish your own preferences, you need to install it.--Phil Holmes (talk) 22:45, 23 February 2011 (UTC)


 * @Aspro - I downloaded the VirtualBox application from the VirtualBox website. It does support USB filters.
 * @Phil Holmes - The Lucid Lynx distribution is installed on the VM's VHD. The ISO was removed right after installation.
 * Rocketshiporion ♫ 02:17, 24 February 2011 (UTC)


 * This may be a stupid question, but have you tried resizing the VM window? At least if the VirtualBox tools are installed, it should register that and change the resolution of the virtual monitor appropriately.  Paul (Stansifer) 04:49, 24 February 2011 (UTC)


 * Yes, as I've stated above, I have tried resizing the window in which the VM is running. It made no difference at all to the VM's screen size. Rocketshiporion ♫ 05:17, 24 February 2011 (UTC)


 * Could you confirm that you have the Guest Additions installed? --Phil Holmes (talk) 12:50, 24 February 2011 (UTC)
 * Yes: Guest Additions is all important. As I posted above, here is the GA info Chapter 4. Guest Additions. With that installed, one can just drag the screen to the size that you (or your wife) whant's.... (Because as you say, you have USB support and thus have a version that needs this app)--Aspro (talk) 18:44, 24 February 2011 (UTC)

free video converters
What are some reliable free video converters that are available for download, that can convert any video to Nokia x2 supporting format fully. --RAIJOHN (talk) 07:18, 23 February 2011 (UTC)
 * A quick google search tells me x2 supports MPEG-4, 3GPP: H.263 and H.264 codecs. FFmpeg should handle most of those. SemanticMantis (talk) 16:18, 23 February 2011 (UTC)

FFmpeg certainly, and if you're not in Unixland, one of its frontends such as WinFF or HandBrake perhaps. If you can't find a preset that works, make a video with the phone and upload it somewhere, then someone can instruct you in how to duplicate its precise properties. ¦ Reisio (talk) 19:51, 23 February 2011 (UTC)

Ubuntu Lucid Lynx - displaying text on /dev/tty1 from /etc/rc.local
Hi, I have added a few lines to /etc/rc.local that output some text when my system boots. This worked under Ubuntu Hardy Heron. Now I tried upgrading to Ubuntu Lucid Lynx (the next LTS release), and while my code is being executed (I can see it if I add a "sleep 10" after it), the screen is blanked and replaced with the regular login screen after rc.local completes. Is there any way I can bypass this, so my messages remain on the /dev/tty1 screen, with the login appearing below? -- 78.43.60.13 (talk) 11:45, 23 February 2011 (UTC) (Addendum: After some more googling, I ran into a few messages saying the use of rc.local is deprecated when using an upstart-based system like Lucid Lynx. So, alternative question: How do I turn my rc.local-script into one that upstart understands?) -- 78.43.60.13 (talk) 12:01, 23 February 2011 (UTC)

Video Annotating
What sort of software would be used to add all the little animated stuff into the replays of football games we see on TV, where for instance dotted circles appear under the players and an animated arrow shoots out showing us what direction he went or should have gone? Would this kind of thing be done in Adobe After Effects? --  KägeTorä - (影虎)  ( TALK )  11:59, 23 February 2011 (UTC)


 * We have an article on the Telestrator, but it does not provide a lot of details. -- LarryMac  | Talk  13:34, 23 February 2011 (UTC)
 * Thanks, but that's not quite what I mean, I think. I was thinking more of the kind of animation you see in war documentaries showing the movements of forces across maps, and how they now seem to be used in sports commentaries (not in realtime, but after the action), albeit with little circles under the players as if it's a video game. --  KägeTorä - (影虎)  ( TALK )  14:08, 23 February 2011 (UTC)

Word doc format-from Mac to PC
I've been trying several different combinations, but they never work. I write a lot of documents where indentations are important (plays, mostly). I'll type them in the text editor on my mac (I've tried Pages, too, to no avail). The thing with text editor is that it allows me to save the file as a Word 2007 document. When I try opening it on a PC, though, all the lines I centered appear to the left. It's just annoying to have to fix fifty pages of that. Is there some trick I'm missing? Thanks! 129.3.179.97 (talk) 13:44, 23 February 2011 (UTC)
 * I know that 'why not try something else' is not usually the required answer, but I have never had any trouble with NeoOffice, if you want to give that a try. --  KägeTorä - (影虎)  ( TALK )  14:11, 23 February 2011 (UTC)


 * How are you creating the indentations? Not all whitespace is "created equally."  Depending on your program, white space and indentations might not be "portable."  I suspect "user error" is responsible and hope that this help-page from Microsoft can help you determine exactly what is getting garbled; but below I will try to explain why something so seemingly-simple as text-formatting can be so complicated.
 * A word processor is a very complicated program, nowadays. It reads your document as a binary file, deciphers the content, and runs a sophisticated program/algorithm to calculate the position of every single pixel of every single character that it displays on screen.  Different file-formats and different word-processors do not always have the exact same capabilities - so when you export between formats and programs, you need to "emulate" the behavior of the other document-processing program's layout engine and try to create a new and different document that would render the text and its position on the page in the same (or "most similar") way.
 * Simple text is represented as a plain text file, with no formatting information at all. When you open those documents, all you see is text characters, positioned arbitrarily on screen.  You can manually insert whitespace to "add" formatting to a plain-text file.  Word-processors also add metadata to store extra formatting information.
 * Of course the most portable type of blank character is a "space" character - from pressing "spacebar" - but not all programs interpret space-bar the same way. The next most portable whitespace is a tab character; opinions rage about whether it is a good or bad idea to use tabs instead of spaces.  Next, all the various types of formatting meta-data, such as adding paragraph-formatting commands (in Microsoft Office, this is the set of options under "Justify" and "Center" and so forth.  And in Microsoft Office, you can also add "tab stops" or tab limiter marks - the oft-misunderstood "tiny L" marks at the top of your document.  (See this Microsoft tutorial for more information - it may be the trick you need to solve your current problem).  You can also set margins, internal columns, floating text-boxes, and all kinds of other tools to position text on the page.  Most modern office suites, like OpenOffice.org and the Mac software like Pages also support similar sophisticated text-layout.  Now, because these formatting metadata rely on the text rendering program, they are inherently less portable than simple spaces and tabs - so those are the ones that require special handling when exporting to different formats.  One short answer is, "avoid complex formatting, and only use regular spaces and tabs."  This may be prohibitively difficult to maintain in a large document, and defeats the point of using a powerful word processor in the first place.  The next option you can try is to export to an intermediate format, like HTML - and hope that the other program can open that format.  In my experience, this can either solve your formatting issues or mangle the document even worse than before - it really depends on subtle details of how you performed your text layout.  Finally, as a last resort, you can simply stick to a single program that correctly interprets its own file-format and meta-data.  If you do so, you should think carefully about the best document format.  Many people prefer plain-text files, or HTML files, because they are easy to read and edit.  Many people prefer MS Word document files, because Microsoft Office is so omnipresent, and does have a lot of power and flexibility.  Finally, as a suggestion, use the most simple representation of your text that serves your purpose.  Plain-text might be unsuitable for your task, because of the complexity of your documents, but you might find that HTML is a good alternative, and is very portable between platforms - albeit with variations in final document appearance.  Nimur (talk) 16:10, 23 February 2011 (UTC)

Stand-alone spreadsheets for Windows
What stand-alone on-computer free spreadsheet would people recommend from personal experience please? I've switched from the huge OpenOffice to Abiword, which although a close MSWord clone, is only 5% the size of OpenOffice (tip to British users - move the british.heap file into the dictionary folder from the mistaken place where it is installed). But it does not have a spreadsheet.

In addition to those listed in Comparison of spreadsheet software and List_of_spreadsheets there is also Sphygmic, Abykus, and Spread32. Thanks 92.29.115.56 (talk) 15:15, 23 February 2011 (UTC)


 * From personal experience I have to say that there is simply no substitute for Microsoft Excel. Sorry it's not free.  Comet Tuttle (talk) 17:19, 23 February 2011 (UTC)
 * It really depends what you need from it. Excel has a lot of overkill functions in it that someone who is just summing columns and making graphs can do much easier or better with other things. (I use Numbers myself, which I find to be far superior than Excel for the few things I actually do with spreadsheets). --Mr.98 (talk) 18:40, 23 February 2011 (UTC)
 * I followed your lead and downloaded Abiword, but it has a lot of trouble with words with apostrophes in. Specifically, it puts a red underline on all of "shouldn't couldn't wouldn't isn't aren't didn't hasn't", and also "I'll" when smart quotes are on. I'm unable to add these words to the dictionary, because only the part up to the apostrophe is underlined, and I see no way to manually add (or remove) a word from the dictionary, so I would only be able to add, say, shouldn, which isn't a word. With smart quotes turned on, line-breaks can occur at apostrophes, so that for instance "haven'" can appear at the end of one line and "t" on the next. Is there any way to fix any of this? (I'm sorry I can't recommend a spreadsheet application.) 81.131.7.179 (talk) 20:43, 23 February 2011 (UTC)

I tried typing shouldn't couldn't wouldn't isn't aren't didn't hasn't into Abiword and it did not have any underlining at all. Perhaps you have the wrong dictionary installed. As it is open source you could in theory change the source code if you wish. Sorry I don't know what "smart quotes" are - why not just use ordinary quotes? Edit: a little tinkering shows that I only got your problem when I typed the above within quotes, but even then when I typed shouldnt and then added the ', there was not any underlining. So perhaps its a minor bug. Unfortunately it does not have a forum like normal software, but something else. I suggest turning off "Smart Quotes" which apparantly show quotes as 6699 rather than just "" - what I prefer. 2.97.221.215 (talk) 21:21, 23 February 2011 (UTC)
 * Oh! Deleting the apostrophe and reinserting it makes the underline go away. Good discovery. I visited their IRC channel and then left a couple of bug reports on their bugzilla thingy. Maybe I will fix it myself. Almost certainly I won't fix it myself, because it would be hard. The smart quotes thing seems more serious, really (every printed publication uses them, and they fail in their purpose of adding an air of professionalism if words sometimes break on apostrophes). 81.131.2.174 (talk) 22:47, 23 February 2011 (UTC)

Perhaps the problem is that the fancy "Smart quote" apoostrophe character is different in its character code from the normal '. You could try copying and pasting the SQ ' into the dictionary. To me the SQ ' and " look clumsy and in bad taste, so I'm not going to use them.

By the way, the big advantage of Abiword over OpenOffice is that the former can do grammar checking. 92.28.242.165 (talk) 12:16, 24 February 2011 (UTC)

avoiding SQL injection attacks?
I'm a VERY new PHP user, and trying to do something dangerous :)

I have set up SQLite, and would like to do this simple thing. Have an HTML table with data and an edit button in each cell, you click edit, then you can put in whatever information you want, and it gets updated into the table.

simple enough...but what am I supposed to do with the post'd data? if action=edit&cell=whatever&newdata=__________, what am I supposed to do with newdata before I insert it into the database? Thanks! —Preceding unsigned comment added by 109.128.211.187 (talk) 17:06, 23 February 2011 (UTC)
 * Our SQL injection article discusses how to do it wrong and how to do it right. --Sean 17:15, 23 February 2011 (UTC)


 * You can also take a look at the PHP manual's discussion of avoiding SQL injection attacks. --Mr.98 (talk) 22:05, 23 February 2011 (UTC)
 * Alternatively, just use PHP's PDO (Php Data Object). It has built in protection against sql injection attacks.--v/r - TP 18:18, 24 February 2011 (UTC)
 * The least is to sanitize the string mysql_real_escape_string.Smallman12q (talk) 02:39, 26 February 2011 (UTC)

Reciprocal www redirect checking
I have a certain url, and I want to find out which other sites, if any, are redirecting to that url. Is that at all possible? --78.35.195.4 (talk) 20:37, 23 February 2011 (UTC)
 * Standard Apache log files show redirect pages under the referer url. Using that, you can see which pages actually redirected but cannot see redirect pages that exist but were not used. -- k a i n a w &trade; 22:08, 23 February 2011 (UTC)
 * Where can I find that log file for any given website? --78.35.195.4 (talk) 23:14, 23 February 2011 (UTC)
 * You can't. Kainaw presumably thought you owned the site in question. I believe Google has a "what links to this page" feature, but I'm not aware of any such thing for redirects.  Sorry. --Sean 00:52, 24 February 2011 (UTC)
 * Ah, OK. Thanks to both of you for answering my questions. --78.35.195.4 (talk) 01:20, 24 February 2011 (UTC)

Permanently delete pages on MediaWiki?
I came to think about this question when browsing our company's own private wiki, which runs on MediaWiki just like Wikipedia does. Is it possible to permanently delete wiki pages on MediaWiki? I understand that WikiMedia projects don't allow permanently deleting pages because of GFDL reasons, but this question is not about wikis hosted by WikiMedia but a technical question about wikis running MediaWiki. Is such an action possible (without directly hacking the database) and if so, how is it done? J I P &#124; Talk 20:56, 23 February 2011 (UTC)
 * There is a DeletePagePermanently extension on MediaWiki.org that should be able to do that for you.  Nakon  20:59, 23 February 2011 (UTC)

Internet Archives
There is a certain awards site which is not active now. The site used to include separate links to specific years in a section called "past winners", and each link presented a list of awardees. I used the archives and now when I get to the page of "past winners", only a few links are found in the archives and other get into a page named "Not In Archive". Pretty frustrating, because it is very important and many pages depend on it. Does anyone know what the problem could be and is there some way to get access to the other links? Shahid •  Talk 2 me  21:29, 23 February 2011 (UTC)


 * Can you give us the actual URL/site in question? It's pretty hard to discuss this in the abstract. --Mr.98 (talk) 21:47, 23 February 2011 (UTC)


 * Sorry, here it is - it's a site called bfja.com - here's the "past winners" link in the archives - . If you click on one of the year links, you will see that very few of them will work. Shahid  •  Talk 2 me  21:58, 23 February 2011 (UTC)
 * Bump. Shahid  •  Talk 2 me  11:02, 24 February 2011 (UTC)
 * I thought that waybackmachine would find the archives, but these pages on bfja must have had the instruction to deny access to robots, so they were not archived.   D b f i r s   22:42, 24 February 2011 (UTC)