Results 1 to 6 of 6

Thread: [RESOLVED] Manipulating sound data FROM a modem (this is prob. one for the techies :-))

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Resolved [RESOLVED] Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    I've been considering this idea for a while (I specifically need it for something :-))

    The idea is simple...I want to record a 2-way data conversation over a phone line as I have a piece of hardware which communicates with its server and I want to know what it sends and receives. I can handle the "listener" section that goes on the wire between the device and the wall, but I am thinking about how easy it would be to decode the data from a *saved* WAV file. The WAV, I assume, would have 2-way traffic divided into two lines (left and right audio, perhaps, or maye stored in 2 WAV files, I dunno)

    Basically, how simple do people think it would be to convert the tones to values (0-255 a byte at a time, I would assume, although 0 and 1...which would then be converted to 0-255...would work just as well)?

    I'm sure there must be a way to do this...although I am sure there would be tons of complications :-)

    (BTW, excuse my not replying if anyone answers...I'm off to work until about 8pm, about 8 hours after this is posted...I'll read the replies when I get back and make any replies I need to :-))
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    Assuming you're talking about a data connection over the phone line (like using a modem to connect to another modem, or to your ISP), you can't do that in VB, you'd have to use the sound card to decode it. You're talking about phase modulation, and there's nothing in VB that would allow you to determine phase change in an audio wave form. Depending on how you recorded it, the phase information might not even be recorded accurately enough to recover the data.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    Let's assume for the moment that the audio was saved as a WAV file to my HD at the right frequency to allow for decoding to values that can be built into recognisable data...if it was 56k modem data, that should be about 60000 bytes of data being sent per second (and recorded) so

    Alternatively, would it be easier to have a VB program acting as a passthrough and taking in and sending out data from both sides and using the PC's modem to send the data out? Or some way of recording electrical charge changes in the line and storing the timecode (millisecond) to rebuild the data as a string of 0s and 1s? The last might need something more powerful than VB though :-)

    I probably will never actually do this if it is as difficult as I think it will be...if I don't get the recording frequency right when recording the WAV then the data I need will be partially (or fully) corrupted.

    (and I'm not home...well, I am, but I am off again soon :-))
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    Quote Originally Posted by smUX
    Let's assume for the moment that the audio was saved as a WAV file to my HD at the right frequency to allow for decoding to values that can be built into recognisable data.
    You'd need at least 20 samples per cycle (10/half cycle to be able to distinguish a 90 degree phase change fairly reliably) at the highest bit rate.
    ...if it was 56k modem data, that should be about 60000 bytes of data being sent per second
    Which would need about 1.2Meg sample/second - a little more difficult than the normal 44k used for fairly decent audio. Even a tape recording of modem tones is difficult for a modem to decode - the slight variation in tape speed messes everything up even at 2400 bps.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    I had a feeling it would be too difficult...maybe there's ways to filter the data to calculate what the values are or something, but I'm not experienced enough to do it...case closed for now, I guess...I'll resolve it.

    Thanks, Al
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))

    Quote Originally Posted by smUX
    maybe there's ways to filter the data to calculate what the values are or something
    It's why modem manufacturers usually buy a Rockwell modem chipset - "easy" is something not associated with phase detection in software. Think "bald", "head-shaped hole in wall", etc.

    But if you learn to manipulate the sound card, there are lots of things you can do - probably even decode raw modem audio. I know you can decode fax audio and similar data using one.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width