protux-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recording bugs (Was: [Protux-devel] color experimentation on BusMoni


From: Luciano Giordana
Subject: Re: recording bugs (Was: [Protux-devel] color experimentation on BusMonitor)
Date: Mon, 13 Jan 2003 23:31:43 +0000
User-agent: KMail/1.4.3

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




On Tuesday 14 January 2003 12:18 am, Martin Herren wrote:
> On Mon, 13 Jan 2003 21:27:50 +0000
>
> Luciano Giordana <address@hidden> wrote:
> > > current CVS seems still pretty buggy :-(
> > >
> > > 1) try the following:
> > >  - select first track
> > >  - set second track recordable
> > >  - record (first track is still the selected), the recording clip is
> > > displayed in the second track as it should. - stop recording
> > >  - the clip is rendered and is still in the second track
> > >  - after rendering the clip is on the first track ???
> > >
> > > 2) furthermore, it happend several time that when stopping recording,
> > > the new clip is just discarded... and it's not possible to unset the
> > > track to recordable, nor to record again on it (it says no track is
> > > armed)... all the other tracks still work fine (for playback as well as
> > > for recording)
> >
> > Why didnt anybody put all these on BL? I work on BL ;-)
>
> i noticed them tonight... they are on BL now ;-)
>
> > anyway, remember that 0.16.0 is not intended to be a wide-annouced
> > super-functional quite-stable public release we want it to be 0.20.0), it
> > is just the step 1 of 3 for next major release (0,20.0).
>
> can't wait for 0.20... duplex and sub-device-routing !
>
> > > 3) there are still X-Errors (at least when recording)
> >
> > This is a mistery, I tried to solve them many time, they are always
> > back...  I have some guesses, but no one of them are convincent even for
> > me...
>
> i tried to look at the clip drawing code... didn't understand it yet. Have
> to learn how zooming and scrooling is implemented first.
>
> /Martin

-- 
Luciano Giordana - Musician - Certified Java/GNU C++ Developer - Free Software 
Evangelist
Project Protux : Free Professional Audio Tool for GNU/Linux
http://www.freesoftware.fsf.org/protux
-- Once Palladium is up and running , I will become a hacker --




reply via email to

[Prev in Thread] Current Thread [Next in Thread]