summaryrefslogtreecommitdiff
path: root/Userland/Applications/Piano
AgeCommit message (Collapse)Author
2023-05-24AK: Rename Time to Durationkleines Filmröllchen
That's what this class really is; in fact that's what the first line of the comment says it is. This commit does not rename the main files, since those will contain other time-related classes in a little bit.
2023-05-23LibGfx+Everywhere: Change `Gfx::Rect` to be endpoint exclusiveJelle Raaijmakers
Previously, calling `.right()` on a `Gfx::Rect` would return the last column's coordinate still inside the rectangle, or `left + width - 1`. This is called 'endpoint inclusive' and does not make a lot of sense for `Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would return 4 as its right side. This same problem exists for `.bottom()`. This changes `Gfx::Rect` to be endpoint exclusive, which gives us the nice property that `width = right - left` and `height = bottom - top`. It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly the same. All users of `Gfx::Rect` have been updated accordingly.
2023-05-23Base+Userland: Apply Human Interface Guidelines to Object textthankyouverycool
Corrects a slew of titles, buttons, labels, menu items and status bars for capitalization, ellipses and punctuation. Rewords a few actions and dialogs to use uniform language and punctuation.
2023-05-05LibGUI: Make `Application`'s construction fallibleLucas CHOLLET
The pattern to construct `Application` was to use the `try_create` method from the `C_OBJECT` macro. While being safe from an OOM perspective, this method doesn't propagate errors from the constructor. This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually define a `create` method that can bubble up errors from the construction stage. This commit also removes the ability to use `argc` and `argv` to create an `Application`, only `Main`'s `Arguments` can be used. From a user point of view, the patch renames `try_create` => `create`, hence the huge number of modified files.
2023-05-05Piano: Allow per-track controls (again)kleines Filmröllchen
This makes Piano exactly as usable as when I started the large refactor some years ago, which *sounds* like I'm a terrible person but now it (1) looks nicer and (2) has a flexible backend that can already deal with aribtrary kinds of processors on any track.
2023-05-05Piano: Use size_t for track countkleines Filmröllchen
2023-04-30LibGUI+Userland: Port Labels to Stringthankyouverycool
2023-04-25LibCore: Remove some unnecessary includes from EventLoop.hAndreas Kling
2023-04-19LibGUI+Userland: Make Window::*add_menu take name using new stringKarol Kosek
2023-04-09Piano+LibAudio: Port to `Core::File`Cameron Youell
2023-03-16LibGUI+Userland: Make TabWidget::*add_tab() take title using new stringKarol Kosek
2023-03-13LibAudio+Piano: Correct header stylekleines Filmröllchen
2023-03-06Everywhere: Remove NonnullRefPtr.h includesAndreas Kling
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-02-25Piano: Move octave controls into main widgetkleines Filmröllchen
This is not related to the track controls and it may move into another separate widget in the future. The move also allows to simplify the octave slider callback logic.
2023-02-25Piano: Clean up code style with help from clang-tidykleines Filmröllchen
Includes shadowed variables and if-else return.
2023-02-25Piano: Improve handling of possibly null parameter labelkleines Filmröllchen
The current implementation could crash in various locations if the label was null.
2023-02-25Piano: Rename KnobsWidget to TrackControlsWidgetkleines Filmröllchen
This more generic name will better reflect the purpose of the widget in the future, as this commit begins the long process of enhancing the widget into a container for all controls of Piano's currently selected track.
2023-02-25LibDSP: Get rid of DeprecatedStringkleines Filmröllchen
This was a rather easy change, since only parameter names make use of strings in the first place. This also improves OOM resistance: If we can't create a parameter name, we will just set it to the empty string.
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-15Piano: Fix insertion and deletion of notesFlorian Kaiser
On mouse move the pressed button is not present in the event argument which causes the corresponding code to never fire. Instead it now stores the original mouse down event and acts according to that on mouse move.
2023-02-13Userland: Use default initializer instead of an empty string for ButtonsKarol Kosek
2023-02-08Piano: Show a progress window when exporting WAVkleines Filmröllchen
This exposes that the export is pretty slow, but it's much nicer than having the GUI lock up for 20s :^)
2023-02-02Piano: Propagate errors in PlayerWidgetKeir Davis
Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2023-01-27Piano: Remove declarations for non-existent methodsSam Atkins
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-12Userland: Use Core::Timer::create_foo() factory functions where possibleSam Atkins
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
Rip that bandaid off! This does the following, in one big, awkward jump: - Replace all uses of `set_main_widget<Foo>()` with the `try` version. - Remove `set_main_widget<Foo>()`. - Rename the `try` version to just be `set_main_widget` because it's now the only one. The majority of places that call `set_main_widget<Foo>()` are inside constructors, so this unfortunately gives us a big batch of new `release_value_but_fixme_should_propagate_errors()` calls.
2023-01-02Piano: Remove unused include of AK/StdLibExtraDetails.hBen Wiederhake
This instance was detected by searching for files that include AK/StdLibExtraDetails.h, but don't match the regex: \\b(AddConst|__AddConstToReferencedType|AddConstToReferencedType|AddLval ueReference|__AddReference|AddRvalueReference|__AssertSize|AssertSize|__ CommonType|CommonType|__Conditional|Conditional|CopyConst|__Decay|Decay| declval|DependentFalse|FalseType|__IdentityType|IdentityType|IndexSequen ce|IntegerSequence|IntegralConstant|IsArithmetic|IsAssignable|IsBaseOf|I sCallableWithArguments|IsClass|IsConst|IsConstructible|IsConvertible|IsC opyAssignable|IsCopyConstructible|IsDestructible|IsEnum|__IsFloatingPoin t|IsFloatingPoint|IsFunction|IsFundamental|IsHashCompatible|__IsIntegral |IsIntegral|IsLvalueReference|IsMoveAssignable|IsMoveConstructible|IsNul lPointer|IsOneOf|IsOneOfIgnoringCV|IsPOD|IsPointer|__IsPointerHelper|IsP ointerOfType|IsRvalueReference|IsSame|IsSameIgnoringCV|IsSigned|IsSpecia lizationOf|IsTrivial|IsTriviallyAssignable|IsTriviallyConstructible|IsTr iviallyCopyable|IsTriviallyCopyAssignable|IsTriviallyCopyConstructible|I sTriviallyDestructible|IsTriviallyMoveAssignable|IsTriviallyMoveConstruc tible|IsUnion|IsUnsigned|IsVoid|MakeIndexSequence|MakeIntegerSequence|ma ke_integer_sequence_impl|__MakeSigned|MakeSigned|__MakeUnsigned|MakeUnsi gned|__RemoveConst|RemoveConst|RemoveCV|RemoveCVReference|__RemovePointe r|RemovePointer|__RemoveReference|RemoveReference|__RemoveVolatile|Remov eVolatile|TrueType|UnderlyingType|Void|VoidType)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any "detailed extra stdlib" functions. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Remove unused includes of AK/Array.hBen Wiederhake
These instances were detected by searching for files that include Array.h, but don't match the regex: \\b(Array(?!\.h>)|iota_array|integer_sequence_generate_array)\\b These are the three symbols defined by Array.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Fix badly-formatted includesBen Wiederhake
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on Userland/Libraries/, whereas this commit cleans up the remaining headers in the repo, and any new badly-formatted include.
2022-12-15Piano: Overhaul AudioPlayerLoop and throw out event loopskleines Filmröllchen
The audio player loop uses custom IPC plumbing to safely bypass any event loop shenanigans. There is still work to be done, but this already improves the realtime capabilities of Piano.
2022-12-15Piano: Make AudioPlayerLoop::is_playing constkleines Filmröllchen
2022-12-14Piano: Only treat unmodified key presses as playing notesSam Atkins
This makes Action shortcuts work again. :^) `note_key_action()` and `special_key_action()` now return whether they consumed the event. We don't even call them if any modifier keys were held down, so things like `Ctrl+T` no longer play notes.
2022-12-09Everywhere: Use C++ concepts instead of requires clausesMoustafa Raafat
2022-12-07Meta+Userland: Pass Gfx::IntPoint by valueMacDue
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-25LibAudio: Set asynchronous audio enqueuer thread to maximum prioritykleines Filmröllchen
Anything that handles audio in this way should run at maximum priority.
2022-11-13Piano: Guard against all allocations at top level of the audio pipelinekleines Filmröllchen
Therefore, we don't rely on LibDSP Processors to use allocation guards themselves. It also demonstrates that nested allocation guards work correctly :^)
2022-11-13Piano: Alphabetize sourceskleines Filmröllchen
:greenlinus:
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-25Userland: Let applications make use of make_command_palette_action()demostanis
2022-07-25Piano: Replace knob instantiations with ProcessorParameterWidgetskleines Filmröllchen
The only remaining "manual" knob instatiation is the octave, which will be moved into an entirely different UI in the future.
2022-07-25LibDSP: Remove Track volume getters and setterskleines Filmröllchen
2022-07-25Piano: Remove waveform cycling with Ckleines Filmröllchen
This is not the most useful keyboard binding anyways, plus it will be extremely hacky to implement it with the generic processor parameter widgets. Therefore, we'll get rid of it and add back a more generic keyboard binding system later.
2022-07-25Piano: Add a generic processor parameter widgetkleines Filmröllchen
This automatically creates the correct collection of name label, value label and "editor" (knob, checkbox, dropdown) depending on the processor type and layouts them vertically.
2022-07-25Piano: Add Toggle parameter widgetkleines Filmröllchen
This is for enum widgets; though positioning is not correct as checkboxes need more options for text-less layout.
2022-07-22Piano: Increase AudioPlayerLoop resilience against scheduling weirdnesskleines Filmröllchen
This is a temporary fix until we move AudioPlayerLoop to direct buffer enqueuing.
2022-07-22Piano+LibDSP: Move Track to LibDSPkleines Filmröllchen
This is a tangly commit and it fixes all the bugs that a plain move would have caused (i.e. we need to touch other logic which had wrong assumptions).