Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
2194613
extremly basic slicer, note playback and gui works
DanielKauss Sep 3, 2023
5941766
very simple peak detection working
DanielKauss Sep 3, 2023
4f91187
basic phase vocoder implementation, no effects yet
DanielKauss Sep 6, 2023
1000e1a
phase vocoder slight rewrite
DanielKauss Sep 6, 2023
85a6e36
pitch shifting works more or less
DanielKauss Sep 6, 2023
7ca35af
basic timeshift working
DanielKauss Sep 6, 2023
89c67d9
PV timeshift working (no pitch shift)
DanielKauss Sep 7, 2023
30ff89a
basic functions work (UI, editing, playback)
DanielKauss Sep 8, 2023
330cc15
slice editor Ui working
DanielKauss Sep 8, 2023
9a2a83d
fundamental functionality done
DanielKauss Sep 8, 2023
76782c1
Everything basic works fully
DanielKauss Sep 8, 2023
126672b
cleanup and code guidelines
DanielKauss Sep 8, 2023
c040192
Merge remote-tracking branch 'origin/master'
DanielKauss Sep 8, 2023
62697af
more file cleanup
DanielKauss Sep 8, 2023
efe1a7e
Tried fixing multi slice playback (still broken)
DanielKauss Sep 9, 2023
6bda6df
remove includes, add license
DanielKauss Sep 9, 2023
d13ca1a
code factoring issues
DanielKauss Sep 9, 2023
6482c16
more code factoring
DanielKauss Sep 9, 2023
5df2b89
fixed multinote playback and bpm check
DanielKauss Sep 10, 2023
6b7e442
UI performance improvments + code style
DanielKauss Sep 10, 2023
d94046c
initial UI changes + more code style
DanielKauss Sep 10, 2023
7391d6d
threadsafe(maybe) + UI finished
DanielKauss Sep 15, 2023
c9ac279
preparing for dinamic timeshifting
DanielKauss Sep 16, 2023
1a09f5f
dynamic timeshifting start
DanielKauss Sep 17, 2023
382f73b
realtime time scaling (no stereo)
DanielKauss Sep 17, 2023
d88b870
stereo added, very slow
DanielKauss Sep 17, 2023
248fe74
playback performance improvments
DanielKauss Sep 18, 2023
b1cfb3c
Roxas new UI start
DanielKauss Sep 21, 2023
f2410fd
fixed cmake
DanielKauss Sep 21, 2023
81977f3
Waveform UI finished
DanielKauss Sep 22, 2023
5ba792b
Roxas UI knobs + layout
DanielKauss Sep 23, 2023
648d6b7
Spectral flux onset detection
DanielKauss Sep 24, 2023
4d183f2
build + PV fixes
DanielKauss Sep 29, 2023
35bb114
clang-format formatting
DanielKauss Sep 29, 2023
0077806
slice snap + better defaults
DanielKauss Sep 30, 2023
0ed6237
windows build fixes
DanielKauss Sep 30, 2023
c91e4a4
windows build fixes part 2
DanielKauss Sep 30, 2023
7f6d7fd
Fixed slice bug + Waveform code cleanup
DanielKauss Oct 1, 2023
ea75dcc
UI button text + reorder + file cleanup
DanielKauss Oct 1, 2023
dd60d69
Added knob colors
DanielKauss Oct 1, 2023
79d6f47
comments + code cleanup
DanielKauss Oct 2, 2023
2a06101
var names fit convention
DanielKauss Oct 2, 2023
c2948c0
PV better windowing
DanielKauss Oct 4, 2023
8457d96
waveform zoom
DanielKauss Oct 4, 2023
b2cd808
Minor style fixes.
consolegrl Oct 5, 2023
b7c7def
Initial artistic rebalancing of the plugin artwork.
consolegrl Oct 5, 2023
9a0bd87
PV phase ghosting fix
DanielKauss Oct 5, 2023
1080e5c
Use base note as keyboard slice start
DanielKauss Oct 5, 2023
290ef8d
Good draft of Artwork, renamed bg to artwork
consolegrl Oct 5, 2023
611884a
Removed soft glow.
consolegrl Oct 6, 2023
2d22249
Fixed load crashes + findSlices cleanup
DanielKauss Oct 7, 2023
3e0419f
Added sync button
DanielKauss Oct 7, 2023
e202dec
Merge pull request #2 from consolegrl/slicert-style
DanielKauss Oct 10, 2023
6990944
added pitch shifting, sometimes crashes
DanielKauss Oct 10, 2023
0cc28bd
pitch fixes
DanielKauss Oct 11, 2023
5a56aea
MacOs build fixes
DanielKauss Oct 11, 2023
441052c
use linear interpolation
DanielKauss Oct 11, 2023
9185d2d
copyright + div by 0 fixes
DanielKauss Oct 12, 2023
fbbe9f0
Fixed rare crash + name changes + license
DanielKauss Oct 13, 2023
ae50fd9
review: memcpy, no array, LMMS header, name change
DanielKauss Oct 13, 2023
2d55539
static constexpr added
DanielKauss Oct 13, 2023
a44c42e
static vars to public + LMMS guards
DanielKauss Oct 13, 2023
7e7d42c
remove references in classes
DanielKauss Oct 13, 2023
be19d9b
remove constexpr and parent pointer in waveform
DanielKauss Oct 13, 2023
0511e74
std::array for fft
DanielKauss Oct 13, 2023
9a9ca50
fixed wrong name in style
DanielKauss Oct 13, 2023
ef81ac5
remove c style casts
DanielKauss Oct 14, 2023
44e712d
use src_process
DanielKauss Oct 14, 2023
d74ad4a
use note vector for return
DanielKauss Oct 15, 2023
f745af6
Moved PhaseVocoder into core
DanielKauss Oct 15, 2023
efd9c61
removed PV from plugin
DanielKauss Oct 15, 2023
525d29b
remove pointers in waveform
DanielKauss Oct 15, 2023
669cdd2
clang-format again
DanielKauss Oct 15, 2023
95eee6d
Use std:: + review suggestions
DanielKauss Oct 15, 2023
eb5cfdb
More review changes
DanielKauss Oct 15, 2023
ae4df11
new signal slot + more review
DanielKauss Oct 15, 2023
34ba2dc
Fixed pitch shifting
DanielKauss Oct 18, 2023
eb11366
Fixed buffer overflow in PV
DanielKauss Oct 22, 2023
e4e680a
Fixed mouse bug + better empty screen
DanielKauss Oct 22, 2023
a3b601c
Small editor refactor + improvments
DanielKauss Oct 28, 2023
965850e
Editor playback visual + small fixes
DanielKauss Oct 28, 2023
57e90fd
Roxas UI improvments
DanielKauss Oct 29, 2023
b9e1605
initial timeshift removing
DanielKauss Nov 3, 2023
b23f2dc
Remove timeshift + slice refactor
DanielKauss Nov 4, 2023
33c08f3
Removed unused files
DanielKauss Nov 4, 2023
efde89d
Fix export bug
DanielKauss Nov 4, 2023
adb8148
Fix zoom bug
DanielKauss Nov 4, 2023
a4ab2b4
Review changes SakerTooth#2
DanielKauss Nov 5, 2023
4a2236b
Remove most comments
DanielKauss Nov 5, 2023
f44fa4d
Performance + click to load
DanielKauss Nov 5, 2023
cdf45fc
update PlaybackState + zerocross snapping
DanielKauss Nov 5, 2023
faeeaef
Fix windows build issue
DanielKauss Nov 5, 2023
24738bb
Review + version
DanielKauss Nov 8, 2023
df8b90f
Fixed fade out bug
DanielKauss Nov 8, 2023
b2e7f11
Use cosine interpolation
DanielKauss Nov 8, 2023
1f5c494
Apply suggestions from code review
DanielKauss Nov 8, 2023
d2734c9
More review changes
DanielKauss Nov 8, 2023
b4b64b1
Renamed files
DanielKauss Nov 10, 2023
1fb4618
Full sample only at base note
DanielKauss Nov 11, 2023
bf7bdc4
Fix memory leak
DanielKauss Nov 11, 2023
4894e95
Style fixes
DanielKauss Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Roxas UI improvments
  • Loading branch information
DanielKauss committed Oct 29, 2023
commit 57e90fdd883efa5ceea4347b355954ca285c7ac7
Binary file added data/themes/default/lcd_19purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/themes/default/lcd_19purple_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 40 additions & 25 deletions plugins/SlicerT/SlicerTView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@ namespace gui {
SlicerTView::SlicerTView(SlicerT* instrument, QWidget* parent)
: InstrumentViewFixedSize(instrument, parent)
, m_slicerTParent(instrument)
, m_noteThresholdKnob(this)
, m_fadeOutKnob(this)
, m_bpmBox(3, "21pink", this)
, m_bpmBox(3, "19purple", this)
, m_snapSetting(this, tr("Slice snap"))
, m_syncToggle("Sync", this, tr("SyncToggle"), LedCheckBox::LedColor::Green)
, m_resetButton(this, nullptr)
, m_midiExportButton(this, nullptr)
, m_resetButton(this)
, m_midiExportButton(this)
, m_wf(248, 128, instrument, this)
{
// window settings
Expand All @@ -76,38 +74,48 @@ SlicerTView::SlicerTView(SlicerT* instrument, QWidget* parent)
m_syncToggle.setModel(&m_slicerTParent->m_enableSync);

// bpm spin box
m_bpmBox.move(130, 203);
m_bpmBox.move(130, 201);
m_bpmBox.setToolTip(tr("Original sample BPM"));
m_bpmBox.setLabel(tr("BPM"));
/* m_bpmBox.setLabel(tr("BPM")); */
m_bpmBox.setModel(&m_slicerTParent->m_originalBPM);

// threshold knob
m_noteThresholdKnob.move(9, 195);
m_noteThresholdKnob.setToolTip(tr("Threshold used for slicing"));
m_noteThresholdKnob.setLabel(tr("Threshold"));
m_noteThresholdKnob.setModel(&m_slicerTParent->m_noteThreshold);
m_noteThresholdKnob = createStyledKnob();
m_noteThresholdKnob->move(10, 197);
m_noteThresholdKnob->setToolTip(tr("Threshold used for slicing"));
/* m_noteThresholdKnob->setLabel(tr("Threshold")); */
m_noteThresholdKnob->setModel(&m_slicerTParent->m_noteThreshold);

// fadeout knob
m_fadeOutKnob.move(75, 195);
m_fadeOutKnob.setToolTip(tr("Fade Out for notes"));
m_fadeOutKnob.setLabel(tr("Fade Out"));
m_fadeOutKnob.setModel(&m_slicerTParent->m_fadeOutFrames);
m_fadeOutKnob = createStyledKnob();
m_fadeOutKnob->move(64, 197);
m_fadeOutKnob->setToolTip(tr("Fade Out for notes"));
/* m_fadeOutKnob->setLabel(tr("Fade Out")); */
m_fadeOutKnob->setModel(&m_slicerTParent->m_fadeOutFrames);

// midi copy button
m_midiExportButton.move(215, 150);
m_midiExportButton.setActiveGraphic(PLUGIN_NAME::getIconPixmap("copyMidi"));
m_midiExportButton.setInactiveGraphic(PLUGIN_NAME::getIconPixmap("copyMidi"));
m_midiExportButton.move(199, 150);
m_midiExportButton.setIcon(PLUGIN_NAME::getIconPixmap("copyMidi"));
m_midiExportButton.setToolTip(tr("Copy midi pattern to clipboard"));
connect(&m_midiExportButton, &PixmapButton::clicked, this, &SlicerTView::exportMidi);

// slice reset button
m_resetButton.move(19, 150);
m_resetButton.setActiveGraphic(PLUGIN_NAME::getIconPixmap("resetSlices"));
m_resetButton.setInactiveGraphic(PLUGIN_NAME::getIconPixmap("resetSlices"));
m_resetButton.move(18, 150);
m_resetButton.setIcon(PLUGIN_NAME::getIconPixmap("resetSlices"));
m_resetButton.setToolTip(tr("Reset Slices"));
connect(&m_resetButton, &PixmapButton::clicked, m_slicerTParent, &SlicerT::updateSlices);
}

// style knob, defined in data/themes/default/style.css#L949
Knob* SlicerTView::createStyledKnob()
{
Knob* newKnob = new Knob(KnobType::Styled, this);
newKnob->setFixedSize(50, 40);
newKnob->setCenterPointX(24.0);
newKnob->setCenterPointY(15.0);
return newKnob;
}

// copied from piano roll
void SlicerTView::exportMidi()
{
Expand Down Expand Up @@ -177,10 +185,17 @@ void SlicerTView::paintEvent(QPaintEvent* pe)
{
QPainter brush(this);
brush.setPen(QColor(255, 255, 255));
brush.setFont(QFont(brush.font().family(), 7.5f, -1, false));
brush.drawText(212, 165, 25, 20, Qt::AlignCenter, tr("Midi"));
brush.drawText(14, 165, 30, 20, Qt::AlignCenter, tr("Reset"));
brush.drawText(185, 217, 55, 20, Qt::AlignCenter, tr("Snap"));
brush.setFont(QFont(brush.font().family(), 7, -1, false));

// top text
brush.drawText(8, topTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("Reset"));
brush.drawText(188, topTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("Midi"));

// bottom text
brush.drawText(8, bottomTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("Threshold"));
brush.drawText(63, bottomTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("Fade Out"));
brush.drawText(127, bottomTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("BPM"));
brush.drawText(188, bottomTextY, textBoxWidth, textBoxHeight, Qt::AlignCenter, tr("Snap"));
}

} // namespace gui
Expand Down
28 changes: 11 additions & 17 deletions plugins/SlicerT/SlicerTView.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@ class SlicerT;

namespace gui {

// style knob, defined in data/themes/default/style.css#L949
class SlicerTKnob : public Knob
{
public:
SlicerTKnob(QWidget* _parent)
: Knob(KnobType::Styled, _parent)
{
setFixedSize(50, 40);
setCenterPointX(24.0);
setCenterPointY(15.0);
}
};

class SlicerTView : public InstrumentViewFixedSize
{
Q_OBJECT
Expand All @@ -65,6 +52,11 @@ protected slots:
public:
SlicerTView(SlicerT* instrument, QWidget* parent);

static constexpr int textBoxHeight = 20;
static constexpr int textBoxWidth = 50;
static constexpr int topTextY = 170;
static constexpr int bottomTextY = 220;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be given an "s_" prefix and made private if possible.


protected:
virtual void dragEnterEvent(QDragEnterEvent* _dee);
virtual void dropEvent(QDropEvent* _de);
Expand All @@ -75,17 +67,19 @@ protected slots:
SlicerT* m_slicerTParent;

// lmms UI
SlicerTKnob m_noteThresholdKnob;
SlicerTKnob m_fadeOutKnob;
Knob* m_noteThresholdKnob;
Knob* m_fadeOutKnob;
LcdSpinBox m_bpmBox;
ComboBox m_snapSetting;
LedCheckBox m_syncToggle;

// buttons
PixmapButton m_resetButton;
PixmapButton m_midiExportButton;
QPushButton m_resetButton;
QPushButton m_midiExportButton;

SlicerTWaveform m_wf;

Knob* createStyledKnob();
};
} // namespace gui
} // namespace lmms
Expand Down
10 changes: 10 additions & 0 deletions plugins/SlicerT/SlicerTWaveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ void SlicerTWaveform::drawSeekerWaveform()

m_slicerTParent->m_originalSample.visualize(brush, QRect(0, 0, m_seekerWaveform.width(), m_seekerWaveform.height()),
0, m_slicerTParent->m_originalSample.frames());

// increase brightness in inner color
QBitmap innerMask = m_seekerWaveform.createMaskFromColor(s_waveformMaskColor, Qt::MaskMode::MaskOutColor);
brush.setPen(s_waveformInnerColor);
brush.drawPixmap(0, 0, innerMask);
}

void SlicerTWaveform::drawSeeker()
Expand Down Expand Up @@ -139,6 +144,11 @@ void SlicerTWaveform::drawEditorWaveform()
float zoomOffset = (m_editorHeight - m_zoomLevel * m_editorHeight) / 2;
m_slicerTParent->m_originalSample.visualize(
brush, QRect(0, zoomOffset, m_editorWidth, m_zoomLevel * m_editorHeight), startFrame, endFrame);

// increase brightness in inner color
QBitmap innerMask = m_editorWaveform.createMaskFromColor(s_waveformMaskColor, Qt::MaskMode::MaskOutColor);
brush.setPen(s_waveformInnerColor);
brush.drawPixmap(0, 0, innerMask);
}

void SlicerTWaveform::drawEditor()
Expand Down
4 changes: 3 additions & 1 deletion plugins/SlicerT/SlicerTWaveform.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ public slots:

// colors
const QColor s_emptyColor = QColor(0, 0, 0, 0);

const QColor s_waveformColor = QColor(123, 49, 212);
const QColor s_waveformBgColor = QColor(255, 255, 255, 0);
const QColor s_waveformMaskColor = QColor(151, 65, 255); // update this if s_waveformColor changes
const QColor s_waveformInnerColor = QColor(183, 124, 255);

const QColor s_playColor = QColor(255, 255, 255, 200);
const QColor s_playHighlightColor = QColor(255, 255, 255, 70);
Expand Down
Binary file modified plugins/SlicerT/artwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.