Page 8 of 12 FirstFirst 123456789101112 LastLast
Results 71 to 80 of 112
Discuss [iCouchPotatoe] Your iPhone/iTouch is an Universal Infrared Remote Control at the Hardware - Hackint0sh.org; ...
  1. #71
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Ok, I need some help (again :p )
    I found this freeware program which apparently allows synthesizing any kind of sound in any file format... but I'm quite confused by the documentation, due to my poor english I guess...

    I'd like to generate, for example, a WAV file made up just of tones and silences this way (durations are in microseconds):
    2800 tone
    888 silence
    444 tone
    444 silence
    444 tone
    444 silence

    How do I accomplish this using SOX? I don't even know if it is possible to have us precision...

    On site documentation is quite poor, you have to look at the program package.
    I paste here what I think is the relevant part of the documentation from soxeffect.txt (but I maybe wrong):

    synth [len] {[type] [combine] [freq[-freq2]] [off] [ph] [p1] [p2] [p3]}
    This effect can be used to generate fixed or linearly swept fre-
    quency audio tones with various wave shapes, or to generate
    wide-band noise of various ‘colours’. Multiple synth effects
    can be cascaded to produce more complex waveforms; at each stage
    it is possible to choose whether the generated waveform will be
    mixed with, or modulated onto the output from the previous
    stage. Audio for each channel in a multi-channel audio file can
    be synthesised independently.

    Though this effect is used to generate audio, an input file must
    still be given, the characteristics of which will be used to set
    the synthesised audio length, the number of channels, and the
    sampling rate; however, since the input file’s audio is not nor-
    mally needed, a ‘null file’ (with the special name -n) is often
    given instead (and the length specified as a parameter to synth
    or by another given effect that can has an associated length).

    For example, the following produces a 3 second, 44.1 kHz, audio
    file containing a sine-wave swept linearly from 300 to 3300 Hz:

    sox -n output.au synth 3 sine 300-3300

    and this produces an 8 kHz version:

    sox -r 8000 -n output.au synth 3 sine 300-3300
    The following example shows how two synth effects can be cas-
    caded to create a more complex waveform:

    sox -n output.au synth 0.5 sine 200-500 \
    synth 0.5 sine fmod 700-100
    A detailed description of each synth parameter follows:

    len is the length of audio to synthesise expressed as a time or
    as a number of samples; 0=inputlength, default=0.

    The format for specifying lengths in time is hh:mm:ss.frac. The
    format for specifying sample counts is the number of samples
    with the letter ‘s’ appended to it.

    type is one of sine, square, triangle, sawtooth, trapezium, exp,
    [white]noise, pinknoise, brownnoise; default=sine

    combine is one of create, mix, amod (amplitude modulation), fmod
    (frequency modulation); default=create

    freq/freq2 are the frequencies at the beginning/end of synthesis
    in Hz or, if preceded with ‘%’, semitones relative to A
    (440 Hz); for both, default=%0. If freq2 is given, then len
    must also have been given. Not used for noise.

    off is the bias (DC-offset) of the signal in percent; default=0.

    ph is the phase shift in percentage of 1 cycle; default=0. Not
    used for noise.

    p1 is the percentage of each cycle that is ‘on’ (square), or
    ‘rising’ (triangle, exp, trapezium); default=50 (square,
    triangle, exp), default=10 (trapezium).

    p2 (trapezium): the percentage through each cycle at which
    ‘falling’ begins; default=50. exp: the amplitude in percent;
    default=100.

    p3 (trapezium): the percentage through each cycle at which
    ‘falling’ ends; default=60.

    tempo [-q] factor [segment [search [overlap]]]
    Change the audio tempo (but not its pitch) using a ‘WSOLA’ algo-
    rithm. The audio is chopped up into segments which are then
    shifted in the time domain and overlapped (cross-faded) at
    points where their waveforms are most similar (as determined by
    measurement of ‘least squares’).

    By default, linear searches are used to find the best overlap-
    ping points; if the optional -q parameter is given, tree
    searches are used instead, giving a quicker, but possibly lower
    quality, result.

    factor gives the ratio of new tempo to the old tempo.

    The optional segment parameter selects the algorithm’s segment
    size in milliseconds. The default value is 82 and is typically
    suited to making small changes to the tempo of music; for larger
    changes (e.g. a factor of 2), 50 ms may give a better result.
    When changing the tempo of speech, a segment size of around
    30 ms often works well.

    The optional search parameter gives the audio length in mil-
    liseconds (default 14) over which the algorithm will search for
    overlapping points. Larger values use more processing time and
    do not necessarily produce better results.

    The optional overlap parameter gives the segment overlap length
    in milliseconds (default 12).

    See also stretch for a similar effect.

    treble gain [frequency [width[s|h|o|q]]]
    Apply a treble tone-control effect. See the description of the
    bass effect for details.

    tremolo speed [depth]
    Apply a tremolo (low frequency amplitude modulation) effect to
    the audio. The tremolo frequency in Hz is given by speed, and
    the depth as a percentage by depth (default 40).

    Note: This effect is a special case of the synth effect.

    trim start [length]
    Trim can trim off unwanted audio from the beginning and end of
    the audio. Audio is not sent to the output stream until the
    start location is reached.

    The optional length parameter tells the number of samples to
    output after the start sample and is used to trim off the back
    side of the audio. Using a value of 0 for the start parameter
    will allow trimming off the back side only.

    Both options can be specified using either an amount of time or
    an exact count of samples. The format for specifying lengths in
    time is hh:mm:ss.frac. A start value of 1:30.5 will not start
    until 1 minute, thirty and seconds into the audio. The format
    for specifying sample counts is the number of samples with the
    letter ‘s’ appended to it. A value of 8000s will wait until
    8000 samples are read before starting to process audio.

    vol gain [type [limitergain]]
    Apply an amplification or an attenuation to the audio signal.
    Unlike the -v option (which is used for balancing multiple input
    files as they enter the SoX effects processing chain), vol is an
    effect like any other so can be applied anywhere, and several
    times if necessary, during the processing chain.

    The amount to change the volume is given by gain which is inter-
    preted, according to the given type, as follows: if type is
    amplitude (or is omitted), then gain is an amplitude (i.e. volt-
    age or linear) ratio, if power, then a power (i.e. wattage or
    voltage-squared) ratio, and if dB, then a power change in dB.

    When type is amplitude or power, a gain of 1 leaves the volume
    unchanged, less than 1 decreases it, and greater than 1
    increases it; a negative gain inverts the audio signal in addi-
    tion to adjusting its volume.

    When type is dB, a gain of 0 leaves the volume unchanged, less
    than 0 decreases it, and greater than 0 increases it.

    See [4] for a detailed discussion on electrical (and hence audio
    signal) voltage and power ratios.

    Beware of Clipping when the increasing the volume.

    The gain and the type parameters can be concatenated if desired,
    e.g. vol 10dB.

    An optional limitergain value can be specified and should be a
    value much less than 1 (e.g. 0.05 or 0.02) and is used only on
    peaks to prevent clipping. Not specifying this parameter will
    cause no limiter to be used. In verbose mode, this effect will
    display the percentage of the audio that needed to be limited.

    See also compand for a dynamic-range compression/expansion/lim-
    iting effect.


  2. #72
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    UPDATE:

    I did more tests. Result:

    I successfully used a nokia 6680 to remote control a Synudyne TV, an LG DVD recorder, a Satellite receiver, a Video tape recorder and a DTT receiver!
    And all of this was possibile using just ONE single IR LED connected to headset port!

    I used SOX to generate single on/off carrier chunks and SHNTOOL to concatenate them into a singol WAV file.

    Now I'd like to know HOW it is possible! Does my 6680 produce 38000 Hz audio signals?!? What is it, a bat-phone?!?
    If it just produces 19000 Hz signals... why the "mono" audio-out of nokia 6600 does not accomplish same task?!?

  3. #73
    Former Bender
    Guest

    Default

    Dude, you are off topic now, this thread is about using iPhone and iTouch as IR remote, not nokia.

    You should find a Nokia forum and post there. I guess they will be happy.

  4. #74
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    actually I'd like to know if the "one-led solution" is applicable for other devices than mine. Maybe also IPOD can work with one single led? If yes, we should review are guesses about the sound-to-IR device!

  5. #75
    Former Bender
    Guest

    Default

    No, the iPod can't work with one IR LED, simply because it has an Asymmetrical (+, Ground) audio output when your Nokia uses Symmetrical output (+, -, Ground).


  6. #76
    Professional Array

    Join Date
    May 2008
    Posts
    55
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    8

    Default

    Quote Originally Posted by jumpjack View Post
    You're right.
    Indeed technics described in this thread are mostly for users of uncommon remotes, which can't find suitable configuration files for their devices: being able to just sample&replay a remote should allow anybody with an audio-capable handheld to use it as remote control clone.
    So if I have a common remote then this is vastly simplified. So am I able to simply load an existing config file into this program and it will work with that?

  7. #77
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I'm not sure I got what you mean...

    Actually I didn't yet wrote a program: I demonstrated that a remote control can be cloned using:
    - 2 IR transmitter LED
    - an audio recorder software
    - an audio editing software (Audacity, Linux/Win32/MacOSX), or an audio synthesizer software (SOX, Linux/Win32 , SOXWrap , MacOSX)

    Until I'll be able to write a "decoder software" for the recorded audio, you'll need to re-build your signal from scratch. At the beginning I did it totally by hand: i created a 38 KHz tone and I silenced it by hand where needed (comparing to the sampled audio signal) like the one in the picture).

    http://www.planetmobile.it/jumpjack/LedRem/remote-justled.jpg

    Now I found a program, SOX , which can create a wave file made up of tones and silences of desired length.

    You use it to build "pieces" of wavefile, which then you join together (with COPY /b in DOS, or CAT in Unix), and finally you use SoX again to add proper headers.

    Here you find some DOS batch files I'm working on to generate WAV files (look at CREATE.BAT):
    http://www.planetmobile.it/jumpjack/LedRem/batches.zip

    Building SoX in MacOSX

    Other link for SoXWrap

    It would be interesting to know if Mac users too can use my method to turn their computers/phones into remotes.

    It would be also interesting if anybody could write a program which automatically calls SOX depending on contents of sampled waveform... Unfortunately I never wrote before a sound-processing software, although I wrote many software in basic, c, java...
    Last edited by Former Bender; 06-10-2008 at 11:10 AM. Reason: Do not post Jumbo Sized pictures, thanks.

  8. #78
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I published a short tutorial about how to create WAV files to clone remote controls using any audio capable device (iPhone, Pod, cellphone, PC,... MP3 player?):
    http://jumpjack.wordpress.com/2008/0...emote-control/

    The tutorial is O.S. indipendent (Unix, Windows, MacOSX, or whatelse, it does not matter ).

  9. #79
    Rookie Array

    Join Date
    Oct 2007
    Location
    Brasil
    Posts
    11
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Its a really great project....
    Thanks XianLi
    OTB 1.1.1 --> 1.1.2 --> 1.1.3
    BL 3.9
    Activated/Jailbroken/Unlocked!!!
    Call In/Out: Yes/Yes
    SMS In/Out: Yes/Yes
    WiFi/Edge: Yes/Yes
    Carrier: Claro
    BRASIL!!!!
    Gorilaz Paintball
    Mednanet.com.br - Medicine Nove de Julho

  10. #80
    Advanced Array

    Join Date
    May 2008
    Posts
    40
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I wrote a couple of program which make authomatic the tedious work:
    RAW2LIRC gets a WAV file (resulting from remote control sampling using 1 transmitting led) and creates a proper LIRC file.
    LIRC2LEDREM creates a DOS batch file per each command found in LIRC file.
    Each DOS batch creates the corresponding WAV file to play on... iPod or whatelse.

    Sorry, my programs only run in Windows... but they should also work fine inside an emulator, I guess.

    Batch files are just made up of a list of SOX call, so it's esay to port them to any system supporting SOX.

    Here are the files:
    http://www.planetmobile.it/jumpjack/LedRem/LedRem.zip


 

 

Similar Threads

  1. MacNN: SURC case and infrared remote for iPhone 4 now shipping
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 07-15-2011, 08:20 AM
  2. Replies: 1
    Last Post: 01-06-2009, 12:37 PM
  3. [Signal] Turns your iPhone - iTouch to a remote for iTunes
    By brucealmighty in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 03-04-2008, 07:55 AM
  4. Replies: 0
    Last Post: 03-04-2008, 07:55 AM
  5. remote control app iPhone > Mac
    By STB747400 in forum Free Toolchain Software (Cydia App's)
    Replies: 0
    Last Post: 11-26-2007, 06:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 02:21 AM.
twitter, follow us!