LevelPanWidget.cpp File Reference
#include "LevelPanWidget.h"
#include <QPainter>
#include <QMouseEvent>
#include <QWheelEvent>
#include "layer/ColourMapper.h"
#include "base/AudioLevel.h"
#include "WidgetScale.h"
#include <iostream>
#include <cmath>
#include <cassert>
Include dependency graph for LevelPanWidget.cpp:

Go to the source code of this file.

Variables

static const int maxPan = 2
 Gain and pan scales: More...
 

Variable Documentation

const int maxPan = 2
static

Gain and pan scales:

Gain: we have 5 circles vertically in the display, each of which has half-circle and full-circle versions, and we also have "no circles", so there are in total 11 distinct levels, which we refer to as "notches" and number 0-10. (We use "notch" because "level" is used by the external API to refer to audio gain.)

i.e. the levels are represented by these (schematic, rotated to horizontal) displays:

0 X 1 [ 2 [] 3 [][ ... 9 [][][][][ 10 [][][][][]

If we have mute enabled, then we map the range 0-10 to gain using AudioLevel::fader_to_* with the ShortFader type, which treats fader 0 as muted. If mute is disabled, then we map the range 1-10.

We can also disable half-circles, which leaves the range unchanged but limits the notches to even values.

Pan: we have 5 columns with no finer resolution, so we only have 2 possible pan values on each side of centre.

Definition at line 64 of file LevelPanWidget.cpp.

Referenced by LevelPanWidget::audioPanToPan(), LevelPanWidget::cellCentre(), LevelPanWidget::cellSize(), LevelPanWidget::clampPan(), LevelPanWidget::coordsToPan(), LevelPanWidget::panToAudioPan(), LevelPanWidget::renderTo(), and LevelPanWidget::thinLineWidth().