Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into add-sample-database
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Nov 13, 2024
2 parents b1c1a9a + ada836c commit ff07622
Show file tree
Hide file tree
Showing 182 changed files with 249,243 additions and 197,617 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ jobs:
arch: [ x86_64, arm64 ]
include:
- arch: x86_64
os: macos-12
xcode: "13.1"
os: macos-13
xcode: "15.2"
- arch: arm64
os: macos-14
xcode: "14.3.1"
xcode: "15.4"
name: macos-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
env:
Expand Down
5 changes: 2 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ host = https://www.transifex.com
minimum_perc = 51
#Need to finish at least 51% before merging back

[lmms.lmms]
[o:lmms:p:lmms:r:lmms]
file_filter = data/locale/<lang>.ts
source_file = data/locale/en.ts
source_lang = en
type = QT

type = QT
21,614 changes: 12,016 additions & 9,598 deletions data/locale/cs.ts

Large diffs are not rendered by default.

20,491 changes: 11,456 additions & 9,035 deletions data/locale/de.ts

Large diffs are not rendered by default.

20,641 changes: 11,530 additions & 9,111 deletions data/locale/es.ts

Large diffs are not rendered by default.

18,733 changes: 10,580 additions & 8,153 deletions data/locale/eu.ts

Large diffs are not rendered by default.

21,501 changes: 11,957 additions & 9,544 deletions data/locale/fr.ts

Large diffs are not rendered by default.

17,408 changes: 9,918 additions & 7,490 deletions data/locale/he.ts

Large diffs are not rendered by default.

22,064 changes: 12,242 additions & 9,822 deletions data/locale/hu_HU.ts

Large diffs are not rendered by default.

20,055 changes: 11,234 additions & 8,821 deletions data/locale/id.ts

Large diffs are not rendered by default.

22,655 changes: 12,532 additions & 10,123 deletions data/locale/it.ts

Large diffs are not rendered by default.

20,065 changes: 11,242 additions & 8,823 deletions data/locale/ja.ts

Large diffs are not rendered by default.

22,566 changes: 12,644 additions & 9,922 deletions data/locale/ko.ts

Large diffs are not rendered by default.

21,686 changes: 12,052 additions & 9,634 deletions data/locale/nl.ts

Large diffs are not rendered by default.

22,483 changes: 12,466 additions & 10,017 deletions data/locale/pl.ts

Large diffs are not rendered by default.

20,114 changes: 11,270 additions & 8,844 deletions data/locale/pt.ts

Large diffs are not rendered by default.

22,414 changes: 12,411 additions & 10,003 deletions data/locale/ru.ts

Large diffs are not rendered by default.

21,989 changes: 12,269 additions & 9,720 deletions data/locale/sl.ts

Large diffs are not rendered by default.

22,799 changes: 12,604 additions & 10,195 deletions data/locale/sv.ts

Large diffs are not rendered by default.

22,874 changes: 12,649 additions & 10,225 deletions data/locale/tr.ts

Large diffs are not rendered by default.

20,489 changes: 11,454 additions & 9,035 deletions data/locale/uk.ts

Large diffs are not rendered by default.

21,332 changes: 12,020 additions & 9,312 deletions data/locale/zh_CN.ts

Large diffs are not rendered by default.

19,369 changes: 10,894 additions & 8,475 deletions data/locale/zh_TW.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions data/themes/classic/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ lmms--gui--TrackContentWidget {

/* gear button in tracks */

lmms--gui--TrackOperationsWidget > QPushButton {
lmms--gui--TrackOperationsWidget QPushButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
Expand All @@ -384,20 +384,20 @@ lmms--gui--TrackOperationsWidget > QPushButton {
border: none;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
image: url("resources:trackop.png");
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 1px;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:hover {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:hover {
image: url("resources:trackop_h.png");
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
image: url("resources:trackop_c.png");
position: relative;
top: 2px;
Expand Down
19 changes: 4 additions & 15 deletions data/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ lmms--gui--TrackContentWidget {

/* gear button in tracks */

lmms--gui--TrackOperationsWidget > QPushButton {
lmms--gui--TrackOperationsWidget QPushButton {
max-height: 26px;
max-width: 26px;
min-height: 26px;
Expand All @@ -420,16 +420,16 @@ lmms--gui--TrackOperationsWidget > QPushButton {
border: none;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator {
image: url("resources:trackop.png");
subcontrol-origin: padding;
subcontrol-position: center;
position: relative;
top: 1px;
}

lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget > QPushButton::menu-indicator:checked {
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:pressed,
lmms--gui--TrackOperationsWidget QPushButton::menu-indicator:checked {
image: url("resources:trackop.png");
position: relative;
top: 2px;
Expand Down Expand Up @@ -601,35 +601,24 @@ lmms--gui--TrackLabelButton:hover {
background: #3B424A;
border: 1px solid #515B66;
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:pressed {
background: #262B30;
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:checked {
border: 1px solid #485059;
background: #1C1F24;
background-image: url("resources:track_shadow_p.png");
border-radius: none;
font-size: 11px;
font-weight: normal;
padding: 2px 1px;
}

lmms--gui--TrackLabelButton:checked:pressed {
border: 1px solid #2f353b;
background: #0e1012;
background-image: url("resources:track_shadow_p.png");
font-size: 11px;
padding: 2px 1px;
font-weight: solid;
}

Expand Down
32 changes: 23 additions & 9 deletions include/AudioEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <memory>
#include <vector>

#include "AudioDevice.h"
#include "lmms_basics.h"
#include "SampleFrame.h"
#include "LocklessList.h"
Expand All @@ -50,14 +51,15 @@ class AudioPort;
class AudioEngineWorkerThread;


const fpp_t MINIMUM_BUFFER_SIZE = 32;
const fpp_t DEFAULT_BUFFER_SIZE = 256;
constexpr fpp_t MINIMUM_BUFFER_SIZE = 32;
constexpr fpp_t DEFAULT_BUFFER_SIZE = 256;
constexpr fpp_t MAXIMUM_BUFFER_SIZE = 4096;

const int BYTES_PER_SAMPLE = sizeof( sample_t );
const int BYTES_PER_INT_SAMPLE = sizeof( int_sample_t );
const int BYTES_PER_FRAME = sizeof( SampleFrame );
constexpr int BYTES_PER_SAMPLE = sizeof(sample_t);
constexpr int BYTES_PER_INT_SAMPLE = sizeof(int_sample_t);
constexpr int BYTES_PER_FRAME = sizeof(SampleFrame);

const float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;
constexpr float OUTPUT_SAMPLE_MULTIPLIER = 32767.0f;

class LMMS_EXPORT AudioEngine : public QObject
{
Expand Down Expand Up @@ -234,9 +236,20 @@ class LMMS_EXPORT AudioEngine : public QObject
}


sample_rate_t baseSampleRate() const;
sample_rate_t outputSampleRate() const;
sample_rate_t inputSampleRate() const;
sample_rate_t baseSampleRate() const { return m_baseSampleRate; }


sample_rate_t outputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


sample_rate_t inputSampleRate() const
{
return m_audioDev != nullptr ? m_audioDev->sampleRate() : m_baseSampleRate;
}


inline float masterGain() const
{
Expand Down Expand Up @@ -360,6 +373,7 @@ class LMMS_EXPORT AudioEngine : public QObject
SampleFrame* m_inputBuffer[2];
f_cnt_t m_inputBufferFrames[2];
f_cnt_t m_inputBufferSize[2];
sample_rate_t m_baseSampleRate;
int m_inputBufferRead;
int m_inputBufferWrite;

Expand Down
2 changes: 2 additions & 0 deletions include/AutomationEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ protected slots:
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

void adjustLeftRightScoll(int value);

TimePos m_currentPosition;

Action m_action;
Expand Down
5 changes: 3 additions & 2 deletions include/DummyEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class DummyEffect : public Effect
m_originalPluginData( originalPluginData )
{
setName();
setDontRun(true);
}

~DummyEffect() override = default;
Expand All @@ -107,9 +108,9 @@ class DummyEffect : public Effect
return &m_controls;
}

bool processAudioBuffer( SampleFrame*, const fpp_t ) override
ProcessStatus processImpl(SampleFrame*, const fpp_t) override
{
return false;
return ProcessStatus::Sleep;
}

const QDomElement& originalPluginData() const
Expand Down
2 changes: 1 addition & 1 deletion include/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Editor : public QMainWindow
DropToolBar * addDropToolBar(Qt::ToolBarArea whereToAdd, QString const & windowTitle);
DropToolBar * addDropToolBar(QWidget * parent, Qt::ToolBarArea whereToAdd, QString const & windowTitle);

void closeEvent( QCloseEvent * _ce ) override;
void closeEvent(QCloseEvent * event) override;
protected slots:
virtual void play() {}
virtual void record() {}
Expand Down
40 changes: 31 additions & 9 deletions include/Effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ class LMMS_EXPORT Effect : public Plugin
return "effect";
}


virtual bool processAudioBuffer( SampleFrame* _buf,
const fpp_t _frames ) = 0;
//! Returns true if audio was processed and should continue being processed
bool processAudioBuffer(SampleFrame* buf, const fpp_t frames);

inline ch_cnt_t processorCount() const
{
Expand Down Expand Up @@ -174,14 +173,29 @@ class LMMS_EXPORT Effect : public Plugin


protected:
enum class ProcessStatus
{
//! Unconditionally continue processing
Continue,

//! Calculate the RMS out sum and call `checkGate` to determine whether to stop processing
ContinueIfNotQuiet,

//! Do not continue processing
Sleep
};

/**
Effects should call this at the end of audio processing
* The main audio processing method that runs when plugin is not asleep
*/
virtual ProcessStatus processImpl(SampleFrame* buf, const fpp_t frames) = 0;

/**
* Optional method that runs when plugin is sleeping (not enabled,
* not running, not in the Okay state, or in the Don't Run state)
*/
virtual void processBypassedImpl() {}

If the setting "Keep effects running even without input" is disabled,
after "decay" ms of a signal below "gate", the effect is turned off
and won't be processed again until it receives new audio input
*/
void checkGate( double _out_sum );

gui::PluginView* instantiateView( QWidget * ) override;

Expand Down Expand Up @@ -212,6 +226,14 @@ class LMMS_EXPORT Effect : public Plugin


private:
/**
If the setting "Keep effects running even without input" is disabled,
after "decay" ms of a signal below "gate", the effect is turned off
and won't be processed again until it receives new audio input
*/
void checkGate(double outSum);


EffectChain * m_parent;
void resample( int _i, const SampleFrame* _src_buf,
sample_rate_t _src_sr,
Expand Down
12 changes: 8 additions & 4 deletions include/gui_templates.h → include/FontHelper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* gui_templates.h - GUI-specific templates
* FontHelper.h - Header function to help with fonts
*
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
Expand All @@ -22,12 +22,16 @@
*
*/

#ifndef LMMS_GUI_TEMPLATES_H
#define LMMS_GUI_TEMPLATES_H
#ifndef LMMS_FONT_HELPER_H
#define LMMS_FONT_HELPER_H

#include <QApplication>
#include <QFont>

constexpr int DEFAULT_FONT_SIZE = 12;
constexpr int SMALL_FONT_SIZE = 10;
constexpr int LARGE_FONT_SIZE = 14;

namespace lmms::gui
{

Expand All @@ -40,4 +44,4 @@ inline QFont adjustedToPixelSize(QFont font, int size)

} // namespace lmms::gui

#endif // LMMS_GUI_TEMPLATES_H
#endif // LMMS_FONT_HELPER_H
5 changes: 5 additions & 0 deletions include/InstrumentTrackWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include "ModelView.h"
#include "SerializingObject.h"
#include "PluginView.h"

class QLabel;
class QLineEdit;
Expand Down Expand Up @@ -67,6 +68,9 @@ class InstrumentTrackWindow : public QWidget, public ModelView,
InstrumentTrackWindow( InstrumentTrackView * _tv );
~InstrumentTrackWindow() override;

void resizeEvent(QResizeEvent* event) override;


// parent for all internal tab-widgets
TabWidget * tabWidgetParent()
{
Expand Down Expand Up @@ -152,6 +156,7 @@ protected slots:
InstrumentSoundShapingView * m_ssView;
InstrumentFunctionNoteStackingView* m_noteStackingView;
InstrumentFunctionArpeggioView* m_arpeggioView;
QWidget* m_instrumentFunctionsView; // container of note stacking and arpeggio
InstrumentMidiIOView * m_midiView;
EffectRackView * m_effectView;
InstrumentTuningView *m_tuningView;
Expand Down
3 changes: 2 additions & 1 deletion include/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class MainWindow : public QMainWindow
LMMS_EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags = QFlag(0));


void refocus();

///
/// \brief Asks whether changes made to the project are to be saved.
///
Expand Down Expand Up @@ -195,7 +197,6 @@ private slots:
void finalize();

void toggleWindow( QWidget *window, bool forceShow = false );
void refocus();

void exportProject(bool multiExport = false);
void handleSaveResult(QString const & filename, bool songSavedSuccessfully);
Expand Down
Loading

0 comments on commit ff07622

Please sign in to comment.