d – Select and delete unneeded parts of the tones; to do this, you have to zoom in: select a part of the signal, and click on the “zoom to fit” button:

You’ll obtain something like this:

e – Now click on an edge of the signal and drag the mouse down to the second track, until the selection reachs the edge of the next pulse in the signal:

f – Once thw WHOLE low-part of the signal is selected (see picture below), click on the “silence” button:

g – You should obtain “silence” on the lower track too:

h – Repeat steps e-f-g for all silence parts of the signal, until you obtain something like this:

Ok, now you have replicated the original signal.

Unfortunately, you can’t just “replay” it: soundcards can usually reproduce only signals up to about 20 KHz, but a remote control use 38 KHz modulation.

But some guys had a great idea some years ago (look here for their patent, now free available on internet; free registration required): simply connect two IR led to left and right channel, one the opposite way of the other, discarding GND, and play a stereo signal made of same signal with opposite phases: this will result in each LED producing a 19 KHz signal; their opposite phases allow signal “sum”, and the result is a 38 KHz signal.

How to accomplish all of this?!?

i – After deleting original signal track (you don’t need it anymore), create a new mono track in Audacity (menu can vary amond different versions):

[…] Strangely, it is not the first time that this question has come up. On this occasion the question was inspired by a DIY project for making a IR transmitter using a standard PC sound card and Audacity. […]

You can see a sample in the first image! In your sample you should see a series of bursts not longer than 30-40 ms each (0,030-0,040 seconds) . My first image show only the first one of the series of bursts.

This thing worked brilliantly for me… really neat stuff. I wanted to simulate for Nikon ML3 remote for DSLR. Now i have a 30kb .wav file that i can put on ANY device that plays WAV and use to shutter my Camera!!… tried on a Samsung Galaxy i5801, iPod Nano 5th Gen!

Dude!!! It’s awesome! Very good guide. Worked on wave, on Macbook. Same shit but in english. Worked with Mac remote just perfect. Until last step I didn’t know if it’s gonna work or not, but when my Mac respond I felt almost like after sex.

Hello!Thank you for the information.Using your cleaning method I obtained a working wav, but is very hard for 42 samples (an entire remote control).Are there any applications to do this automatically?I tested “LedRem with Sox” (from recorded wav to RAW LIRC, and from LIRC a bat file with commands for Sox) but the generated wavs have a lot of silence at the beginning and they are mono.After fixing them they are still not working.I put a sample (original capture and processed file) on WeTransfer http://we.tl/P2JOTq7Jk4 if you don’t mind to take a look.The shape and the spacing are the same, it changed the rate from 44.1KHz to 48KHz.Thank you!

I have sent the sample.I experimented with the batch of Sox commands, and modified the rate to 44100 Hz (instead of 48000), the carrier to 19000 Hz (instead of 18000), I eliminated the first line which inserted 0.1s of silence,and modified the second line (“…vol 0 > base.raw”).I obtained a wave that seems out of sync with the captured one.

Made it work.Although with the described modifications (replacing the rate with 44100 and the carrier frequency with 19000) the new wave seems out of sync, it controls without problem the TV (in stereo flavor with one channel inverted).
I found another problem.LedRem for very small values uses exponential numbers (example 0.000045 gets written in the batch file as 4.5E-5) that drives SOX nuts and make a non-working and huge wav (2-3MB, instead of 20-40KB). It would be very nice if the author of LedRem could make the above mentioned changes of the sample rate and carrier frequency, and to fix the exponential number writing (it’s very difficult to edit 42 BAT files, but easier than manually cleaning the waves).Thank you for your effort!

I fixed the issues. If needed the fixed source code and executable is available at LedRem page http://code.google.com/p/ledrem –> Issues –> Issue 7 –> #2
Many thanks to the author.Now I have a backup of my remote controls that can be used to teach any universal remote control with learning function (if needed).

Hi, everything worked well for me except that when i play file with windows media player, the command is not detected 9/10. it is 10/10 in Audacity.
It doesn’t work with an android at all.
Can any one help me to resolve my issues please… ?? I am keeping big hopes from this forum because the tutorial helped me a lot and I dont want to leave this after coming so far !

From Anuj
“all the files works very well with Audacity. may be 1/10 I miss the command. When i play the same files with Windows media player (Windows 7 32 enterprise), I hardly detect the command. more or less 90% times i miss the command and sometime it gets detected.

I am using a carrier tone of 36KHz as I know my remote uses that frequency ( I only developed that remote ). I tried both sine and square but, both works for me without much of issues.

I tried all these files with 2-3 android phones and iphone5. Non of them worked for me. I really doubt that the signal from the phone jack are very weak (only line voltages and are not amplified like computer headphone jack).

Still, I want a better opinion from you after looking the .wav files. You can suggest trying some particular phone model but, I am not sure that I can find it and test with it (but, i will try).

Also, I tried to check the IR leds while connected to laptop audio jack with phone camera and they light up when the wav is played. Also, if I play in PC without transmitter connected, I hear a very short “chirrrpppp” sound which means the PC is playing the file. The same thing doesn’t happen on any phone.

Hope you can find some time for me and give ur valuable suggestion soon.

From Anuji:
Media player in windowsbi will check for the filters and equalizers.
In mobile phones I used different media players but no success.
Today I created just a tone of 38khz for 10 secs and exported it as wav. Played it with same media player and it made sound. That means that media player plays wav files. Do you think play duration can be a problem and the player is neglecting to play a file of 20ms?
Can u suggest any phone of recent time which u think works for you.??
Do you think in any case I need to amplify the signals with phone ?

Some users reported they couldn’t see any flashing in the led when using phone, although it properly commanded devices, but only very colsely; so they installed a small signal amplifier to get better range.
Try keeping the led attached to receiving device, just to see if signal works.

Wonderful news bro, I made it work and it works with my android without any problem. I m surprised that the range with mobile is about 3-4 meters. With laptop I m gettingssimilar range. The problem lied in my doubt in last comment. Our so called stupid smart phones are
Extra smart and neglect to play a ffile less than 1 sec. I just kept the command after 100ms interval just to make sure to not to have fade in issues. Rest all the remaining 900ms are complete silence.And to my surprise this time the command worked from mobile.
Later i did some tweaking in tone. The range with sine waves is much more than square wave. I was wrong in my last comment where I said the distance with both the waves is same.
Still after so much success I am not able to work with all kind of mobiles. With two symbian phones no success. With I phone 5 no success. With other two low end androids no success.
Now my task is to make it work with every kind of mobile phone.
Again, pls help to throw some morelight on what ccould went wrong with other mobiles?

Very interesting, thanks for sharing.
I wonder if modern phones/PCs are capable of playing 48 KHz audio files natively rather than “simulating” them by optical interference: I read of some audiocards capable of 96 KHz sampling (not mine).
I Don’t know why some phones do not work, try looking for different players (which do not tamper the original waveform…)

Additionally, there are some android apps capable of amplifying sound (audioboost or something like that), which could improve range (although 4 meters is already very good!)

Yes! 4 meters with my HP elitebook laptop and my android is confirmed. I made is work my Whirlpool air conditioner today.
Another help needed !
This morning I was working with AC remote and the command structure is very large! It takes almost 15-20 minutes to samples one command with audacity ( i mean capture, edit the signal and make a stereo file). Can you suggest something which can do this signal editing work automatically ?
LIRC2Ledrem doesnt seems to work for me. I may be not using it properly. Can u suggest how to use ?

I have no idea about my laptop or android playing the audio more than 44KHz. On monday I can make another transmitter with single LED and check on that.

The beginning of the signal looks unusual: try adding a long initial pulse starting from first spike and ending to second one; it could be an initial calibration tone for the receiver, which should be constant (are your remote control batteries fully charged?).

Yes I got it, but I thought you also resampled the remote after replacing the battery: this should lead to a stronger calibration pulse at the beginning of the waveform.
Additionally, it could be interesting to see if a modern smartphone can play a 96 kHz file: this would allow to directly replay the sampled remote control signal (also sampled at 96 kHz) with just one single led and without manual processing of the waveform.