Commit Graph

11 Commits

Author SHA1 Message Date
5da8424c40 Remove KeyboardInputComponent and add file upload and WebSocket support
Deleted unused `KeyboardInputComponent`. Added file upload functionality to `MainView` with WebSocket event handling. Introduced `WebsocketClient` class for managing server connection and file transmission. Enhanced `KeyboardComponent` with configurable key rounding. Updated `WebsocketHandler` for improved binary message handling and storage.
2025-06-10 21:08:00 +02:00
1d02a6ee16 Refactor KeyboardComponent to use immutable state for octave and pressed notes
Replaced mutable state with an immutable `KeyboardState` data class to track octave and pressed notes. Updated state management logic with functional updates for improved consistency and immutability. Simplified note handling and rendering to reference the unified state object.
2025-06-07 13:12:03 +02:00
9c9962d7db Refactor KeyboardComponent key rendering logic
Extracted white and black key rendering into separate `renderWhiteKeys` and `renderBlackKeys` functions for improved readability and modularity. Simplified drawing logic by delegating key rendering to these helper functions.
2025-06-07 11:57:17 +02:00
5c16b57ae9 Refactor KeyboardComponent with constants for note and key handling
Replaced hardcoded values for octaves, keys, and dimensions with named constants for improved readability and maintainability. Simplified calculations and loops using these constants. Enhanced clarity in key rendering and MIDI note calculations.
2025-06-07 11:39:21 +02:00
9ab909cf6c Refactor KeyboardComponent note calculation logic
Extracted MIDI note calculation into a reusable `getMidiNoteFromMousePosition` function. Replaced redundant inline logic in mouse event handlers and key drawing sections for improved readability and maintainability.
2025-06-07 11:24:30 +02:00
538aa6b9ae Update to version 2.1.1-SNAPSHOT and improve KeyboardComponent note handling
Bumped project version to 2.1.1-SNAPSHOT in `build.gradle.kts`. Enhanced `KeyboardComponent` logic to visually indicate pressed keys with new CSS classes for both white and black keys. Added `requestUpdate` calls to ensure UI updates on note changes. Simplified JVM target configuration in build script.
2025-06-06 20:21:51 +02:00
e6b7c9b288 Extend octave range to 0-9 and adjust MIDI note calculations 2025-06-06 19:47:05 +02:00
68a15bab8b Add octave controls to KeyboardComponent
Introduced buttons to dynamically adjust the octave within the range of 0 to 8. Added new CSS classes for layout and styling of octave controls, updated component logic with range validation, and reorganized the title and octave display for improved UI.
2025-06-06 19:32:15 +02:00
b48d6f3aca Add dynamic keyboard dimensions and integrate adjustable knob
Introduced adjustable `keyboardWidth` and `keyboardHeight` for `KeyboardComponent`, making dimensions dynamic. Added a knob component to control keyboard width in `MainView`. Enhanced layouts for flexibility and customization.
2025-06-06 19:25:50 +02:00
6b52e88cb7 Refactor KeyboardComponent dimensions and remove redundant code
Updated key size calculations to be dynamic based on keyboard dimensions for improved scalability. Removed unnecessary `println` calls and redundant MIDI note calculations in drawing logic for better performance and code clarity.
2025-06-05 21:38:33 +02:00
70a8b55c47 Add KeyboardComponent 2025-06-05 21:26:07 +02:00