Stereo Sound Generator & Monitor Scope Rev2.7 23 June 2013

Share your advanced PureBasic knowledge/code with the community.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Ver2.2 April 3 - Stereo Sound Generator and Monitor Sco

Post by RichardL »

@Simo_na
Possibly, but what do they acheive that the dotted line cursors do not?
(I have been a devotee of Hewlett Packard / Agilent test equipment for about 50 years and tend to use methods they adopt on their mixed signal oscilloscopes.... it's force of habit I guess :D )

@All
Keep watching this space, something rather tasty is on the way!

RichardL
Simo_na
Enthusiast
Enthusiast
Posts: 177
Joined: Sun Mar 03, 2013 9:01 am

Re: Ver2.2 April 3 - Stereo Sound Generator and Monitor Sco

Post by Simo_na »

RichardL wrote:@Simo_na
Possibly, but what do they acheive that the dotted line cursors do not?

RichardL

in the proposed method the crosshair is linked to the waveform , the possible manual movement is only 'left' or 'right' , the horizontal movement of the crosshair is forced to follow the amplitude of waveforms... ;)

thanks for spread your work, very nice...
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Ver2.2 April 3 - Stereo Sound Generator and Monitor Sco

Post by RichardL »

Version 2.3 - Saturday 11th May 2013

Several new features have been added. The source file in the first posting will be updated in a few minutes.

- STORAGE SCOPE: Incoming signals are now written to a second circular buffer and the trigger threshold can be used to stop the writing process thus keeping data leading up to the trigger event stored in the buffer. In fact the writing into the store does not happen immediately so about half the store contains data before the trigger and the remainder contains data after the trigger. Use the TrigSource option 'Single Shot A' (or B) to activate the process, set the trigger level at about 50% and activate the 'Arm S.Shot' button.... the next signal over the trigger threshold will stop the data acquisition and the scrollbar under the display cab be used to scroll through the whole buffer. The blue line shows the trigger event. (I have a microphone on Channel A and test the system by dropping a pencil on the table, I can capture a nice transient with the associated decay envelope.( If you are going to experiment using a microphone as input it would be good to become familiar with setting the microphone gain in the Windoze audio setup.)

- TRIGGER CURSOR: At the last minute I added a cursor to adjust the trigger level, it made the screen look a bit cluttered so it only remains visible for five seconds after it is moved. To provide a visible indication of where it was left a small yellow blob is put on the left edge of the display. I quite like this way of adjusting the trigger level and would welcome your views.

- HOT KEYS: CTRL+C copies the current display to the clipboard, CTRL+S writes it to a file with BMP or JPG options and CTRL+P writes the display to a printer. (The printer option is not completed... 'Fred' is a place holder for some descriptive text that is yet to be added.)

- TRACE A & B SWITCHES: The two audio generators are now switched On and Off independently of the two 'scope traces. The new controls are 'Trace Switches' labelled 'Trace A' and 'Trace B'.

- INPUT SELECTION: Switching between displaying the Audio Generator and external inputs (via the soundcard inputs) is now done with a pair of OptionGadgets() in the 'Trace Management' box.

MISC
- The control panel has been reworked, but not yet cosmetically where I want it to be.

- I tested with CAPTURECLOCK set to 96000 and it worked OK... I may make this a menu bar option.

I have done some testing and all seems well... I need to look at the circular store roll over logic and finish off the printer output. Its raining heavily so hopefully no grass cutting tomorrow!

RichardL
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: Rev2.3 May 11 2013 - Stereo Sound Generator & Monitor S

Post by utopiomania »

Wow! :D Thanks, works perfectly here, Toshiba Satellite C870D - 116, Windows 8 64 bit.

Impressed :wink:
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 536
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: Rev2.3 May 11 2013 - Stereo Sound Generator & Monitor S

Post by BasicallyPure »

Your latest version is a nice upgrade. I like the trigger options for the oscilloscope.

I would suggest that the time measurement cursors be referenced relative to the trigger point instead of the left edge of the screen.

Keep up the good work!

BP
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
Simo_na
Enthusiast
Enthusiast
Posts: 177
Joined: Sun Mar 03, 2013 9:01 am

Re: Rev2.3 May 11 2013 - Stereo Sound Generator & Monitor S

Post by Simo_na »

CH1/A ...CH2/B ...ok ... :) ...missing the function .. "BOTH" :oops:...and the "INVERSE" + "ADD" to see differences ... :D

thank you
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Rev2.3 May 11 2013 - Stereo Sound Generator & Monitor S

Post by RichardL »

@Simo_NA
- I have added trace invert on both channels and also A=B+A, which were quick and easy.
- Also added trigger 'Sense' option to trigger on rising or falling edges.
Both these and a few other goodies will be in the Rev 2.4 version.

I need to throttle back a bit on this; the program is intended to help teach prospective radio amateurs about electronic basics and is in danger of acquiring features that are a bit OTT in that context and more appropriate with a better / faster input /output device than a sound card!

Regards,
RichardL
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Rev2.3 May 11 2013 - Stereo Sound Generator & Monitor S

Post by RichardL »

Hi Folks,
I have some other jobs to get on with so this is the last revision for some time unless someone reports a significant bug!

Version 2.4
Added:
- BETTER CURSORS: The V1, V2 cursors and the Trigger threshold now track the datum lines when they are dragged, as determined by the 'Volt Ref' selector.
- TRACE INVERT: Either or both of the 'scope traces may be inverted with the Invert 'A' or Invert 'B' check-boxes.
- TRACE ADD: The 'A' trace may be replaced by A=A+B. If either trace is inverted the result is a display of the difference.
- TRIG SENSE: The trigger can now act on the positive or negative slope on the waveform, defaulting to '+' and changed by clicking the 'Sense' button.
- X-EXPAND: The mouse-wheel offers a limited degree of trace expansion/compression, very handy with stored traces, works OK but needs a little bit of tidying.

Sorted:
- Freeze mode buffer roll over now works as intended.

Yet to do:
Improve X _Expand / Compress when in normal mode...


Feedback and comments always welcome.
RichardL
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by infratec »

Hi RichardL,

I just tested V2.4 and... first click first bug.

When I start the program in the IDE everything works.
Than I click on Channel 'A' On/Off and everything freezes.

But click first on Channel 'B' On/Off works.

I use Win 7 64bit with PB5.11 x86

Bernd

P.S.: V2.3 works, I'll look a bit closer now.
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by infratec »

If I switch off the debugger it works.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by RichardL »

@infratec
Did you adjust the trigger level to get it to run? (Click on the little yello 'blob' on the left of the display and drag the triiger level up/down. The 'Trig' line disappears after five seconds, but is draggable when visible, so is the 'fresh air' where the line would be!).)

Same setup here. Win 7 64bit with PB5.11 x86 and it allows me to switch traces on and off without any problems. :?

Richard
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by infratec »

Hi Richard,

I don't switch off the traces, I swich off the 'Audio Generator'.
And I can do nothing than, because the GUI accepts nothing.
But if I pause the program I can step through with the debugger.

And I really only start it, change nothing and switch off audio generation from channel A.

Bernd
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by RichardL »

@Infratec
OK, so you run the program and both signal generator channels provide an output (I guess you can hear them OK). The 'Trig Source' defaults to channel 'A' and the display is active. Switching Audio generator 'A' Off will remove the trigger source for the 'scope and the display will freeze. That is exactly right, except maybe I should clear the frozen trace 'A' off the screen.

Switching Channel 'A' On should restore the situation, or you could select 'B' as the trigger source and slide the 'Trig' cursor down to trace 'B' and it will synchronise correctly.

Try selecting 'External' as the 'Signal Source' and use a microphone to create a waveform and experiment with the 'Trig' level... this will give you an idea of it's intended use. Then move on to 'Single shot A' and capture some transients... like dropping a coin on the desk.

Let me know how you get on...

RichardL
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 536
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by BasicallyPure »

I get the same problem as infratec describes.
Program freezes after clicking off channel A audio gen.
I have to kill the program from IDE to stop it.
Runs ok with debugger off.
Windows 7 x64, PureBasic 5.11 x64.

BP
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Rev2.4 May 16 2013 - Stereo Sound Generator & Monitor S

Post by RichardL »

OK folks, I will have to look at this tomorrow.
RichardL
Post Reply