Page 1 of 2 12 LastLast
Results 1 to 40 of 41

Thread: For all the Expert file - converters

  1. #1
    Guest

    Talking

    Hallo

    I have a problem converting a file to a readable format. Please let me know if you are up for this....I can send you the file if you are interested.

    Thanx

  2. #2
    Guest
    Try me...

    [email protected]

    and I'll have a go...

  3. #3
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Send away.
    Iain, thats with an i by the way!

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Why don't you post the contents of it? (at least some if it's huge)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    The following is what i recieved. It was all one big long line, so i have placed carriage returns in it my self to stop it running over too far.



    007792203737./38<BJQY`hpx€‰‘˜
    §®³¸¼¿ÀÁÂÁÀ¾»¸²¤’~kZLB>>AHQ\iu‚—ž£¦§¥¢œ”‹€wnhcaadhnt
    {‚‡Œ‘’’‘Ž‹‡„{wusrrsuwz~„†ˆ‰‰‰ˆ†…ƒ€~|{zyyyz
    {|~€‚ƒ„„……„ƒ‚€~~}||||}}
    ~€‚‚‚‚‚‚€€€~~~~~€€€€€€€€€€� �€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€GGIMQUZ_diotz€†Œ‘–› ¤§ª¬*®®®*«©§¤œ‚th]
    VRQSW^emv‡Ž“–™™™˜•Šƒ|vqmkkmosw{€„‡‰‹ŒŒ‹Šˆ†ƒ€~{yxvvwxz
    {~€‚„…†††……„‚~}||||||}~€‚ƒƒƒƒƒ‚€€~~~}}
    ~~~€€€€€€€~€€€€€€€€€€€€€� �€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€ddefhkmpruwz}€ƒ†‰‹Ž’”•––——––� �”“’Š„}
    vplihiknquy}„‡ˆ‰ŠŠŠŠ‰‡„~{ywvwxy{|~€ƒ„„„…„„ƒƒ€~}|||||}
    ~€€‚‚‚‚‚‚€€~~~~~~€€€€€€€€€€� �€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€.25
    8=CKSZahpxˆ˜Ÿ¦*²·»¾ÀÀÁÀ¿½º·²£’n\NE@?BIQ[gsŠ”œ¡¤¦¥£ž–
    „yqjebbdhlrx~„‰‘’‘Š†‚}yvtrrrtvy{‚„‡ˆ‰‰‰‡†…ƒ€~|{zyy yz
    {|~€‚ƒ„„„„„ƒ‚€~~}}|||}}
    ~€‚‚‚‚‚€€€~~~~~~€€€€€€€€€€� ��€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€GJLNRV\afjpuz€†‹‘–
    šŸ£¦¨ª¬¬¬¬«©§¥£šƒvi_XTSUY_emu|„‹‘•—˜˜—•‘‹…~xsollmorvz}… ‡‰
    Š‹‹Š‰‡…‚|zxwwwxy{|~€‚„……………„ƒ‚€~}|{{{||}
    ~€‚ƒƒƒƒƒ‚€€~~~~~~~€€€€€€~~~€€€€€� ��€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€defgikn qsuxz}€ƒ†‰‹‘“”•–––
    –•”““‘Š„}wrmkijlnquy|€ƒ†‡‰ŠŠŠŠ‰
    ‡…‚|zxwwxyz|~€‚ƒƒ„„„„ƒƒ‚}|||||}
    ~~€‚‚‚‚‚‚€€€~~~~~~€€€€€€€€€€€ €€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€./2
    7<BJQY`howˆ˜ ¦*³¸¼¿ÁÂÂÂÀ¿¼¸³¦”€m]NC>>AGPZfr~Š”œ¢¦§¦¤Ÿ—
    Ž„zqidbacglrx~…‰’’’Š†‚}yvsrqrsvy{‚…‡ˆ‰‰‰ˆ†„ƒ€~|{zyyy z
    {|~‚ƒ„……„„ƒ‚€~}}|||}
    ~~€‚‚‚‚‚‚€€~~~~~~~€€€€€€€€€€� �€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€€€€
    €€IHKNRV[`ekouz€†‹‘–šŸ£¦¨«¬¬*
    ¬«ª¨¦£œ‘„vj`XSRTX^dlt|…‹‘•˜™™˜–‘Œ…~xsnllloruy}‚…‡Š‹‹‹� �‰
    ‡…‚|zywvwxyz|€ƒ„…†††…„ƒ‚€~}||{||}}
    ~€‚ƒƒƒƒƒ‚€€~~~~~~~~€€€€€€€€€€€� �€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€� �€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€dde hiknpsuwz}€ƒ†ˆ‹‘“”•–––
    ––•”“‘‹…~wrmjiikmqtx|ƒ…‡ˆŠŠŠ‰‰ˆ…
    ƒ|zxwwxyz|~€‚ƒƒ„„„„„ƒ‚€}|||||}
    ~~€€‚‚‚‚‚‚€~~~~~~€€€€€€€€€€€€� �€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� �€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€� ��€€€€€€€€€€€€€€€€€€€€€€€
    €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ €€€€€€€€€€€€€€€€€€€€
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    Iain, thats with an i by the way!

  6. #6
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    Do you know what kind of file type it is?

  7. #7
    Guest
    This is the layout of the file:

    Surge File (.srg) Layout
    Field Name Type Description
    Test Result Number 4 bytes Unique Number used to Id the record
    Number of bytes used 4 bytes 3 leads of 3 waves of 512 bytes +
    Test result #. (3*3*512)+4 = 4612
    Settings 4 bytes Knob settings for volts/div and sec/div
    Wave1Full 512 bytes Full Wave form for lead 1
    Wave1Mid 512 bytes Middle Wave form for lead 1
    Wave1Min 512 bytes Minimum Wave form for lead 1
    Wave2Full 512 bytes Full Wave form for lead 2
    Wave2Mid 512 bytes Middle Wave form for lead 2
    Wave2Min 512 bytes Minimum Wave form for lead 2
    Wave3Full 512 bytes Full Wave form for lead 3
    Wave3Mid 512 bytes Middle Wave form for lead 3
    Wave3Min 512 bytes Minimum Wave form for lead 3


  8. #8
    Guest
    If you want to know more about what the software is used for, here is a website (www.bakerinst.com). Unfortunately their Technical Expert in USA could not say what format. I only received the layout of the file.

  9. #9
    Guest
    The contact person in USA tells me that the structure specified above is incorrect. There is apparently another 9 waveforms per record in the file. As soon as I receive the new information, I'll post it.

    Sorry for that.

  10. #10
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Why don't use post us the hex contents of the file?
    Here's for converting...
    Code:
        Dim buffer() As Byte
        Open file For Binary As #1
            Get #1, , buffer
        Close #1
        For x = 0 To UBound(buffer)
            Debug.Print Left$("0" & hex(buffer(x)), 2);
        Next x
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Ok, no need, i got the file, thanks
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12
    Guest

    New layout (!?)

    Field Name Type Description Position
    Test Result Number 4 bytes Unique Number used to Id the record 0 - 3
    Number of bytes used 4 bytes 4612 4 - 7
    X-Scale 2 bytes Scale for the x axis Sec/div 8 - 9
    Y-Scale 2 bytes Scale for the y axis Volts/div 10 - 11
    Wave1Full 512 bytes Full Wave form for lead 1 12 - 523
    Wave1Mid 512 bytes Middle Wave form for lead 1 524 - 1035
    Wave1Min 512 bytes Minimum Wave form for lead 1 1036 - 1547
    Wave2Full 512 bytes Full Wave form for lead 2 1548 - 2059
    Wave2Mid 512 bytes Middle Wave form for lead 2 2060 - 2571
    Wave2Min 512 bytes Minimum Wave form for lead 2 2572 - 3083
    Wave3Full 512 bytes Full Wave form for lead 3 3084 - 3595
    Wave3Mid 512 bytes Middle Wave form for lead 3 3596 - 4107
    Wave3Min 512 bytes Minimum Wave form for lead 3 4108 - 4619

    I don't know about you, but this looks almost exactly the same as the previous one.

    Hope this helps


  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Ok, looks good, now one qwestion before i'm doing something.

    What do you mean with
    converting a file to a readable format
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14
    Guest
    What I mean is that I would appreciate it if you can convert the file to understandable text. The file at this point is gibberish.

  15. #15
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    There's no way i can convert that into text if you don't explain what each of thos byte means. If some of them are values then i could get them for you but if they need to be converted to text den give me the converting method. It's not encrypted is it? Shall i put the waveforms into byte arrays? Integer arrays? And what about UDT's, do you have any kind of structure made up for this or do you just have some text boxes and list on the form you want to read the data into`?

    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  16. #16
    Guest
    All the waveform values is most possibily real/double values. I need to use those values to plot graphs. If you want to see how the graphs look, let me know. The reason I want it in text, is the fact that I'm using the Instream command to read the values directly into my db. From there I will manipulate the values for the graph.

    There is apparently a app called Gnuplot where the converted data can be plotted (graph). Still trying to figure out how the program works.

    Thanx

  17. #17
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    So you want to get the graphs plotted or? How should the graphs be plotted? What scales used? How many bits per dot? I dunno much about Gnuplot, do you need that to plot or is it just fine with setpixelv?
    Once again, what do you mean by converting into understandable text? Should it be some statistics about the waveforms or what?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  18. #18
    Guest
    Kedaman

    I've send you a mail to your Hotmail address. It consist of a picture of how the graph should look and a clearer explanation.

    Thanx

  19. #19
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Nothing here yet?
    could you send it again?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  20. #20
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Now i got it, just let me have a look on it and i may help you
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  21. #21
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Now i want to check if these values matches yours:
    Code:
    ?test.Size
     808596025 
    ?test.IDNumber
     926363696 
    ?test.Xscale
     14131 
    ?test.Yscale
     14131
    IDnumber and Size are the first two fourbyte longs i got, scale and yscale are integers
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  22. #22
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I'm sorry for disturbing, but kedaman when are you coming back on ICQ mate?

    "Tuesday next week"
    is that what the cable company says?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  23. #23
    Guest
    I have that values. But how does the scale and y-scale collaborate with the graph that I sent you?

  24. #24
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Well, i'm sorry but haven't got any further, i had to reinstall win98 and then vb didn't work and my vb cd was back at Åland, i'll install vb today and i'll se what i can do

    That's what i wondered, how does the y-scale and x-scale match the graphs? Should i just calculate it aritmetically from what i see in the graphs?

    What about Size and IDNumber, what's the idea with those?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  25. #25
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    to jop

    Yeah, they said that they just got the stuff they needed to set up the connections. And AFAIk, there's hundreds waiting for their connection and only one man to do the work
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  26. #26
    Guest
    I'll check it...but i'm more concerned with the Wave reading, because they are the ones I need to use for the graph. I need to draw the graph to know whether the readings are right (nowhere on machine, that generates file, the readings are shown!!).

    Thanx

    [Edited by hermanvd on 10-02-2000 at 05:42 AM]

  27. #27
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    This is just a test, i want to know if you like the output. The scales aren't correct either, i just put them up so that you can see how it looks like.
    Save this as a form. frmmain.frm or whatever and load it into a project. Then launch and press the command button
    Code:
    VERSION 5.00
    Begin VB.Form frmMain 
       AutoRedraw      =   -1  'True
       BackColor       =   &H00000000&
       Caption         =   "Form1"
       ClientHeight    =   8715
       ClientLeft      =   60
       ClientTop       =   345
       ClientWidth     =   7725
       ForeColor       =   &H00FFFFFF&
       LinkTopic       =   "Form1"
       ScaleHeight     =   581
       ScaleMode       =   3  'Pixel
       ScaleWidth      =   515
       StartUpPosition =   3  'Windows Default
       Begin VB.CommandButton Command1 
          Caption         =   "Command1"
          Height          =   615
          Left            =   6840
          TabIndex        =   0
          Top             =   120
          Width           =   615
       End
    End
    Attribute VB_Name = "frmMain"
    Attribute VB_GlobalNameSpace = False
    Attribute VB_Creatable = False
    Attribute VB_PredeclaredId = True
    Attribute VB_Exposed = False
    Private Type WaveForm
        Amp(511) As Byte
    End Type
    Private Type header
        IDnumber As Long
        Size As Long
        Xscale As Integer
        Yscale As Integer
        Waves(2, 2) As WaveForm
    End Type
    
    Private Sub Command1_Click()
        Dim buffer As header, x As Integer, lead As Integer, y As Integer
            ChDir App.Path
            Open "AM004500143A.srg" For Binary As #1
                Get #1, , buffer
            Close #1
        
        For lead = 0 To 2
            For x = 0 To 511
                'The graph
                For Level = 0 To 2
                    PSet (x, buffer.Waves(lead, Level).Amp(x) + lead * 128), QBColor(Level + 1)
                Next Level
                'The scale lines, you can change this for your purpose
                If x Mod Int(buffer.Xscale / 2000) = 0 Then Line (x, lead * 128 + 196)-Step(0, -5), QBColor(6)
                If x Mod Int(buffer.Xscale / 400) = 0 Then Line (x, lead * 128 + 196)-Step(0, -7), vbYellow
                If x Mod Int(buffer.Xscale / 200) = 0 Then Line (x, lead * 128 + 196)-Step(0, -10), vbYellow: CurrentY = CurrentY - 15: CurrentX = CurrentX - 13: Print Int(x * 1.43)
                
            Next x
            For y = -64 To 64 Step 64 / 2
                Line (0, y + lead * 128 + 128)-Step(5, 0), vbYellow
                Print -y / 64 * 2000
            Next y
        Next lead
    
        'or n=0 to
    End Sub
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  28. #28
    Guest

    Unhappy

    Will this work in VB6?

  29. #29
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Of course! Try it
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  30. #30
    Guest
    hallo

    Int(buffer.Xscale / 2000): This part always gives a zero. Thus error...division by zero. Am I missing something?

    Thanx

  31. #31
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    Thumbs up

    Is this coding used to convert *.wav files into numbers and then graph the coordinates? I don't have the answer either but I am super interested. My thing is I'm trying to brake a *.wav file down into some testable variables. Example take the wave file of someone's voice and make the computer immitate the voice and also distinguish between two different voices. Any ideas?
    212 will lead you to the truth

  32. #32
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Well, here's something for you, where you can change some important parts of the wave structure
    http://forums.vb-world.net/showthrea...threadid=14791
    to convert the byte array into 16 bit amplitude or stereo channels, you could use copymemory or change the code yourself

    herman, are you using the same file you sent me?

    well you could just replace all
    buffer.Xscale
    with
    14131
    and it should work...
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  33. #33
    Guest
    Hallo Kedaman

    Is this code suppose to draw graph? If not please let me know...I only see the axis of the graph.

    Thanx for the help

  34. #34
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    sh*t! i forgot one thing
    yes it suppose to draw a graph

    you have to have AM004500143A.srg in the same path as this project. OR you specify the path
    Code:
    Open "c:\yourpath\AM004500143A.srg" For Binary As #1
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  35. #35
    Guest
    hallo

    Thanx for the code. Luckily I specified the directory. I would like to know something, is this graph only for one of the leads specified in the file layout? It seems as if the graph only shows a break-up of the graph Surge lead 1 I sent you? I have one problem...I need the values for the graph to store in a db to use at all times.

    Thanx for the help...it feels as if there is a light at the end of this tunnel. Thanx again

  36. #36
    Guest
    hallo

    Thanx for the code. Luckily I specified the directory. I would like to know something, is this graph only for one of the leads specified in the file layout? It seems as if the graph only shows a break-up of the graph Surge lead 1 I sent you? I have one problem...I need the values for the graph to store in a db to use at all times.

    Thanx for the help...it feels as if there is a light at the end of this tunnel. Thanx again

  37. #37
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    All three leads should be shown in three graphs, full mid min are drawn in the same graph with different colors, qbcolor function you know
    If you want them into a database then don't ask me, i've never touched any but they're still in an UDT and you can still access each point in each graph by using
    buffer.Waves(lead, Level).Amp(x)
    where x is the time, level is 0-2 the full/mid/min thing and lead is number of the surge lead graph.

    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  38. #38
    Guest
    Hi Kedaman

    I looked at the code and I understand the logic of it. What puzzles me is that it plots all the full's on a graph, all the mid's on a seperate graph ect. But in the code the full/mid/low for every lead is grouped together. Am I missing something here?

    Thanx for the help

  39. #39
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Hmm, maybe the graphs are saved in the wrong order..

    Try change the pset line to this:
    Code:
    PSet (x, buffer.Waves(Level,lead).Amp(x) + lead * 128), QBColor(Level + 1)
    I swaped level and lead so each lead will be in different graphs
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  40. #40
    Guest

    Talking

    Thank you for all your help...now to see if the user will fall for it.

Page 1 of 2 12 LastLast

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