Re: [question] SoundFileView - channel spacing
scott-y6qSm6YX8/[email protected] Wed, 11 Apr 2018 23:22:20 +0000
| Newsgroups | gmane.comp.audio.supercollider.devel |
|---|---|
| Message-ID | <CANmfHJ_JUkV2u5w_Np14fcHA-hmExiMsc57GCxc82_sqJXTQAg@mail.gmail.com> |
Sorry! I didn't catch that you were parameterizing the spacing - that sounds great. Re #1, I'm not sure how it affects displaying stereo files specifically? My thinking was - if we're going to change the margin where waveforms hit the edge of the view, we might as well make it zero, which both simplifies the calculations you mentioned and also makes SoundFileView much easier to lay out. Currently, SFV's internal margins make it wonky and misaligned with anything it's sitting next to: https://ibb.co/dP4Qrc Whereas, with no outer margins, we would get something that would look more like: https://ibb.co/e2G5rc Incidentally, I noticed that pixMap is filled in with QColor(0,0,0) - this should be _bkgColor. And, if we're drawing the waveform (e.g. _drawWaveform && dirty), we don't need to pre-fill the area with _bkgColor, since the pixMap will just overwrite all those pixels anyway (saving us at least one full fill). - S On Wed, Apr 11, 2018 at 2:38 PM <[email protected]> wrote: > Thanks, Scott. > > 1. SoundFileView channels are drawn with no margin (i.e. butted against >> the edge of their rect) >> > The current default is to have a margin, I think that the default margin > should be left in, for arguably one of the the most common usage scenarios > (displaying a waveform of a stereo sound file). > >> 2. Spacing between channels is a user-definable parameter (this should be >> a pretty trivial addition) >> > I mentioned that I'm adding the control of spacing. > > The question is whether we get (n+1) spaces (and then calculating channel > rect is cumbersome) or whether the first and last space in the view is half > the height of the other spaces. > > -m >