#3434 HIGH Update.: Fully variable Freq slider in Measure (was: Freq slider should take 3 discrete values in Measure)

Zarro Boogs per Child bugtracker at laptop.org
Tue Oct 30 14:21:59 EDT 2007


#3434: Fully variable Freq slider in Measure
-------------------------------+--------------------------------------------
  Reporter:  arjs              |       Owner:  arjs    
      Type:  defect            |      Status:  new     
  Priority:  high              |   Milestone:  Update.2
 Component:  measure-activity  |     Version:          
Resolution:                    |    Keywords:  slider  
  Verified:  0                 |  
-------------------------------+--------------------------------------------

Comment(by Hello1024):

 It'd be a bit of a structure change for measure, but how about this:

 Instead of changing the ALSA sampling rate, leave the sampling rate
 static, and instead change the length of the buffer.  Then in the plotting
 code make it "fit to screen" so it always shows the entire buffer.  The
 "fit to screen" would work by seperating each sample point by (screen
 width/buffer length) pixels on the X axis.

 If it turns out that at the lower frequency setting there are too many
 data points to plot (ie more than 500 or so), then just start skipping
 data points so there's only 1 per pixel on the x axis.  More accurately,
 you could plot the "range" of pixels that would've been plotted at that x
 axis position and mark the minimum and maximum. (which would give exactly
 the same result as plotting all the points, but would be more efficient)
 That system is arguably better than using a low pass filter because it
 will be more like a "real" oscilloscope, which doesn't have any filters.

 The above algorithm suggestion can only be implemented after the drawing
 speed problem has been solved.

 If only it was written in a programming language I knew better! - theres
 so many features I'd like to put in...

-- 
Ticket URL: <https://dev.laptop.org/ticket/3434#comment:7>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list