Fixed pan bug (again)
Reduced the debug output The volune range is 0 -100 and dbtorms is used in pure data to make the scale logarithm
This commit is contained in:
parent
6e268323d2
commit
5cfd9f7a10
11 changed files with 43 additions and 29 deletions
|
@ -1,9 +1,9 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<dmxSettings fileVersion="1" layersNumber="4" path="/home/santi/audio" universeNumber="1">
|
||||
<dmxSettings fileVersion="1" layersNumber="3" path="/home/santi/lo_que_vio_el_mayordomo/sound" universeNumber="1">
|
||||
<layer0 dmx="1" universe="1" />
|
||||
<layer1 dmx="17" universe="1" />
|
||||
<layer2 dmx="33" universe="1" />
|
||||
<layer3 dmx="49" universe="1" />
|
||||
<layer1 dmx="21" universe="1" />
|
||||
<layer2 dmx="41" universe="1" />
|
||||
<layer3 dmx="61" universe="1" />
|
||||
<layer4 dmx="257" universe="1" />
|
||||
<layer5 dmx="321" universe="1" />
|
||||
<layer6 dmx="385" universe="1" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#N canvas 70 180 904 466 10;
|
||||
#N canvas 1132 494 547 527 audio_player 1;
|
||||
#N canvas 461 143 904 466 10;
|
||||
#N canvas 762 152 547 527 audio_player 1;
|
||||
#X msg 203 93 start;
|
||||
#X msg 259 95 stop;
|
||||
#X obj 119 140 oggread~;
|
||||
|
@ -9,7 +9,7 @@
|
|||
#X obj 77 213 *~ 0;
|
||||
#X obj 136 213 *~ 0;
|
||||
#X obj 158 450 dac~;
|
||||
#X obj 210 172 r \$0-c1;
|
||||
#X obj 382 129 r \$0-c1;
|
||||
#X obj 211 234 r \$0-c2;
|
||||
#X text 208 155 Volumen;
|
||||
#X text 266 233 Pan;
|
||||
|
@ -28,6 +28,11 @@
|
|||
#X obj 333 347 int;
|
||||
#X obj 335 305 * 100;
|
||||
#X obj 117 297 1 - \$1;
|
||||
#X msg 236 308 0.5;
|
||||
#X obj 238 274 loadbang;
|
||||
#X obj 383 157 dbtorms;
|
||||
#X floatatom 423 207 5 0 0 0 - - -;
|
||||
#X floatatom 385 259 5 0 0 0 - - -;
|
||||
#X connect 0 0 2 0;
|
||||
#X connect 1 0 2 0;
|
||||
#X connect 2 0 6 0;
|
||||
|
@ -38,9 +43,8 @@
|
|||
#X connect 5 0 13 0;
|
||||
#X connect 6 0 22 0;
|
||||
#X connect 7 0 21 0;
|
||||
#X connect 9 0 7 1;
|
||||
#X connect 9 0 6 1;
|
||||
#X connect 9 0 26 0;
|
||||
#X connect 9 0 30 0;
|
||||
#X connect 9 0 31 0;
|
||||
#X connect 10 0 18 0;
|
||||
#X connect 10 0 27 0;
|
||||
#X connect 13 0 0 0;
|
||||
|
@ -58,6 +62,13 @@
|
|||
#X connect 25 0 24 0;
|
||||
#X connect 26 0 25 0;
|
||||
#X connect 27 0 20 0;
|
||||
#X connect 28 0 18 0;
|
||||
#X connect 28 0 27 0;
|
||||
#X connect 29 0 28 0;
|
||||
#X connect 30 0 7 1;
|
||||
#X connect 30 0 6 1;
|
||||
#X connect 30 0 26 0;
|
||||
#X connect 30 0 32 0;
|
||||
#X restore 219 -234 pd audio_player;
|
||||
#X obj 19 -18 s \$0-c1;
|
||||
#X obj 79 -19 s \$0-c2;
|
||||
|
|
|
@ -3,19 +3,24 @@
|
|||
AudioLayerWidget::AudioLayerWidget(QWidget *parent, QString name):
|
||||
QGroupBox(parent)
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
this->setTitle(name);
|
||||
folder = new QLabel(this);
|
||||
folder->setMaximumWidth(150);
|
||||
file = new QLabel(this);
|
||||
file->setMaximumWidth(150);
|
||||
status = new QLabel(this);
|
||||
vol = new QSlider(this);
|
||||
vol = new QSlider(Qt::Horizontal, this);
|
||||
vol->setMaximum(99);
|
||||
mute = new QCheckBox(this);
|
||||
vol->setMaximumWidth(150);
|
||||
// mute = new QCheckBox(this);
|
||||
|
||||
QVBoxLayout *vbox = new QVBoxLayout;
|
||||
vbox->addWidget(folder);
|
||||
vbox->addWidget(file);
|
||||
vbox->addWidget(status);
|
||||
vbox->addWidget(vol);
|
||||
vbox->addWidget(mute);
|
||||
// vbox->addWidget(mute);
|
||||
this->setLayout(vbox);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ private:
|
|||
QLabel *file;
|
||||
QLabel *folder;
|
||||
QSlider *vol;
|
||||
QCheckBox *mute;
|
||||
// QCheckBox *mute;
|
||||
QLabel *status;
|
||||
};
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ void AudioMotor::parse(QString message)
|
|||
QStringList list = message.split("\n", QString::SkipEmptyParts);
|
||||
for (int i = 0; i < list.size(); i ++) {
|
||||
if (list.at(i).size() > 0) {
|
||||
qDebug() << "AudioMotor::newMessage() message received: " << list.at(i);
|
||||
// qDebug() << "AudioMotor::newMessage() message received: " << list.at(i);
|
||||
QChar val = list.at(i).at(0);
|
||||
switch (val.digitValue()) {
|
||||
case 0:
|
||||
|
@ -348,8 +348,6 @@ void AudioMotor::parse(QString message)
|
|||
|
||||
void AudioMotor::errorWrite(QAbstractSocket::SocketError error)
|
||||
{
|
||||
// QString error = m_writePD->errorString();
|
||||
|
||||
qErrnoWarning(QString("AudioMotor::errorWrite() %1").arg(error).toLatin1());
|
||||
emit toTerminal(QString("AudioMotor::errorWrite() ") + error);
|
||||
}
|
||||
|
|
|
@ -15,17 +15,17 @@ AudioWidget::AudioWidget(QWidget *parent) :
|
|||
void AudioWidget::mediaLoaded(int layer, QString folder, QString file)
|
||||
{
|
||||
QLayoutItem * const item = layout->itemAt(layer - 1);
|
||||
qDebug() << "AudioWidget::mediaLoaded Received layer: " << layer
|
||||
/* qDebug() << "AudioWidget::mediaLoaded Received layer: " << layer
|
||||
<< "Folder: " << folder
|
||||
<<"File : " << file;
|
||||
<<"File : " << file;*/
|
||||
dynamic_cast<AudioLayerWidget *>(item->widget())->setFolder(folder);
|
||||
dynamic_cast<AudioLayerWidget *>(item->widget())->setFile(file);
|
||||
}
|
||||
|
||||
void AudioWidget::volChanged(int layer, int vol) {
|
||||
QLayoutItem * const item = layout->itemAt(layer - 1);
|
||||
qDebug() << "AudioWidget::volChanged Received layer: " << layer
|
||||
<< "Vol : " << vol;
|
||||
/*qDebug() << "AudioWidget::volChanged Received layer: " << layer
|
||||
<< "Vol : " << vol;*/
|
||||
dynamic_cast<AudioLayerWidget *>(item->widget())->setVol(vol);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef DEFINES_H
|
||||
#define DEFINES_H
|
||||
|
||||
#define LAYERS_NUMBER 4
|
||||
#define LAYERS_NUMBER 3
|
||||
|
||||
|
||||
#endif // DEFINES_H
|
||||
|
|
|
@ -211,11 +211,11 @@ void libreMediaServerAudio::dmxInput(int layer, int channel, int value)
|
|||
break;
|
||||
case VOLUME_COARSE:
|
||||
f = ( value * 0x100 ) + ola->getValue(layer, VOLUME_FINE);
|
||||
AudioMotor::getInstance()->setLayerVolume(layer, f/65535);
|
||||
AudioMotor::getInstance()->setLayerVolume(layer, f/655.35);
|
||||
break;
|
||||
case VOLUME_FINE:
|
||||
f = ( ola->getValue(layer, VOLUME_COARSE) * 0x100 ) + value;
|
||||
AudioMotor::getInstance()->setLayerVolume(layer, f/65535);
|
||||
AudioMotor::getInstance()->setLayerVolume(layer, f/655.35);
|
||||
break;
|
||||
case PAN:
|
||||
f = (float)value / 255;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include "ui_libremediaserver-audio.h"
|
||||
|
||||
#define VERSION "LibreMediaServer-Audio Version 0.1.0"
|
||||
#define VERSION "Libre Media Server Audio 0.1.0"
|
||||
#define COPYRIGHT "(C) 2014 Santi Norena libremediaserver@gmail.com"
|
||||
#define LICENSE "GPL 3 License. See LICENSE.txt and credits.txt for details"
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>745</width>
|
||||
<height>636</height>
|
||||
<width>148</width>
|
||||
<height>95</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -20,7 +20,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>745</width>
|
||||
<width>148</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
|
|
@ -26,7 +26,7 @@ MediaLibrary::MediaLibrary(QObject *parent) :
|
|||
void MediaLibrary::initMediaLibrary() {
|
||||
QDir dir;
|
||||
if (!dir.cd(m_pathmedia)) {
|
||||
qWarning("olaInterface::initMediaLibrary| Can not cd to the path: ");
|
||||
qWarning("initMediaLibrary| Can not cd to the path: ");
|
||||
qWarning(m_pathmedia.toAscii().constData());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue