dgedit-0.10.0/ 0000755 0000764 0000764 00000000000 13414443753 010051 5 0000000 0000000 dgedit-0.10.0/AUTHORS 0000644 0000764 0000764 00000000512 13356346462 011043 0000000 0000000 Founder and lead developer:
Bent Bisballe Nyeng [deva] (deva@aasimon.org)
Developer:
Jonas Suhr Christensen [suhr] (jsc@umbraculum.org)
Developer, Graphics, GUI design and logo:
Lars Muldjord [muldjord] (muldjordlars@gmail.com)
Developer:
André Nusser [chaot4]
French translation:
Olivier Humbert (trebmuh@tuxfamily.org) dgedit-0.10.0/src/ 0000755 0000764 0000764 00000000000 13414443753 010640 5 0000000 0000000 dgedit-0.10.0/src/ts/ 0000755 0000764 0000764 00000000000 13414443753 011266 5 0000000 0000000 dgedit-0.10.0/src/ts/dgedit_da.ts 0000644 0000764 0000764 00000047002 13414430366 013461 0000000 0000000
AboutDialogAbout DGEditOm DGEdit<h1>DGEdit</h1><h2>v.<h1>DGEdit</h1><h2>v.CanvasToolListenListenLytCanvasToolSelectionsSelectionsMarkeringerCanvasToolThresholdThresholdGrænseværdiChannelDialogChannel DialogKanalerName of the channel:Kanalens navn:ChannelMapDeligate<None><Ingen>FileDataModel<None><Ingen>MMFilenameFilnavnmmNameNavnKit ChannelTrommesæt kanalFileListOpen fileÅbn filAudio Files (*.wav)Lyd filer (*.wav)Set as Master (dbl-click)Vælg hovedkanal (dbl klik)Edit nameRedigér navnRemoveFjernRemove allFjern alleInstrumentDialogInstrument DialogInstrumentName of the instrument:Navn på instrumentet:InstrumentWidgetToolsVærktøjerPlay samplesAfspil lydbidderProcessProcessérFilesFilerGenerateGenerérEditRedigérFiles: (double-click to set as master)Filer: (dobbeltklik for at vælge som hovedkanal)Add files...Tilføj filer...ClearRydAttack length:Attack længde:Power spread:Energi spredning:Minimum size (samples):Minimum størrelse (samples):Falloff:Falloff:Fadelength:Fadelængde:Prefix:Præfix:Export path:Eksporteringssti:......ExportEksportérLoading...Indlæser...ReadyKlarSelect export pathVælg eksporteringsstiMainWindowToolsVærktøjer&File&Filer&New Project&Nyt projekt&Load Project...&Indlæs projekt...&Save Project&Gem projektSave Project As...Gem projekt som...&Quit&Afslut&Project&Projekt&Export...&Eksportér...&Edit Project...&Redigér projekt...HelpHjælpAboutOmInstruments:Instrumenter:Kit channels:Trommesæt kanaler:Delete InstrumentSlet instrumentAre you sure you want to delete the selected instrument(s)?Er du sikkert på at du vil slette det/de valgte instrument(er)?Delete ChannelSlet kanalAre you sure you want to delete the selected channel(s)?Er du sikker på at du vil slette den/de valgte kanal(er)?ChannelsKanaler[Untitled Project][Unavngivet projekt]Save before closing project?Gem projektet før det lukkes?The project has changed. Do you want to save before closing?Projektet er ændret. Vil du gemme før du lukker?Load DGEdit ProjectIndlæs DGEdit projektDGEdit Project Files (*.dgedit)DGEdit projekt filer (*.dgedit)LoadedIndlæstSavedGemtSave DGEdit ProjectGem DGEdit projektPlay samplesAfspil lydbidderDock WidgetDock vindueFilesFilerEditRedigérExportEksportérReadyKlarFiles: (double-click to set as master)Filer: (dobbeltklik for at vælge som hovedkanal)Add files...Tilføj filer...GenerateGenerérClearRydAttack length:Attack længde:Power spread:Energi spredning:Minimum size (samples):Minimum størrelse (samples):Falloff:Falloff:Fadelength:Fadelængde:Prefix:Prefix:Export path:Eksporteringssti:......Loading...Indlæser...Select export pathVælg eksporteringsstiProjectDialogProject DialogProjektName of the project:Navn på projektet:......Base path of raw files:Basis sti for de rå filer:Description of the project:Beskrivelse af projektet:Choose base directory with the raw sample files.Vælg basis sti for de rå lydfiler.ProjectRendererWriting instrument: Skriver instrument:RenderDialogExport drumkitEksportér trommesætExport path:Eksporteringssti:......ExportEksportérChoose export directory.Vækg eksporteringssti.SelectionEditorFrom:Fra:To:Til:FadeIn:FadeIn:FadeOut:FadeOut:Energy:Energi:Name:Navn:VolumeFaderPeak Peak Gain %1 dBForstærkning %1 dB
dgedit-0.10.0/src/ts/dgedit_fr.ts 0000644 0000764 0000764 00000050040 13414430366 013500 0000000 0000000
AboutDialogAbout DGEditÀ propos de DGEdit<h1>DGEdit</h1><h2>v.<h1>DGEdit</h1><h2>v.CanvasToolListenListenÉcouteCanvasToolSelectionsSelectionsSélectionsCanvasToolThresholdThresholdSeuil de déclenchementChannelDialogChannel DialogDialogue de canalName of the channel:Nom du canal : ChannelMapDeligate<None><None>FileDataModel<None><Aucun>MMFilenameNom de fichiermmNameNomKit ChannelCanal de kitFileListOpen fileOuvrir un fichierAudio Files (*.wav)Fichiers audio (*.wav)Set as Master (dbl-click)Paramétrer en tant que maître (dbl-clic)Edit nameÉditer le nomRemoveSupprimerRemove allSupprimer toutInstrumentDialogInstrument DialogDialogue d'instrumentName of the instrument:Nom de l'instrument : InstrumentWidgetToolsOutilsPlay samplesLire les échantillonsProcessTraiterFilesFichiersGenerateGénérerEditÉditerFiles: (double-click to set as master)Fichiers : (double-clic pour paramétrer en tant que maître)Add files...Ajouter des fichiers...ClearViderAttack length:Longueur d'attaque :Power spread:Étalement de la puissance :Minimum size (samples):Taille minimum (échantillons) :Falloff:Temps de chute :Fadelength:Longueur de fondu :Prefix:Préfixe :Export path:Chemin d'exportation :......ExportExporterLoading...Chargement...ReadyPrêtSelect export pathSélectionner le chemin d'exportationMainWindowToolsOutils&File&Fichiers&New Project&Nouveau projet&Load Project...&Charger un projet...&Save Project&Sauvegarder le projetSave Project As...Sauvegarder le projet en tant que...&Quit&Quitter&Project&Projet&Export...&Exporter...&Edit Project...&Éditer le projet...HelpAideAboutÀ proposInstruments:Instruments :Kit channels:Canaux de kit :Delete InstrumentEffacer l'instrumentAre you sure you want to delete the selected instrument(s)?Êtes-vous sûr de vouloir effacer l'(les)instrument(s) sélectionné(s) ?Delete ChannelEffacer le canalAre you sure you want to delete the selected channel(s)?Êtes-vous sûr de vouloir effacer le ou les canaux sélectionnés ?ChannelsCanaux[Untitled Project][projet sans nom]Save before closing project?Sauvegarder avant de fermer le projet ?The project has changed. Do you want to save before closing?Le projet a été modifié. Voulez-vous sauvegarder avant de fermer ?Load DGEdit ProjectCharger un projet DGEditDGEdit Project Files (*.dgedit)Fichiers de projet DGEdit (*.dgedit)LoadedChargéSavedSauvegardéSave DGEdit ProjectSauvegarder un projet DGEditPlay samplesLire les échantillonsDock WidgetQuai des gadgetsFilesFichiersEditÉditerExportExporterReadyPrêtFiles: (double-click to set as master)Fichiers : (double-clic pour paramétrer en tant que maître)Add files...Ajouter des fichiers....GenerateGénérerClearViderAttack length:Longueur d'attaque :Power spread:Étalement de la puissance :Minimum size (samples):Taille minimum (échantillons) :Falloff:Temps de chute :Fadelength:Longueur de fondu :Prefix:Préfixe :Export path:Chemin d'exportation :......Loading...Chargement...Select export pathSélectionner le chemin d'exportationProjectDialogProject DialogDialogue de projetName of the project:Nom du projet :......Base path of raw files:Chemin de base des fichiers bruts (raw)Description of the project:Description du projet :Choose base directory with the raw sample files.Choisir un répertoire de base avec des fichiers d'échantillons bruts.ProjectRendererWriting instrument: Écrire l'instrument : RenderDialogExport drumkitExporter le kit de batterieExport path:Chemin d'exportation :......ExportExporterChoose export directory.Choisir le répertoire d'exportation.SelectionEditorFrom:Depuis :To:Jusqu'à :FadeIn:Fondu ouverture :FadeOut:Fondu fermeture :Energy:Énergie :Name:Nom :VolumeFaderPeak Pic Gain %1 dBGain %1 dB
dgedit-0.10.0/src/renderdialog.cc 0000644 0000764 0000764 00000023051 13414430366 013523 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* renderdialog.cc
*
* Thu Sep 20 17:32:11 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "renderdialog.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "project.h"
class ProgressDelegate
: public QStyledItemDelegate
{
// Q_OBJECT
public:
ProgressDelegate(Project& project, QObject *parent)
: QStyledItemDelegate(parent)
, project(project)
{
}
void paint(QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const override
{
if(/*index.row() == current_row &&*/
index.column() == 2 &&
index.parent() == QModelIndex())
{
QStyleOptionProgressBar progressBarOption;
progressBarOption.state = QStyle::State_Enabled;
progressBarOption.direction = QApplication::layoutDirection();
progressBarOption.rect = option.rect;
progressBarOption.fontMetrics = QApplication::fontMetrics();
progressBarOption.minimum = 0;
progressBarOption.textAlignment = Qt::AlignCenter;
progressBarOption.textVisible = true;
if(index.row() == current_row)
{
// Current task
progressBarOption.maximum = progress_max;
progressBarOption.progress = progress;
}
else if(index.row() < current_row)
{
// Finished task
progressBarOption.maximum = 100;
progressBarOption.progress = 100;
}
else
{
// Waiting task
progressBarOption.maximum = 100;
progressBarOption.progress = 0;
}
QApplication::style()->drawControl(QStyle::CE_ProgressBar,
&progressBarOption, painter);
}
else
{
QStyledItemDelegate::paint(painter, option, index);
}
}
void setActiveTask(int current_instrument_id)
{
auto instrument_ids = project.getInstrumentList();
current_row = 0;
for(auto instrument_id : instrument_ids)
{
if(current_instrument_id == instrument_id)
{
return;
}
current_row++;
}
// current_row will be one above the row count here
}
void setProgressMaximum(int progress_max)
{
this->progress_max = progress_max;
}
void setProgress(int progress)
{
this->progress = progress;
}
private:
Project& project;
int progress{0};
int progress_max{100};
int current_row{-1};
};
class RenderDataModel
: public QAbstractItemModel
{
public:
RenderDataModel(Project& project)
: project(project)
{
}
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override
{
if(!hasIndex(row, column, parent))
{
return QModelIndex();
}
if(!parent.isValid())
{
auto instrument_ids = project.getInstrumentList();
if(row < instrument_ids.size())
{
return createIndex(row, column, (void*)42);
}
else
{
return QModelIndex(); // row is out of bounds.
}
}
return QModelIndex();
}
QModelIndex parent(const QModelIndex &index) const override
{
return QModelIndex(); // no parent
}
int rowCount(const QModelIndex &parent = QModelIndex()) const override
{
if(parent.column() > 0) // only return row count on first column
{
return 0;
}
if(!parent.isValid())
{
auto instrument_ids = project.getInstrumentList();
return instrument_ids.size();
}
return 0; // no children
}
int columnCount(const QModelIndex &parent = QModelIndex()) const override
{
return 3; // icon, text, progressbar
}
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
{
if(!index.isValid())
{
return QVariant();
}
if(role == Qt::DecorationRole)
{
if(index.column() == 0)
{
if(index.row() < current_row)
{
return QPixmap(":/icons/task_done.png");
}
else if(index.row() == current_row)
{
if(error)
{
return QPixmap(":/icons/task_error.png");
}
else
{
return QPixmap(":/icons/task_running.png");
}
}
else
{
return QPixmap(":/icons/task_waiting.png");
}
}
}
if(role == Qt::DisplayRole)
{
auto instrument_ids = project.getInstrumentList();
auto instrument_id = instrument_ids.begin() + index.row();
const auto& instrument = project.getInstrument(*instrument_id);
switch(index.column())
{
case 1: return instrument.getInstrumentName();
default: return QVariant();
}
}
return QVariant();
}
void setError()
{
error = true;
}
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
{
return QVariant();
}
void refresh()
{
beginResetModel();
endResetModel();
}
void setActiveTask(int current_instrument_id)
{
auto instrument_ids = project.getInstrumentList();
current_row = 0;
for(auto instrument_id : instrument_ids)
{
if(current_instrument_id == instrument_id)
{
return;
}
current_row++;
}
// current_row will be one above the row count here
}
private:
Project& project;
int current_row{-1};
bool error{false};
};
RenderDialog::RenderDialog(QWidget* parent, Project& project)
: QDialog(parent)
, project(project)
, renderer(project)
{
setWindowTitle(tr("Export drumkit"));
model = new RenderDataModel(project);
auto vl = new QVBoxLayout();
setLayout(vl);
layout()->addWidget(new QLabel(tr("Export path:")));
{
auto hl = new QHBoxLayout();
export_path = new QLineEdit(this);
export_path->setText(project.getExportPath());
connect(export_path, SIGNAL(textEdited(const QString&)),
this, SLOT(exportPathChanged(const QString&)));
auto btn = new QPushButton(tr("..."));
btn->setMaximumWidth(32);
connect(btn, SIGNAL(clicked()), this, SLOT(chooseExportPath()));
hl->addWidget(export_path);
hl->addWidget(btn);
vl->addLayout(hl);
}
export_btn = new QPushButton(this);
export_btn->setText(tr("Export"));
connect(export_btn, SIGNAL(clicked()), this, SLOT(render()));
layout()->addWidget(export_btn);
bar = new QProgressBar(this);
connect(&renderer, SIGNAL(progressStart(int)),
bar, SLOT(setMaximum(int)));
layout()->addWidget(bar);
connect(&renderer, SIGNAL(progressRenderStart(int)),
this, SLOT(progressRenderStart(int)));
connect(&renderer, SIGNAL(progressRenderTask(int)),
this, SLOT(progressRenderTask(int)));
tasks = new QTreeView(this);
tasks->setModel(model);
tasks->setHeaderHidden(true);
tasks->setRootIsDecorated(false);
tasks->header()->resizeSection(0, 24);
delegate = new ProgressDelegate(project, this);
tasks->setItemDelegate(delegate);
connect(&renderer, SIGNAL(progressStart(int)),
this, SLOT(progressStart(int)));
connect(&renderer, SIGNAL(progressFinished(int)),
this, SLOT(progressFinished(int)));
layout()->addWidget(tasks);
connect(&renderer, SIGNAL(progressTask(QString)),
this, SLOT(progressTask(QString)));
connect(&renderer, SIGNAL(progressRenderFinished(int)),
this, SLOT(progressRenderFinished(int)));
}
void RenderDialog::render()
{
bar->setValue(1);
renderer.render();
}
void RenderDialog::progressStart(int total)
{
export_btn->setEnabled(false);
}
void RenderDialog::progressTask(QString text)
{
//tasks->addItem(text);
}
void RenderDialog::progressRenderStart(int tasktotal)
{
auto task = bar->value();
auto instrument_ids = project.getInstrumentList();
auto instrument_id = instrument_ids.begin() + (task - 1);
delegate->setActiveTask(*instrument_id);
model->setActiveTask(*instrument_id);
delegate->setProgressMaximum(tasktotal);
model->refresh();
}
void RenderDialog::progressRenderTask(int subtask)
{
delegate->setProgress(subtask);
model->refresh();
}
void RenderDialog::progressRenderFinished(int success)
{
auto task = bar->value();
// Search past the last instriment id to mark all tasks as finished
auto instrument_ids = project.getInstrumentList();
auto instrument_id = instrument_ids.begin() + task;
delegate->setActiveTask(*instrument_id); // note this id is invalid
model->setActiveTask(*instrument_id); // note this id is invalid
bar->setValue(task + 1);
if(success != 0)
{
model->setError();
}
model->refresh();
}
void RenderDialog::progressFinished(int success)
{
if(success != 0)
{
model->setError();
}
model->refresh();
export_btn->setEnabled(true);
}
void RenderDialog::chooseExportPath()
{
QString path =
QFileDialog::getExistingDirectory(
this, tr("Choose export directory."),
project.getExportPath(), QFileDialog::ShowDirsOnly);
if(path != "")
{
export_path->setText(path);
project.setExportPath(path);
}
}
void RenderDialog::exportPathChanged(const QString& path)
{
project.setExportPath(path);
}
dgedit-0.10.0/src/audioextractor.cc 0000644 0000764 0000764 00000016266 13414430366 014133 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* audioextractor.cc
*
* Sat Nov 21 13:09:35 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "audioextractor.h"
#include
#include
#include
#include
#include
#include
#include "project.h"
#define INSTRUMENT_VERSION "2.0"
typedef struct
{
SNDFILE *fh;
float *data;
} audiodata_t;
AudioExtractor::AudioExtractor(Instrument& instrument, QObject *parent)
: QObject(parent)
, instrument(instrument)
{
}
bool AudioExtractor::exportSelections()
{
auto selections = instrument.getSelections();
auto exportpath = instrument.getProject().getExportPath();
auto prefix = instrument.getPrefix();
int samplerate = -1;
emit setMaximumProgress(selections.ids().size() + 1/* for xml writing*/);
int progress = 0;
emit progressUpdate(progress++);
qApp->processEvents();
// Open all input audio files:
auto audiofile_ids = instrument.getAudioFileList();
audiodata_t audiodata[audiofile_ids.size()];
int idx = 0;
for(auto audiofile_id : audiofile_ids)
{
const auto& audiofile = instrument.getAudioFile(audiofile_id);
QString file = audiofile.getAbsoluteFile();
SF_INFO sf_info;
audiodata[idx].fh = sf_open(file.toStdString().c_str(), SFM_READ, &sf_info);
if(!audiodata[idx].fh)
{
printf("AudioExtractor load error '%s'\n", file.toStdString().c_str());
return false;
}
if(samplerate == -1)
{
// Store the first samplerate we meet
samplerate = sf_info.samplerate;
}
audiodata[idx].data = NULL;
idx++;
}
idx = 1;
QVector sels = selections.ids();
// Sort selections by velocity
for(int v1 = 0; v1 < sels.size(); v1++)
{
for(int v2 = 0; v2 < sels.size(); v2++)
{
Selection sel1 = selections.get(sels[v1]);
Selection sel2 = selections.get(sels[v2]);
if(sel1.energy < sel2.energy)
{
sel_id_t vtmp = sels[v1];
sels[v1] = sels[v2];
sels[v2] = vtmp;
}
}
}
if(samplerate == -1)
{
// For some reason we never got a samplerate. Set it to 44k1Hz
samplerate = 44100;
}
// Iterate and write audio files
QVector::iterator si = sels.begin();
while(si != sels.end())
{
Selection sel = selections.get(*si);
size_t offset = sel.from;
size_t size = sel.to - sel.from;
size_t fadein = sel.fadein;
size_t fadeout = sel.fadeout;
// Read all input audio file chunks:
for(int i = 0; i < audiofile_ids.size(); i++)
{
// Clear out old buffer (if one exists)
if(audiodata[i].data)
{
delete audiodata[i].data;
audiodata[i].data = NULL;
}
SNDFILE *fh = audiodata[i].fh;
sf_seek(fh, offset, SEEK_SET);
float *data = new float[size];
sf_read_float(fh, data, size);
// Apply linear fadein
for(size_t fi = 0; fi < fadein; fi++)
{
float val = ((float)fi / (float)fadein);
if(fi < size) data[fi] *= val;
}
// Apply fadeout
for(size_t fo = 0; fo < fadeout; fo++)
{
float val = 1.0 - ((float)fo / (float)fadeout);
if( (((size - fadeout) + fo) < size) &&
(((size - fadeout) + fo) >= 0) )
{
data[(size - fadeout) + fo] *= val;
}
}
audiodata[i].data = data;
}
// Create output path:
QString path = exportpath + QDir::separator() + prefix + QDir::separator() + "samples";
QDir d;
d.mkpath(path);
// Write all sample chunks to single output file:
QString file = path + QDir::separator() + QString::number(idx) + "-" + prefix + ".wav";
SF_INFO sf_info;
sf_info.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT;
sf_info.samplerate = samplerate;
sf_info.channels = audiofile_ids.size();
SNDFILE *ofh = sf_open(file.toStdString().c_str(), SFM_WRITE, &sf_info);
if(!ofh)
{
printf("Open for write error. %s\n", file.toStdString().c_str());
return false;
}
for(size_t ob = 0; ob < size; ob++)
{
float obuf[audiofile_ids.size()];
for(int ai = 0; ai < audiofile_ids.size(); ai++)
{
obuf[ai] = audiodata[ai].data[ob];
}
sf_write_float(ofh, obuf, audiofile_ids.size());
}
sf_close(ofh);
idx++;
si++;
emit progressUpdate(progress++);
qApp->processEvents();
}
// Close all input audio files:
for(int i = 0; i < audiofile_ids.size(); i++)
{
if(audiodata[i].data)
{
delete audiodata[i].data;
audiodata[i].data = NULL;
}
sf_close(audiodata[i].fh);
}
// Ugly hack to ensure the xml attribute order is the same each time a save
// or export is performed.
qSetGlobalQHashSeed(0);
QDomDocument doc;
QDomProcessingInstruction header =
doc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
doc.appendChild(header);
QDomElement instrument_node = doc.createElement("instrument");
instrument_node.setAttribute("version", INSTRUMENT_VERSION);
instrument_node.setAttribute("name", prefix);
doc.appendChild(instrument_node);
QDomElement samples = doc.createElement("samples");
instrument_node.appendChild(samples);
{
// Do the adding to the xml file one sample at the time.
int index = 0;
QVector::iterator si = sels.begin();
while(si != sels.end())
{
index++;
Selection i = selections.get(*si);
i.name = prefix + "-" + QString::number(index);
QDomElement sample = doc.createElement("sample");
sample.setAttribute("name", i.name);
sample.setAttribute("power", QString::number(i.energy));
samples.appendChild(sample);
selections.update(*si, i);
int channelnum = 1; // Filechannel numbers are 1-based.
for(auto audiofile_id : audiofile_ids)
{
const auto& audiofile = instrument.getAudioFile(audiofile_id);
QString file = audiofile.getFile();
QString name = audiofile.getName();
QDomElement audiofile_node = doc.createElement("audiofile");
audiofile_node.setAttribute("file", "samples/" +
QString::number(index) + "-" + prefix + ".wav");
audiofile_node.setAttribute("channel", name);
audiofile_node.setAttribute("filechannel", QString::number(channelnum));
sample.appendChild(audiofile_node);
channelnum++;
}
si++;
}
}
QFile xmlfile(exportpath + QDir::separator() + prefix + QDir::separator() + prefix + ".xml");
if(!xmlfile.open(QIODevice::WriteOnly))
{
return false;
}
xmlfile.write(doc.toByteArray());
xmlfile.close();
emit progressUpdate(progress++);
qApp->processEvents();
return true;
}
dgedit-0.10.0/src/aboutdialog.cc 0000644 0000764 0000764 00000012052 13356154464 013364 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* aboutdialog.cc
*
* Sat Oct 6 14:29:56 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "aboutdialog.h"
#include "stdio.h"
#include
#include
#include
#include
#include
#include
#include
AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags f)
: QDialog(parent, f)
{
setWindowTitle(tr("About DGEdit"));
setFixedSize(590,500);
// Read AUTHORS data from file
QFile file(":AUTHORS");
QByteArray authorsText;
if(file.open(QIODevice::ReadOnly))
{
authorsText = file.readAll();
file.close();
}
else
{
printf("ERROR: Couldn't find AUTHORS file at the designated location.\n");
authorsText = "ERROR: File not found...";
}
// Read COPYING data from file
file.setFileName(":COPYING");
QByteArray gplText;
if(file.open(QIODevice::ReadOnly))
{
gplText = file.readAll();
file.close();
}
else
{
printf("ERROR: Couldn't find COPYING file at the designated location.\n");
gplText = "ERROR: File not found...";
}
QVBoxLayout *layout = new QVBoxLayout();
QHBoxLayout *topLayout = new QHBoxLayout();
QLabel *logo = new QLabel();
logo->setPixmap(QPixmap(":icons/logo.png"));
QLabel *title = new QLabel;
title->setWordWrap(true);
title->setText(tr("
DGEdit
"
"
v." VERSION "
"
"Copyright (C) 2008-2018 Bent Bisballe Nyeng - Aasimon.org. "
"This is free software. You may redistribute copies of it "
"under the terms of the GNU General Public License "
"(http://www.gnu.org/licenses/gpl.html). There is NO "
"WARRANTY, to the extent permitted by law."));
topLayout->addWidget(logo);
topLayout->addWidget(title);
topLayout->setStretch(1, 1);
topLayout->setStretch(2, 2);
QLabel *releaseInfo = new QLabel(authorsText);
releaseInfo->setStyleSheet("QLabel { background-color : white; }");
QScrollArea *releaseInfoScroll = new QScrollArea();
releaseInfoScroll->setWidget(releaseInfo);
releaseInfoScroll->setStyleSheet("QScrollArea { background-color : white; }");
QLabel *license = new QLabel(gplText);
license->setStyleSheet("QLabel { font-family: monospace; "
"background-color : white; }");
licenseScroll = new QScrollArea();
licenseScroll->setStyleSheet("QScrollArea { background-color : white; }");
licenseScroll->setWidget(license);
connect(licenseScroll->verticalScrollBar(), SIGNAL(sliderPressed()),
this, SLOT(noMoreScroll()));
tabs = new QTabWidget();
connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(checkTab(int)));
tabs->addTab(releaseInfoScroll, "Release Info");
tabs->addTab(licenseScroll, "License");
layout->addLayout(topLayout);
layout->addWidget(tabs);
setLayout(layout);
scrollState = 0; // 0 = initial state
// 1 = initiate scroll
// 2 = scroll 1 step
// 3 = no more scroll
scrollTimer = new QTimer();
scrollTimer->setSingleShot(true);
connect(scrollTimer, SIGNAL(timeout()), this, SLOT(scroll()));
}
void AboutDialog::mousePressEvent(QMouseEvent * event)
{
if(event) // TODO: Perhaps do a mouse click check on the event
{
accept();
}
}
void AboutDialog::scroll()
{
switch(scrollState)
{
case 0 : // 0 = initial state
scrollState = 1;
scrollTimer->setInterval(5000);
scrollTimer->start();
break;
case 1 : // 1 = initiate scroll
scrollState = 2;
licenseScroll->verticalScrollBar()->setValue(0);
scrollTimer->setInterval(200);
scrollTimer->start();
break;
case 2 : // 2 = scroll 1 step
licenseScroll->verticalScrollBar()->
setValue(licenseScroll->verticalScrollBar()->value() + 2);
if(licenseScroll->verticalScrollBar()->value() >=
licenseScroll->verticalScrollBar()->maximum())
{
scrollState = 0;
}
scrollTimer->start();
break;
case 3 : // 3 = no more scroll
scrollTimer->stop();
break;
}
}
void AboutDialog::noMoreScroll()
{
scrollState = 3;
}
void AboutDialog::checkTab(int tabIndex)
{
if(tabIndex == 1)
{
scrollState = 0;
scrollTimer->stop();
scroll();
}
}
dgedit-0.10.0/src/channelswidget.cc 0000644 0000764 0000764 00000002513 13325573607 014072 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* channelswidget.cc
*
* Sat May 26 09:28:12 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "channelswidget.h"
#include "project.h"
#include "settings.h"
ChannelsWidget::ChannelsWidget(Settings& settings, Project& project)
: settings(settings)
, project(project)
{
}
ChannelsWidget::~ChannelsWidget()
{
}
dgedit-0.10.0/src/volumefader.h 0000644 0000764 0000764 00000003255 13253513071 013237 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* volumefader.h
*
* Tue Apr 15 15:46:00 CEST 2014
* Copyright 2014 Jonas Suhr Christensen
* jsc@umbraculum.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
class VolumeFader
: public QWidget
{
Q_OBJECT
public:
VolumeFader();
~VolumeFader();
void volumeDb();
void volumePower();
public slots:
void updatePeakDb(double vol);
void updatePeakPower(double vol);
void setVolumeDb(double vol);
void setVolumePower(double vol);
private slots:
void handleValueChanged();
signals:
void volumeChangedDb(double vol);
void volumeChangedPower(double vol);
private:
QSlider* volslider;
QLabel* volumepeak;
QLabel* volume;
double peak;
};
dgedit-0.10.0/src/instrumentwidget.h 0000644 0000764 0000764 00000005505 13325573607 014355 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* instrumentwidget.h
*
* Sat May 12 15:38:38 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include "canvas.h"
#include "audioextractor.h"
#include "samplesorter.h"
#include "filelist.h"
#include "canvastoolselections.h"
#include "canvastoolthreshold.h"
#include "canvastoollisten.h"
#include "selection.h"
#include "player.h"
#include "zoomslider.h"
#include "canvaswidget.h"
class Instrument;
class Settings;
class Preset
{
public:
QString prefix;
int attacklength;
int falloff;
int fadelength;
};
Q_DECLARE_METATYPE(Preset)
class InstrumentWidget
: public QMainWindow
{
Q_OBJECT
public:
InstrumentWidget(Settings& settings, Instrument& instrument);
~InstrumentWidget();
public slots:
void doExport();
void loadFile(QString filename);
void playSamples();
void browse();
void tabChanged(int tabid);
void generateSlidersChanged();
void selectionChanged();
void prefixChanged();
void exportPathChanged();
private:
QWidget* createFilesTab();
QWidget* createEditTab();
QWidget* createGenerateTab();
QWidget* createExportTab();
int generateTabId;
SampleSorter* sorter;
CanvasToolSelections* tool_selections;
CanvasToolThreshold* threshold;
CanvasToolListen* listen;
AudioExtractor* extractor;
FileList* filelist;
CanvasWidget* canvaswidget;
QScrollBar* sb_playsamples;
QComboBox* presets;
QSlider* slider_attacklength;
QSlider* slider_spread;
QSlider* slider_hold;
QSlider* slider_falloff;
QSlider* slider_fadelength;
QLineEdit* prefix;
QLineEdit* lineed_exportp;
QTabWidget* tabs;
// Session state information:
Selections selections;
Selections selections_preview;
Player player;
Settings& settings;
Instrument& instrument;
};
dgedit-0.10.0/src/projectrenderer.h 0000644 0000764 0000764 00000003030 13353450222 014111 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectrender.h
*
* Sat Sep 22 10:35:00 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class Project;
class ProjectRenderer
: public QObject
{
Q_OBJECT
public:
ProjectRenderer(Project& project);
void render();
signals:
void progressStart(int total);
void progressTask(QString text);
void progressRenderStart(int tasktotal);
void progressRenderTask(int subtask);
void progressRenderFinished(int success);
void progressFinished(int success);
private:
Project& project;
};
dgedit-0.10.0/src/project.cc 0000644 0000764 0000764 00000024240 13356154465 012543 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* project.cc
*
* Sun May 6 11:38:11 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "project.h"
#include
#include
#include
#include
AudioFile::AudioFile(Instrument& instrument, int id)
: id(id)
, instrument(instrument)
{
}
int AudioFile::getId() const
{
return id;
}
QString AudioFile::getFile() const
{
return file;
}
void AudioFile::setFile(const QString& file)
{
if(this->file == file)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
this->file = file;
}
}
QString AudioFile::getAbsoluteFile() const
{
QFileInfo info(file);
if(info.isRelative())
{
// Prepend root path
return instrument.getProject().getRawFileRoot() + QDir::separator() + file;
}
return file;
}
QString AudioFile::getName() const
{
return name;
}
void AudioFile::setName(const QString& name)
{
if(this->name == name)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
this->name = name;
}
}
int AudioFile::getChannelMapId() const
{
return channel_map_id;
}
void AudioFile::setChannelMapId(int channel_map_id)
{
if(this->channel_map_id == channel_map_id)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
this->channel_map_id = channel_map_id;
}
}
bool AudioFile::getMainChannel() const
{
return main_channel;
}
void AudioFile::setMainChannel(bool main_channel)
{
if(this->main_channel == main_channel)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
this->main_channel = main_channel;
}
}
Instrument::Instrument(Project& project, int id)
: id(id)
, project(project)
{
}
int Instrument::getId() const
{
return id;
}
QString Instrument::getInstrumentName() const
{
return instrument_name;
}
void Instrument::setInstrumentName(const QString& instrument_name)
{
if(this->instrument_name == instrument_name)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->instrument_name = instrument_name;
if(prefix.isEmpty())
{
setPrefix(instrument_name); // replicate name to prefix
}
}
}
QString Instrument::getMasterFile() const
{
return master_file;
}
void Instrument::setMasterFile(const QString& master_file)
{
if(this->master_file == master_file)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->master_file = master_file;
}
}
AudioFile& Instrument::getAudioFile(int id)
{
for(auto& audio_file : audio_files)
{
if(audio_file.getId() == id)
{
return audio_file;
}
}
Q_ASSERT(false); // No such audio_file id.
}
int Instrument::createAudioFile()
{
Project::RAIIBulkUpdate bulkUpdate(project);
audio_files.emplace_back(*this, project.next_id);
++project.next_id;
return audio_files.back().getId();
}
void Instrument::deleteAudioFile(int id)
{
Project::RAIIBulkUpdate bulkUpdate(project);
for(auto it = audio_files.begin(); it != audio_files.end(); ++it)
{
if((*it).getId() == id)
{
audio_files.erase(it);
return;
}
}
Q_ASSERT(false); // No such audio_file id.
}
QList Instrument::getAudioFileList() const
{
QList audio_file_list;
for(auto& audio_file : audio_files)
{
audio_file_list.push_back(audio_file.getId());
}
return audio_file_list;
}
std::size_t Instrument::getAttackLength() const
{
return attack_length;
}
void Instrument::setAttackLength(std::size_t attack_length)
{
if(this->attack_length == attack_length)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->attack_length = attack_length;
}
}
std::size_t Instrument::getPowerSpread() const
{
return power_spread;
}
void Instrument::setPowerSpread(std::size_t power_spread)
{
if(this->power_spread == power_spread)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->power_spread = power_spread;
}
}
std::size_t Instrument::getMinimumSize() const
{
return minimum_size;
}
void Instrument::setMinimumSize(std::size_t minimum_size)
{
if(this->minimum_size == minimum_size)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->minimum_size = minimum_size;
}
}
std::size_t Instrument::getFalloff() const
{
return falloff;
}
void Instrument::setFalloff(std::size_t falloff)
{
if(this->falloff == falloff)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->falloff = falloff;
}
}
std::size_t Instrument::getFadeLength() const
{
return fade_length;
}
void Instrument::setFadeLength(std::size_t fade_length)
{
if(this->fade_length == fade_length)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->fade_length = fade_length;
}
}
float Instrument::getThreshold() const
{
return threshold;
}
void Instrument::setThreshold(float threshold)
{
if(this->threshold == threshold)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->threshold = threshold;
}
}
Selections Instrument::getSelections() const
{
return selections;
}
void Instrument::setSelections(const Selections& selections)
{
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->selections = selections;
}
}
QString Instrument::getPrefix() const
{
return prefix;
}
void Instrument::setPrefix(const QString& prefix)
{
if(this->prefix == prefix)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->prefix = prefix;
}
}
Project& Instrument::getProject()
{
return project;
}
Channel::Channel(Project& project, int id)
: id(id)
, project(project)
{
}
int Channel::getId() const
{
return id;
}
QString Channel::getChannelName() const
{
return channel_name;
}
void Channel::setChannelName(const QString& channel_name)
{
if(this->channel_name == channel_name)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(project);
this->channel_name = channel_name;
}
}
Project& Channel::getProject()
{
return project;
}
void Project::bulkUpdateBegin()
{
++update_count;
}
void Project::bulkUpdateEnd()
{
Q_ASSERT(update_count);
--update_count;
if(update_count == 0)
{
emit projectChanged();
}
}
QString Project::getProjectFile() const
{
return project_file;
}
void Project::setProjectFile(const QString& project_file)
{
this->project_file = project_file;
}
QString Project::getProjectName() const
{
return project_name;
}
void Project::setProjectName(const QString& project_name)
{
if(this->project_name == project_name)
{
return;
}
{
RAIIBulkUpdate bulkUpdate(*this);
this->project_name = project_name;
}
}
QString Project::getRawFileRoot() const
{
return raw_file_root;
}
void Project::setRawFileRoot(const QString& raw_file_root)
{
if(this->raw_file_root == raw_file_root)
{
return;
}
{
RAIIBulkUpdate bulkUpdate(*this);
this->raw_file_root = raw_file_root;
}
}
QString Project::getExportPath() const
{
return export_path;
}
void Project::setExportPath(const QString& export_path)
{
if(this->export_path == export_path)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(*this);
this->export_path = export_path;
}
}
QString Project::getProjectDescription() const
{
return description;
}
void Project::setProjectDescription(const QString& description)
{
if(this->description == description)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(*this);
this->description = description;
}
}
double Project::getProjectSamplerate() const
{
return samplerate;
}
void Project::setProjectSamplerate(double samplerate)
{
if(this->samplerate == samplerate)
{
return;
}
{
Project::RAIIBulkUpdate bulkUpdate(*this);
this->samplerate = samplerate;
}
}
Instrument& Project::getInstrument(int id)
{
for(auto& instrument : instruments)
{
if(instrument.getId() == id)
{
return instrument;
}
}
Q_ASSERT(false); // No such instrument id.
}
int Project::createInstrument()
{
RAIIBulkUpdate bulkUpdate(*this);
instruments.emplace_back(*this, next_id);
++next_id;
return instruments.back().getId();
}
void Project::deleteInstrument(int id)
{
RAIIBulkUpdate bulkUpdate(*this);
for(auto it = instruments.begin(); it != instruments.end(); ++it)
{
if((*it).getId() == id)
{
instruments.erase(it);
return;
}
}
Q_ASSERT(false); // No such instrument id.
}
QList Project::getInstrumentList() const
{
QList instrument_list;
for(auto& instrument : instruments)
{
instrument_list.push_back(instrument.getId());
}
return instrument_list;
}
Channel& Project::getChannel(int id)
{
for(auto& channel : channels)
{
if(channel.getId() == id)
{
return channel;
}
}
Q_ASSERT(false); // No such channel id.
}
int Project::createChannel()
{
RAIIBulkUpdate bulkUpdate(*this);
channels.emplace_back(*this, next_id);
++next_id;
return channels.back().getId();
}
void Project::deleteChannel(int id)
{
RAIIBulkUpdate bulkUpdate(*this);
for(auto it = channels.begin(); it != channels.end(); ++it)
{
if((*it).getId() == id)
{
channels.erase(it);
return;
}
}
Q_ASSERT(false); // No such channel id.
}
QList Project::getChannelList() const
{
QList channel_list;
for(auto& channel : channels)
{
channel_list.push_back(channel.getId());
}
return channel_list;
}
void Project::reset()
{
RAIIBulkUpdate bulkUpdate(*this);
setProjectName("");
setProjectFile("");
setRawFileRoot("");
setExportPath("");
instruments.clear();
channels.clear();
next_id = 0;
}
dgedit-0.10.0/src/projectserialiser.cc 0000644 0000764 0000764 00000022220 13356154465 014622 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectserialiser.cc
*
* Sat May 12 10:11:22 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "projectserialiser.h"
#include
#include
#include
#include
/*
MyProject/some/path
*/
class DomHelper
{
public:
DomHelper(const QDomDocument& doc) : elem(doc.documentElement()) {}
DomHelper(const QDomElement& elem) : elem(elem) {}
DomHelper operator()(const QString& name)
{
auto node = elem.namedItem(name);
if(!node.isElement())
{
std::cout << "No such child-element: '" << name.toStdString() << "'\n";
QDomElement e;
return DomHelper(e);
}
return DomHelper(node.toElement());
}
QString operator[](const QString& name)
{
auto attrs = elem.attributes();
auto node = attrs.namedItem(name);
if(!node.isAttr())
{
std::cout << "No such attribute: '" << name.toStdString() << "'\n";
return "";
}
return node.toAttr().value();
}
QString text()
{
return elem.text();
}
// Get child nodes with tag_name or all child nodes if tag_name == "".
std::vector children(const QString& tag_name = "")
{
std::vector children;
auto child_nodes = elem.childNodes();
for(int i = 0; i < child_nodes.count(); ++i)
{
auto node = child_nodes.at(i);
if(!node.isElement())
{
continue;
}
auto elem = node.toElement();
if(elem.tagName() == tag_name || tag_name == "")
{
children.emplace_back(DomHelper(elem));
}
}
return children;
}
private:
QDomElement elem;
};
QString ProjectSerialiser::serialise(const Project& project)
{
// Ugly hack to ensure the xml attribute order is the same each time a save
// or export is performed.
qSetGlobalQHashSeed(0);
QDomDocument doc;
auto header =
doc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
doc.appendChild(header);
auto dgedit = doc.createElement("dgedit");
doc.appendChild(dgedit);
dgedit.setAttribute("version", "1.0");
auto project_name = doc.createElement("project_name");
project_name.appendChild(doc.createTextNode(project.project_name));
dgedit.appendChild(project_name);
auto raw_file_root = doc.createElement("raw_file_root");
raw_file_root.appendChild(doc.createTextNode(project.raw_file_root));
dgedit.appendChild(raw_file_root);
auto description = doc.createElement("description");
description.appendChild(doc.createTextNode(project.description));
dgedit.appendChild(description);
auto export_path = doc.createElement("export_path");
export_path.appendChild(doc.createTextNode(project.export_path));
dgedit.appendChild(export_path);
dgedit.setAttribute("next_id", project.next_id);
dgedit.setAttribute("samplerate", project.samplerate);
auto channels = doc.createElement("channels");
dgedit.appendChild(channels);
for(const auto& c : project.channels)
{
auto channel = doc.createElement("channel");
channel.setAttribute("id", c.getId());
channel.setAttribute("name", c.getChannelName());
channels.appendChild(channel);
}
auto instruments = doc.createElement("instruments");
dgedit.appendChild(instruments);
for(const auto& i : project.instruments)
{
auto instrument = doc.createElement("instrument");
instrument.setAttribute("id", (int)i.getId());
instrument.setAttribute("attack_length", (int)i.getAttackLength());
instrument.setAttribute("power_spread", (int)i.getPowerSpread());
instrument.setAttribute("minimum_size", (int)i.getMinimumSize());
instrument.setAttribute("falloff", (int)i.getFalloff());
instrument.setAttribute("fade_length", (int)i.getFadeLength());
instrument.setAttribute("threshold", i.getThreshold());
auto prefix = doc.createElement("prefix");
prefix.appendChild(doc.createTextNode(i.getPrefix()));
instrument.appendChild(prefix);
instruments.appendChild(instrument);
auto instrument_name = doc.createElement("instrument_name");
instrument_name.appendChild(doc.createTextNode(i.instrument_name));
instrument.appendChild(instrument_name);
auto file_list = doc.createElement("file_list");
instrument.appendChild(file_list);
for(const auto& audiofile : i.audio_files)
{
auto file = doc.createElement("file");
file.appendChild(doc.createTextNode(audiofile.getFile()));
file.setAttribute("id", audiofile.getId());
file.setAttribute("name", audiofile.getName());
file.setAttribute("channel_map_id", audiofile.getChannelMapId());
file.setAttribute("master", i.master_file == audiofile.getAbsoluteFile());
file.setAttribute("main", audiofile.getMainChannel() ? "true" : "false");
file_list.appendChild(file);
}
auto regions = doc.createElement("regions");
regions.setAttribute("nextid", i.selections.nextid);
regions.setAttribute("act", i.selections.act);
instrument.appendChild(regions);
for(auto r = i.selections.sels.begin(); r != i.selections.sels.end(); ++r)
{
auto region = doc.createElement("region");
region.setAttribute("id", (int)r.key());
region.setAttribute("from", (int)r.value().from);
region.setAttribute("to", (int)r.value().to);
region.setAttribute("fadein", (int)r.value().fadein);
region.setAttribute("fadeout", (int)r.value().fadeout);
region.setAttribute("energy", r.value().energy);
region.setAttribute("name", r.value().name);
regions.appendChild(region);
}
}
return doc.toString();
}
bool ProjectSerialiser::deserialise(const QString& data, Project& project)
{
// Ugly hack to ensure the xml attribute order is the same each time a save
// or export is performed.
qSetGlobalQHashSeed(0);
QDomDocument doc;
if(!doc.setContent(data))
{
std::cout << "Could not parse XML\n";
return false;
}
project.reset();
DomHelper dom(doc);
QString version = dom["version"];
if(version != "1.0")
{
std::cout << "Bad version: '" << version.toStdString() << "'\n";
return false;
}
project.next_id = dom["next_id"].toInt();
project.samplerate = dom["samplerate"].toDouble();
project.project_name = dom("project_name").text();
project.raw_file_root = dom("raw_file_root").text();
project.description = dom("description").text();
project.export_path = dom("export_path").text();
auto channels = dom("channels").children("channel");
for(auto& channel : channels)
{
auto id = channel["id"].toInt();
project.channels.emplace_back(Channel(project, id));
auto& ch = project.channels.back();
ch.channel_name = channel["name"];
}
auto instruments = dom("instruments").children("instrument");
for(auto& instrument : instruments)
{
auto id = instrument["id"].toInt();
project.instruments.emplace_back(Instrument(project, id));
auto& instr = project.instruments.back();
instr.instrument_name = instrument("instrument_name").text();
QString master_file;
auto files = instrument("file_list").children("file");
for(auto& file : files)
{
auto id = file["id"].toInt();
instr.audio_files.emplace_back(AudioFile(instr, id));
auto& audiofile = instr.audio_files.back();
audiofile.file = file.text();
audiofile.name = file["name"];
audiofile.channel_map_id = file["channel_map_id"].toInt();
audiofile.main_channel = file["main"] == "true";
if(file["master"] == "1")
{
master_file = audiofile.getAbsoluteFile();
}
}
instr.master_file = master_file;
instr.attack_length = instrument["attack_length"].toInt();
instr.power_spread = instrument["power_spread"].toInt();;
instr.minimum_size = instrument["minimum_size"].toInt();
instr.falloff = instrument["falloff"].toInt();
instr.fade_length = instrument["fade_length"].toInt();
instr.threshold = instrument["threshold"].toFloat();
instr.prefix = instrument("prefix").text();
auto selections = instrument("regions");
instr.selections.nextid = selections["nextid"].toInt();
instr.selections.act = selections["act"].toInt();
for(auto& selection : selections.children())
{
Selection s;
s.from = selection["from"].toInt();
s.to = selection["to"].toInt();
s.fadein = selection["fadein"].toInt();
s.fadeout = selection["fadeout"].toInt();
s.energy = selection["energy"].toFloat();
s.name = selection["name"];
instr.selections.sels[selection["id"].toInt()] = s;
}
}
return true;
}
dgedit-0.10.0/src/projectserialiser.h 0000644 0000764 0000764 00000002455 13325573607 014473 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectserialiser.h
*
* Sat May 12 10:11:22 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include "project.h"
class ProjectSerialiser
{
public:
QString serialise(const Project& project);
bool deserialise(const QString& data, Project& project);
};
dgedit-0.10.0/src/channelswidget.h 0000644 0000764 0000764 00000002573 13325573607 013742 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* channelswidget.h
*
* Sat May 26 09:28:12 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class Project;
class Settings;
class ChannelsWidget
: public QMainWindow
{
Q_OBJECT
public:
ChannelsWidget(Settings& settings, Project& project);
~ChannelsWidget();
public slots:
private:
Settings& settings;
Project& project;
};
dgedit-0.10.0/src/zoomslider.h 0000644 0000764 0000764 00000004002 13253513170 013104 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* zoomslider.h
*
* Fri May 2 21:23:26 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
class ZoomSlider
: public QSlider
{
Q_OBJECT
public:
ZoomSlider(Qt::Orientation orientation);
//! Range of the slider. 'from' may be lesser than 'to' which will invert the
//! slider.
void setRange(float from, float to);
//! Set the distance between emitting of valueChanged signals.
//! Example: from:=0, to:=1 and width:=0.5 will emit valueChanged signals on
//! 0.0, 0.5 and 1.0 (ie. the slider will have 3 actual values)
//! NOTE: If 'width' is greater than the span of [from; to] only the 'from'
//! and 'to' values can be selected on the slider.
void setTickWidth(float width);
void setValue(float value);
signals:
void valueChanged(float value);
private slots:
void sliderValueChanged(int value);
protected:
void paintEvent(QPaintEvent* ev);
private:
float fromSlider(int value);
bool inverted;
float from;
float to;
float tick_width;
};
dgedit-0.10.0/src/selectioneditor.h 0000644 0000764 0000764 00000003306 13325573607 014132 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* selectioneditor.h
*
* Thu Apr 17 17:25:17 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include "selection.h"
class Instrument;
class SelectionEditor
: public QWidget
{
Q_OBJECT
public:
SelectionEditor(Selections& selections, Instrument& instrument);
public slots:
void added(sel_id_t id);
void updated(sel_id_t id);
void removed(sel_id_t id);
void activeChanged(sel_id_t id);
private slots:
void update();
void updateSelection();
private:
Selections& selections;
sel_id_t cur;
QLineEdit* from;
QLineEdit* to;
QLineEdit* fadein;
QLineEdit* fadeout;
QLineEdit* energy;
QLineEdit* name;
Instrument& instrument;
};
dgedit-0.10.0/src/canvas.h 0000644 0000764 0000764 00000004412 13353450222 012174 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvas.h
*
* Tue Nov 10 08:37:37 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include "mipmap.h"
#include "canvastool.h"
class Canvas
: public QWidget
{
Q_OBJECT
public:
Canvas(QWidget* parent);
~Canvas();
void load(QString file);
void addTool(CanvasTool* tool);
float mapX(float x);
float unmapX(float x);
float mapY(float y);
float unmapY(float y);
public slots:
void setXScale(float scale);
void setYScale(float scale);
void setXOffset(float scroll);
void setYOffset(float scroll);
protected:
void mouseMoveEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void resizeEvent(QResizeEvent* event);
void paintEvent(QPaintEvent* event);
void keyReleaseEvent(QKeyEvent* event);
private:
MipMap* mipmap;
void updateWav();
void getWavValues(int last, int lx, float* vu, float* vl,
float* avgu, float* avgl);
QImage wav;
public:
float* data;
size_t size;
double samplerate{44100};
QVector tools;
private:
float xscale;
float yscale;
float xoffset;
float yoffset;
QColor colBg;
QColor colSec;
QColor colMax;
QColor colHalf;
QColor colWavMax;
QColor colWavAvg;
};
dgedit-0.10.0/src/zoomslider.cc 0000644 0000764 0000764 00000005122 13253510747 013255 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* zoomslider.cc
*
* Fri May 2 21:23:26 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the 45Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "zoomslider.h"
#include
ZoomSlider::ZoomSlider(Qt::Orientation orientation)
: QSlider(orientation)
{
inverted = false;
from = 0;
to = 1;
tick_width = 0.1;
connect(this, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int)));
}
void ZoomSlider::paintEvent(QPaintEvent *ev)
{
/*
QPainter p(this);
p.drawLine(0, 0, width(), height());
*/
QSlider::paintEvent(ev);
}
void ZoomSlider::setRange(float from, float to)
{
this->inverted = false;
this->from = from;
this->to = to;
int i_from = from / tick_width;
int i_to = to / tick_width;
if(i_from > i_to)
{
this->inverted = true;
int tmp;
tmp = i_from;
i_from = i_to;
i_to = tmp;
}
QSlider::setRange(i_from, i_to);
}
float ZoomSlider::fromSlider(int value)
{
float val = (float)value * tick_width;
if(inverted)
{
val *= -1;
val = val - to + from;
if(value == QSlider::minimum())
{
val = from;
}
if(value == QSlider::maximum())
{
val = to;
}
}
else
{
if(value == QSlider::minimum())
{
val = from;
}
if(value == QSlider::maximum())
{
val = to;
}
}
return val;
}
void ZoomSlider::sliderValueChanged(int value)
{
emit valueChanged(fromSlider(value));
}
void ZoomSlider::setTickWidth(float tick_width)
{
this->tick_width = tick_width;
setRange(from, to); // Update slider value span.
}
void ZoomSlider::setValue(float value)
{
int i_value = value * tick_width;
if(inverted)
{
i_value *= -1;
i_value += from;
}
QSlider::setValue(i_value);
}
dgedit-0.10.0/src/mipmap.cc 0000644 0000764 0000764 00000005404 13253515762 012356 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* mipmap.cc
*
* Fri Sep 3 16:39:46 CEST 2010
* Copyright 2010 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "mipmap.h"
MipMap::MipMap(float* data, size_t size)
{
this->data = data;
this->size = size;
this->zoom = 1;
}
MipMapValue MipMap::data_lookup(size_t begin, size_t end)
{
MipMapValue val;
size_t numlavg = 0;
size_t numuavg = 0;
for(size_t i = begin; i <= end; i++)
{
if(i > size || i < 0)
{
break;
}
if(data[i] > val.max)
{
val.max = data[i];
}
if(data[i] < val.min)
{
val.min = data[i];
}
if(data[i] > 0)
{
val.uavg += data[i];
numuavg++;
}
if(data[i] < 0)
{
val.lavg += data[i];
numlavg++;
}
}
if(numlavg)
{
val.lavg /= (float) numlavg;
}
if(numuavg)
{
val.uavg /= (float) numuavg;
}
return val;
}
MipMapValue MipMap::mipmap_lookup(size_t begin, size_t end)
{
MipMapValue val;
size_t numlavg = 0;
size_t numuavg = 0;
for(size_t i = begin; i <= end; i++)
{
if(i > size || i < 0)
{
break;
}
if(data[i] > val.max)
{
val.max = data[i];
}
if(data[i] < val.min)
{
val.min = data[i];
}
if(data[i] > 0)
{
val.uavg += data[i];
numuavg++;
}
if(data[i] < 0)
{
val.lavg += data[i];
numlavg++;
}
}
if(numlavg)
{
val.lavg /= (float) numlavg;
}
if(numuavg)
{
val.uavg /= (float) numuavg;
}
return val;
}
#define ABS(x) (x>0?x:-x)
MipMapValue MipMap::lookup(size_t begin, size_t end)
{
return data_lookup(begin, end);
//size_t zoom_factor = ABS(end - begin);
//
//if(zoom_factor < zoom / 2)
//{
// if(zoom == 1)
// {
// // Lookup in original data.
// return data_lookup(begin, end);
// }
//
// return mipmap_lookup(begin, end);
//}
//
//if(lowerlevel)
//{
// return lowerlevel->lookup(begin,end);
//}
//
//return MipMapValue();
}
dgedit-0.10.0/src/samplesorter.h 0000644 0000764 0000764 00000004250 13414430366 013446 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* samplesorter.h
*
* Mon Nov 30 07:45:58 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include "selection.h"
class Instrument;
class SampleSorter
: public QWidget
{
Q_OBJECT
public:
SampleSorter(Selections& selections, Selections& selections_preview,
Instrument& instrument);
public slots:
void setWavData(const float* data, size_t size);
void setAttackLength(int len);
int attackLength();
void addSelection(sel_id_t id);
void addSelectionPreview(sel_id_t id);
void relayout();
void setShowPreview(bool show_preview);
void setSpreadFactor(int spread);
protected:
void paintEvent(QPaintEvent* event);
void mouseMoveEvent(QMouseEvent* event);
void mousePressEvent(QMouseEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void keyReleaseEvent(QKeyEvent* event) override;
private:
sel_id_t getSelectionByCoordinate(int x, int y);
Selections& selections;
Selections& selections_preview;
bool show_preview;
float min;
float max;
int attlen;
// Wav data
const float* data;
size_t size;
Selection sel;
sel_id_t sel_moving;
double spread;
Instrument& instrument;
};
dgedit-0.10.0/src/canvastool.h 0000644 0000764 0000764 00000003472 13253511210 013071 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastool.h
*
* Thu Jul 28 20:12:25 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
#include
#include
class CanvasTool
: public QObject
{
Q_OBJECT
public:
virtual QString name() = 0;
virtual bool mouseMoveEvent(QMouseEvent* event);
virtual bool mousePressEvent(QMouseEvent* event);
virtual bool mouseReleaseEvent(QMouseEvent* event);
virtual void resizeEvent(QResizeEvent* event);
virtual void paintEvent(QPaintEvent* event, QPainter& painter);
virtual void keyReleaseEvent(QKeyEvent* event);
bool isActive();
signals:
void activateChanged(bool activestate);
public slots:
void setActive(bool active);
void activate();
void disactivate();
private:
bool _active;
};
dgedit-0.10.0/src/dgedit.qrc 0000644 0000764 0000764 00000001301 13356346626 012530 0000000 0000000
../AUTHORS../COPYING../icons/logo.png../icons/master.png../icons/file.png../icons/instrument.png../icons/add_instrument.png../icons/edit_instrument.png../icons/remove_instrument.png../icons/channel.png../icons/add_channel.png../icons/remove_channel.png../icons/task_waiting.png../icons/task_running.png../icons/task_done.png../icons/task_error.png
dgedit-0.10.0/src/Makefile.in 0000644 0000764 0000764 00000254150 13414430443 012624 0000000 0000000 # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#export QT_SELECT=qt5
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = dgedit$(EXEEXT)
subdir = src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dgeditdir)"
PROGRAMS = $(bin_PROGRAMS)
am_dgedit_OBJECTS = dgedit-dgedit.$(OBJEXT) \
dgedit-aboutdialog.$(OBJEXT) dgedit-audioextractor.$(OBJEXT) \
dgedit-canvas.$(OBJEXT) dgedit-canvastool.$(OBJEXT) \
dgedit-canvastoollisten.$(OBJEXT) \
dgedit-canvastoolselections.$(OBJEXT) \
dgedit-canvastoolthreshold.$(OBJEXT) \
dgedit-canvaswidget.$(OBJEXT) dgedit-channeldialog.$(OBJEXT) \
dgedit-channelswidget.$(OBJEXT) dgedit-filelist.$(OBJEXT) \
dgedit-imageeditor.$(OBJEXT) dgedit-instrumentdialog.$(OBJEXT) \
dgedit-instrumentwidget.$(OBJEXT) dgedit-itemeditor.$(OBJEXT) \
dgedit-localehandler.$(OBJEXT) dgedit-mainwindow.$(OBJEXT) \
dgedit-mipmap.$(OBJEXT) dgedit-player.$(OBJEXT) \
dgedit-project.$(OBJEXT) dgedit-projectdialog.$(OBJEXT) \
dgedit-projectrenderer.$(OBJEXT) \
dgedit-projectserialiser.$(OBJEXT) \
dgedit-renderdialog.$(OBJEXT) dgedit-samplesorter.$(OBJEXT) \
dgedit-selection.$(OBJEXT) dgedit-selectioneditor.$(OBJEXT) \
dgedit-settings.$(OBJEXT) dgedit-volumefader.$(OBJEXT) \
dgedit-zoomslider.$(OBJEXT)
dgedit_OBJECTS = $(am_dgedit_OBJECTS)
am__DEPENDENCIES_1 =
dgedit_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(shell ../tools/MocList o ) \
qrc_dgedit.o
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
dgedit_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(dgedit_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_@AM_V@)
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
am__v_CXX_0 = @echo " CXX " $@;
am__v_CXX_1 =
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
am__v_CXXLD_0 = @echo " CXXLD " $@;
am__v_CXXLD_1 =
SOURCES = $(dgedit_SOURCES)
DIST_SOURCES = $(dgedit_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
DATA = $(dgedit_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AO_CFLAGS = @AO_CFLAGS@
AO_LIBS = @AO_LIBS@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@
QT_MOC = @QT_MOC@
QT_RCC = @QT_RCC@
QT_UIC = @QT_UIC@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
SNDFILE_LIBS = @SNDFILE_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(AO_LIBS) \
$(shell ../tools/MocList o ) qrc_dgedit.o
dgedit_CXXFLAGS = -g $(SNDFILE_CXXFLAGS) $(QT_CFLAGS) $(AO_CFLAGS) \
-DLOCALEDIR='"$(localedir)"'
AM_CXXFLAGS = $(QT_CFLAGS)
dgedit_TRANSLATIONS = \
ts/dgedit_da.ts \
ts/dgedit_fr.ts
dgedit_SOURCES = \
dgedit.cc \
aboutdialog.cc \
audioextractor.cc \
canvas.cc \
canvastool.cc \
canvastoollisten.cc \
canvastoolselections.cc \
canvastoolthreshold.cc \
canvaswidget.cc \
channeldialog.cc \
channelswidget.cc \
filelist.cc \
imageeditor.cc \
instrumentdialog.cc \
instrumentwidget.cc \
itemeditor.cc \
localehandler.cc \
mainwindow.cc \
mipmap.cc \
player.cc \
project.cc \
projectdialog.cc \
projectrenderer.cc \
projectserialiser.cc \
renderdialog.cc \
samplesorter.cc \
selection.cc \
selectioneditor.cc \
settings.cc \
volumefader.cc \
zoomslider.cc
HDRS = \
aboutdialog.h \
audioextractor.h \
canvas.h \
canvastool.h \
canvastoollisten.h \
canvastoolselections.h \
canvastoolthreshold.h \
canvaswidget.h \
channeldialog.h \
channelswidget.h \
filelist.h \
imageeditor.h \
instrumentdialog.h \
instrumentwidget.h \
itemeditor.h \
localehandler.h \
mainwindow.h \
mipmap.h \
player.h \
project.h \
projectdialog.h \
projectrenderer.h \
projectserialiser.h \
renderdialog.h \
samplesorter.h \
selection.h \
selectioneditor.h \
sleep.h \
settings.h \
volumefader.h \
zoomslider.h
EXTRA_DIST = \
$(dgedit_TRANSLATIONS) \
$(HDRS) \
dgedit.qrc
dgedit_MOC = $(shell ../tools/MocList cc )
BUILT_SOURCES = \
$(dgedit_MOC) \
qrc_dgedit.cc \
$(dgedit_TRANSLATIONS:.ts=.qm)
CLEANFILES = $(BUILT_SOURCES)
dgeditdir = $(localedir)
dgedit_DATA = $(dgedit_TRANSLATIONS:.ts=.qm)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p \
|| test -f $$p1 \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' \
-e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
dgedit$(EXEEXT): $(dgedit_OBJECTS) $(dgedit_DEPENDENCIES) $(EXTRA_dgedit_DEPENDENCIES)
@rm -f dgedit$(EXEEXT)
$(AM_V_CXXLD)$(dgedit_LINK) $(dgedit_OBJECTS) $(dgedit_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-aboutdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-audioextractor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvas.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvastool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvastoollisten.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvastoolselections.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvastoolthreshold.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-canvaswidget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-channeldialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-channelswidget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-dgedit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-filelist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-imageeditor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-instrumentdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-instrumentwidget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-itemeditor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-localehandler.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-mainwindow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-mipmap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-player.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-project.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-projectdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-projectrenderer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-projectserialiser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-renderdialog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-samplesorter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-selection.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-selectioneditor.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-settings.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-volumefader.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dgedit-zoomslider.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
dgedit-dgedit.o: dgedit.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-dgedit.o -MD -MP -MF $(DEPDIR)/dgedit-dgedit.Tpo -c -o dgedit-dgedit.o `test -f 'dgedit.cc' || echo '$(srcdir)/'`dgedit.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-dgedit.Tpo $(DEPDIR)/dgedit-dgedit.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dgedit.cc' object='dgedit-dgedit.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-dgedit.o `test -f 'dgedit.cc' || echo '$(srcdir)/'`dgedit.cc
dgedit-dgedit.obj: dgedit.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-dgedit.obj -MD -MP -MF $(DEPDIR)/dgedit-dgedit.Tpo -c -o dgedit-dgedit.obj `if test -f 'dgedit.cc'; then $(CYGPATH_W) 'dgedit.cc'; else $(CYGPATH_W) '$(srcdir)/dgedit.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-dgedit.Tpo $(DEPDIR)/dgedit-dgedit.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dgedit.cc' object='dgedit-dgedit.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-dgedit.obj `if test -f 'dgedit.cc'; then $(CYGPATH_W) 'dgedit.cc'; else $(CYGPATH_W) '$(srcdir)/dgedit.cc'; fi`
dgedit-aboutdialog.o: aboutdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-aboutdialog.o -MD -MP -MF $(DEPDIR)/dgedit-aboutdialog.Tpo -c -o dgedit-aboutdialog.o `test -f 'aboutdialog.cc' || echo '$(srcdir)/'`aboutdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-aboutdialog.Tpo $(DEPDIR)/dgedit-aboutdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='aboutdialog.cc' object='dgedit-aboutdialog.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-aboutdialog.o `test -f 'aboutdialog.cc' || echo '$(srcdir)/'`aboutdialog.cc
dgedit-aboutdialog.obj: aboutdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-aboutdialog.obj -MD -MP -MF $(DEPDIR)/dgedit-aboutdialog.Tpo -c -o dgedit-aboutdialog.obj `if test -f 'aboutdialog.cc'; then $(CYGPATH_W) 'aboutdialog.cc'; else $(CYGPATH_W) '$(srcdir)/aboutdialog.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-aboutdialog.Tpo $(DEPDIR)/dgedit-aboutdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='aboutdialog.cc' object='dgedit-aboutdialog.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-aboutdialog.obj `if test -f 'aboutdialog.cc'; then $(CYGPATH_W) 'aboutdialog.cc'; else $(CYGPATH_W) '$(srcdir)/aboutdialog.cc'; fi`
dgedit-audioextractor.o: audioextractor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-audioextractor.o -MD -MP -MF $(DEPDIR)/dgedit-audioextractor.Tpo -c -o dgedit-audioextractor.o `test -f 'audioextractor.cc' || echo '$(srcdir)/'`audioextractor.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-audioextractor.Tpo $(DEPDIR)/dgedit-audioextractor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audioextractor.cc' object='dgedit-audioextractor.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-audioextractor.o `test -f 'audioextractor.cc' || echo '$(srcdir)/'`audioextractor.cc
dgedit-audioextractor.obj: audioextractor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-audioextractor.obj -MD -MP -MF $(DEPDIR)/dgedit-audioextractor.Tpo -c -o dgedit-audioextractor.obj `if test -f 'audioextractor.cc'; then $(CYGPATH_W) 'audioextractor.cc'; else $(CYGPATH_W) '$(srcdir)/audioextractor.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-audioextractor.Tpo $(DEPDIR)/dgedit-audioextractor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='audioextractor.cc' object='dgedit-audioextractor.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-audioextractor.obj `if test -f 'audioextractor.cc'; then $(CYGPATH_W) 'audioextractor.cc'; else $(CYGPATH_W) '$(srcdir)/audioextractor.cc'; fi`
dgedit-canvas.o: canvas.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvas.o -MD -MP -MF $(DEPDIR)/dgedit-canvas.Tpo -c -o dgedit-canvas.o `test -f 'canvas.cc' || echo '$(srcdir)/'`canvas.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvas.Tpo $(DEPDIR)/dgedit-canvas.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvas.cc' object='dgedit-canvas.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvas.o `test -f 'canvas.cc' || echo '$(srcdir)/'`canvas.cc
dgedit-canvas.obj: canvas.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvas.obj -MD -MP -MF $(DEPDIR)/dgedit-canvas.Tpo -c -o dgedit-canvas.obj `if test -f 'canvas.cc'; then $(CYGPATH_W) 'canvas.cc'; else $(CYGPATH_W) '$(srcdir)/canvas.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvas.Tpo $(DEPDIR)/dgedit-canvas.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvas.cc' object='dgedit-canvas.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvas.obj `if test -f 'canvas.cc'; then $(CYGPATH_W) 'canvas.cc'; else $(CYGPATH_W) '$(srcdir)/canvas.cc'; fi`
dgedit-canvastool.o: canvastool.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastool.o -MD -MP -MF $(DEPDIR)/dgedit-canvastool.Tpo -c -o dgedit-canvastool.o `test -f 'canvastool.cc' || echo '$(srcdir)/'`canvastool.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastool.Tpo $(DEPDIR)/dgedit-canvastool.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastool.cc' object='dgedit-canvastool.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastool.o `test -f 'canvastool.cc' || echo '$(srcdir)/'`canvastool.cc
dgedit-canvastool.obj: canvastool.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastool.obj -MD -MP -MF $(DEPDIR)/dgedit-canvastool.Tpo -c -o dgedit-canvastool.obj `if test -f 'canvastool.cc'; then $(CYGPATH_W) 'canvastool.cc'; else $(CYGPATH_W) '$(srcdir)/canvastool.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastool.Tpo $(DEPDIR)/dgedit-canvastool.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastool.cc' object='dgedit-canvastool.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastool.obj `if test -f 'canvastool.cc'; then $(CYGPATH_W) 'canvastool.cc'; else $(CYGPATH_W) '$(srcdir)/canvastool.cc'; fi`
dgedit-canvastoollisten.o: canvastoollisten.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoollisten.o -MD -MP -MF $(DEPDIR)/dgedit-canvastoollisten.Tpo -c -o dgedit-canvastoollisten.o `test -f 'canvastoollisten.cc' || echo '$(srcdir)/'`canvastoollisten.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoollisten.Tpo $(DEPDIR)/dgedit-canvastoollisten.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoollisten.cc' object='dgedit-canvastoollisten.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoollisten.o `test -f 'canvastoollisten.cc' || echo '$(srcdir)/'`canvastoollisten.cc
dgedit-canvastoollisten.obj: canvastoollisten.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoollisten.obj -MD -MP -MF $(DEPDIR)/dgedit-canvastoollisten.Tpo -c -o dgedit-canvastoollisten.obj `if test -f 'canvastoollisten.cc'; then $(CYGPATH_W) 'canvastoollisten.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoollisten.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoollisten.Tpo $(DEPDIR)/dgedit-canvastoollisten.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoollisten.cc' object='dgedit-canvastoollisten.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoollisten.obj `if test -f 'canvastoollisten.cc'; then $(CYGPATH_W) 'canvastoollisten.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoollisten.cc'; fi`
dgedit-canvastoolselections.o: canvastoolselections.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoolselections.o -MD -MP -MF $(DEPDIR)/dgedit-canvastoolselections.Tpo -c -o dgedit-canvastoolselections.o `test -f 'canvastoolselections.cc' || echo '$(srcdir)/'`canvastoolselections.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoolselections.Tpo $(DEPDIR)/dgedit-canvastoolselections.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoolselections.cc' object='dgedit-canvastoolselections.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoolselections.o `test -f 'canvastoolselections.cc' || echo '$(srcdir)/'`canvastoolselections.cc
dgedit-canvastoolselections.obj: canvastoolselections.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoolselections.obj -MD -MP -MF $(DEPDIR)/dgedit-canvastoolselections.Tpo -c -o dgedit-canvastoolselections.obj `if test -f 'canvastoolselections.cc'; then $(CYGPATH_W) 'canvastoolselections.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoolselections.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoolselections.Tpo $(DEPDIR)/dgedit-canvastoolselections.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoolselections.cc' object='dgedit-canvastoolselections.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoolselections.obj `if test -f 'canvastoolselections.cc'; then $(CYGPATH_W) 'canvastoolselections.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoolselections.cc'; fi`
dgedit-canvastoolthreshold.o: canvastoolthreshold.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoolthreshold.o -MD -MP -MF $(DEPDIR)/dgedit-canvastoolthreshold.Tpo -c -o dgedit-canvastoolthreshold.o `test -f 'canvastoolthreshold.cc' || echo '$(srcdir)/'`canvastoolthreshold.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoolthreshold.Tpo $(DEPDIR)/dgedit-canvastoolthreshold.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoolthreshold.cc' object='dgedit-canvastoolthreshold.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoolthreshold.o `test -f 'canvastoolthreshold.cc' || echo '$(srcdir)/'`canvastoolthreshold.cc
dgedit-canvastoolthreshold.obj: canvastoolthreshold.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvastoolthreshold.obj -MD -MP -MF $(DEPDIR)/dgedit-canvastoolthreshold.Tpo -c -o dgedit-canvastoolthreshold.obj `if test -f 'canvastoolthreshold.cc'; then $(CYGPATH_W) 'canvastoolthreshold.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoolthreshold.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvastoolthreshold.Tpo $(DEPDIR)/dgedit-canvastoolthreshold.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvastoolthreshold.cc' object='dgedit-canvastoolthreshold.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvastoolthreshold.obj `if test -f 'canvastoolthreshold.cc'; then $(CYGPATH_W) 'canvastoolthreshold.cc'; else $(CYGPATH_W) '$(srcdir)/canvastoolthreshold.cc'; fi`
dgedit-canvaswidget.o: canvaswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvaswidget.o -MD -MP -MF $(DEPDIR)/dgedit-canvaswidget.Tpo -c -o dgedit-canvaswidget.o `test -f 'canvaswidget.cc' || echo '$(srcdir)/'`canvaswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvaswidget.Tpo $(DEPDIR)/dgedit-canvaswidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvaswidget.cc' object='dgedit-canvaswidget.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvaswidget.o `test -f 'canvaswidget.cc' || echo '$(srcdir)/'`canvaswidget.cc
dgedit-canvaswidget.obj: canvaswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-canvaswidget.obj -MD -MP -MF $(DEPDIR)/dgedit-canvaswidget.Tpo -c -o dgedit-canvaswidget.obj `if test -f 'canvaswidget.cc'; then $(CYGPATH_W) 'canvaswidget.cc'; else $(CYGPATH_W) '$(srcdir)/canvaswidget.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-canvaswidget.Tpo $(DEPDIR)/dgedit-canvaswidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='canvaswidget.cc' object='dgedit-canvaswidget.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-canvaswidget.obj `if test -f 'canvaswidget.cc'; then $(CYGPATH_W) 'canvaswidget.cc'; else $(CYGPATH_W) '$(srcdir)/canvaswidget.cc'; fi`
dgedit-channeldialog.o: channeldialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-channeldialog.o -MD -MP -MF $(DEPDIR)/dgedit-channeldialog.Tpo -c -o dgedit-channeldialog.o `test -f 'channeldialog.cc' || echo '$(srcdir)/'`channeldialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-channeldialog.Tpo $(DEPDIR)/dgedit-channeldialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='channeldialog.cc' object='dgedit-channeldialog.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-channeldialog.o `test -f 'channeldialog.cc' || echo '$(srcdir)/'`channeldialog.cc
dgedit-channeldialog.obj: channeldialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-channeldialog.obj -MD -MP -MF $(DEPDIR)/dgedit-channeldialog.Tpo -c -o dgedit-channeldialog.obj `if test -f 'channeldialog.cc'; then $(CYGPATH_W) 'channeldialog.cc'; else $(CYGPATH_W) '$(srcdir)/channeldialog.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-channeldialog.Tpo $(DEPDIR)/dgedit-channeldialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='channeldialog.cc' object='dgedit-channeldialog.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-channeldialog.obj `if test -f 'channeldialog.cc'; then $(CYGPATH_W) 'channeldialog.cc'; else $(CYGPATH_W) '$(srcdir)/channeldialog.cc'; fi`
dgedit-channelswidget.o: channelswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-channelswidget.o -MD -MP -MF $(DEPDIR)/dgedit-channelswidget.Tpo -c -o dgedit-channelswidget.o `test -f 'channelswidget.cc' || echo '$(srcdir)/'`channelswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-channelswidget.Tpo $(DEPDIR)/dgedit-channelswidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='channelswidget.cc' object='dgedit-channelswidget.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-channelswidget.o `test -f 'channelswidget.cc' || echo '$(srcdir)/'`channelswidget.cc
dgedit-channelswidget.obj: channelswidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-channelswidget.obj -MD -MP -MF $(DEPDIR)/dgedit-channelswidget.Tpo -c -o dgedit-channelswidget.obj `if test -f 'channelswidget.cc'; then $(CYGPATH_W) 'channelswidget.cc'; else $(CYGPATH_W) '$(srcdir)/channelswidget.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-channelswidget.Tpo $(DEPDIR)/dgedit-channelswidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='channelswidget.cc' object='dgedit-channelswidget.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-channelswidget.obj `if test -f 'channelswidget.cc'; then $(CYGPATH_W) 'channelswidget.cc'; else $(CYGPATH_W) '$(srcdir)/channelswidget.cc'; fi`
dgedit-filelist.o: filelist.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-filelist.o -MD -MP -MF $(DEPDIR)/dgedit-filelist.Tpo -c -o dgedit-filelist.o `test -f 'filelist.cc' || echo '$(srcdir)/'`filelist.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-filelist.Tpo $(DEPDIR)/dgedit-filelist.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='filelist.cc' object='dgedit-filelist.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-filelist.o `test -f 'filelist.cc' || echo '$(srcdir)/'`filelist.cc
dgedit-filelist.obj: filelist.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-filelist.obj -MD -MP -MF $(DEPDIR)/dgedit-filelist.Tpo -c -o dgedit-filelist.obj `if test -f 'filelist.cc'; then $(CYGPATH_W) 'filelist.cc'; else $(CYGPATH_W) '$(srcdir)/filelist.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-filelist.Tpo $(DEPDIR)/dgedit-filelist.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='filelist.cc' object='dgedit-filelist.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-filelist.obj `if test -f 'filelist.cc'; then $(CYGPATH_W) 'filelist.cc'; else $(CYGPATH_W) '$(srcdir)/filelist.cc'; fi`
dgedit-imageeditor.o: imageeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-imageeditor.o -MD -MP -MF $(DEPDIR)/dgedit-imageeditor.Tpo -c -o dgedit-imageeditor.o `test -f 'imageeditor.cc' || echo '$(srcdir)/'`imageeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-imageeditor.Tpo $(DEPDIR)/dgedit-imageeditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='imageeditor.cc' object='dgedit-imageeditor.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-imageeditor.o `test -f 'imageeditor.cc' || echo '$(srcdir)/'`imageeditor.cc
dgedit-imageeditor.obj: imageeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-imageeditor.obj -MD -MP -MF $(DEPDIR)/dgedit-imageeditor.Tpo -c -o dgedit-imageeditor.obj `if test -f 'imageeditor.cc'; then $(CYGPATH_W) 'imageeditor.cc'; else $(CYGPATH_W) '$(srcdir)/imageeditor.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-imageeditor.Tpo $(DEPDIR)/dgedit-imageeditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='imageeditor.cc' object='dgedit-imageeditor.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-imageeditor.obj `if test -f 'imageeditor.cc'; then $(CYGPATH_W) 'imageeditor.cc'; else $(CYGPATH_W) '$(srcdir)/imageeditor.cc'; fi`
dgedit-instrumentdialog.o: instrumentdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-instrumentdialog.o -MD -MP -MF $(DEPDIR)/dgedit-instrumentdialog.Tpo -c -o dgedit-instrumentdialog.o `test -f 'instrumentdialog.cc' || echo '$(srcdir)/'`instrumentdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-instrumentdialog.Tpo $(DEPDIR)/dgedit-instrumentdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='instrumentdialog.cc' object='dgedit-instrumentdialog.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-instrumentdialog.o `test -f 'instrumentdialog.cc' || echo '$(srcdir)/'`instrumentdialog.cc
dgedit-instrumentdialog.obj: instrumentdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-instrumentdialog.obj -MD -MP -MF $(DEPDIR)/dgedit-instrumentdialog.Tpo -c -o dgedit-instrumentdialog.obj `if test -f 'instrumentdialog.cc'; then $(CYGPATH_W) 'instrumentdialog.cc'; else $(CYGPATH_W) '$(srcdir)/instrumentdialog.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-instrumentdialog.Tpo $(DEPDIR)/dgedit-instrumentdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='instrumentdialog.cc' object='dgedit-instrumentdialog.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-instrumentdialog.obj `if test -f 'instrumentdialog.cc'; then $(CYGPATH_W) 'instrumentdialog.cc'; else $(CYGPATH_W) '$(srcdir)/instrumentdialog.cc'; fi`
dgedit-instrumentwidget.o: instrumentwidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-instrumentwidget.o -MD -MP -MF $(DEPDIR)/dgedit-instrumentwidget.Tpo -c -o dgedit-instrumentwidget.o `test -f 'instrumentwidget.cc' || echo '$(srcdir)/'`instrumentwidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-instrumentwidget.Tpo $(DEPDIR)/dgedit-instrumentwidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='instrumentwidget.cc' object='dgedit-instrumentwidget.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-instrumentwidget.o `test -f 'instrumentwidget.cc' || echo '$(srcdir)/'`instrumentwidget.cc
dgedit-instrumentwidget.obj: instrumentwidget.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-instrumentwidget.obj -MD -MP -MF $(DEPDIR)/dgedit-instrumentwidget.Tpo -c -o dgedit-instrumentwidget.obj `if test -f 'instrumentwidget.cc'; then $(CYGPATH_W) 'instrumentwidget.cc'; else $(CYGPATH_W) '$(srcdir)/instrumentwidget.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-instrumentwidget.Tpo $(DEPDIR)/dgedit-instrumentwidget.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='instrumentwidget.cc' object='dgedit-instrumentwidget.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-instrumentwidget.obj `if test -f 'instrumentwidget.cc'; then $(CYGPATH_W) 'instrumentwidget.cc'; else $(CYGPATH_W) '$(srcdir)/instrumentwidget.cc'; fi`
dgedit-itemeditor.o: itemeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-itemeditor.o -MD -MP -MF $(DEPDIR)/dgedit-itemeditor.Tpo -c -o dgedit-itemeditor.o `test -f 'itemeditor.cc' || echo '$(srcdir)/'`itemeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-itemeditor.Tpo $(DEPDIR)/dgedit-itemeditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='itemeditor.cc' object='dgedit-itemeditor.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-itemeditor.o `test -f 'itemeditor.cc' || echo '$(srcdir)/'`itemeditor.cc
dgedit-itemeditor.obj: itemeditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-itemeditor.obj -MD -MP -MF $(DEPDIR)/dgedit-itemeditor.Tpo -c -o dgedit-itemeditor.obj `if test -f 'itemeditor.cc'; then $(CYGPATH_W) 'itemeditor.cc'; else $(CYGPATH_W) '$(srcdir)/itemeditor.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-itemeditor.Tpo $(DEPDIR)/dgedit-itemeditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='itemeditor.cc' object='dgedit-itemeditor.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-itemeditor.obj `if test -f 'itemeditor.cc'; then $(CYGPATH_W) 'itemeditor.cc'; else $(CYGPATH_W) '$(srcdir)/itemeditor.cc'; fi`
dgedit-localehandler.o: localehandler.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-localehandler.o -MD -MP -MF $(DEPDIR)/dgedit-localehandler.Tpo -c -o dgedit-localehandler.o `test -f 'localehandler.cc' || echo '$(srcdir)/'`localehandler.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-localehandler.Tpo $(DEPDIR)/dgedit-localehandler.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='localehandler.cc' object='dgedit-localehandler.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-localehandler.o `test -f 'localehandler.cc' || echo '$(srcdir)/'`localehandler.cc
dgedit-localehandler.obj: localehandler.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-localehandler.obj -MD -MP -MF $(DEPDIR)/dgedit-localehandler.Tpo -c -o dgedit-localehandler.obj `if test -f 'localehandler.cc'; then $(CYGPATH_W) 'localehandler.cc'; else $(CYGPATH_W) '$(srcdir)/localehandler.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-localehandler.Tpo $(DEPDIR)/dgedit-localehandler.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='localehandler.cc' object='dgedit-localehandler.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-localehandler.obj `if test -f 'localehandler.cc'; then $(CYGPATH_W) 'localehandler.cc'; else $(CYGPATH_W) '$(srcdir)/localehandler.cc'; fi`
dgedit-mainwindow.o: mainwindow.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-mainwindow.o -MD -MP -MF $(DEPDIR)/dgedit-mainwindow.Tpo -c -o dgedit-mainwindow.o `test -f 'mainwindow.cc' || echo '$(srcdir)/'`mainwindow.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-mainwindow.Tpo $(DEPDIR)/dgedit-mainwindow.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mainwindow.cc' object='dgedit-mainwindow.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-mainwindow.o `test -f 'mainwindow.cc' || echo '$(srcdir)/'`mainwindow.cc
dgedit-mainwindow.obj: mainwindow.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-mainwindow.obj -MD -MP -MF $(DEPDIR)/dgedit-mainwindow.Tpo -c -o dgedit-mainwindow.obj `if test -f 'mainwindow.cc'; then $(CYGPATH_W) 'mainwindow.cc'; else $(CYGPATH_W) '$(srcdir)/mainwindow.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-mainwindow.Tpo $(DEPDIR)/dgedit-mainwindow.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mainwindow.cc' object='dgedit-mainwindow.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-mainwindow.obj `if test -f 'mainwindow.cc'; then $(CYGPATH_W) 'mainwindow.cc'; else $(CYGPATH_W) '$(srcdir)/mainwindow.cc'; fi`
dgedit-mipmap.o: mipmap.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-mipmap.o -MD -MP -MF $(DEPDIR)/dgedit-mipmap.Tpo -c -o dgedit-mipmap.o `test -f 'mipmap.cc' || echo '$(srcdir)/'`mipmap.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-mipmap.Tpo $(DEPDIR)/dgedit-mipmap.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mipmap.cc' object='dgedit-mipmap.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-mipmap.o `test -f 'mipmap.cc' || echo '$(srcdir)/'`mipmap.cc
dgedit-mipmap.obj: mipmap.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-mipmap.obj -MD -MP -MF $(DEPDIR)/dgedit-mipmap.Tpo -c -o dgedit-mipmap.obj `if test -f 'mipmap.cc'; then $(CYGPATH_W) 'mipmap.cc'; else $(CYGPATH_W) '$(srcdir)/mipmap.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-mipmap.Tpo $(DEPDIR)/dgedit-mipmap.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='mipmap.cc' object='dgedit-mipmap.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-mipmap.obj `if test -f 'mipmap.cc'; then $(CYGPATH_W) 'mipmap.cc'; else $(CYGPATH_W) '$(srcdir)/mipmap.cc'; fi`
dgedit-player.o: player.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-player.o -MD -MP -MF $(DEPDIR)/dgedit-player.Tpo -c -o dgedit-player.o `test -f 'player.cc' || echo '$(srcdir)/'`player.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-player.Tpo $(DEPDIR)/dgedit-player.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='player.cc' object='dgedit-player.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-player.o `test -f 'player.cc' || echo '$(srcdir)/'`player.cc
dgedit-player.obj: player.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-player.obj -MD -MP -MF $(DEPDIR)/dgedit-player.Tpo -c -o dgedit-player.obj `if test -f 'player.cc'; then $(CYGPATH_W) 'player.cc'; else $(CYGPATH_W) '$(srcdir)/player.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-player.Tpo $(DEPDIR)/dgedit-player.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='player.cc' object='dgedit-player.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-player.obj `if test -f 'player.cc'; then $(CYGPATH_W) 'player.cc'; else $(CYGPATH_W) '$(srcdir)/player.cc'; fi`
dgedit-project.o: project.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-project.o -MD -MP -MF $(DEPDIR)/dgedit-project.Tpo -c -o dgedit-project.o `test -f 'project.cc' || echo '$(srcdir)/'`project.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-project.Tpo $(DEPDIR)/dgedit-project.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='project.cc' object='dgedit-project.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-project.o `test -f 'project.cc' || echo '$(srcdir)/'`project.cc
dgedit-project.obj: project.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-project.obj -MD -MP -MF $(DEPDIR)/dgedit-project.Tpo -c -o dgedit-project.obj `if test -f 'project.cc'; then $(CYGPATH_W) 'project.cc'; else $(CYGPATH_W) '$(srcdir)/project.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-project.Tpo $(DEPDIR)/dgedit-project.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='project.cc' object='dgedit-project.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-project.obj `if test -f 'project.cc'; then $(CYGPATH_W) 'project.cc'; else $(CYGPATH_W) '$(srcdir)/project.cc'; fi`
dgedit-projectdialog.o: projectdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectdialog.o -MD -MP -MF $(DEPDIR)/dgedit-projectdialog.Tpo -c -o dgedit-projectdialog.o `test -f 'projectdialog.cc' || echo '$(srcdir)/'`projectdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectdialog.Tpo $(DEPDIR)/dgedit-projectdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectdialog.cc' object='dgedit-projectdialog.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectdialog.o `test -f 'projectdialog.cc' || echo '$(srcdir)/'`projectdialog.cc
dgedit-projectdialog.obj: projectdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectdialog.obj -MD -MP -MF $(DEPDIR)/dgedit-projectdialog.Tpo -c -o dgedit-projectdialog.obj `if test -f 'projectdialog.cc'; then $(CYGPATH_W) 'projectdialog.cc'; else $(CYGPATH_W) '$(srcdir)/projectdialog.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectdialog.Tpo $(DEPDIR)/dgedit-projectdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectdialog.cc' object='dgedit-projectdialog.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectdialog.obj `if test -f 'projectdialog.cc'; then $(CYGPATH_W) 'projectdialog.cc'; else $(CYGPATH_W) '$(srcdir)/projectdialog.cc'; fi`
dgedit-projectrenderer.o: projectrenderer.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectrenderer.o -MD -MP -MF $(DEPDIR)/dgedit-projectrenderer.Tpo -c -o dgedit-projectrenderer.o `test -f 'projectrenderer.cc' || echo '$(srcdir)/'`projectrenderer.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectrenderer.Tpo $(DEPDIR)/dgedit-projectrenderer.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectrenderer.cc' object='dgedit-projectrenderer.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectrenderer.o `test -f 'projectrenderer.cc' || echo '$(srcdir)/'`projectrenderer.cc
dgedit-projectrenderer.obj: projectrenderer.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectrenderer.obj -MD -MP -MF $(DEPDIR)/dgedit-projectrenderer.Tpo -c -o dgedit-projectrenderer.obj `if test -f 'projectrenderer.cc'; then $(CYGPATH_W) 'projectrenderer.cc'; else $(CYGPATH_W) '$(srcdir)/projectrenderer.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectrenderer.Tpo $(DEPDIR)/dgedit-projectrenderer.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectrenderer.cc' object='dgedit-projectrenderer.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectrenderer.obj `if test -f 'projectrenderer.cc'; then $(CYGPATH_W) 'projectrenderer.cc'; else $(CYGPATH_W) '$(srcdir)/projectrenderer.cc'; fi`
dgedit-projectserialiser.o: projectserialiser.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectserialiser.o -MD -MP -MF $(DEPDIR)/dgedit-projectserialiser.Tpo -c -o dgedit-projectserialiser.o `test -f 'projectserialiser.cc' || echo '$(srcdir)/'`projectserialiser.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectserialiser.Tpo $(DEPDIR)/dgedit-projectserialiser.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectserialiser.cc' object='dgedit-projectserialiser.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectserialiser.o `test -f 'projectserialiser.cc' || echo '$(srcdir)/'`projectserialiser.cc
dgedit-projectserialiser.obj: projectserialiser.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-projectserialiser.obj -MD -MP -MF $(DEPDIR)/dgedit-projectserialiser.Tpo -c -o dgedit-projectserialiser.obj `if test -f 'projectserialiser.cc'; then $(CYGPATH_W) 'projectserialiser.cc'; else $(CYGPATH_W) '$(srcdir)/projectserialiser.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-projectserialiser.Tpo $(DEPDIR)/dgedit-projectserialiser.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='projectserialiser.cc' object='dgedit-projectserialiser.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-projectserialiser.obj `if test -f 'projectserialiser.cc'; then $(CYGPATH_W) 'projectserialiser.cc'; else $(CYGPATH_W) '$(srcdir)/projectserialiser.cc'; fi`
dgedit-renderdialog.o: renderdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-renderdialog.o -MD -MP -MF $(DEPDIR)/dgedit-renderdialog.Tpo -c -o dgedit-renderdialog.o `test -f 'renderdialog.cc' || echo '$(srcdir)/'`renderdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-renderdialog.Tpo $(DEPDIR)/dgedit-renderdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='renderdialog.cc' object='dgedit-renderdialog.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-renderdialog.o `test -f 'renderdialog.cc' || echo '$(srcdir)/'`renderdialog.cc
dgedit-renderdialog.obj: renderdialog.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-renderdialog.obj -MD -MP -MF $(DEPDIR)/dgedit-renderdialog.Tpo -c -o dgedit-renderdialog.obj `if test -f 'renderdialog.cc'; then $(CYGPATH_W) 'renderdialog.cc'; else $(CYGPATH_W) '$(srcdir)/renderdialog.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-renderdialog.Tpo $(DEPDIR)/dgedit-renderdialog.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='renderdialog.cc' object='dgedit-renderdialog.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-renderdialog.obj `if test -f 'renderdialog.cc'; then $(CYGPATH_W) 'renderdialog.cc'; else $(CYGPATH_W) '$(srcdir)/renderdialog.cc'; fi`
dgedit-samplesorter.o: samplesorter.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-samplesorter.o -MD -MP -MF $(DEPDIR)/dgedit-samplesorter.Tpo -c -o dgedit-samplesorter.o `test -f 'samplesorter.cc' || echo '$(srcdir)/'`samplesorter.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-samplesorter.Tpo $(DEPDIR)/dgedit-samplesorter.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='samplesorter.cc' object='dgedit-samplesorter.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-samplesorter.o `test -f 'samplesorter.cc' || echo '$(srcdir)/'`samplesorter.cc
dgedit-samplesorter.obj: samplesorter.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-samplesorter.obj -MD -MP -MF $(DEPDIR)/dgedit-samplesorter.Tpo -c -o dgedit-samplesorter.obj `if test -f 'samplesorter.cc'; then $(CYGPATH_W) 'samplesorter.cc'; else $(CYGPATH_W) '$(srcdir)/samplesorter.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-samplesorter.Tpo $(DEPDIR)/dgedit-samplesorter.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='samplesorter.cc' object='dgedit-samplesorter.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-samplesorter.obj `if test -f 'samplesorter.cc'; then $(CYGPATH_W) 'samplesorter.cc'; else $(CYGPATH_W) '$(srcdir)/samplesorter.cc'; fi`
dgedit-selection.o: selection.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-selection.o -MD -MP -MF $(DEPDIR)/dgedit-selection.Tpo -c -o dgedit-selection.o `test -f 'selection.cc' || echo '$(srcdir)/'`selection.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-selection.Tpo $(DEPDIR)/dgedit-selection.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='selection.cc' object='dgedit-selection.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-selection.o `test -f 'selection.cc' || echo '$(srcdir)/'`selection.cc
dgedit-selection.obj: selection.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-selection.obj -MD -MP -MF $(DEPDIR)/dgedit-selection.Tpo -c -o dgedit-selection.obj `if test -f 'selection.cc'; then $(CYGPATH_W) 'selection.cc'; else $(CYGPATH_W) '$(srcdir)/selection.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-selection.Tpo $(DEPDIR)/dgedit-selection.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='selection.cc' object='dgedit-selection.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-selection.obj `if test -f 'selection.cc'; then $(CYGPATH_W) 'selection.cc'; else $(CYGPATH_W) '$(srcdir)/selection.cc'; fi`
dgedit-selectioneditor.o: selectioneditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-selectioneditor.o -MD -MP -MF $(DEPDIR)/dgedit-selectioneditor.Tpo -c -o dgedit-selectioneditor.o `test -f 'selectioneditor.cc' || echo '$(srcdir)/'`selectioneditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-selectioneditor.Tpo $(DEPDIR)/dgedit-selectioneditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='selectioneditor.cc' object='dgedit-selectioneditor.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-selectioneditor.o `test -f 'selectioneditor.cc' || echo '$(srcdir)/'`selectioneditor.cc
dgedit-selectioneditor.obj: selectioneditor.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-selectioneditor.obj -MD -MP -MF $(DEPDIR)/dgedit-selectioneditor.Tpo -c -o dgedit-selectioneditor.obj `if test -f 'selectioneditor.cc'; then $(CYGPATH_W) 'selectioneditor.cc'; else $(CYGPATH_W) '$(srcdir)/selectioneditor.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-selectioneditor.Tpo $(DEPDIR)/dgedit-selectioneditor.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='selectioneditor.cc' object='dgedit-selectioneditor.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-selectioneditor.obj `if test -f 'selectioneditor.cc'; then $(CYGPATH_W) 'selectioneditor.cc'; else $(CYGPATH_W) '$(srcdir)/selectioneditor.cc'; fi`
dgedit-settings.o: settings.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-settings.o -MD -MP -MF $(DEPDIR)/dgedit-settings.Tpo -c -o dgedit-settings.o `test -f 'settings.cc' || echo '$(srcdir)/'`settings.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-settings.Tpo $(DEPDIR)/dgedit-settings.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='settings.cc' object='dgedit-settings.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-settings.o `test -f 'settings.cc' || echo '$(srcdir)/'`settings.cc
dgedit-settings.obj: settings.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-settings.obj -MD -MP -MF $(DEPDIR)/dgedit-settings.Tpo -c -o dgedit-settings.obj `if test -f 'settings.cc'; then $(CYGPATH_W) 'settings.cc'; else $(CYGPATH_W) '$(srcdir)/settings.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-settings.Tpo $(DEPDIR)/dgedit-settings.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='settings.cc' object='dgedit-settings.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-settings.obj `if test -f 'settings.cc'; then $(CYGPATH_W) 'settings.cc'; else $(CYGPATH_W) '$(srcdir)/settings.cc'; fi`
dgedit-volumefader.o: volumefader.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-volumefader.o -MD -MP -MF $(DEPDIR)/dgedit-volumefader.Tpo -c -o dgedit-volumefader.o `test -f 'volumefader.cc' || echo '$(srcdir)/'`volumefader.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-volumefader.Tpo $(DEPDIR)/dgedit-volumefader.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='volumefader.cc' object='dgedit-volumefader.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-volumefader.o `test -f 'volumefader.cc' || echo '$(srcdir)/'`volumefader.cc
dgedit-volumefader.obj: volumefader.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-volumefader.obj -MD -MP -MF $(DEPDIR)/dgedit-volumefader.Tpo -c -o dgedit-volumefader.obj `if test -f 'volumefader.cc'; then $(CYGPATH_W) 'volumefader.cc'; else $(CYGPATH_W) '$(srcdir)/volumefader.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-volumefader.Tpo $(DEPDIR)/dgedit-volumefader.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='volumefader.cc' object='dgedit-volumefader.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-volumefader.obj `if test -f 'volumefader.cc'; then $(CYGPATH_W) 'volumefader.cc'; else $(CYGPATH_W) '$(srcdir)/volumefader.cc'; fi`
dgedit-zoomslider.o: zoomslider.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-zoomslider.o -MD -MP -MF $(DEPDIR)/dgedit-zoomslider.Tpo -c -o dgedit-zoomslider.o `test -f 'zoomslider.cc' || echo '$(srcdir)/'`zoomslider.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-zoomslider.Tpo $(DEPDIR)/dgedit-zoomslider.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zoomslider.cc' object='dgedit-zoomslider.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-zoomslider.o `test -f 'zoomslider.cc' || echo '$(srcdir)/'`zoomslider.cc
dgedit-zoomslider.obj: zoomslider.cc
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -MT dgedit-zoomslider.obj -MD -MP -MF $(DEPDIR)/dgedit-zoomslider.Tpo -c -o dgedit-zoomslider.obj `if test -f 'zoomslider.cc'; then $(CYGPATH_W) 'zoomslider.cc'; else $(CYGPATH_W) '$(srcdir)/zoomslider.cc'; fi`
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dgedit-zoomslider.Tpo $(DEPDIR)/dgedit-zoomslider.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zoomslider.cc' object='dgedit-zoomslider.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dgedit_CXXFLAGS) $(CXXFLAGS) -c -o dgedit-zoomslider.obj `if test -f 'zoomslider.cc'; then $(CYGPATH_W) 'zoomslider.cc'; else $(CYGPATH_W) '$(srcdir)/zoomslider.cc'; fi`
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-dgeditDATA: $(dgedit_DATA)
@$(NORMAL_INSTALL)
@list='$(dgedit_DATA)'; test -n "$(dgeditdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dgeditdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dgeditdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dgeditdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(dgeditdir)" || exit $$?; \
done
uninstall-dgeditDATA:
@$(NORMAL_UNINSTALL)
@list='$(dgedit_DATA)'; test -n "$(dgeditdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(dgeditdir)'; $(am__uninstall_files_from_dir)
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dgeditdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-dgeditDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-dgeditDATA
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
ctags ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-dgeditDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-dgeditDATA
.PRECIOUS: Makefile
qrc_%.cc: %.qrc
rcc $< > $@
%.moc.cc: %.h
QT_SELECT=qt5 $(QT_MOC) -o $@ $<
#
# ui files not used in this project...
#%.h: %.ui
# $(QT_UIC) -o $@ $<
#
#%.cc: %.ui
# $(QT_UIC) -o $@ -impl $*.h $<
# command for creating .res file from .rc on Win32
%.res: %.rc
rc $<
%.ts: $(dgedit_SOURCES) $(HDRS)
QT_SELECT=qt5 lupdate $(dgedit_SOURCES) $(HDRS) -ts $@
%.qm: %.ts
QT_SELECT=qt5 lrelease $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
dgedit-0.10.0/src/instrumentwidget.cc 0000644 0000764 0000764 00000036506 13356154465 014521 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* instrumentwidget.cc
*
* Sat May 12 15:38:38 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "instrumentwidget.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "sleep.h"
#include "canvastool.h"
#include "canvastoolthreshold.h"
#include "volumefader.h"
#include "selectioneditor.h"
#include "zoomslider.h"
#include "settings.h"
#include "project.h"
#define MAXVAL 10000000L
static void addTool(QToolBar* toolbar, Canvas* canvas, CanvasTool* tool)
{
QAction* action = new QAction(tool->name(), toolbar);
action->setCheckable(true);
toolbar->addAction(action);
tool->connect(action, SIGNAL(toggled(bool)), tool, SLOT(setActive(bool)));
tool->setActive(false);
canvas->tools.push_back(tool);
}
InstrumentWidget::InstrumentWidget(Settings& settings, Instrument& instrument)
: settings(settings)
, instrument(instrument)
{
setProperty("id", instrument.getId());
{
int start = 44100 * 60;
Selection p(start, start + 44100 * 60, 0, 0); // one minute selection
selections_preview.add(p);
}
QWidget* central = new QWidget();
QHBoxLayout* lh = new QHBoxLayout();
QVBoxLayout* lv = new QVBoxLayout();
central->setLayout(lv);
setCentralWidget(central);
extractor = new AudioExtractor(instrument, this);
canvaswidget = new CanvasWidget(this);
QToolBar* toolbar = addToolBar(tr("Tools"));
listen = new CanvasToolListen(canvaswidget->canvas, player);
addTool(toolbar, canvaswidget->canvas, listen);
threshold = new CanvasToolThreshold(canvaswidget->canvas, instrument);
canvaswidget->canvas->tools.push_back(threshold);
tool_selections = new CanvasToolSelections(canvaswidget->canvas, selections,
selections_preview);
connect(threshold, SIGNAL(thresholdChanged(double)),
tool_selections, SLOT(thresholdChanged(double)));
connect(threshold, SIGNAL(thresholdChanging(double)),
tool_selections, SLOT(thresholdChanged(double)));
connect(&selections, SIGNAL(activeChanged(sel_id_t)),
canvaswidget->canvas, SLOT(update()));
connect(&selections, SIGNAL(updated(sel_id_t)),
canvaswidget->canvas, SLOT(update()));
addTool(toolbar, canvaswidget->canvas, tool_selections);
sorter = new SampleSorter(selections, selections_preview, instrument);
connect(&selections, SIGNAL(added(sel_id_t)),
sorter, SLOT(addSelection(sel_id_t)));
connect(&selections_preview, SIGNAL(added(sel_id_t)),
sorter, SLOT(addSelectionPreview(sel_id_t)));
connect(&selections, SIGNAL(updated(sel_id_t)), sorter, SLOT(relayout()));
connect(&selections_preview, SIGNAL(updated(sel_id_t)),
sorter, SLOT(relayout()));
connect(&selections, SIGNAL(removed(sel_id_t)), sorter, SLOT(relayout()));
connect(&selections_preview, SIGNAL(removed(sel_id_t)),
sorter, SLOT(relayout()));
connect(&selections, SIGNAL(activeChanged(sel_id_t)),
sorter, SLOT(relayout()));
QPushButton* btn_playsamples = new QPushButton(tr("Play samples"));
connect(btn_playsamples, SIGNAL(clicked()), this, SLOT(playSamples()));
sb_playsamples = new QScrollBar(Qt::Horizontal);
sb_playsamples->setRange(100, 4000); // ms
lh->addWidget(canvaswidget);
lv->addLayout(lh, 100);
lv->addWidget(sorter, 15);
lv->addWidget(btn_playsamples);
lv->addWidget(sb_playsamples);
QDockWidget* dockWidget = new QDockWidget(tr("Process"), this);
dockWidget->setAllowedAreas(Qt::RightDockWidgetArea);
dockWidget->setFeatures(QDockWidget::NoDockWidgetFeatures);
dockWidget->setWidget(new QWidget());
dockWidget->widget()->setLayout(new QVBoxLayout());
tabs = new QTabWidget(this);
tabs->setMinimumWidth(350);
tabs->addTab(createFilesTab(), tr("Files"));
generateTabId = tabs->addTab(createGenerateTab(), tr("Generate"));
tabs->addTab(createEditTab(), tr("Edit"));
//tabs->addTab(createExportTab(), tr("Export"));
connect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
tabChanged(tabs->currentIndex());
dockWidget->widget()->layout()->addWidget(tabs);
VolumeFader* vol = new VolumeFader();
connect(vol, SIGNAL(volumeChangedDb(double)),
&player, SLOT(setGainDB(double)));
connect(&player, SIGNAL(peakUpdate(double)),
vol, SLOT(updatePeakPower(double)));
vol->setVolumeDb(0);
dockWidget->widget()->layout()->addWidget(vol);
addDockWidget(Qt::RightDockWidgetArea, dockWidget);
canvaswidget->yscale->setValue(0.9);
canvaswidget->yoffset->setValue(MAXVAL/2);
canvaswidget->xscale->setValue(0);
canvaswidget->xoffset->setValue(0);
// Update selections according to threshold
tool_selections->thresholdChanged(instrument.getThreshold());
}
InstrumentWidget::~InstrumentWidget()
{
}
void InstrumentWidget::tabChanged(int tabid)
{
tool_selections->setShowPreview(tabid == generateTabId);
sorter->setShowPreview(tabid == generateTabId);
tool_selections->autoCreateSelectionsPreview();
threshold->setActive(tabid == generateTabId);
}
QWidget* InstrumentWidget::createFilesTab()
{
QWidget* w = new QWidget();
QVBoxLayout* l = new QVBoxLayout();
w->setLayout(l);
l->addWidget(new QLabel(tr("Files: (double-click to set as master)")));
QPushButton* loadbtn = new QPushButton();
loadbtn->setText(tr("Add files..."));
l->addWidget(loadbtn);
filelist = new FileList(instrument);
connect(filelist, SIGNAL(masterFileChanged(QString)),
this, SLOT(loadFile(QString)));
connect(loadbtn, SIGNAL(clicked()), filelist, SLOT(addFiles()));
l->addWidget(filelist);
if(!instrument.getMasterFile().isEmpty())
{
loadFile(instrument.getMasterFile());
}
return w;
}
QWidget* InstrumentWidget::createEditTab()
{
selections = instrument.getSelections();
SelectionEditor* se = new SelectionEditor(selections, instrument);
connect(&selections, SIGNAL(added(sel_id_t)), se, SLOT(added(sel_id_t)));
connect(&selections, SIGNAL(updated(sel_id_t)), se, SLOT(updated(sel_id_t)));
connect(&selections, SIGNAL(removed(sel_id_t)), se, SLOT(removed(sel_id_t)));
connect(&selections, SIGNAL(activeChanged(sel_id_t)),
se, SLOT(activeChanged(sel_id_t)));
connect(&selections, SIGNAL(added(sel_id_t)), this, SLOT(selectionChanged()));
connect(&selections, SIGNAL(updated(sel_id_t)), this, SLOT(selectionChanged()));
connect(&selections, SIGNAL(removed(sel_id_t)), this, SLOT(selectionChanged()));
connect(&selections, SIGNAL(activeChanged(sel_id_t)), this, SLOT(selectionChanged()));
return se;
}
void InstrumentWidget::selectionChanged()
{
instrument.setSelections(selections);
}
static QSlider* createAttribute(QWidget* parent, QString name,
int range_from, int range_to)
{
QSlider* slider;
QGridLayout* l = new QGridLayout();
l->addWidget(new QLabel(name), 0, 0, 1, 2);
QSpinBox* spin = new QSpinBox();
spin->setRange(range_from, range_to);
l->addWidget(spin, 1, 0, 1, 1);
slider = new QSlider(Qt::Horizontal);
slider->setRange(range_from, range_to);
l->addWidget(slider, 1, 1, 1,1);
QObject::connect(spin, SIGNAL(valueChanged(int)),
slider, SLOT(setValue(int)));
QObject::connect(slider, SIGNAL(valueChanged(int)),
spin, SLOT(setValue(int)));
((QBoxLayout*)parent->layout())->addLayout(l);
return slider;
}
QWidget* InstrumentWidget::createGenerateTab()
{
QWidget* w = new QWidget();
QVBoxLayout* l = new QVBoxLayout();
w->setLayout(l);
QHBoxLayout* btns = new QHBoxLayout();
QPushButton* autosel = new QPushButton();
autosel->setText(tr("Generate"));
connect(autosel, SIGNAL(clicked()),
tool_selections, SLOT(clearSelections()));
connect(autosel, SIGNAL(clicked()),
tool_selections, SLOT(autoCreateSelections()));
connect(threshold, SIGNAL(thresholdChanged(double)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
connect(threshold, SIGNAL(thresholdChanging(double)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
QPushButton* clearsel = new QPushButton();
clearsel->setText(tr("Clear"));
connect(clearsel, SIGNAL(clicked()),
tool_selections, SLOT(clearSelections()));
btns->addWidget(autosel);
btns->addWidget(clearsel);
l->addLayout(btns);
slider_attacklength = createAttribute(w, tr("Attack length:"), 10, 1000);
connect(slider_attacklength, SIGNAL(valueChanged(int)),
sorter, SLOT(setAttackLength(int)));
connect(slider_attacklength, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_attacklength->setValue(instrument.getAttackLength());
connect(slider_attacklength, SIGNAL(valueChanged(int)),
this, SLOT(generateSlidersChanged()));
slider_spread = createAttribute(w, tr("Power spread:"), 1, 2000);
connect(slider_spread, SIGNAL(valueChanged(int)),
sorter, SLOT(setSpreadFactor(int)));
connect(slider_spread, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_spread->setValue(instrument.getPowerSpread());
connect(slider_spread, SIGNAL(valueChanged(int)),
this, SLOT(generateSlidersChanged()));
slider_hold = createAttribute(w, tr("Minimum size (samples):"), 0, 200000);
connect(slider_hold, SIGNAL(valueChanged(int)),
tool_selections, SLOT(holdChanged(int)));
connect(slider_hold, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_hold->setValue(instrument.getMinimumSize());
connect(slider_hold, SIGNAL(valueChanged(int)),
this, SLOT(generateSlidersChanged()));
slider_falloff = createAttribute(w, tr("Falloff:"), 10, 5000);
connect(slider_falloff, SIGNAL(valueChanged(int)),
tool_selections, SLOT(noiseFloorChanged(int)));
connect(slider_falloff, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_falloff->setValue(instrument.getFalloff());
connect(slider_falloff, SIGNAL(valueChanged(int)),
this, SLOT(generateSlidersChanged()));
slider_fadelength = createAttribute(w, tr("Fadelength:"), 0, 2000);
connect(slider_fadelength, SIGNAL(valueChanged(int)),
tool_selections, SLOT(fadeoutChanged(int)));
connect(slider_fadelength, SIGNAL(valueChanged(int)),
tool_selections, SLOT(autoCreateSelectionsPreview()));
slider_fadelength->setValue(instrument.getFadeLength());
connect(slider_fadelength, SIGNAL(valueChanged(int)),
this, SLOT(generateSlidersChanged()));
l->addStretch();
return w;
}
void InstrumentWidget::generateSlidersChanged()
{
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
instrument.setAttackLength(slider_attacklength->value());
instrument.setPowerSpread(slider_spread->value());
instrument.setMinimumSize(slider_hold->value());
instrument.setFalloff(slider_falloff->value());
instrument.setFadeLength(slider_fadelength->value());
}
QWidget* InstrumentWidget::createExportTab()
{
QWidget* w = new QWidget();
QVBoxLayout* l = new QVBoxLayout();
w->setLayout(l);
l->addWidget(new QLabel(tr("Prefix:")));
prefix = new QLineEdit();
prefix->setText(instrument.getPrefix());
connect(prefix, SIGNAL(textChanged(const QString &)),
this, SLOT(prefixChanged()));
l->addWidget(prefix);
l->addWidget(new QLabel(tr("Export path:")));
QHBoxLayout* lo_exportp = new QHBoxLayout();
lineed_exportp = new QLineEdit();
lineed_exportp->setText(instrument.getProject().getExportPath());
connect(lineed_exportp, SIGNAL(textChanged(const QString &)),
this, SLOT(exportPathChanged()));
lo_exportp->addWidget(lineed_exportp);
QPushButton* btn_browse = new QPushButton(tr("..."));
connect(btn_browse, SIGNAL(clicked()), this, SLOT(browse()));
lo_exportp->addWidget(btn_browse);
l->addLayout(lo_exportp);
QPushButton* exportsel = new QPushButton();
exportsel->setText(tr("Export"));
connect(exportsel, SIGNAL(clicked()), this, SLOT(doExport()));
l->addWidget(exportsel);
QProgressBar* bar = new QProgressBar();
connect(extractor, SIGNAL(progressUpdate(int)), bar, SLOT(setValue(int)));
connect(extractor, SIGNAL(setMaximumProgress(int)),
bar, SLOT(setMaximum(int)));
l->addWidget(bar);
l->addStretch();
return w;
}
void InstrumentWidget::prefixChanged()
{
instrument.setPrefix(prefix->text());
}
void InstrumentWidget::exportPathChanged()
{
instrument.getProject().setExportPath(lineed_exportp->text());
}
void InstrumentWidget::playSamples()
{
Selections* sels = &selections;
if(tabs->currentIndex() == generateTabId)
{
sels = &selections_preview;
}
QVector ids = sels->ids();
for(int v1 = 0; v1 < ids.size(); v1++)
{
for(int v2 = 0; v2 < ids.size(); v2++)
{
Selection sel1 = sels->get(ids[v1]);
Selection sel2 = sels->get(ids[v2]);
if(sel1.energy < sel2.energy)
{
sel_id_t vtmp = ids[v1];
ids[v1] = ids[v2];
ids[v2] = vtmp;
}
}
}
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = sels->get(*i);
unsigned int length = sb_playsamples->value() * 44100 / 1000;
unsigned int sample_length = sel.to - sel.from;
unsigned int to = sel.to;
if(sample_length > length)
{
to = sel.from + length;
}
sels->setActive(*i);
connect(&player, SIGNAL(positionUpdate(size_t)),
listen, SLOT(update(size_t)));
player.playSelection(sel, to - sel.from);
QTime t;
t.start();
while(t.elapsed() < sb_playsamples->value())
{
qApp->processEvents();
q_usleep(25 * 1000);
}
player.stop();
disconnect(&player, SIGNAL(positionUpdate(size_t)),
listen, SLOT(update(size_t)));
i++;
}
}
void InstrumentWidget::doExport()
{
extractor->exportSelections();
}
void InstrumentWidget::loadFile(QString filename)
{
setCursor(Qt::WaitCursor);
statusBar()->showMessage(tr("Loading..."));
qApp->processEvents();
sorter->setWavData(NULL, 0);
player.setPcmData(NULL, 0, 0);
canvaswidget->canvas->load(filename);
sorter->setWavData(canvaswidget->canvas->data, canvaswidget->canvas->size);
player.setPcmData(canvaswidget->canvas->data, canvaswidget->canvas->size, canvaswidget->canvas->samplerate);
statusBar()->showMessage(tr("Ready"));
setCursor(Qt::ArrowCursor);
instrument.setMasterFile(filename);
}
void InstrumentWidget::browse()
{
QString path =
QFileDialog::getExistingDirectory(this, tr("Select export path"),
lineed_exportp->text());
lineed_exportp->setText(path);
}
dgedit-0.10.0/src/canvastoolthreshold.cc 0000644 0000764 0000764 00000006570 13325573607 015170 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastoolthreshold.cc
*
* Fri Jul 29 16:27:00 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "canvastoolthreshold.h"
#include
#include "project.h"
#define mapX(x) canvas->mapX(x)
#define mapY(x) canvas->mapY(x)
#define unmapX(x) canvas->unmapX(x)
#define unmapY(x) canvas->unmapY(x)
CanvasToolThreshold::CanvasToolThreshold(Canvas* c, Instrument& instrument)
: instrument(instrument)
{
canvas = c;
threshold = instrument.getThreshold();
threshold_is_moving = false;
colThreshold = QColor(255, 127, 127);
colThresholdMoving = QColor(180, 0, 0);
}
bool CanvasToolThreshold::mouseMoveEvent(QMouseEvent* event)
{
if(!isActive())
{
return false;
}
if(event->button() != Qt::LeftButton)
{
if(abs(event->y() - mapY(threshold)) < 2 ||
abs(event->y() - mapY(-threshold)) < 2 )
{
canvas->setCursor(Qt::SplitVCursor);
return true;
}
}
if(threshold_is_moving)
{
float val = unmapY(event->y());
if(fabs(val) > 1.0)
{
val = 1.0;
}
threshold = fabs(val);
canvas->update();
emit thresholdChanging(threshold);
instrument.setThreshold(threshold);
return true;
}
return false;
}
bool CanvasToolThreshold::mousePressEvent(QMouseEvent* event)
{
if(!isActive())
{
return false;
}
if(event->button() == Qt::LeftButton)
{
// Check if threshold is being dragged.
if(abs(event->y() - mapY(threshold)) < 2 ||
abs(event->y() - mapY(-threshold)) < 2)
{
threshold_is_moving = true;
canvas->update();
return true;
}
}
return false;
}
bool CanvasToolThreshold::mouseReleaseEvent(QMouseEvent* event)
{
if(!isActive())
{
return false;
}
if(event->button() == Qt::LeftButton)
{
if(threshold_is_moving)
{
threshold_is_moving = false;
canvas->setCursor(Qt::ArrowCursor);
canvas->update();
emit thresholdChanged(threshold);
instrument.setThreshold(threshold);
return true;
}
}
return false;
}
void CanvasToolThreshold::paintEvent(QPaintEvent* event, QPainter& painter)
{
if(!isActive())
{
return;
}
if(threshold_is_moving)
{
painter.setPen(colThresholdMoving);
}
else
{
painter.setPen(colThreshold);
}
painter.drawLine(event->rect().x(), mapY(threshold),
event->rect().x() + event->rect().width(), mapY(threshold));
painter.drawLine(event->rect().x(), mapY(-threshold),
event->rect().x() + event->rect().width(), mapY(-threshold));
}
dgedit-0.10.0/src/player.h 0000644 0000764 0000764 00000005575 13353450222 012230 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* player.h
*
* Tue Apr 15 10:34:18 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
#include "selection.h"
class Player
: public QThread
{
Q_OBJECT
public:
Player();
~Player();
void run();
// TODO: Make these private.
// These two need to be public in order for the ugly hack in
// CanvasToolListen::playRange to work...
// volatile bool playing;
volatile size_t pos;
volatile size_t end;
public slots:
//! Assign PCM data to the player.
void setPcmData(float *data, size_t num_samples, double samplerate);
//! Set gain scalar.
//! This value is multiplied with each sample before it is played.
void setGainScalar(double gain_scalar);
//! Set gain is dB.
//! Convenience method for setGainScalar. It simple recalculates the dB value
//! to a scalar and sets the gain scalar accordingly.
void setGainDB(double gain_db);
//! Set player position as sample offset.
void setPosition(size_t position);
//! Play range based on selection including fade-in/out.
//! \param length Stop playing after length samples. -1 means play all.
void playSelection(Selection selection, int length = -1);
//! Return true if last selection is done playing.
bool playSelectionDone();
//! Stop playing
void stop();
signals:
//! The absolute maximum of samples seen since last update.
void peakUpdate(double peak);
//! The absolute maximum of samples seen since last update in dB.
void peakUpdateDB(double peak_db);
//! The sample position of the player.
void positionUpdate(size_t position);
private slots:
void reportTimeout();
private:
ao_device *dev;
float *pcm_data;
size_t pcm_size;
double pcm_samplerate{44100.0};
QTimer report_timer;
double gain_scalar;
double peak;
bool running;
QMutex mutex;
volatile bool new_selection;
size_t sel_end;
Selection selection;
};
dgedit-0.10.0/src/channeldialog.h 0000644 0000764 0000764 00000002622 13353450222 013512 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* channeldialog.h
*
* Fri Sep 21 17:27:08 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
class Channel;
class ChannelDialog
: public QDialog
{
Q_OBJECT
public:
ChannelDialog(QWidget* parent, Channel& channel);
~ChannelDialog() = default;
private slots:
void apply();
private:
QLineEdit* name{nullptr};
Channel& channel;
};
dgedit-0.10.0/src/samplesorter.cc 0000644 0000764 0000764 00000015543 13414430366 013613 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* samplesorter.cc
*
* Mon Nov 30 07:45:58 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "samplesorter.h"
#include
#include
#include
#include
#include
#ifndef MAXFLOAT
#define MAXFLOAT (3.40282347e+38F)
#endif
SampleSorter::SampleSorter(Selections& s, Selections& p, Instrument& instrument)
: selections(s)
, selections_preview(p)
, instrument(instrument)
{
setMouseTracking(true);
setFocusPolicy(Qt::ClickFocus); // Enable keyboard event on click
data = NULL;
size = 0;
attlen = 666; // Magical constants needs biblical proportions...
sel_moving = SEL_NONE;
setSpreadFactor(1000);
}
void SampleSorter::setShowPreview(bool s)
{
show_preview = s;
update();
}
void SampleSorter::setWavData(const float* data, size_t size)
{
this->data = data;
this->size = size;
relayout();
}
int SampleSorter::attackLength()
{
return attlen;
}
void SampleSorter::setSpreadFactor(int s)
{
spread = (double)s / 1000.0;
spread *= spread;
relayout();
}
void SampleSorter::setAttackLength(int len)
{
attlen = len;
relayout();
}
void SampleSorter::addSelection(sel_id_t id)
{
Selection s = selections.get(id);
double energy = 0.0;
for(size_t idx = s.from;
(idx < (size_t)s.from + (size_t)attackLength()) &&
(idx < (size_t)s.to) && (idx < size);
idx++)
{
energy += data[idx] * data[idx];
}
s.energy = pow(energy, spread);
selections.update(id, s);
relayout();
}
void SampleSorter::addSelectionPreview(sel_id_t id)
{
Selection s = selections_preview.get(id);
double energy = 0.0;
for(size_t idx = s.from;
(idx < (size_t)s.from + (size_t)attackLength()) &&
(idx < (size_t)s.to) && (idx < size);
idx++)
{
energy += data[idx] * data[idx];
}
s.energy = pow(energy, spread);
selections_preview.update(id, s);
relayout();
}
void SampleSorter::relayout()
{
min = MAXFLOAT;
max = 0.0;
{
QVector ids = selections.ids();
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = selections.get(*i);
if(sel.energy < min)
{
min = sel.energy;
}
if(sel.energy > max)
{
max = sel.energy;
}
i++;
}
}
if(show_preview)
{
QVector ids = selections_preview.ids();
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = selections_preview.get(*i);
if(sel.energy < min)
{
min = sel.energy;
}
if(sel.energy > max)
{
max = sel.energy;
}
i++;
}
}
update();
}
#define MAP(p) (height()-(int)(p*((float)height()/(float)width())))
#define unmapX(x) ((double)x/(double)(width()-1)*(1.0/0.9))
#define unmapY(x) x
#define mapX(x) (((double)x)*(width()-1))
#define mapY(x) x
#define C_RADIUS 2
static void drawCircle(QPainter& p, int x, int y)
{
p.drawEllipse(x - C_RADIUS, y - C_RADIUS, 2 * C_RADIUS, 2 * C_RADIUS);
}
void SampleSorter::paintEvent(QPaintEvent* event)
{
QPainter painter(this);
QColor colBg = QColor(180, 200, 180, 160);
QColor colFg = QColor(160, 180, 160, 160);
QColor colPt = QColor(255, 100, 100, 160);
QColor colPtPreview = QColor(0, 0, 255, 160);
QColor colPtSel = QColor(255, 255, 100, 160);
painter.setPen(colBg);
painter.setBrush(colBg);
painter.drawRect(event->rect());
painter.setPen(colFg);
painter.drawLine(0,height(),width(),0);
{
QVector ids = selections.ids();
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = selections.get(*i);
if(*i == selections.active())
{
painter.setPen(colPtSel);
}
else
{
painter.setPen(colPt);
}
float x = (sel.energy / max);
x = sqrt(x);
x *= (float)width() * 0.9;
drawCircle(painter, x, MAP(x));
i++;
}
}
if(show_preview)
{
QVector ids = selections_preview.ids();
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = selections_preview.get(*i);
painter.setPen(colPtPreview);
float x = (sel.energy / max);
x = sqrt(x);
x *= (float)width() * 0.9;
drawCircle(painter, x, MAP(x));
i++;
}
}
}
sel_id_t SampleSorter::getSelectionByCoordinate(int px, int py)
{
// Hit radius is slithly larger than the circles themselves.
int hit_r = C_RADIUS + 1;
QVector ids = selections.ids();
QVector::iterator i = ids.begin();
while(i != ids.end())
{
Selection sel = selections.get(*i);
float x = (sel.energy/max);
x = sqrt(x);
x *= (float)width() * 0.9;
if(px < (x + hit_r) &&
px > (x - hit_r) &&
py < (MAP(x) + hit_r) &&
py > (MAP(x) - hit_r))
{
return *i;
}
i++;
}
return SEL_NONE;
}
void SampleSorter::mouseMoveEvent(QMouseEvent* event)
{
if(sel_moving != SEL_NONE)
{
Selection sel = selections.get(sel_moving);
if(sel_moving != SEL_NONE)
{
double power = unmapX(event->x());
power *= power;
power *= max;
sel.energy = power;
selections.update(sel_moving, sel);
}
update();
return;
}
else
{
sel_id_t psel = getSelectionByCoordinate(event->x(), event->y());
if(psel != SEL_NONE)
{
setCursor(Qt::OpenHandCursor);
}
else
{
setCursor(Qt::ArrowCursor);
}
}
}
void SampleSorter::mousePressEvent(QMouseEvent* event)
{
if(event->button() == Qt::LeftButton)
{
sel_id_t psel = getSelectionByCoordinate(event->x(), event->y());
sel_moving = psel;
selections.setActive(psel);
if(psel != SEL_NONE)
{
setCursor(Qt::ClosedHandCursor);
}
}
}
void SampleSorter::mouseReleaseEvent(QMouseEvent* event)
{
if(event->button() == Qt::LeftButton)
{
sel_moving = SEL_NONE;
sel_id_t psel = getSelectionByCoordinate(event->x(), event->y());
if(psel != SEL_NONE)
{
setCursor(Qt::OpenHandCursor);
}
else
{
setCursor(Qt::ArrowCursor);
}
}
}
void SampleSorter::keyReleaseEvent(QKeyEvent* event)
{
if(selections.active() != SEL_NONE && event->key() == Qt::Key_Delete)
{
selections.remove(selections.active());
}
}
dgedit-0.10.0/src/imageeditor.cc 0000644 0000764 0000764 00000003056 13353450222 013353 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* imageeditor.cc
*
* Tue Jul 24 11:55:43 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "imageeditor.h"
#include
ImageEditor::ImageEditor(QWidget* parent)
: QWidget(parent)
{
}
ImageEditor::~ImageEditor()
{
}
void ImageEditor::setImage(QString filename)
{
QLabel *image = new QLabel(this);
QPixmap pic(filename);
QPixmap scaled = pic.scaled(width(), height(),
Qt::KeepAspectRatio, Qt::FastTransformation);
image->setPixmap(scaled);
image->move(0, 0);
image->resize(width(), height());
}
dgedit-0.10.0/src/imageeditor.h 0000644 0000764 0000764 00000002424 13353450222 013213 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* imageeditor.h
*
* Tue Jul 24 11:55:43 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class ImageEditor
: public QWidget
{
Q_OBJECT
public:
ImageEditor(QWidget* parent);
~ImageEditor();
void setImage(QString filename);
};
dgedit-0.10.0/src/filelist.h 0000644 0000764 0000764 00000004537 13353450222 012544 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* filelist.h
*
* Mon Nov 30 15:35:52 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
class Instrument;
class FileDataModel;
class FileList
: public QTreeView
{
Q_OBJECT
public:
FileList(Instrument& instrument);
QString path;
signals:
void masterFileChanged(QString filename);
// void fileAdded(QString file, QString name);
void fileRemoved(QString file, QString name);
void allFilesRemoved();
// void nameChanged(QString file, QString name);
public slots:
void addFiles();
private slots:
void selectionChanged(const QModelIndex &index);
void onCustomContextMenu(const QPoint &point);
void setMaster();
void removeFile();
void removeAllFiles();
// void setItemName(QListWidgetItem* i, QString name);
//
private:
// QString itemFile(QListWidgetItem* i);
// void setItemFile(QListWidgetItem* i, QString file);
//
// QString itemName(QListWidgetItem* i);
// void setItemMaster(QListWidgetItem* i, bool master);
//
// int itemChannelMap(QListWidgetItem* i);
// void setItemChannelMap(QListWidgetItem* i, int id);
//
// void setMasterFile(QListWidgetItem* i);
void createMenus();
QMenu* menu;
QAction* setMasterAction;
QAction* editAction;
QAction* removeAction;
QAction* removeAllAction;
// QListWidgetItem* activeItem;
Instrument& instrument;
FileDataModel* model;
};
dgedit-0.10.0/src/itemeditor.h 0000644 0000764 0000764 00000002646 13253511760 013101 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* itemeditor.h
*
* Tue Dec 1 11:01:40 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
class ItemEditor
: public QLineEdit
{
Q_OBJECT
public:
ItemEditor(QListWidgetItem* i, QString v);
protected:
void focusOutEvent(QFocusEvent* );
signals:
void updateItem(QListWidgetItem* i, QString v);
private:
QListWidgetItem* i;
};
dgedit-0.10.0/src/channeldialog.cc 0000644 0000764 0000764 00000004614 13353450222 013653 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* channeldialog.cc
*
* Fri Sep 21 17:27:08 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "channeldialog.h"
#include
#include
#include
#include
#include
#include
#include "project.h"
ChannelDialog::ChannelDialog(QWidget* parent, Channel& channel)
: QDialog(parent)
, channel(channel)
{
setWindowModality(Qt::ApplicationModal);
setWindowTitle(tr("Channel Dialog"));
setMinimumWidth(300);
auto layout = new QGridLayout();
setLayout(layout);
int idx = 0;
name = new QLineEdit();
name->setText(channel.getChannelName());
layout->addWidget(new QLabel(tr("Name of the channel:")), idx, 0, 1, 2);
idx++;
layout->addWidget(name, idx, 0);
idx++;
auto buttons =
new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel |
QDialogButtonBox::Apply);
connect(buttons, SIGNAL(accepted()), this, SLOT(apply()));
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
this, SLOT(apply()));
layout->addWidget(buttons, idx, 0, 1, 2);
}
void ChannelDialog::apply()
{
// Only send out one update signal
Project::RAIIBulkUpdate bulkUpdate(channel.getProject());
channel.setChannelName(name->text());
}
dgedit-0.10.0/src/localehandler.cc 0000644 0000764 0000764 00000003114 13356154465 013667 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* localehandler.cc
*
* Sat May 5 12:39:49 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "localehandler.h"
#include
#include
#include
#include
#include
#include
LocaleHandler::LocaleHandler(QApplication& app)
{
QString locale = QLocale().name().section('_', 0, 0);
if(!locale.isEmpty() && locale != "C")
{
QString file = QString(LOCALEDIR) + QDir::separator() + "dgedit_" + locale + ".qm";
if(QFile::exists(file))
{
translator.load(file);
app.installTranslator(&translator);
}
}
}
dgedit-0.10.0/src/sleep.h 0000644 0000764 0000764 00000003134 13253513004 012026 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* sleep.h
*
* Sun Apr 20 18:54:58 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class __Sleeper
: public QThread
{
public:
void msleep(unsigned long msecs)
{
QThread::msleep(msecs);
}
void sleep(unsigned long secs)
{
QThread::sleep(secs);
}
void usleep(unsigned long usecs)
{
QThread::usleep(usecs);
}
};
inline void q_msleep(unsigned long msecs)
{
__Sleeper s;
s.msleep(msecs);
}
inline void q_sleep(unsigned long secs)
{
__Sleeper s;
s.sleep(secs);
}
inline void q_usleep(unsigned long usecs)
{
__Sleeper s;
s.usleep(usecs);
}
dgedit-0.10.0/src/Makefile.am 0000644 0000764 0000764 00000004212 13414430366 012607 0000000 0000000 #export QT_SELECT=qt5
bin_PROGRAMS = dgedit
dgedit_LDADD = $(SNDFILE_LIBS) $(QT_LIBS) $(AO_LIBS) \
$(shell ../tools/MocList o ) qrc_dgedit.o
dgedit_CXXFLAGS = -g $(SNDFILE_CXXFLAGS) $(QT_CFLAGS) $(AO_CFLAGS) \
-DLOCALEDIR='"$(localedir)"'
AM_CXXFLAGS = $(QT_CFLAGS)
dgedit_TRANSLATIONS = \
ts/dgedit_da.ts \
ts/dgedit_fr.ts
dgedit_SOURCES = \
dgedit.cc \
aboutdialog.cc \
audioextractor.cc \
canvas.cc \
canvastool.cc \
canvastoollisten.cc \
canvastoolselections.cc \
canvastoolthreshold.cc \
canvaswidget.cc \
channeldialog.cc \
channelswidget.cc \
filelist.cc \
imageeditor.cc \
instrumentdialog.cc \
instrumentwidget.cc \
itemeditor.cc \
localehandler.cc \
mainwindow.cc \
mipmap.cc \
player.cc \
project.cc \
projectdialog.cc \
projectrenderer.cc \
projectserialiser.cc \
renderdialog.cc \
samplesorter.cc \
selection.cc \
selectioneditor.cc \
settings.cc \
volumefader.cc \
zoomslider.cc
HDRS = \
aboutdialog.h \
audioextractor.h \
canvas.h \
canvastool.h \
canvastoollisten.h \
canvastoolselections.h \
canvastoolthreshold.h \
canvaswidget.h \
channeldialog.h \
channelswidget.h \
filelist.h \
imageeditor.h \
instrumentdialog.h \
instrumentwidget.h \
itemeditor.h \
localehandler.h \
mainwindow.h \
mipmap.h \
player.h \
project.h \
projectdialog.h \
projectrenderer.h \
projectserialiser.h \
renderdialog.h \
samplesorter.h \
selection.h \
selectioneditor.h \
sleep.h \
settings.h \
volumefader.h \
zoomslider.h
EXTRA_DIST = \
$(dgedit_TRANSLATIONS) \
$(HDRS) \
dgedit.qrc
dgedit_MOC = $(shell ../tools/MocList cc )
BUILT_SOURCES = \
$(dgedit_MOC) \
qrc_dgedit.cc \
$(dgedit_TRANSLATIONS:.ts=.qm)
CLEANFILES = $(BUILT_SOURCES)
qrc_%.cc: %.qrc
rcc $< > $@
%.moc.cc: %.h
QT_SELECT=qt5 $(QT_MOC) -o $@ $<
#
# ui files not used in this project...
#%.h: %.ui
# $(QT_UIC) -o $@ $<
#
#%.cc: %.ui
# $(QT_UIC) -o $@ -impl $*.h $<
# command for creating .res file from .rc on Win32
%.res: %.rc
rc $<
%.ts: $(dgedit_SOURCES) $(HDRS)
QT_SELECT=qt5 lupdate $(dgedit_SOURCES) $(HDRS) -ts $@
%.qm: %.ts
QT_SELECT=qt5 lrelease $<
dgeditdir = $(localedir)
dgedit_DATA = $(dgedit_TRANSLATIONS:.ts=.qm)
dgedit-0.10.0/src/mainwindow.cc 0000644 0000764 0000764 00000035574 13414430366 013255 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* mainwindow.cc
*
* Tue Nov 10 10:21:04 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "mainwindow.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "settings.h"
#include "projectdialog.h"
#include "renderdialog.h"
#include "channeldialog.h"
#include "instrumentdialog.h"
#include "projectserialiser.h"
#include "instrumentwidget.h"
#include "channelswidget.h"
#include "aboutdialog.h"
#include "imageeditor.h"
#define MAXVAL 10000000L
MainWindow::MainWindow(Settings& settings)
: settings(settings)
{
tab_widget = new QTabWidget();
tab_widget->setTabsClosable(true);
tab_widget->setMovable(true);
connect(tab_widget, SIGNAL(tabCloseRequested(int)),
this, SLOT(closeTab(int)));
setCentralWidget(tab_widget);
QMenu* fileMenu = menuBar()->addMenu(tr("&File"));
QAction* act_new_project = new QAction(tr("&New Project"), this);
fileMenu->addAction(act_new_project);
connect(act_new_project, SIGNAL(triggered()), this, SLOT(newProject()));
QAction* act_load_project = new QAction(tr("&Load Project..."), this);
fileMenu->addAction(act_load_project);
connect(act_load_project, SIGNAL(triggered()), this, SLOT(loadProject()));
act_save_project = new QAction(tr("&Save Project"), this);
act_save_project->setShortcut(QKeySequence::Save);
fileMenu->addAction(act_save_project);
connect(act_save_project, SIGNAL(triggered()), this, SLOT(saveProject()));
QAction* act_save_project_as = new QAction(tr("Save Project As..."), this);
fileMenu->addAction(act_save_project_as);
connect(act_save_project_as, SIGNAL(triggered()),
this, SLOT(saveProjectAs()));
QAction* act_quit = new QAction(tr("&Quit"), this);
fileMenu->addAction(act_quit);
connect(act_quit, SIGNAL(triggered()), this, SLOT(close()));
QMenu* projectMenu = menuBar()->addMenu(tr("&Project"));
QAction* act_render = new QAction(tr("&Export..."), this);
projectMenu->addAction(act_render);
connect(act_render, SIGNAL(triggered()), this, SLOT(render()));
QAction* act_edit_project = new QAction(tr("&Edit Project..."), this);
projectMenu->addAction(act_edit_project);
connect(act_edit_project, SIGNAL(triggered()), this, SLOT(editProject()));
// QMenu* testMenu = menuBar()->addMenu(tr("Test"));
// QAction* act_test = new QAction(tr("Test"), this);
// testMenu->addAction(act_test);
// connect(act_test, SIGNAL(triggered()), this, SLOT(test()));
QMenu* helpMenu = menuBar()->addMenu(tr("Help"));
QAction* act_about = new QAction(tr("About"), this);
helpMenu->addAction(act_about);
connect(act_about, SIGNAL(triggered()), this, SLOT(showAbout()));
instruments_dock = new QDockWidget(tr("Instruments:"), this);
instruments_dock->setObjectName("instruments_dock");
instruments_dock->setAllowedAreas(Qt::LeftDockWidgetArea);
instruments_dock->setFeatures(QDockWidget::DockWidgetMovable);
{
auto w = new QWidget();
auto l = new QVBoxLayout();
w->setLayout(l);
auto tools = new QToolBar();
auto add = new QToolButton();
add->setIcon(QPixmap(":icons/add_instrument.png"));
connect(add, SIGNAL(clicked()), this, SLOT(addInstrument()));
auto rem = new QToolButton();
rem->setIcon(QPixmap(":icons/remove_instrument.png"));
connect(rem, SIGNAL(clicked()), this, SLOT(removeInstrument()));
auto edt = new QToolButton();
edt->setIcon(QPixmap(":icons/edit_instrument.png"));
connect(edt, SIGNAL(clicked()), this, SLOT(editInstrument()));
tools->addWidget(add);
tools->addWidget(rem);
tools->addWidget(edt);
instrument_list = new QListWidget();
connect(instrument_list, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
this, SLOT(instrumentDoubleClicked(QListWidgetItem*)));
l->addWidget(tools);
l->addWidget(instrument_list);
instruments_dock->setWidget(w);
}
addDockWidget(Qt::LeftDockWidgetArea, instruments_dock);
channels_dock = new QDockWidget(tr("Kit channels:"), this);
channels_dock->setObjectName("channels_dock");
channels_dock->setAllowedAreas(Qt::LeftDockWidgetArea);
channels_dock->setFeatures(QDockWidget::DockWidgetMovable);
{
auto w = new QWidget();
auto l = new QVBoxLayout();
w->setLayout(l);
auto tools = new QToolBar();
auto add = new QToolButton();
add->setIcon(QPixmap(":icons/add_channel.png"));
connect(add, SIGNAL(clicked()), this, SLOT(addChannel()));
auto rem = new QToolButton();
rem->setIcon(QPixmap(":icons/remove_channel.png"));
connect(rem, SIGNAL(clicked()), this, SLOT(removeChannel()));
tools->addWidget(add);
tools->addWidget(rem);
channel_list = new QListWidget();
connect(channel_list, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
this, SLOT(channelDoubleClicked(QListWidgetItem*)));
l->addWidget(tools);
l->addWidget(channel_list);
channels_dock->setWidget(w);
addDockWidget(Qt::LeftDockWidgetArea, channels_dock);
}
loadSettings();
statusBar()->showMessage(tr("Ready"));
connect(&project, SIGNAL(projectChanged()), this, SLOT(projectChanged()));
updateWindowTitle();
setWindowEnabled(false);
}
MainWindow::~MainWindow()
{
}
void MainWindow::addInstrument()
{
auto id = project.createInstrument();
auto& instrument = project.getInstrument(id);
InstrumentDialog dlg(this, instrument);
dlg.show();
dlg.exec();
auto item = new QListWidgetItem();
item->setIcon(QPixmap(":icons/instrument.png"));
item->setText(instrument.getInstrumentName());
item->setData(Qt::UserRole, id);
instrument_list->addItem(item);
}
void MainWindow::editInstrument()
{
auto items = instrument_list->selectedItems();
for(auto item : items)
{
auto id = item->data(Qt::UserRole).toInt();
auto& instrument = project.getInstrument(id);
InstrumentDialog dlg(this, instrument);
dlg.show();
dlg.exec();
item->setText(instrument.getInstrumentName());
// Also update tab name if open
for(int i = 0; i < tab_widget->count(); ++i)
{
if(tab_widget->widget(i)->property("id").toInt() == id)
{
tab_widget->setTabText(i, instrument.getInstrumentName());
}
}
}
}
void MainWindow::removeInstrument()
{
int ret =
QMessageBox::question(this, tr("Delete Instrument"),
tr("Are you sure you want to delete the selected "
"instrument(s)?"),
QMessageBox::Yes | QMessageBox::Cancel);
if(ret != QMessageBox::Yes)
{
return;
}
auto items = instrument_list->selectedItems();
for(auto item : items)
{
auto id = item->data(Qt::UserRole).toInt();
// Also close tab if open.
for(int i = 0; i < tab_widget->count(); ++i)
{
if(tab_widget->widget(i)->property("id").toInt() == id)
{
tab_widget->removeTab(i);
}
}
project.deleteInstrument(id);
delete item;
}
}
void MainWindow::instrumentDoubleClicked(QListWidgetItem *item)
{
int id = item->data(Qt::UserRole).toInt();
auto& instr = project.getInstrument(id);
for(int i = 0; i < tab_widget->count(); ++i)
{
if(tab_widget->widget(i)->property("id").toInt() == id)
{
tab_widget->setCurrentIndex(i);
return;
}
}
// Tab wasn't open already. Create it.
tab_widget->addTab(new InstrumentWidget(settings, instr),
QPixmap(":icons/instrument.png"),
instr.getInstrumentName());
// Make new tab active
tab_widget->setCurrentIndex(tab_widget->count() - 1);
}
void MainWindow::addChannel()
{
auto id = project.createChannel();
auto& channel = project.getChannel(id);
ChannelDialog dlg(this, channel);
dlg.show();
dlg.exec();
auto item = new QListWidgetItem();
item->setIcon(QPixmap(":icons/channel.png"));
item->setData(Qt::UserRole, id);
item->setText(channel.getChannelName());
channel_list->addItem(item);
}
void MainWindow::removeChannel()
{
int ret =
QMessageBox::question(this, tr("Delete Channel"),
tr("Are you sure you want to delete the selected "
"channel(s)?"),
QMessageBox::Yes | QMessageBox::Cancel);
if(ret != QMessageBox::Yes)
{
return;
}
auto items = channel_list->selectedItems();
for(auto item : items)
{
auto id = item->data(Qt::UserRole).toInt();
auto instrument_ids = project.getInstrumentList();
for(auto instrument_id : instrument_ids)
{
auto& instrument = project.getInstrument(instrument_id);
auto audiofile_ids = instrument.getAudioFileList();
for(auto audiofile_id : audiofile_ids)
{
auto& audiofile = instrument.getAudioFile(audiofile_id);
if(audiofile.getChannelMapId() == id)
{
audiofile.setChannelMapId(-1); // Unset channel map
}
}
}
project.deleteChannel(id);
delete item;
}
}
void MainWindow::channelDoubleClicked(QListWidgetItem *item)
{
// Tab wasn't open already. Create it.
tab_widget->addTab(new ChannelsWidget(settings, project),
QPixmap(":icons/channel.png"),
tr("Channels"));
// Make new tab active
tab_widget->setCurrentIndex(tab_widget->count() - 1);
}
void MainWindow::updateWindowTitle()
{
auto project_string = project.getProjectName();
if(project_string == "")
{
project_string = tr("[Untitled Project]");
}
if(project.getProjectFile() != "")
{
project_string += " (" + QFileInfo(project.getProjectFile()).fileName() + ")";
}
act_save_project->setEnabled(project.getProjectFile() != "");
if(project_dirty)
{
project_string += "*";
}
setWindowTitle("DGEdit - " + project_string);
}
void MainWindow::closeEvent(QCloseEvent* event)
{
if(!checkDirty())
{
event->ignore();
return;
}
saveSettings();
QApplication::quit();
}
bool MainWindow::checkDirty()
{
if(project_dirty)
{
int ret =
QMessageBox::question(this, tr("Save before closing project?"),
tr("The project has changed. Do you want to save "
"before closing?"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
switch(ret)
{
case QMessageBox::Yes:
saveProject();
if(project_dirty)
{
// Project still dirty - it was not saved (user pressed cancel?)
return false;
}
break;
case QMessageBox::No:
// Proceed to quit
break;
case QMessageBox::Cancel:
return false;
default:
break;
}
}
return true; // not dirty or user chose not to save
}
void MainWindow::reset()
{
// Close all tabs
while(tab_widget->count())
{
tab_widget->removeTab(0);
}
instrument_list->clear();
channel_list->clear();
project.reset();
updateWindowTitle();
}
void MainWindow::setWindowEnabled(bool enabled)
{
instruments_dock->setEnabled(enabled);
channels_dock->setEnabled(enabled);
tab_widget->setEnabled(enabled);
}
void MainWindow::loadSettings()
{
QByteArray state;
QByteArray geometry;
settings.loadGeometry(state, geometry);
restoreGeometry(geometry);
restoreState(state);
// TODO: lineed_exportp->setText(settings.loadExportPath());
}
void MainWindow::saveSettings()
{
settings.saveGeometry(saveState(), saveGeometry());
// TODO: settings.saveExportPath(lineed_exportp->text());
}
void MainWindow::newProject()
{
if(!checkDirty())
{
return;
}
reset();
ProjectDialog dlg(this, project);
dlg.show();
dlg.exec();
setWindowEnabled(true);
}
void MainWindow::loadProject()
{
if(!checkDirty())
{
return;
}
QString filename =
QFileDialog::getOpenFileName(this,
tr("Load DGEdit Project"),
"",
tr("DGEdit Project Files (*.dgedit)"));
if(filename == "")
{
// User clicked cancel
return;
}
loadProject(filename);
}
void MainWindow::loadProject(QString filename)
{
QFile file(filename);
if(!file.open(QIODevice::ReadOnly))
{
return;
}
reset();
QString xml(file.readAll());
file.close();
ProjectSerialiser ser;
ser.deserialise(xml, project);
project.setProjectFile(filename);
project_dirty = false;
updateWindowTitle();
instrument_list->clear();
auto instrument_ids = project.getInstrumentList();
for(auto id : instrument_ids)
{
auto& instrument = project.getInstrument(id);
auto item = new QListWidgetItem();
item->setIcon(QPixmap(":icons/instrument.png"));
item->setText(instrument.getInstrumentName());
item->setData(Qt::UserRole, id);
instrument_list->addItem(item);
}
channel_list->clear();
auto channel_ids = project.getChannelList();
for(auto id : channel_ids)
{
auto& channel = project.getChannel(id);
auto item = new QListWidgetItem();
item->setIcon(QPixmap(":icons/channel.png"));
item->setText(channel.getChannelName());
item->setData(Qt::UserRole, id);
channel_list->addItem(item);
}
statusBar()->showMessage(tr("Loaded"));
setWindowEnabled(true);
}
void MainWindow::saveProject()
{
QString filename = project.getProjectFile();
if(filename == "")
{
saveProjectAs();
return;
}
QFile file(filename);
if(!file.open(QIODevice::WriteOnly))
{
return;
}
ProjectSerialiser ser;
auto xml = ser.serialise(project);
file.write(xml.toUtf8());
project_dirty = false;
updateWindowTitle();
statusBar()->showMessage(tr("Saved"));
}
void MainWindow::saveProjectAs()
{
QString filename
= QFileDialog::getSaveFileName(this, tr("Save DGEdit Project"),
"",
tr("DGEdit Project Files (*.dgedit)"));
if(filename == "")
{
// User clicked cancel
return;
}
if(filename.right(7) != ".dgedit")
{
filename += ".dgedit";
}
project.setProjectFile(filename);
saveProject();
}
void MainWindow::projectChanged()
{
project_dirty = true;
updateWindowTitle();
}
void MainWindow::closeTab(int tab)
{
tab_widget->removeTab(tab);
}
void MainWindow::test()
{
ImageEditor* e = new ImageEditor(nullptr);
e->setImage("/mnt/atuin/misc/stuff/deva/CrocellKit/crocellkit01.png");
e->show();
}
void MainWindow::render()
{
RenderDialog renderDialog(this, project);
renderDialog.exec();
}
void MainWindow::editProject()
{
ProjectDialog dlg(this, project);
dlg.show();
dlg.exec();
}
void MainWindow::showAbout()
{
AboutDialog dlg(this, Qt::Dialog);
dlg.show();
dlg.exec();
}
dgedit-0.10.0/src/canvastoollisten.h 0000644 0000764 0000764 00000003232 13257360510 014313 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastoollisten.h
*
* Fri Jul 29 16:57:48 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include "canvastool.h"
#include "canvas.h"
#include "player.h"
class CanvasToolListen
: public CanvasTool
{
Q_OBJECT
public:
CanvasToolListen(Canvas* canvas, Player& player);
QString name() { return tr("Listen"); }
bool mousePressEvent(QMouseEvent* event);
bool mouseReleaseEvent(QMouseEvent* event);
void paintEvent(QPaintEvent* event, QPainter& painter);
void playRange(unsigned int from, unsigned int to);
public slots:
void update(size_t position);
private:
Canvas* canvas;
Player& player;
size_t lastpos;
size_t pos;
};
dgedit-0.10.0/src/projectrenderer.cc 0000644 0000764 0000764 00000010715 13414430366 014264 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectrender.cc
*
* Sat Sep 22 10:35:01 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "projectrenderer.h"
#include
#include
#include
#include
#include
#include "project.h"
#include "audioextractor.h"
ProjectRenderer::ProjectRenderer(Project& project)
: project(project)
{
}
void ProjectRenderer::render()
{
// Ugly hack to ensure the xml attribute order is the same each time a save
// or export is performed.
qSetGlobalQHashSeed(0);
QDomDocument doc;
QDomProcessingInstruction header =
doc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
doc.appendChild(header);
QDomElement drumkit = doc.createElement("drumkit");
drumkit.setAttribute("version", "1.0");
drumkit.setAttribute("name", project.getProjectName());
drumkit.setAttribute("description", project.getProjectDescription());
drumkit.setAttribute("samplerate", project.getProjectSamplerate());
doc.appendChild(drumkit);
QDomElement channels = doc.createElement("channels");
drumkit.appendChild(channels);
auto channel_ids = project.getChannelList();
for(auto channel_id : channel_ids)
{
const auto& channel = project.getChannel(channel_id);
QDomElement channel_node = doc.createElement("channel");
channel_node.setAttribute("name", channel.getChannelName());
channels.appendChild(channel_node);
}
QDomElement instruments = doc.createElement("instruments");
drumkit.appendChild(instruments);
auto instrument_ids = project.getInstrumentList();
emit progressStart(instrument_ids.count());
qApp->processEvents();
for(auto instrument_id : instrument_ids)
{
auto& instrument = project.getInstrument(instrument_id);
emit progressTask(tr("Writing instrument: ") +
instrument.getInstrumentName());
{
auto selections = instrument.getSelections().ids();
emit progressRenderStart(selections.count());
qApp->processEvents();
}
AudioExtractor extractor(instrument, this);
connect(&extractor, SIGNAL(progressUpdate(int)),
this, SIGNAL(progressRenderTask(int)));
if(!extractor.exportSelections())
{
emit progressFinished(1);
qApp->processEvents();
return;
}
QDomElement instrument_node = doc.createElement("instrument");
instrument_node.setAttribute("name", instrument.getInstrumentName());
QString file = instrument.getPrefix() + QDir::separator() + instrument.getPrefix() + ".xml";
instrument_node.setAttribute("file", file);
instruments.appendChild(instrument_node);
auto audiofile_ids = instrument.getAudioFileList();
for(auto audiofile_id : audiofile_ids)
{
const auto& audiofile = instrument.getAudioFile(audiofile_id);
if(audiofile.getChannelMapId() == -1)
{
// Not mapped
continue;
}
QDomElement channelmap = doc.createElement("channelmap");
channelmap.setAttribute("in", audiofile.getName());
const auto& channel = project.getChannel(audiofile.getChannelMapId());
channelmap.setAttribute("out", channel.getChannelName());
if(audiofile.getMainChannel())
{
channelmap.setAttribute("main", "true");
}
instrument_node.appendChild(channelmap);
}
emit progressRenderFinished(0);
qApp->processEvents();
}
QFile xmlfile(project.getExportPath() + QDir::separator() + "drumkit.xml");
if(!xmlfile.open(QIODevice::WriteOnly))
{
emit progressFinished(1);
qApp->processEvents();
return;
}
xmlfile.write(doc.toByteArray());
xmlfile.close();
emit progressFinished(0);
qApp->processEvents();
}
dgedit-0.10.0/src/canvas.cc 0000644 0000764 0000764 00000014026 13356154465 012351 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvas.cc
*
* Tue Nov 10 08:37:37 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "canvas.h"
#include
#include
#include
#include
#include
#include
#define DEFYSCALE 200
Canvas::Canvas(QWidget *parent)
: QWidget(parent)
{
setAttribute(Qt::WA_StaticContents);
setMouseTracking(true);
setFocusPolicy(Qt::ClickFocus);
mipmap = NULL;
data = NULL;
size = 0;
xscale = 1.0;
yscale = 1.0;
xoffset = 0.0;
yoffset = 0.5;
colBg = QColor(180, 200, 180);
colSec = QColor(160, 180, 160);
colWavMax = QColor(100, 100, 100);
colWavAvg = QColor(0, 0, 0);
colMax = QColor(127, 127, 255);
colHalf = QColor(180, 180, 255);
setCursor(Qt::ArrowCursor);
wav = QImage(width(), height(), QImage::Format_RGB32);
}
Canvas::~Canvas()
{
if(data)
{
delete[] data;
}
if(mipmap)
{
delete mipmap;
}
}
void Canvas::load(QString file)
{
if(data)
{
delete[] data;
data = NULL;
size = 0;
}
if(mipmap)
{
delete mipmap;
mipmap = NULL;
}
if(file == "")
{
// Just clear the canvas
updateWav();
update();
return;
}
SF_INFO sf_info;
SNDFILE *fh = sf_open(file.toStdString().c_str(), SFM_READ, &sf_info);
if(!fh)
{
printf("Canvas load error '%s'\n", file.toStdString().c_str());
// Just clear the canvas
updateWav();
update();
return;
}
size = sf_info.frames;
samplerate = sf_info.samplerate;
data = new float[size];
sf_read_float(fh, data, size);
sf_close(fh);
mipmap = new MipMap(data, size);
updateWav();
update();
}
#define SCALEX ((xscale * (float)size/(float)width()) + 0.1)
#define OFFSETX (xoffset * (float)size)
float Canvas::mapX(float x)
{
float val = (x - OFFSETX) / SCALEX;
return val;
}
float Canvas::unmapX(float x)
{
float val = x * SCALEX + OFFSETX;
return val;
}
#define SCALEY (yscale * height())
#define OFFSETY (((float)height() / 2.0) + ((yoffset * 2.0 - 1.0) * SCALEY))
float Canvas::mapY(float y)
{
float val = OFFSETY + (y * SCALEY);
return val;
}
float Canvas::unmapY(float y)
{
float val = (y - OFFSETY) / SCALEY;
return val;
}
void Canvas::mouseMoveEvent(QMouseEvent *event)
{
for(int i = 0; i < tools.size(); i++)
{
if(tools[i]->mouseMoveEvent(event)) return;
}
setCursor(Qt::ArrowCursor);
}
void Canvas::mousePressEvent(QMouseEvent *event)
{
for(int i = 0; i < tools.size(); i++)
{
if(tools[i]->mousePressEvent(event)) return;
}
}
void Canvas::mouseReleaseEvent(QMouseEvent *event)
{
for(int i = 0; i < tools.size(); i++)
{
if(tools[i]->mouseReleaseEvent(event)) return;
}
}
void Canvas::resizeEvent(QResizeEvent *event)
{
for(int i = 0; i < tools.size(); i++)
{
tools[i]->resizeEvent(event);
}
wav = QImage(width(), height(), QImage::Format_RGB32);
updateWav();
update();
}
void Canvas::getWavValues(int last, int lx, float *vu, float *vl,
float *avgu, float *avgl)
{
if(mipmap == NULL) return;
MipMapValue val = mipmap->lookup(last, lx);
*vu = val.max;
*vl = val.min;
*avgu = val.uavg;
*avgl = val.lavg;
}
void Canvas::updateWav()
{
QPainter painter(&wav);
painter.setPen(colBg);
painter.setBrush(colBg);
painter.drawRect(0, 0, wav.width(), wav.height());
painter.setPen(colSec);
int step = samplerate;
for(size_t i = 0; i < size; i += step)
{
painter.drawLine(mapX(i), mapY(1.0), mapX(i), mapY(-1.0));
}
painter.setPen(colMax);
painter.drawLine(0, mapY(1.0), wav.width(), mapY(1.0));
painter.drawLine(0, mapY(-1.0), wav.width(), mapY(-1.0));
painter.setPen(colHalf);
painter.drawLine(0, mapY(0.5), wav.width(), mapY(0.5));
painter.drawLine(0, mapY(-0.5), wav.width(), mapY(-0.5));
if(data)
{
int last = unmapX(0);
for(int x = 0; x < wav.width(); x++)
{
int lx = unmapX(x);
if(lx > (int)size || lx < 0) break;
float vu = 0;
float vl = 0;
float avgu = 0;
float avgl = 0;
getWavValues(last, lx, &vu, &vl, &avgu, &avgl);
int c = mapY(0.0);
painter.setPen(colWavMax);
painter.drawLine(x, c, x, mapY(vu));
painter.drawLine(x, c, x, mapY(vl));
painter.setPen(colWavAvg);
painter.drawLine(x, c, x, mapY(avgu));
painter.drawLine(x, c, x, mapY(avgl));
last = lx;
}
}
}
void Canvas::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.drawImage(event->rect(),wav,event->rect());
for(int i = 0; i < tools.size(); i++)
{
tools[i]->paintEvent(event, painter);
}
}
void Canvas::keyReleaseEvent(QKeyEvent *event)
{
for(int i = 0; i < tools.size(); i++)
{
tools[i]->keyReleaseEvent(event);
}
}
void Canvas::setXScale(float scale)
{
scale = (pow(100.0,scale) / 100.0) - (pow(100.0, 0.0)/ 100.0);
if(scale < 0.0) scale = 0.0;
if(scale > 1.0) scale = 1.0;
xscale = scale;
updateWav();
update();
}
void Canvas::setYScale(float scale)
{
yscale = scale;
updateWav();
update();
}
void Canvas::setXOffset(float offset)
{
if(offset < 0.0) offset = 0.0;
if(offset > 1.0) offset = 1.0;
xoffset = offset;
updateWav();
update();
}
void Canvas::setYOffset(float offset)
{
if(offset < 0.0) offset = 0.0;
if(offset > 1.0) offset = 1.0;
yoffset = offset;
updateWav();
update();
}
dgedit-0.10.0/src/mipmap.h 0000644 0000764 0000764 00000003124 13253512125 012203 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* mipmap.h
*
* Fri Sep 3 16:39:45 CEST 2010
* Copyright 2010 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
class MipMapValue
{
public:
MipMapValue()
{
max = min = uavg = lavg = 0.0;
}
float max;
float min;
float uavg;
float lavg;
};
class MipMap
{
public:
MipMap(float* data, size_t size);
MipMapValue lookup(size_t begin, size_t end);
private:
float* data;
size_t size;
MipMapValue* values;
size_t zoom;
MipMapValue data_lookup(size_t begin, size_t end);
MipMapValue mipmap_lookup(size_t begin, size_t end);
MipMap* lowerlevel;
};
dgedit-0.10.0/src/canvaswidget.h 0000644 0000764 0000764 00000002775 13253511635 013417 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvaswidget.h
*
* Fri Aug 1 19:31:31 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include "canvas.h"
#include "zoomslider.h"
class CanvasWidget
: public QWidget
{
Q_OBJECT
public:
CanvasWidget(QWidget* parent);
Canvas* canvas;
QScrollBar* yoffset;
ZoomSlider* yscale;
ZoomSlider* xscale;
QScrollBar* xoffset;
public slots:
void setXScale(float);
void setYScale(float);
void setXOffset(int);
void setYOffset(int);
};
dgedit-0.10.0/src/canvaswidget.cc 0000644 0000764 0000764 00000005347 13253514563 013556 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvaswidget.cc
*
* Fri Aug 1 19:31:32 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "canvaswidget.h"
#include
#define MAXVAL 10000000L
#define SINGLESTEP MAXVAL/100000
#define PAGESTEP MAXVAL/10000
CanvasWidget::CanvasWidget(QWidget* parent)
{
QGridLayout* g = new QGridLayout(this);
canvas = new Canvas(this);
g->addWidget(canvas, 0, 0);
yoffset = new QScrollBar(Qt::Vertical);
yoffset->setRange(0, MAXVAL);
yoffset->setPageStep(PAGESTEP);
yoffset->setSingleStep(SINGLESTEP);
connect(yoffset, SIGNAL(valueChanged(int)), this, SLOT(setYOffset(int)));
g->addWidget(yoffset, 0, 1);
yscale = new ZoomSlider(Qt::Vertical);
yscale->setRange(0.5, 30);
yscale->setTickWidth(0.1);
connect(yscale, SIGNAL(valueChanged(float)), this, SLOT(setYScale(float)));
yscale->setValue(0.5);
setYScale(0.5);
g->addWidget(yscale, 0, 2);
xoffset = new QScrollBar(Qt::Horizontal);
xoffset->setRange(0, MAXVAL);
xoffset->setPageStep(PAGESTEP);
xoffset->setSingleStep(SINGLESTEP);
connect(xoffset, SIGNAL(valueChanged(int)), this, SLOT(setXOffset(int)));
g->addWidget(xoffset, 1, 0);
xscale = new ZoomSlider(Qt::Horizontal);
xscale->setRange(1, 0.0001);
xscale->setTickWidth(0.0001);
connect(xscale, SIGNAL(valueChanged(float)), this, SLOT(setXScale(float)));
g->addWidget(xscale, 2, 0);
setLayout(g);
}
void CanvasWidget::setXScale(float val)
{
canvas->setXScale(val);
}
void CanvasWidget::setYScale(float val)
{
canvas->setYScale(val);
}
void CanvasWidget::setXOffset(int of)
{
// range 0.0 - 1.0
float val = (float)of/(float)MAXVAL;
canvas->setXOffset(val);
}
void CanvasWidget::setYOffset(int of)
{
// range 0.0 - 1.0
float val = (float)(of * -1 + MAXVAL)/(float)MAXVAL;
canvas->setYOffset(val);
}
dgedit-0.10.0/src/canvastoolselections.h 0000644 0000764 0000764 00000004735 13257360510 015176 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastoolselections.h
*
* Thu Jul 28 20:16:59 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include "canvastool.h"
#include
#include "canvas.h"
#include "selection.h"
class CanvasToolSelections
: public CanvasTool
{
Q_OBJECT
public:
CanvasToolSelections(Canvas* canvas, Selections& selections,
Selections& selections_preview);
QString name() { return tr("Selections"); }
bool mouseMoveEvent(QMouseEvent* event);
bool mousePressEvent(QMouseEvent* event);
bool mouseReleaseEvent(QMouseEvent* event);
void paintEvent(QPaintEvent* event, QPainter& painter);
void keyReleaseEvent(QKeyEvent* event);
//Selections selections();
signals:
//void selectionsChanged(Selections selections);
//void activeSelectionChanged(sel_id_t id);
public slots:
void autoCreateSelections();
void autoCreateSelectionsPreview();
void clearSelections();
void thresholdChanged(double threshold);
void noiseFloorChanged(int t);
void holdChanged(int h);
void fadeoutChanged(int f);
void setShowPreview(bool show_preview);
private:
void doAutoCreateSelections(bool preview);
bool selection_is_moving_left;
bool selection_is_moving_right;
Canvas* canvas;
double threshold;
double noise_floor;
double fadeout;
int hold;
QColor colSelBg;
QColor colSel;
QColor colActiveSelBg;
QColor colActiveSel;
QColor colPreviewSelBg;
QColor colPreviewSel;
Selections& selections;
Selections& selections_preview;
bool show_preview;
};
dgedit-0.10.0/src/volumefader.cc 0000644 0000764 0000764 00000005014 13254533517 013400 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* volumefader.cc
*
* Tue Apr 15 15:46:00 CEST 2014
* Copyright 2014 Jonas Suhr Christensen
* jsc@umbraculum.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "volumefader.h"
#include
#include
#include
#define SCALAR 10
#define P 0.5
VolumeFader::VolumeFader()
{
peak = 0;
volslider = new QSlider();
volslider->setRange(-60 * SCALAR , 10 * SCALAR);
volslider->setOrientation(Qt::Horizontal);
volumepeak = new QLabel();
volume = new QLabel();
connect(volslider, SIGNAL(valueChanged(int)),
this, SLOT(handleValueChanged()));
QVBoxLayout* lo = new QVBoxLayout();
lo->addWidget(volslider);
lo->addWidget(volumepeak);
lo->addWidget(volume);
setLayout(lo);
}
VolumeFader::~VolumeFader()
{
}
void VolumeFader::updatePeakDb(double db)
{
//updatePeakPower(pow(10, db / 20));
}
void VolumeFader::updatePeakPower(double newpeak)
{
peak = (newpeak * (1.0 - P) + peak * P);
volumepeak->setText(tr("Peak ") + QString::number(peak, 'f', 5));
handleValueChanged();
}
void VolumeFader::setVolumeDb(double db)
{
volslider->setValue(db * SCALAR);
handleValueChanged();
}
void VolumeFader::setVolumePower(double power)
{
double db = 20 * log10(power);
setVolumeDb(db);
handleValueChanged();
}
void VolumeFader::handleValueChanged()
{
double db = ((double)volslider->value()) / ((double)SCALAR);
double power = pow(10, db / 20);
emit volumeChangedDb(db);
emit volumeChangedPower(power);
volume->setText(tr("Gain %1 dB").arg(QString::number(volslider->value() /
SCALAR)));
}
dgedit-0.10.0/src/canvastoollisten.cc 0000644 0000764 0000764 00000004566 13253514021 014456 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastoollisten.cc
*
* Fri Jul 29 16:57:48 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "canvastoollisten.h"
#include
CanvasToolListen::CanvasToolListen(Canvas* c, Player& p)
: player(p)
{
lastpos = pos = 0;
canvas = c ;
}
bool CanvasToolListen::mousePressEvent(QMouseEvent* event)
{
if(!isActive())
{
return false;
}
player.setPosition(canvas->unmapX(event->x()));
canvas->update();
connect(&player, SIGNAL(positionUpdate(size_t)), this, SLOT(update(size_t)));
return true;
}
bool CanvasToolListen::mouseReleaseEvent(QMouseEvent* event)
{
if(!isActive())
{
return false;
}
player.stop();
disconnect(&player, SIGNAL(positionUpdate(size_t)),
this, SLOT(update(size_t)));
lastpos = 0;
canvas->update();
return true;
}
void CanvasToolListen::paintEvent(QPaintEvent* event, QPainter& painter)
{
if(!isActive())
{
return;
}
if(player.pos < player.end)
{
painter.setPen(QColor(0, 127, 127));
painter.drawLine(canvas->mapX(pos),
event->rect().y(),
canvas->mapX(pos),
event->rect().y() + event->rect().height());
}
}
void CanvasToolListen::update(size_t pos)
{
this->pos = pos;
size_t last = canvas->mapX(lastpos);
size_t x = canvas->mapX(player.pos);
QRect r(last, 0,
x - last + 2, canvas->height());
canvas->update(r);
lastpos = pos;
}
dgedit-0.10.0/src/canvastool.cc 0000644 0000764 0000764 00000003362 13253530344 013236 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastool.cc
*
* Thu Jul 28 23:01:36 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "canvastool.h"
#include
bool CanvasTool::mouseMoveEvent(QMouseEvent*)
{
return false;
}
bool CanvasTool::mousePressEvent(QMouseEvent*)
{
return false;
}
bool CanvasTool::mouseReleaseEvent(QMouseEvent*)
{
return false;
}
void CanvasTool::resizeEvent(QResizeEvent*)
{
}
void CanvasTool::paintEvent(QPaintEvent*, QPainter&)
{
}
void CanvasTool::keyReleaseEvent(QKeyEvent*)
{
}
void CanvasTool::setActive(bool active)
{
_active = active;
emit activateChanged(active);
}
void CanvasTool::activate()
{
setActive(true);
}
void CanvasTool::disactivate()
{
setActive(false);
}
bool CanvasTool::isActive()
{
return _active;
}
dgedit-0.10.0/src/renderdialog.h 0000644 0000764 0000764 00000003624 13414430366 013371 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* renderdialog.h
*
* Thu Sep 20 17:32:11 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include "projectrenderer.h"
class Project;
class RenderDataModel;
class ProgressDelegate;
class RenderDialog
: public QDialog
{
Q_OBJECT
public:
RenderDialog(QWidget* parent, Project& project);
private slots:
void render();
void progressStart(int total);
void progressTask(QString text);
void progressRenderStart(int tasktotal);
void progressRenderTask(int subtask);
void progressRenderFinished(int success);
void progressFinished(int success);
void chooseExportPath();
void exportPathChanged(const QString&);
private:
Project& project;
ProjectRenderer renderer;
QLineEdit* export_path;
QPushButton* export_btn;
QProgressBar* bar;
QTreeView* tasks;
RenderDataModel* model;
ProgressDelegate* delegate;
};
dgedit-0.10.0/src/audioextractor.h 0000644 0000764 0000764 00000003056 13414430366 013766 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* audioextractor.h
*
* Sat Nov 21 13:09:35 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
#include
#include "selection.h"
#include "samplesorter.h"
class Instrument;
class AudioExtractor
: public QObject
{
Q_OBJECT
public:
AudioExtractor(Instrument& instrument, QObject* parent);
public slots:
bool exportSelections();
signals:
void progressUpdate(int value);
void setMaximumProgress(int value);
private:
Instrument& instrument;
};
dgedit-0.10.0/src/itemeditor.cc 0000644 0000764 0000764 00000002463 13253514760 013237 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* itemeditor.cc
*
* Tue Dec 1 11:01:40 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "itemeditor.h"
ItemEditor::ItemEditor(QListWidgetItem* i, QString v)
{
this->i = i;
setText(v);
show();
}
void ItemEditor::focusOutEvent(QFocusEvent*)
{
emit updateItem(i, text());
close();
}
dgedit-0.10.0/src/player.cc 0000644 0000764 0000764 00000010102 13353450222 012344 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* player.cc
*
* Tue Apr 15 10:34:18 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "player.h"
#include
#define BUFSZ 512
Player::Player()
{
peak = 0;
pos = 0;
gain_scalar = 1.0;
pcm_data = NULL;
pcm_size = 0;
end = 0;
new_selection = false;
connect(&report_timer, SIGNAL(timeout()), this, SLOT(reportTimeout()));
report_timer.start(50); // Update 25 times per second
start();
}
Player::~Player()
{
running = false; // Signal player thread to stop
wait(); // Wait for player thread to stop.
}
#define _MIN(a, b) (a (sel.to - sel.fadeout))
{
// Apply linear fade-out
double fp = (double)(((int)sel.to - (int)sel.fadeout) - (int)p);
fade = 1 + (fp / (double)sel.fadeout);
}
sample = pcm_data[p] * fade * gain_scalar;
}
if(fabs(sample) > peak)
{
peak = fabs(sample);
}
s[i] = _MIN(sample * SHRT_MAX, SHRT_MAX);
}
ao_play(dev, (char*)s, BUFSZ * sizeof(short));
pos += BUFSZ;
}
ao_close(dev);
--init;
if(init == 0)
{
ao_shutdown();
}
}
bool Player::playSelectionDone()
{
return pos >= sel_end || pos >= selection.to;
}
void Player::playSelection(Selection s, int len)
{
{
// Enqueue new Selection for player consumation
QMutexLocker lock(&mutex);
selection = s;
if(len > 0)
{
sel_end = len;
}
else
{
sel_end = selection.to - selection.from;
}
sel_end += selection.from;
new_selection = true;
}
// Wait until player actually consumed the new Selection.
while(new_selection)
{
msleep(1);
}
}
void Player::setGainScalar(double g)
{
gain_scalar = g;
}
void Player::setGainDB(double gain_db)
{
setGainScalar(pow(10, gain_db/ 20.0));
}
void Player::reportTimeout()
{
emit peakUpdate(peak);
emit peakUpdateDB(20 * log10(peak));
peak = 0.0;
emit positionUpdate(pos);
peak = 0.0;
}
void Player::setPcmData(float* data, size_t size, double samplerate)
{
pcm_data = data;
pcm_size = size;
pcm_samplerate = samplerate;
}
void Player::setPosition(size_t position)
{
Selection s;
s.from = position;
s.to = pcm_size;
s.fadein = 0;
s.fadeout = 0;
playSelection(s);
}
void Player::stop()
{
Selection s;
s.from = 0;
s.to = 0;
s.fadein = 0;
s.fadeout = 0;
playSelection(s, pos);
}
dgedit-0.10.0/src/localehandler.h 0000644 0000764 0000764 00000002410 13273305065 013517 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* localehandler.h
*
* Sat May 5 12:39:49 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class QApplication;
class LocaleHandler
{
public:
LocaleHandler(QApplication& app);
private:
QTranslator translator;
};
dgedit-0.10.0/src/settings.h 0000644 0000764 0000764 00000002710 13325573607 012574 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* settings.h
*
* Sat May 5 11:57:00 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
class Settings
{
public:
Settings();
~Settings();
void loadGeometry(QByteArray &state, QByteArray &geometry) const;
void saveGeometry(const QByteArray &state, const QByteArray &geometry);
QString loadExportPath() const;
void saveExportPath(const QString& export_path);
private:
};
dgedit-0.10.0/src/projectdialog.h 0000644 0000764 0000764 00000002773 13356154465 013574 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectdialog.h
*
* Sat May 5 14:54:18 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
class QLineEdit;
class QTextEdit;
class Project;
class ProjectDialog
: public QDialog
{
Q_OBJECT
public:
ProjectDialog(QWidget* parent, Project& project);
~ProjectDialog() = default;
private slots:
void chooseRawFilesDir();
void apply();
private:
QLineEdit* name{nullptr};
QLineEdit* raw_dir{nullptr};
QTextEdit* description{nullptr};
Project& project;
};
dgedit-0.10.0/src/dgedit.cc 0000644 0000764 0000764 00000002757 13356154465 012346 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* editor.cc
*
* Tue Nov 10 08:37:43 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include
#include "mainwindow.h"
#include "settings.h"
#include "localehandler.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
LocaleHandler locale(app);
Settings settings;
MainWindow mainwindow(settings);
mainwindow.show();
if(argc > 1)
{
QFile file(argv[1]);
if(file.exists())
{
mainwindow.loadProject(argv[1]);
}
}
return app.exec();
}
dgedit-0.10.0/src/instrumentdialog.h 0000644 0000764 0000764 00000002655 13325573607 014334 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* instrumentdialog.h
*
* Wed May 23 17:35:09 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
class Instrument;
class InstrumentDialog
: public QDialog
{
Q_OBJECT
public:
InstrumentDialog(QWidget* parent, Instrument& instrument);
~InstrumentDialog() = default;
private slots:
void apply();
private:
QLineEdit* name{nullptr};
Instrument& instrument;
};
dgedit-0.10.0/src/canvastoolthreshold.h 0000644 0000764 0000764 00000003457 13325573607 015033 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* canvastoolthreshold.h
*
* Fri Jul 29 16:27:00 CEST 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include "canvastool.h"
#include
#include "canvas.h"
class Instrument;
class CanvasToolThreshold
: public CanvasTool
{
Q_OBJECT
public:
CanvasToolThreshold(Canvas* canvas, Instrument& instrument);
QString name() { return tr("Threshold"); }
bool mouseMoveEvent(QMouseEvent* event);
bool mousePressEvent(QMouseEvent* event);
bool mouseReleaseEvent(QMouseEvent* event);
void paintEvent(QPaintEvent* event, QPainter& painter);
signals:
void thresholdChanged(double threshold);
void thresholdChanging(double threshold);
private:
float threshold;
bool threshold_is_moving;
Canvas* canvas;
QColor colThreshold;
QColor colThresholdMoving;
Instrument& instrument;
};
dgedit-0.10.0/src/aboutdialog.h 0000644 0000764 0000764 00000003042 13356154464 013225 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* aboutdialog.h
*
* Sat Oct 6 14:29:56 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include
class AboutDialog
: public QDialog
{
Q_OBJECT
public:
AboutDialog(QWidget *parent, Qt::WindowFlags f);
public slots:
void scroll();
void noMoreScroll();
void checkTab(int tabIndex);
signals:
private:
void mousePressEvent(QMouseEvent * event);
QScrollArea *licenseScroll;
QTimer *scrollTimer;
int scrollState;
QTabWidget *tabs;
};
dgedit-0.10.0/src/selection.cc 0000644 0000764 0000764 00000004764 13325573607 013072 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* selection.cc
*
* Mon Apr 14 10:13:21 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "selection.h"
Selections::Selections()
: QObject(NULL)
{
nextid = 0;
act = SEL_NONE;
}
Selections::Selections(const Selections& other)
{
*this = other;
}
void Selections::operator=(const Selections& other)
{
sels = other.sels;
nextid = other.nextid;
act = other.act;
}
sel_id_t Selections::add(Selection selection)
{
sel_id_t id = nextid++;
sels[id] = selection;
added(id);
return id;
}
Selection Selections::get(sel_id_t id)
{
if(sels.find(id) == sels.end())
{
Selection s(0,0,0,0);
return s;
}
return sels[id];
}
QVector Selections::ids()
{
QVector v;
QMap::iterator i = sels.begin();
while(i != sels.end())
{
v.push_back(i.key());
i++;
}
return v;
}
void Selections::update(sel_id_t id, Selection selection)
{
if(sels.find(id) != sels.end())
{
sels[id] = selection;
emit updated(id);
}
}
void Selections::remove(sel_id_t id)
{
if(sels.find(id) != sels.end())
{
sels.erase(sels.find(id));
if(id == act)
{
setActive(SEL_NONE);
}
emit removed(id);
}
}
void Selections::clear()
{
QVector _ids = ids();
QVector::iterator i = _ids.begin();
while(i != _ids.end())
{
remove(*i);
i++;
}
}
void Selections::setActive(sel_id_t id)
{
if(sels.find(id) != sels.end())
{
act = id;
}
else
{
act = SEL_NONE;
}
emit activeChanged(act);
}
sel_id_t Selections::active()
{
return act;
}
dgedit-0.10.0/src/selectioneditor.cc 0000644 0000764 0000764 00000005775 13325573607 014304 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* selectioneditor.cc
*
* Thu Apr 17 17:25:18 CEST 2014
* Copyright 2014 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "selectioneditor.h"
#include "project.h"
#include
#include
#include
static QLineEdit *createWidget(QString name, QWidget* parent)
{
QHBoxLayout* l = new QHBoxLayout();
l->addWidget(new QLabel(name));
QLineEdit* edt = new QLineEdit();
QObject::connect(edt, SIGNAL(editingFinished()),
parent, SLOT(updateSelection()));
l->addWidget(edt);
((QHBoxLayout*)parent->layout())->addLayout(l);
return edt;
}
SelectionEditor::SelectionEditor(Selections &s, Instrument& instrument)
: selections(s)
, instrument(instrument)
{
cur = SEL_NONE;
setLayout(new QVBoxLayout());
from = createWidget(tr("From:"), this);
to = createWidget(tr("To:"), this);
fadein = createWidget(tr("FadeIn:"), this);
fadeout = createWidget(tr("FadeOut:"), this);
energy = createWidget(tr("Energy:"), this);
name = createWidget(tr("Name:"), this);
((QHBoxLayout*)layout())->addStretch();
}
void SelectionEditor::updateSelection()
{
Selection sel;
sel.from = from->text().toInt();
sel.to = to->text().toInt();
sel.fadein = fadein->text().toInt();
sel.fadeout = fadeout->text().toInt();
sel.energy = energy->text().toDouble();
sel.name = name->text();
selections.update(cur, sel);
instrument.setSelections(selections);
}
void SelectionEditor::update()
{
Selection sel = selections.get(cur);
from->setText(QString::number(sel.from));
to->setText(QString::number(sel.to));
fadein->setText(QString::number(sel.fadein));
fadeout->setText(QString::number(sel.fadeout));
energy->setText(QString::number(sel.energy));
name->setText(sel.name);
}
void SelectionEditor::added(sel_id_t id)
{
// Nothing to do here...
}
void SelectionEditor::updated(sel_id_t id)
{
if(cur == id)
{
update();
}
}
void SelectionEditor::removed(sel_id_t id)
{
if(cur == id)
{
cur = SEL_NONE;
update();
}
}
void SelectionEditor::activeChanged(sel_id_t id)
{
cur = id;
update();
}
dgedit-0.10.0/src/projectdialog.cc 0000644 0000764 0000764 00000006540 13356154465 013726 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* projectdialog.cc
*
* Sat May 5 14:54:18 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "projectdialog.h"
#include
#include
#include
#include
#include
#include
#include
#include "project.h"
ProjectDialog::ProjectDialog(QWidget* parent, Project& project)
: QDialog(parent)
, project(project)
{
setWindowModality(Qt::ApplicationModal);
setWindowTitle(tr("Project Dialog"));
setMinimumWidth(300);
auto layout = new QGridLayout();
setLayout(layout);
int idx = 0;
name = new QLineEdit();
name->setText(project.getProjectName());
layout->addWidget(new QLabel(tr("Name of the project:")), idx, 0, 1, 2);
idx++;
layout->addWidget(name, idx, 0, 1, 2);
idx++;
raw_dir = new QLineEdit();
raw_dir->setText(project.getRawFileRoot());
auto btn = new QPushButton(tr("..."));
btn->setMaximumWidth(32);
connect(btn, SIGNAL(clicked()), this, SLOT(chooseRawFilesDir()));
layout->addWidget(new QLabel(tr("Base path of raw files:")), idx, 0, 1, 2);
idx++;
layout->addWidget(raw_dir, idx, 0);
layout->addWidget(btn, idx, 1);
idx++;
description = new QTextEdit();
description->setText(project.getProjectDescription());
layout->addWidget(new QLabel(tr("Description of the project:")), idx, 0, 1, 2);
idx++;
layout->addWidget(description, idx, 0, 1, 2);
idx++;
auto buttons =
new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel |
QDialogButtonBox::Apply);
connect(buttons, SIGNAL(accepted()), this, SLOT(apply()));
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
this, SLOT(apply()));
layout->addWidget(buttons, idx, 0, 1, 2);
}
void ProjectDialog::chooseRawFilesDir()
{
QString path =
QFileDialog::getExistingDirectory(
this, tr("Choose base directory with the raw sample files."),
raw_dir->text(), QFileDialog::ShowDirsOnly);
if(path != "")
{
raw_dir->setText(path);
}
}
void ProjectDialog::apply()
{
// Only send out one update signal
Project::RAIIBulkUpdate bulkUpdate(project);
project.setProjectName(name->text());
project.setRawFileRoot(raw_dir->text());
project.setProjectDescription(description->toPlainText());
}
dgedit-0.10.0/src/instrumentdialog.cc 0000644 0000764 0000764 00000004674 13325573607 014475 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* instrumentdialog.cc
*
* Wed May 23 17:35:09 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "instrumentdialog.h"
#include
#include
#include
#include
#include
#include
#include "project.h"
InstrumentDialog::InstrumentDialog(QWidget* parent, Instrument& instrument)
: QDialog(parent)
, instrument(instrument)
{
setWindowModality(Qt::ApplicationModal);
setWindowTitle(tr("Instrument Dialog"));
setMinimumWidth(300);
auto layout = new QGridLayout();
setLayout(layout);
int idx = 0;
name = new QLineEdit();
name->setText(instrument.getInstrumentName());
layout->addWidget(new QLabel(tr("Name of the instrument:")), idx, 0, 1, 2);
idx++;
layout->addWidget(name, idx, 0);
idx++;
auto buttons =
new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel |
QDialogButtonBox::Apply);
connect(buttons, SIGNAL(accepted()), this, SLOT(apply()));
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
this, SLOT(apply()));
layout->addWidget(buttons, idx, 0, 1, 2);
}
void InstrumentDialog::apply()
{
// Only send out one update signal
Project::RAIIBulkUpdate bulkUpdate(instrument.getProject());
instrument.setInstrumentName(name->text());
}
dgedit-0.10.0/src/filelist.cc 0000644 0000764 0000764 00000034156 13356154465 012717 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* filelist.cc
*
* Mon Nov 30 15:35:52 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "filelist.h"
#include
#include
#include
#include
#include "itemeditor.h"
#include "project.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
class ChannelMapDeligate
: public QStyledItemDelegate
{
public:
ChannelMapDeligate(Instrument& instrument)
: instrument(instrument)
{
}
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override
{
// Main channel:
if(index.column() == 2)
{
auto w = new QCheckBox(parent);
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
auto& audiofile = instrument.getAudioFile(*audiofile_id);
connect(w, &QCheckBox::stateChanged,
[&audiofile](int state)
{
audiofile.setMainChannel(state == Qt::Checked);
});
return w;
}
// Name:
if(index.column() == 3)
{
auto w = new QLineEdit(parent);
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
auto& audiofile = instrument.getAudioFile(*audiofile_id);
connect(w, &QLineEdit::textEdited,
[&audiofile](const QString& name)
{
audiofile.setName(name);
});
return w;
}
// Channel Map ID:
if(index.column() == 4)
{
auto w = new QComboBox(parent);
w->addItem(tr(""), -1);
auto channel_ids = instrument.getProject().getChannelList();
for(auto channel_id : channel_ids)
{
const auto& channel = instrument.getProject().getChannel(channel_id);
w->addItem(channel.getChannelName(), channel.getId());
}
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
auto& audiofile = instrument.getAudioFile(*audiofile_id);
connect(w,
// This wierd line points the compiler to the correct overloaded
// version of QComboBox::currentIndexChanged
// ie. chooses the (int) version over the (const QString&) version
QOverload::of(&QComboBox::currentIndexChanged),
[w, &audiofile](int idx)
{
audiofile.setChannelMapId(w->itemData(idx).toInt());
});
return w;
}
return QStyledItemDelegate::createEditor(parent, option, index);
}
void setEditorData(QWidget *editor, const QModelIndex &index) const override
{
// Main channel:
if(index.column() == 2)
{
auto w = static_cast(editor);
auto b = index.data(Qt::EditRole).toBool();
w->setCheckState(b ? Qt::Checked : Qt::Unchecked);
}
// Name:
if(index.column() == 3)
{
auto w = static_cast(editor);
auto s = index.data(Qt::EditRole).toString();
w->setText(s);
}
// Channel Map ID:
if(index.column() == 4)
{
auto w = static_cast(editor);
auto i = w->findData(index.data(Qt::EditRole).toInt());
w->setCurrentIndex(i);
}
}
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override
{
// Main channel:
if(index.column() == 2)
{
model->setData(index,
static_cast(editor)->checkState() == Qt::Checked,
Qt::EditRole);
}
// Name:
if(index.column() == 3)
{
model->setData(index, static_cast(editor)->text(),
Qt::EditRole);
}
// Channel Map ID:
if(index.column() == 4)
{
model->setData(index, static_cast(editor)->currentData(),
Qt::EditRole);
}
}
void paint(QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index) const override
{
if(index.column() == 2) // Main Channel
{
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
const auto& audiofile = instrument.getAudioFile(*audiofile_id);
bool checked = audiofile.getMainChannel();
QStyleOptionButton butOpt;
butOpt.state = QStyle::State_Enabled;
butOpt.state |= checked ? QStyle::State_On : QStyle::State_Off;
butOpt.rect = option.rect;
QApplication::style()->drawControl( QStyle::CE_CheckBox,
&butOpt, painter );
}
else
{
QStyledItemDelegate::paint(painter, option, index);
}
}
private:
Instrument& instrument;
};
class FileDataModel
: public QAbstractItemModel
{
public:
FileDataModel(Instrument& instrument)
: instrument(instrument)
{
}
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override
{
if(!hasIndex(row, column, parent))
{
return QModelIndex();
}
auto audiofile_ids = instrument.getAudioFileList();
if(!parent.isValid())
{
if(row < audiofile_ids.size())
{
return createIndex(row, column, &instrument);
}
else
{
return QModelIndex(); // row is out of bounds.
}
}
return QModelIndex();
}
QModelIndex parent(const QModelIndex &index) const override
{
return QModelIndex(); // no parent
}
int rowCount(const QModelIndex &parent = QModelIndex()) const override
{
if(parent.column() > 0) // only return row count on first column
{
return 0;
}
if(!parent.isValid())
{
auto audiofile_ids = instrument.getAudioFileList();
return audiofile_ids.size(); // root level
}
return 0; // no children
}
int columnCount(const QModelIndex &parent = QModelIndex()) const override
{
return 5;
}
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
{
if(!index.isValid())
{
return QVariant();
}
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
const auto& audiofile = instrument.getAudioFile(*audiofile_id);
if(role == Qt::DecorationRole )
{
if(index.column() == 0)
{
if(audiofile.getAbsoluteFile() == instrument.getMasterFile())
{
return QPixmap(":/icons/master.png");
}
else
{
return QPixmap(":/icons/file.png");
}
}
}
if(role == Qt::DisplayRole)
{
switch(index.column())
{
case 0: return QVariant(); // Master
case 1: return audiofile.getFile();
case 2: return audiofile.getMainChannel() ? "x" : " ";
case 3: return audiofile.getName();
case 4:
{
auto channelMapId = audiofile.getChannelMapId();
if(channelMapId == -1)
{
return tr("");
}
return instrument.getProject().getChannel(channelMapId).getChannelName();
}
default: return QVariant();
}
}
else if(role == Qt::EditRole)
{
switch(index.column())
{
case 0: return QVariant(); // Master
case 1: return audiofile.getFile();
case 2: return audiofile.getMainChannel();
case 3: return audiofile.getName();
case 4: return audiofile.getChannelMapId();
default: return QVariant();
}
}
else
{
return QVariant();
}
}
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
{
if(orientation == Qt::Horizontal && role == Qt::DisplayRole)
{
switch(section)
{
case 0: return tr("M");
case 1: return tr("Filename");
case 2: return tr("m");
case 3: return tr("Name");
case 4: return tr("Kit Channel");
default: return QVariant();
}
}
return QVariant();
}
Qt::ItemFlags flags(const QModelIndex &index) const override
{
if(!index.isValid())
{
return 0;
}
switch(index.column())
{
case 0: // Master
return QAbstractItemModel::flags(index);
case 1: // File
return QAbstractItemModel::flags(index);
case 2: // Main channel
return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
case 3: // Name
return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
case 4: // Channel map id
return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
}
}
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole) override
{
auto audiofile_ids = instrument.getAudioFileList();
if(index.row() > audiofile_ids.size() ||
index.column() > (columnCount() - 1))
{
return false;
}
auto audiofile_id = audiofile_ids.begin() + index.row();
auto& audiofile = instrument.getAudioFile(*audiofile_id);
switch(index.column())
{
case 0: // Master
break;
case 1: // File
break;
case 2: // Main Channel
audiofile.setMainChannel(value.toBool());
break;
case 3: // Name
audiofile.setName(value.toString());
break;
case 4: // Channel map id
audiofile.setChannelMapId(value.toInt());
break;
default: break;
}
return true;
}
void refresh()
{
beginResetModel();
endResetModel();
}
private:
Instrument& instrument;
};
FileList::FileList(Instrument& instrument)
: instrument(instrument)
{
model = new FileDataModel(instrument);
setModel(model);
setItemDelegate(new ChannelMapDeligate(instrument));
setEditTriggers(QAbstractItemView::AllEditTriggers); // show list on click
setContextMenuPolicy(Qt::CustomContextMenu); // enable context menu
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(onCustomContextMenu(const QPoint &)));
setRootIsDecorated(false);
header()->resizeSection(0, 24);
header()->resizeSection(2, 24);
connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
this, SLOT(selectionChanged(const QModelIndex&)));
createMenus();
}
static double getSamplerate(const QString& file)
{
SF_INFO sf_info;
SNDFILE *fh = sf_open(file.toStdString().c_str(), SFM_READ, &sf_info);
if(!fh)
{
return -1.0;
}
return sf_info.samplerate;
}
void FileList::addFiles()
{
auto root = instrument.getProject().getRawFileRoot();
if(path.isEmpty())
{
path = root;
}
QStringList files =
QFileDialog::getOpenFileNames(this, tr("Open file"),
path, tr("Audio Files (*.wav)"));
QStringList::Iterator i = files.begin();
while(i != files.end())
{
QString file = *i;
QFileInfo fi(file);
QString name = fi.baseName();
path = fi.absolutePath();
double samplerate = getSamplerate(file);
if(samplerate == -1.0)
{
// Error reading file. Skip it.
std::cout << "Error reading file. Skip it.\n";
++i;
continue;
}
if(instrument.getProject().getProjectSamplerate() == -1.0)
{
// Samplerate not yet set
instrument.getProject().setProjectSamplerate(samplerate);
}
if(instrument.getProject().getProjectSamplerate() != samplerate)
{
// Samplerate of file differs from the projeft samplerate
std::cout << "Samplerate of file differs from the project samplerate:\n";
std::cout << " project: " << instrument.getProject().getProjectSamplerate() << std::endl;
std::cout << " file: " << samplerate << std::endl;
}
if(root == file.left(root.length()))
{
file = file.mid(root.length() + 1);
}
auto id = instrument.createAudioFile();
auto& audiofile = instrument.getAudioFile(id);
audiofile.setName(name);
audiofile.setFile(file);
audiofile.setChannelMapId(-1);
audiofile.setMainChannel(false);
i++;
}
model->refresh();
}
void FileList::selectionChanged(const QModelIndex &index)
{
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + index.row();
const auto& audiofile = instrument.getAudioFile(*audiofile_id);
instrument.setMasterFile(audiofile.getFile());
emit masterFileChanged(audiofile.getAbsoluteFile());
//setMasterFile(i);
model->refresh();
}
void FileList::createMenus()
{
menu = new QMenu();
setMasterAction = new QAction(tr("Set as Master (dbl-click)"), this);
connect(setMasterAction, SIGNAL(triggered()), this, SLOT(setMaster()));
removeAction = new QAction(tr("Remove"), this);
connect(removeAction, SIGNAL(triggered()), this, SLOT(removeFile()));
removeAllAction = new QAction(tr("Remove all"), this);
connect(removeAllAction, SIGNAL(triggered()), this, SLOT(removeAllFiles()));
menu->addAction(setMasterAction);
menu->addAction(removeAction);
menu->addSeparator();
menu->addAction(removeAllAction);
}
void FileList::onCustomContextMenu(const QPoint &point)
{
QModelIndex index = indexAt(point);
if(index.isValid())
{
menu->popup(viewport()->mapToGlobal(point));
}
}
void FileList::setMaster()
{
// setMasterFile(activeItem);
}
void FileList::removeFile()
{
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + currentIndex().row();
auto& audiofile = instrument.getAudioFile(*audiofile_id);
if(instrument.getMasterFile() == audiofile.getAbsoluteFile())
{
emit masterFileChanged(""); // Clear canvas
}
instrument.deleteAudioFile(*audiofile_id);
//emit fileRemoved(file, name);
}
void FileList::removeAllFiles()
{
instrument.setMasterFile("");
auto audiofile_ids = instrument.getAudioFileList();
for(auto audiofile_id : audiofile_ids)
{
instrument.deleteAudioFile(audiofile_id);
}
reset();
emit masterFileChanged(""); // Clear canvas
emit allFilesRemoved();
}
dgedit-0.10.0/src/project.h 0000644 0000764 0000764 00000011715 13356154465 012410 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* project.h
*
* Sun May 6 11:38:11 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
#include "audioextractor.h"
#include "selection.h"
class Project;
class Instrument;
class AudioFile
{
public:
AudioFile(Instrument& instrument, int id);
int getId() const;
QString getFile() const;
void setFile(const QString& file);
QString getAbsoluteFile() const;
QString getName() const;
void setName(const QString& name);
int getChannelMapId() const;
void setChannelMapId(int id);
bool getMainChannel() const;
void setMainChannel(bool main);
private:
friend class ProjectSerialiser;
QString file;
QString name;
int channel_map_id;
bool main_channel;
int id;
Instrument& instrument;
};
class Instrument
{
public:
Instrument(Project& project, int id);
int getId() const;
QString getInstrumentName() const;
void setInstrumentName(const QString& instrument_name);
QString getMasterFile() const;
void setMasterFile(const QString& master_file);
AudioFile& getAudioFile(int id);
int createAudioFile();
void deleteAudioFile(int id);
QList getAudioFileList() const;
std::size_t getAttackLength() const;
void setAttackLength(std::size_t attack_length);
std::size_t getPowerSpread() const;
void setPowerSpread(std::size_t power_spread);
std::size_t getMinimumSize() const;
void setMinimumSize(std::size_t minimum_size);
std::size_t getFalloff() const;
void setFalloff(std::size_t falloff);
std::size_t getFadeLength() const;
void setFadeLength(std::size_t fade_length);
float getThreshold() const;
void setThreshold(float threshold);
Selections getSelections() const;
void setSelections(const Selections& selectios);
QString getPrefix() const;
void setPrefix(const QString& prefix);
Project& getProject();
private:
friend class ProjectSerialiser;
int id;
QString instrument_name;
// Files tab
QString master_file;
std::list audio_files;
// Generate tab
std::size_t attack_length{300};
std::size_t power_spread{1000};
std::size_t minimum_size{100};
std::size_t falloff{300};
std::size_t fade_length{666};
// Canvas
float threshold{0.5f};
// Edit tab
Selections selections;
// Export tab
QString prefix;
Project& project;
};
class Channel
{
public:
Channel(Project& project, int id);
int getId() const;
QString getChannelName() const;
void setChannelName(const QString& channel_name);
Project& getProject();
private:
friend class ProjectSerialiser;
int id;
QString channel_name;
Project& project;
};
class Project
: public QObject
{
Q_OBJECT
public:
void bulkUpdateBegin();
void bulkUpdateEnd();
class RAIIBulkUpdate
{
public:
RAIIBulkUpdate(Project& project)
: project(project)
{
project.bulkUpdateBegin();
}
~RAIIBulkUpdate()
{
project.bulkUpdateEnd();
}
private:
Project& project;
};
QString getProjectFile() const;
void setProjectFile(const QString& project_file);
QString getProjectName() const;
void setProjectName(const QString& project_name);
QString getRawFileRoot() const;
void setRawFileRoot(const QString& raw_file_root);
QString getExportPath() const;
void setExportPath(const QString& prefix);
QString getProjectDescription() const;
void setProjectDescription(const QString& description);
double getProjectSamplerate() const;
void setProjectSamplerate(double samplerate);
Instrument& getInstrument(int id);
int createInstrument();
void deleteInstrument(int id);
QList getInstrumentList() const;
Channel& getChannel(int id);
int createChannel();
void deleteChannel(int id);
QList getChannelList() const;
void reset();
signals:
void projectChanged();
private:
friend class ProjectSerialiser;
friend class Instrument;
QString project_file;
QString project_name;
QString raw_file_root;
QString export_path;
QString description;
double samplerate{-1.0};
std::list instruments;
std::list channels;
int next_id{0};
int update_count{0};
};
dgedit-0.10.0/src/selection.h 0000644 0000764 0000764 00000005675 13352453373 012733 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* selection.h
*
* Sat Nov 21 13:20:46 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include
class Selection
{
public:
Selection(int from = 0, int to = 0, int fadein = 0, int fadeout = 0)
{
this->from = from;
this->to = to;
this->fadein = fadein;
this->fadeout = fadeout;
}
size_t from;
size_t to;
size_t fadein;
size_t fadeout;
double energy;
QString name;
};
typedef int sel_id_t;
#define SEL_NONE -1
class Selections
: public QObject
{
Q_OBJECT
public:
Selections();
Selections(const Selections&);
void operator=(const Selections& other);
//! Add a new selection object. The new id is returned.
//! Adding a new selections will emit an added signal with the new id.
sel_id_t add(Selection selection);
//! Get a stack copy of a specific selection object, by id.
//! NOTE: If id does not exist an empty selection (from = to = 0) is
//! returned.
Selection get(sel_id_t id);
//! Return vector (unsorted) of all ids in the object.
QVector ids();
//! Set active selection (to be rendered yellow)
void setActive(sel_id_t id);
//! Get active selection id.
sel_id_t active();
public slots:
//! Update a selection by id.
//! Updating a selection will emit a updated signal.
void update(sel_id_t id, Selection selection);
//! Delete a selection by id.
//! Deleting a selection will emit a deleted signal.
void remove(sel_id_t id);
//! Delete all selections
void clear();
signals:
//! This signal is emitted when a new selection has been added.
void added(sel_id_t id);
//! This signal is emitted when an existing selection has been updated.
void updated(sel_id_t id);
//! This signal is emitted when a selection has been removed.
void removed(sel_id_t id);
//! The active selection changed.
void activeChanged(sel_id_t id);
private:
friend class ProjectSerialiser;
QMap sels;
sel_id_t nextid;
sel_id_t act;
};
dgedit-0.10.0/src/settings.cc 0000644 0000764 0000764 00000004120 13325573607 012727 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* settings.cc
*
* Sat May 5 11:57:00 CEST 2018
* Copyright 2018 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "settings.h"
#include
Settings::Settings()
{
}
Settings::~Settings()
{
}
void Settings::loadGeometry(QByteArray &state, QByteArray &geometry) const
{
QSettings settings;
settings.beginGroup("MainWindow");
state = settings.value("state").toByteArray();
geometry = settings.value("geometry").toByteArray();
settings.endGroup();
}
void Settings::saveGeometry(const QByteArray &state, const QByteArray &geometry)
{
QSettings settings;
settings.beginGroup("MainWindow");
settings.setValue("state", state);
settings.setValue("geometry", geometry);
settings.endGroup();
}
QString Settings::loadExportPath() const
{
QSettings settings;
settings.beginGroup("MainWindow");
QString export_path = settings.value("exportpath", "").toString();
settings.endGroup();
return export_path;
}
void Settings::saveExportPath(const QString& export_path)
{
QSettings settings;
settings.beginGroup("MainWindow");
settings.setValue("exportpath", export_path);
settings.endGroup();
}
dgedit-0.10.0/src/mainwindow.h 0000644 0000764 0000764 00000005046 13356154465 013116 0000000 0000000 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
* mainwindow.h
*
* Tue Nov 10 10:21:03 CET 2009
* Copyright 2009 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
/*
* This file is part of DrumGizmo.
*
* DrumGizmo is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DrumGizmo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#pragma once
#include
#include
#include