Skip to content

Merge feature/recording-stage-one into master - #8476

Open
Bobjack18 wants to merge 54 commits into
LMMS:masterfrom
Bobjack18:master
Open

Merge feature/recording-stage-one into master#8476
Bobjack18 wants to merge 54 commits into
LMMS:masterfrom
Bobjack18:master

Conversation

@Bobjack18

Copy link
Copy Markdown

Merges the recording-stage-one branch into master, adding audio/MIDI recording functionality.

Conflicts resolved:

  • SampleClipView.cpp: kept both AudioEngine.h and FileDialog.h includes
  • Editor.cpp: kept branch's 3-parameter constructor, fixed combine -> keySequence
  • SongEditor.cpp: removed standalone record() method

Reflexe and others added 30 commits October 23, 2021 21:02
instead of hacking sampleBuffer ()->startFrame ().

That solves a bug with `startFrame ()` being negetive in recording some
cases.
Instead of hiding the record action buttons, disable them and indicate the issue on the tooltip.
…tage-one

Conflicts:
* src/core/SampleRecordHandle.cpp

Also fixed the setting of the font size in `SampleClipView::paintEvent`.
Move the recording symbol and the "Rec" string to the lower left of the
clip so that it does not overlap with the clip name if it is shown.

Make the "Rec" string translatable and increase the font size.
Up to now the SDL audio driver attempted to use the default recording
device. This might not be what users want or expect, especially since the
actually used device is not visible anywhere. So if recording does not
work for the users they have no way to find out what's wrong.

Extend the settings screen of the SDL driver with a combo box that allows
to select the input device to be used. Store the selected device name in
a new attribute called "inputdevice" in the "audiosdl" section of the
configuration file.

Use the information from the configuration when attempting to inialize
the input device. Fall back to the default device if that does not work.
Provide the setting "[System Default]" which instructs the SDL driver to
use the default device of the system as the input device. In the
configuration file this option is represented as an empty string. This
should play well with the current existing configuration of the users.
Let users configure the output device that's used by the SDL driver.
Code-wise the implementation is very similar to the input device
configuration.

Use a `QComboBox` instead of a `QLineEdit` for `m_device` and rename it
to `m_playbackDeviceComboBox`.

Rename `s_defaultInputDevice` to `s_systemDefaultDevice` because it is
used in the context of playback and input devices.
Make sure that labels are always shown by setting the row wrap policy of
the form layout to wrap long rows.
Rename "Device" to "Playback device" to make clear what the setting
refers to.
Introduce const expressions to get rid of repeated strings with a risk
of typos.
Make the option to record samples more prominent by providing a pixmap
button that is always shown and that can be used to turn recording on or
off. The corresponding widget which constitutes of the button and a label
is always positioned at the bottom left of the sample clip.

Technical details
------------------
The recording widget is built in the private method `buildRecordWidget`.
The method `adjustRecordWidget` is used to move the recording widget to
the correct position relative to the sample view. It is called after
construction and whenever the sample clip is resized (see `resizeEvent`).

Add the method `SampleClip::getRecordModel` so that the pixmap button can
be configured to act on it.
Only show the recording widget in the sample clip if the audio engine has
a device configured that can capture audio. For simplicity of the code,
i.e. no nullptr checks, the widget is always created but only shown if
capture capabilities are available.

Rename the context menu entry "Set/clear record" to "Toggle record" and
only enable it if capture is possible.

In `SampleClipView` the test for the availability of a capture device is
abstracted behind the helper method `recordingCapabilitiesAvailable`.

Technical details
------------------
Add the method `captureDeviceAvailable` to `AudioEngine` because clients
should not be concerned with driver details. Drivers should mostly be
used by the audio engine and therefore hidden to clients. Add a private
`const` version of the method `audioDev` so that `captureDeviceAvailable`
can be implemented in a `const` correct way.

Use `captureDeviceAvailable` in the constructor of `SongEditorWindow`.
Remove the recording button that was added to the sample clip view with
commit 48c4dce.

This commit simply reverts the aforementioned one.
tresf and others added 24 commits June 14, 2024 14:32
* String handling
* Initialize member with `nullptr`
* Use `constexpr`
* Remove `inline`
* Fix Whitespace
Adjust the rendering of BarModelEditor to make it respect logarithmic
and linear models. The code now uses `inverseScaledValue` instead of
`value` just like the `Knob` class does when calculating the angle.
Add peak indicators to the mixer strips. They show the maximum peak value
that was observed and can be reset by clicking on them.

## Implementation details
The implementation works via a signal/slot mechanism. The `Fader` class
has a new signal `peakChanged` which reports peak values as
amplifications. A new class `PeakIndicator` is added which has a slot
`updatePeak` which is connected to the new signal in `Fader`.

The `PeakIndicator` inherits from `QLabel` and mainly deals with updating
the label text from the current peak value.

Add a `PeakIndicator` instance to `MixerChannelView`. Add a `reset`
method to `MixerChannelView` so that the mixer channel can be reset on
the loading of new projects, etc. The current implementation resets the
peak indicator back to -inf dbFS. The `reset` method is called in
`MixerView::clear`.

Remove the clamping in `Fader::setPeak` so that all peaks are reported.
Emit the new signal if the peak changes.
Drag an instrument into either the Song Editor, the Pattern Editor or ~~into~~ an existing instrument track.

The word "into" seems redundant
This noise generator doesn't work properly when multiple noise sources are being generated simultaneously.
…#7236)

## Add support for "factorysample:" prefix
Add support to upgrade files with `src` tags that are prefixed with "factorysample:".

## Fix "bassloopes" typo
Fix projects that still reference files with the typo "bassloopes" in their name.

The upgrade is implemented in its own method because it is unrelated to the BPM renaming even if it is technically very similar in its solution.

Introduce the helper method `mapSrcAttributeInElementsWithResources` which replaces the `src` attribute in elements with resources (samples and AFP) if it can be found in a map.
* removed debian folder

* removed debian entries from check-strings

* fixup verify script too
Fixes an issue where sorted arpeggios over multiple notes used a largely
unusable algorithm. piano-octave-arp instead of octave-arp-piano.

Fixes LMMS#6499
Fixes LMMS#4491
When launching the wine VST process various wrappers may be involved,
when they exit the VST process becomes orphaned. This breaks the
PollParentThread mechanism which is responsible for cleaning up
processes in case of a crash. Because of this 64bit VST process exits
prematurely, in other words 64bit VST is currently broken in a typical
wine configuration.

A solution suggested by Lukas W is to set the PR_SET_CHILD_SUBREAPER
flag which makes the kernel reparent such process to lmms and
PollParentThread then works as intended.

Co-authored-by: Lukas W <[email protected]>
* Add architecture to macOS cache keys

* Only save Homebrew cache if lock file has changed
…tage-one

Conflicts:
* src/core/audio/AudioSdl.cpp
…tage-one

Merge origin's master so that the SDL related changes are reflected.
…MMS#7899)

* Removed unnecessary recording-related buttons
* Tidied up the button making code
* Added recordAccompany and recordStep flags to the Editor constructor

---------

Co-authored-by: bratpeki <[email protected]>
Conflicts resolved:
- src/gui/clips/SampleClipView.cpp: kept both includes
- src/gui/editors/Editor.cpp: kept branch's constructor, fixed combine -> keySequence
- src/gui/editors/SongEditor.cpp: removed standalone record()
@bratpeki

Copy link
Copy Markdown
Member

I'm down for this. Gonna look into the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.