1. Things you need to know about the new ‘Conversations’ PM system:

    a) DO NOT REPLY TO THE NOTIFICATION EMAIL! I get them, not the intended recipient. I get a lot of them and I do not want them! It is just a notification, log into the site and reply from there.

    b) To delete old conversations use the ‘Leave conversation’ option. This is just delete by another name.
    Dismiss Notice

vhf sig gen?

Discussion in 'd.i.y.' started by Jim Audiomisc, Jan 26, 2019.

  1. Jim Audiomisc

    Jim Audiomisc pfm Member

    Yes, I'm just considering the modulation as DSBSC and multiplying the carrier with the diff signal. No filters needed, and trivial maths. I plan to let the pilot level be user settable. I need to check but I think the BBC doc makes the pilot 0.1 x 0.9 of full mod. But later specs relaxed this to give a range.
     
  2. davidsrsb

    davidsrsb pfm Member

    Actually the MC1310 has some curves of 8%, so 0.1x0.9 full mod is OK
     
  3. Jim Audiomisc

    Jim Audiomisc pfm Member

    I've bodged one of my existing programs so it now can generate MPX test tones. I've put an example of the results here

    http://jcgl.orpheusweb.co.uk/temp/MPX_R.flac

    so people can examine it. Two notes, though:

    1) I want to remove it again soon to save space as it is circa 11 MB. (192k 24bit) I've also now got some other files like it, but not the webspace for them all in one go. So if people let me know asap I can remove this file and then put a different one up/

    2) For anyone who *ISN'T* interested in MPX a caution. DO NOT PLAY THIS FILE ON A
    NORMAL DOMESTIC AUDIO SYSTEM! It contains steady high level ultrasonic tones
    which might mess up your speakers or some other part of your system. These files
    are JUST for test-bench use related to MPX encoding.

    The test file here has two channels. One is simply what you'd get from a mono RX. The other is the full MPX
    that - fed to a VHF sig gen - should give a 5k tone on one channel.

    Once I can get some feedback I can do a better version which can use run on a Linux box, then make that available. It should then let the user choose between Left or Right or Mono or Antiphase, and the amplitude and frequency of the audio test tone. FWIW the bodged program is a RISC OS one as I find that quicker to get going.
     
  4. davidsrsb

    davidsrsb pfm Member

    The spectrum looks correct in Audacity
     
  5. Paul R

    Paul R pfm Member

  6. davidsrsb

    davidsrsb pfm Member

  7. Jim Audiomisc

    Jim Audiomisc pfm Member

    I've now replaced the flac file with a copy of a Linux program that generates files of this kind. Anyone interested can now get the program from

    http://jcgl.orpheusweb.co.uk/temp/StereoMPXGenerator.tgz

    The tar includes a 'help' text file you should read before use. It also provides the source code. It is a 'ROX app' so using ROX filer can be run via a click on its icon. However on other desktops it can be run by the usual means like command in a terminal.

    You can use the above to generate various kinds of MPX encoded audio to use for test purposes, along with a parallel 'mono' version. At present it lacks any subcarrier phase correction ability as I'm waiting for someone to let me know if they find they need that - it will depend on your DAC and modulator in a VHF sig gen. At some point I can also add a mode than outputs the pilot and subcarriers for a 'figure of 8' check on a scope to see if a DAC can get the phases right, etc. That isn't likely to be a problem here as the Benchmark DACs are flat as a board in their response! What I lack is an RF generator to modulate! But others here probably already have one if they plan to do MPX tests on tuners. :)

    The signals are 192k 24bit dithered so should have a purity that is fine for an FM system.
     
  8. MJS

    MJS Trade: Witch Hat Audio

    Thanks Jim - I've downloaded the tar package to have a play. I've got as far as installing Rox, and even xfce4 on Ubuntu but can't for the life of me get it to execute the RunImage file with any of the scripts or the Rox filer - it just keeps coming back as saying there's no such file or directory for RunImage even though the spelling, directory path and permissions are all correct. I don't know if I've missed something (I have already modified the settings file). This issue happens on both Ubuntu and macOS.
     
  9. Jim Audiomisc

    Jim Audiomisc pfm Member

    Hmmm...

    It's possible the distro builders have tampered with their version of ROX-filer. The following things really should work. Having extracted the StereoMPXGenerator directory (folder) and its contents from the tar...

    1) When viewed in a ROX-Filer filer window you should see the directory has a specific icon that differs from other directories.

    2) When you hover over that icon a short line of text should pop up. This should say,
    "Creates a WAV file containing MPX encoded tones".

    If they don't happen something may be wrong with your version of ROX-Filer or it needs it's settings played with.

    Note those things *won't* happen in an xfce window. The program is a ROX App and thus its Filer's GUI is needed. i.e. you need to open a ROX-Filer window to see the directory in it and use the GUI approach.

    I can't comment on macOS as I've not used it, and don't know if ROX-Filer is available for it.

    If they *do* happen then simply clicking on the icon in a ROX-Filer window should pop up a terminal with the startup text of the application appearing. This occurs because the file 'AppRun' is executed. (There is an alternative version that uses the xfce4 terminal but the default is an xterm.)

    If none of those work you should be able to open a terminal for yourself and cd your way to being in the StereoMPXGenerator directory. i.e. an ls in the terminal lists the contents. That done the program should be runnable in a terminal using
    ./AppRun

    Note the dot-slash to explictly say the script file is in the 'current' directory. This probably *will* work with xfce or other common filer GUIs because AppRun is just a standard bash script file, etc. Just that ROX 'recognises' this as its standard way to detect and use a ROX App in its filer windows.

    Note that you need to alter the settings file to give the full path name of where you want the output to go. As it comes, the path is on my machine. :)

    Using a terminal 'in' that directory ./RunImage should also work, but some ./AppRun files can add setup details. So ./AppRun is 'safer' for ROX apps.

    Let me know how you get on with that.
     
  10. MJS

    MJS Trade: Witch Hat Audio

    Here you go. The icon appears in the Rox filer as you suggested, and an xterm window pops up with the same error message as the command line below. I've tried it local and with the fully formed path to the executable. I had to generate the same messages below because I couldn't cut and paste from the xterm window - the messages are exactly the same when trying to run ./AppRun.

    PS. Was using the tab to autocomplete the commands, so the correct name and path is definitely used.

    mark@mark-VirtualBox:~/Downloads/StereoMPXGenerator$ ls -l
    total 48
    -rwxr-xr-x 1 mark mark 178 Jan 28 16:16 AppInfo.xml
    -rwxr-xr-x 1 mark mark 92 May 16 2010 AppRun
    drwxr-xr-x 2 mark mark 4096 Jan 28 16:16 Help
    -rwxr-xr-x 1 mark mark 9373 Jan 28 15:50 MPXGen.c
    -rwxrwxrwx 1 mark mark 13707 Jan 29 11:16 RunImage
    -rwxr-xr-x 1 mark mark 34 Jan 29 11:15 Settings
    -rwxr-xr-x 1 mark mark 79 Jan 29 11:04 xfce_AppRun
    mark@mark-VirtualBox:~/Downloads/StereoMPXGenerator$ ./RunImage
    bash: ./RunImage: No such file or directory
    mark@mark-VirtualBox:~/Downloads/StereoMPXGenerator$ /home/mark/Downloads/StereoMPXGenerator/RunImage
    bash: /home/mark/Downloads/StereoMPXGenerator/RunImage: No such file or directory
    mark@mark-VirtualBox:~/Downloads/StereoMPXGenerator$ cat Settings
    /home/mark/Desktop/wav_out
    3
    30
    3

     
  11. PigletsDad

    PigletsDad pfm Member

    I don't do RF for my day job, but occasionally help with testing software on a project that does. They have various fancy Sig Gens, mostly Rohde and Schwarz; possibly Marconi and HP. I could drop by their room and find the model numbers, but I think they would be overkill as they are mostly working in the UHF and low SHF bands.
     
  12. Jim Audiomisc

    Jim Audiomisc pfm Member

    I'm puzzled! Here I run xfce4 and ROX in parallel. So have a ROX filer panel at the bottom of the screen and an xfce one at the top, with the xfce icons for the drives and 'home' pinned to the backdrop. If I open up an xfce4 filer and go to the inside of StereoMPXGenerator it lists the files and tells me which ones are bash scripts, etc. If I use the xfce4 window to open a terminal ./AppRun works!

    You can apparently cat the Settings file's contents but get told the other files don't exist, despite showing with ls.

    Can you get GCC to recompile the MPXGen.c file? (May need you to flag the use of the math library.) If so, does the resulting executable work?

    Maybe something mysterious happened when I tarred the directory. If so, haven't encountered it here, and I transfer files this way between my linux boxes.
     
  13. Jim Audiomisc

    Jim Audiomisc pfm Member

    For me, something would need to be cheap as I'm only interested in this as a curio at present. If the modulator isn't linear I can tweak the driving waveforms generated. So don't need a superb VHF source.
     
  14. Jim Audiomisc

    Jim Audiomisc pfm Member

    IIUC you're using VirtualBox. I've never used that so don't know if it might be a factor here. However I'm puzzled also that you get a 'bash' report about ./RunImage because it is a compiled and linked executable. Not a script. I'll ask about this on the ROX email list as someone there may be able to put out the cause and remedy.
     
  15. Jim Audiomisc

    Jim Audiomisc pfm Member

    Just to add: Here if I view the directory using the xfce filer it shows me that AppRun is a bash shell file and that RunImage is a compiled executable. If I double-click the left mouse button on AppRun in that filer window it pops up a terminal and runs RunImage in it to let me make an MPX file.
     
  16. MJS

    MJS Trade: Witch Hat Audio

    Wow - that's odd. I've tried it on exactly the same Linux distribution (Ubuntu 16.04) on my home machine and it's executing.

    Except.. I get as far as getting the "Payload to write", and it hangs!

    Edit: I've tried with a clean Mint install on a VM and it's giving me the same error messages as earlier - grrr.

    I don't do this very often so get very rusty with anything that isn't vi. I'll have a go at compiling it
    Fancy re-writing it in python? :eek:
     
  17. MJS

    MJS Trade: Witch Hat Audio

    It complied once I'd included the math libraries with -lm on the end.
    The file executes, gets as far as writing the output then segmentation faults.
    FYI: this is the gnudebug output

    Program received signal SIGSEGV, Segmentation fault.
    fputc (c=82, fp=0x0) at fputc.c:35
    35 fputc.c: No such file or directory.
    (gdb) bt
    #0 fputc (c=82, fp=0x0) at fputc.c:35
    #1 0x0000000000401a30 in write4 ()
    #2 0x000000000040187e in write_output_header ()
    #3 0x0000000000400b51 in main ()
     
  18. davidsrsb

    davidsrsb pfm Member

    Pre-distortion is a good idea, this would work with even one of those VHF microphone bug kits.
     
  19. Jim Audiomisc

    Jim Audiomisc pfm Member

    My initial guess is that the output file's leafname or path isn't 'legal' for some reason. "write4()" simply writes out 4 chars/bytes to the output file so essentually calls fputc.

    However do you get an output file at all? if so, how big, etc?
     
  20. Jim Audiomisc

    Jim Audiomisc pfm Member

    The challenge is to determine what pre-distortion the user needs because it will be DAC and sig gen dependent. My thought it is to add some 'diagnostic' modes to the program and some more user settings. e.g...

    Have a 'P' output option which puts 19k on one channel of the file and 38k on the other. The user can display the resulting DAC output on a scope to see if it gives a clean 'figure 8'. If it doesn't, alter a phase offset value in the settings file until it does. Perhaps also altering a relative gain for the 38k subcarrier size. That would give a 1st order correction for amplitude and phase errors in the DAC.

    But I suspect doing this for the sig gen would really need an excellent tuner. Thinking about this.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice