[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recording bugs (Was: [Protux-devel] color experimentation on BusMoni
From: |
Martin Herren |
Subject: |
Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor) |
Date: |
Wed, 15 Jan 2003 00:34:00 +0100 |
On Mon, 13 Jan 2003 23:31:43 +0000
Luciano Giordana <address@hidden> wrote:
> How zooming works ( please add this into SPECIFICATIONS file documentation
> purposes)
>
> 1) what means 1:n
>
> each 1 peak show (a red line 1 pixel wide), n are scanned, and the maximum of
> them is the most representative
>
> 2) from 1:1 to 1:64, the data is scanned directly from the audio file. This
> is possible because considering a standard video screen of 1024 pixels
>
> the maximum samples read from the file will be 64*1024*2 (2 channels), which
> is a low data quantity even for the slowest hard disks today
>
> 3) from 1:64 on, a Peak image is pre-built (peak class) the "most
> representatives" peaks are stored in peak "buffers", so when the clip must
> be drawn, instead of scanning all samples from the files, the Peak class
> gives the pre-scanned peaks from the buffers. These buffers are
> pre-saved in .peak files so they can be fastly load .
>
> 4) zooming is done by redrawing the clips. The clips, when redraw, re-read
> the peak buffers for the current zoom factor (1:64, 1:128, and so on...
>
> 5) The current horizontal zoom factor is controlled by the variable hzoom in
> Song. It goes from 0 to 32 , corresponding to the factores 1:1 ... 1:65536
>
> The increment is not x2. The complete sequence of factores are 1:x where x
> is :
>
> 1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 48, 64,
> 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072,
> 4096, 6144, 8192, 12288, 16384, 24576, 32768, 65536
>
>
> 6) scrolling is done by changing the variable firstBlock at Song class. and
> recreating the tracks
>
> 7) There are 2 important functions in Song that converts from a "X" point (a
> x coordinate in the screen) to the equivalent audio block position
> the "block" position is defined by
>
> blockpos = fileposition / (channels*(bitdepth/8)
>
> which means the position of a pair of samples for a stereo file or the
> position of a sample for a mono file
>
>
> so, the two functions are
>
> int Song::block_to_xpos(long long block)
>
> long long Song::xpos_to_block(int xpos)
>
>
> By using these functions a clip "knows" where to draw the peak graphics for a
> pair of samples by getting a corresponded xpos for those samples' block
> positions
>
>
>
> I hope that these informations help to understand zooming, clip drawing and
> scrolling
>
> L
thanks... didn't have time to get more into it yet, but this will definitively
help !
--
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch
Martin Herren +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc
pgp0uESL8xorP.pgp
Description: PGP signature
- [Protux-devel] color experimentation on BusMonitor, Martin Herren, 2003/01/13
- Re: [Protux-devel] color experimentation on BusMonitor, Luciano Giordana, 2003/01/13
- Re: [Protux-devel] color experimentation on BusMonitor, Martin Herren, 2003/01/13
- Re: [Protux-devel] color experimentation on BusMonitor, Luciano Giordana, 2003/01/13
- recording bugs (Was: [Protux-devel] color experimentation on BusMonitor), Martin Herren, 2003/01/13
- Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor), Luciano Giordana, 2003/01/13
- Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor), Martin Herren, 2003/01/13
- Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor), Luciano Giordana, 2003/01/13
- Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor),
Martin Herren <=
- Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor), booker, 2003/01/15
- Re: [Protux-devel] color experimentation on BusMonitor, Luciano Giordana, 2003/01/13