qsynth-1.0.3/PaxHeaders/CMakeLists.txt0000644000000000000000000000013214771226115014665 xustar0030 mtime=1743072333.093076276 30 atime=1743072333.092076281 30 ctime=1743072333.093076276 qsynth-1.0.3/CMakeLists.txt0000644000175000001440000002375714771226115014673 0ustar00rncbcuserscmake_minimum_required (VERSION 3.15) project (Qsynth VERSION 1.0.3 DESCRIPTION "A fluidsynth Qt GUI Interface" HOMEPAGE_URL "https://qsynth.sourceforge.io" LANGUAGES C CXX) set (PROJECT_TITLE "${PROJECT_NAME}") string (TOLOWER "${PROJECT_TITLE}" PROJECT_NAME) set (PROJECT_COPYRIGHT "Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved.") set (PROJECT_DOMAIN "rncbc.org") list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") execute_process ( COMMAND git describe --tags --dirty --abbrev=6 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT RESULT_VARIABLE GIT_DESCRIBE_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE) if (GIT_DESCRIBE_RESULT EQUAL 0) set (GIT_VERSION "${GIT_DESCRIBE_OUTPUT}") string (REGEX REPLACE "^[^0-9]+" "" GIT_VERSION "${GIT_VERSION}") string (REGEX REPLACE "-g" "git." GIT_VERSION "${GIT_VERSION}") string (REGEX REPLACE "[_|-]" "." GIT_VERSION "${GIT_VERSION}") execute_process ( COMMAND git rev-parse --abbrev-ref HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_REVPARSE_OUTPUT RESULT_VARIABLE GIT_REVPARSE_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE) if (GIT_REVPARSE_RESULT EQUAL 0 AND NOT GIT_REVPARSE_OUTPUT STREQUAL "main") set (GIT_VERSION "${GIT_VERSION} [${GIT_REVPARSE_OUTPUT}]") endif () set (PROJECT_VERSION "${GIT_VERSION}") endif () if (CMAKE_BUILD_TYPE MATCHES "Debug") set (CONFIG_DEBUG 1) set (CONFIG_BUILD_TYPE "debug") else () set (CONFIG_DEBUG 0) set (CONFIG_BUILD_TYPE "release") set (CMAKE_BUILD_TYPE "Release") endif () set (CONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}") include (GNUInstallDirs) set (CONFIG_BINDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_BINDIR}") set (CONFIG_LIBDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_LIBDIR}") set (CONFIG_DATADIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_DATADIR}") set (CONFIG_MANDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_MANDIR}") # Enable system tray argument option. option (CONFIG_SYSTEM_TRAY "Enable system tray (default=yes)" 1) # Enable fluid_synth_get_channel_info function (DEPRECATED). option (CONFIG_FLUID_CHANNEL_INFO "Enable FluidSynth channel info support (DEPRECATED) (default=no)" 0) # Enable fluid_synth_set_midi_router function (DEPRECATED). option (CONFIG_FLUID_MIDI_ROUTER "Enable FluidSynth MIDI router support (DEPRECATED) (default=no)" 0) # Enable new_fluid_server function. option (CONFIG_FLUID_SERVER "Enable FluidSynth server (default=yes)" 1) # Enable PipwWire support. option (CONFIG_PIPEWIRE "Enable PipeWire support (default=yes)" 1) # Enable unique/single instance. option (CONFIG_XUNIQUE "Enable unique/single instance (default=yes)" 1) # Enable gradient eye-candy. option (CONFIG_GRADIENT "Enable gradient eye-candy (default=yes)" 1) # Enable debugger stack-trace option (assumes --enable-debug). option (CONFIG_STACKTRACE "Enable debugger stack-trace (default=no)" 0) # Enable Wayland support option. option (CONFIG_WAYLAND "Enable Wayland support (EXPERIMENTAL) (default=no)" 0) # Enable Qt6 build preference. option (CONFIG_QT6 "Enable Qt6 build (default=yes)" 1) # Fix for new CMAKE_REQUIRED_LIBRARIES policy. if (POLICY CMP0075) cmake_policy (SET CMP0075 NEW) endif () # Check for Qt... if (CONFIG_QT6) find_package (Qt6 QUIET) if (NOT Qt6_FOUND) set (CONFIG_QT6 0) endif () endif () if (CONFIG_QT6) find_package (QT QUIET NAMES Qt6) else () find_package (QT QUIET NAMES Qt5) endif () find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets Svg) if (CONFIG_XUNIQUE) find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Network) endif () find_package (Qt${QT_VERSION_MAJOR}LinguistTools) include (CheckIncludeFile) include (CheckIncludeFiles) include (CheckIncludeFileCXX) include (CheckFunctionExists) include (CheckLibraryExists) # Checks for libraries. if (WIN32) check_function_exists (lroundf CONFIG_ROUND) else () find_library (MATH_LIBRARY m) # Check for round math function. if (MATH_LIBRARY) set (CMAKE_REQUIRED_LIBRARIES "${MATH_LIBRARY};${CMAKE_REQUIRED_LIBRARIES}") check_function_exists (lroundf CONFIG_ROUND) else () message (FATAL_ERROR "*** math library not found.") endif () endif () # Checks for header files. if (UNIX AND NOT APPLE) check_include_files ("fcntl.h;unistd.h;signal.h" HAVE_SIGNAL_H) endif () # Find package modules include (FindPkgConfig) # Check for FLUIDSYNTH library. pkg_check_modules (FLUIDSYNTH REQUIRED IMPORTED_TARGET fluidsynth) if (FLUIDSYNTH_FOUND) find_library(FLUIDSYNTH_LIBRARY NAMES ${FLUIDSYNTH_LIBRARIES} HINTS ${FLUIDSYNTH_LIBDIR}) endif () if (FLUIDSYNTH_LIBRARY) set (CONFIG_FLUIDSYNTH 1) set (CMAKE_REQUIRED_LIBRARIES "${FLUIDSYNTH_LIBRARY};${CMAKE_REQUIRED_LIBRARIES}") # Check for fluid_synth_system_reset function. check_function_exists (fluid_synth_system_reset CONFIG_FLUID_SYSTEM_RESET) # Check for fluid_synth_set_bank_offset function. check_function_exists (fluid_synth_set_bank_offset CONFIG_FLUID_BANK_OFFSET) # Check for fluid_synth_get_channel_info function. if (CONFIG_FLUID_CHANNEL_INFO) check_function_exists (fluid_synth_get_channel_info CONFIG_FLUID_CHANNEL_INFO) endif() # Check for fluid_synth_set_midi_router function. if (CONFIG_FLUID_MIDI_ROUTER) check_function_exists (fluid_synth_set_midi_router CONFIG_FLUID_MIDI_ROUTER) endif() # Check for fluid_synth_unset_program function. check_function_exists (fluid_synth_unset_program CONFIG_FLUID_UNSET_PROGRAM) # Check for fluid_version_str function. check_function_exists (fluid_version_str CONFIG_FLUID_VERSION_STR) # Check for fluid_settings_dupstr function. check_function_exists (fluid_settings_dupstr CONFIG_FLUID_SETTINGS_DUPSTR) # Check for fluid_preset_get_banknum function. check_function_exists (fluid_preset_get_banknum CONFIG_FLUID_PRESET_GET_BANKNUM) # Check for fluid_preset_get_num function. check_function_exists (fluid_preset_get_num CONFIG_FLUID_PRESET_GET_NUM) # Check for fluid_preset_get_name function. check_function_exists (fluid_preset_get_name CONFIG_FLUID_PRESET_GET_NAME) # Check for fluid_preset_get_sfont function. check_function_exists (fluid_preset_get_sfont CONFIG_FLUID_PRESET_GET_SFONT) # Check for fluid_sfont_get_id function. check_function_exists (fluid_sfont_get_id CONFIG_FLUID_SFONT_GET_ID) # Check for fluid_sfont_get_name function. check_function_exists (fluid_sfont_get_name CONFIG_FLUID_SFONT_GET_NAME) # Check for fluid_sfont_iteration_start function. check_function_exists (fluid_sfont_iteration_start CONFIG_FLUID_SFONT_ITERATION_START) # Check for fluid_sfont_iteration_next function. check_function_exists (fluid_sfont_iteration_next CONFIG_FLUID_SFONT_ITERATION_NEXT) # Check for fluid_synth_get_chorus_speed function. check_function_exists (fluid_synth_get_chorus_speed CONFIG_FLUID_SYNTH_GET_CHORUS_SPEED) # Check for fluid_synth_get_chorus_depth function. check_function_exists (fluid_synth_get_chorus_depth CONFIG_FLUID_SYNTH_GET_CHORUS_DEPTH) # Check for FluidSynth API V2 (>= 2.0.0) specifics... if (CONFIG_FLUID_SFONT_ITERATION_START AND CONFIG_FLUID_SFONT_ITERATION_NEXT) # Check for fluid_settings_getnum_default function. check_function_exists (fluid_settings_getnum_default CONFIG_FLUID_SETTINGS_GETNUM_DEFAULT) # Check for fluid_settings_getint_default function. check_function_exists (fluid_settings_getint_default CONFIG_FLUID_SETTINGS_GETINT_DEFAULT) # Check for fluid_settings_getstr_default function. check_function_exists (fluid_settings_getstr_default CONFIG_FLUID_SETTINGS_GETSTR_DEFAULT) # Check for fluid_settings_foreach function. check_function_exists (fluid_settings_foreach CONFIG_FLUID_SETTINGS_FOREACH) # Check for fluid_settings_foreach_option function. check_function_exists (fluid_settings_foreach_option CONFIG_FLUID_SETTINGS_FOREACH_OPTION) # Check for new_fluid_server function. if (CONFIG_FLUID_SERVER) check_function_exists (new_fluid_server CONFIG_NEW_FLUID_SERVER) endif () # Check for fluid_free function check_function_exists (fluid_free CONFIG_FLUID_FREE) endif () else () message (FATAL_ERROR "*** FLUIDSYNTH library not found.") set (CONFIG_FLUIDSYNTH 0) endif () if (CONFIG_PIPEWIRE) pkg_check_modules (PIPEWIRE IMPORTED_TARGET libpipewire-0.3) if (NOT PIPEWIRE_FOUND) set (CONFIG_PIPEWIRE 0) endif () endif () add_subdirectory (src) # Finally check whether Qt is statically linked. if (QT_FEATURE_static) set(QT_VERSION "${QT_VERSION}-static") endif () # Configuration status macro (SHOW_OPTION text value) if (${value}) message ("${text}: yes") else () message ("${text}: no") endif () endmacro () message ("\n ${PROJECT_TITLE} ${PROJECT_VERSION} (Qt ${QT_VERSION})") message ("\n Build target . . . . . . . . . . . . . . . . . . .: ${CONFIG_BUILD_TYPE}\n") show_option (" FluidSynth library support . . . . . . . . . . . ." CONFIG_FLUIDSYNTH) show_option (" FluidSynth server support . . . . . . . . . . . ." CONFIG_FLUID_SERVER) show_option (" FluidSynth system reset support . . . . . . . . ." CONFIG_FLUID_SYSTEM_RESET) show_option (" FluidSynth bank offset support . . . . . . . . . ." CONFIG_FLUID_BANK_OFFSET) show_option (" FluidSynth channel info support (DEPRECATED) . . ." CONFIG_FLUID_CHANNEL_INFO) show_option (" FluidSynth MIDI router support (DEPRECATED) . . ." CONFIG_FLUID_MIDI_ROUTER) show_option (" FluidSynth unset program support . . . . . . . . ." CONFIG_FLUID_UNSET_PROGRAM) show_option (" FluidSynth version string support . . . . . . . ." CONFIG_FLUID_VERSION_STR) message ("") show_option (" PipeWire (pw-init) support . . . . . . . . . . . ." CONFIG_PIPEWIRE) message ("") show_option (" System tray icon support . . . . . . . . . . . . ." CONFIG_SYSTEM_TRAY) message ("") show_option (" Unique/Single instance support . . . . . . . . . ." CONFIG_XUNIQUE) show_option (" Gradient eye-candy . . . . . . . . . . . . . . . ." CONFIG_GRADIENT) show_option (" Debugger stack-trace (gdb) . . . . . . . . . . . ." CONFIG_STACKTRACE) message ("\n Install prefix . . . . . . . . . . . . . . . . . .: ${CONFIG_PREFIX}\n") qsynth-1.0.3/PaxHeaders/ChangeLog0000644000000000000000000000013214771226115013677 xustar0030 mtime=1743072333.093076276 30 atime=1743072333.093076276 30 ctime=1743072333.093076276 qsynth-1.0.3/ChangeLog0000644000175000001440000007032714771226115013700 0ustar00rncbcusersQsynth - A fluidsynth Qt GUI Interface -------------------------------------- ChangeLog 1.0.3 2025-03-27 An Early Spring'25 Release. - Master gain front panel control now ranges from 0..1000, with default still at 100 (unit gain). - Fixed command line parsing (QCommandLineParser/Option) to not exiting the application with a segfault when showing help and version information. - Peppino knob style adjusted to lighter custom color themes. - Prepping up next development cycle (Qt >= 6.8) 1.0.2 2024-09-30 An Early-Fall'24 Release. - Peppino knob graphic style refined to follow designated palette color theme (and not being such an ugly style anymore;)). 1.0.1 2024-09-11 An End-of-Summer'24 Release. - Setup/Settings editor: differ between edit text being changed and just finished and committed. 1.0.0 2024-06-19 An Unthinkable Release. - Making up the unthinkable (aka. v1.0.0) - Cancel button option added to close to system-tray icon message. - Introduce Setup/Settings custom editing per engine. 0.9.91 2024-05-01 A Spring'24 Release Candidate 2. - Prepping the unthinkable (aka. v1.0.0-rc2) - Updated to latest framework level (Qt >= 6.7) 0.9.90 2024-04-10 A Spring'24 Release Candidate. - Prepping the unthinkable (aka. v1.0.0-rc1) - Custom color themes are now file based (*.conf); legacy still preserved ntl. 0.9.13 2024-01-24 A Winter'24 Release. - Add PipeWire (pw_init) support. - Updated copyright headers into the New Year (2024). 0.9.12 2023-09-09 An End-of-Summer'23 Release. - Restore all MIDI channels synth-engine funcionality, when the output peak-meters aren't opted in. - Preppings to next development cycle (Qt >= 6.6) 0.9.11 2023-06-01 A Spring'23 Release. - Optimized audio output peak-meters. - Prepping into the next development cycle (with Qt >= 6.5). 0.9.10 2023-03-23 An Early-Spring'23 Release. - Bumping copyright headers to the brand new year. 0.9.9 2022-12-28 An End-of-Year'22 Release. - Just bumping into the next develop cycle/season. 0.9.8 2022-10-03 An Early-Autumn'22 Release. - Add current system user-name to the singleton/unique application instance identifier. 0.9.7 2022-04-02 A Spring'22 Release. - Main application icon is now presented in scalable format (SVG). 0.9.6 2022-02-12 A Mid-Winter'22 Release. - Migrated command line parsing to QCommandLineParser/Option (Qt >= 5.2; by Pedro Lopez-Cabanillas). - New option to change the UI language translation. - Added DLS file type to the soundfonts selection dialog. - Fixed translations path to be relative to application runtime. 0.9.5 2022-01-09 A Winter'22 Release. - Dropped autotools (autoconf, automake, etc.) build system. - Fixed for Qt6 plugins path eg. widget theme or styles. 0.9.4 2021-07-03 An Early-Summer'21 Release. - All builds default to Qt6 (Qt >= 6.1) where available. - CMake is now the new official build system. 0.9.3 2021-05-11 A Spring'21 Release. - New Setup/Audio/WASAPI Exclusive Mode option added. - Fix for Windows runtime error (assertion failed) when compiled with MSVC (by Pedro Lopez-Cabanillas). - New Setup/MIDI/Auto Connect MIDI inputs option added. - Fix deprecated Reverb/Chorus API (FluidSynth >= 2.2.0). - All packaging builds switching to CMake. 0.9.2 2021-03-14 An End-of-Winter'21 Release. - Possible fix to the even number of audio channels not playing back through JACK when audio group number is set to 2. 0.9.1 2021-02-07 A Winter'21 Release. - Fixed MIDI player to files that are drag and dropped after a first time following engine re-initialization. - Fix multi-channel support with JACK. - Early preparations for the New Year develop(ment) cycle. 0.9.0 2020-12-17 A Winter'20 Release. - Early fixing to build for Qt >= 6.0.0 and comply with C++17 standard. 0.6.3 2020-07-31 A Summer'20 Release. - Left-clicking on the system-tray icon now simply toggles the main widget visibility, disregarding if already hidden undercover to other windows. - Early fixing to build for Qt >= 5.15.0. 0.6.2 2020-03-24 A Spring'20 Release. - A scalable (.svg) icon version has been added. - Make man page compression reproducible (after request by Jelle van der Waa, while on the Vee-Ones, thanks). - Ditching deprecated QTime methods for QElapsedTimer's (in compliance to Qt >= 5.14.0). - Bumped copyright headers into the New Year (2020). 0.6.1 2019-12-22 The Winter'19 Release. - Custom color (palette) theme editor introduced; color (palette) theme changes are now effective immediately, except on default. - Second attempt to fix the yet non-official though CMake build configuration. - When using autotools and ./configure --with-qt=..., it is also necessary to adjust the PKG_CONFIG_PATH environment variable (after a merge request by plcl aka. Pedro López-Cabanillas, while on qmidinet, thanks). 0.6.0 2019-10-17 An Autumn'19 Release. - Updated the old yet non-oficial CMake build option. - Fix HiDPI display screen effective support (Qt >= 5.6). - System-tray icon context menu has been refactored to be exactly the same as the main-window context menu that is re-instantiated on demand. - Make sure compiler flags comply to c++11 as standard. 0.5.7 2019-07-12 A Summer'19 Release. - Updated for the newer Qt5 development tools (>= 5.13). - Configure updated to check for qtchooser availability. - Minor update to Debian packaging control file. - Settled to initial default MIDI and audio drivers on MacOSX to "coremidi" and "coreaudio" resp. - Updated icon files into 128x128 base resolution. 0.5.6 2019-04-11 A Spring-Break'19 Release. - Re-defined all main application UNIX signal handling. 0.5.5 2019-03-11 Pre-LAC2019 Release Frenzy. - Refactored all singleton/unique application instance setup logic away from X11/Xcb hackery. - HiDPI display screen support (Qt >= 5.6). - Bumped copyright headers into the New Year (2019). 0.5.4 2018-12-05 End of Autumn'18 Release. - Reset button now also resets master Gain, Reverb and Chorus to their "factory default" values. - Fixed Reverb and Chorus effects processing when audio output peak-meters are enabled on FluidSynth API V2. - Old deprecated Qt4 build support is no more. - System tray options now subject to current desktop environment availability. 0.5.3 2018-10-10 An Autumn'18 Release. - Current FluidSynth version information added to command line output (-V, --version). - Overhaul adaptations to the FluidSynth API V2 (>= 2.0.0). - AppStream metadata updated to be the most compliant with latest freedesktop.org specification and recommendation. 0.5.2 2018-07-22 A Summer'18 Release. - AppData/AppStream metadata is now settled under an all permisssive license (FSFAP). 0.5.1 2018-05-21 Pre-LAC2018 release frenzy. - Disable singleton/unique application instance setup logic when the display server platform is not X11. - Fixed deprecated calls to fluid_synth_get_channel_info(), fluid_synth_set_midi_router() and fluid_settings_getstr() (as signaled on libfluidsynth >= 1.1.9). - A little hardening on the configure (autoconf) macro side. 0.5.0 2017-12-16 End of Autum'17 release. - Added *.SF3 to soundfont files filter on Setup > Soundfonts > Open... file dialog. - Increased Soundfont bank-offset limit to 16384 (was 128). - Desktop entry specification file is now finally independent from build/configure template chains. - Updated target path for freedesktop.org's AppStream metainfo file (formerly AppData). 0.4.4 2017-04-27 Pre-LAC2017 release frenzy. - Added French man page (by Olivier Humbert, thanks). - Make builds reproducible byte for byte, by getting rid of the configure build date and time stamps. 0.4.3 2016-11-14 A Fall'16 release. - Fixed a potential crash on the singleton/unique application instance setup. - Almost complete overhaul on the configure script command line options, wrt. installation directories specification, eg. --prefix, --bindir, --libdir, --datadir and --mandir. - Late French (fr) translation update (by Olivier Humbert, thanks). 0.4.2 2016-09-14 End of Summer'16 release. - Old "Start minimized to system tray" option returns to setup. - Dropped the --enable-qt5 from configure as found redundant given that's the build default anyway (suggestion by Guido Scholz, while for Qtractor, thanks). 0.4.1 2016-04-05 Spring'16 release frenzy. - Dropped old "Start minimized to system tray" option from setup. - CMake script lists update (patch by Orcan Ogetbil, thanks). - Added application keywords to freedesktop.org's AppData. - System-tray icon context menu has been fixed/hacked to show up again on Plasma 5 (aka. KDE5) notifications status area. - Prevent x11extras module from use on non-X11/Unix plaforms. - Messages standard output capture has been improved in both ways a non-blocking pipe may get. - Regression fix for invalid system-tray icon dimensions reported by some desktop environment frameworks. 0.4.0 2015-09-07 Summer'15 release frenzy. - Desktop environment session shutdown/logout management has been also adapted to Qt5 framework. - Single/unique application instance control adapted to Qt5/X11. - Output meter scale text color fixed on dark color schemes. - Prefer Qt5 over Qt4 by default with configure script. - Complete rewrite of Qt4 vs. Qt5 configure builds. - A new top-level widget window geometry state save and restore sub-routine is now in effect. - Fixed for some strict tests for Qt4 vs. Qt5 configure builds. - German (de) translation update (by Guido Scholz, thanks). 0.3.9 2015-03-25 Pre-LAC2015 release frenzy. - Added application description as freedesktop.org's AppData. - New user preference option on whether to show the nagging 'program will keep running in the system tray' message, on main window close. - Application close confirm warning is now raising the main window as visible and active for due top level display, especially applicable when minimized to the system tray. - A man page has been added. - Translations install directory change. - Allow the build system to include an user specified LDFLAGS. - Czech (cs) translation updated (by Pavel Fric, thanks). 0.3.8 2013-12-31 A fifth of a Jubilee. - More preparations for Qt5 configure build. - Serbian (sr) translation added (by Jay Alexander Fleming, thanks). 0.3.7 2013-04-16 Spring cleaning sale. - New French (fr) translation added (by Yann Collette, thanks). - Reversed (mouse) scroll-wheel effect on dial knob widgets. - Preparations for Qt5 migration. - MIDI bank select mode control added to engine setup dialog (after a clean patch ticket by Kurt Stephens, thanks). - Added include to shut up gcc 4.7 build failures. - Make(ing) -jN parallel builds now available to the masses (an awesome patch by kensington, thanks). - Fixed Makefile.in handling of installation directories to the configure script eg. --datadir, --localedir. - Main window is now brought to front and (re)activated when clicking on the system tray icon instead of just hiding it. - Debugging stacktrace now applies to all working threads. 0.3.6 2011-04-07 Slip release. - Main window layout fixing with regard to its user preferred size and recall when system-tray icon is not enabled. - Channels list preset items now activated on double-click. - Desktop environment session shutdown (eg. logout) is now tapped for graceful application exit, even though the main window is active (visible) and minimizing to system tray is enabled. Both were causing first shutdown/logout attempt to abort. Not anymore, hopefully ;). - libX11 is now being added explicitly to the build link phase, as seen necessary on some bleeding-edge distros eg. Fedora 13, Debian 6. - General standard dialog buttons layout is now in place. - CMake build system. It was silently available in 0.3.5, but now it is officially unveiled. - Fixed a couple of dangling pointers. - Mac OSX: Enabled the MIDI name Id option for CoreMIDI driver ports, added the icon to the app bundle. 0.3.5 2010-04-27 Overdue release. - Initial widget geometry and visibility persistence logic has been slightly revised as much to avoid crash failures due to wrong main widget hidden state. - General source tree layout and build configuration change. - Most modal message dialog boxes (eg. critical errors) are now replaced by system tray icon bubble messages where available. - Reverb and Chorus parameter ranges have been revised to match and comply with fluidsynth back-end (libfluidsynth). - Fluidsynth channel info and unset program interfaces are now in use where available (libfluidsynth >= 1.1.1). - Global configuration state is now explicitly saved/committed to disk when Options dialog changes are accepted and applied. - Output peak level meters get their long deserved gradient look. - Automatic crash-dump reports, debugger stack-traces (gdb), back- traces, whatever, are being introduced as a brand new configure option (--enable-stacktrace) and default enabled on debug build targets (--enable-debug). - Added Czech (cs) translation, contributed by Pavel Fric. - The channel preset selector (Channels/Edit...) has been seriously crippled for ages, only showing the presets of the last loaded soundfont, now fixed. - Minimum number of MIDI channels allowed on engine setup has been dropped from the old value 16 to as low as 1 (one), not that it makes a difference, as (lib)fluidsynth internals just rounds it to the nearest multiple of 16 anyway. - Cleanup to knobs source, simplified from redundant stuff. 0.3.4 2009-05-10 New release. - Command line option parsing has been slightly refactored to allow custom override through extraordinary fluidsynth option settings (eg. -o name=value; fixes bug #2781579). - Main form layout has been given a little bit more slack space, just to accommodate some longer text label translations (eg. German). - Converted obsolete QMessageBox forms to standard buttons. - Saved channel presets are now effectively loaded on engine startup. - Russian translation added (thanks to Alexandre Prokoudine). - Grayed/disabled palette color group fix for dark color themes. - Qt Software logo update. - Fait-divers: desktop menu file touched to openSUSE conventions. - Slight optimizations to the output peak meters refresh rate. - MIDI and audio device names are now user selectable options through respective drop-down lists on each engine setup dialog. - New knob style: Skulpture. 0.3.3 2008-07-10 Knobs galore. - Due to some trouble with newer Qt >= 4.4 applications regarding font size configuration, a new global user option is now available to the rescue: Options.../Other/Base font size (default is no-op). - Knobs: graphic styles are now QStyle derived classes, which are assigned to the knobs using QWidget::setStyle(). Three styles are implemented in this way, supporting also the legacy QDial: * Our former look, tweaked and ported from Sonic Visualiser. * A port of the new look implemented by David Garcia. * Another ported widget style, designed by Giuseppe Cigala. - Spanish translation added. - Attempt to load Qt's own translation support and get rid of the ever warning startup message, unless built in debug moderr; also introducing the very first and complete German translation (patching transaction by Guido Scholz, thanks). - Messages file logging makes its first long overdue appearance, with user configurable settings in Options/Logging. - Only one application instance is now allowed to be up and running, with immediate but graceful termination upon startup iif an already running instance is detected, which will see its main widget shown up and all engines started automatically (Qt/X11 platform only). 0.3.2 2007-12-19 Minor stealth fixes and season greetings. - A new option to start the program minimized when the system tray icon is enabled, is now available from Setup/Misc/Start minimized to system tray. - Regression from QSystemTrayIcon (Qt4 >= 4.2) implementation, at least on X11 environments: while the main application widget was minimized to the system-tray, closing any other top-level widget was causing the immediate and unexpected application shutdown. - Minor corrections on the output peak meter scale aesthetics. - Tool/child windows position and size preservation fixed. - Orphaned MIDI device name no longer mistaken when switching between MIDI drivers on engine setup. - A bit more of precision is achieved over the output peak meters. - Messages line limit was not being checked, now honored. - Simple as it could ever be, the build executive summary report is now given on configure. - Get configure to try and detect the correct qmake location and insert it the search order, so let the qt4 tools take precedence when --with-qt option is given and older qt3 ones coexist and are found located ahead in the PATH. - The infamous "Keep child windows always on top" global option is now supposed to behave a little better when disabled, layering child windows as naturally as far the window manager dictates. - Inspired on Andreas Persson patch, while on qjackctl-devel, which made it possible to compile and run with older Qt 4.1, similar arrangements were carried out on qsynth too, without hesitation. - Main panel spin-boxes gets accelerated when stressed (Qt >= 4.2). 0.3.1 2007-07-16 Shallowed bug-fix release. - Now using QSystemTrayIcon class facility if available (Qt4 >= 4.2) making the system-tray option available on most platforms, notably on Windows and Mac OS X. - Combo-box setup history has been corrected on restore, which was discarding the very initial default (factory) contents. - One programming error has been corrected, which was affecting the editable preset combo-boxes usability. - Soundfont context menu is now available again even when the setup dialog soundfont list is empty. - About form link is now browseable externally. - Updated README-OSX (thanks to Ebrahim Mayat again). 0.3.0 2007-07-03 Qt4 migration was complete. - Qt4 migration has comenced and is now complete. Care must be taken with this new configuration file and location: this release starts a new one from scratch and won't reuse any of the previous existing ones, although cut and paste might help if you know what you'll be doing :) - Application icon is now installed to ${prefix}/share/pixmaps; application desktop entry file is now included in installation; spec file (RPM) is now a bit more openSUSE compliant; initial debianization. - Default font option names were adjusted to "Sans Serif" and "Monospace", wherever available. - The "keep child windows always on top" option is not set as default anymore, because window focus behavior gets tricky on some desktop environments (eg. Mac OS X, Gnome). - Autoconf (configure) scripting gets an update. 0.2.6 2007-04-14 Nitpicking season closed :) - Main panel window now keeps its previous iconic state on system tray, on application restart (thanks to Chris Cannam for hinting this one). - Minor optimization in peak level meters update rate. Alternate but faster inline lroundf() function implementation is now used. - Most top-level widgets were missing the normal-widget flag, which were causing some sticky size behavior on some window managers. - Messages and channels window captions can now be set smaller as tool-widgets, in effect when child windows are kept always on top. - While on the engine setup dialog, the ALSA sequencer client identifier is now also disabled depending on the MIDI input option setting. - Experimental soundfont loader which prevents RAM image duplication if more than one engine loads the same soundfont file. Server-mode is now supported on multi-engine configurations by auto-increnmenting the shell socket listening port (both patches handed by Dave Searls, thanks). - Engine name gets through the respective tab title when created. Fixed engine delete button enabling on the main window. - Changed deprecated copyright attribute to license, on qsynth.spec (RPM). - Added configure support for x86_64 libraries (Pedro Lopez-Cabanillas). - GPL address update. 0.2.5 2006-03-05 Fancy dial knobs and effective bank-offsets. - New dial-knob behavior now follows mouse pointer angular position, almost similar to old QDial, but this time avoiding that nasty and rather abrupt change on first mouse click. - By simple use of widget subclassing, the value/position of any dial knob can now be reset to its default or original position at any time, by simply pressing the mouse mid-button. These default value positions are just committed to current dial values when switching engines and/or closing the application. - Optional specification of alternate fluidsynth installation path has been added to configure command arguments (--with-fluidsynth). - After some source code tweaks, a win32 build is now possible. (instructions will be provided on demand :) - Bank offset finally gets its due effect, while on the channels and channel preset selection dialogs. Regretfully, the soundfont bank offset feature has been lurking ever since its inception, but now its live and hopefully effective. - A new fancy widget has arrived, qsynthKnob, with some modifications to replace the actual *ugly* QDial widgets in the main window. This widget is based on a design by Thorsten Wilms, formerly implemented by Chris Cannam in Rosegarden, and finally adapted and brought to Qsynth by Pedro Lopez-Cabanillas. Thankyou all. 0.2.4 2005-10-02 Bug and some other usability fixes. - All widget captions changed to include proper application title prefix. - Attempt to bring those aging autoconf templates to date; sample SPEC file for RPM build is now being included and generated at configure time. - Missing icons on channel and soundfont setup context menus are now up; bank/program splitter widget added to channel preset dialog. - An abrupt segfault on engine restart have been finally fixed; this issue has been quite an annoyance which has been around for ages and was a highly probable showstopper just when restarting an engine due to changes on the setup settings. Not anymore, hopefully. - New tool buttons were added to the main widget, for adding a new engine and removing the current one, while trying to increase the visibility of multiple fluidsynth engine capability (for new users, at least :) - Set to use QApplication::setMainWidget() instead of registering the traditional lastWindowClosed() signal to quit() /slot, just to let the -geometry command line argument have some optional effect on X11. - Minor configure and Makefile install fixes, as Debian and Mac OS X specialties. Also, install does the right thing with target file modes (thanks to Matt Flax and Ebrahim Mayat, for pointing these out). - Fixed output disability when messages limit option is turned off (thanks to Wolfgang Woehl for spotting this one, while on qjackctl). 0.2.3 2005-05-24 System tray icon and menu option. - New option for system tray icon and menu, which is known to be effective on KDE enabled desktops; support for freedesktop.org's system tray protocol specification has been included so this maybe also effective on Gnome2. - Setup options for alternate MIDI and Audio devices were introduced. - Output level meters get smoother and slightly layout optimized. - Set to ignore the SIGPIPE ("Broken pipe") signal, where available, as the default handler is usually fatal when a JACK client is zombified abruptly. - Messages window limit is now enforced only when the line count exceeds in one third the user configured line count maximum; if Qt 3.2.0+ is in use, the QTextView widget is otherwise set to the optimized Qt::LogText format. - Updated Mac OS X build instructions (README-OSX, by Ebrahim Mayat). 0.2.2 2004-10-08 Output level peak meters and other fixes. - Minor configure fixes. - Meanwhile, XPM icon(s) were brainlessly converted to PNG format. - Engine panel settings are now properly saved on stop/restart. - Icons were added to the engine tab selector context menu. - Master gain front panel control gets rescaled and now ranges from 0..200, with midpoint at 100 (unit gain). - Added Mac OS X build instructions (README-OSX, by Ebrahim Mayat). - Soundfont bank offset option gets its trial time; please note that fluidsynth 1.0.5 is needed to build on this feature, which is being properly detected and only enabled at configure time. - Output level peak meters are now featured as an option, which must be explicitly enabled on setup for those to show up; in addition, overall GUI refresh cycle period has been reduced from 200 to 100 msec. - Top level sub-windows are now always raised and set with active focus when shown to visibility. 0.2.1 2004-04-30 Important internal fixes. - Channels window reset when switching engines isn't destructive anymore; also reverb and chorus activation were not being correctly updated; these were quite annoying bugs, now fixed. - Corrected MIDI/Audio driver settings that were being obliterated from the setup dialog option lists; this was causing the impossibility to choose an appropriate driver on certain systems where "alsa_seq" or "jack" may not be available by default (e.g. MacOSX, thanks to Ebrahim Mayat). - The dash (-) is now a legal character for preset names. - Translation support for the default preset name "(default)". - Delete preset confirmation warning message. - Messages window pops up whenever a critical error message is issued. 0.2.0 2004-03-21 Multi-instance comes to town. - Multiple fluidsynth engines can now be maintained, with different settings, MIDI and Audio drivers, and more interestingly distinct soundfont stacks. The main user interface has been minimally improved to accomodate this new paradigm, but whole application internals have been massively rewritten. 0.1.3 2004-02-29 More work in progress. - Message window line limit is now a configurable option on setup. - ALSA sequencer client name may now be internally set; not of great use for now, but it opens the ground for future workings. - JACK multiple output port mode may now be configured on setup. - Makefile.cvs makes its late entrance on the build toolset. 0.1.2 2004-02-16 Work in progress. - Messages and Channels pop-up windows are not hinted as dialogs anymore and thus are not centered relative to parent main window which has become a strict Qt dialog widget behaviour (as of Qt 3.3+). - Soundfont setup dialog changed to open and load multiple files at once. - New setup option on wether all child windows are kept on top of the main window, or otherwise floating with probable taskbar entries of their own. - Setup changes that are only effective next time the program is run gets an informational message box shown to the user. 0.1.1 2004-01-22 Yet more minor bugfixes. - Messages color retouching. - Popup menus memory leak fixed. 0.1.0 2003-12-29 Channel preset breakout. - Added channels breakout and program preset view and edit windows, including a simple preset/profile management feature where the complete channel program assignments may be referenced and saved by name. - Drag and dropped soundfont files are now accepted for immediate load. - Messages window fallback fix. - Standard output/error stream capture setup option; handler retouched to be line buffer oriented. 0.0.3 2003-12-12 Few tiny changes so far. - Single shot timer and restart code path had a graceful rewrite. - Messages window blankness rendering fix. - Configure time detection of 'round' library function availability. - Player drag and drop feature has been prepared, but somehow the internal MIDI player function is still broken. 0.0.2 2003-11-26 Minor bugfixes. - Gain, Reverb and Chorus front-panel settings are now loosely scaled and properly clipped; this is a first attempt to avoid unstable sound feedback behaviour namely on Reverb. - MIDI input status led stickyness have been fixed. - Soundfont open dialog now uses uppercase filter too (*.SF2). - New configure time argument debugging support (--enable-debug). 0.0.1 2003-11-15 Primordial release. qsynth-1.0.3/PaxHeaders/LICENSE0000644000000000000000000000013214771226115013132 xustar0030 mtime=1743072333.094076271 30 atime=1743072333.093076276 30 ctime=1743072333.094076271 qsynth-1.0.3/LICENSE0000644000175000001440000004310314771226115013123 0ustar00rncbcusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. qsynth-1.0.3/PaxHeaders/README0000644000000000000000000000013214771226115013005 xustar0030 mtime=1743072333.094076271 30 atime=1743072333.094076271 30 ctime=1743072333.094076271 qsynth-1.0.3/README0000644000175000001440000000567714771226115013014 0ustar00rncbcusersqsynth - A fluidsynth Qt GUI Interface -------------------------------------- Qsynth is a fluidsynth GUI front-end application written in C++ around the Qt framework using Qt Designer. Eventually it may evolve into a softsynth management application allowing the user to control and manage a variety of command line softsynths but for the moment it wraps the excellent FluidSynth (http://www.fluidsynth.org). FluidSynth is a command line software synthesiser based on the Soundfont specification. Homepage: https://qsynth.sourceforge.io http://qsynth.sourceforge.net License: GNU General Public License (GPL) Requirements ------------ The software requirements for build and runtime are listed as follows: Mandatory: - Qt framework, C++ class library and tools for cross-platform application and UI development https://qt.io/ - fluidsynth, real-time software synthesizer based on the SoundFont 2 specifications http://www.fluidsynth.org/ Installation ------------ Unpack the tarball and in the extracted source directory: cmake [-DCMAKE_INSTALL_PREFIX=] -B build cmake --build build [--parallel ] and optionally, as root: [sudo] cmake --install build Note that the default installation path () is /usr/local . Configuration ------------- Qsynth holds its settings and configuration state per user, in a file located as $HOME/.config/rncbc.org/Qsynth.conf . Normally, there's no need to edit this file, as it is recreated and rewritten everytime qsynth is run. Bugs ---- Plenty still although this is beta software ;) Support ------- Qsynth is open source free software. For bug reports, feature requests, discussion forums, mailling lists, or any other matter related to the development of this piece of software, please use the Sourceforge project page (https://sourceforge.net/projects/qsynth). Acknowledgements ---------------- Qsynth has been created by Rui Nuno Capela, Richard Bown and Chris Cannam to bring a simple but effective software synthesier front end to the Linux desktop. From an original idea by Richard Bown and Chris Cannam to create an open software synthesiser front end to use in conjunction with Rosegarden (https://www.sourceforge.net/projects/rosegarden) and other ALSA based software sequencers. Inspired by Rui's work on QjackCtl (https://qjackctl.sourceforge.io). Ebrahim Mayat also contributed with instructions to build Qsynth on Mac OSX (see README-OSX). This might be outdated now that Qsynth has migrated to Qt4, but nevertheless... Pedro Lopez-Cabanillas is currently the most prominent developer, having contributed with the awesome knob skins/styles option, the alternate cmake build system and the Windows(tm) installer bundle. Kudos to Pedro! Enjoy. rncbc aka Rui Nuno Capela bownie aka Richard Bown cannam aka Chris Cannam qsynth-1.0.3/PaxHeaders/TRANSLATORS0000644000000000000000000000013214771226115013664 xustar0030 mtime=1743072333.094076271 30 atime=1743072333.094076271 30 ctime=1743072333.094076271 qsynth-1.0.3/TRANSLATORS0000644000175000001440000000066414771226115013662 0ustar00rncbcusersCzech (cs) Pavel Fric German (de) Guido Scholz Spanish (es) Pedro Lopez-Cabanillas French (fr) Olivier Humbert Yann Collette Lionel Rascle Russian (ru) Alexandre Prokoudine Serbian (sr) Jay Alexander Fleming qsynth-1.0.3/PaxHeaders/cmake0000644000000000000000000000013214771226115013130 xustar0030 mtime=1743072333.095181705 30 atime=1743072333.094076271 30 ctime=1743072333.095181705 qsynth-1.0.3/cmake/0000755000175000001440000000000014771226115013175 5ustar00rncbcusersqsynth-1.0.3/cmake/PaxHeaders/DeploymentUtils.cmake0000644000000000000000000000013214771226115017350 xustar0030 mtime=1743072333.094076271 30 atime=1743072333.094076271 30 ctime=1743072333.094076271 qsynth-1.0.3/cmake/DeploymentUtils.cmake0000644000175000001440000000503614771226115017344 0ustar00rncbcusers#======================================================================= # Copyright © 2021-2024 Pedro López-Cabanillas # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Kitware, Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #======================================================================= get_target_property(_qmake_executable Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) get_filename_component(_qmake_location "${_qmake_executable}" DIRECTORY) find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qmake_location}") find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qmake_location}") if (WIN32 AND WINDEPLOYQT_EXECUTABLE) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND "${WINDEPLOYQT_EXECUTABLE}" #--verbose=2 "$" COMMENT "Running windeployqt..." ) endif() if (APPLE AND MACDEPLOYQT_EXECUTABLE) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND "${MACDEPLOYQT_EXECUTABLE}" "$" -always-overwrite #-verbose=3 COMMENT "Running macdeployqt..." ) endif() qsynth-1.0.3/cmake/PaxHeaders/TranslationUtils.cmake0000644000000000000000000000013214771226115017526 xustar0030 mtime=1743072333.095181705 30 atime=1743072333.094076271 30 ctime=1743072333.095181705 qsynth-1.0.3/cmake/TranslationUtils.cmake0000644000175000001440000001122314771226115017515 0ustar00rncbcusers#======================================================================= # Copyright © 2019-2024 Pedro López-Cabanillas # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Kitware, Inc. nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #======================================================================= if (NOT TARGET Qt${QT_VERSION_MAJOR}::lconvert) message(FATAL_ERROR "The package \"Qt${QT_VERSION_MAJOR}LinguistTools\" is required.") endif() set(Qt_LCONVERT_EXECUTABLE Qt${QT_VERSION_MAJOR}::lconvert) function(ADD_APP_TRANSLATIONS_RESOURCE res_file) set(_qm_files ${ARGN}) set(_res_file ${CMAKE_CURRENT_BINARY_DIR}/app_translations.qrc) file(WRITE ${_res_file} "\n \n") foreach(_lang ${_qm_files}) get_filename_component(_filename ${_lang} NAME) file(APPEND ${_res_file} " ${_filename}\n") endforeach() file(APPEND ${_res_file} " \n\n") set(${res_file} ${_res_file} PARENT_SCOPE) endfunction() function(ADD_QT_TRANSLATIONS_RESOURCE res_file) set(_languages ${ARGN}) set(_res_file ${CMAKE_CURRENT_BINARY_DIR}/qt_translations.qrc) set(_patterns qtbase qtmultimedia qtscript qtxmlpatterns) get_filename_component(_srcdir "${Qt${QT_VERSION_MAJOR}_DIR}/../../../translations" ABSOLUTE) set(_outfiles) foreach(_lang ${_languages}) set(_infiles) set(_out qt_${_lang}.qm) foreach(_pat ${_patterns}) set(_file "${_srcdir}/${_pat}_${_lang}.qm") if (EXISTS ${_file}) list(APPEND _infiles ${_file}) endif() endforeach() if(_infiles) add_custom_command(OUTPUT ${_out} COMMAND ${Qt_LCONVERT_EXECUTABLE} ARGS -i ${_infiles} -o ${_out} COMMAND_EXPAND_LISTS VERBATIM) list(APPEND _outfiles ${_out}) set_property(SOURCE ${_out} PROPERTY SKIP_AUTOGEN ON) endif() endforeach() file(WRITE ${_res_file} "\n \n") foreach(_file ${_outfiles}) get_filename_component(_filename ${_file} NAME) file(APPEND ${_res_file} " ${_filename}\n") endforeach() file(APPEND ${_res_file} " \n\n") set(${res_file} ${_res_file} PARENT_SCOPE) endfunction() function(ADD_QT_TRANSLATIONS out_files) set(_languages ${ARGN}) set(_patterns qtbase qtmultimedia qtscript qtxmlpatterns) get_filename_component(_srcdir "${Qt${QT_VERSION_MAJOR}_DIR}/../../../translations" ABSOLUTE) set(_outfiles) foreach(_lang ${_languages}) set(_infiles) set(_out qt_${_lang}.qm) foreach(_pat ${_patterns}) set(_file "${_srcdir}/${_pat}_${_lang}.qm") if (EXISTS ${_file}) list(APPEND _infiles ${_file}) endif() endforeach() if(_infiles) add_custom_command(OUTPUT ${_out} COMMAND ${Qt_LCONVERT_EXECUTABLE} ARGS -i ${_infiles} -o ${_out} COMMAND_EXPAND_LISTS VERBATIM) list(APPEND _outfiles ${_out}) set_property(SOURCE ${_out} PROPERTY SKIP_AUTOGEN ON) endif() endforeach() set(${out_files} ${_outfiles} PARENT_SCOPE) endfunction() qsynth-1.0.3/PaxHeaders/src0000644000000000000000000000013214771226115012637 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.096076261 30 ctime=1743072333.118076147 qsynth-1.0.3/src/0000755000175000001440000000000014771226115012704 5ustar00rncbcusersqsynth-1.0.3/src/PaxHeaders/win320000644000000000000000000000013214771226115013601 xustar0030 mtime=1743072333.119076142 30 atime=1743072333.118076147 30 ctime=1743072333.119076142 qsynth-1.0.3/src/win32/0000755000175000001440000000000014771226115013646 5ustar00rncbcusersqsynth-1.0.3/src/win32/PaxHeaders/qsynth.rc.in0000644000000000000000000000013214771226115016137 xustar0030 mtime=1743072333.119076142 30 atime=1743072333.119076142 30 ctime=1743072333.119076142 qsynth-1.0.3/src/win32/qsynth.rc.in0000644000175000001440000000210514771226115016125 0ustar00rncbcusersIDI_ICON1 ICON DISCARDABLE "@CMAKE_SOURCE_DIR@/src/images/qsynth.ico" 1 VERSIONINFO FILEVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@ PRODUCTVERSION @PROJECT_VERSION_MAJOR@, @PROJECT_VERSION_MINOR@, @PROJECT_VERSION_PATCH@, 0 FILEOS 4 // VOS__WINDOWS32 FILETYPE 1 // VFT_APP BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", "@PROJECT_DOMAIN@" VALUE "FileDescription", "@PROJECT_DESCRIPTION@" VALUE "FileVersion", "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@" VALUE "Full Version", "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.0" VALUE "InternalName", "@PROJECT_NAME@" VALUE "LegalCopyright", "@PROJECT_COPYRIGHT@" VALUE "OriginalFilename", "@PROJECT_NAME@.exe" VALUE "ProductName", "@PROJECT_TITLE@" VALUE "ProductVersion", "@PROJECT_VERSION@" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 // U.S. English END END qsynth-1.0.3/src/win32/PaxHeaders/gpl-2.0.rtf0000644000000000000000000000013214771226115015452 xustar0030 mtime=1743072333.119076142 30 atime=1743072333.118076147 30 ctime=1743072333.119076142 qsynth-1.0.3/src/win32/gpl-2.0.rtf0000644000175000001440000011043014771226115015441 0ustar00rncbcusers{\rtf1\ansi\deff3\adeflang1025 {\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\fswiss\fprq2\fcharset0 Liberation Sans{\*\falt Arial};}{\f5\froman\fprq0\fcharset128 Helvetica{\*\falt Arial};}{\f6\froman\fprq0\fcharset128 Courier{\*\falt Courier New};}{\f7\fnil\fprq2\fcharset0 Droid Sans Fallback;}{\f8\fnil\fprq2\fcharset0 FreeSans;}{\f9\fswiss\fprq0\fcharset128 FreeSans;}} {\colortbl;\red0\green0\blue0;\red0\green0\blue128;\red128\green128\blue128;} {\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033 Normal;} {\*\cs15\snext15\cf2\ul\ulc0\langfe255\alang255\lang255 Internet Link;} {\s16\sbasedon0\snext17\sb240\sa120\keepn\dbch\af7\dbch\af8\afs28\loch\f4\fs28 Heading;} {\s17\sbasedon0\snext17\sl288\slmult1\sb0\sa140 Text Body;} {\s18\sbasedon17\snext18\sl288\slmult1\sb0\sa140\dbch\af9 List;} {\s19\sbasedon0\snext19\sb120\sa120\noline\i\dbch\af9\afs24\ai\fs24 Caption;} {\s20\sbasedon0\snext20\noline\dbch\af9 Index;} }{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67241986}}\deftab720 \viewscale100 {\*\pgdsctbl {\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}} \formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc \pgndec\pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\ul\ulc0\b\rtlch \ltrch\loch\fs28\loch\f5 GNU GENERAL PUBLIC LICENSE} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Version 2, June 1991} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f6 Copyright (C) 1989, 1991 Free Software Foundation, Inc. }{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA}{\rtlch \ltrch\loch \line \line }{\rtlch \ltrch\loch\loch\f6 Everyone is permitted to copy and distribute verbatim copies}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 of this license document, but changing it is not allowed.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\ul\ulc0\b\rtlch \ltrch\loch\fs28\loch\f5 Preamble} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 The precise terms and conditions for copying, distribution and modification follow.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\ul\ulc0\b\rtlch \ltrch\loch\fs28\loch\f5 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 0.}{\rtlch \ltrch\loch\loch\f5 This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 1.}{\rtlch \ltrch\loch\loch\f5 You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 2.}{\rtlch \ltrch\loch\loch\f5 You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 a)}{\rtlch \ltrch\loch\loch\f5 You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 b)}{\rtlch \ltrch\loch\loch\f5 You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 c)}{\rtlch \ltrch\loch\loch\f5 If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 3.}{\rtlch \ltrch\loch\loch\f5 You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 a)}{\rtlch \ltrch\loch\loch\f5 Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 b)}{\rtlch \ltrch\loch\loch\f5 Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa0\rtlch \ltrch\loch\loch\f5 \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li360\ri0\lin360\rin0\fi0\sb0\sa0{\b\rtlch \ltrch\loch\loch\f5 c)}{\rtlch \ltrch\loch\loch\f5 Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 4.}{\rtlch \ltrch\loch\loch\f5 You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 5.}{\rtlch \ltrch\loch\loch\f5 You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 6.}{\rtlch \ltrch\loch\loch\f5 Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 7.}{\rtlch \ltrch\loch\loch\f5 If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 8.}{\rtlch \ltrch\loch\loch\f5 If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 9.}{\rtlch \ltrch\loch\loch\f5 The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 10.}{\rtlch \ltrch\loch\loch\f5 If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 NO WARRANTY} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 11.}{\rtlch \ltrch\loch\loch\f5 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180\rtlch \ltrch\loch \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\loch\f5 12.}{\rtlch \ltrch\loch\loch\f5 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\b\rtlch \ltrch\loch\fs28\loch\f5 END OF TERMS AND CONDITIONS} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\ul\ulc0\b\rtlch \ltrch\loch\fs28\loch\f5 How to Apply These Terms to Your New Programs} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f6 one line to give the program's name and an idea of what it does.}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 Copyright (C) yyyy name of author}{\rtlch \ltrch\loch \line \line }{\rtlch \ltrch\loch\loch\f6 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.}{\rtlch \ltrch\loch \line \line }{\rtlch \ltrch\loch\loch\f6 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.}{\rtlch \ltrch\loch \line \line }{\rtlch \ltrch\loch\loch\f6 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 Also add information on how to contact you by electronic and paper mail.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 If the program is interactive, make it output a short notice like this when it starts in an interactive mode:} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f6 Gnomovision version 69, Copyright (C) year name of author}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 type `show w'. This is free software, and you are welcome}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 to redistribute it under certain conditions; type `show c' }{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 for details.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f6 Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.}{\rtlch \ltrch\loch \line \line }{\rtlch \ltrch\loch\loch\f6 signature of Ty Coon, 1 April 1989}{\rtlch \ltrch\loch \line }{\rtlch \ltrch\loch\loch\f6 Ty Coon, President of Vice} \par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1033\ql\li0\ri0\lin0\rin0\fi0\sb0\sa180{\rtlch \ltrch\loch\loch\f5 This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the }{{\field{\*\fldinst HYPERLINK "https://www.gnu.org/licenses/lgpl.html" }{\fldrslt {\cf2\ul\ulc0\langfe255\alang255\lang255\ul\ulc0\rtlch \ltrch\loch\loch\f5 GNU Lesser General Public License}{}}}\rtlch \ltrch\loch\loch\f5 instead of this License.} \par } qsynth-1.0.3/src/win32/PaxHeaders/setup.nsi.in0000644000000000000000000000013214771226115016136 xustar0030 mtime=1743072333.119076142 30 atime=1743072333.119076142 30 ctime=1743072333.119076142 qsynth-1.0.3/src/win32/setup.nsi.in0000644000175000001440000004353314771226115016136 0ustar00rncbcusersName "@PROJECT_TITLE@" SetCompressor /SOLID lzma Unicode true # BrandingText " " # Request application privileges for Windows Vista RequestExecutionLevel admin # Defines !define SOURCE_FILES "@CMAKE_SOURCE_DIR@/src" !define BINARY_FILES "@CMAKE_BINARY_DIR@/src" !define FUIDSYNTH_FILES "@FLUIDSYNTH_PREFIX@/bin" !define REGKEY "SOFTWARE\$(^Name)" !define VERSION "@PROJECT_VERSION@" !define PROGNAME "@PROJECT_NAME@" !define COMPANY "@PROJECT_DOMAIN@" !define URL "@PROJECT_HOMEPAGE_URL@" # Included files !include Sections.nsh !include MUI2.nsh !include Library.nsh !include x64.nsh # MUI defines !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico" !define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM !define MUI_STARTMENUPAGE_NODISABLE !define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup !define MUI_STARTMENUPAGE_DEFAULTFOLDER "@PROJECT_NAME@" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE # Variables Var StartMenuGroup Var LibInstall # Installer pages !define MUI_WELCOMEPAGE_TITLE_3LINES !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE ${SOURCE_FILES}/win32/gpl-2.0.rtf !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup !insertmacro MUI_PAGE_INSTFILES !define MUI_FINISHPAGE_TITLE_3LINES !insertmacro MUI_PAGE_FINISH !define MUI_WELCOMEPAGE_TITLE_3LINES !insertmacro MUI_UNPAGE_WELCOME !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !define MUI_FINISHPAGE_TITLE_3LINES !insertmacro MUI_UNPAGE_FINISH # Installer languages !insertmacro MUI_LANGUAGE "Czech" !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "Serbian" !insertmacro MUI_LANGUAGE "Spanish" # Installer attributes OutFile "@PROJECT_NAME@-${VERSION}-3.1.win-x64-setup.exe" #InstallDir "$PROGRAMFILES\@PROJECT_TITLE@" CRCCheck on XPStyle on ShowInstDetails show VIProductVersion "@PROJECT_VERSION@.0" VIAddVersionKey ProductName "@PROJECT_TITLE@" VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" VIAddVersionKey CompanyWebsite "${URL}" VIAddVersionKey FileVersion "${VERSION}" VIAddVersionKey FileDescription "@PROJECT_DESCRIPTION@" VIAddVersionKey LegalCopyright "@PROJECT_COPYRIGHT@" InstallDirRegKey HKLM "${REGKEY}" Path ShowUninstDetails show Icon ${SOURCE_FILES}\images\qsynth.ico UninstallIcon ${SOURCE_FILES}\images\qsynth.ico Section # hidden section DetailPrint "Removing previous installation." ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR' SectionEnd # Installer sections Section -Main SEC0000 CreateDirectory $INSTDIR\generic CreateDirectory $INSTDIR\iconengines CreateDirectory $INSTDIR\imageformats CreateDirectory $INSTDIR\networkinformation CreateDirectory $INSTDIR\platforms CreateDirectory $INSTDIR\styles CreateDirectory $INSTDIR\tls CreateDirectory $INSTDIR\translations SetOutPath $INSTDIR SetOverwrite on File ${BINARY_FILES}\qsynth.exe File ${FUIDSYNTH_FILES}\fluidsynth.exe SetOutPath $INSTDIR\translations File ${BINARY_FILES}\qsynth_cs.qm File ${BINARY_FILES}\qsynth_de.qm File ${BINARY_FILES}\qsynth_es.qm File ${BINARY_FILES}\qsynth_fr.qm File ${BINARY_FILES}\qsynth_ru.qm File ${BINARY_FILES}\qsynth_sr.qm File ${BINARY_FILES}\translations\qt_cs.qm File ${BINARY_FILES}\translations\qt_de.qm File ${BINARY_FILES}\translations\qt_es.qm File ${BINARY_FILES}\translations\qt_fr.qm File ${BINARY_FILES}\translations\qt_ru.qm !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libfluidsynth-3.dll $INSTDIR\libfluidsynth-3.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libFLAC.dll $INSTDIR\libFLAC.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libglib-2.0-0.dll $INSTDIR\libglib-2.0-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libgomp-1.dll $INSTDIR\libgomp-1.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libiconv-2.dll $INSTDIR\libiconv-2.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libintl-8.dll $INSTDIR\libintl-8.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libmp3lame-0.dll $INSTDIR\libmp3lame-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libmpg123-0.dll $INSTDIR\libmpg123-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libogg-0.dll $INSTDIR\libogg-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libopus-0.dll $INSTDIR\libopus-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libpcre2-8-0.dll $INSTDIR\libpcre2-8-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libreadline8.dll $INSTDIR\libreadline8.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libsndfile-1.dll $INSTDIR\libsndfile-1.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libtermcap-0.dll $INSTDIR\libtermcap-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libvorbis-0.dll $INSTDIR\libvorbis-0.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${FUIDSYNTH_FILES}\libvorbisenc-2.dll $INSTDIR\libvorbisenc-2.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\Qt6Core.dll $INSTDIR\Qt6Core.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\Qt6Gui.dll $INSTDIR\Qt6Gui.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\Qt6Network.dll $INSTDIR\Qt6Network.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\Qt6Svg.dll $INSTDIR\Qt6Svg.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\Qt6Widgets.dll $INSTDIR\Qt6Widgets.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\D3Dcompiler_47.dll $INSTDIR\D3Dcompiler_47.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\opengl32sw.dll $INSTDIR\opengl32sw.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\libgcc_s_seh-1.dll $INSTDIR\libgcc_s_seh-1.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\libstdc++-6.dll $INSTDIR\libstdc++-6.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\libwinpthread-1.dll $INSTDIR\libwinpthread-1.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\generic\qtuiotouchplugin.dll $INSTDIR\generic\qtuiotouchplugin.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\iconengines\qsvgicon.dll $INSTDIR\iconengines\qsvgicon.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qgif.dll $INSTDIR\imageformats\qgif.dll $INSTDIR # !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qicns.dll $INSTDIR\imageformats\qicns.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qico.dll $INSTDIR\imageformats\qico.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qjpeg.dll $INSTDIR\imageformats\qjpeg.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qsvg.dll $INSTDIR\imageformats\qsvg.dll $INSTDIR # !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qtga.dll $INSTDIR\imageformats\qtga.dll $INSTDIR # !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qtiff.dll $INSTDIR\imageformats\qtiff.dll $INSTDIR # !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qwbmp.dll $INSTDIR\imageformats\qwbmp.dll $INSTDIR # !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\imageformats\qwebp.dll $INSTDIR\imageformats\qwebp.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\networkinformation\qnetworklistmanager.dll $INSTDIR\networkinformation\qnetworklistmanager.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\platforms\qwindows.dll $INSTDIR\platforms\qwindows.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\styles\qmodernwindowsstyle.dll $INSTDIR\styles\qmodernwindowsstyle.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\tls\qcertonlybackend.dll $INSTDIR\tls\qcertonlybackend.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\tls\qopensslbackend.dll $INSTDIR\tls\qopensslbackend.dll $INSTDIR !insertmacro InstallLib DLL NOTSHARED REBOOT_PROTECTED ${BINARY_FILES}\tls\qschannelbackend.dll $INSTDIR\tls\qschannelbackend.dll $INSTDIR WriteRegStr HKLM "${REGKEY}\Components" Main 1 SectionEnd Section -post SEC0001 WriteRegStr HKLM "${REGKEY}" Path $INSTDIR SetOutPath $INSTDIR WriteUninstaller $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory $SMPROGRAMS\$StartMenuGroup CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe CreateShortcut "$SMPROGRAMS\$StartMenuGroup\fluidsynth.lnk" $INSTDIR\fluidsynth.exe CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\qsynth.exe !insertmacro MUI_STARTMENU_WRITE_END WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 SectionEnd # Macro for selecting uninstaller sections !macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID Push $R0 ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}" StrCmp $R0 1 0 next${UNSECTION_ID} !insertmacro SelectSection "${UNSECTION_ID}" GoTo done${UNSECTION_ID} next${UNSECTION_ID}: !insertmacro UnselectSection "${UNSECTION_ID}" done${UNSECTION_ID}: Pop $R0 !macroend # Uninstaller sections Section /o -un.Main UNSEC0000 Delete /REBOOTOK $INSTDIR\translations\qsynth_cs.qm Delete /REBOOTOK $INSTDIR\translations\qsynth_de.qm Delete /REBOOTOK $INSTDIR\translations\qsynth_es.qm Delete /REBOOTOK $INSTDIR\translations\qsynth_fr.qm Delete /REBOOTOK $INSTDIR\translations\qsynth_ru.qm Delete /REBOOTOK $INSTDIR\translations\qsynth_sr.qm Delete /REBOOTOK $INSTDIR\translations\qt_cs.qm Delete /REBOOTOK $INSTDIR\translations\qt_de.qm Delete /REBOOTOK $INSTDIR\translations\qt_es.qm Delete /REBOOTOK $INSTDIR\translations\qt_fr.qm Delete /REBOOTOK $INSTDIR\translations\qt_ru.qm Delete /REBOOTOK $INSTDIR\fluidsynth.exe Delete /REBOOTOK $INSTDIR\qsynth.exe !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libfluidsynth-3.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libFLAC.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libglib-2.0-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libgomp-1.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libiconv-2.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libintl-8.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libmp3lame-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libmpg123-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libogg-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libopus-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libpcre2-8-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libreadline8.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libsndfile-1.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libtermcap-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libvorbis-0.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libvorbisenc-2.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\Qt6Core.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\Qt6Gui.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\Qt6Network.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\Qt6Svg.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\Qt6Widgets.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\D3Dcompiler_47.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\opengl32sw.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libgcc_s_seh-1.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libstdc++-6.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\libwinpthread-1.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\generic\qtuiotouchplugin.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\iconengines\qsvgicon.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qgif.dll # !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qicns.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qico.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qjpeg.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qsvg.dll # !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qtga.dll # !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qtiff.dll # !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qwbmp.dll # !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\imageformats\qwebp.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\networkinformation\qnetworklistmanager.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\platforms\qwindows.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\styles\qwindowsvistastyle.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\tls\qcertonlybackend.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\tls\qopensslbackend.dll !insertmacro UnInstallLib DLL NOTSHARED REBOOT_PROTECTED $INSTDIR\tls\qschannelbackend.dll RMDir /REBOOTOK $INSTDIR\translations RMDir /REBOOTOK $INSTDIR\tls RMDir /REBOOTOK $INSTDIR\styles RMDir /REBOOTOK $INSTDIR\platforms RMDir /REBOOTOK $INSTDIR\networkinformation RMDir /REBOOTOK $INSTDIR\iconengines RMDir /REBOOTOK $INSTDIR\imageformats RMDir /REBOOTOK $INSTDIR\generic DeleteRegValue HKLM "${REGKEY}\Components" Main SectionEnd Section -un.post UNSEC0001 DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\fluidsynth.lnk" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" Delete /REBOOTOK $INSTDIR\uninstall.exe DeleteRegValue HKLM "${REGKEY}" StartMenuGroup DeleteRegValue HKLM "${REGKEY}" Path DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components" DeleteRegKey /IfEmpty HKLM "${REGKEY}" RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup RmDir /REBOOTOK $INSTDIR SectionEnd # Installer functions Function .onInit !insertmacro MUI_LANGDLL_DISPLAY ${If} ${RunningX64} StrCpy $INSTDIR "$PROGRAMFILES64\${PROGNAME}" ${Else} MessageBox MB_OK|MB_ICONSTOP "Sorry, this setup package is for 64 bit systems only." Quit ${EndIf} Call GetDXVersion Pop $R3 IntCmp $R3 900 +3 0 +3 MessageBox "MB_OK" "Requires DirectX 9.0 or later." Abort InitPluginsDir Push $0 ReadRegStr $0 HKLM "${REGKEY}" Path ClearErrors StrCmp $0 "" +2 StrCpy $LibInstall 1 Pop $0 FunctionEnd # Uninstaller functions Function un.onInit !insertmacro MUI_UNGETLANGUAGE ReadRegStr $INSTDIR HKLM "${REGKEY}" Path !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup !insertmacro SELECT_UNSECTION Main ${UNSEC0000} FunctionEnd Function GetDXVersion Push $0 Push $1 ReadRegStr $0 HKLM "Software\Microsoft\DirectX" "Version" IfErrors noDirectX StrCpy $1 $0 2 5 ; get the minor version StrCpy $0 $0 2 2 ; get the major version IntOp $0 $0 * 100 ; $0 = major * 100 + minor IntOp $0 $0 + $1 Goto done noDirectX: StrCpy $0 0 done: Pop $1 Exch $0 FunctionEnd qsynth-1.0.3/src/PaxHeaders/qsynthAboutForm.ui0000644000000000000000000000013214771226115016420 xustar0030 mtime=1743072333.105076214 30 atime=1743072333.105076214 30 ctime=1743072333.105076214 qsynth-1.0.3/src/qsynthAboutForm.ui0000644000175000001440000001010214771226115016402 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthAboutForm 0 0 520 280 About :/images/about1.png true 4 4 Qt::Horizontal 8 8 &Close Qt::TabFocus About Qt :/images/qtlogo1.png Qt::Vertical 8 8 1 false true true 32 32 :/images/qsynth.svg true Qt::AlignCenter false 2 AboutTextView AboutQtButton ClosePushButton qsynth-1.0.3/src/PaxHeaders/qsynthEngine.cpp0000644000000000000000000000013214771226115016074 xustar0030 mtime=1743072333.109076194 30 atime=1743072333.109076194 30 ctime=1743072333.109076194 qsynth-1.0.3/src/qsynthEngine.cpp0000644000175000001440000000442714771226115016073 0ustar00rncbcusers// qsynthEngine.cpp // /**************************************************************************** Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthEngine.h" //------------------------------------------------------------------------- // qsynthEngine - Meta-fluidsynth engine structure class. // // Constructor. qsynthEngine::qsynthEngine ( qsynthOptions *pOptions, const QString& sName ) { // We're the default (first) engine whether we've given a name... m_bDefault = sName.isEmpty(); if (m_bDefault) { m_pSetup = pOptions->defaultSetup(); } else { m_pSetup = new qsynthSetup(); pOptions->loadSetup(m_pSetup, sName); } // From now on, we must have a name. m_sName = m_pSetup->sDisplayName; pSynth = nullptr; pAudioDriver = nullptr; pMidiRouter = nullptr; pMidiDriver = nullptr; pPlayer = nullptr; pServer = nullptr; iMidiEvent = 0; iMidiState = 0; bMeterEnabled = false; fMeterValue[0] = 0.0f; fMeterValue[1] = 0.0f; } // Default destructor. qsynthEngine::~qsynthEngine (void) { if (!m_bDefault && m_pSetup) { delete m_pSetup; m_pSetup = nullptr; } } // Engine predicate. bool qsynthEngine::isDefault (void) const { return m_bDefault; } // Engine setup accessor. qsynthSetup *qsynthEngine::setup (void) { return m_pSetup; } // Engine name accessors. const QString& qsynthEngine::name (void) const { return m_sName; } void qsynthEngine::setName ( const QString& sName ) { m_sName = sName; } // end of qsynthEngine.cpp qsynth-1.0.3/src/PaxHeaders/qsynthKnob.h0000644000000000000000000000013214771226115015225 xustar0030 mtime=1743072333.110076189 30 atime=1743072333.109076194 30 ctime=1743072333.110076189 qsynth-1.0.3/src/qsynthKnob.h0000644000175000001440000000536614771226115015227 0ustar00rncbcusers// qsynthKnob.h // /**************************************************************************** Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. This widget is based on a design by Thorsten Wilms, implemented by Chris Cannam in Rosegarden, adapted for QSynth by Pedro Lopez-Cabanillas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthKnob_h #define __qsynthKnob_h #include //------------------------------------------------------------------------- // qsynthKnob - A better QDial for everybody class qsynthKnob : public QDial { Q_OBJECT Q_PROPERTY(int defaultValue READ getDefaultValue WRITE setDefaultValue) Q_PROPERTY(DialMode dialMode READ getDialMode WRITE setDialMode) Q_ENUMS(DialMode) public: // Constructor. qsynthKnob(QWidget *pParent = 0); // Destructor. ~qsynthKnob(); int getDefaultValue() const { return m_iDefaultValue; } // Knob dial mode behavior: // DefaultMode - default (old) QDial behavior. // AngularMode - angularly relative to widget center. // LinearMode - proportionally to distance in one ortogonal axis. enum DialMode { DefaultMode, AngularMode, LinearMode }; DialMode getDialMode() const { return m_dialMode; } public slots: // Set default (mid) value. void setDefaultValue(int iDefaultValue); // Set knob dial mode behavior. void setDialMode(DialMode dialMode); protected: // Mouse angle determination. float mouseAngle(const QPoint& pos); // Alternate mouse behavior event handlers. virtual void mousePressEvent(QMouseEvent *pMouseEvent); virtual void mouseMoveEvent(QMouseEvent *pMouseEvent); virtual void mouseReleaseEvent(QMouseEvent *pMouseEvent); virtual void wheelEvent(QWheelEvent *pWheelEvent); private: // Default (mid) value. int m_iDefaultValue; // Knob dial mode behavior. DialMode m_dialMode; // Alternate mouse behavior tracking. bool m_bMousePressed; QPoint m_posMouse; // Just for more precission on the movement float m_fLastDragValue; }; #endif // __qsynthKnob_h // end of qsynthKnob.h qsynth-1.0.3/src/PaxHeaders/appdata0000644000000000000000000000013214771226115014251 xustar0030 mtime=1743072333.096790475 30 atime=1743072333.096076261 30 ctime=1743072333.096790475 qsynth-1.0.3/src/appdata/0000755000175000001440000000000014771226115014316 5ustar00rncbcusersqsynth-1.0.3/src/appdata/PaxHeaders/org.rncbc.qsynth.desktop0000644000000000000000000000013214771226115021123 xustar0030 mtime=1743072333.096637846 30 atime=1743072333.096637846 30 ctime=1743072333.096637846 qsynth-1.0.3/src/appdata/org.rncbc.qsynth.desktop0000644000175000001440000000117714771226115021121 0ustar00rncbcusers[Desktop Entry] Name=Qsynth Version=1.0 GenericName=FluidSynth GUI GenericName[sr]=Кју-синт GenericName[fr]=Interface graphique pour FluidSynth Comment=Qsynth is a FluidSynth Qt GUI Interface Comment[sr]=Програм за управљање програмом Флуид-синт, у графичком окружењу. Comment[fr]=Interface graphique pour Fluidsynth Exec=qsynth Icon=org.rncbc.qsynth Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;Qt; Keywords=Audio;MIDI;ALSA;JACK;FluidSynth;SoundFont;Synthesizer;Sampler;SF2;Qt; Terminal=false Type=Application StartupWMClass=qsynth X-Window-Icon=qsynth X-SuSE-translate=true qsynth-1.0.3/src/appdata/PaxHeaders/org.rncbc.qsynth.metainfo.xml0000644000000000000000000000013214771226115022053 xustar0030 mtime=1743072333.096790475 30 atime=1743072333.096637846 30 ctime=1743072333.096790475 qsynth-1.0.3/src/appdata/org.rncbc.qsynth.metainfo.xml0000644000175000001440000000340614771226115022046 0ustar00rncbcusers org.rncbc.qsynth FSFAP GPL-2.0+ Qsynth A fluidsynth Qt GUI Interface

Qsynth is a fluidsynth GUI front-end application, written in C++ around the Qt framework, using Qt Designer. Eventually it may evolve into a softsynth management application allowing the user to control and manage a variety of command line softsynths.

org.rncbc.qsynth.desktop qsynth https://qsynth.sourceforge.io/image/qsynth-screenshot1.png The main window showing the application in action Audio MIDI ALSA JACK FluidSynth SoundFont Synthesizer Sampler SF2 Qt https://qsynth.sourceforge.io rncbc.org rncbc aka. Rui Nuno Capela rncbc@rncbc.org
qsynth-1.0.3/src/PaxHeaders/qsynthMainForm.h0000644000000000000000000000013214771226115016044 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.111076183 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMainForm.h0000644000175000001440000001256714771226115016047 0ustar00rncbcusers// qsynthMainForm.h // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthMainForm_h #define __qsynthMainForm_h #include "ui_qsynthMainForm.h" #include // Forward declarations class qsynthOptions; class qsynthMessagesForm; class qsynthChannelsForm; #ifdef CONFIG_SYSTEM_TRAY class qsynthSystemTray; #endif class QSocketNotifier; class QSessionManager; class QMimeSource; //---------------------------------------------------------------------------- // qsynthMainForm -- UI wrapper form. class qsynthMainForm : public QWidget { Q_OBJECT public: // Constructor. qsynthMainForm(QWidget *pParent = nullptr, Qt::WindowFlags wflags = Qt::WindowFlags()); // Destructor. ~qsynthMainForm(); static qsynthMainForm *getInstance(); void setup(qsynthOptions *pOptions); void appendMessages(const QString& sText); void appendMessagesColor(const QString& sText, const QColor& rgb); void appendMessagesText(const QString& sText); void appendMessagesError(const QString& sText); bool deleteEngineTab(qsynthEngine *pEngine, int iTab); bool setupEngineTab(qsynthEngine *pEngine, int iTab); void startAllEngines(); bool startEngine(qsynthEngine *pEngine); void stopEngine(qsynthEngine *pEngine); void restartAllEngines(); void restartEngine(qsynthEngine *pEngine); void resetEngine(qsynthEngine *pEngine); enum KnobStyle { Classic, Vokimon, Peppino, Skulpture, Legacy }; void stabilizeForm(); void stabilizeFormEx(); protected slots: void stdoutNotifySlot(int); void sigtermNotifySlot(int); void programReset(); void systemReset(); void promptRestart(); void newEngine(); void deleteEngine(); void toggleMainForm(); void toggleMessagesForm(); void toggleChannelsForm(); void showSetupForm(); void showOptionsForm(); void showAboutForm(); void tabSelect(int); void tabContextMenu(int, const QPoint&); void timerSlot(); void reverbActivate(bool); void chorusActivate(bool); void gainChanged(int); void reverbChanged(int); void chorusChanged(int); void activateEnginesMenu(QAction*); void quitMainForm(); void commitData(QSessionManager& sm); protected: bool queryClose(); void showEvent(QShowEvent *pShowEvent); void hideEvent(QHideEvent *pHideEvent); void closeEvent(QCloseEvent *pCloseEvent); void appendStdoutBuffer(const QString& s); void processStdoutBuffer(); void flushStdoutBuffer(); bool stdoutBlock(int fd, bool bBlock) const; void playLoadFiles(qsynthEngine *pEngine, const QStringList& files, bool bSetup); bool decodeDragFiles(const QMimeSource *pEvent, QStringList& files); void dragEnterEvent(QDragEnterEvent *pDragEnterEvent); void dropEvent(QDropEvent *pDropEvent); void updateMessagesFont(); void updateMessagesLimit(); void updateOutputMeters(); #ifdef CONFIG_SYSTEM_TRAY void updateSystemTray(); #endif void updateContextMenu(); qsynthEngine *currentEngine() const; void setEngineGain(qsynthEngine *pEngine, float fGain); void setEngineReverbOn(qsynthEngine *pEngine, bool bActive); void setEngineReverb(qsynthEngine *pEngine, double fRoom, double fDamp, double fWidth, double fLevel); void setEngineChorusOn(qsynthEngine *pEngine, bool bActive); void setEngineChorus(qsynthEngine *pEngine, int iNr, double fLevel, double fSpeed, double fDepth, int iType); void loadPanelSettings(qsynthEngine *pEngine, bool bUpdate); void savePanelSettings(qsynthEngine *pEngine); void resetChannelsForm(qsynthEngine *pEngine, bool fPreset); void resetGain(); void resetReverb(); void resetChorus(); void updateGain(); void updateReverb(); void updateChorus(); void refreshGain(); void refreshReverb(); void refreshChorus(); void contextMenuEvent(QContextMenuEvent *pEvent); void updateKnobs(); private: // The Qt-designer UI struct... Ui::qsynthMainForm m_ui; // Instance variables. qsynthOptions *m_pOptions; int m_iTimerDelay; int m_iCurrentTab; QSocketNotifier *m_pStdoutNotifier; QSocketNotifier *m_pSigtermNotifier; qsynthMessagesForm *m_pMessagesForm; qsynthChannelsForm *m_pChannelsForm; int m_iGainChanged; int m_iReverbChanged; int m_iChorusChanged; int m_iGainUpdated; int m_iReverbUpdated; int m_iChorusUpdated; QString m_sStdoutBuffer; #ifdef CONFIG_SYSTEM_TRAY qsynthSystemTray *m_pSystemTray; int m_iSystemTrayState; bool m_bQuitClose; #endif bool m_bQuitForce; // Common context menu. QMenu m_menu; // Kind-of singleton reference. static qsynthMainForm *g_pMainForm; // Style for qsynthKnob (QDial) widgets QStyle* m_pKnobStyle; }; #endif // __qsynthMainForm_h // end of qsynthMainForm.h qsynth-1.0.3/src/PaxHeaders/qsynthSetupForm.h0000644000000000000000000000013214771226115016260 xustar0030 mtime=1743072333.115076163 30 atime=1743072333.115076163 30 ctime=1743072333.115076163 qsynth-1.0.3/src/qsynthSetupForm.h0000644000175000001440000001255214771226115016255 0ustar00rncbcusers// qsynthSetupForm.h // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthSetupForm_h #define __qsynthSetupForm_h #include "ui_qsynthSetupForm.h" #include "qsynthSetup.h" // Forward declarations. class qsynthOptions; class qsynthEngine; class qsynthSetup; class qsynthSettingsItemEditor; class QPixmap; //---------------------------------------------------------------------------- // qsynthSetupForm -- UI wrapper form. class qsynthSetupForm : public QDialog { Q_OBJECT public: // Constructor. qsynthSetupForm(QWidget *pParent = nullptr); // Destructor. ~qsynthSetupForm(); // Populate (setup) dialog controls from settings descriptors. void setup(qsynthOptions *pOptions, qsynthEngine *pEngine, bool bNew); // Settings accessors. QTreeWidget *settingsListView() const; qsynthSetup *engineSetup() const; void setSettingsItem(const QString& sKey, const QString& sVal); QString settingsItem(const QString& sKey) const; bool isSettingsItem(const QString& sKey) const; void setSettingsItemEditor(qsynthSettingsItemEditor *pItemEditor); qsynthSettingsItemEditor *settingsItemEditor() const; public slots: void nameChanged(const QString&); void midiDriverChanged(int index); void audioDriverChanged(int index); void settingsChanged(); void soundfontContextMenu(const QPoint&); void openSoundFont(); void editSoundFont(); void removeSoundFont(); void moveUpSoundFont(); void moveDownSoundFont(); void stabilizeForm(); protected slots: void soundfontItemChanged(); void settingsItemActivated(QTreeWidgetItem *pItem, int iColumn); void settingsItemChanged(QTreeWidgetItem *pItem, QTreeWidgetItem *); void settingsItemChanged(); void accept(); void reject(); protected: // A combo-box text item setter helper. void setComboBoxCurrentText( QComboBox *pComboBox, const QString& sText) const; void updateMidiDevices(const QString& sMidiDriver); void updateAudioDevices(const QString& sAudioDriver); void refreshSoundFonts(); private: // The Qt-designer UI struct... Ui::qsynthSetupForm m_ui; // Instance variables. qsynthOptions *m_pOptions; qsynthSetup *m_pSetup; int m_iDirtySetup; int m_iDirtyCount; QString m_sSoundFontDir; QPixmap *m_pXpmSoundFont; qsynthSettingsItemEditor *m_pSettingsItemEditor; qsynthSetup::Settings m_settings; }; //------------------------------------------------------------------------- // qsynthSettingsItemEditor - list-view item editor widget decl. class qsynthSettingsItemEditor : public QWidget { Q_OBJECT public: // Constructor. qsynthSettingsItemEditor( qsynthSetupForm *pSetupForm, const QModelIndex& index, QWidget *pParent = nullptr); // Destructor. virtual ~qsynthSettingsItemEditor(); // Target index accessor. const QModelIndex& index() const; // Value accessors. void setValue(const QString& sValue); QString value() const; // Current/Default value accessors. const QString& currentKey() const; const QString& currentValue() const; const QString& defaultValue() const; signals: void commitEditor(QWidget *pEditor); protected slots: // Local interaction slots. void changed(); void committed(); void reset(); private: // Instance variables. qsynthSetupForm *m_pSetupForm; const QModelIndex& m_index; enum { SpinBox, DoubleSpinBox, LineEdit, ComboBox } m_type; union { QSpinBox *pSpinBox; QDoubleSpinBox *pDoubleSpinBox; QLineEdit *pLineEdit; QComboBox *pComboBox; } m_u; QToolButton *m_pToolButton; QString m_sCurrentKey; QString m_sCurrentValue; QString m_sDefaultValue; }; //------------------------------------------------------------------------- // qsynthSettingsItemDelegate - list-view item delegate decl. #include class qsynthSettingsItemDelegate : public QItemDelegate { Q_OBJECT public: // Constructor. qsynthSettingsItemDelegate(qsynthSetupForm *pSetupForm); protected: void paint(QPainter *pPainter, const QStyleOptionViewItem& option, const QModelIndex& index) const; QWidget *createEditor(QWidget *pParent, const QStyleOptionViewItem& option, const QModelIndex & index) const; void setEditorData(QWidget *pEditor, const QModelIndex &index) const; void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index) const; QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index) const; protected slots: void commitEditor(QWidget *pEditor); private: qsynthSetupForm *m_pSetupForm; }; #endif // __qsynthSetupForm_h // end of qsynthSetupForm.h qsynth-1.0.3/src/PaxHeaders/qsynthDialClassicStyle.cpp0000644000000000000000000000013214771226115020063 xustar0030 mtime=1743072333.107076204 30 atime=1743072333.107076204 30 ctime=1743072333.107076204 qsynth-1.0.3/src/qsynthDialClassicStyle.cpp0000644000175000001440000001365314771226115020063 0ustar00rncbcusers/****************************************************************************** Based on an original design by Thorsten Wilms. Implemented as a widget for the Rosegarden MIDI and audio sequencer and notation editor by Chris Cannam. Extracted into a standalone Qt3 widget by Pedro Lopez-Cabanillas and adapted for use in QSynth. Ported to Qt4 by Chris Cannam. Adapted as a QStyle by Pedro Lopez-Cabanillas. This file, copyright 2019 rncbc aka Rui Nuno Capela, copyright 2003-2006 Chris Cannam, copyright 2005,2008 Pedro Lopez-Cabanillas, copyright 2006 Queen Mary, University of London. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthDialClassicStyle.h" #include #include #include #include #define DIAL_MIN (0.25 * M_PI) #define DIAL_MAX (1.75 * M_PI) #define DIAL_RANGE (DIAL_MAX - DIAL_MIN) static void drawTick(QPainter *p, float angle, int size, bool internal) { float hyp = float(size) / 2.0; float x0 = hyp - (hyp - 1) * sin(angle); float y0 = hyp + (hyp - 1) * cos(angle); if (internal) { float len = hyp / 4; float x1 = hyp - (hyp - len) * sin(angle); float y1 = hyp + (hyp - len) * cos(angle); p->drawLine(int(x0), int(y0), int(x1), int(y1)); } else { float len = hyp / 4; float x1 = hyp - (hyp + len) * sin(angle); float y1 = hyp + (hyp + len) * cos(angle); p->drawLine(int(x0), int(y0), int(x1), int(y1)); } } void qsynthDialClassicStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const { if (cc != QStyle::CC_Dial) { QCommonStyle::drawComplexControl(cc, opt, p, widget); return; } const QStyleOptionSlider *dial = qstyleoption_cast(opt); if (dial == nullptr) return; float angle = DIAL_MIN + (DIAL_RANGE * (float(dial->sliderValue - dial->minimum) / (float(dial->maximum - dial->minimum)))); int degrees = int(angle * 180.0 / M_PI); int ns = dial->tickInterval; int numTicks = 1 + (dial->maximum + ns - dial->minimum) / ns; int size = dial->rect.width() < dial->rect.height() ? dial->rect.width() : dial->rect.height(); int scale = 1; int width = size * scale; int indent = (int)(width * 0.15 + 1); QPalette pal = opt->palette; QColor knobColor = pal.mid().color(); //pal.background().color(); QColor meterColor = (dial->state & State_Enabled) ? pal.highlight().color() : pal.mid().color(); QPen pen; QColor c; p->save(); p->setRenderHint(QPainter::Antialiasing, true); p->translate(1+(dial->rect.width()-size)/2, 1+(dial->rect.height()-size)/2); // Knob body and face... pen.setColor(knobColor); pen.setWidth(scale * 2); pen.setCapStyle(Qt::FlatCap); p->setPen(pen); QRadialGradient gradient(size/2, size/2, size-indent, size/2-indent, size/2-indent); gradient.setColorAt(0, knobColor.lighter()); gradient.setColorAt(1, knobColor.darker()); p->setBrush(gradient); p->drawEllipse(indent, indent, width-2*indent, width-2*indent); // The bright metering bit... c = meterColor; pen.setColor(c); pen.setWidth(indent); p->setPen(pen); int arcLen = -(degrees - 45) * 16; if (arcLen == 0) arcLen = -16; p->drawArc(indent/2, indent/2, width-indent, width-indent, (180 + 45) * 16, arcLen); p->setBrush(Qt::NoBrush); // Tick notches... if (dial->subControls & QStyle::SC_DialTickmarks) { // std::cerr << "Notches visible" << std::endl; pen.setColor(pal.dark().color()); pen.setWidth(scale); p->setPen(pen); for (int i = 0; i < numTicks; ++i) { int div = numTicks; if (div > 1) --div; drawTick(p, DIAL_MIN + (DIAL_MAX - DIAL_MIN) * i / div, width, true); } } // Shadowing... pen.setWidth(scale); p->setPen(pen); // Knob shadow... int shadowAngle = -720; c = knobColor.darker(); for (int arc = 120; arc < 2880; arc += 240) { pen.setColor(c); p->setPen(pen); p->drawArc(indent, indent, width-2*indent, width-2*indent, shadowAngle + arc, 240); p->drawArc(indent, indent, width-2*indent, width-2*indent, shadowAngle - arc, 240); c = c.lighter(110); } // Scale shadow... shadowAngle = 2160; c = pal.dark().color(); for (int arc = 120; arc < 2880; arc += 240) { pen.setColor(c); p->setPen(pen); p->drawArc(scale/2, scale/2, width-scale, width-scale, shadowAngle + arc, 240); p->drawArc(scale/2, scale/2, width-scale, width-scale, shadowAngle - arc, 240); c = c.lighter(108); } // Undraw the bottom part... pen.setColor(pal.window().color()); pen.setWidth(scale * 4); p->setPen(pen); p->drawArc(scale/2, scale/2, width-scale, width-scale, -45 * 16, -90 * 16); // Pointer notch... float hyp = float(width) / 2.0; float len = hyp - indent; --len; float x0 = hyp; float y0 = hyp; float x = hyp - len * sin(angle); float y = hyp + len * cos(angle); c = pal.dark().color(); pen.setColor((dial->state & State_Enabled) ? c.darker(130) : c); pen.setWidth(scale * 2); p->setPen(pen); p->drawLine(int(x0), int(y0), int(x), int(y)); // done p->restore(); } qsynth-1.0.3/src/PaxHeaders/qsynthOptions.h0000644000000000000000000000013214771226115015767 xustar0030 mtime=1743072333.112076178 30 atime=1743072333.112076178 30 ctime=1743072333.112076178 qsynth-1.0.3/src/qsynthOptions.h0000644000175000001440000000765214771226115015771 0ustar00rncbcusers// qsynthOptions.h // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthOptions_h #define __qsynthOptions_h #include "qsynthSetup.h" // Forward declarations. class QComboBox; // Former fluidsynth < 2.0 defaults... // #define QSYNTH_MASTER_DEFAULT_GAIN 1.0 #define QSYNTH_REVERB_DEFAULT_ROOMSIZE 0.2 #define QSYNTH_REVERB_DEFAULT_DAMP 0.0 #define QSYNTH_REVERB_DEFAULT_WIDTH 0.5 #define QSYNTH_REVERB_DEFAULT_LEVEL 0.9 #define QSYNTH_CHORUS_DEFAULT_N 3 #define QSYNTH_CHORUS_DEFAULT_LEVEL 2.0 #define QSYNTH_CHORUS_DEFAULT_SPEED 0.3 #define QSYNTH_CHORUS_DEFAULT_DEPTH 8.0 #define QSYNTH_CHORUS_DEFAULT_TYPE 0 //------------------------------------------------------------------------- // qsynthOptions - Prototype settings class. // // Forward declaration. class qsynthEngine; class qsynthOptions { public: // Constructor. qsynthOptions(); // Default destructor. ~qsynthOptions(); // The settings object accessor. QSettings& settings(); // Explicit I/O methods. void loadOptions(); void saveOptions(); // Command line arguments parser. bool parse_args(const QStringList& args); #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) void show_error(const QString& msg); #else // Command line usage helper. void print_usage(const QString& arg0); #endif // Default instance setup accessor. qsynthSetup *defaultSetup(); // Display options... QString sMessagesFont; bool bMessagesLimit; int iMessagesLimitLines; bool bMessagesLog; QString sMessagesLogPath; bool bQueryClose; bool bKeepOnTop; bool bStdoutCapture; bool bOutputMeters; bool bSystemTray; bool bSystemTrayQueryClose; bool bStartMinimized; int iBaseFontSize; int iKnobStyle; int iKnobMotion; QString sCustomColorTheme; QString sCustomStyleTheme; // Default options... QString sSoundFontDir; bool bPresetPreview; // Available custom engines list. QStringList engines; // Language choices QString sLanguage; // Engine management methods. void newEngine(qsynthEngine *pEngine); bool renameEngine(qsynthEngine *pEngine); void deleteEngine(qsynthEngine *pEngine); // Setup registry methods. void loadSetup(qsynthSetup *pSetup, const QString& sName); void saveSetup(qsynthSetup *pSetup, const QString& sName); // Preset management methods. bool loadPreset(qsynthEngine *pEngine, const QString& sPreset); bool savePreset(qsynthEngine *pEngine, const QString& sPreset); bool deletePreset(qsynthEngine *pEngine, const QString& sPreset); // Combo box history persistence helper prototypes. void loadComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); void saveComboBoxHistory(QComboBox *pComboBox, int iLimit = 8); // Widget geometry persistence helper prototypes. void saveWidgetGeometry(QWidget *pWidget, bool bVisible = false); void loadWidgetGeometry(QWidget *pWidget, bool bVisible = false); private: // Settings member variables. QSettings m_settings; // The default setup descriptor. qsynthSetup *m_pDefaultSetup; }; #endif // __qsynthOptions_h // end of qsynthOptions.h qsynth-1.0.3/src/PaxHeaders/qsynthOptionsForm.cpp0000644000000000000000000000013214771226115017146 xustar0030 mtime=1743072333.113076173 30 atime=1743072333.112076178 30 ctime=1743072333.113076173 qsynth-1.0.3/src/qsynthOptionsForm.cpp0000644000175000001440000004020214771226115017134 0ustar00rncbcusers// qsynthOptionsForm.cpp // /**************************************************************************** Copyright (C) 2003-2022, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthOptionsForm.h" #include "qsynthPaletteForm.h" #include "qsynthOptions.h" #include "qsynth.h" #include #include #include #include #include #include #ifdef CONFIG_SYSTEM_TRAY #include #endif // Default (empty/blank) name. static const char *g_pszDefName = QT_TRANSLATE_NOOP("qsynthOptionsForm", "(default)"); // Native (not translatable) English language name static const char *g_pszEnglish = "English"; //---------------------------------------------------------------------------- // qsynthOptionsForm -- UI wrapper form. // Constructor. qsynthOptionsForm::qsynthOptionsForm ( QWidget *pParent ) : QDialog(pParent) { // Setup UI struct... m_ui.setupUi(this); // No options descriptor initially (the caller will set it). m_pOptions = nullptr; // Initialize dirty control state. m_iDirtySetup = 0; m_iDirtyCount = 0; // Set dialog validators... m_ui.MessagesLimitLinesComboBox->setValidator(new QIntValidator(m_ui.MessagesLimitLinesComboBox)); // Try to restore old window positioning. adjustSize(); // UI connections... QObject::connect(m_ui.MessagesFontPushButton, SIGNAL(clicked()), SLOT(chooseMessagesFont())); QObject::connect(m_ui.MessagesLogCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLogPathComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLogPathToolButton, SIGNAL(clicked()), SLOT(browseMessagesLogPath())); QObject::connect(m_ui.QueryCloseCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.KeepOnTopCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.StdoutCaptureCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.OutputMetersCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); #ifdef CONFIG_SYSTEM_TRAY QObject::connect(m_ui.SystemTrayCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.SystemTrayQueryCloseCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.StartMinimizedCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); #endif QObject::connect(m_ui.CustomColorThemeComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.CustomColorThemeToolButton, SIGNAL(clicked()), SLOT(editCustomColorThemes())); QObject::connect(m_ui.CustomStyleThemeComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.BaseFontSizeComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLimitCheckBox, SIGNAL(stateChanged(int)), SLOT(optionsChanged())); QObject::connect(m_ui.MessagesLimitLinesComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.KnobStyleComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.KnobMouseMotionComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.DefaultLanguageComboBox, SIGNAL(activated(int)), SLOT(optionsChanged())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); } // Destructor. qsynthOptionsForm::~qsynthOptionsForm (void) { } // Populate (setup) dialog controls from options descriptors. void qsynthOptionsForm::setup ( qsynthOptions *pOptions ) { // Set reference descriptor. m_pOptions = pOptions; // Start clean. m_iDirtyCount = 0; // Avoid nested changes. m_iDirtySetup++; // Load combo box history... m_pOptions->loadComboBoxHistory(m_ui.MessagesLogPathComboBox); // Load Display options... QFont font; // Messages font. if (m_pOptions->sMessagesFont.isEmpty() || !font.fromString(m_pOptions->sMessagesFont)) font = QFont("Monospace", 8); QPalette pal(m_ui.MessagesFontTextLabel->palette()); pal.setColor(QPalette::Window, pal.base().color()); m_ui.MessagesFontTextLabel->setPalette(pal); m_ui.MessagesFontTextLabel->setFont(font); m_ui.MessagesFontTextLabel->setText( font.family() + ' ' + QString::number(font.pointSize())); // Messages limit option. m_ui.MessagesLimitCheckBox->setChecked(m_pOptions->bMessagesLimit); m_ui.MessagesLimitLinesComboBox->setEditText( QString::number(m_pOptions->iMessagesLimitLines)); // Logging options m_ui.MessagesLogCheckBox->setChecked(m_pOptions->bMessagesLog); m_ui.MessagesLogPathComboBox->setEditText(m_pOptions->sMessagesLogPath); // Other options finally. m_ui.QueryCloseCheckBox->setChecked(m_pOptions->bQueryClose); m_ui.KeepOnTopCheckBox->setChecked(m_pOptions->bKeepOnTop); m_ui.StdoutCaptureCheckBox->setChecked(m_pOptions->bStdoutCapture); m_ui.OutputMetersCheckBox->setChecked(m_pOptions->bOutputMeters); #ifdef CONFIG_SYSTEM_TRAY m_ui.SystemTrayCheckBox->setChecked(m_pOptions->bSystemTray); m_ui.SystemTrayQueryCloseCheckBox->setChecked(m_pOptions->bSystemTrayQueryClose); m_ui.StartMinimizedCheckBox->setChecked(m_pOptions->bStartMinimized); #endif if (m_pOptions->iBaseFontSize > 0) { m_ui.BaseFontSizeComboBox->setEditText( QString::number(m_pOptions->iBaseFontSize)); } else { m_ui.BaseFontSizeComboBox->setCurrentIndex(0); } // Knobs m_ui.KnobStyleComboBox->setCurrentIndex(m_pOptions->iKnobStyle); m_ui.KnobMouseMotionComboBox->setCurrentIndex(m_pOptions->iKnobMotion); #if defined(Q_OS_WINDOWS) m_ui.StdoutCaptureCheckBox->setChecked(false); m_ui.StdoutCaptureCheckBox->setEnabled(false); #endif #ifdef CONFIG_SYSTEM_TRAY const bool bSystemTray = QSystemTrayIcon::isSystemTrayAvailable(); #else const bool bSystemTray = false; #endif if (!bSystemTray) { m_ui.SystemTrayCheckBox->setChecked(false); m_ui.SystemTrayCheckBox->setEnabled(false); m_ui.SystemTrayQueryCloseCheckBox->setChecked(false); m_ui.SystemTrayQueryCloseCheckBox->setEnabled(false); m_ui.StartMinimizedCheckBox->setChecked(false); m_ui.StartMinimizedCheckBox->setEnabled(false); } // Custom display options... resetCustomColorThemes(m_pOptions->sCustomColorTheme); resetCustomStyleThemes(m_pOptions->sCustomStyleTheme); // Default display options... resetDefaultLanguage(m_pOptions->sLanguage); // Done. m_iDirtySetup--; stabilizeForm(); } // Accept options (OK button slot). void qsynthOptionsForm::accept (void) { // Save options... if (m_iDirtyCount > 0) { const bool bOldStdoutCapture = m_pOptions->bStdoutCapture; const bool bOldKeepOnTop = m_pOptions->bKeepOnTop; const int iOldBaseFontSize = m_pOptions->iBaseFontSize; m_pOptions->sMessagesFont = m_ui.MessagesFontTextLabel->font().toString(); m_pOptions->bMessagesLimit = m_ui.MessagesLimitCheckBox->isChecked(); m_pOptions->iMessagesLimitLines = m_ui.MessagesLimitLinesComboBox->currentText().toInt(); m_pOptions->bMessagesLog = m_ui.MessagesLogCheckBox->isChecked(); m_pOptions->sMessagesLogPath = m_ui.MessagesLogPathComboBox->currentText(); m_pOptions->bQueryClose = m_ui.QueryCloseCheckBox->isChecked(); m_pOptions->bKeepOnTop = m_ui.KeepOnTopCheckBox->isChecked(); m_pOptions->bStdoutCapture = m_ui.StdoutCaptureCheckBox->isChecked(); m_pOptions->bOutputMeters = m_ui.OutputMetersCheckBox->isChecked(); #ifdef CONFIG_SYSTEM_TRAY m_pOptions->bSystemTray = m_ui.SystemTrayCheckBox->isChecked(); m_pOptions->bSystemTrayQueryClose = m_ui.SystemTrayQueryCloseCheckBox->isChecked(); m_pOptions->bStartMinimized = m_ui.StartMinimizedCheckBox->isChecked(); #endif m_pOptions->iBaseFontSize = m_ui.BaseFontSizeComboBox->currentText().toInt(); // Knobs m_pOptions->iKnobStyle = m_ui.KnobStyleComboBox->currentIndex(); m_pOptions->iKnobMotion = m_ui.KnobMouseMotionComboBox->currentIndex(); // Custom color/style theme options... const QString sOldCustomStyleTheme = m_pOptions->sCustomStyleTheme; if (m_ui.CustomStyleThemeComboBox->currentIndex() > 0) m_pOptions->sCustomStyleTheme = m_ui.CustomStyleThemeComboBox->currentText(); else m_pOptions->sCustomStyleTheme.clear(); const QString sOldCustomColorTheme = m_pOptions->sCustomColorTheme; if (m_ui.CustomColorThemeComboBox->currentIndex() > 0) m_pOptions->sCustomColorTheme = m_ui.CustomColorThemeComboBox->currentText(); else m_pOptions->sCustomColorTheme.clear(); const QString sOldLanguage = m_pOptions->sLanguage; if (m_ui.DefaultLanguageComboBox->currentIndex() > 0) m_pOptions->sLanguage = m_ui.DefaultLanguageComboBox->currentData().toString(); else m_pOptions->sLanguage.clear(); // Check whether restart is needed or whether // custom options maybe set up immediately... int iNeedRestart = 0; if (m_pOptions->sCustomStyleTheme != sOldCustomStyleTheme) { if (m_pOptions->sCustomStyleTheme.isEmpty()) { ++iNeedRestart; } else { QApplication::setStyle( QStyleFactory::create(m_pOptions->sCustomStyleTheme)); } } if (m_pOptions->sCustomColorTheme != sOldCustomColorTheme) { if (m_pOptions->sCustomColorTheme.isEmpty()) { ++iNeedRestart; } else { QPalette pal; if (qsynthPaletteForm::namedPalette( &m_pOptions->settings(), m_pOptions->sCustomColorTheme, pal)) QApplication::setPalette(pal); } } if (m_pOptions->sLanguage != sOldLanguage) { ++iNeedRestart; } // Warn if something will be only effective on next run... if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || (!bOldStdoutCapture && m_pOptions->bStdoutCapture) || ( bOldKeepOnTop && !m_pOptions->bKeepOnTop) || (!bOldKeepOnTop && m_pOptions->bKeepOnTop) || (iOldBaseFontSize != m_pOptions->iBaseFontSize)) { ++iNeedRestart; } // Show restart message if needed... if (iNeedRestart > 0) { QMessageBox::information(this, tr("Information"), tr("Some settings may be only effective\n" "next time you start this application.")); } // Reset dirty flag. m_iDirtyCount = 0; } // Save combobox history... m_pOptions->saveComboBoxHistory(m_ui.MessagesLogPathComboBox); // Save/commit to disk. m_pOptions->saveOptions(); // Just go with dialog acceptance. QDialog::accept(); } // Reject options (Cancel button slot). void qsynthOptionsForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, tr("Warning"), tr("Some options have been changed.") + "\n\n" + tr("Do you want to apply the changes?"), QMessageBox::Apply | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Apply: accept(); return; case QMessageBox::Discard: break; default: // Cancel. bReject = false; } } if (bReject) QDialog::reject(); } // Dirty up options. void qsynthOptionsForm::optionsChanged() { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Custom color palette theme manager. void qsynthOptionsForm::editCustomColorThemes (void) { qsynthPaletteForm form(this); form.setSettings(&m_pOptions->settings()); QString sCustomColorTheme; int iDirtyCustomColorTheme = 0; const int iCustomColorTheme = m_ui.CustomColorThemeComboBox->currentIndex(); if (iCustomColorTheme > 0) { sCustomColorTheme = m_ui.CustomColorThemeComboBox->itemText( iCustomColorTheme); form.setPaletteName(sCustomColorTheme); } if (form.exec() == QDialog::Accepted) { sCustomColorTheme = form.paletteName(); ++iDirtyCustomColorTheme; } if (iDirtyCustomColorTheme > 0 || form.isDirty()) { resetCustomColorThemes(sCustomColorTheme); optionsChanged(); } } // Custom color palette themes settler. void qsynthOptionsForm::resetCustomColorThemes ( const QString& sCustomColorTheme ) { m_ui.CustomColorThemeComboBox->clear(); m_ui.CustomColorThemeComboBox->addItem( tr(g_pszDefName)); m_ui.CustomColorThemeComboBox->addItems( qsynthPaletteForm::namedPaletteList(&m_pOptions->settings())); int iCustomColorTheme = 0; if (!sCustomColorTheme.isEmpty()) { iCustomColorTheme = m_ui.CustomColorThemeComboBox->findText( sCustomColorTheme); if (iCustomColorTheme < 0) iCustomColorTheme = 0; } m_ui.CustomColorThemeComboBox->setCurrentIndex(iCustomColorTheme); } // Custom widget style themes settler. void qsynthOptionsForm::resetCustomStyleThemes ( const QString& sCustomStyleTheme ) { m_ui.CustomStyleThemeComboBox->clear(); m_ui.CustomStyleThemeComboBox->addItem( tr(g_pszDefName)); m_ui.CustomStyleThemeComboBox->addItems(QStyleFactory::keys()); int iCustomStyleTheme = 0; if (!sCustomStyleTheme.isEmpty()) { iCustomStyleTheme = m_ui.CustomStyleThemeComboBox->findText( sCustomStyleTheme); if (iCustomStyleTheme < 0) iCustomStyleTheme = 0; } m_ui.CustomStyleThemeComboBox->setCurrentIndex(iCustomStyleTheme); } void qsynthOptionsForm::resetDefaultLanguage ( const QString& sLanguage ) { m_ui.DefaultLanguageComboBox->clear(); m_ui.DefaultLanguageComboBox->addItem( tr(g_pszDefName)); m_ui.DefaultLanguageComboBox->addItem( QString(g_pszEnglish), QString("C")); QDirIterator iter(qsynthApplication::translationsPath, {"*.qm"}, QDir::NoFilter, QDirIterator::NoIteratorFlags); while (iter.hasNext()) { const QFileInfo fi(iter.next()); QString name = fi.fileName(); if (name.startsWith("qsynth_")) { name.remove(0, name.indexOf('_') + 1); name.truncate(name.lastIndexOf('.')); const QLocale locale(name); m_ui.DefaultLanguageComboBox->addItem( locale.nativeLanguageName().section(' ', 0, 0), name); } } int iLanguage = 0; if (!sLanguage.isEmpty()) iLanguage = m_ui.DefaultLanguageComboBox->findData(sLanguage); m_ui.DefaultLanguageComboBox->setCurrentIndex(iLanguage); } // Stabilize current form state. void qsynthOptionsForm::stabilizeForm() { bool bValid = (m_iDirtyCount > 0); m_ui.MessagesLimitLinesComboBox->setEnabled( m_ui.MessagesLimitCheckBox->isChecked()); bool bEnabled = m_ui.MessagesLogCheckBox->isChecked(); m_ui.MessagesLogPathComboBox->setEnabled(bEnabled); m_ui.MessagesLogPathToolButton->setEnabled(bEnabled); if (bEnabled && bValid) { const QString& sPath = m_ui.MessagesLogPathComboBox->currentText(); bValid = !sPath.isEmpty(); } #ifdef CONFIG_SYSTEM_TRAY bEnabled = m_ui.SystemTrayCheckBox->isChecked(); m_ui.SystemTrayQueryCloseCheckBox->setEnabled(bEnabled); m_ui.StartMinimizedCheckBox->setEnabled(bEnabled); #endif m_ui.DialogButtonBox->button(QDialogButtonBox::Ok)->setEnabled(bValid); } // Messages log path browse slot. void qsynthOptionsForm::browseMessagesLogPath() { QString sFileName = QFileDialog::getSaveFileName( this, // Parent. tr("Messages Log"), // Caption. m_ui.MessagesLogPathComboBox->currentText(), // Start here. tr("Log files") + " (*.log)" // Filter (log files) ); if (!sFileName.isEmpty()) { m_ui.MessagesLogPathComboBox->setEditText(sFileName); m_ui.MessagesLogPathComboBox->setFocus(); optionsChanged(); } } // The messages font selection dialog. void qsynthOptionsForm::chooseMessagesFont() { bool bOk = false; QFont font = QFontDialog::getFont(&bOk, m_ui.MessagesFontTextLabel->font(), this); if (bOk) { m_ui.MessagesFontTextLabel->setFont(font); m_ui.MessagesFontTextLabel->setText( font.family() + ' ' + QString::number(font.pointSize())); optionsChanged(); } } // end of qsynthOptionsForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthMainForm.ui0000644000000000000000000000013214771226115016232 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.111076183 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMainForm.ui0000644000175000001440000007735314771226115016241 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthMainForm 0 0 749 192 :/images/qsynth.svg 75 true Master 4 4 50 false &Gain Qt::AlignCenter false GainSpinBox 50 false Master Gain 1000 Qt::Horizontal 20.0 true 50 false Master Gain Qt::AlignHCenter 1000 Complete engine restart Re&start :/images/restart1.png 75 true Reverb 4 4 0 20 50 false Reverb effect activation Ac&tive 50 false Reverb Level Qt::AlignHCenter 100 50 false Reverb Level 100 Qt::Horizontal 10.0 true 50 false &Level Qt::AlignCenter false ReverbLevelSpinBox 50 false Reverb Width Qt::AlignHCenter 100 50 false &Width Qt::AlignCenter false ReverbWidthSpinBox 50 false Reverb Width 100 Qt::Horizontal 10.0 true 50 false Reverb Damp Factor Qt::AlignHCenter 100 50 false D&amp Qt::AlignCenter false ReverbDampSpinBox 50 false Reverb Damp Factor 100 Qt::Horizontal 10.0 true 50 false Reverb Room Size Qt::AlignHCenter 120 50 false R&oom Qt::AlignCenter false ReverbRoomSpinBox 50 false Reverb Room Size 120 Qt::Horizontal 10.0 true 75 true Chorus 4 4 0 20 50 false Chorus Modulation Type Sine Triangle 0 20 50 false T&ype: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false ChorusTypeComboBox 0 20 50 false Chorus effect activation Act&ive 50 false Number of Chorus Stages 99 Qt::Horizontal 10.0 true 50 false &N Qt::AlignCenter false ChorusNrSpinBox 50 false Number of Chorus Stages Qt::AlignHCenter 99 50 false Chorus Level 100 Qt::Horizontal 10.0 true 50 false Le&vel Qt::AlignCenter false ChorusLevelSpinBox 50 false Chorus Level Qt::AlignHCenter 100 50 false Chorus Speed (Hz) 30 500 Qt::Horizontal 10.0 true 50 false Chorus Speed Hz Spee&d Qt::AlignCenter false ChorusSpeedSpinBox 50 false Chorus Speed (Hz) Qt::AlignHCenter 30 500 50 false Chorus Depth (ms) 210 Qt::Horizontal 10.0 true 50 false Dept&h Qt::AlignCenter false ChorusDepthSpinBox 50 false Chorus Depth (ms) Qt::AlignHCenter 210 4 4 Output peak level 8 4 Quit this application &Quit :/images/quit1.png false Show general options dialog &Options... :/images/options1.png false Show/hide the messages log window &Messages :/images/messages1.png true false Show information about this application A&bout... :/images/about1.png false Qt::Vertical QSizePolicy::Expanding 8 8 System reset &Panic :/images/panic1.png Program reset (all channels) &Reset :/images/reset1.png Show instance settings and configuration dialog Set&up... :/images/setup1.png false Show/hide the channels view window &Channels :/images/channels1.png true false 4 0 22 22 24 24 Qt::NoFocus Add a new engine :/images/add1.png Qt::StrongFocus Engine selector (right-click for menu) Qt::Horizontal QSizePolicy::Expanding 8 8 22 22 24 24 Qt::NoFocus Delete current engine :/images/remove1.png QTabBar QWidget
qtabbar.h
1
qsynthKnob QDial
qsynthKnob.h
qsynthTabBar QTabBar
qsynthTabBar.h
1
qsynthMeter QWidget
qsynthMeter.h
SetupPushButton GainDial GainSpinBox RestartPushButton SystemResetPushButton ProgramResetPushButton ChannelsPushButton ReverbRoomDial ReverbRoomSpinBox ReverbDampDial ReverbDampSpinBox ReverbWidthDial ReverbWidthSpinBox ReverbLevelDial ReverbLevelSpinBox ReverbActiveCheckBox ChorusNrDial ChorusNrSpinBox ChorusLevelDial ChorusLevelSpinBox ChorusSpeedDial ChorusSpeedSpinBox ChorusDepthDial ChorusDepthSpinBox ChorusActiveCheckBox ChorusTypeComboBox QuitPushButton OptionsPushButton MessagesPushButton AboutPushButton
qsynth-1.0.3/src/PaxHeaders/qsynthMeter.h0000644000000000000000000000013214771226115015410 xustar0030 mtime=1743072333.112076178 30 atime=1743072333.112076178 30 ctime=1743072333.112076178 qsynth-1.0.3/src/qsynthMeter.h0000644000175000001440000000766514771226115015416 0ustar00rncbcusers// qsynthMeter.h // /**************************************************************************** Copyright (C) 2004-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthMeter_h #define __qsynthMeter_h #include #include // Forward declarations. class qsynthMeter; class QHBoxLayout; //---------------------------------------------------------------------------- // qsynthMeterScale -- Meter bridge scale widget. class qsynthMeterScale : public QWidget { Q_OBJECT public: // Constructor. qsynthMeterScale(qsynthMeter *pMeter); protected: // Specific event handlers. void paintEvent(QPaintEvent *); // Draw IEC scale line and label. void drawLineLabel(QPainter *p, int y, const QString& sLabel); private: // Local instance variables. qsynthMeter *m_pMeter; // Running variables. int m_iLastY; }; //---------------------------------------------------------------------------- // qsynthMeterValue -- Meter bridge value widget. class qsynthMeterValue : public QFrame { Q_OBJECT public: // Constructor. qsynthMeterValue(qsynthMeter *pMeter); // Frame value accessors. void setValue(float fValue); // Value refreshment. void refresh(); // Reset peak holder. void peakReset(); protected: // Specific event handlers. void paintEvent(QPaintEvent *); void resizeEvent(QResizeEvent *); private: // Local instance variables. qsynthMeter *m_pMeter; // Running variables. float m_fValue; int m_iValue; float m_fValueDecay; int m_iPeak; float m_fPeakDecay; int m_iPeakHold; int m_iPeakColor; }; //---------------------------------------------------------------------------- // qsynthMeter -- Meter bridge slot widget. class qsynthMeter : public QWidget { Q_OBJECT public: // Constructor. qsynthMeter(QWidget *pParent = 0); // Default destructor. ~qsynthMeter(); // Port count accessor. int portCount() const; // Value proxy. void setValue(int iPort, float fValue); // IEC scale accessors. int iec_scale(float dB) const; int iec_level(int iIndex) const; // For faster scaling when drawing... int scale(float fValue) const { return int(m_fScale * fValue); } // Pixmap accessors. const QPixmap& pixmap() const; void updatePixmap(); // Slot refreshment. void refresh(); // Color/level indexes. enum { ColorOver = 0, Color0dB = 1, Color3dB = 2, Color6dB = 3, Color10dB = 4, LevelCount = 5, ColorBack = 5, ColorFore = 6, ColorCount = 7 }; // Common resource accessors. const QColor& color(int iIndex) const; // Peak falloff mode setting. void setPeakFalloff(int bPeakFalloff); int peakFalloff() const; // Reset peak holder. void peakReset(); protected: // Specific event handlers. virtual void resizeEvent(QResizeEvent *); private: // Local instance variables. QHBoxLayout *m_pHBoxLayout; int m_iPortCount; int m_iScaleCount; qsynthMeterValue **m_ppValues; qsynthMeterScale **m_ppScales; float m_fScale; int m_levels[LevelCount]; QColor m_colors[ColorCount]; QPixmap m_pixmap; // Peak falloff mode setting (0=no peak falloff). int m_iPeakFalloff; }; #endif // __qsynthMeter_h // end of qsynthMeter.h qsynth-1.0.3/src/PaxHeaders/qsynthOptionsForm.ui0000644000000000000000000000013214771226115017001 xustar0030 mtime=1743072333.113076173 30 atime=1743072333.113076173 30 ctime=1743072333.113076173 qsynth-1.0.3/src/qsynthOptionsForm.ui0000644000175000001440000007137414771226115017005 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2022, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthOptionsForm 0 0 555 389 Options :/images/options1.png true 0 General 75 true Messages true 180 0 180 32767 50 false Sample messages text font display true QFrame::StyledPanel QFrame::Sunken Qt::AlignCenter false 50 false Select font for the messages text display &Font... false Qt::Horizontal QSizePolicy::Expanding 20 20 50 false Whether to keep a maximum number of lines in the messages window &Messages limit: 50 false The maximum number of message lines to keep in view true 3 100 250 500 1000 2500 5000 75 true Logging true 0 0 50 false Messages log file true 22 22 24 24 50 false Qt::TabFocus Browse for the messages log file location ... 50 false Whether to activate a messages logging to file. Messages &log file: 75 true Other true 50 false Whether to ask for confirmation on application exit &Confirm application close 50 false Whether to keep all child windows on top of the main window &Keep child windows always on top 50 false Whether to capture standard output (stdout/stderr) into messages window Capture standard &output 50 false Whether to monitor and show engine output peak level meters Output &peak level meters Qt::Horizontal 20 20 50 false Whether to enable the system tray icon &Enable system tray icon 50 false Whether to show system tray message on main window close Sho&w system tray message on close 50 false Whether to start minimized to system tray Start minimi&zed to system tray Qt::Vertical QSizePolicy::Expanding 20 20 Display 75 true Knobs true 50 false Kno&b graphic style: KnobStyleComboBox 50 false Graphic style for knobs Classic Vokimon Peppino Skulpture Legacy Qt::Horizontal QSizePolicy::Expanding 20 20 50 false Mouse motion be&havior: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter KnobMouseMotionComboBox 50 false Mouse motion behavior for knobs 1 Legacy Radial Linear 75 true Custom true 50 false &Color palette theme: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter CustomColorThemeComboBox 50 false Custom color palette theme false (default) Wonton Soup KXStudio 22 22 24 24 50 false Qt::TabFocus Manage custom color palette themes ... Qt::Horizontal 20 20 50 false &Widget style theme: CustomStyleThemeComboBox 50 false Custom widget style theme false (default) 75 true Defaults true 50 false Language DefaultLanguageComboBox 50 false (default) Qt::Horizontal 20 20 50 false &Base font size: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter BaseFontSizeComboBox 50 false Base application font size (pt.) true (default) 6 7 8 9 10 11 12 Qt::Vertical QSizePolicy::Expanding 20 20 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok OptionsTabWidget KnobStyleComboBox KnobMouseMotionComboBox CustomColorThemeComboBox CustomColorThemeToolButton CustomStyleThemeComboBox BaseFontSizeComboBox DialogButtonBox qsynth-1.0.3/src/PaxHeaders/qsynthTabBar.cpp0000644000000000000000000000013214771226115016022 xustar0030 mtime=1743072333.116076158 30 atime=1743072333.116076158 30 ctime=1743072333.116076158 qsynth-1.0.3/src/qsynthTabBar.cpp0000644000175000001440000000567014771226115016022 0ustar00rncbcusers// qsynthTabBar.cpp // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthTabBar.h" #include "qsynthEngine.h" #include #include // Common icon set. static int g_iIconRefCount = 0; static QIcon *g_pIconLedOn = nullptr; static QIcon *g_pIconLedOff = nullptr; //------------------------------------------------------------------------- // qsynthTabBar - Instance tab widget class. // // Constructor. qsynthTabBar::qsynthTabBar ( QWidget *pParent ) : QTabBar(pParent) { QTabBar::setShape(QTabBar::RoundedSouth); if (++g_iIconRefCount == 1) { g_pIconLedOn = new QIcon(":/images/ledon1.png"); g_pIconLedOff = new QIcon(":/images/ledoff1.png"); } } // Destructor. qsynthTabBar::~qsynthTabBar (void) { if (--g_iIconRefCount == 0) { delete g_pIconLedOn; delete g_pIconLedOff; g_pIconLedOn = nullptr; g_pIconLedOff = nullptr; } } // Engine accessor. qsynthEngine *qsynthTabBar::engine ( int iTab ) const { return static_cast (QTabBar::tabData(iTab).value()); } // Current engine accessor. qsynthEngine *qsynthTabBar::currentEngine (void) const { return engine(QTabBar::currentIndex()); } // Engine adder. int qsynthTabBar::addEngine ( qsynthEngine *pEngine ) { int iTab = QTabBar::addTab(*g_pIconLedOff, pEngine->name()); if (iTab >= 0) { QTabBar::setTabData(iTab, QVariant::fromValue(static_cast (pEngine))); } return iTab; } // Engine removal. void qsynthTabBar::removeEngine ( int iTab ) { qsynthEngine *pEngine = engine(iTab); if (pEngine) delete pEngine; QTabBar::removeTab(iTab); } // Engine tab icon accessor. void qsynthTabBar::setOn ( int iTab, bool bOn ) { QTabBar::setTabIcon(iTab, bOn ? *g_pIconLedOn : *g_pIconLedOff); } // Context menu event. void qsynthTabBar::contextMenuEvent ( QContextMenuEvent *pContextMenuEvent ) { int iTab = QTabBar::tabAt(pContextMenuEvent->pos()); if (iTab >= 0) QTabBar::setCurrentIndex(iTab); // Emit context menu signal. emit contextMenuRequested(iTab, pContextMenuEvent->globalPos()); } // end of qsynthTabBar.cpp qsynth-1.0.3/src/PaxHeaders/qsynthSystemTray.h0000644000000000000000000000013214771226115016460 xustar0030 mtime=1743072333.116076158 30 atime=1743072333.116076158 30 ctime=1743072333.116076158 qsynth-1.0.3/src/qsynthSystemTray.h0000644000175000001440000000411614771226115016452 0ustar00rncbcusers// qsynthSystemTray.h // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthSystemTray_h #define __qsynthSystemTray_h #include #include // Forward decls. class qsynthMainForm; //---------------------------------------------------------------------------- // qsynthSystemTray -- Custom system tray widget. class qsynthSystemTray : public QSystemTrayIcon { Q_OBJECT public: // Constructor. qsynthSystemTray(QWidget *pParent = 0); // Default destructor. ~qsynthSystemTray(); // Background mask methods. void setBackground(const QColor& background); const QColor& background() const; // Set system tray icon overlay. void setPixmapOverlay(const QPixmap& pmOverlay); const QPixmap& pixmapOverlay() const; // System tray icon/pixmaps update method. void updatePixmap(); // Redirect to hide. void close(); signals: // Clicked signal. void clicked(); protected slots: // Handle systeam tray activity. void activated(QSystemTrayIcon::ActivationReason); private: // Instance pixmap and background color. QIcon m_icon; QPixmap m_pixmap; QPixmap m_pixmapOverlay; QColor m_background; }; #endif // __qsynthSystemTray_h // end of qsynthSystemTray.h qsynth-1.0.3/src/PaxHeaders/qsynthOptions.cpp0000644000000000000000000000013214771226115016322 xustar0030 mtime=1743072333.112076178 30 atime=1743072333.112076178 30 ctime=1743072333.112076178 qsynth-1.0.3/src/qsynthOptions.cpp0000644000175000001440000012422214771226115016315 0ustar00rncbcusers// qsynthOptions.cpp // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthOptions.h" #include "qsynthEngine.h" #include #include #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) #include #include #if defined(Q_OS_WINDOWS) #include #endif #endif #include #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include #endif //------------------------------------------------------------------------- // qsynthOptions - Prototype settings structure. // // Constructor. qsynthOptions::qsynthOptions (void) : m_settings(QSYNTH_DOMAIN, QSYNTH_TITLE) { // Create default setup descriptor. m_pDefaultSetup = new qsynthSetup(); // Load previous/default fluidsynth settings... loadSetup(m_pDefaultSetup, QString()); loadOptions(); } // Default Destructor. qsynthOptions::~qsynthOptions (void) { saveOptions(); // Delete default setup descriptor. delete m_pDefaultSetup; m_pDefaultSetup = nullptr; } // Explicit load method. void qsynthOptions::loadOptions (void) { // Load defaults... m_settings.beginGroup("/Defaults"); sSoundFontDir = m_settings.value("/SoundFontDir").toString(); bPresetPreview = m_settings.value("/PresetPreview", false).toBool(); m_settings.endGroup(); // Load display options... m_settings.beginGroup("/Options"); sMessagesFont = m_settings.value("/MessagesFont").toString(); bMessagesLimit = m_settings.value("/MessagesLimit", true).toBool(); iMessagesLimitLines = m_settings.value("/MessagesLimitLines", 1000).toInt(); bMessagesLog = m_settings.value("/MessagesLog", false).toBool(); sMessagesLogPath = m_settings.value("/MessagesLogPath", "qsynth.log").toString(); bQueryClose = m_settings.value("/QueryClose", true).toBool(); bKeepOnTop = m_settings.value("/KeepOnTop", false).toBool(); bStdoutCapture = m_settings.value("/StdoutCapture", true).toBool(); bOutputMeters = m_settings.value("/OutputMeters", false).toBool(); bSystemTray = m_settings.value("/SystemTray", false).toBool(); bSystemTrayQueryClose = m_settings.value("/SystemTrayQueryClose", true).toBool(); bStartMinimized = m_settings.value("/StartMinimized", false).toBool(); iBaseFontSize = m_settings.value("/BaseFontSize", 0).toInt(); iKnobStyle = m_settings.value("/KnobStyle", 0).toInt(); iKnobMotion = m_settings.value("/KnobMotion", 1).toInt(); m_settings.endGroup(); // Load custom options... m_settings.beginGroup("/Custom"); sCustomColorTheme = m_settings.value("/ColorTheme").toString(); sCustomStyleTheme = m_settings.value("/StyleTheme").toString(); sLanguage = m_settings.value("/Language").toString(); m_settings.endGroup(); // Load custom additional engines. m_settings.beginGroup("/Engines"); const QString sEnginePrefix = "/Engine%1"; int iEngine = 0; for (;;) { QString sItem = m_settings.value(sEnginePrefix.arg(++iEngine)).toString(); if (sItem.isEmpty()) break; engines.append(sItem); } m_settings.endGroup(); } // Explicit save method. void qsynthOptions::saveOptions (void) { // Make program version available in the future. m_settings.beginGroup("/Program"); m_settings.setValue("/Version", PROJECT_VERSION); m_settings.endGroup(); // Save defaults... m_settings.beginGroup("/Defaults"); m_settings.setValue("/SoundFontDir", sSoundFontDir); m_settings.setValue("/PresetPreview", bPresetPreview); m_settings.endGroup(); // Save display options... m_settings.beginGroup("/Options"); m_settings.setValue("/MessagesFont", sMessagesFont); m_settings.setValue("/MessagesLimit", bMessagesLimit); m_settings.setValue("/MessagesLimitLines", iMessagesLimitLines); m_settings.setValue("/MessagesLog", bMessagesLog); m_settings.setValue("/MessagesLogPath", sMessagesLogPath); m_settings.setValue("/QueryClose", bQueryClose); m_settings.setValue("/KeepOnTop", bKeepOnTop); m_settings.setValue("/StdoutCapture", bStdoutCapture); m_settings.setValue("/OutputMeters", bOutputMeters); m_settings.setValue("/SystemTray", bSystemTray); m_settings.setValue("/SystemTrayQueryClose", bSystemTrayQueryClose); m_settings.setValue("/StartMinimized", bStartMinimized); m_settings.setValue("/BaseFontSize", iBaseFontSize); m_settings.setValue("/KnobStyle", iKnobStyle); m_settings.setValue("/KnobMotion", iKnobMotion); m_settings.endGroup(); // Save custom options... m_settings.beginGroup("/Custom"); m_settings.setValue("/ColorTheme", sCustomColorTheme); m_settings.setValue("/StyleTheme", sCustomStyleTheme); m_settings.setValue("/Language", sLanguage); m_settings.endGroup(); // Save engines list... m_settings.beginGroup("/Engines"); // Save last preset list. const QString sEnginePrefix = "/Engine%1"; int iEngine = 0; QStringListIterator iter(engines); while (iter.hasNext()) m_settings.setValue(sEnginePrefix.arg(++iEngine), iter.next()); // Cleanup old entries, if any... while (!m_settings.value(sEnginePrefix.arg(++iEngine)).toString().isEmpty()) m_settings.remove(sEnginePrefix.arg(iEngine)); m_settings.endGroup(); // Save/commit to disk. m_settings.sync(); } // Default instance setup accessor. qsynthSetup *qsynthOptions::defaultSetup (void) { return m_pDefaultSetup; } //------------------------------------------------------------------------- // Settings accessor. // QSettings& qsynthOptions::settings (void) { return m_settings; } //------------------------------------------------------------------------- // Command-line argument stuff. Mostly to mimic fluidsynth CLI. // #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) void qsynthOptions::show_error( const QString& msg ) { #if defined(Q_OS_WINDOWS) QMessageBox::information(nullptr, QApplication::applicationName(), msg); #else const QByteArray tmp = msg.toUtf8() + '\n'; ::fputs(tmp.constData(), stderr); #endif } #else // Help about command line options. void qsynthOptions::print_usage ( const QString& arg0 ) { QTextStream out(stderr); const QString sEot = "\n\t"; const QString sEol = "\n\n"; out << QObject::tr("Usage: %1" " [options] [soundfonts] [midifiles]").arg(arg0) + sEol; out << QSYNTH_TITLE " - " + QObject::tr(QSYNTH_SUBTITLE) + sEol; out << QObject::tr("Options") + ":" + sEol; out << " -n, --no-midi-in" + sEot + QObject::tr("Don't create a midi driver to read MIDI input events [default = yes]") + sEol; out << " -m, --midi-driver=[label]" + sEot + QObject::tr("The name of the midi driver to use [oss,alsa,alsa_seq,...]") + sEol; out << " -K, --midi-channels=[num]" + sEot + QObject::tr("The number of midi channels [default = 16]") + sEol; out << " -a, --audio-driver=[label]" + sEot + QObject::tr("The audio driver [alsa,jack,oss,dsound,...]") + sEol; out << " -j, --connect-jack-outputs" + sEot + QObject::tr("Attempt to connect the jack outputs to the physical ports") + sEol; out << " -L, --audio-channels=[num]" + sEot + QObject::tr("The number of stereo audio channels [default = 1]") + sEol; out << " -G, --audio-groups=[num]" + sEot + QObject::tr("The number of audio groups [default = 1]") + sEol; out << " -z, --audio-bufsize=[size]" + sEot + QObject::tr("Size of each audio buffer") + sEol; out << " -c, --audio-bufcount=[count]" + sEot + QObject::tr("Number of audio buffers") + sEol; out << " -r, --sample-rate=[rate]" + sEot + QObject::tr("Set the sample rate") + sEol; out << " -R, --reverb=[flag]" + sEot + QObject::tr("Turn the reverb on or off [1|0|yes|no|on|off, default = on]") + sEol; out << " -C, --chorus=[flag]" + sEot + QObject::tr("Turn the chorus on or off [1|0|yes|no|on|off, default = on]") + sEol; out << " -g, --gain=[gain]" + sEot + QObject::tr("Set the master gain [0 < gain < 2, default = 1]") + sEol; out << " -o, --option [name=value]" + sEot + QObject::tr("Define a setting name=value") + sEol; out << " -s, --server" + sEot + QObject::tr("Create and start server [default = no]") + sEol; out << " -i, --no-shell" + sEot + QObject::tr("Don't read commands from the shell [ignored]") + sEol; out << " -d, --dump" + sEot + QObject::tr("Dump midi router events") + sEol; out << " -V, --verbose" + sEot + QObject::tr("Print out verbose messages about midi events") + sEol; out << " -h, --help" + sEot + QObject::tr("Show help about command line options") + sEol; out << " -v, --version" + sEot + QObject::tr("Show version information") + sEol; } #endif // Parse command line arguments into fluidsynth settings. bool qsynthOptions::parse_args ( const QStringList& args ) { int iSoundFontOverride = 0; #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) QCommandLineParser parser; parser.setApplicationDescription( QSYNTH_TITLE " - " + QObject::tr(QSYNTH_SUBTITLE)); parser.addOption({{"n", "no-midi-in"}, QObject::tr("Don't create a midi driver to read MIDI input events [default = yes]")}); parser.addOption({{"m", "midi-driver"}, QObject::tr("The name of the midi driver to use [oss,alsa,alsa_seq,...]"), "label"}); parser.addOption({{"K", "midi-channels"}, QObject::tr("The number of midi channels [default = 16]"), "num"}); parser.addOption({{"a", "audio-driver"}, QObject::tr("The audio driver [alsa,jack,oss,dsound,...]"), "label"}); parser.addOption({{"j", "connect-jack-outputs"}, QObject::tr("Attempt to connect the jack outputs to the physical ports")}); parser.addOption({{"L", "audio-channels"}, QObject::tr("The number of stereo audio channels [default = 1]"), "num"}); parser.addOption({{"G", "audio-groups"}, QObject::tr("The number of audio groups [default = 1]"), "num"}); parser.addOption({{"z", "audio-bufsize"}, QObject::tr("Size of each audio buffer"), "size"}); parser.addOption({{"c", "audio-bufcount"}, QObject::tr("Number of audio buffers"), "count"}); parser.addOption({{"r", "sample-rate"}, QObject::tr("Set the sample rate"), "rate"}); parser.addOption({{"R", "reverb"}, QObject::tr("Turn the reverb on or off [1|0|yes|no|on|off, default = on]"), "flag"}); parser.addOption({{"C", "chorus"}, QObject::tr("Turn the chorus on or off [1|0|yes|no|on|off, default = on]"), "flag"}); parser.addOption({{"g", "gain"}, QObject::tr("Set the master gain [0 < gain < 10, default = 1]"), "gain"}); parser.addOption({{"o", "option"}, QObject::tr("Define a setting name=value"), "name=value"}); parser.addOption({{"s", "server"}, QObject::tr("Create and start server [default = no]")}); parser.addOption({{"i", "no-shell"}, QObject::tr("Don't read commands from the shell [ignored]")}); parser.addOption({{"d", "dump"}, QObject::tr("Dump midi router events")}); parser.addOption({{"V", "verbose"}, QObject::tr("Print out verbose messages about midi events")}); const QCommandLineOption& helpOption = parser.addHelpOption(); const QCommandLineOption& versionOption = parser.addVersionOption(); parser.addPositionalArgument("soundfonts", QObject::tr("SoundFont Files"), QObject::tr("[soundfonts]")); parser.addPositionalArgument("midifiles", QObject::tr("MIDI Files"), QObject::tr("[midifiles]")); if (!parser.parse(args)) { show_error(parser.errorText()); return false; } if (parser.isSet(helpOption)) { show_error(parser.helpText()); return false; } if (parser.isSet(versionOption)) { QString sVersion = QString("%1 %2\n") .arg(QSYNTH_TITLE) .arg(QCoreApplication::applicationVersion()); sVersion += QString("Qt: %1").arg(qVersion()); #if defined(QT_STATIC) sVersion += "-static"; #endif sVersion += '\n'; sVersion += QString("FluidSynth: %1\n") .arg(::fluid_version_str()); show_error(sVersion); return false; } if (parser.isSet("no-midi-in")) { m_pDefaultSetup->bMidiIn = false; } if (parser.isSet("midi-driver")) { const QString& sVal = parser.value("midi-driver"); if (sVal.isEmpty()) { show_error(QObject::tr("Option -m requires an argument (midi-driver).")); return false; } m_pDefaultSetup->sMidiDriver = sVal; } if (parser.isSet("midi-channels")) { bool bOK = false; const int iVal = parser.value("midi-channels").toInt(&bOK); if (!bOK) { show_error(QObject::tr("Option -K requires an argument (midi-channels).")); return false; } m_pDefaultSetup->iMidiChannels = iVal; } if (parser.isSet("audio-driver")) { const QString& sVal = parser.value("audio-driver"); if (sVal.isEmpty()) { show_error(QObject::tr("Option -a requires an argument (audio-driver).")); return false; } m_pDefaultSetup->sAudioDriver = sVal; } if (parser.isSet("connect-jack-outputs")) { m_pDefaultSetup->bJackAutoConnect = true; } if (parser.isSet("audio-channels")) { bool bOK = false; const int iVal = parser.value("audio-channels").toInt(&bOK); if (!bOK) { show_error(QObject::tr("Option -L requires an argument (audio-channels).")); return false; } m_pDefaultSetup->iAudioChannels = iVal; } if (parser.isSet("audio-groups")) { bool bOK = false; const int iVal = parser.value("audio-groups").toInt(&bOK); if (!bOK) { show_error(QObject::tr("Option -G requires an argument (audio-groups).")); return false; } m_pDefaultSetup->iAudioGroups = iVal; } if (parser.isSet("audio-bufsize")) { bool bOK = false; const int iVal = parser.value("audio-bufsize").toInt(&bOK); if (!bOK) { show_error(QObject::tr("Option -z requires an argument (audio-bufsize).")); return false; } m_pDefaultSetup->iAudioBufSize =iVal; } if (parser.isSet("audio-bufcount")) { bool bOK = false; const int iVal = parser.value("audio-bufcount").toInt(&bOK); if (!bOK) { show_error(QObject::tr("Option -c requires an argument (audio-bufcount).")); return false; } m_pDefaultSetup->iAudioBufCount = iVal; } if (parser.isSet("sample-rate")) { bool bOK = false; const float fVal = parser.value("sample-rate").toFloat(&bOK); if (!bOK) { show_error(QObject::tr("Option -r requires an argument (sample-rate).")); return false; } m_pDefaultSetup->fSampleRate = fVal; } if (parser.isSet("reverb")) { const QString& sVal = parser.value("reverb"); if (sVal.isEmpty()) { m_pDefaultSetup->bReverbActive = true; } else { m_pDefaultSetup->bReverbActive = !(sVal == "0" || sVal == "no" || sVal == "off"); } } if (parser.isSet("chorus")) { const QString& sVal = parser.value("chorus"); if (sVal.isEmpty()) { m_pDefaultSetup->bChorusActive = true; } else { m_pDefaultSetup->bChorusActive = !(sVal == "0" || sVal == "no" || sVal == "off"); } } if (parser.isSet("gain")) { bool bOK = false; const float fVal = parser.value("gain").toFloat(&bOK); if (!bOK) { show_error(QObject::tr("Option -g requires an argument (gain).")); return false; } m_pDefaultSetup->fGain = fVal; } if (parser.isSet("option")) { const QStringList& sValues = parser.values("option"); if (sValues.isEmpty()) { show_error(QObject::tr("Option -o requires an argument.")); return false; } m_pDefaultSetup->options.append(sValues); } if (parser.isSet("server")) { m_pDefaultSetup->bServer = true; } if (parser.isSet("no-shell")) { // Just ignore this one... } if (parser.isSet("dump")) { m_pDefaultSetup->bMidiDump = true; } if (parser.isSet("verbose")) { m_pDefaultSetup->bVerbose = true; } foreach(const QString& sArg, parser.positionalArguments()) { const QByteArray tmp = sArg.toUtf8(); const char *name = tmp.constData(); if (::fluid_is_soundfont(name)) { if (++iSoundFontOverride == 1) { m_pDefaultSetup->soundfonts.clear(); m_pDefaultSetup->bankoffsets.clear(); } m_pDefaultSetup->soundfonts.append(name); m_pDefaultSetup->bankoffsets.append(QString()); } else if (::fluid_is_midifile(name)) { m_pDefaultSetup->midifiles.append(name); } else { show_error(QObject::tr("Unknown option '%1'.").arg(name)); return false; } } #else QTextStream out(stderr); const QString sEol = "\n\n"; const int argc = args.count(); for (int i = 1; i < argc; ++i) { QString sVal; QString sArg = args.at(i); const int iEqual = sArg.indexOf('='); if (iEqual >= 0) { sVal = sArg.right(sArg.length() - iEqual - 1); sArg = sArg.left(iEqual); } else if (i < argc - 1) { sVal = args.at(i + 1); if (sVal[0] == '-') sVal.clear(); } if (sArg == "-n" || sArg == "--no-midi-in") { m_pDefaultSetup->bMidiIn = false; } else if (sArg == "-m" || sArg == "--midi-driver") { if (sVal.isEmpty()) { out << QObject::tr("Option -m requires an argument (midi-driver).") + sEol; return false; } m_pDefaultSetup->sMidiDriver = sVal; if (iEqual < 0) ++i; } else if (sArg == "-K" || sArg == "--midi-channels") { if (sVal.isEmpty()) { out << QObject::tr("Option -K requires an argument (midi-channels).") + sEol; return false; } m_pDefaultSetup->iMidiChannels = sVal.toInt(); if (iEqual < 0) ++i; } else if (sArg == "-a" || sArg == "--audio-driver") { if (sVal.isEmpty()) { out << QObject::tr("Option -a requires an argument (audio-driver).") + sEol; return false; } m_pDefaultSetup->sAudioDriver = sVal; if (iEqual < 0) ++i; } else if (sArg == "-j" || sArg == "--connect-jack-outputs") { m_pDefaultSetup->bJackAutoConnect = true; } else if (sArg == "-L" || sArg == "--audio-channels") { if (sVal.isEmpty()) { out << QObject::tr("Option -L requires an argument (audio-channels).") + sEol; return false; } m_pDefaultSetup->iAudioChannels = sVal.toInt(); if (iEqual < 0) ++i; } else if (sArg == "-G" || sArg == "--audio-groups") { if (sVal.isEmpty()) { out << QObject::tr("Option -G requires an argument (audio-groups).") + sEol; return false; } m_pDefaultSetup->iAudioGroups = sVal.toInt(); if (iEqual < 0) i++; } else if (sArg == "-z" || sArg == "--audio-bufsize") { if (sVal.isEmpty()) { out << QObject::tr("Option -z requires an argument (audio-bufsize).") + sEol; return false; } m_pDefaultSetup->iAudioBufSize = sVal.toInt(); if (iEqual < 0) ++i; } else if (sArg == "-c" || sArg == "--audio-bufcount") { if (sVal.isEmpty()) { out << QObject::tr("Option -c requires an argument (audio-bufcount).") + sEol; return false; } m_pDefaultSetup->iAudioBufCount = sVal.toInt(); if (iEqual < 0) ++i; } else if (sArg == "-r" || sArg == "--sample-rate") { if (sVal.isEmpty()) { out << QObject::tr("Option -r requires an argument (sample-rate).") + sEol; return false; } m_pDefaultSetup->fSampleRate = sVal.toFloat(); if (iEqual < 0) ++i; } else if (sArg == "-R" || sArg == "--reverb") { if (sVal.isEmpty()) { m_pDefaultSetup->bReverbActive = true; } else { m_pDefaultSetup->bReverbActive = !(sVal == "0" || sVal == "no" || sVal == "off"); if (iEqual < 0) ++i; } } else if (sArg == "-C" || sArg == "--chorus") { if (sVal.isEmpty()) { m_pDefaultSetup->bChorusActive = true; } else { m_pDefaultSetup->bChorusActive = !(sVal == "0" || sVal == "no" || sVal == "off"); if (iEqual < 0) ++i; } } else if (sArg == "-g" || sArg == "--gain") { if (sVal.isEmpty()) { out << QObject::tr("Option -g requires an argument (gain).") + sEol; return false; } m_pDefaultSetup->fGain = sVal.toFloat(); if (iEqual < 0) ++i; } else if (sArg == "-o" || sArg == "--option") { if (++i >= argc) { out << QObject::tr("Option -o requires an argument.") + sEol; return false; } m_pDefaultSetup->options.append(args.at(i)); } else if (sArg == "-s" || sArg == "--server") { m_pDefaultSetup->bServer = true; } else if (sArg == "-i" || sArg == "--no-shell") { // Just ignore this one... } else if (sArg == "-d" || sArg == "--dump") { m_pDefaultSetup->bMidiDump = true; } else if (sArg == "-V" || sArg == "--verbose") { m_pDefaultSetup->bVerbose = true; } else if (sArg == "-h" || sArg == "--help") { print_usage(args.at(0)); return false; } else if (sArg == "-v" || sArg == "--version") { out << QString("%1: %2\n") .arg(QSYNTH_TITLE) .arg(QCoreApplication::applicationVersion())); out << QString("Qt: %1").arg(qVersion()); #if defined(QT_STATIC) out << "-static"; #endif out << '\n'; out << QString("FluidSynth: %1\n") .arg(::fluid_version_str()); return false; } else { const QByteArray tmp = args.at(i).toUtf8(); const char *name = tmp.constData(); if (::fluid_is_soundfont(name)) { if (++iSoundFontOverride == 1) { m_pDefaultSetup->soundfonts.clear(); m_pDefaultSetup->bankoffsets.clear(); } m_pDefaultSetup->soundfonts.append(name); m_pDefaultSetup->bankoffsets.append(QString()); } else if (::fluid_is_midifile(name)) { m_pDefaultSetup->midifiles.append(name); } else { out << QObject::tr("Unknown option '%1'.").arg(name) + sEol; print_usage(args.at(0)); return false; } } } #endif // Alright with argument parsing. return true; } //--------------------------------------------------------------------------- // Engine entry management methods. void qsynthOptions::newEngine ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return; if (pEngine->isDefault()) return; const QString& sName = pEngine->name(); if (!engines.contains(sName)) engines.append(sName); } bool qsynthOptions::renameEngine ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return false; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return false; const QString sOldName = pEngine->name(); const QString sNewName = pSetup->sDisplayName; if (sOldName == sNewName) return false; pEngine->setName(sNewName); if (!pEngine->isDefault()) { engines = engines.replaceInStrings(sOldName, sNewName); m_settings.remove("/Engine/" + sOldName); } return true; } void qsynthOptions::deleteEngine ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return; if (pEngine->isDefault()) return; const QString& sName = pEngine->name(); int iEngine = engines.indexOf(sName); if (iEngine >= 0) engines.removeAt(iEngine); m_settings.remove("/Engine/" + sName); } //--------------------------------------------------------------------------- // Setup registry methods. // Load instance m_settings. void qsynthOptions::loadSetup ( qsynthSetup *pSetup, const QString& sName ) { if (pSetup == nullptr) return; // Begin at key group? if (!sName.isEmpty()) m_settings.beginGroup("/Engine/" + sName); // Shall we have a default display name. QString sDisplayName = sName; if (sDisplayName.isEmpty()) sDisplayName = QSYNTH_TITLE "1"; // Load previous/default fluidsynth m_settings... m_settings.beginGroup("/Settings"); pSetup->sDisplayName = m_settings.value("/DisplayName", sDisplayName).toString(); pSetup->bMidiIn = m_settings.value("/MidiIn", true).toBool(); #if defined(Q_OS_MACOS) pSetup->sMidiDriver = m_settings.value("/MidiDriver", "coremidi").toString(); pSetup->sAudioDriver = m_settings.value("/AudioDriver", "coreaudio").toString(); #elif defined(Q_OS_WINDOWS) pSetup->sMidiDriver = m_settings.value("/MidiDriver", "winmidi").toString(); pSetup->sAudioDriver = m_settings.value("/AudioDriver", "dsound").toString(); #elif defined(Q_OS_OPENBSD) pSetup->sMidiDriver = m_settings.value("/MidiDriver", "sndio").toString(); pSetup->sAudioDriver = m_settings.value("/AudioDriver", "sndio").toString(); #else pSetup->sMidiDriver = m_settings.value("/MidiDriver", "alsa_seq").toString(); pSetup->sAudioDriver = m_settings.value("/AudioDriver", "jack").toString(); #endif #if defined(Q_OS_WINDOWS) pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 512).toInt(); pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 8).toInt(); #else pSetup->iAudioBufSize = m_settings.value("/AudioBufSize", 64).toInt(); pSetup->iAudioBufCount = m_settings.value("/AudioBufCount", 2).toInt(); #endif pSetup->sMidiName = m_settings.value("/AlsaName", "pid").toString(); pSetup->bMidiAutoConnect = m_settings.value("/MidiAutoConnect", true).toBool(); pSetup->sJackName = m_settings.value("/JackName", "qsynth").toString(); pSetup->bJackAutoConnect = m_settings.value("/JackAutoConnect", true).toBool(); pSetup->bJackMulti = m_settings.value("/JackMulti", false).toBool(); pSetup->bWasapiExclusive = m_settings.value("/WasapiExclusive", false).toBool(); #if defined(Q_OS_OPENBSD) pSetup->sMidiDevice = m_settings.value("/MidiDevice", "midithru/0").toString(); #else pSetup->sMidiDevice = m_settings.value("/MidiDevice").toString(); #endif pSetup->iMidiChannels = m_settings.value("/MidiChannels", 16).toInt(); pSetup->sMidiBankSelect = m_settings.value("/MidiBankSelect", "gm").toString(); pSetup->sAudioDevice = m_settings.value("/AudioDevice").toString(); pSetup->iAudioChannels = m_settings.value("/AudioChannels", 1).toInt(); pSetup->iAudioGroups = m_settings.value("/AudioGroups", 1).toInt(); pSetup->sSampleFormat = m_settings.value("/SampleFormat", "16bits").toString(); pSetup->fSampleRate = m_settings.value("/SampleRate", 44100.0).toDouble(); pSetup->iPolyphony = m_settings.value("/Polyphony", 256).toInt(); pSetup->bReverbActive = m_settings.value("/ReverbActive", true).toBool(); pSetup->fReverbRoom = m_settings.value("/ReverbRoom", QSYNTH_REVERB_DEFAULT_ROOMSIZE).toDouble(); pSetup->fReverbDamp = m_settings.value("/ReverbDamp", QSYNTH_REVERB_DEFAULT_DAMP).toDouble(); pSetup->fReverbWidth = m_settings.value("/ReverbWidth", QSYNTH_REVERB_DEFAULT_WIDTH).toDouble(); pSetup->fReverbLevel = m_settings.value("/ReverbLevel", QSYNTH_REVERB_DEFAULT_LEVEL).toDouble(); pSetup->bChorusActive = m_settings.value("/ChorusActive", true).toBool(); pSetup->iChorusNr = m_settings.value("/ChorusNr", QSYNTH_CHORUS_DEFAULT_N).toInt(); pSetup->fChorusLevel = m_settings.value("/ChorusLevel", QSYNTH_CHORUS_DEFAULT_LEVEL).toDouble(); pSetup->fChorusSpeed = m_settings.value("/ChorusSpeed", QSYNTH_CHORUS_DEFAULT_SPEED).toDouble(); pSetup->fChorusDepth = m_settings.value("/ChorusDepth", QSYNTH_CHORUS_DEFAULT_DEPTH).toDouble(); pSetup->iChorusType = m_settings.value("/ChorusType", QSYNTH_CHORUS_DEFAULT_TYPE).toInt(); pSetup->bLadspaActive = m_settings.value("/LadspaActive", false).toBool(); pSetup->fGain = m_settings.value("/Gain", QSYNTH_MASTER_DEFAULT_GAIN).toDouble(); pSetup->bServer = m_settings.value("/Server", false).toBool(); pSetup->bMidiDump = m_settings.value("/MidiDump", false).toBool(); pSetup->bVerbose = m_settings.value("/Verbose", false).toBool(); m_settings.beginGroup("/Custom"); QStringListIterator keys_iter(m_settings.childKeys()); while (keys_iter.hasNext()) { const QString& sKey = keys_iter.next(); const QString& sVal = m_settings.value("/" + sKey).toString(); pSetup->settings.insert(sKey, sVal); } m_settings.endGroup(); m_settings.endGroup(); // Load soundfont list... m_settings.beginGroup("/SoundFonts"); const QString sSoundFontPrefix = "/SoundFont%1"; const QString sBankOffsetPrefix = "/BankOffset%1"; int i = 0; for (;;) { ++i; QString sSoundFont = m_settings.value(sSoundFontPrefix.arg(i)).toString(); QString sBankOffset = m_settings.value(sBankOffsetPrefix.arg(i)).toString(); if (sSoundFont.isEmpty()) break; pSetup->soundfonts.append(sSoundFont); pSetup->bankoffsets.append(sBankOffset); } m_settings.endGroup(); // Load channel presets list. m_settings.beginGroup("/Presets"); pSetup->sDefPreset = m_settings.value("/DefPreset", pSetup->sDefPresetName).toString(); const QString sPresetPrefix = "/Preset%1"; int iPreset = 0; for (;;) { QString sItem = m_settings.value(sPresetPrefix.arg(++iPreset)).toString(); if (sItem.isEmpty()) break; pSetup->presets.append(sItem); } m_settings.endGroup(); // Done with the key group? if (!sName.isEmpty()) m_settings.endGroup(); } // Save instance m_settings. void qsynthOptions::saveSetup ( qsynthSetup *pSetup, const QString& sName ) { if (pSetup == nullptr) return; // Begin at key group? if (!sName.isEmpty()) m_settings.beginGroup("/Engine/" + sName); // Save presets list... m_settings.beginGroup("/Presets"); m_settings.setValue("/DefPreset", pSetup->sDefPreset); // Save last preset list. const QString sPresetPrefix = "/Preset%1"; int iPreset = 0; QStringListIterator iter(pSetup->presets); while (iter.hasNext()) m_settings.setValue(sPresetPrefix.arg(++iPreset), iter.next()); // Cleanup old entries, if any... while (!m_settings.value(sPresetPrefix.arg(++iPreset)).toString().isEmpty()) m_settings.remove(sPresetPrefix.arg(iPreset)); m_settings.endGroup(); // Save last soundfont list. m_settings.beginGroup("/SoundFonts"); const QString sSoundFontPrefix = "/SoundFont%1"; const QString sBankOffsetPrefix = "/BankOffset%1"; int i = 0; QStringListIterator sfiter(pSetup->soundfonts); while (sfiter.hasNext()) { m_settings.setValue(sSoundFontPrefix.arg(++i), sfiter.next()); m_settings.setValue(sBankOffsetPrefix.arg(i), pSetup->bankoffsets[i - 1]); } // Cleanup old entries, if any... for (;;) { if (m_settings.value(sSoundFontPrefix.arg(++i)).toString().isEmpty()) break; m_settings.remove(sSoundFontPrefix.arg(i)); m_settings.remove(sBankOffsetPrefix.arg(i)); } m_settings.endGroup(); // Save last fluidsynth settings. m_settings.beginGroup("/Settings"); m_settings.setValue("/DisplayName", pSetup->sDisplayName); m_settings.setValue("/MidiIn", pSetup->bMidiIn); m_settings.setValue("/MidiDriver", pSetup->sMidiDriver); m_settings.setValue("/MidiDevice", pSetup->sMidiDevice); m_settings.setValue("/MidiChannels", pSetup->iMidiChannels); m_settings.setValue("/AlsaName", pSetup->sMidiName); m_settings.setValue("/MidiAutoConnect", pSetup->bMidiAutoConnect); m_settings.setValue("/MidiBankSelect", pSetup->sMidiBankSelect); m_settings.setValue("/AudioDriver", pSetup->sAudioDriver); m_settings.setValue("/AudioDevice", pSetup->sAudioDevice); m_settings.setValue("/JackName", pSetup->sJackName); m_settings.setValue("/JackAutoConnect", pSetup->bJackAutoConnect); m_settings.setValue("/JackMulti", pSetup->bJackMulti); m_settings.setValue("/WasapiExclusive", pSetup->bWasapiExclusive); m_settings.setValue("/AudioChannels", pSetup->iAudioChannels); m_settings.setValue("/AudioGroups", pSetup->iAudioGroups); m_settings.setValue("/AudioBufSize", pSetup->iAudioBufSize); m_settings.setValue("/AudioBufCount", pSetup->iAudioBufCount); m_settings.setValue("/SampleFormat", pSetup->sSampleFormat); m_settings.setValue("/SampleRate", pSetup->fSampleRate); m_settings.setValue("/Polyphony", pSetup->iPolyphony); m_settings.setValue("/ReverbActive", pSetup->bReverbActive); m_settings.setValue("/ReverbRoom", pSetup->fReverbRoom); m_settings.setValue("/ReverbDamp", pSetup->fReverbDamp); m_settings.setValue("/ReverbWidth", pSetup->fReverbWidth); m_settings.setValue("/ReverbLevel", pSetup->fReverbLevel); m_settings.setValue("/ChorusActive", pSetup->bChorusActive); m_settings.setValue("/ChorusNr", pSetup->iChorusNr); m_settings.setValue("/ChorusLevel", pSetup->fChorusLevel); m_settings.setValue("/ChorusSpeed", pSetup->fChorusSpeed); m_settings.setValue("/ChorusDepth", pSetup->fChorusDepth); m_settings.setValue("/ChorusType", pSetup->iChorusType); m_settings.setValue("/LadspaActive", pSetup->bLadspaActive); m_settings.setValue("/Gain", pSetup->fGain); m_settings.setValue("/Server", pSetup->bServer); m_settings.setValue("/MidiDump", pSetup->bMidiDump); m_settings.setValue("/Verbose", pSetup->bVerbose); m_settings.beginGroup("/Custom"); m_settings.remove(QString()); qsynthSetup::Settings::ConstIterator iter2 = pSetup->settings.constBegin(); const qsynthSetup::Settings::ConstIterator& iter2_end = pSetup->settings.constEnd(); for ( ; iter2 != iter2_end; ++iter2) m_settings.setValue("/" + iter2.key(), iter2.value()); m_settings.endGroup(); m_settings.endGroup(); // Done with the key group? if (!sName.isEmpty()) m_settings.endGroup(); } //--------------------------------------------------------------------------- // Preset management methods. bool qsynthOptions::loadPreset ( qsynthEngine *pEngine, const QString& sPreset ) { if (pEngine == nullptr || pEngine->pSynth == nullptr) return false; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return false; QString sSuffix; if (sPreset != pSetup->sDefPresetName && !sPreset.isEmpty()) { sSuffix = '/' + sPreset; // Check if on list. if (!pSetup->presets.contains(sPreset)) return false; } // Begin at key group? if (!pEngine->isDefault()) m_settings.beginGroup("/Engine/" + pEngine->name()); // Load as current presets. #ifdef CONFIG_FLUID_UNSET_PROGRAM int iChannelsSet = 0; #endif const QString sPrefix = "/Chan%1"; m_settings.beginGroup("/Preset" + sSuffix); int iChannels = ::fluid_synth_count_midi_channels(pEngine->pSynth); for (int iChan = 0; iChan < iChannels; iChan++) { QString sEntry = m_settings.value(sPrefix.arg(iChan + 1)).toString(); if (!sEntry.isEmpty() && iChan == sEntry.section(':', 0, 0).toInt()) { ::fluid_synth_bank_select(pEngine->pSynth, iChan, sEntry.section(':', 1, 1).toInt()); ::fluid_synth_program_change(pEngine->pSynth, iChan, sEntry.section(':', 2, 2).toInt()); #ifdef CONFIG_FLUID_UNSET_PROGRAM ++iChannelsSet; #endif } #ifdef CONFIG_FLUID_UNSET_PROGRAM else ::fluid_synth_unset_program(pEngine->pSynth, iChan); #endif } m_settings.endGroup(); // Done with the key group? if (!pEngine->isDefault()) m_settings.endGroup(); #ifdef CONFIG_FLUID_UNSET_PROGRAM // If there's none channels set (eg. empty/blank preset) // then fallback to old default fill up all the channels // according to available soundfont stack. if (iChannelsSet < 1) { int iProg = 0; for (int iChan = 0; iChan < iChannels; iChan++) { ::fluid_synth_bank_select(pEngine->pSynth, iChan, 0); ::fluid_synth_program_change(pEngine->pSynth, iChan, iProg); ++iProg; } } #endif // Recommended to post-stabilize things around. ::fluid_synth_program_reset(pEngine->pSynth); return true; } bool qsynthOptions::savePreset ( qsynthEngine *pEngine, const QString& sPreset ) { if (pEngine == nullptr || pEngine->pSynth == nullptr) return false; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return false; QString sSuffix; if (sPreset != pSetup->sDefPresetName && !sPreset.isEmpty()) { sSuffix = '/' + sPreset; // Append to list if not already. if (!pSetup->presets.contains(sPreset)) pSetup->presets.prepend(sPreset); } // Begin at key group? if (!pEngine->isDefault()) m_settings.beginGroup("/Engine/" + pEngine->name()); // Unload current presets. const QString sPrefix = "/Chan%1"; m_settings.beginGroup("/Preset" + sSuffix); int iChannels = ::fluid_synth_count_midi_channels(pEngine->pSynth); int iChan = 0; for ( ; iChan < iChannels; iChan++) { #ifdef CONFIG_FLUID_CHANNEL_INFO fluid_synth_channel_info_t info; ::memset(&info, 0, sizeof(info)); ::fluid_synth_get_channel_info(pEngine->pSynth, iChan, &info); if (info.assigned) { #ifdef CONFIG_FLUID_BANK_OFFSET info.bank += ::fluid_synth_get_bank_offset(pEngine->pSynth, info.sfont_id); #endif QString sEntry = QString::number(iChan); sEntry += ':'; sEntry += QString::number(info.bank); sEntry += ':'; sEntry += QString::number(info.program); m_settings.setValue(sPrefix.arg(iChan + 1), sEntry); } #else fluid_preset_t *pPreset = ::fluid_synth_get_channel_preset(pEngine->pSynth, iChan); if (pPreset) { #ifdef CONFIG_FLUID_PRESET_GET_BANKNUM int iBank = ::fluid_preset_get_banknum(pPreset); #else int iBank = pPreset->get_banknum(pPreset); #endif #ifdef CONFIG_FLUID_BANK_OFFSET int iSFID = 0; #ifdef CONFIG_FLUID_PRESET_GET_SFONT fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset); #else fluid_sfont_t *pSoundFont = pPreset->sfont; #endif if (pSoundFont) { #ifdef CONFIG_FLUID_SFONT_GET_ID iSFID = ::fluid_sfont_get_id(pSoundFont); #else iSFID = pSoundFont->id; #endif } iBank += ::fluid_synth_get_bank_offset(pEngine->pSynth, iSFID); #endif #ifdef CONFIG_FLUID_PRESET_GET_NUM const int iProg = ::fluid_preset_get_num(pPreset); #else const int iProg = pPreset->get_num(pPreset); #endif QString sEntry = QString::number(iChan); sEntry += ':'; sEntry += QString::number(iBank); sEntry += ':'; sEntry += QString::number(iProg); m_settings.setValue(sPrefix.arg(iChan + 1), sEntry); } #endif else m_settings.remove(sPrefix.arg(iChan + 1)); } // Cleanup old entries, if any... while (!m_settings.value(sPrefix.arg(++iChan)).toString().isEmpty()) m_settings.remove(sPrefix.arg(iChan)); m_settings.endGroup(); // Done with the key group? if (!pEngine->isDefault()) m_settings.endGroup(); return true; } bool qsynthOptions::deletePreset ( qsynthEngine *pEngine, const QString& sPreset ) { if (pEngine == nullptr) return false; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return false; QString sPrefix; if (!pEngine->isDefault()) sPrefix = "/Engine/" + pEngine->name(); QString sSuffix; if (sPreset != pSetup->sDefPresetName && !sPreset.isEmpty()) { sSuffix = "/" + sPreset; int iPreset = pSetup->presets.indexOf(sPreset); if (iPreset < 0) return false; pSetup->presets.removeAt(iPreset); m_settings.remove(sPrefix + "/Preset" + sSuffix); } return true; } //--------------------------------------------------------------------------- // Combo box history persistence helper implementation. void qsynthOptions::loadComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { const bool bBlockSignals = pComboBox->blockSignals(true); // Load combobox list from configuration settings file... m_settings.beginGroup("/History/" + pComboBox->objectName()); if (m_settings.childKeys().count() > 0) { pComboBox->setUpdatesEnabled(false); pComboBox->setDuplicatesEnabled(false); pComboBox->clear(); for (int i = 0; i < iLimit; ++i) { const QString& sText = m_settings.value( "/Item" + QString::number(i + 1)).toString(); if (sText.isEmpty()) break; pComboBox->addItem(sText); } pComboBox->setUpdatesEnabled(true); } m_settings.endGroup(); pComboBox->blockSignals(bBlockSignals); } void qsynthOptions::saveComboBoxHistory ( QComboBox *pComboBox, int iLimit ) { const bool bBlockSignals = pComboBox->blockSignals(true); int iCount = pComboBox->count(); // Add current text as latest item (if not blank)... const QString& sCurrentText = pComboBox->currentText(); if (!sCurrentText.isEmpty()) { for (int i = 0; i < iCount; ++i) { const QString& sText = pComboBox->itemText(i); if (sText == sCurrentText) { pComboBox->removeItem(i); --iCount; break; } } pComboBox->insertItem(0, sCurrentText); pComboBox->setCurrentIndex(0); ++iCount; } while (iCount >= iLimit) pComboBox->removeItem(--iCount); // Save combobox list to configuration settings file... m_settings.beginGroup("/History/" + pComboBox->objectName()); for (int i = 0; i < iCount; ++i) { const QString& sText = pComboBox->itemText(i); if (sText.isEmpty()) break; m_settings.setValue("/Item" + QString::number(i + 1), sText); } m_settings.endGroup(); pComboBox->blockSignals(bBlockSignals); } //--------------------------------------------------------------------------- // Widget geometry persistence helper methods. void qsynthOptions::loadWidgetGeometry ( QWidget *pWidget, bool bVisible ) { // Try to restore old form window positioning. if (pWidget) { // if (bVisible) pWidget->show(); -- force initial exposure? m_settings.beginGroup("/Geometry/" + pWidget->objectName()); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) const QByteArray& geometry = m_settings.value("/geometry").toByteArray(); if (geometry.isEmpty()) { QWidget *pParent = pWidget->parentWidget(); if (pParent) pParent = pParent->window(); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (pParent == nullptr) pParent = QApplication::desktop(); #endif if (pParent) { QRect wrect(pWidget->geometry()); wrect.moveCenter(pParent->geometry().center()); pWidget->move(wrect.topLeft()); } } else { pWidget->restoreGeometry(geometry); } #else//--LOAD_OLD_GEOMETRY QPoint wpos; QSize wsize; wpos.setX(m_settings.value("/x", -1).toInt()); wpos.setY(m_settings.value("/y", -1).toInt()); wsize.setWidth(m_settings.value("/width", -1).toInt()); wsize.setHeight(m_settings.value("/height", -1).toInt()); if (wpos.x() > 0 && wpos.y() > 0) pWidget->move(wpos); if (wsize.width() > 0 && wsize.height() > 0) pWidget->resize(wsize); #endif // else // pWidget->adjustSize(); if (!bVisible) bVisible = m_settings.value("/visible", false).toBool(); if (bVisible && !bStartMinimized) pWidget->show(); else pWidget->hide(); m_settings.endGroup(); } } void qsynthOptions::saveWidgetGeometry ( QWidget *pWidget, bool bVisible ) { // Try to save form window position... // (due to X11 window managers ideossincrasies, we better // only save the form geometry while its up and visible) if (pWidget) { m_settings.beginGroup("/Geometry/" + pWidget->objectName()); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) m_settings.setValue("/geometry", pWidget->saveGeometry()); #else//--SAVE_OLD_GEOMETRY const QPoint& wpos = pWidget->pos(); const QSize& wsize = pWidget->size(); m_settings.setValue("/x", wpos.x()); m_settings.setValue("/y", wpos.y()); m_settings.setValue("/width", wsize.width()); m_settings.setValue("/height", wsize.height()); #endif if (!bVisible) bVisible = pWidget->isVisible(); m_settings.setValue("/visible", bVisible && !bStartMinimized); m_settings.endGroup(); } } // end of qsynthOptions.cpp qsynth-1.0.3/src/PaxHeaders/qsynthPaletteForm.ui0000644000000000000000000000013214771226115016744 xustar0030 mtime=1743072333.114076168 30 atime=1743072333.114076168 30 ctime=1743072333.114076168 qsynth-1.0.3/src/qsynthPaletteForm.ui0000644000175000001440000001717714771226115016751 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthPaletteForm 0 0 534 640 0 0 Color Themes Name 0 0 320 0 Current color palette name true QComboBox::NoInsert Save current color palette name Save :/images/formSave.png Delete current color palette name Delete :/images/formRemove.png Palette 280 360 Current color palette true Generate: 0 0 Qt::StrongFocus Base color to generate palette Reset all current palette colors Reset :/images/itemReset.png Qt::Horizontal 8 20 Import a custom color theme (palette) from file Import... :/images/formOpen.png Export a custom color theme (palette) to file Export... :/images/formSave.png Qt::Horizontal 8 20 Show Details Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok qsynthPaletteForm::ColorButton nameCombo saveButton deleteButton paletteView generateButton resetButton importButton exportButton detailsCheck dialogButtons qsynth-1.0.3/src/PaxHeaders/qsynthMessagesForm.cpp0000644000000000000000000000013214771226115017262 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.111076183 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMessagesForm.cpp0000644000175000001440000001226214771226115017255 0ustar00rncbcusers// qsynthMessagesForm.cpp // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthMessagesForm.h" #include "qsynthMainForm.h" #include #include #include #include #include #include #include // The maximum number of message lines. #define QSYNTH_MESSAGES_MAXLINES 1000 // Deprecated QTextStreamFunctions/Qt namespaces workaround. #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) #define endl Qt::endl; #endif //---------------------------------------------------------------------------- // qsynthMessagesForm -- UI wrapper form. // Constructor. qsynthMessagesForm::qsynthMessagesForm ( QWidget *pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { // Setup UI struct... m_ui.setupUi(this); // m_ui.MessagesTextView->setTextFormat(Qt::LogText); // Initialize default message limit. m_iMessagesLines = 0; setMessagesLimit(QSYNTH_MESSAGES_MAXLINES); m_pMessagesLog = nullptr; } // Destructor. qsynthMessagesForm::~qsynthMessagesForm (void) { setLogging(false); } // Notify our parent that we're emerging. void qsynthMessagesForm::showEvent ( QShowEvent *pShowEvent ) { qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->stabilizeFormEx(); QWidget::showEvent(pShowEvent); } // Notify our parent that we're closing. void qsynthMessagesForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->stabilizeFormEx(); } // Messages view font accessors. QFont qsynthMessagesForm::messagesFont (void) const { return m_ui.MessagesTextView->font(); } void qsynthMessagesForm::setMessagesFont ( const QFont& font ) { m_ui.MessagesTextView->setFont(font); } // Messages line limit accessors. int qsynthMessagesForm::messagesLimit (void) const { return m_iMessagesLimit; } void qsynthMessagesForm::setMessagesLimit ( int iMessagesLimit ) { m_iMessagesLimit = iMessagesLimit; m_iMessagesHigh = iMessagesLimit + (iMessagesLimit / 3); // m_ui.MessagesTextView->setMaxLogLines(iMessagesLimit); } // Messages logging stuff. bool qsynthMessagesForm::isLogging (void) const { return (m_pMessagesLog != nullptr); } void qsynthMessagesForm::setLogging ( bool bEnabled, const QString& sFilename ) { if (m_pMessagesLog) { appendMessages(tr("Logging stopped --- %1 ---") .arg(QDateTime::currentDateTime().toString())); m_pMessagesLog->close(); delete m_pMessagesLog; m_pMessagesLog = nullptr; } if (bEnabled) { m_pMessagesLog = new QFile(sFilename); if (m_pMessagesLog->open(QIODevice::Text | QIODevice::Append)) { appendMessages(tr("Logging started --- %1 ---") .arg(QDateTime::currentDateTime().toString())); } else { delete m_pMessagesLog; m_pMessagesLog = nullptr; } } } // Messages log output method. void qsynthMessagesForm::appendMessagesLog ( const QString& s ) { if (m_pMessagesLog) { QTextStream(m_pMessagesLog) << s << endl; m_pMessagesLog->flush(); } } // Messages widget output method. void qsynthMessagesForm::appendMessagesLine ( const QString& s ) { // Check for message line limit... if (m_iMessagesLines > m_iMessagesHigh) { m_ui.MessagesTextView->setUpdatesEnabled(false); QTextCursor textCursor(m_ui.MessagesTextView->document()->begin()); while (m_iMessagesLines > m_iMessagesLimit) { // Move cursor extending selection // from start to next line-block... textCursor.movePosition( QTextCursor::NextBlock, QTextCursor::KeepAnchor); m_iMessagesLines--; } // Remove the excessive line-blocks... textCursor.removeSelectedText(); m_ui.MessagesTextView->setUpdatesEnabled(true); } m_ui.MessagesTextView->append(s); m_iMessagesLines++; } // Messages widget output method. void qsynthMessagesForm::appendMessages ( const QString& s ) { appendMessagesColor(s, Qt::gray); } void qsynthMessagesForm::appendMessagesColor ( const QString& s, const QColor& rgb ) { const QString& sText = QTime::currentTime().toString("hh:mm:ss.zzz") + ' ' + s; appendMessagesLine("" + sText + ""); appendMessagesLog(sText); } void qsynthMessagesForm::appendMessagesText ( const QString& s ) { appendMessagesLine(s); appendMessagesLog(s); } // end of qsynthMessagesForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthPresetForm.ui0000644000000000000000000000013214771226115016610 xustar0030 mtime=1743072333.114076168 30 atime=1743072333.114076168 30 ctime=1743072333.114076168 qsynth-1.0.3/src/qsynthPresetForm.ui0000644000175000001440000001372614771226115016611 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthPresetForm 0 0 520 320 Channel Preset :/images/preset1.png true 8 4 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok QTabWidget::Rounded Preset 8 4 Qt::Horizontal 20 0 80 32767 Bank selector true 4 false true false true true Bank Program selector true 4 false true false true true Prog Name SFID Soundfont Whether to preview the current selection Preview PresetTabWidget BankListView ProgListView PreviewCheckBox DialogButtonBox qsynth-1.0.3/src/PaxHeaders/qsynthPresetForm.h0000644000000000000000000000013214771226115016422 xustar0030 mtime=1743072333.114076168 30 atime=1743072333.114076168 30 ctime=1743072333.114076168 qsynth-1.0.3/src/qsynthPresetForm.h0000644000175000001440000000411014771226115016406 0ustar00rncbcusers// qsynthPresetForm.h // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthPresetForm_h #define __qsynthPresetForm_h #include "ui_qsynthPresetForm.h" #include // Forward declarations. class qsynthOptions; //---------------------------------------------------------------------------- // qsynthPresetForm -- UI wrapper form. class qsynthPresetForm : public QDialog { Q_OBJECT public: // Constructor. qsynthPresetForm(QWidget *pParent = nullptr); // Destructor. ~qsynthPresetForm(); void setup(qsynthOptions *pOptions, fluid_synth_t *pSynth, int iChan); public slots: void stabilizeForm(); void bankChanged(); void progChanged(); void previewChanged(); protected slots: void accept(); void reject(); protected: void setBankProg(int iBank, int iProg); QTreeWidgetItem *findBankItem(int iBank); QTreeWidgetItem *findProgItem(int iProg); bool validateForm(); private: // The Qt-designer UI struct... Ui::qsynthPresetForm m_ui; // Instance variables. qsynthOptions *m_pOptions; fluid_synth_t *m_pSynth; int m_iChan; int m_iBank; int m_iProg; int m_iDirtySetup; int m_iDirtyCount; }; #endif // __qsynthPresetForm_h // end of qsynthPresetForm.h qsynth-1.0.3/src/PaxHeaders/qsynthSetupForm.ui0000644000000000000000000000013214771226115016446 xustar0030 mtime=1743072333.115076163 30 atime=1743072333.115076163 30 ctime=1743072333.115076163 qsynth-1.0.3/src/qsynthSetupForm.ui0000644000175000001440000010745114771226115016446 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthSetupForm 0 0 540 360 Setup :/images/setup1.png true 4 4 Engine &Name: false DisplayNameLineEdit Engine display name 32 Qt::Horizontal 8 8 0 &MIDI Enable MIDI input Enable MIDI &Input MIDI &Driver: false MidiDriverComboBox Input MIDI driver false Qt::Horizontal 8 8 MIDI D&evice: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false MidiDeviceComboBox 180 0 MIDI device name true MIDI &Channels: false MidiChannelsSpinBox 2 0 Number of MIDI channels 1 256 1 Qt::Horizontal 8 8 MIDI &Bank Select mode: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter MidiBankSelectComboBox MIDI Bank Select mode true gm gs mma xs Qt::Vertical 8 8 4 QFrame::NoFrame QFrame::Plain MIDI Client &Name ID (ALSA/CoreMidi): false MidiNameComboBox ALSA Sequencer client name identification true pid qsynth Qt::Horizontal 8 8 Attempt to connect the MIDI inputs to the physical ports &Auto Connect MIDI Inputs Print out verbose messages about MIDI events &Verbose MIDI event messages Whether to show MIDI router events on messages window D&ump MIDI router events &Audio Qt::Vertical 8 8 4 Audio &Driver: false AudioDriverComboBox Output audio driver false Sample &Format: false SampleFormatComboBox Sample format QFrame::NoFrame QFrame::Plain Sample &Rate: false SampleRateComboBox Sample rate in samples per second (Hz) true 1 22050 44100 48000 88200 96000 Buffer &Size: false AudioBufSizeComboBox Period size in bytes (audio buffer size) true 64 128 256 512 1024 2048 4096 8192 Buffer Cou&nt: false AudioBufCountComboBox Period count (number of audio buffers) true 2 4 8 16 32 64 4 Audio D&evice: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioDeviceComboBox Audio &Channels: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false AudioChannelsSpinBox 0 0 Number of audio groups 1 256 0 0 Number of enabled polyphonic voices 16 4096 256 0 0 Number of stereo audio channels 1 256 180 0 MIDI device name true &Polyphony: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter false PolyphonySpinBox Qt::Horizontal 8 8 Audio &Groups: false AudioGroupsSpinBox 4 QFrame::NoFrame QFrame::Plain JACK Client &Name ID: false JackNameComboBox JACK client name identification true 1 fluidsynth qsynth Qt::Horizontal 8 8 Attempt to connect the JACK outputs to the physical ports &Auto Connect JACK Outputs Create multiple JACK output ports for channels, groups and effects &Multiple JACK Outputs Qt::Vertical QSizePolicy::Expanding 8 8 &WASAPI Exclusive Mode &Soundfonts 8 8 Qt::CustomContextMenu Soundfont stack true 4 false true false true SFID Name Offset 4 Open soundfont file for loading &Open... :/images/open1.png Edit selected soundfont bank offset &Edit :/images/edit1.png Remove selected soundfont from stack &Remove :/images/remove1.png Qt::Vertical 8 8 Move up selected soundfont towards the top of stack &Up :/images/up1.png Move down selected soundfont towards the bottom of stack &Down :/images/down1.png S&ettings 0 0 320 0 true QAbstractItemView::SingleSelection QAbstractItemView::SelectRows 4 false true false true Name Type Realtime Current Default Min Max Options Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok DisplayNameLineEdit SetupTabWidget MidiInCheckBox MidiDriverComboBox MidiDeviceComboBox MidiChannelsSpinBox MidiBankSelectComboBox MidiNameComboBox MidiAutoConnectCheckBox VerboseCheckBox MidiDumpCheckBox AudioDriverComboBox AudioDeviceComboBox SampleFormatComboBox AudioChannelsSpinBox SampleRateComboBox AudioGroupsSpinBox AudioBufSizeComboBox PolyphonySpinBox AudioBufCountComboBox JackNameComboBox JackAutoConnectCheckBox JackMultiCheckBox WasapiExclusiveCheckBox SoundFontListView SoundFontOpenPushButton SoundFontEditPushButton SoundFontRemovePushButton SoundFontMoveUpPushButton SoundFontMoveDownPushButton SettingsListView DialogButtonBox qsynth-1.0.3/src/PaxHeaders/qsynthOptionsForm.h0000644000000000000000000000013214771226115016613 xustar0030 mtime=1743072333.113076173 30 atime=1743072333.113076173 30 ctime=1743072333.113076173 qsynth-1.0.3/src/qsynthOptionsForm.h0000644000175000001440000000407614771226115016612 0ustar00rncbcusers// qsynthOptionsForm.h // /**************************************************************************** Copyright (C) 2003-2022, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthOptionsForm_h #define __qsynthOptionsForm_h #include "ui_qsynthOptionsForm.h" // Forward declarations. class qsynthOptions; //---------------------------------------------------------------------------- // qsynthOptionsForm -- UI wrapper form. class qsynthOptionsForm : public QDialog { Q_OBJECT public: // Constructor. qsynthOptionsForm(QWidget *pParent = nullptr); // Destructor. ~qsynthOptionsForm(); void setup(qsynthOptions *pOptions); protected slots: void optionsChanged(); void chooseMessagesFont(); void browseMessagesLogPath(); void editCustomColorThemes(); void accept(); void reject(); protected: // Custom color/style themes settlers. void resetCustomColorThemes(const QString& sCustomColorTheme); void resetCustomStyleThemes(const QString& sCustomStyleTheme); void resetDefaultLanguage(const QString& sLanguage); void stabilizeForm(); private: // The Qt-designer UI struct... Ui::qsynthOptionsForm m_ui; // Instance variables. qsynthOptions *m_pOptions; int m_iDirtySetup; int m_iDirtyCount; }; #endif // __qsynthOptionsForm_h // end of qsynthOptionsForm.h qsynth-1.0.3/src/PaxHeaders/qsynth.cpp0000644000000000000000000000013214771226115014746 xustar0030 mtime=1743072333.104076219 30 atime=1743072333.103984486 30 ctime=1743072333.104076219 qsynth-1.0.3/src/qsynth.cpp0000644000175000001440000004235514771226115014747 0ustar00rncbcusers// qsynth.cpp // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynth.h" #include "qsynthOptions.h" #include "qsynthMainForm.h" #include "qsynthPaletteForm.h" #include #include #include #include #include #include #ifdef CONFIG_PIPEWIRE #include #endif #if QT_VERSION < QT_VERSION_CHECK(4, 5, 0) namespace Qt { const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); } #endif #ifndef CONFIG_PREFIX #define CONFIG_PREFIX "/usr/local" #endif #ifndef CONFIG_BINDIR #define CONFIG_BINDIR CONFIG_PREFIX "/bin" #endif #ifndef CONFIG_DATADIR #define CONFIG_DATADIR CONFIG_PREFIX "/share" #endif #ifndef CONFIG_LIBDIR #if defined(Q_PROCESSOR_X86_64) #define CONFIG_LIBDIR CONFIG_PREFIX "/lib64" #else #define CONFIG_LIBDIR CONFIG_PREFIX "/lib" #endif #endif #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #define CONFIG_PLUGINSDIR CONFIG_LIBDIR "/qt4/plugins" #elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #define CONFIG_PLUGINSDIR CONFIG_LIBDIR "/qt5/plugins" #else #define CONFIG_PLUGINSDIR CONFIG_LIBDIR "/qt6/plugins" #endif //------------------------------------------------------------------------- // Singleton application instance stuff (Qt/X11 only atm.) // #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 #define QSYNTH_XUNIQUE "qsynthApplication" #include /* for gethostname() */ #include #include #endif // CONFIG_X11 #else #include #if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) #include #endif #include #include #include #endif #endif // CONFIG_XUNIQUE // Install Prefix Location QString qsynthApplication::prefixPath; // Translations Location QString qsynthApplication::translationsPath; // Constructor. qsynthApplication::qsynthApplication ( int& argc, char **argv ) : QApplication(argc, argv), m_pQtTranslator(nullptr), m_pMyTranslator(nullptr), m_pWidget(nullptr) #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 , m_pDisplay(nullptr) , m_aUnique(0) , m_wOwner(0) #endif // CONFIG_X11 #else , m_pMemory(nullptr) , m_pServer(nullptr) #endif #endif // CONFIG_XUNIQUE { #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) QApplication::setApplicationName(QSYNTH_TITLE); QApplication::setApplicationDisplayName(QSYNTH_TITLE); // QSYNTH_TITLE " - " + QObject::tr(QSYNTH_SUBTITLE)); #if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) QApplication::setDesktopFileName( QString("org.rncbc.%1").arg(PROJECT_NAME)); #endif QApplication::setApplicationVersion(PROJECT_VERSION); #endif QDir appDir(QApplication::applicationDirPath()); #ifndef Q_OS_WINDOWS appDir.cdUp(); #endif qsynthApplication::prefixPath = appDir.path(); } // Destructor. qsynthApplication::~qsynthApplication (void) { #ifdef CONFIG_XUNIQUE #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) clearServer(); #endif #endif // CONFIG_XUNIQUE if (m_pMyTranslator) delete m_pMyTranslator; if (m_pQtTranslator) delete m_pQtTranslator; } // Load translation support. void qsynthApplication::loadTranslations(const QString& sLanguage) { QLocale loc; if (!sLanguage.isEmpty()) { loc = QLocale(sLanguage); } QString sLocPath = qsynthApplication::prefixPath; #if defined(Q_OS_WINDOWS) || defined(Q_OS_MACOS) sLocPath.append("/translations"); #else sLocPath.append(CONFIG_DATADIR "/qsynth/translations"); #endif qsynthApplication::translationsPath = sLocPath; if (loc.language() != QLocale::C) { // Try own Qt translation... m_pQtTranslator = new QTranslator(this); QString sLocName = "qt"; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) sLocPath = QLibraryInfo::path(QLibraryInfo::TranslationsPath); #else sLocPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); #endif // https://www.kdab.com/fixing-a-common-antipattern-when-loading-translations-in-qt/ if (m_pQtTranslator->load(loc, sLocName, "_", sLocPath)) { QApplication::installTranslator(m_pQtTranslator); } else { delete m_pQtTranslator; m_pQtTranslator = nullptr; #ifdef CONFIG_DEBUG qWarning() << "Warning: no translation found for" << loc.name() << "path:" << sLocPath << "name:" << sLocName; #endif } // Try own application translation... m_pMyTranslator = new QTranslator(this); sLocName = "qsynth"; if (m_pMyTranslator->load(loc, sLocName, "_", sLocPath)) { QApplication::installTranslator(m_pMyTranslator); } else { sLocPath = qsynthApplication::translationsPath; if (m_pMyTranslator->load(loc, sLocName, "_", sLocPath)) { QApplication::installTranslator(m_pMyTranslator); } else { delete m_pMyTranslator; m_pMyTranslator = nullptr; #ifdef CONFIG_DEBUG qWarning() << "Warning: no translation found for" << loc.name() << "path:" << sLocPath << "name:" << sLocName; #endif } } } } // Main application widget accessors. void qsynthApplication::setMainWidget ( QWidget *pWidget ) { m_pWidget = pWidget; #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 m_wOwner = m_pWidget->winId(); if (m_pDisplay && m_wOwner) { XGrabServer(m_pDisplay); XSetSelectionOwner(m_pDisplay, m_aUnique, m_wOwner, CurrentTime); XUngrabServer(m_pDisplay); } #endif // CONFIG_X11 #endif #endif // CONFIG_XUNIQUE } // Check if another instance is running, // and raise its proper main widget... bool qsynthApplication::setup (void) { #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 m_pDisplay = QX11Info::display(); if (m_pDisplay) { QString sUnique = QSYNTH_XUNIQUE; QString sUserName = QString::fromUtf8(::getenv("USER")); if (sUserName.isEmpty()) sUserName = QString::fromUtf8(::getenv("USERNAME")); if (!sUserName.isEmpty()) { sUnique += ':'; sUnique += sUserName; } char szHostName[255]; if (::gethostname(szHostName, sizeof(szHostName)) == 0) { sUnique += '@'; sUnique += QString::fromUtf8(szHostName); } m_aUnique = XInternAtom(m_pDisplay, sUnique.toUtf8().constData(), false); XGrabServer(m_pDisplay); m_wOwner = XGetSelectionOwner(m_pDisplay, m_aUnique); XUngrabServer(m_pDisplay); if (m_wOwner != None) { // First, notify any freedesktop.org WM // that we're about to show the main widget... Screen *pScreen = XDefaultScreenOfDisplay(m_pDisplay); int iScreen = XScreenNumberOfScreen(pScreen); XEvent ev; memset(&ev, 0, sizeof(ev)); ev.xclient.type = ClientMessage; ev.xclient.display = m_pDisplay; ev.xclient.window = m_wOwner; ev.xclient.message_type = XInternAtom(m_pDisplay, "_NET_ACTIVE_WINDOW", false); ev.xclient.format = 32; ev.xclient.data.l[0] = 0; // Source indication. ev.xclient.data.l[1] = 0; // Timestamp. ev.xclient.data.l[2] = 0; // Requestor's currently active window (none) ev.xclient.data.l[3] = 0; ev.xclient.data.l[4] = 0; XSelectInput(m_pDisplay, m_wOwner, StructureNotifyMask); XSendEvent(m_pDisplay, RootWindow(m_pDisplay, iScreen), false, (SubstructureNotifyMask | SubstructureRedirectMask), &ev); XSync(m_pDisplay, false); XRaiseWindow(m_pDisplay, m_wOwner); // And then, let it get caught on destination // by QApplication::native/x11EventFilter... const QByteArray value = QSYNTH_XUNIQUE; XChangeProperty( m_pDisplay, m_wOwner, m_aUnique, m_aUnique, 8, PropModeReplace, (unsigned char *) value.data(), value.length()); // Done. return true; } } #endif // CONFIG_X11 return false; #else return setupServer(); #endif #else return false; #endif // !CONFIG_XUNIQUE } #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 void qsynthApplication::x11PropertyNotify ( Window w ) { if (m_pDisplay && m_pWidget && m_wOwner == w) { // Always check whether our property-flag is still around... Atom aType; int iFormat = 0; unsigned long iItems = 0; unsigned long iAfter = 0; unsigned char *pData = 0; if (XGetWindowProperty( m_pDisplay, m_wOwner, m_aUnique, 0, 1024, false, m_aUnique, &aType, &iFormat, &iItems, &iAfter, &pData) == Success && aType == m_aUnique && iItems > 0 && iAfter == 0) { // Avoid repeating it-self... XDeleteProperty(m_pDisplay, m_wOwner, m_aUnique); // Just make it always shows up fine... m_pWidget->showNormal(); m_pWidget->raise(); m_pWidget->activateWindow(); // FIXME: Do our best speciality, although it should be // done iif configuration says so, we'll do it anyway! qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->startAllEngines(); } // Free any left-overs... if (iItems > 0 && pData) XFree(pData); } } bool qsynthApplication::x11EventFilter ( XEvent *pEv ) { if (pEv->type == PropertyNotify && pEv->xproperty.state == PropertyNewValue) x11PropertyNotify(pEv->xproperty.window); return QApplication::x11EventFilter(pEv); } #endif // CONFIG_X11 #else // Local server/shmem setup. bool qsynthApplication::setupServer (void) { clearServer(); m_sUnique = QCoreApplication::applicationName(); QString sUserName = QString::fromUtf8(::getenv("USER")); if (sUserName.isEmpty()) sUserName = QString::fromUtf8(::getenv("USERNAME")); if (!sUserName.isEmpty()) { m_sUnique += ':'; m_sUnique += sUserName; } m_sUnique += '@'; m_sUnique += QHostInfo::localHostName(); #if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) const QNativeIpcKey nativeKey = QSharedMemory::legacyNativeKey(m_sUnique); #if defined(Q_OS_UNIX) m_pMemory = new QSharedMemory(nativeKey); m_pMemory->attach(); delete m_pMemory; #endif m_pMemory = new QSharedMemory(nativeKey); #else #if defined(Q_OS_UNIX) m_pMemory = new QSharedMemory(m_sUnique); m_pMemory->attach(); delete m_pMemory; #endif m_pMemory = new QSharedMemory(m_sUnique); #endif bool bServer = false; const qint64 pid = QCoreApplication::applicationPid(); struct Data { qint64 pid; }; if (m_pMemory->create(sizeof(Data))) { m_pMemory->lock(); Data *pData = static_cast (m_pMemory->data()); if (pData) { pData->pid = pid; bServer = true; } m_pMemory->unlock(); } else if (m_pMemory->attach()) { m_pMemory->lock(); // maybe not necessary? Data *pData = static_cast (m_pMemory->data()); if (pData) bServer = (pData->pid == pid); m_pMemory->unlock(); } if (bServer) { QLocalServer::removeServer(m_sUnique); m_pServer = new QLocalServer(); m_pServer->setSocketOptions(QLocalServer::UserAccessOption); m_pServer->listen(m_sUnique); QObject::connect(m_pServer, SIGNAL(newConnection()), SLOT(newConnectionSlot())); } else { QLocalSocket socket; socket.connectToServer(m_sUnique); if (socket.state() == QLocalSocket::ConnectingState) socket.waitForConnected(200); if (socket.state() == QLocalSocket::ConnectedState) { socket.write(QCoreApplication::arguments().join(' ').toUtf8()); socket.flush(); socket.waitForBytesWritten(200); } } return !bServer; } // Local server/shmem cleanup. void qsynthApplication::clearServer (void) { if (m_pServer) { m_pServer->close(); delete m_pServer; m_pServer = nullptr; } if (m_pMemory) { delete m_pMemory; m_pMemory = nullptr; } m_sUnique.clear(); } // Local server conection slot. void qsynthApplication::newConnectionSlot (void) { QLocalSocket *pSocket = m_pServer->nextPendingConnection(); QObject::connect(pSocket, SIGNAL(readyRead()), SLOT(readyReadSlot())); } // Local server data-ready slot. void qsynthApplication::readyReadSlot (void) { QLocalSocket *pSocket = qobject_cast (sender()); if (pSocket) { const qint64 nread = pSocket->bytesAvailable(); if (nread > 0) { const QByteArray data = pSocket->read(nread); // Just make it always shows up fine... if (m_pWidget) { m_pWidget->showNormal(); m_pWidget->raise(); m_pWidget->activateWindow(); } // FIXME: Do our best speciality, although it should be // done iif configuration says so, we'll do it anyway! qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->startAllEngines(); // Reset the server... setupServer(); } } } #endif #endif // CONFIG_XUNIQUE //------------------------------------------------------------------------- // stacktrace - Signal crash handler. // #ifdef CONFIG_STACKTRACE #if defined(Q_CC_GNU) && defined(Q_OS_LINUX) #include #include #include #include #include void stacktrace ( int signo ) { pid_t pid; int rc; int status = 0; char cmd[80]; // Reinstall default handler; prevent race conditions... ::signal(signo, SIG_DFL); static const char *shell = "/bin/sh"; static const char *format = "gdb -q --batch --pid=%d" " --eval-command='thread apply all bt'"; snprintf(cmd, sizeof(cmd), format, (int) getpid()); pid = fork(); // Fork failure! if (pid < 0) return; // Fork child... if (pid == 0) { execl(shell, shell, "-c", cmd, nullptr); _exit(1); return; } // Parent here: wait for child to terminate... do { rc = waitpid(pid, &status, 0); } while ((rc < 0) && (errno == EINTR)); // Dispatch any logging, if any... QApplication::processEvents(QEventLoop::AllEvents, 3000); // Make sure everyone terminates... kill(pid, SIGTERM); _exit(1); } #endif #endif //------------------------------------------------------------------------- // main - The main program trunk. // int main ( int argc, char **argv ) { #ifdef CONFIG_PIPEWIRE // Initialize PipeWire first ::pw_init(&argc, &argv); ::atexit(::pw_deinit); #endif Q_INIT_RESOURCE(qsynth); #ifdef CONFIG_STACKTRACE #if defined(Q_CC_GNU) && defined(Q_OS_LINUX) ::signal(SIGILL, stacktrace); ::signal(SIGFPE, stacktrace); ::signal(SIGSEGV, stacktrace); ::signal(SIGABRT, stacktrace); ::signal(SIGBUS, stacktrace); #endif #endif #if defined(Q_OS_LINUX) && !defined(CONFIG_WAYLAND) ::setenv("QT_QPA_PLATFORM", "xcb", 0); #endif #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif #endif qsynthApplication app(argc, argv); // Construct default settings; override with command line arguments. qsynthOptions options; app.loadTranslations(options.sLanguage); if (!options.parse_args(app.arguments())) { app.quit(); return 1; } // Have another instance running? if (app.setup()) { app.quit(); return 2; } // Special custom styles... if (QDir(CONFIG_PLUGINSDIR).exists()) app.addLibraryPath(CONFIG_PLUGINSDIR); if (!options.sCustomStyleTheme.isEmpty()) app.setStyle(QStyleFactory::create(options.sCustomStyleTheme)); // Custom color theme (eg. "KXStudio")... const QChar sep = QDir::separator(); QString sPalettePath = QApplication::applicationDirPath(); sPalettePath.remove(CONFIG_BINDIR); sPalettePath.append(CONFIG_DATADIR); sPalettePath.append(sep); sPalettePath.append(PROJECT_NAME); sPalettePath.append(sep); sPalettePath.append("palette"); if (QDir(sPalettePath).exists()) { QStringList names; names.append("KXStudio"); names.append("Wonton Soup"); QStringListIterator name_iter(names); while (name_iter.hasNext()) { const QString& name = name_iter.next(); const QFileInfo fi(sPalettePath, name + ".conf"); if (fi.isReadable()) { qsynthPaletteForm::addNamedPaletteConf( &options.settings(), name, fi.absoluteFilePath()); } } } QPalette pal(app.palette()); if (qsynthPaletteForm::namedPalette( &options.settings(), options.sCustomColorTheme, pal)) app.setPalette(pal); // Set default base font... if (options.iBaseFontSize > 0) app.setFont(QFont(app.font().family(), options.iBaseFontSize)); // What style do we create these forms? Qt::WindowFlags wflags = Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint; if (options.bKeepOnTop) wflags |= Qt::Tool; // Construct the main form, and show it to the world. qsynthMainForm w(nullptr, wflags); w.setup(&options); // If we have a systray icon, we'll skip this. if (!options.bSystemTray) { w.show(); // w.adjustSize(); } // Settle this one as application main widget... app.setMainWidget(&w); // Settle session manager shutdown (eg. logoff)... QObject::connect( &app, SIGNAL(commitDataRequest(QSessionManager&)), &w, SLOT(commitData(QSessionManager&)), Qt::DirectConnection); // Register the quit signal/slot. app.setQuitOnLastWindowClosed(false); return app.exec(); } // end of qsynth.cpp qsynth-1.0.3/src/PaxHeaders/qsynth.qrc0000644000000000000000000000013214771226115014751 xustar0030 mtime=1743072333.104076219 30 atime=1743072333.104076219 30 ctime=1743072333.104076219 qsynth-1.0.3/src/qsynth.qrc0000644000175000001440000000174214771226115014745 0ustar00rncbcusers images/qsynth.png images/qsynth.svg images/about1.png images/accept1.png images/add1.png images/channels1.png images/down1.png images/edit1.png images/ledoff1.png images/ledon1.png images/messages1.png images/open1.png images/options1.png images/panic1.png images/preset1.png images/quit1.png images/remove1.png images/reset1.png images/restart1.png images/save1.png images/setup1.png images/sfont1.png images/up1.png images/formOpen.png images/formRemove.png images/formSave.png images/itemReset.png images/qtlogo1.png qsynth-1.0.3/src/PaxHeaders/qsynth.h0000644000000000000000000000013214771226115014413 xustar0030 mtime=1743072333.104076219 30 atime=1743072333.104076219 30 ctime=1743072333.104076219 qsynth-1.0.3/src/qsynth.h0000644000175000001440000000611014771226115014401 0ustar00rncbcusers// qsynth.h // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynth_h #define __qsynth_h #include "qsynthAbout.h" #include #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #if defined(Q_WS_X11) #define CONFIG_X11 #endif #endif // Forward decls. class QWidget; class QTranslator; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_XUNIQUE #ifdef CONFIG_X11 #include typedef unsigned long Window; typedef unsigned long Atom; #endif // CONFIG_X11 #endif // CONFIG_XUNIQUE #else #ifdef CONFIG_XUNIQUE class QSharedMemory; class QLocalServer; #endif // CONFIG_XUNIQUE #endif //------------------------------------------------------------------------- // Singleton application instance stuff (Qt/X11 only atm.) // class qsynthApplication : public QApplication { Q_OBJECT public: // Constructor. qsynthApplication(int& argc, char **argv); // Destructor. ~qsynthApplication(); // Main application widget accessors. void setMainWidget(QWidget *pWidget); QWidget *mainWidget() const { return m_pWidget; } // Check if another instance is running, // and raise its proper main widget... bool setup(); void loadTranslations(const QString& sLanguage); // Install Prefix Location static QString prefixPath; // Translations Location static QString translationsPath; #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_XUNIQUE #ifdef CONFIG_X11 void x11PropertyNotify(Window w); bool x11EventFilter(XEvent *pEv) #endif // CONFIG_X11 #endif // CONFIG_XUNIQUE #else #ifdef CONFIG_XUNIQUE protected slots: // Local server slots. void newConnectionSlot(); void readyReadSlot(); protected: // Local server/shmem setup/cleanup. bool setupServer(); void clearServer(); #endif // CONFIG_XUNIQUE #endif private: // Translation support. QTranslator *m_pQtTranslator; QTranslator *m_pMyTranslator; // Instance variables. QWidget *m_pWidget; #ifdef CONFIG_XUNIQUE #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) #ifdef CONFIG_X11 Display *m_pDisplay; Atom m_aUnique; Window m_wOwner; #endif // CONFIG_X11 #else QString m_sUnique; QSharedMemory *m_pMemory; QLocalServer *m_pServer; #endif #endif // CONFIG_XUNIQUE }; #endif // __qsynth_h // end of qsynth.h qsynth-1.0.3/src/PaxHeaders/macOS0000644000000000000000000000013114771226115013640 xustar0030 mtime=1743072333.103076225 29 atime=1743072333.10207623 30 ctime=1743072333.103076225 qsynth-1.0.3/src/macOS/0000755000175000001440000000000014771226115013706 5ustar00rncbcusersqsynth-1.0.3/src/macOS/PaxHeaders/creadmg.sh0000644000000000000000000000013214771226115015654 xustar0030 mtime=1743072333.103076225 30 atime=1743072333.103076225 30 ctime=1743072333.103076225 qsynth-1.0.3/src/macOS/creadmg.sh0000755000175000001440000000117414771226115015652 0ustar00rncbcusers#!/bin/bash # create-dmg is available from Homebrew and https://github.com/create-dmg/create-dmg NAME="qsynth" FULLNAME="${NAME}-1.0.2-3.1.mac-x64" CURDIR=$(pushd `dirname $0`>/dev/null; pwd; popd>/dev/null) BINDIR=`pwd` if [ ! -d "${BINDIR}/${NAME}.app" ]; then echo "ERROR. Missing bundle: ${BINDIR}/${NAME}.app" exit fi create-dmg \ --volname ${FULLNAME} \ --background "${CURDIR}/../images/dmg_background.png" \ --eula "${CURDIR}/../win32/gpl-2.0.rtf" \ --window-pos 200 120 \ --window-size 600 450 \ --icon ${NAME} 150 218 \ --icon-size 100 \ --app-drop-link 450 218 \ ${BINDIR}/${FULLNAME}.dmg \ ${BINDIR}/${NAME}.app qsynth-1.0.3/src/PaxHeaders/qsynthDialSkulptureStyle.h0000644000000000000000000000013214771226115020145 xustar0030 mtime=1743072333.108076199 30 atime=1743072333.108076199 30 ctime=1743072333.108076199 qsynth-1.0.3/src/qsynthDialSkulptureStyle.h0000644000175000001440000000276214771226115020144 0ustar00rncbcusers/****************************************************************************** Skulpture - Classical Three-Dimensional Artwork for Qt 4 Copyright (c) 2019 rncbc aka Rui Nuno Capela Copyright (c) 2007-2009 Christoph Feck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef QSYNTHDIALSKULPTURESTYLE_H_ #define QSYNTHDIALSKULPTURESTYLE_H_ #include class qsynthDialSkulptureStyle : public QCommonStyle { public: qsynthDialSkulptureStyle() {} virtual ~qsynthDialSkulptureStyle() {} virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = 0) const; }; #endif /* QSYNTHDIALSKULPTURESTYLE_H_ */ qsynth-1.0.3/src/PaxHeaders/qsynthMessagesForm.ui0000644000000000000000000000013214771226115017115 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.111076183 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMessagesForm.ui0000644000175000001440000000416314771226115017111 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsunth Qt GUI Interface. Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthMessagesForm 0 0 520 240 Messages :/images/messages1.png 320 80 Messages output log QTextEdit::NoWrap true false MessagesTextView qsynth-1.0.3/src/PaxHeaders/qsynthMessagesForm.h0000644000000000000000000000013214771226115016727 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.111076183 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMessagesForm.h0000644000175000001440000000435114771226115016722 0ustar00rncbcusers// qsynthMessagesForm.h // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthMessagesForm_h #define __qsynthMessagesForm_h #include "ui_qsynthMessagesForm.h" // Forward declarations. class QFile; //---------------------------------------------------------------------------- // qsynthMessagesForm -- UI wrapper form. class qsynthMessagesForm : public QWidget { Q_OBJECT public: // Constructor. qsynthMessagesForm(QWidget *pParent = nullptr, Qt::WindowFlags wflags = Qt::WindowFlags()); // Destructor. ~qsynthMessagesForm(); QFont messagesFont() const; void setMessagesFont(const QFont& font); int messagesLimit() const; void setMessagesLimit(int iLimit); bool isLogging() const; void setLogging(bool bEnabled, const QString& sFilename = QString()); void appendMessages(const QString& s); void appendMessagesColor(const QString& s, const QColor& rgb); void appendMessagesText(const QString& s); protected: void appendMessagesLine(const QString& s); void appendMessagesLog(const QString& s); void showEvent(QShowEvent *); void hideEvent(QHideEvent *); private: // The Qt-designer UI struct... Ui::qsynthMessagesForm m_ui; // Instance variables. int m_iMessagesLines; int m_iMessagesLimit; int m_iMessagesHigh; // Logging stuff. QFile *m_pMessagesLog; }; #endif // __qsynthMessagesForm_h // end of qsynthMessagesForm.h qsynth-1.0.3/src/PaxHeaders/qsynthDialVokiStyle.h0000644000000000000000000000013214771226115017057 xustar0030 mtime=1743072333.109076194 30 atime=1743072333.109076194 30 ctime=1743072333.109076194 qsynth-1.0.3/src/qsynthDialVokiStyle.h0000644000175000001440000000303414771226115017047 0ustar00rncbcusers/****************************************************************************** This style is based on a design by Thorsten Wilms, implemented as a widget by Chris Cannam in Rosegarden, adapted for QSynth by Pedro Lopez-Cabanillas, improved for Qt4 by David Garcia Garzon, adapted as a QStyle by Pedro Lopez-Cabanillas, updated for Qt5 by rncbc aka Rui Nuno Capela. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef VOKISTYLE_H_ #define VOKISTYLE_H_ #include class qsynthDialVokiStyle : public QCommonStyle { public: qsynthDialVokiStyle() {} virtual ~qsynthDialVokiStyle() {} virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = 0) const; }; #endif /*VOKISTYLE_H_*/ qsynth-1.0.3/src/PaxHeaders/qsynthDialPeppinoStyle.h0000644000000000000000000000013214771226115017561 xustar0030 mtime=1743072333.108076199 30 atime=1743072333.108076199 30 ctime=1743072333.108076199 qsynth-1.0.3/src/qsynthDialPeppinoStyle.h0000644000175000001440000000315014771226115017550 0ustar00rncbcusers/*************************************************************************** This style is based on a widget designed by Giuseppe Cigala, adapted as a Qt style for QSynth by Pedro Lopez-Cabanillas This file, Copyright (C) 2019 rncbc aka Rui Nuno Capela , Copyright (C) 2008 Giuseppe Cigala , Copyright (C) 2008 Pedro Lopez-Cabanillas , Copyright (C) 2024 Rui Nuno Capela . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef PEPPINOSTYLE_H_ #define PEPPINOSTYLE_H_ #include class qsynthDialPeppinoStyle : public QCommonStyle { public: qsynthDialPeppinoStyle() {}; virtual ~qsynthDialPeppinoStyle() {}; virtual void drawComplexControl( ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = 0) const; }; #endif /*PEPPINOSTYLE_H_*/ qsynth-1.0.3/src/PaxHeaders/qsynthSetupForm.cpp0000644000000000000000000000013214771226115016613 xustar0030 mtime=1743072333.115076163 30 atime=1743072333.115076163 30 ctime=1743072333.115076163 qsynth-1.0.3/src/qsynthSetupForm.cpp0000644000175000001440000012665014771226115016615 0ustar00rncbcusers// qsynthSetupForm.cpp // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthSetupForm.h" #include "qsynthEngine.h" #include #include #include #include #include #include #include #include // Our local parameter data struct. struct qsynth_settings_data { qsynthSetup *pSetup; QTreeWidget *pListView; QTreeWidgetItem *pListItem; QStringList options; }; static void qsynth_settings_foreach_option ( #ifdef CONFIG_FLUID_SETTINGS_FOREACH_OPTION void *pvData, const char *, const char *pszOption ) #else void *pvData, char *, char *pszOption ) #endif { qsynth_settings_data *pData = (qsynth_settings_data *) pvData; pData->options.append(pszOption); } static void qsynth_settings_foreach ( #ifdef CONFIG_FLUID_SETTINGS_FOREACH void *pvData, const char *pszName, int iType ) #else void *pvData, char *pszName, int iType ) #endif { qsynth_settings_data *pData = (qsynth_settings_data *) pvData; fluid_settings_t *pFluidSettings = (pData->pSetup)->fluid_settings(); // Add the new list item. int iCol = 0; pData->pListItem = new QTreeWidgetItem(pData->pListView, pData->pListItem); (pData->pListItem)->setText(iCol++, pszName); (pData->pListItem)->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable); // Check for type... QString sType = "?"; switch (iType) { case FLUID_NUM_TYPE: sType = "num"; break; case FLUID_INT_TYPE: sType = "int"; break; case FLUID_STR_TYPE: sType = "str"; break; case FLUID_SET_TYPE: sType = "set"; break; } (pData->pListItem)->setText(iCol++, sType); /* // Check for hints... int iHints = ::fluid_settings_get_hints(pFluidSettings, pszName); QString sHints = ""; if (iHints & FLUID_HINT_BOUNDED_BELOW) sHints += " BOUNDED_BELOW "; if (iHints & FLUID_HINT_BOUNDED_ABOVE) sHints += " BOUNDED_ABOVE "; if (iHints & FLUID_HINT_TOGGLED) sHints += " TOGGLED "; if (iHints & FLUID_HINT_SAMPLE_RATE) sHints += " SAMPLE_RATE "; if (iHints & FLUID_HINT_LOGARITHMIC) sHints += " LOGARITHMIC "; if (iHints & FLUID_HINT_LOGARITHMIC) sHints += " INTEGER "; if (iHints & FLUID_HINT_FILENAME) sHints += " FILENAME "; if (iHints & FLUID_HINT_OPTIONLIST) sHints += " OPTIONLIST "; */ bool bRealtime = (bool) ::fluid_settings_is_realtime(pFluidSettings, pszName); (pData->pListItem)->setText(iCol++, (bRealtime ? "yes" : "no")); switch (iType) { case FLUID_NUM_TYPE: { #ifdef CONFIG_FLUID_SETTINGS_GETNUM_DEFAULT double fDefault = 0.0f; ::fluid_settings_getnum_default(pFluidSettings, pszName, &fDefault); #else const double fDefault = ::fluid_settings_getnum_default(pFluidSettings, pszName); #endif double fCurrent = 0.0; double fRangeMin = 0.0; double fRangeMax = 0.0; ::fluid_settings_getnum(pFluidSettings, pszName, &fCurrent); ::fluid_settings_getnum_range(pFluidSettings, pszName, &fRangeMin, &fRangeMax); (pData->pListItem)->setText(iCol++, QString::number(fCurrent)); (pData->pListItem)->setText(iCol++, QString::number(fDefault)); (pData->pListItem)->setText(iCol++, QString::number(fRangeMin)); (pData->pListItem)->setText(iCol++, QString::number(fRangeMax)); break; } case FLUID_INT_TYPE: { #ifdef CONFIG_FLUID_SETTINGS_GETINT_DEFAULT int iDefault = 0; ::fluid_settings_getint_default(pFluidSettings, pszName, &iDefault); #else const int iDefault = ::fluid_settings_getint_default(pFluidSettings, pszName); #endif int iCurrent = 0; int iRangeMin = 0; int iRangeMax = 0; ::fluid_settings_getint(pFluidSettings, pszName, &iCurrent); ::fluid_settings_getint_range(pFluidSettings, pszName, &iRangeMin, &iRangeMax); if (iRangeMin + iRangeMax < 2) { iRangeMin = 0; iRangeMax = 1; } (pData->pListItem)->setText(iCol++, QString::number(iCurrent)); (pData->pListItem)->setText(iCol++, QString::number(iDefault)); (pData->pListItem)->setText(iCol++, QString::number(iRangeMin)); (pData->pListItem)->setText(iCol++, QString::number(iRangeMax)); break; } case FLUID_STR_TYPE: { #ifdef CONFIG_FLUID_SETTINGS_GETSTR_DEFAULT char *pszDefault = nullptr; ::fluid_settings_getstr_default(pFluidSettings, pszName, &pszDefault); #else const char *pszDefault = ::fluid_settings_getstr_default(pFluidSettings, pszName); #endif char *pszCurrent = nullptr; #ifdef CONFIG_FLUID_SETTINGS_DUPSTR ::fluid_settings_dupstr(pFluidSettings, pszName, &pszCurrent); #else ::fluid_settings_getstr(pFluidSettings, pszName, &pszCurrent); #endif (pData->pListItem)->setText(iCol++, pszCurrent); (pData->pListItem)->setText(iCol++, pszDefault); (pData->pListItem)->setText(iCol++, QString()); (pData->pListItem)->setText(iCol++, QString()); #ifdef CONFIG_FLUID_SETTINGS_DUPSTR #ifdef CONFIG_FLUID_FREE ::fluid_free(pszCurrent); #else ::free(pszCurrent); #endif #endif break; }} // Check for options. pData->options.clear(); ::fluid_settings_foreach_option(pFluidSettings, pszName, pvData, qsynth_settings_foreach_option); (pData->pListItem)->setText(iCol++, pData->options.join(" ")); } //---------------------------------------------------------------------------- // qsynthSetupForm -- UI wrapper form. // Constructor. qsynthSetupForm::qsynthSetupForm ( QWidget *pParent ) : QDialog(pParent) { // Setup UI struct... m_ui.setupUi(this); // No settings descriptor initially (the caller will set it). m_pSetup = nullptr; m_pOptions = nullptr; // Initialize dirty control state. m_iDirtySetup = 0; m_iDirtyCount = 0; // Check for pixmaps. m_pXpmSoundFont = new QPixmap(":/images/sfont1.png"); // Way to keep track of current settings custom editor. m_pSettingsItemEditor = nullptr; // Set dialog validators... QRegularExpression rx("[\\w-]+"); m_ui.DisplayNameLineEdit->setValidator(new QRegularExpressionValidator(rx, m_ui.DisplayNameLineEdit)); m_ui.SampleRateComboBox->setValidator(new QIntValidator(m_ui.SampleRateComboBox)); m_ui.AudioBufSizeComboBox->setValidator(new QIntValidator(m_ui.AudioBufSizeComboBox)); m_ui.AudioBufCountComboBox->setValidator(new QIntValidator(m_ui.AudioBufCountComboBox)); m_ui.JackNameComboBox->setValidator(new QRegularExpressionValidator(rx, m_ui.JackNameComboBox)); m_ui.MidiNameComboBox->setValidator(new QRegularExpressionValidator(rx, m_ui.MidiNameComboBox)); // No sorting on soundfont stack list. //m_ui.SoundFontListView->setSorting(-1); // Soundfonts list view... QHeaderView *pHeader = m_ui.SoundFontListView->header(); pHeader->setDefaultAlignment(Qt::AlignLeft); // pHeader->setDefaultSectionSize(300); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // pHeader->setSectionResizeMode(QHeaderView::Custom); pHeader->setSectionsMovable(false); #else // pHeader->setResizeMode(QHeaderView::Custom); pHeader->setMovable(false); #endif pHeader->setStretchLastSection(true); m_ui.SoundFontListView->resizeColumnToContents(0); // SFID. pHeader->resizeSection(1, 300); // Name. m_ui.SoundFontListView->resizeColumnToContents(2); // Offset. // Settings list view... m_ui.SettingsListView->setItemDelegate( new qsynthSettingsItemDelegate(this)); pHeader = m_ui.SettingsListView->header(); pHeader->setDefaultAlignment(Qt::AlignLeft); // pHeader->setDefaultSectionSize(160); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // pHeader->setSectionResizeMode(QHeaderView::Custom); pHeader->setSectionsMovable(false); #else // pHeader->setResizeMode(QHeaderView::Custom); pHeader->setMovable(false); #endif pHeader->setStretchLastSection(true); pHeader->resizeSection(0, 160); // Name. m_ui.SettingsListView->resizeColumnToContents(1); // Type. m_ui.SettingsListView->resizeColumnToContents(2); // Realtime. // m_ui.SettingsListView->resizeColumnToContents(3); // Current. // m_ui.SettingsListView->resizeColumnToContents(4); // Default. m_ui.SettingsListView->resizeColumnToContents(5); // Min. m_ui.SettingsListView->resizeColumnToContents(6); // Max. m_ui.SettingsListView->resizeColumnToContents(7); // Options. // Try to restore old window positioning. adjustSize(); // UI connections... QObject::connect(m_ui.DisplayNameLineEdit, SIGNAL(textChanged(const QString&)), SLOT(nameChanged(const QString&))); QObject::connect(m_ui.MidiInCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiDriverComboBox, SIGNAL(activated(int)), SLOT(midiDriverChanged(int))); QObject::connect(m_ui.MidiDeviceComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiAutoConnectCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiChannelsSpinBox, SIGNAL(valueChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.VerboseCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiDumpCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiNameComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.MidiBankSelectComboBox, SIGNAL(activated(int)), SLOT(settingsChanged())); QObject::connect(m_ui.AudioDriverComboBox, SIGNAL(activated(int)), SLOT(audioDriverChanged(int))); QObject::connect(m_ui.AudioDeviceComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.SampleFormatComboBox, SIGNAL(activated(int)), SLOT(settingsChanged())); QObject::connect(m_ui.SampleRateComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.AudioBufSizeComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.AudioBufCountComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); QObject::connect(m_ui.AudioChannelsSpinBox, SIGNAL(valueChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.AudioGroupsSpinBox, SIGNAL(valueChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.PolyphonySpinBox, SIGNAL(valueChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.JackAutoConnectCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.JackMultiCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); QObject::connect(m_ui.JackNameComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(settingsChanged())); #if defined(Q_OS_WINDOWS) QObject::connect(m_ui.WasapiExclusiveCheckBox, SIGNAL(stateChanged(int)), SLOT(settingsChanged())); #endif QObject::connect(m_ui.SoundFontListView, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(soundfontContextMenu(const QPoint&))); QObject::connect(m_ui.SoundFontListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(stabilizeForm())); QObject::connect(m_ui.SoundFontOpenPushButton, SIGNAL(clicked()), SLOT(openSoundFont())); QObject::connect(m_ui.SoundFontRemovePushButton, SIGNAL(clicked()), SLOT(removeSoundFont())); QObject::connect(m_ui.SoundFontEditPushButton, SIGNAL(clicked()), SLOT(editSoundFont())); QObject::connect(m_ui.SoundFontMoveUpPushButton, SIGNAL(clicked()), SLOT(moveUpSoundFont())); QObject::connect(m_ui.SoundFontMoveDownPushButton, SIGNAL(clicked()), SLOT(moveDownSoundFont())); QObject::connect(m_ui.SoundFontListView->itemDelegate(), SIGNAL(commitData(QWidget*)), SLOT(soundfontItemChanged())); QObject::connect(m_ui.SettingsListView, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(settingsItemChanged(QTreeWidgetItem *, QTreeWidgetItem *))); QObject::connect(m_ui.SettingsListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), SLOT(settingsItemActivated(QTreeWidgetItem *, int))); QObject::connect(m_ui.SettingsListView->itemDelegate(), SIGNAL(commitData(QWidget*)), SLOT(settingsItemChanged())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); } // Destructor. qsynthSetupForm::~qsynthSetupForm (void) { // Delete pixmaps. delete m_pXpmSoundFont; } // A combo-box text item setter helper. void qsynthSetupForm::setComboBoxCurrentText ( QComboBox *pComboBox, const QString& sText ) const { if (pComboBox->isEditable()) { pComboBox->setEditText(sText); } else { int iIndex = pComboBox->findText(sText); if (iIndex < 0) { iIndex = 0; if (!sText.isEmpty()) pComboBox->insertItem(0, sText); } pComboBox->setCurrentIndex(iIndex); } } // Populate (setup) dialog controls from settings descriptors. void qsynthSetupForm::setup ( qsynthOptions *pOptions, qsynthEngine *pEngine, bool bNew ) { // Check this first. if (pOptions == nullptr || pEngine == nullptr) return; // Set reference descriptors. m_pOptions = pOptions; m_pSetup = pEngine->setup(); // Make local copy to custom settings map... m_settings = m_pSetup->settings; // Update caption. setWindowTitle(pEngine->name() + " - " + tr("Setup")); // Start clean? m_iDirtyCount = 0; if (bNew) { m_pSetup->realize(); ++m_iDirtyCount; } // Avoid nested changes. ++m_iDirtySetup; // Display name. m_ui.DisplayNameLineEdit->setText(m_pSetup->sDisplayName); // Load Setttings view... qsynth_settings_data data; // Set data context. data.pSetup = m_pSetup; data.pListView = m_ui.SettingsListView; data.pListItem = nullptr; // And start filling it in... ::fluid_settings_foreach(m_pSetup->fluid_settings(), &data, qsynth_settings_foreach); // Midi Driver combobox options; // check if intended MIDI driver is available. data.options.clear(); char midi_driver[] = "midi.driver"; ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), midi_driver, &data, qsynth_settings_foreach_option); m_ui.MidiDriverComboBox->clear(); if (!data.options.contains(m_pSetup->sMidiDriver)) data.options.append(m_pSetup->sMidiDriver); m_ui.MidiDriverComboBox->addItems(data.options); // Audio Driver combobox options. // check if intended Audio driver is available. data.options.clear(); char audio_driver[] = "audio.driver"; ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), audio_driver, &data, qsynth_settings_foreach_option); m_ui.AudioDriverComboBox->clear(); if (!data.options.contains(m_pSetup->sAudioDriver)) data.options.append(m_pSetup->sAudioDriver); m_ui.AudioDriverComboBox->addItems(data.options); // Sample Format combobox options. data.options.clear(); char audio_sample_fmt[] = "audio.sample-format"; ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), audio_sample_fmt, &data, qsynth_settings_foreach_option); m_ui.SampleFormatComboBox->clear(); m_ui.SampleFormatComboBox->addItems(data.options); // Midi bank select combobox options data.options.clear(); char midi_bank_select[] = "synth.midi-bank-select"; ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), midi_bank_select, &data, qsynth_settings_foreach_option); m_ui.MidiBankSelectComboBox->clear(); m_ui.MidiBankSelectComboBox->addItems(data.options); // Midi settings... m_ui.MidiInCheckBox->setChecked(m_pSetup->bMidiIn); setComboBoxCurrentText(m_ui.MidiDriverComboBox, m_pSetup->sMidiDriver); updateMidiDevices(m_pSetup->sMidiDriver); setComboBoxCurrentText(m_ui.MidiDeviceComboBox, m_pSetup->sMidiDevice); setComboBoxCurrentText(m_ui.MidiBankSelectComboBox, m_pSetup->sMidiBankSelect); m_ui.MidiChannelsSpinBox->setValue(m_pSetup->iMidiChannels); m_ui.MidiAutoConnectCheckBox->setChecked(m_pSetup->bMidiAutoConnect); m_ui.MidiDumpCheckBox->setChecked(m_pSetup->bMidiDump); m_ui.VerboseCheckBox->setChecked(m_pSetup->bVerbose); // ALSA client identifier. m_ui.MidiNameComboBox->addItem(m_pSetup->sDisplayName); setComboBoxCurrentText(m_ui.MidiNameComboBox, bNew ? m_pSetup->sDisplayName : m_pSetup->sMidiName); // Audio settings... setComboBoxCurrentText(m_ui.AudioDriverComboBox, m_pSetup->sAudioDriver); updateAudioDevices(m_pSetup->sAudioDriver); setComboBoxCurrentText(m_ui.AudioDeviceComboBox, m_pSetup->sAudioDevice); setComboBoxCurrentText(m_ui.SampleFormatComboBox, m_pSetup->sSampleFormat); setComboBoxCurrentText(m_ui.SampleRateComboBox, QString::number(m_pSetup->fSampleRate)); setComboBoxCurrentText(m_ui.AudioBufSizeComboBox, QString::number(m_pSetup->iAudioBufSize)); setComboBoxCurrentText(m_ui.AudioBufCountComboBox, QString::number(m_pSetup->iAudioBufCount)); m_ui.AudioChannelsSpinBox->setValue(m_pSetup->iAudioChannels); m_ui.AudioGroupsSpinBox->setValue(m_pSetup->iAudioGroups); m_ui.PolyphonySpinBox->setValue(m_pSetup->iPolyphony); m_ui.JackMultiCheckBox->setChecked(m_pSetup->bJackMulti); m_ui.JackAutoConnectCheckBox->setChecked(m_pSetup->bJackAutoConnect); #if defined(Q_OS_WINDOWS) m_ui.WasapiExclusiveCheckBox->setChecked(m_pSetup->bWasapiExclusive); #else m_ui.WasapiExclusiveCheckBox->hide(); #endif // JACK client name... QString sJackName; if (!m_pSetup->sDisplayName.contains(QSYNTH_TITLE)) sJackName += QSYNTH_TITLE "_"; sJackName += m_pSetup->sDisplayName; m_ui.JackNameComboBox->addItem(sJackName); setComboBoxCurrentText(m_ui.JackNameComboBox, bNew ? sJackName : m_pSetup->sJackName); // Load the soundfonts view. m_ui.SoundFontListView->clear(); m_ui.SoundFontListView->setUpdatesEnabled(false); QTreeWidgetItem *pItem = nullptr; if (pEngine->pSynth) { // Load soundfont view from actual synth stack... int cSoundFonts = ::fluid_synth_sfcount(pEngine->pSynth); for (int i = cSoundFonts - 1; i >= 0; --i) { fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(pEngine->pSynth, i); if (pSoundFont) { pItem = new QTreeWidgetItem(m_ui.SoundFontListView, pItem); if (pItem) { #ifdef CONFIG_FLUID_SFONT_GET_ID const int iSFID = ::fluid_sfont_get_id(pSoundFont); #else const int iSFID = pSoundFont->id; #endif #ifdef CONFIG_FLUID_SFONT_GET_NAME const QString sSFName = ::fluid_sfont_get_name(pSoundFont); #else const QString sSFName = pSoundFont->get_name(pSoundFont); #endif pItem->setIcon(0, *m_pXpmSoundFont); pItem->setText(0, QString::number(iSFID)); pItem->setText(1, sSFName); #ifdef CONFIG_FLUID_BANK_OFFSET pItem->setText(2, QString::number( ::fluid_synth_get_bank_offset(pEngine->pSynth, iSFID))); pItem->setFlags(pItem->flags() | Qt::ItemIsEditable); #endif } } } } else { // Load soundfont view from configuration setup list... int i = 0; QStringListIterator iter(m_pSetup->soundfonts); while (iter.hasNext()) { pItem = new QTreeWidgetItem(m_ui.SoundFontListView, pItem); if (pItem) { pItem->setIcon(0, *m_pXpmSoundFont); pItem->setText(0, QString::number(i)); pItem->setText(1, iter.next()); #ifdef CONFIG_FLUID_BANK_OFFSET pItem->setText(2, m_pSetup->bankoffsets[i]); pItem->setFlags(pItem->flags() | Qt::ItemIsEditable); #endif } ++i; } } m_ui.SoundFontListView->setUpdatesEnabled(true); m_ui.SoundFontListView->update(); // Done. m_iDirtySetup--; stabilizeForm(); } // Settings accessors. QTreeWidget *qsynthSetupForm::settingsListView (void) const { return m_ui.SettingsListView; } qsynthSetup *qsynthSetupForm::engineSetup (void) const { return m_pSetup; } void qsynthSetupForm::setSettingsItem ( const QString& sKey, const QString& sVal ) { m_settings.insert(sKey, sVal); } QString qsynthSetupForm::settingsItem ( const QString& sKey ) const { return m_settings.value(sKey); } bool qsynthSetupForm::isSettingsItem ( const QString& sKey ) const { return m_settings.contains(sKey); } void qsynthSetupForm::setSettingsItemEditor ( qsynthSettingsItemEditor *pItemEditor ) { m_pSettingsItemEditor = pItemEditor; } qsynthSettingsItemEditor *qsynthSetupForm::settingsItemEditor (void) const { return m_pSettingsItemEditor; } // Accept settings (OK button slot). void qsynthSetupForm::accept (void) { if (m_iDirtyCount > 0) { // Save the soundfont view. m_pSetup->soundfonts.clear(); m_pSetup->bankoffsets.clear(); const int iItemCount = m_ui.SoundFontListView->topLevelItemCount(); for (int i = 0; i < iItemCount; ++i) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->topLevelItem(i); m_pSetup->soundfonts.append(pItem->text(1)); m_pSetup->bankoffsets.append(pItem->text(2)); } // Will we have a setup renaming? m_pSetup->sDisplayName = m_ui.DisplayNameLineEdit->text(); // Midi settings... m_pSetup->bMidiIn = m_ui.MidiInCheckBox->isChecked(); m_pSetup->sMidiDriver = m_ui.MidiDriverComboBox->currentText(); m_pSetup->sMidiDevice = m_ui.MidiDeviceComboBox->currentText(); m_pSetup->iMidiChannels = m_ui.MidiChannelsSpinBox->value(); m_pSetup->sMidiBankSelect = m_ui.MidiBankSelectComboBox->currentText(); m_pSetup->bMidiDump = m_ui.MidiDumpCheckBox->isChecked(); m_pSetup->bVerbose = m_ui.VerboseCheckBox->isChecked(); m_pSetup->sMidiName = m_ui.MidiNameComboBox->currentText(); m_pSetup->bMidiAutoConnect = m_ui.MidiAutoConnectCheckBox->isChecked(); // Audio settings... m_pSetup->sAudioDriver = m_ui.AudioDriverComboBox->currentText(); m_pSetup->sAudioDevice = m_ui.AudioDeviceComboBox->currentText(); m_pSetup->sSampleFormat = m_ui.SampleFormatComboBox->currentText(); m_pSetup->fSampleRate = m_ui.SampleRateComboBox->currentText().toDouble(); m_pSetup->iAudioBufSize = m_ui.AudioBufSizeComboBox->currentText().toInt(); m_pSetup->iAudioBufCount = m_ui.AudioBufCountComboBox->currentText().toInt(); m_pSetup->iAudioChannels = m_ui.AudioChannelsSpinBox->value(); m_pSetup->iAudioGroups = m_ui.AudioGroupsSpinBox->value(); m_pSetup->iPolyphony = m_ui.PolyphonySpinBox->value(); m_pSetup->bJackMulti = m_ui.JackMultiCheckBox->isChecked(); m_pSetup->sJackName = m_ui.JackNameComboBox->currentText(); m_pSetup->bJackAutoConnect = m_ui.JackAutoConnectCheckBox->isChecked(); #if defined(Q_OS_WINDOWS) m_pSetup->bWasapiExclusive = m_ui.WasapiExclusiveCheckBox->isChecked(); #endif // Copy custom settings map... m_pSetup->settings = m_settings; // Reset dirty flag. m_iDirtyCount = 0; } // Just go with dialog acceptance. QDialog::accept(); } // Reject settings (Cancel button slot). void qsynthSetupForm::reject (void) { bool bReject = true; // Check if there's any pending changes... if (m_iDirtyCount > 0) { switch (QMessageBox::warning(this, tr("Warning"), tr("Some settings have been changed.") + "\n\n" + tr("Do you want to apply the changes?"), QMessageBox::Apply | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Apply: accept(); return; case QMessageBox::Discard: break; default: // Cancel. bReject = false; } } if (bReject) QDialog::reject(); } // Dirty up engine display name. void qsynthSetupForm::nameChanged ( const QString& ) { if (m_iDirtySetup > 0) return; int iItem; const QString& sDisplayName = m_ui.DisplayNameLineEdit->text(); iItem = m_ui.MidiNameComboBox->findText(sDisplayName); if (iItem >= 0) { m_ui.MidiNameComboBox->removeItem(iItem); m_ui.MidiNameComboBox->insertItem(0, sDisplayName); } iItem = m_ui.JackNameComboBox->findText(sDisplayName); if (iItem >= 0) { m_ui.JackNameComboBox->removeItem(iItem); m_ui.JackNameComboBox->insertItem(0, sDisplayName); } settingsChanged(); } // Fill MIDI device options. void qsynthSetupForm::updateMidiDevices ( const QString& sMidiDriver ) { qsynth_settings_data data; data.pSetup = m_pSetup; data.pListView = nullptr; data.pListItem = nullptr; // MIDI Device combobox options; QString sOldText = m_ui.MidiDeviceComboBox->currentText(); m_ui.MidiDeviceComboBox->clear(); QString sName = "midi." + sMidiDriver + ".device"; data.options.clear(); ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), sName.toLocal8Bit().data(), &data, qsynth_settings_foreach_option); m_ui.MidiDeviceComboBox->addItems(data.options); } void qsynthSetupForm::midiDriverChanged ( int ) { if (m_iDirtySetup > 0) return; QString sMidiDriver = m_ui.MidiDriverComboBox->currentText(); QString sMidiDevice = m_ui.MidiDeviceComboBox->currentText(); updateMidiDevices(sMidiDriver); setComboBoxCurrentText(m_ui.MidiDeviceComboBox, sMidiDevice); settingsChanged(); } // Fill audio device options. void qsynthSetupForm::updateAudioDevices ( const QString& sAudioDriver ) { qsynth_settings_data data; data.pSetup = m_pSetup; data.pListView = nullptr; data.pListItem = nullptr; // Audio Device combobox options; QString sOldText = m_ui.AudioDeviceComboBox->currentText(); m_ui.AudioDeviceComboBox->clear(); QString sName = "audio." + sAudioDriver + ".device"; data.options.clear(); ::fluid_settings_foreach_option(m_pSetup->fluid_settings(), sName.toLocal8Bit().data(), &data, qsynth_settings_foreach_option); m_ui.AudioDeviceComboBox->addItems(data.options); } void qsynthSetupForm::audioDriverChanged ( int ) { if (m_iDirtySetup > 0) return; const QString& sAudioDriver = m_ui.AudioDriverComboBox->currentText(); const QString& sAudioDevice = m_ui.AudioDeviceComboBox->currentText(); updateAudioDevices(sAudioDriver); setComboBoxCurrentText(m_ui.AudioDeviceComboBox, sAudioDevice); settingsChanged(); } // Dirty up settings. void qsynthSetupForm::settingsChanged (void) { if (m_iDirtySetup > 0) return; m_iDirtyCount++; stabilizeForm(); } // Stabilize current form state. void qsynthSetupForm::stabilizeForm (void) { bool bEnabled = m_ui.MidiInCheckBox->isChecked(); const bool bAlsaEnabled = (m_ui.MidiDriverComboBox->currentText() == "alsa_seq"); const bool bCoreMidiEnabled = (m_ui.MidiDriverComboBox->currentText() == "coremidi"); m_ui.MidiDriverTextLabel->setEnabled(bEnabled); m_ui.MidiDriverComboBox->setEnabled(bEnabled); m_ui.MidiDeviceTextLabel->setEnabled(bEnabled && !bAlsaEnabled); m_ui.MidiDeviceComboBox->setEnabled(bEnabled && !bAlsaEnabled); m_ui.MidiChannelsTextLabel->setEnabled(bEnabled); m_ui.MidiChannelsSpinBox->setEnabled(bEnabled); m_ui.MidiDumpCheckBox->setEnabled(bEnabled); m_ui.VerboseCheckBox->setEnabled(bEnabled); m_ui.MidiBankSelectTextLabel->setEnabled(bEnabled); m_ui.MidiBankSelectComboBox->setEnabled(bEnabled); m_ui.MidiNameTextLabel->setEnabled(bEnabled && (bAlsaEnabled | bCoreMidiEnabled)); m_ui.MidiNameComboBox->setEnabled(bEnabled && (bAlsaEnabled | bCoreMidiEnabled)); #if FLUIDSYNTH_VERSION_MAJOR >= 2 m_ui.MidiAutoConnectCheckBox->setEnabled(bEnabled); #else m_ui.MidiAutoConnectCheckBox->setEnabled(false); #endif const bool bJackEnabled = (m_ui.AudioDriverComboBox->currentText() == "jack"); const bool bJackMultiEnabled = m_ui.JackMultiCheckBox->isChecked(); #if defined(Q_OS_WINDOWS) const bool bWasapiEnabled = (m_ui.AudioDriverComboBox->currentText() == "wasapi"); #endif m_ui.AudioDeviceTextLabel->setEnabled(!bJackEnabled); m_ui.AudioDeviceComboBox->setEnabled(!bJackEnabled); m_ui.JackMultiCheckBox->setEnabled(bJackEnabled); m_ui.JackAutoConnectCheckBox->setEnabled(bJackEnabled); m_ui.JackNameTextLabel->setEnabled(bJackEnabled); m_ui.JackNameComboBox->setEnabled(bJackEnabled); #if defined(Q_OS_WINDOWS) m_ui.WasapiExclusiveCheckBox->setEnabled(bWasapiEnabled); #endif if (bJackEnabled) { m_ui.AudioChannelsTextLabel->setEnabled(bJackMultiEnabled); m_ui.AudioChannelsSpinBox->setEnabled(bJackMultiEnabled); m_ui.AudioChannelsSpinBox->setSingleStep(2); m_ui.AudioChannelsSpinBox->setMinimum(2); m_ui.AudioGroupsTextLabel->setEnabled(bJackMultiEnabled); m_ui.AudioGroupsSpinBox->setEnabled(bJackMultiEnabled); // m_ui.AudioGroupsSpinBox->setSingleStep(2); // m_ui.AudioGroupsSpinBox->setMinimum(2); } m_ui.SoundFontOpenPushButton->setEnabled(true); QTreeWidgetItem *pSelectedItem = m_ui.SoundFontListView->currentItem(); if (pSelectedItem) { const int iItem = m_ui.SoundFontListView->indexOfTopLevelItem(pSelectedItem); const int iItemCount = m_ui.SoundFontListView->topLevelItemCount(); m_ui.SoundFontEditPushButton->setEnabled( pSelectedItem->flags() & Qt::ItemIsEditable); m_ui.SoundFontRemovePushButton->setEnabled(true); m_ui.SoundFontMoveUpPushButton->setEnabled(iItem > 0); m_ui.SoundFontMoveDownPushButton->setEnabled(iItem < iItemCount - 1); } else { m_ui.SoundFontRemovePushButton->setEnabled(false); m_ui.SoundFontEditPushButton->setEnabled(false); m_ui.SoundFontMoveUpPushButton->setEnabled(false); m_ui.SoundFontMoveDownPushButton->setEnabled(false); } bEnabled = (m_iDirtyCount > 0); if (bEnabled && m_pSetup) { const QString& sDisplayName = m_ui.DisplayNameLineEdit->text(); if (sDisplayName != m_pSetup->sDisplayName) { bEnabled = (!m_pOptions->engines.contains(sDisplayName)); if (bEnabled) bEnabled = (sDisplayName != (m_pOptions->defaultSetup())->sDisplayName); } } m_ui.DialogButtonBox->button(QDialogButtonBox::Ok)->setEnabled(bEnabled); } // Soundfont view context menu handler. void qsynthSetupForm::soundfontContextMenu ( const QPoint& pos ) { int iItem = 0; int iItemCount = 0; QTreeWidgetItem *pItem = m_ui.SoundFontListView->itemAt(pos); if (pItem == nullptr) pItem = m_ui.SoundFontListView->currentItem(); if (pItem) { iItem = m_ui.SoundFontListView->indexOfTopLevelItem(pItem); iItemCount = m_ui.SoundFontListView->topLevelItemCount(); } // Build the soundfont context menu... QMenu menu(this); QAction *pAction; pAction = menu.addAction( QIcon(":/images/open1.png"), tr("Open..."), this, SLOT(openSoundFont())); menu.addSeparator(); bool bEnabled = (pItem != nullptr); pAction = menu.addAction( QIcon(":/images/edit1.png"), tr("Edit"), this, SLOT(editSoundFont())); pAction->setEnabled( (bEnabled && (pItem->flags() & Qt::ItemIsEditable))); pAction = menu.addAction( QIcon(":/images/remove1.png"), tr("Remove"), this, SLOT(removeSoundFont())); pAction->setEnabled(bEnabled); menu.addSeparator(); pAction = menu.addAction( QIcon(":/images/up1.png"), tr("Move Up"), this, SLOT(moveUpSoundFont())); pAction->setEnabled(bEnabled && iItem > 0); pAction = menu.addAction( QIcon(":/images/down1.png"), tr("Move Down"), this, SLOT(moveDownSoundFont())); pAction->setEnabled(bEnabled && iItem < iItemCount - 1); menu.exec((m_ui.SoundFontListView->viewport())->mapToGlobal(pos)); } // Refresh the soundfont view ids. void qsynthSetupForm::refreshSoundFonts (void) { m_ui.SoundFontListView->setUpdatesEnabled(false); const int iItemCount = m_ui.SoundFontListView->topLevelItemCount(); for (int i = 0; i < iItemCount; ++i) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->topLevelItem(i); pItem->setText(0, QString::number(i + 1)); } m_ui.SoundFontListView->setUpdatesEnabled(true); m_ui.SoundFontListView->update(); } // Browse for a soundfont file on the filesystem. void qsynthSetupForm::openSoundFont (void) { QStringList soundfonts = QFileDialog::getOpenFileNames(this, tr("Soundfont files"), m_pOptions->sSoundFontDir, tr("Soundfont files") + " (*.sf2 *.SF2 *.sf3 *.SF3 *.dls *.DLS);;" + tr("All files") + " (*.*)"); /* Note: Qt's own File Dialog file filters are case insensitive, but when using platform native dialogs this may not be true, like for instance: QGtk3FileDialogHelper; see: https://bugreports.qt.io/browse/QTBUG-51712 */ QTreeWidgetItem *pItem = nullptr; // For avery selected soundfont to load... QStringListIterator iter(soundfonts); while (iter.hasNext()) { const QString& sSoundFont = iter.next(); // Is it a soundfont file... if (::fluid_is_soundfont(sSoundFont.toLocal8Bit().data())) { // Check if not already there... if (!m_ui.SoundFontListView->findItems( sSoundFont, Qt::MatchExactly, 1).isEmpty() && QMessageBox::warning(this, tr("Warning"), tr("Soundfont file already on list") + ":\n\n" + "\"" + sSoundFont + "\"\n\n" + tr("Add anyway?"), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) { continue; } // Start inserting in the current selected or last item... if (pItem == nullptr) { pItem = m_ui.SoundFontListView->currentItem(); if (pItem) pItem->setSelected(false); } // New item on the block :-) pItem = new QTreeWidgetItem(m_ui.SoundFontListView, pItem); if (pItem) { pItem->setIcon(0, *m_pXpmSoundFont); pItem->setText(1, sSoundFont); #ifdef CONFIG_FLUID_BANK_OFFSET pItem->setText(2, "0"); pItem->setFlags(pItem->flags() | Qt::ItemIsEditable); #endif pItem->setSelected(true); m_ui.SoundFontListView->setCurrentItem(pItem); m_pOptions->sSoundFontDir = QFileInfo(sSoundFont).dir().absolutePath(); ++m_iDirtyCount; } } else { QMessageBox::critical(this, tr("Error"), tr("Failed to add soundfont file") + ":\n\n" + "\"" + sSoundFont + "\"\n\n" + tr("Please, check for a valid soundfont file."), QMessageBox::Cancel); } } refreshSoundFonts(); stabilizeForm(); } // Edit current selected soundfont. void qsynthSetupForm::editSoundFont (void) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->currentItem(); if (pItem) m_ui.SoundFontListView->editItem(pItem, 2); stabilizeForm(); } // Remove current selected soundfont. void qsynthSetupForm::removeSoundFont (void) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->currentItem(); if (pItem) { ++m_iDirtyCount; delete pItem; } refreshSoundFonts(); stabilizeForm(); } // Move current selected soundfont one position up. void qsynthSetupForm::moveUpSoundFont (void) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->currentItem(); if (pItem) { int iItem = m_ui.SoundFontListView->indexOfTopLevelItem(pItem); if (iItem > 0) { pItem->setSelected(false); pItem = m_ui.SoundFontListView->takeTopLevelItem(iItem); m_ui.SoundFontListView->insertTopLevelItem(iItem - 1, pItem); pItem->setSelected(true); m_ui.SoundFontListView->setCurrentItem(pItem); ++m_iDirtyCount; } } refreshSoundFonts(); stabilizeForm(); } // Move current selected soundfont one position down. void qsynthSetupForm::moveDownSoundFont (void) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->currentItem(); if (pItem) { const int iItemCount = m_ui.SoundFontListView->topLevelItemCount(); int iItem = m_ui.SoundFontListView->indexOfTopLevelItem(pItem); if (iItem < iItemCount - 1) { pItem->setSelected(false); pItem = m_ui.SoundFontListView->takeTopLevelItem(iItem); m_ui.SoundFontListView->insertTopLevelItem(iItem + 1, pItem); pItem->setSelected(true); m_ui.SoundFontListView->setCurrentItem(pItem); m_iDirtyCount++; } } refreshSoundFonts(); stabilizeForm(); } // Check soundfont bank offset edit. void qsynthSetupForm::soundfontItemChanged (void) { QTreeWidgetItem *pItem = m_ui.SoundFontListView->currentItem(); if (pItem) { const int iBankOffset = pItem->text(2).toInt(); if (iBankOffset < 0 || iBankOffset > 16384) pItem->setText(2, QString::number(0)); m_iDirtyCount++; } stabilizeForm(); } // Settings list-view slots. void qsynthSetupForm::settingsItemActivated ( QTreeWidgetItem *pItem, int iColumn ) { m_ui.SettingsListView->editItem(pItem, 3); } void qsynthSetupForm::settingsItemChanged ( QTreeWidgetItem *pItem, QTreeWidgetItem * ) { qsynthSettingsItemEditor *pItemEditor = settingsItemEditor(); if (pItemEditor) { QTreeWidget *pListView = settingsListView(); QAbstractItemDelegate *pItemDelegate = pListView->itemDelegate(); if (pItemDelegate) pItemDelegate->destroyEditor(pItemEditor, pItemEditor->index()); } } void qsynthSetupForm::settingsItemChanged (void) { ++m_iDirtyCount; stabilizeForm(); } //------------------------------------------------------------------------- // qsynthSettingsItemEditor - list-view item editor widget impl. #include // Constructor. qsynthSettingsItemEditor::qsynthSettingsItemEditor ( qsynthSetupForm *pSetupForm, const QModelIndex& index, QWidget *pParent ) : QWidget(pParent), m_pSetupForm(pSetupForm), m_index(index) { QWidget *pEditor = nullptr; QTreeWidget *pListView = m_pSetupForm->settingsListView(); QTreeWidgetItem *pListItem = pListView->topLevelItem(m_index.row()); m_sCurrentKey = pListItem->text(0); m_sCurrentValue = pListItem->text(3); m_sDefaultValue = pListItem->text(4); qsynthSetup *pSetup = m_pSetupForm->engineSetup(); fluid_settings_t *pFluidSettings = pSetup->fluid_settings(); const QByteArray aKey = m_sCurrentKey.toLocal8Bit(); const char *pszKey = aKey.constData(); switch (::fluid_settings_get_type(pFluidSettings, pszKey)) { case FLUID_INT_TYPE: { m_type = SpinBox; m_u.pSpinBox = new QSpinBox(/*this*/); int iRangeMin = 0; int iRangeMax = 0; ::fluid_settings_getint_range( pFluidSettings, pszKey, &iRangeMin, &iRangeMax); m_u.pSpinBox->setMinimum(iRangeMin); m_u.pSpinBox->setMaximum(iRangeMax); m_u.pSpinBox->setAccelerated(true); m_u.pSpinBox->setStepType( QAbstractSpinBox::AdaptiveDecimalStepType); QObject::connect(m_u.pSpinBox, SIGNAL(valueChanged(int)), SLOT(committed()) ); pEditor = m_u.pSpinBox; break; } case FLUID_NUM_TYPE: { m_type = DoubleSpinBox; m_u.pDoubleSpinBox = new QDoubleSpinBox(/*this*/); double fRangeMin = 0.0; double fRangeMax = 0.0; ::fluid_settings_getnum_range( pFluidSettings, pszKey, &fRangeMin, &fRangeMax); m_u.pDoubleSpinBox->setMinimum(fRangeMin); m_u.pDoubleSpinBox->setMaximum(fRangeMax); m_u.pDoubleSpinBox->setAccelerated(true); m_u.pDoubleSpinBox->setStepType( QAbstractSpinBox::AdaptiveDecimalStepType); QObject::connect(m_u.pDoubleSpinBox, SIGNAL(valueChanged(double)), SLOT(committed()) ); pEditor = m_u.pDoubleSpinBox; break; } case FLUID_STR_TYPE: case FLUID_SET_TYPE: default: { qsynth_settings_data data; data.pSetup = pSetup; data.pListView = pListView; data.pListItem = pListItem; ::fluid_settings_foreach_option( pFluidSettings, pszKey, &data, qsynth_settings_foreach_option); if (data.options.isEmpty()) { m_type = LineEdit; m_u.pLineEdit = new QLineEdit(/*this*/); QObject::connect(m_u.pLineEdit, SIGNAL(textChanged(const QString&)), SLOT(changed()) ); QObject::connect(m_u.pLineEdit, SIGNAL(editingFinished()), SLOT(committed()) ); pEditor = m_u.pLineEdit; } else { m_type = ComboBox; m_u.pComboBox = new QComboBox(/*this*/); m_u.pComboBox->setEditable(false); m_u.pComboBox->addItems(data.options); QObject::connect(m_u.pComboBox, SIGNAL(activated(int)), SLOT(committed()) ); pEditor = m_u.pComboBox; } break; }} m_pToolButton = new QToolButton(/*this*/); m_pToolButton->setToolButtonStyle(Qt::ToolButtonIconOnly); // m_pToolButton->setIconSize(QSize(18, 18)); m_pToolButton->setIcon(QPixmap(":/images/itemReset.png")); QHBoxLayout *pLayout = new QHBoxLayout(); pLayout->setSpacing(0); pLayout->setContentsMargins(0, 0, 0, 0); pLayout->addWidget(pEditor); pLayout->addWidget(m_pToolButton); QWidget::setLayout(pLayout); QWidget::setFocusPolicy(Qt::StrongFocus); QWidget::setFocusProxy(pEditor); QObject::connect(m_pToolButton, SIGNAL(clicked()), SLOT(reset())); } // Destructor. qsynthSettingsItemEditor::~qsynthSettingsItemEditor (void) { m_pSetupForm->setSettingsItemEditor(nullptr); } // Target index accessor. const QModelIndex& qsynthSettingsItemEditor::index (void) const { return m_index; } // Value accessors. void qsynthSettingsItemEditor::setValue ( const QString& sValue ) { switch (m_type) { case SpinBox: m_u.pSpinBox->setValue(sValue.toInt()); break; case DoubleSpinBox: m_u.pDoubleSpinBox->setValue(sValue.toDouble()); break; case LineEdit: m_u.pLineEdit->setText(sValue); break; case ComboBox: m_u.pComboBox->setCurrentText(sValue); break; } changed(); } QString qsynthSettingsItemEditor::value (void) const { QString sValue; switch (m_type) { case SpinBox: sValue = QString::number(m_u.pSpinBox->value()); break; case DoubleSpinBox: sValue = QString::number(m_u.pDoubleSpinBox->value()); break; case LineEdit: sValue = m_u.pLineEdit->text(); break; case ComboBox: sValue = m_u.pComboBox->currentText(); break; } return sValue; } // Current/Default value accessors. const QString& qsynthSettingsItemEditor::currentKey (void) const { return m_sCurrentKey; } const QString& qsynthSettingsItemEditor::currentValue (void) const { return m_sCurrentValue; } const QString& qsynthSettingsItemEditor::defaultValue (void) const { return m_sDefaultValue; } // Local interaction slots. void qsynthSettingsItemEditor::changed (void) { const QString& sValue = value(); m_pToolButton->setEnabled( sValue != currentValue() || sValue != defaultValue()); } void qsynthSettingsItemEditor::committed (void) { changed(); emit commitEditor(this); } void qsynthSettingsItemEditor::reset (void) { const QString& sValue = value(); if (sValue == currentValue()) setValue(defaultValue()); else setValue(currentValue()); } //------------------------------------------------------------------------- // qsynthSettingsItemDelegate - list-view item delegate impl. qsynthSettingsItemDelegate::qsynthSettingsItemDelegate ( qsynthSetupForm *pSetupForm ) : QItemDelegate(pSetupForm->settingsListView()), m_pSetupForm(pSetupForm) { } // Overridden paint method. void qsynthSettingsItemDelegate::paint ( QPainter *pPainter, const QStyleOptionViewItem& option, const QModelIndex& index ) const { QStyleOptionViewItem option2 = option; if (index.column() == 0 || index.column() == 3) { QTreeWidget *pListView = m_pSetupForm->settingsListView(); QTreeWidgetItem *pListItem = pListView->topLevelItem(index.row()); const QString& sKey = pListItem->text(0); if (m_pSetupForm->isSettingsItem(sKey)) { option2.font.setBold(true); } } QItemDelegate::paint(pPainter, option2, index); } QWidget *qsynthSettingsItemDelegate::createEditor ( QWidget *pParent, const QStyleOptionViewItem& /*option*/, const QModelIndex& index ) const { qsynthSettingsItemEditor *pItemEditor = new qsynthSettingsItemEditor(m_pSetupForm, index, pParent); QObject::connect(pItemEditor, SIGNAL(commitEditor(QWidget *)), SLOT(commitEditor(QWidget *))); m_pSetupForm->setSettingsItemEditor(pItemEditor); return pItemEditor; } void qsynthSettingsItemDelegate::setEditorData ( QWidget *pEditor, const QModelIndex& index ) const { qsynthSettingsItemEditor *pItemEditor = qobject_cast (pEditor); if (pItemEditor) pItemEditor->setValue(index.model()->data(index, Qt::DisplayRole).toString()); } void qsynthSettingsItemDelegate::setModelData ( QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& index ) const { qsynthSettingsItemEditor *pItemEditor = qobject_cast (pEditor); if (pItemEditor) pModel->setData(index, pItemEditor->value()); } QSize qsynthSettingsItemDelegate::sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const { return QItemDelegate::sizeHint(option, index) + QSize(4, 4); } void qsynthSettingsItemDelegate::commitEditor ( QWidget *pEditor ) { qsynthSettingsItemEditor *pItemEditor = qobject_cast (pEditor); if (pItemEditor) { const QString& sVal = pItemEditor->value(); if (sVal != pItemEditor->currentValue()) { m_pSetupForm->setSettingsItem(pItemEditor->currentKey(), sVal); emit commitData(pEditor); } } } // end of qsynthSetupForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthPaletteForm.cpp0000644000000000000000000000013214771226115017111 xustar0030 mtime=1743072333.113076173 30 atime=1743072333.113076173 30 ctime=1743072333.113076173 qsynth-1.0.3/src/qsynthPaletteForm.cpp0000644000175000001440000010056514771226115017110 0ustar00rncbcusers// qsynthPaletteForm.cpp // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthPaletteForm.h" #include "ui_qsynthPaletteForm.h" #include #include #include #include #include #include #include #include #include #include #include // Local static consts. static const char *ColorThemesGroup = "/ColorThemes/"; static const char *PaletteEditorGroup = "/PaletteEditor/"; static const char *DefaultDirKey = "DefaultDir"; static const char *ShowDetailsKey = "ShowDetails"; static const char *DefaultSuffix = "conf"; static struct { const char *key; QPalette::ColorRole value; } g_colorRoles[] = { { "Window", QPalette::Window }, { "WindowText", QPalette::WindowText }, { "Button", QPalette::Button }, { "ButtonText", QPalette::ButtonText }, { "Light", QPalette::Light }, { "Midlight", QPalette::Midlight }, { "Dark", QPalette::Dark }, { "Mid", QPalette::Mid }, { "Text", QPalette::Text }, { "BrightText", QPalette::BrightText }, { "Base", QPalette::Base }, { "AlternateBase", QPalette::AlternateBase }, { "Shadow", QPalette::Shadow }, { "Highlight", QPalette::Highlight }, { "HighlightedText", QPalette::HighlightedText }, { "Link", QPalette::Link }, { "LinkVisited", QPalette::LinkVisited }, { "ToolTipBase", QPalette::ToolTipBase }, { "ToolTipText", QPalette::ToolTipText }, #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) { "PlaceholderText", QPalette::PlaceholderText }, #endif { "NoRole", QPalette::NoRole }, { nullptr, QPalette::NoRole } }; //------------------------------------------------------------------------- // qsynthPaletteForm qsynthPaletteForm::qsynthPaletteForm ( QWidget *parent, const QPalette& pal ) : QDialog(parent), p_ui(new Ui::qsynthPaletteForm), m_ui(*p_ui) { m_ui.setupUi(this); m_settings = nullptr; m_owner = false; m_modelUpdated = false; m_paletteUpdated = false; m_dirtyCount = 0; m_dirtyTotal = 0; updateGenerateButton(); m_paletteModel = new PaletteModel(this); m_ui.paletteView->setModel(m_paletteModel); ColorDelegate *delegate = new ColorDelegate(this); m_ui.paletteView->setItemDelegate(delegate); m_ui.paletteView->setEditTriggers(QAbstractItemView::AllEditTriggers); // m_ui.paletteView->setAlternatingRowColors(true); m_ui.paletteView->setSelectionBehavior(QAbstractItemView::SelectRows); m_ui.paletteView->setDragEnabled(true); m_ui.paletteView->setDropIndicatorShown(true); m_ui.paletteView->setRootIsDecorated(false); m_ui.paletteView->setColumnHidden(2, true); m_ui.paletteView->setColumnHidden(3, true); QObject::connect(m_ui.nameCombo, SIGNAL(editTextChanged(const QString&)), SLOT(nameComboChanged(const QString&))); QObject::connect(m_ui.saveButton, SIGNAL(clicked()), SLOT(saveButtonClicked())); QObject::connect(m_ui.deleteButton, SIGNAL(clicked()), SLOT(deleteButtonClicked())); QObject::connect(m_ui.generateButton, SIGNAL(changed()), SLOT(generateButtonChanged())); QObject::connect(m_ui.resetButton, SIGNAL(clicked()), SLOT(resetButtonClicked())); QObject::connect(m_ui.detailsCheck, SIGNAL(clicked()), SLOT(detailsCheckClicked())); QObject::connect(m_ui.importButton, SIGNAL(clicked()), SLOT(importButtonClicked())); QObject::connect(m_ui.exportButton, SIGNAL(clicked()), SLOT(exportButtonClicked())); QObject::connect(m_paletteModel, SIGNAL(paletteChanged(const QPalette&)), SLOT(paletteChanged(const QPalette&))); QObject::connect(m_ui.dialogButtons, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.dialogButtons, SIGNAL(rejected()), SLOT(reject())); setPalette(pal, pal); QDialog::adjustSize(); } qsynthPaletteForm::~qsynthPaletteForm (void) { setSettings(nullptr); } void qsynthPaletteForm::setPalette ( const QPalette& pal ) { m_palette = pal; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const uint mask = pal.resolveMask(); #else const uint mask = pal.resolve(); #endif for (int i = 0; g_colorRoles[i].key; ++i) { if ((mask & (1 << i)) == 0) { const QPalette::ColorRole cr = g_colorRoles[i].value; m_palette.setBrush(QPalette::Active, cr, m_parentPalette.brush(QPalette::Active, cr)); m_palette.setBrush(QPalette::Inactive, cr, m_parentPalette.brush(QPalette::Inactive, cr)); m_palette.setBrush(QPalette::Disabled, cr, m_parentPalette.brush(QPalette::Disabled, cr)); } } #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) m_palette.setResolveMask(mask); #else m_palette.resolve(mask); #endif updateGenerateButton(); m_paletteUpdated = true; if (!m_modelUpdated) m_paletteModel->setPalette(m_palette, m_parentPalette); m_paletteUpdated = false; } void qsynthPaletteForm::setPalette ( const QPalette& pal, const QPalette& parentPal ) { m_parentPalette = parentPal; setPalette(pal); } const QPalette& qsynthPaletteForm::palette (void) const { return m_palette; } void qsynthPaletteForm::setSettings ( QSettings *settings, bool owner ) { if (m_settings && m_owner) delete m_settings; m_settings = settings; m_owner = owner; m_ui.detailsCheck->setChecked(isShowDetails()); updateNamedPaletteList(); updateDialogButtons(); } QSettings *qsynthPaletteForm::settings (void) const { return m_settings; } void qsynthPaletteForm::nameComboChanged ( const QString& name ) { if (m_dirtyCount > 0 && m_ui.nameCombo->findText(name) < 0) { updateDialogButtons(); } else { resetButtonClicked(); setPaletteName(name); ++m_dirtyTotal; } } void qsynthPaletteForm::saveButtonClicked (void) { const QString& name = m_ui.nameCombo->currentText(); if (name.isEmpty()) return; QString filename = namedPaletteConf(name); if (filename.isEmpty() || !QFileInfo(filename).isWritable()) { const QString& title = tr("Save Palette - %1").arg(QDialog::windowTitle()); QStringList filters; filters.append(tr("Palette files (*.%1)").arg(DefaultSuffix)); filters.append(tr("All files (*.*)")); QString dirname = defaultDir(); if (!dirname.isEmpty()) dirname.append(QDir::separator()); dirname.append(paletteName() + '.' + DefaultSuffix); filename = QFileDialog::getSaveFileName(this, title, dirname, filters.join(";;")); } if (!filename.isEmpty() && saveNamedPaletteConf(name, filename, m_palette)) { addNamedPaletteConf(name, filename); setPalette(m_palette, m_palette); updateNamedPaletteList(); resetButtonClicked(); } } void qsynthPaletteForm::deleteButtonClicked (void) { const QString& name = m_ui.nameCombo->currentText(); if (m_ui.nameCombo->findText(name) >= 0) { deleteNamedPaletteConf(name); updateNamedPaletteList(); updateDialogButtons(); } } void qsynthPaletteForm::generateButtonChanged (void) { const QColor& color = m_ui.generateButton->brush().color(); const QPalette& pal = QPalette(color); setPalette(pal); ++m_dirtyCount; updateDialogButtons(); } void qsynthPaletteForm::resetButtonClicked (void) { const bool blocked = blockSignals(true); for (int i = 0; g_colorRoles[i].key; ++i) { const QPalette::ColorRole cr = g_colorRoles[i].value; const QModelIndex& index = m_paletteModel->index(cr, 0); m_paletteModel->setData(index, false, Qt::EditRole); } m_dirtyCount = 0; updateDialogButtons(); blockSignals(blocked); } void qsynthPaletteForm::detailsCheckClicked (void) { const int cw = (m_ui.paletteView->viewport()->width() >> 2); QHeaderView *header = m_ui.paletteView->header(); header->resizeSection(0, cw); if (m_ui.detailsCheck->isChecked()) { m_ui.paletteView->setColumnHidden(2, false); m_ui.paletteView->setColumnHidden(3, false); header->resizeSection(1, cw); header->resizeSection(2, cw); header->resizeSection(3, cw); m_paletteModel->setGenerate(false); } else { m_ui.paletteView->setColumnHidden(2, true); m_ui.paletteView->setColumnHidden(3, true); header->resizeSection(1, cw * 3); m_paletteModel->setGenerate(true); } } void qsynthPaletteForm::importButtonClicked (void) { const QString& title = tr("Import File - %1").arg(QDialog::windowTitle()); QStringList filters; filters.append(tr("Palette files (*.%1)").arg(DefaultSuffix)); filters.append(tr("All files (*.*)")); const QString& filename = QFileDialog::getOpenFileName(this, title, defaultDir(), filters.join(";;")); if (filename.isEmpty()) return; QSettings conf(filename, QSettings::IniFormat); conf.beginGroup(ColorThemesGroup); const QStringList names = conf.childGroups(); conf.endGroup(); int imported = 0; QStringListIterator name_iter(names); while (name_iter.hasNext()) { const QString& name = name_iter.next(); if (!name.isEmpty()) { addNamedPaletteConf(name, filename); setPaletteName(name); ++imported; } } if (imported > 0) { updateNamedPaletteList(); resetButtonClicked(); setDefaultDir(QFileInfo(filename).absolutePath()); } else { QMessageBox::warning(this, tr("Warning - %1").arg(QDialog::windowTitle()), tr("Could not import from file:\n\n" "%1\n\nSorry.").arg(filename)); } } void qsynthPaletteForm::exportButtonClicked (void) { const QString& title = tr("Export File - %1").arg(QDialog::windowTitle()); QStringList filters; filters.append(tr("Palette files (*.%1)").arg(DefaultSuffix)); filters.append(tr("All files (*.*)")); QString dirname = defaultDir(); if (!dirname.isEmpty()) dirname.append(QDir::separator()); dirname.append(paletteName() + '.' + DefaultSuffix); const QString& filename = QFileDialog::getSaveFileName(this, title, dirname, filters.join(";;")); if (filename.isEmpty()) return; const QFileInfo fi(filename); const QString& name = fi.baseName(); if (saveNamedPaletteConf(name, filename, m_palette)) { // addNamedPaletteConf(name, filename); setDefaultDir(fi.absolutePath()); } } void qsynthPaletteForm::paletteChanged ( const QPalette& pal ) { m_modelUpdated = true; if (!m_paletteUpdated) setPalette(pal); m_modelUpdated = false; ++m_dirtyCount; updateDialogButtons(); } void qsynthPaletteForm::setPaletteName ( const QString& name ) { const bool blocked = m_ui.nameCombo->blockSignals(true); m_ui.nameCombo->setEditText(name); QPalette pal; if (namedPalette(m_settings, name, pal, true)) setPalette(pal, pal); m_dirtyCount = 0; updateDialogButtons(); m_ui.nameCombo->blockSignals(blocked); } QString qsynthPaletteForm::paletteName (void) const { return m_ui.nameCombo->currentText(); } void qsynthPaletteForm::updateNamedPaletteList (void) { const bool blocked = m_ui.nameCombo->blockSignals(true); const QString old_name = m_ui.nameCombo->currentText(); m_ui.nameCombo->clear(); m_ui.nameCombo->insertItems(0, namedPaletteList()); // m_ui.nameCombo->model()->sort(0); const int i = m_ui.nameCombo->findText(old_name); if (i >= 0) m_ui.nameCombo->setCurrentIndex(i); else m_ui.nameCombo->setEditText(old_name); m_ui.nameCombo->blockSignals(blocked); } void qsynthPaletteForm::updateGenerateButton (void) { m_ui.generateButton->setBrush( m_palette.brush(QPalette::Active, QPalette::Button)); } void qsynthPaletteForm::updateDialogButtons (void) { const QString& name = m_ui.nameCombo->currentText(); const QString& filename = namedPaletteConf(name); const int i = m_ui.nameCombo->findText(name); m_ui.saveButton->setEnabled(!name.isEmpty() && (m_dirtyCount > 0 || i < 0)); m_ui.deleteButton->setEnabled(i >= 0); m_ui.resetButton->setEnabled(m_dirtyCount > 0); m_ui.exportButton->setEnabled(!name.isEmpty() || i >= 0); m_ui.dialogButtons->button(QDialogButtonBox::Ok)->setEnabled(i >= 0); } bool qsynthPaletteForm::namedPalette ( const QString& name, QPalette& pal ) const { return namedPalette(m_settings, name, pal); } bool qsynthPaletteForm::namedPalette ( QSettings *settings, const QString& name, QPalette& pal, bool fixup ) { int result = 0; if (!name.isEmpty() && loadNamedPalette(settings, name, pal)) { ++result; } else { const QString& filename = namedPaletteConf(settings, name); if (!filename.isEmpty() && QFileInfo(filename).isReadable() && loadNamedPaletteConf(name, filename, pal)) { ++result; } } // Dark themes grayed/disabled color group fix... if (!fixup && pal.base().color().value() < 0x7f) { const QColor& color = pal.window().color(); const int groups = int(QPalette::Active | QPalette::Inactive) + 1; for (int i = 0; i < groups; ++i) { const QPalette::ColorGroup cg = QPalette::ColorGroup(i); pal.setBrush(cg, QPalette::Light, color.lighter(140)); pal.setBrush(cg, QPalette::Midlight, color.lighter(100)); pal.setBrush(cg, QPalette::Mid, color.lighter(90)); pal.setBrush(cg, QPalette::Dark, color.darker(160)); pal.setBrush(cg, QPalette::Shadow, color.darker(180)); } pal.setColorGroup(QPalette::Disabled, pal.windowText().color().darker(), pal.button(), pal.light(), pal.dark(), pal.mid(), pal.text().color().darker(), pal.text().color().lighter(), pal.base(), pal.window()); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) pal.setColor(QPalette::Disabled, QPalette::Highlight, pal.mid().color()); pal.setColor(QPalette::Disabled, QPalette::ButtonText, pal.mid().color()); #endif ++result; } return (result > 0); } QStringList qsynthPaletteForm::namedPaletteList (void) const { return namedPaletteList(m_settings); } QStringList qsynthPaletteForm::namedPaletteList ( QSettings *settings ) { QStringList list; if (settings) { settings->beginGroup(ColorThemesGroup); list.append(settings->childKeys()); list.append(settings->childGroups()); // legacy... settings->endGroup(); } return list; } QString qsynthPaletteForm::namedPaletteConf ( const QString& name ) const { return namedPaletteConf(m_settings, name); } QString qsynthPaletteForm::namedPaletteConf ( QSettings *settings, const QString& name ) { QString ret; if (settings && !name.isEmpty()) { settings->beginGroup(ColorThemesGroup); ret = settings->value(name).toString(); settings->endGroup(); } return ret; } void qsynthPaletteForm::addNamedPaletteConf ( const QString& name, const QString& filename ) { addNamedPaletteConf(m_settings, name, filename); ++m_dirtyTotal; } void qsynthPaletteForm::addNamedPaletteConf ( QSettings *settings, const QString& name, const QString& filename ) { if (settings) { settings->beginGroup(ColorThemesGroup); settings->remove(name); // remove legacy keys! settings->setValue(name, filename); settings->endGroup(); } } void qsynthPaletteForm::deleteNamedPaletteConf ( const QString& name ) { if (m_settings) { m_settings->beginGroup(ColorThemesGroup); m_settings->remove(name); m_settings->endGroup(); ++m_dirtyTotal; } } bool qsynthPaletteForm::loadNamedPaletteConf ( const QString& name, const QString& filename, QPalette& pal ) { QSettings conf(filename, QSettings::IniFormat); return loadNamedPalette(&conf, name, pal); } bool qsynthPaletteForm::saveNamedPaletteConf ( const QString& name, const QString& filename, const QPalette& pal ) { QSettings conf(filename, QSettings::IniFormat); return saveNamedPalette(&conf, name, pal); } bool qsynthPaletteForm::loadNamedPalette ( QSettings *settings, const QString& name, QPalette& pal ) { if (settings == nullptr) return false; int result = 0; settings->beginGroup(ColorThemesGroup); QStringListIterator name_iter(settings->childGroups()); while (name_iter.hasNext() && !result) { const QString& name2 = name_iter.next(); if (name2 == name) { #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) uint mask = pal.resolve(); #endif settings->beginGroup(name + '/'); QStringListIterator iter(settings->childKeys()); while (iter.hasNext()) { const QString& key = iter.next(); const QPalette::ColorRole cr = qsynthPaletteForm::colorRole(key); const QStringList& clist = settings->value(key).toStringList(); if (clist.count() == 3) { pal.setColor(QPalette::Active, cr, QColor(clist.at(0))); pal.setColor(QPalette::Inactive, cr, QColor(clist.at(1))); pal.setColor(QPalette::Disabled, cr, QColor(clist.at(2))); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) mask &= ~(1 << int(cr)); #endif ++result; } } #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) pal.resolve(mask); #endif settings->endGroup(); } } settings->endGroup(); return (result > 0); } bool qsynthPaletteForm::saveNamedPalette ( QSettings *settings, const QString& name, const QPalette& pal ) { if (settings == nullptr) return false; settings->beginGroup(ColorThemesGroup); settings->beginGroup(name + '/'); for (int i = 0; g_colorRoles[i].key; ++i) { const QString& key = QString::fromLatin1(g_colorRoles[i].key); const QPalette::ColorRole cr = g_colorRoles[i].value; QStringList clist; clist.append(pal.color(QPalette::Active, cr).name()); clist.append(pal.color(QPalette::Inactive, cr).name()); clist.append(pal.color(QPalette::Disabled, cr).name()); settings->setValue(key, clist); } settings->endGroup(); settings->endGroup(); return true; } QPalette::ColorRole qsynthPaletteForm::colorRole ( const QString& name ) { static QHash s_colorRoles; if (s_colorRoles.isEmpty()) { for (int i = 0; g_colorRoles[i].key; ++i) { const QString& key = QString::fromLatin1(g_colorRoles[i].key); const QPalette::ColorRole value = g_colorRoles[i].value; s_colorRoles.insert(key, value); } } return s_colorRoles.value(name, QPalette::NoRole); } bool qsynthPaletteForm::isDirty (void) const { return (m_dirtyTotal > 0); } void qsynthPaletteForm::accept (void) { setShowDetails(m_ui.detailsCheck->isChecked()); if (m_dirtyCount > 0) saveButtonClicked(); QDialog::accept(); } void qsynthPaletteForm::reject (void) { if (m_dirtyCount > 0) { const QString& name = paletteName(); if (name.isEmpty()) { if (QMessageBox::warning(this, tr("Warning - %1").arg(QDialog::windowTitle()), tr("Some settings have been changed.\n\n" "Do you want to discard the changes?"), QMessageBox::Discard | QMessageBox::Cancel) == QMessageBox::Cancel) return; } else { switch (QMessageBox::warning(this, tr("Warning - %1").arg(QDialog::windowTitle()), tr("Some settings have been changed:\n\n" "\"%1\".\n\nDo you want to save the changes?") .arg(name), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel)) { case QMessageBox::Save: saveButtonClicked(); // Fall thru... case QMessageBox::Discard: break; default: // Cancel... return; } } } QDialog::reject(); } void qsynthPaletteForm::setDefaultDir ( const QString& dir ) { if (m_settings) { m_settings->beginGroup(PaletteEditorGroup); m_settings->setValue(DefaultDirKey, dir); m_settings->endGroup(); } } QString qsynthPaletteForm::defaultDir (void) const { QString dir; if (m_settings) { m_settings->beginGroup(PaletteEditorGroup); dir = m_settings->value(DefaultDirKey).toString(); m_settings->endGroup(); } return dir; } void qsynthPaletteForm::setShowDetails ( bool on ) { if (m_settings) { m_settings->beginGroup(PaletteEditorGroup); m_settings->setValue(ShowDetailsKey, on); m_settings->endGroup(); } } bool qsynthPaletteForm::isShowDetails (void) const { bool on = false; if (m_settings) { m_settings->beginGroup(PaletteEditorGroup); on = m_settings->value(ShowDetailsKey).toBool(); m_settings->endGroup(); } return on; } void qsynthPaletteForm::showEvent ( QShowEvent *event ) { QDialog::showEvent(event); detailsCheckClicked(); } void qsynthPaletteForm::resizeEvent ( QResizeEvent *event ) { QDialog::resizeEvent(event); detailsCheckClicked(); } //------------------------------------------------------------------------- // qsynthPaletteForm::PaletteModel qsynthPaletteForm::PaletteModel::PaletteModel ( QObject *parent ) : QAbstractTableModel(parent) { for (m_nrows = 0; g_colorRoles[m_nrows].key; ++m_nrows) { const QPalette::ColorRole value = g_colorRoles[m_nrows].value; const QString& key = QString::fromLatin1(g_colorRoles[m_nrows].key); m_roleNames.insert(value, key); } m_generate = true; } int qsynthPaletteForm::PaletteModel::rowCount ( const QModelIndex& ) const { return m_nrows; } int qsynthPaletteForm::PaletteModel::columnCount ( const QModelIndex& ) const { return 4; } QVariant qsynthPaletteForm::PaletteModel::data ( const QModelIndex& index, int role ) const { if (!index.isValid()) return QVariant(); if (index.row() < 0 || index.row() >= m_nrows) return QVariant(); if (index.column() < 0 || index.column() >= 4) return QVariant(); if (index.column() == 0) { if (role == Qt::DisplayRole) return m_roleNames.value(QPalette::ColorRole(index.row())); if (role == Qt::EditRole) { #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) const uint mask = m_palette.resolveMask(); #else const uint mask = m_palette.resolve(); #endif return bool(mask & (1 << index.row())); } } else if (role == Qt::BackgroundRole) { return m_palette.color( columnToGroup(index.column()), QPalette::ColorRole(index.row())); } return QVariant(); } bool qsynthPaletteForm::PaletteModel::setData ( const QModelIndex& index, const QVariant& value, int role ) { if (!index.isValid()) return false; if (index.column() != 0 && role == Qt::BackgroundRole) { const QColor& color = value.value(); const QPalette::ColorRole cr = QPalette::ColorRole(index.row()); const QPalette::ColorGroup cg = columnToGroup(index.column()); m_palette.setBrush(cg, cr, color); QModelIndex index_begin = PaletteModel::index(cr, 0); QModelIndex index_end = PaletteModel::index(cr, 3); if (m_generate) { m_palette.setBrush(QPalette::Inactive, cr, color); switch (cr) { case QPalette::WindowText: case QPalette::Text: case QPalette::ButtonText: case QPalette::Base: break; case QPalette::Dark: m_palette.setBrush(QPalette::Disabled, QPalette::WindowText, color); m_palette.setBrush(QPalette::Disabled, QPalette::Dark, color); m_palette.setBrush(QPalette::Disabled, QPalette::Text, color); m_palette.setBrush(QPalette::Disabled, QPalette::ButtonText, color); index_begin = PaletteModel::index(0, 0); index_end = PaletteModel::index(m_nrows - 1, 3); break; case QPalette::Window: m_palette.setBrush(QPalette::Disabled, QPalette::Base, color); m_palette.setBrush(QPalette::Disabled, QPalette::Window, color); index_begin = PaletteModel::index(QPalette::Base, 0); break; case QPalette::Highlight: m_palette.setBrush(QPalette::Disabled, QPalette::Highlight, color.darker(120)); break; default: m_palette.setBrush(QPalette::Disabled, cr, color); break; } } emit paletteChanged(m_palette); emit dataChanged(index_begin, index_end); return true; } if (index.column() == 0 && role == Qt::EditRole) { #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) uint mask = m_palette.resolveMask(); #else uint mask = m_palette.resolve(); #endif const bool masked = value.value(); const int i = index.row(); if (masked) { mask |= (1 << i); } else { const QPalette::ColorRole cr = QPalette::ColorRole(i); m_palette.setBrush(QPalette::Active, cr, m_parentPalette.brush(QPalette::Active, cr)); m_palette.setBrush(QPalette::Inactive, cr, m_parentPalette.brush(QPalette::Inactive, cr)); m_palette.setBrush(QPalette::Disabled, cr, m_parentPalette.brush(QPalette::Disabled, cr)); mask &= ~(1 << i); } #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) m_palette.setResolveMask(mask); #else m_palette.resolve(mask); #endif emit paletteChanged(m_palette); const QModelIndex& index_end = PaletteModel::index(i, 3); emit dataChanged(index, index_end); return true; } return false; } Qt::ItemFlags qsynthPaletteForm::PaletteModel::flags ( const QModelIndex& index ) const { if (!index.isValid()) return Qt::ItemIsEnabled; else return Qt::ItemIsEditable | Qt::ItemIsEnabled; } QVariant qsynthPaletteForm::PaletteModel::headerData ( int section, Qt::Orientation orientation, int role ) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { if (section == 0) return tr("Color Role"); else if (section == groupToColumn(QPalette::Active)) return tr("Active"); else if (section == groupToColumn(QPalette::Inactive)) return tr("Inactive"); else if (section == groupToColumn(QPalette::Disabled)) return tr("Disabled"); } return QVariant(); } const QPalette& qsynthPaletteForm::PaletteModel::palette(void) const { return m_palette; } void qsynthPaletteForm::PaletteModel::setPalette ( const QPalette& palette, const QPalette& parentPalette ) { m_palette = palette; m_parentPalette = parentPalette; const QModelIndex& index_begin = index(0, 0); const QModelIndex& index_end = index(m_nrows - 1, 3); emit dataChanged(index_begin, index_end); } QPalette::ColorGroup qsynthPaletteForm::PaletteModel::columnToGroup ( int index ) const { if (index == 1) return QPalette::Active; else if (index == 2) return QPalette::Inactive; return QPalette::Disabled; } int qsynthPaletteForm::PaletteModel::groupToColumn ( QPalette::ColorGroup group ) const { if (group == QPalette::Active) return 1; else if (group == QPalette::Inactive) return 2; return 3; } //------------------------------------------------------------------------- // qsynthPaletteForm::ColorDelegate QWidget *qsynthPaletteForm::ColorDelegate::createEditor ( QWidget *parent, const QStyleOptionViewItem&, const QModelIndex& index ) const { QWidget *editor = nullptr; if (index.column() == 0) { RoleEditor *ed = new RoleEditor(parent); QObject::connect(ed, SIGNAL(changed(QWidget *)), SIGNAL(commitData(QWidget *))); // ed->setFocusPolicy(Qt::NoFocus); // ed->installEventFilter(const_cast(this)); editor = ed; } else { ColorEditor *ed = new ColorEditor(parent); QObject::connect(ed, SIGNAL(changed(QWidget *)), SIGNAL(commitData(QWidget *))); ed->setFocusPolicy(Qt::NoFocus); ed->installEventFilter(const_cast(this)); editor = ed; } return editor; } void qsynthPaletteForm::ColorDelegate::setEditorData ( QWidget *editor, const QModelIndex& index ) const { if (index.column() == 0) { const bool masked = index.model()->data(index, Qt::EditRole).value(); RoleEditor *ed = static_cast(editor); ed->setEdited(masked); const QString& colorName = index.model()->data(index, Qt::DisplayRole).value(); ed->setLabel(colorName); } else { const QColor& color = index.model()->data(index, Qt::BackgroundRole).value(); ColorEditor *ed = static_cast(editor); ed->setColor(color); } } void qsynthPaletteForm::ColorDelegate::setModelData ( QWidget *editor, QAbstractItemModel *model, const QModelIndex& index ) const { if (index.column() == 0) { RoleEditor *ed = static_cast(editor); const bool masked = ed->edited(); model->setData(index, masked, Qt::EditRole); } else { ColorEditor *ed = static_cast(editor); if (ed->changed()) { const QColor& color = ed->color(); model->setData(index, color, Qt::BackgroundRole); } } } void qsynthPaletteForm::ColorDelegate::updateEditorGeometry ( QWidget *editor, const QStyleOptionViewItem& option, const QModelIndex& index ) const { QItemDelegate::updateEditorGeometry(editor, option, index); editor->setGeometry(editor->geometry().adjusted(0, 0, -1, -1)); } void qsynthPaletteForm::ColorDelegate::paint ( QPainter *painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const { QStyleOptionViewItem opt = option; const bool masked = index.model()->data(index, Qt::EditRole).value(); if (index.column() == 0 && masked) opt.font.setBold(true); QItemDelegate::paint(painter, opt, index); // painter->setPen(opt.palette.midlight().color()); painter->setPen(Qt::darkGray); painter->drawLine(opt.rect.right(), opt.rect.y(), opt.rect.right(), opt.rect.bottom()); painter->drawLine(opt.rect.x(), opt.rect.bottom(), opt.rect.right(), opt.rect.bottom()); } QSize qsynthPaletteForm::ColorDelegate::sizeHint ( const QStyleOptionViewItem& option, const QModelIndex &index) const { return QItemDelegate::sizeHint(option, index) + QSize(4, 4); } //------------------------------------------------------------------------- // qsynthPaletteForm::ColorButton qsynthPaletteForm::ColorButton::ColorButton ( QWidget *parent ) : QPushButton(parent), m_brush(Qt::darkGray) { QPushButton::setMinimumWidth(48); QObject::connect(this, SIGNAL(clicked()), SLOT(chooseColor())); } const QBrush& qsynthPaletteForm::ColorButton::brush (void) const { return m_brush; } void qsynthPaletteForm::ColorButton::setBrush ( const QBrush& brush ) { m_brush = brush; update(); } void qsynthPaletteForm::ColorButton::paintEvent ( QPaintEvent *event ) { QPushButton::paintEvent(event); QStyleOptionButton opt; opt.initFrom(this); const QRect& rect = style()->subElementRect(QStyle::SE_PushButtonContents, &opt, this); QPainter paint(this); paint.setBrush(QBrush(m_brush.color())); paint.drawRect(rect.adjusted(+1, +1, -2, -2)); } void qsynthPaletteForm::ColorButton::chooseColor (void) { const QColor color = QColorDialog::getColor(m_brush.color(), this); if (color.isValid()) { m_brush.setColor(color); emit changed(); } } //------------------------------------------------------------------------- // qsynthPaletteForm::ColorEditor qsynthPaletteForm::ColorEditor::ColorEditor ( QWidget *parent ) : QWidget(parent) { QLayout *layout = new QHBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); m_button = new qsynthPaletteForm::ColorButton(this); layout->addWidget(m_button); QObject::connect(m_button, SIGNAL(changed()), SLOT(colorChanged())); setFocusProxy(m_button); m_changed = false; } void qsynthPaletteForm::ColorEditor::setColor ( const QColor& color ) { m_button->setBrush(color); m_changed = false; } QColor qsynthPaletteForm::ColorEditor::color (void) const { return m_button->brush().color(); } void qsynthPaletteForm::ColorEditor::colorChanged (void) { m_changed = true; emit changed(this); } bool qsynthPaletteForm::ColorEditor::changed (void) const { return m_changed; } //------------------------------------------------------------------------- // qsynthPaletteForm::RoleEditor qsynthPaletteForm::RoleEditor::RoleEditor ( QWidget *parent ) : QWidget(parent) { m_edited = false; QHBoxLayout *layout = new QHBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); m_label = new QLabel(this); layout->addWidget(m_label); m_label->setAutoFillBackground(true); m_label->setIndent(3); // HACK: it should have the same value of textMargin in QItemDelegate setFocusProxy(m_label); m_button = new QToolButton(this); m_button->setToolButtonStyle(Qt::ToolButtonIconOnly); m_button->setIcon(QPixmap(":/images/itemReset.png")); m_button->setIconSize(QSize(8, 8)); m_button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding)); layout->addWidget(m_button); QObject::connect(m_button, SIGNAL(clicked()), SLOT(resetProperty())); } void qsynthPaletteForm::RoleEditor::setLabel ( const QString& label ) { m_label->setText(label); } void qsynthPaletteForm::RoleEditor::setEdited ( bool on ) { QFont font; if (on) font.setBold(on); m_label->setFont(font); m_button->setEnabled(on); m_edited = on; } bool qsynthPaletteForm::RoleEditor::edited (void) const { return m_edited; } void qsynthPaletteForm::RoleEditor::resetProperty (void) { setEdited(false); emit changed(this); } // end of qsynthPaletteForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthAboutForm.cpp0000644000000000000000000000013214771226115016565 xustar0030 mtime=1743072333.105076214 30 atime=1743072333.104076219 30 ctime=1743072333.105076214 qsynth-1.0.3/src/qsynthAboutForm.cpp0000644000175000001440000000657714771226115016574 0ustar00rncbcusers// qsynthAboutForm.cpp // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthAboutForm.h" #include #ifdef CONFIG_FLUID_VERSION_STR #include #endif //---------------------------------------------------------------------------- // qsynthAboutForm -- UI wrapper form. // Constructor. qsynthAboutForm::qsynthAboutForm ( QWidget *pParent ) : QDialog(pParent) { // Setup UI struct... m_ui.setupUi(this); #if QT_VERSION < QT_VERSION_CHECK(6, 1, 0) QDialog::setWindowIcon(QIcon(":/images/qsynth.png")); #endif QStringList list; #ifdef CONFIG_DEBUG list << tr("Debugging option enabled."); #endif #ifndef CONFIG_SYSTEM_TRAY list << tr("System tray disabled."); #endif #ifndef CONFIG_FLUID_SERVER list << tr("Server option disabled."); #endif #ifndef CONFIG_FLUID_SYSTEM_RESET list << tr("System reset option disabled."); #endif #ifndef CONFIG_FLUID_BANK_OFFSET list << tr("Bank offset option disabled."); #endif // Stuff the about box... QString sText = "


\n"; sText += "" QSYNTH_TITLE " - " + tr(QSYNTH_SUBTITLE) + "
\n"; sText += "
\n"; sText += tr("Version") + ": " PROJECT_VERSION "
\n"; // sText += "" + tr("Build") + ": " CONFIG_BUILD_DATE "
\n"; if (!list.isEmpty()) { sText += ""; sText += list.join("
\n"); sText += "
"; } sText += "
\n"; sText += tr("Using: Qt %1").arg(qVersion()); #if defined(QT_STATIC) sText += "-static"; #endif #ifdef CONFIG_FLUID_VERSION_STR sText += ", "; sText += tr("FluidSynth %1").arg(::fluid_version_str()); #endif sText += "
\n"; sText += "
\n"; sText += tr("Website") + ": " QSYNTH_WEBSITE "
\n"; sText += "
\n"; sText += ""; sText += QSYNTH_COPYRIGHT "
\n"; sText += "
\n"; sText += tr("This program is free software; you can redistribute it and/or modify it") + "
\n"; sText += tr("under the terms of the GNU General Public License version 2 or later."); sText += "
"; sText += "

\n"; m_ui.AboutTextView->setText(sText); // UI connections... QObject::connect(m_ui.AboutQtButton, SIGNAL(clicked()), SLOT(aboutQt())); QObject::connect(m_ui.ClosePushButton, SIGNAL(clicked()), SLOT(close())); } // Destructor. qsynthAboutForm::~qsynthAboutForm (void) { } // About Qt request. void qsynthAboutForm::aboutQt() { QMessageBox::aboutQt(this); } // end of qsynthAboutForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthSetup.h0000644000000000000000000000013214771226115015434 xustar0030 mtime=1743072333.115076163 30 atime=1743072333.114076168 30 ctime=1743072333.115076163 qsynth-1.0.3/src/qsynthSetup.h0000644000175000001440000000552514771226115015433 0ustar00rncbcusers// qsynthSetup.h // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthSetup_h #define __qsynthSetup_h #include #include #include #include //------------------------------------------------------------------------- // qsynthSetup - Prototype settings class. // class qsynthSetup { public: // Constructor. qsynthSetup(); // Default destructor. ~qsynthSetup(); // Settings cache realization. void realize(); // Fluidsynth settings accessor. fluid_settings_t *fluid_settings() const; // Setup display name. QString sDisplayName; // Settings variables. bool bMidiIn; QString sMidiDriver; QString sMidiDevice; QString sMidiBankSelect; int iMidiChannels; QString sMidiName; bool bMidiAutoConnect; QString sAudioDriver; QString sAudioDevice; QString sJackName; bool bJackAutoConnect; bool bJackMulti; int iAudioChannels; int iAudioGroups; int iAudioBufSize; int iAudioBufCount; QString sSampleFormat; float fSampleRate; bool bWasapiExclusive; int iPolyphony; bool bReverbActive; double fReverbRoom; double fReverbDamp; double fReverbWidth; double fReverbLevel; bool bChorusActive; int iChorusNr; double fChorusLevel; double fChorusSpeed; double fChorusDepth; int iChorusType; bool bLadspaActive; float fGain; bool bServer; bool bMidiDump; bool bVerbose; // Optional options. QStringList options; // Optional file lists. QStringList soundfonts; QStringList bankoffsets; QStringList midifiles; // Current (translated) preset name. QString sDefPresetName; // Current (default) preset name. QString sDefPreset; // Available presets list. QStringList presets; // Custom settings map. using Settings = QHash; Settings settings; private: // Fluidsynth settings member variable. fluid_settings_t *m_pFluidSettings; }; #endif // __qsynthSetup_h // end of qsynthSetup.h qsynth-1.0.3/src/PaxHeaders/qsynthChannels.h0000644000000000000000000000013214771226115016067 xustar0030 mtime=1743072333.105076214 30 atime=1743072333.105076214 30 ctime=1743072333.105076214 qsynth-1.0.3/src/qsynthChannels.h0000644000175000001440000000335214771226115016062 0ustar00rncbcusers// qsynthChannels.h // /**************************************************************************** Copyright (C) 2003-2006, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthChannels_h #define __qsynthChannels_h #include // Column index helpers. #define QSYNTH_CHANNELS_IN 0 #define QSYNTH_CHANNELS_CHAN 1 #define QSYNTH_CHANNELS_BANK 2 #define QSYNTH_CHANNELS_PROG 3 #define QSYNTH_CHANNELS_NAME 4 #define QSYNTH_CHANNELS_SFID 5 #define QSYNTH_CHANNELS_SFNAME 6 // The channels list view item. class qsynthChannelsItem : public QTreeWidgetItem { public: // Constructor. qsynthChannelsItem(QTreeWidget *pParent); // Default destructor. ~qsynthChannelsItem(); // Special column sorting virtual comparator. // Sort/compare overriden method. bool operator< (const QTreeWidgetItem& other) const; }; typedef qsynthChannelsItem * qsynthChannelsItemPtr; #endif // __qsynthChannels_h // end of qsynthChannels.h qsynth-1.0.3/src/PaxHeaders/qsynthEngine.h0000644000000000000000000000013214771226115015541 xustar0030 mtime=1743072333.109076194 30 atime=1743072333.109076194 30 ctime=1743072333.109076194 qsynth-1.0.3/src/qsynthEngine.h0000644000175000001440000000411514771226115015532 0ustar00rncbcusers// qsynthEngine.h // /**************************************************************************** Copyright (C) 2003-2019, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthEngine_h #define __qsynthEngine_h #include "qsynthOptions.h" //------------------------------------------------------------------------- // qsynthEngine - Meta-fluidsynth engine structure class. // class qsynthEngine { public: // Constructor. qsynthEngine(qsynthOptions *pOptions, const QString& sName = QString()); // Default destructor. ~qsynthEngine(); // Engine predicate. bool isDefault() const; // Engine setup accessor. qsynthSetup *setup(); // Engine name accessors. const QString& name() const; void setName(const QString& sName); // Engine member public variables. fluid_synth_t *pSynth; fluid_audio_driver_t *pAudioDriver; fluid_midi_router_t *pMidiRouter; fluid_midi_driver_t *pMidiDriver; fluid_player_t *pPlayer; fluid_server_t *pServer; // Dirty MIDI event trackers. int iMidiEvent; int iMidiState; // Current peak level meters (pseudo-stereo). bool bMeterEnabled; float fMeterValue[2]; private: // Engine member variables. bool m_bDefault; qsynthSetup *m_pSetup; QString m_sName; }; #endif // __qsynthEngine_h // end of qsynthEngine.h qsynth-1.0.3/src/PaxHeaders/qsynthChannels.cpp0000644000000000000000000000013214771226115016422 xustar0030 mtime=1743072333.105076214 30 atime=1743072333.105076214 30 ctime=1743072333.105076214 qsynth-1.0.3/src/qsynthChannels.cpp0000644000175000001440000000354514771226115016421 0ustar00rncbcusers// qsynthChannels.cpp // /**************************************************************************** Copyright (C) 2003-2006, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthChannels.h" //------------------------------------------------------------------------- // qsynthChannelsItem - Channel view item class. // // Constructor. qsynthChannelsItem::qsynthChannelsItem ( QTreeWidget *pParent ) : QTreeWidgetItem(pParent) { } // Default Destructor. qsynthChannelsItem::~qsynthChannelsItem (void) { } // Special column sorting virtual comparator. // Sort/compare overriden method. bool qsynthChannelsItem::operator< (const QTreeWidgetItem& other) const { int iColumn = QTreeWidgetItem::treeWidget()->sortColumn(); const QString& s1 = text(iColumn); const QString& s2 = other.text(iColumn); if (iColumn == QSYNTH_CHANNELS_CHAN || iColumn == QSYNTH_CHANNELS_BANK || iColumn == QSYNTH_CHANNELS_PROG || iColumn == QSYNTH_CHANNELS_SFID) { return (s1.toInt() < s2.toInt()); } else { return (s1 < s2); } } // end of qsynthChannels.cpp qsynth-1.0.3/src/PaxHeaders/man10000644000000000000000000000013214771226115013473 xustar0030 mtime=1743072333.103650084 30 atime=1743072333.103076225 30 ctime=1743072333.103650084 qsynth-1.0.3/src/man1/0000755000175000001440000000000014771226115013540 5ustar00rncbcusersqsynth-1.0.3/src/man1/PaxHeaders/qsynth.10000644000000000000000000000013214771226115015160 xustar0030 mtime=1743072333.103076225 30 atime=1743072333.103076225 30 ctime=1743072333.103076225 qsynth-1.0.3/src/man1/qsynth.10000644000175000001440000000517014771226115015153 0ustar00rncbcusers.TH QSYNTH 1 "June 17, 2014" .SH NAME Qsynth \- A fluidsynth Qt GUI Interface .SH SYNOPSIS .B qsynth [\fIoptions\fR] [\fIsoundfonts\fR] [\fImidifiles\fR] .SH DESCRIPTION This manual page documents briefly the .B qsynth command. .PP \fBQsynth\fP is a fluidsynth GUI front-end application written in C++ around the Qt framework using Qt Designer. Eventually it may evolve into a softsynth management application allowing the user to control and manage a variety of command line softsynths but for the moment it wraps the excellent FluidSynth. .PP \fBFluidSynth\fP is a command line software synthesiser based on the Soundfont specification. .SH OPTIONS .HP \fB\-n\fR, \fB\-\-no\-midi\-in\fR .IP Don't create a midi driver to read MIDI input events [default = yes] .HP \fB\-m\fR, \fB\-\-midi\-driver\fR=[\fIlabel\fR] .IP The name of the midi driver to use [oss, alsa, alsa_seq, ...] .HP \fB\-K\fR, \fB\-\-midi\-channels\fR=[\fInum\fR] .IP The number of midi channels [default = 16] .HP \fB\-a\fR, \fB\-\-audio\-driver\fR=[\fIlabel\fR] .IP The audio driver [alsa,jack,oss,dsound,...] .HP \fB\-j\fR, \fB\-\-connect\-jack\-outputs\fR .IP Attempt to connect the jack outputs to the physical ports .HP \fB\-L\fR, \fB\-\-audio\-channels\fR=[\fInum\fR] .IP The number of stereo audio channels [default = 1] .HP \fB\-G\fR, \fB\-\-audio\-groups\fR=[\fInum\fR] .IP The number of audio groups [default = 1] .HP \fB\-z\fR, \fB\-\-audio\-bufsize\fR=[\fIsize\fR] .IP Size of each audio buffer .HP \fB\-c\fR, \fB\-\-audio\-bufcount\fR=[\fIcount\fR] .IP Number of audio buffers .HP \fB\-r\fR, \fB\-\-sample\-rate\fR=[\fIrate\fR] .IP Set the sample rate .HP \fB\-R\fR, \fB\-\-reverb\fR[=\fIflag\fR] .IP Turn the reverb on or off [1|0|yes|no|on|off, default = on] .HP \fB\-C\fR, \fB\-\-chorus\fR[=\fIflag\fR] .IP Turn the chorus on or off [1|0|yes|no|on|off, default = on] .HP \fB\-g\fR, \fB\-\-gain\fR=[\fIgain\fR] .IP Set the master gain [0 < gain < 2, default = 1] .HP \fB\-o\fR, \fB\-\-option\fR [\fIname\fR=\fIvalue\fR] .IP Define a setting name=value .HP \fB\-s\fR, \fB\-\-server\fR .IP Create and start server [default = no] .HP \fB\-i\fR, \fB\-\-no\-shell\fR .IP Don't read commands from the shell [ignored] .HP \fB\-d\fR, \fB\-\-dump\fR .IP Dump midi router events .HP \fB\-V\fR, \fB\-\-verbose\fR .IP Print out verbose messages about midi events .HP \fB\-h\fR, \fB\-\-help\fR .IP Show help about command line options .HP \fB\-v\fR, \fB\-\-version\fR .IP Show version information .SH FILES Configuration settings are stored in ~/.config/rncbc.org/Qsynth.conf .SH SEE ALSO .BR fluidsynth (1) .SH AUTHOR Qsynth is written by Rui Nuno Capela, Richard Bown, Chris Cannam, Pedro Lopez-Cabanillas. qsynth-1.0.3/src/man1/PaxHeaders/qsynth.fr.10000644000000000000000000000013214771226115015566 xustar0030 mtime=1743072333.103650084 30 atime=1743072333.103076225 30 ctime=1743072333.103650084 qsynth-1.0.3/src/man1/qsynth.fr.10000644000175000001440000000623014771226115015557 0ustar00rncbcusers.TH QSYNTH 1 "June 17, 2014" .SH NOM Qsynth \- une interface graphique en Qt pour fluidsynth .SH SYNOPSIS .B qsynth [\fIoptions\fR] [\fIbanque-de-son\fR] [\fIfichiers-midi\fR] .SH DESCRIPTION Cette page de manuel documente rapidement la commande .B qsynth . .PP \fBQsynth\fP est une interface graphique pour fluidsynth écrite en C++ autour des outils Qt, en utilisant Qt Designer. Il finira peut être par évoluer en une application de gestion de synthétiseur logiciel permettant à l'utilisateur de contrôler et de gérer une variété de synthétiseurs logiciels en ligne de commande mais, pour le moment, il emballe l'excellent FluidSynth. .PP \fBFluidSynth\fP est un synthétiseur logiciel en ligne de commande basé sur les spécifications Soundfont. .SH OPTIONS .HP \fB\-n\fR, \fB\-\-no\-midi\-in\fR .IP Ne pas créer de pilote MIDI pour lire les évènements d'entrée MIDI [par défaut = yes] .HP \fB\-m\fR, \fB\-\-midi\-driver\fR=[\fIétiquette\fR] .IP Le nom du pilote midi à utiliser [oss, alsa, alsa_seq, ...] .HP \fB\-K\fR, \fB\-\-midi\-channels\fR=[\fInombre\fR] .IP Le nombre de canaux MIDI [par défaut = 16] .HP \fB\-a\fR, \fB\-\-audio\-driver\fR=[\fIétiquette\fR] .IP Le pilote audio [alsa,jack,oss,dsound,...] .HP \fB\-j\fR, \fB\-\-connect\-jack\-outputs\fR .IP Tente de connecter les sorties JACK aux ports physiques .HP \fB\-L\fR, \fB\-\-audio\-channels\fR=[\fInombre\fR] .IP Le nombre de canaux audio stéréo [par défaut = 1] .HP \fB\-G\fR, \fB\-\-audio\-groups\fR=[\fInombre\fR] .IP Le nombre de groupes audio [par défaut = 1] .HP \fB\-z\fR, \fB\-\-audio\-bufsize\fR=[\fItaille\fR] .IP Taille de chaque tampon audio .HP \fB\-c\fR, \fB\-\-audio\-bufcount\fR=[\fInombre\fR] .IP Nombre de tampons audio .HP \fB\-r\fR, \fB\-\-sample\-rate\fR=[\fItaux\fR] .IP Paramètre le taux d'échantillonnage .HP \fB\-R\fR, \fB\-\-reverb\fR[=\fIdrapeau\fR] .IP Active ou désactive la réverbération [1|0|yes|no|on|off, par défaut = on] .HP \fB\-C\fR, \fB\-\-chorus\fR[=\fIétiquette\fR] .IP Active ou désactive le chorus [1|0|yes|no|on|off, par défaut = on] .HP \fB\-g\fR, \fB\-\-gain\fR=[\fIgain\fR] .IP Paramètre le gain général [0 < gain < 2, par défaut = 1] .HP \fB\-o\fR, \fB\-\-option\fR [\fInom\fR=\fIvaleur\fR] .IP Définit un paramètre nom=valeur .HP \fB\-s\fR, \fB\-\-server\fR .IP Crée et démarre un serveur [par défaut = no] .HP \fB\-i\fR, \fB\-\-no\-shell\fR .IP Ne pas lire les commandes depuis le shell [ignoré] .HP \fB\-d\fR, \fB\-\-dump\fR .IP Décharger les évènements de routage MIDI .HP \fB\-V\fR, \fB\-\-verbose\fR .IP Affiche des messages verbeux à propos des évènements MIDI .HP \fB\-h\fR, \fB\-\-help\fR .IP Affiche de l'aide à propos des options de ligne de commande .HP \fB\-v\fR, \fB\-\-version\fR .IP Affiche des informations de version .SH FICHIERS Les paramètres de configuration sont stockés dans ~/.config/rncbc.org/Qsynth.conf .SH VOIR ÉGALEMENT .BR fluidsynth (1) .SH AUTEUR Qsynth a été écrit par Rui Nuno Capela, Richard Bown, Chris Cannam, et Pedro Lopez-Cabanillas. .PP La version française de cette page de manuel a été traduite par Olivier Humbert , pour le projet LibraZiK (mais peut être utilisée par d'autres). qsynth-1.0.3/src/PaxHeaders/qsynthSystemTray.cpp0000644000000000000000000000013214771226115017013 xustar0030 mtime=1743072333.116076158 30 atime=1743072333.115076163 30 ctime=1743072333.116076158 qsynth-1.0.3/src/qsynthSystemTray.cpp0000644000175000001440000000715714771226115017015 0ustar00rncbcusers// qsynthSystemTray.cpp // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthSystemTray.h" #include #include #if QT_VERSION < QT_VERSION_CHECK(4, 5, 0) namespace Qt { const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); } #endif //---------------------------------------------------------------------------- // qsynthSystemTray -- Custom system tray widget. // Constructor. qsynthSystemTray::qsynthSystemTray ( QWidget *pParent ) : QSystemTrayIcon(pParent) { // Set things inherited... if (pParent) { #if QT_VERSION < QT_VERSION_CHECK(6, 1, 0) m_icon = QIcon(":/images/qsynth.png"); #else m_icon = pParent->windowIcon().pixmap(32, 32); #endif setBackground(Qt::transparent); // also updates pixmap. QSystemTrayIcon::setIcon(m_icon); QSystemTrayIcon::setToolTip(pParent->windowTitle()); } QObject::connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(activated(QSystemTrayIcon::ActivationReason))); QSystemTrayIcon::show(); } // Redirect to hide. void qsynthSystemTray::close (void) { QSystemTrayIcon::hide(); } // Handle systeam tray activity. void qsynthSystemTray::activated ( QSystemTrayIcon::ActivationReason reason ) { switch (reason) { case QSystemTrayIcon::Trigger: emit clicked(); // Fall trhu... case QSystemTrayIcon::MiddleClick: case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::Unknown: default: break; } } // Default destructor. qsynthSystemTray::~qsynthSystemTray (void) { } // System tray icon/pixmaps update method. void qsynthSystemTray::updatePixmap (void) { // Renitialize icon as fit... m_pixmap = m_icon.pixmap(32, 32); // Merge with the overlay pixmap... if (!m_pixmapOverlay.mask().isNull()) { const int y = m_pixmap.height() - m_pixmapOverlay.height(); QBitmap mask = m_pixmap.mask(); QPainter(&mask).drawPixmap(0, y, m_pixmapOverlay.mask()); m_pixmap.setMask(mask); QPainter(&m_pixmap).drawPixmap(0, y, m_pixmapOverlay); } if (m_background != Qt::transparent) { QPixmap pixmap(m_pixmap); m_pixmap.fill(m_background); QPainter(&m_pixmap).drawPixmap(0, 0, pixmap); } // Setup system tray icon directly... QSystemTrayIcon::setIcon(QIcon(m_pixmap)); } // Background mask methods. void qsynthSystemTray::setBackground ( const QColor& background ) { // Set background color, now. m_background = background; updatePixmap(); } const QColor& qsynthSystemTray::background (void) const { return m_background; } // Set system tray icon overlay. void qsynthSystemTray::setPixmapOverlay ( const QPixmap& pmOverlay ) { m_pixmapOverlay = pmOverlay; updatePixmap(); } const QPixmap& qsynthSystemTray::pixmapOverlay (void) const { return m_pixmapOverlay; } // end of qsynthSystemTray.cpp qsynth-1.0.3/src/PaxHeaders/qsynthAboutForm.h0000644000000000000000000000013214771226115016232 xustar0030 mtime=1743072333.105076214 30 atime=1743072333.105076214 30 ctime=1743072333.105076214 qsynth-1.0.3/src/qsynthAboutForm.h0000644000175000001440000000275114771226115016227 0ustar00rncbcusers// qsynthAboutForm.h // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthAboutForm_h #define __qsynthAboutForm_h #include "ui_qsynthAboutForm.h" //---------------------------------------------------------------------------- // qsynthAboutForm -- UI wrapper form. class qsynthAboutForm : public QDialog { Q_OBJECT public: // Constructor. qsynthAboutForm(QWidget *pParent = nullptr); // Destructor. ~qsynthAboutForm(); public slots: void aboutQt(); private: // The Qt-designer UI struct... Ui::qsynthAboutForm m_ui; }; #endif // __qsynthAboutForm_h // end of qsynthAboutForm.h qsynth-1.0.3/src/PaxHeaders/qsynthKnob.cpp0000644000000000000000000000013214771226115015560 xustar0030 mtime=1743072333.109076194 30 atime=1743072333.109076194 30 ctime=1743072333.109076194 qsynth-1.0.3/src/qsynthKnob.cpp0000644000175000001440000001037714771226115015560 0ustar00rncbcusers// qsynthKnob.cpp // /**************************************************************************** Copyright (C) 2005-2020, rncbc aka Rui Nuno Capela. All rights reserved. This widget is based on a design by Thorsten Wilms, implemented by Chris Cannam in Rosegarden, adapted for QSynth by Pedro Lopez-Cabanillas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthKnob.h" #include #include #include //------------------------------------------------------------------------- // qsynthKnob - Instance knob widget class. // // Constructor. qsynthKnob::qsynthKnob ( QWidget *pParent ) : QDial(pParent), m_iDefaultValue(-1), m_dialMode(DefaultMode), m_bMousePressed(false), m_fLastDragValue(0.0f) { } // Destructor. qsynthKnob::~qsynthKnob (void) { } void qsynthKnob::setDefaultValue ( int iDefaultValue ) { m_iDefaultValue = iDefaultValue; } void qsynthKnob::setDialMode ( qsynthKnob::DialMode dialMode ) { m_dialMode = dialMode; } // Mouse angle determination. float qsynthKnob::mouseAngle ( const QPoint& pos ) { float dx = pos.x() - (width() / 2); float dy = (height() / 2) - pos.y(); return 180.0f * atan2f(dx, dy) / float(M_PI); } // Alternate mouse behavior event handlers. void qsynthKnob::mousePressEvent ( QMouseEvent *pMouseEvent ) { if (pMouseEvent->button() == Qt::MiddleButton) { // Reset to default value... if (m_iDefaultValue < minimum() || m_iDefaultValue > maximum()) m_iDefaultValue = (maximum() + minimum()) / 2; setValue(m_iDefaultValue); } else if (m_dialMode == DefaultMode) { QDial::mousePressEvent(pMouseEvent); } else if (pMouseEvent->button() == Qt::LeftButton) { m_bMousePressed = true; m_posMouse = pMouseEvent->pos(); m_fLastDragValue = float(value()); emit sliderPressed(); } } void qsynthKnob::mouseMoveEvent ( QMouseEvent *pMouseEvent ) { if (m_dialMode == DefaultMode) { QDial::mouseMoveEvent(pMouseEvent); return; } if (!m_bMousePressed) return; const QPoint& pos = pMouseEvent->pos(); int xdelta = pos.x() - m_posMouse.x(); int ydelta = pos.y() - m_posMouse.y(); float fAngleDelta = mouseAngle(pos) - mouseAngle(m_posMouse); int iNewValue = value(); switch (m_dialMode) { case LinearMode: iNewValue = int(m_fLastDragValue) + xdelta - ydelta; break; case AngularMode: default: // Forget about the drag origin to be robust on full rotations if (fAngleDelta > +180.0f) fAngleDelta -= 360.0f; else if (fAngleDelta < -180.0f) fAngleDelta += 360.0f; m_fLastDragValue += float(maximum() - minimum()) * fAngleDelta / 270.0f; if (m_fLastDragValue > float(maximum())) m_fLastDragValue = float(maximum()); else if (m_fLastDragValue < float(minimum())) m_fLastDragValue = float(minimum()); m_posMouse = pos; iNewValue = int(m_fLastDragValue + 0.5f); break; } setValue(iNewValue); update(); emit sliderMoved(value()); } void qsynthKnob::mouseReleaseEvent ( QMouseEvent *pMouseEvent ) { if (m_dialMode == DefaultMode && pMouseEvent->button() != Qt::MiddleButton) { QDial::mouseReleaseEvent(pMouseEvent); } else if (m_bMousePressed) { m_bMousePressed = false; } } void qsynthKnob::wheelEvent ( QWheelEvent *pWheelEvent ) { if (m_dialMode == DefaultMode) { QDial::wheelEvent(pWheelEvent); } else { int iValue = value(); if (pWheelEvent->angleDelta().y() > 0) iValue += pageStep(); else iValue -= pageStep(); if (iValue > maximum()) iValue = maximum(); else if (iValue < minimum()) iValue = minimum(); setValue(iValue); } } // end of qsynthKnob.cpp qsynth-1.0.3/src/PaxHeaders/images0000644000000000000000000000013014771226115014102 xustar0029 mtime=1743072333.10207623 30 atime=1743072333.096790475 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/0000755000175000001440000000000014771226115014151 5ustar00rncbcusersqsynth-1.0.3/src/images/PaxHeaders/ledon1.png0000644000000000000000000000013214771226115016051 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/ledon1.png0000644000175000001440000000125014771226115016037 0ustar00rncbcusersPNG  IHDRabKGD pHYs  tIME&k;>5IDATx͒MkQ{g26 jlJSB#tD(n+Kw A]P]ٸ&&I?&ׅTk=s}x:ȟJ2fP K[d(6j_777EZ->'XXGgVM8V҅;N޻_b[٩z9^fۨ+DQvC'֯WLw-疲 E$@s^f8[q;j|[ƶT>%5!' óCu $JZ~=4Tv( %.XFLbԇ/;HR.8HD@a'R]bWā|>}Zq@]j6f)O4.EK @ M)˙K9k 5"ZFxl6_8m; |[ R|\pMmLwh<,__\.OW@ ,a8Eݶ?[u*~^IENDB`qsynth-1.0.3/src/images/PaxHeaders/qsynth.ico0000644000000000000000000000013114771226115016202 xustar0030 mtime=1743072333.099076245 29 atime=1743072333.09807625 30 ctime=1743072333.099076245 qsynth-1.0.3/src/images/qsynth.ico0000644000175000001440000003535614771226115016207 0ustar00rncbcusers00 %6  % h6(0` mmm3lllSiiipdddbbbaaa^^^___bbbgggiiilllssskvvvNwww0 xxxppp>UUUuKKKGGGJJJKKKJJJJJJOOOXXXeeehhhkkkmmmpppssscttti6]/S&F8QMZr\_bdddhhhkkkXmmm 6LdLJuOX_fnv|}yrjb^[ZSLPPJ{Bp:c3Y.Q5SEX~QT[ZZZdddeee^fff#0DWfHzM^fq~xlb^[ZWROM~Gw?k7`4^2V=VKOWUUUdddeee_fff#$,ARsF}Nbn~ug_\_^QONJ|Brn:`NcT^p\\\^ttt$#.?=C_CuNhwaONPNK~I}G};i=^IRbLLL{{{{/8LhdGqIz]mubNNPLJ~G{s>hMeOZmHHHvhhh* K`FcBkM|[\XOF:m=`JScNNNxxx?*5IAEX~=bEsUWTL>sAiMdKMQZZZc&!$, /qIID|;dPeFFFjjj_%-8F3AWpGf5dEC>pNiWcuWWWyyyE>Jc;fF=ud5foD~GGJGE|Ft@i:`2U+K.JCRjZ\^hhhqqqm'GjAxTWUV\VOLK|Frn3[BQn[[[pppVzzz*4>AtZwnaYROM~Ew@r7_DSo\\\xxx4-8.FsXpl_\SOMFy?qAcKWo```cfM[sYYYgDeK`xsXONL~I}pI`^`b}}};LfEtDoHZs\\\S{{{$CWtg;cFgJYp[[[[___///"+9D?]B[2=P,```^^^777%=7#???(  XY[Y\dRNVfMTbX[afffpppdyyyCGLAUr:X3T.N1KCPjabcpppo :U{i=nA{BvAn8]-LAPldeevvv<,FyXYZQK|;d.NSYdooow@ccVo}l\QIx4ZDVxaaahhh 8cddWN?o:U```sss ;czfgVNBuA[eeeO4Kb+ScSM@oO\sxxxDneeNH{Ca]`eC(9P$HvoeK~AjNXjzzz4NxhN~s[AtH[hhh CcXNCdY\bQ7LrUEvCvT_q{{{FpDgghhM;XD]\\\ %%%&??qsynth-1.0.3/src/images/PaxHeaders/up1.png0000644000000000000000000000012714771226115015400 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/up1.png0000644000175000001440000000030714771226115015364 0ustar00rncbcusersPNG  IHDRasRGBIDAT8ݒ E kcؙLx"T⿐6-%g"k\ԃЈYШ'Ĕ$3S% s7 B3U 1ћ ϏlakGoIENDB`qsynth-1.0.3/src/images/PaxHeaders/restart1.png0000644000000000000000000000012714771226115016440 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/restart1.png0000644000175000001440000000144214771226115016425 0ustar00rncbcusersPNG  IHDRaIDATxmOh\U{/3 15ՆXj V-?VhFp!]Rp!E]t#*袋X- 5iڦN2qf̟޽sa[\iMκNV^i0"հ~j`t_R˻=:vFJ R9WSv ¾#)B8{i̇VNO2l Kx`ߞgj ;z/N^֥HO[i ewCUx:ޜ>= 7}`s=Ed#_۱gokɣes퍩,0ܯS)Ok9u nWZm1%22H+p:4 {b]olSˮ M[L(6A +^km zϱ K| \ϒiM.}vj̀.J3u~YYZ?^'IENDB`qsynth-1.0.3/src/images/PaxHeaders/setup1.png0000644000000000000000000000012714771226115016114 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/setup1.png0000644000175000001440000000133614771226115016103 0ustar00rncbcusersPNG  IHDRaIDATxuKHTqޙqF 15AlB4EQCL\cWh!EmkQF)ȤLQ(qq|ܹo=sIRH T̔As:.,i"7t&ğ-f6Ռ@шyqWeC t+$y0;?X۷y9&FOd<q@.qe ֓7SƗ"nbdZQ|i x*b^ BH^ Zq"qg%O2H8kQYR'4]`5 i^R hBdTa )3)flՀd v.HsuC2+^m{ qM5oUHFIPTcja5=<ÚeU@ nݝ9jw㉯-=?`s3NyN&4 L5%wgC5r|M%`Xo,_4E &DUT73 owe?a%27Yf>\bĈgyV$&^>[\$1 T2r\E\q9k&=m B0?ot7vl>#ќ >kQxajuzd ǒQb2X{<Ӑ*Od&DUSl.rYMPiX2JS ϛwzM 2|KS?m`X~]}tjTUzxoX.; IENDB`qsynth-1.0.3/src/images/PaxHeaders/panic1.png0000644000000000000000000000012714771226115016046 xustar0029 mtime=1743072333.09807625 29 atime=1743072333.09807625 29 ctime=1743072333.09807625 qsynth-1.0.3/src/images/panic1.png0000644000175000001440000000125414771226115016034 0ustar00rncbcusersPNG  IHDRasIDATxڍKHQ{?3:䨓f0%$V.$k&UAiѦZ0lkPhR sJbtJnj3GLVgq~!Jbɵ|H𺥟fЀM i=49#uʠAXK1=0OOf}N/Rȴ|1~?Fڦr4IN&ҝKXsn/_t3l (pk-??WN@8|z_^( <ѱP,bO\ ^ &6g:WG }Y נk%|I^ 8W]f80)k) 1kR ڂ28R)>a->B@EYQ9癵<ԅ2iKa^M5TK_QCԪi Ώl^)f @g ;>n%À,IEq/9O˹ H 2IDATxkJ#iht\"HP܅ qms."dhQx>UxyB{&;<<<::l6|>E-o(49Wb}rrx\)mۍy9RBh[ s09==0[Ͽ\-!0^/GQtB8;;77<~~[-!W۝e k-!BBmGS A3]il c2ZB_V0ZB0-יִ[s!!|یU_3*WӒ̴=6sx.m akoP-+h!!6ƷX !www`o% "uy} 1v_]UZ|bF Ϗ9VTZ\P`  !OkTA| !r!?IA?-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!@NobLMIENDB`qsynth-1.0.3/src/images/PaxHeaders/sfont1.png0000644000000000000000000000012714771226115016105 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/sfont1.png0000644000175000001440000000051714771226115016074 0ustar00rncbcusersPNG  IHDRaIDATxڕˑ DSŤa!" 1ix{vVU*V-^{ 8ڝj"YX*[l"XJs GDcd&iZBx'@)Rƒ9;^-%Orvd,𞠔B}`nTӟ uq,z Fb2qFpۂcDrV[ZT0_ؤhI$Z6<37Љ`"m~?i1z۫]UIENDB`qsynth-1.0.3/src/images/PaxHeaders/accept1.png0000644000000000000000000000013214771226115016207 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/accept1.png0000644000175000001440000000027314771226115016201 0ustar00rncbcusersPNG  IHDRasRGBuIDAT8 D#u]Ùt&U04J?{ ;/~BLD0@hd l dp{~NN:vڊ-UH)!*Hla*l BbǢKl) vHEj·:߻{g] <7fΙ9#9>ɡdWOYΈԒrtC9>v _xrҪ5 @D$Ƣp-Wx> ľDD.NkUQV/?ܨ~T?D{c)GʙK_ "LxDRkQ:lt@2p`{k"xjO9>YVa +(܉֡fŸED^89c+uT A]5DD.T_XnFa3!h UT#Gӣ3bPtokxI]&~2_-ӈhȳ@bOo,'g!_%CZUBJx "P@ {|a&~7F^CTTZ5(9?Q GLĜ`P "2 _{ن$e%& q Jk [.oU/(CkTPB{ Q5V>;ϴŽDcQ֡҄a(AF ^x9(÷7DG}#N4 3* !PiPbf`āXD6;$*͖Y`۞aF/Pzm!݀>.- 8s42*?0r]9h ܂bua6k"+<\!X K't 5% uKIMUMt6 i53\^`󜢰dc#3 =z\}vn?v1V~j}\cLNV3lF6p 09٭ ݻw?};c*ncf4vs4#Z6z4gW[ܿ?ˀu|BvfTHEF X46 ҮecYOs%ngkw@r@vIpMowsv;*s"rKyǚ/ c̐Y|+n^G`e*Sc/=*ˍ֒[Qʮrյ+K/owl a)V7Xso_]R763?Q@4seu:w;Zp x͌C?y[غl y C^X٘>IENDB`qsynth-1.0.3/src/images/PaxHeaders/quit1.png0000644000000000000000000000012714771226115015736 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/quit1.png0000644000175000001440000000033014771226115015716 0ustar00rncbcusersPNG  IHDRasRGBIDAT8RA +|?3gM 3U77u-[@<0X}&+^G-ةTEȟAG[v ,29kw';saE浶Dn7b rs>'`65IENDB`qsynth-1.0.3/src/images/PaxHeaders/messages1.png0000644000000000000000000000013214771226115016557 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/messages1.png0000644000175000001440000000047014771226115016550 0ustar00rncbcusersPNG  IHDRaIDATxc`hz?/Z>>zgD>?{u2Rt%ß2C@YăG2˷~xɛ/000%juͭl<`AMĸON{]&?Di, X`/,d??;/?rgs@ $T@*d``ULJS  ?^h`MwIENDB`qsynth-1.0.3/src/images/PaxHeaders/ledoff1.png0000644000000000000000000000013214771226115016207 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/ledoff1.png0000644000175000001440000000123114771226115016174 0ustar00rncbcusersPNG  IHDRabKGD pHYs  tIME,Q &IDATx͒?oP{vҦBRT))  P &>#_ LlCi&n:NJ-3ޫ{~:ҽs6x0 !mם}|h4φc .DY'Pn.\u%S.:\e/z'~t4gVq8493݃c 핺}|: 4@Aq0 ,..=gEGA3XR(%0+>\\Uw۝|fqHw?'>WR\8 :iDv@k5ic f*|'޼oJU׹Xi>pb"n\W*^\X6Q޸{?J:@M`iL`wQ@9S;m+xEΏIENDB`qsynth-1.0.3/src/images/PaxHeaders/options1.png0000644000000000000000000000012714771226115016447 xustar0029 mtime=1743072333.09807625 29 atime=1743072333.09807625 29 ctime=1743072333.09807625 qsynth-1.0.3/src/images/options1.png0000644000175000001440000000156514771226115016442 0ustar00rncbcusersPNG  IHDRa|w$WrZ&x)+K;@%|B}3m4GnfuUeAXqM&߽8_(#bɁ $5{l8\B>2#w~pCvt59 \ᛴaPTP'NeW!B-vEydSCP63J 8}s3WQYXX6* ֝R]  )K3Ov7ͮ#c!Q D>P,=;gO`@0KH* ȒTO?!&dz<214o)ioKFZ(?/rAP5G6IJ~*0@ud miC(o$zkF~QS:r^28P骷V̺^ӿ^kO8+9 7ij8:"+K4ϽrR+7aȲ@(s+Dn}Le"5Z~ZV-NzDp+KE[j.?h_kg|k vE0]IENDB`qsynth-1.0.3/src/images/PaxHeaders/preset1.png0000644000000000000000000000012714771226115016256 xustar0029 mtime=1743072333.09807625 29 atime=1743072333.09807625 29 ctime=1743072333.09807625 qsynth-1.0.3/src/images/preset1.png0000644000175000001440000000114414771226115016242 0ustar00rncbcusersPNG  IHDRa+IDAT8˥KQ'EDEXn""-"]%* ڴp!5FR>HB9M9Yc33=y[dMn< {Xa r>9=˱an7:4+7xmV]_a}? S#)#X:x'ϐYR}}B%$c %J4,@YFf@t4COO3zD\sR݋jYR "3ZnJܲݝcYVpD:vwCGÃڪ#߉; `M&h܋xd}e/LTӸ fިBشڍލfj5[Gy)0صPUT1ʃW|N#nJs-<'Ee#Bd=\ց d 9ZE!/MAV$U?uL a/Y@~IENDB`qsynth-1.0.3/src/images/PaxHeaders/qsynth.icns0000644000000000000000000000012714771226115016371 xustar0029 mtime=1743072333.09807625 29 atime=1743072333.09807625 29 ctime=1743072333.09807625 qsynth-1.0.3/src/images/qsynth.icns0000644000175000001440000007526514771226115016374 0ustar00rncbcusersicnszit32:.:a=2[Nm `Epa F}. `W&ss"PQhρp ?S bt(4}Y ^70yb_I6|n#cY @<ggL W !m < Z g7z U f ހ>Oi"(q[`GGq-$n؁ ` ` P F {:#oځ g! ` YEE#o o, a ]G ߘN%rހy8 b dGT #q߀ނ> `g"A V m އ@Wh"1{T c~7E]lܘGSk%"u ܭPXw-%v ۷R T{-p صP Ju)e$ԩK6eW"Б<jѸR 0hJ·2Z#ϠB c#ϳL g#Q i#R  iрR hЀP g̀ɹO b#ƮJ\ǁáDS ¿;F01¿j q ¾T a ľGN71¼c e!žH P7,ý[ ]žA?"k) f#»H E$½p.g!þJ B$þg, ^#½D -u!UK+¾l5\C $h L6sۂU&5A{\/(Fa41 G~a6 Fvɀ]6 >jU0+1^K&"QkBAbR5 #"Km\?(IhZ?!$BX{oO< 3HUlzfOB.$6@GKKLLJIE>3"& :O(!Ge71Wv=9gwP,>uuf8,OussC8bsqq[4>rqo= 2RqonnoV1 :honmmnm< (GqnmllmoV1 8_pnmmlmnn>!AqomoZ47[qonnmnoB#@qqpna7 7[sqponnmnnK,#Arqponmi: 9]sr srqpommlmW3(Csrrst srqpnmllmC% :csrstu trpnmlkld8.Jtsstvw vusqomlkklR2;ksstvwxyyxvtrpmljjkkA%5Utstuwyz yxvsqnljijkc7#@rttuwy{|}|{ywtqoljiijlR1 9`ttuwy|}~~}{xuroljihiklB&/Juttvy{~}zvspmkihhike8 =ouuvx{~~{xtqnkihjlW3 8]wvvx{~}yvrnkihghhjlF+ ,Izxxz|~{wroljhgghijh;>r|{{}}xtpljhghik]4:_~~zupmjighjlM/-K{vqnkihgikk?$Aw}wrnkihghjkd7;bytokihhghhjlV2 ,N{upljihhghijmF)B|}vqmjihghiki; l{vspnlkjjiihjlh8(,T}xtqonlkjihikmY1G~zvrpomljjiihijlnF';k{xurpnmljjiihijlh8,"Q}zwtqpnlljihijmX0 DĀ¿{xvtqonljjiihilnC!1`ƀ}{xvspolkjjiihijmf4JȀ}zwuqomlkjiihjlnQ*$a~{xurpnligec`\YWTRTVZ]:M1~ywsqnlkhfda^[WTRQPQSVZ\/ GC|yurpmligeb_\YUSPOOPRVZS)7w3{wtqnljhfc`]ZWTQOMMORVZE!E#[}yvspnkigdb_[XUROMLLNRVZ7 C1|xuromjhfc`]YVSPMLKLNRWU*7v1}zwtqnkifda^[WTQNLKKLNSWE! S0}{xuromjgeb_\YUROMKJJLOTX3 =+~{xvspmkhec`]YVSPMLJMPUN& *_$~|yvspnkigc`^ZWTQNLJKNRV: @-~|yvtqnkigca^[XUROMKIIJLPTQ)-_ #~|ywtpnkhfca^[XURPMKIKNRV<?,~{ywtqnkhfca^[YVSPMKJIIJLPTP*+V)}{xvtqnkheb`^[XVSPNLJIHIKNRV7 :s!~|zwurqmkgeb_]ZXUSPNLJHJMPUI' F+~}{yxvtqoligda_\YWURPNLJIHHILOST//Y'}}{zyxvusqomkhec`][XVTQOMKJIHHIKNQU:  8k~}|{zyyxwvutsrpnlkhfda^\ZWUSPNMKJHIJMQTF' >v~|{yxwwvutsrrqpomlkihfca_]ZXUSQOMLJIHJMPSN+ #D{~|ywutsrqp'onnmmlkjihgfdb`_]ZXVTRPNLKIHHGGHJMPSR/))H{{yvsqponllkjjihhgfedba__]\ZXVTRPOMKJIHGHJMPST33,Jyxurpnlkihhfeedcba`^][[YXWVTSPOMLJIHGFFGHJLOST5 1,Iuvsomkigfdcba`_]\[YXWVUTSRQOMLKIHGGFFGHJLPST5 "+Eqspmjhedb`^]\[ZXWUTSRQQPNMLKJIGGF GHJMPSR3 '>iqnkheb`^\ZYWWUSRPPONNMLKJIHGF GIKNPSN/+7\olheb_\ZYWUTRQONNMLLKJJIHHGGFGGIKNQTF*0Iijgc`]ZWVTRQPNMLLKKJJIIH IJKMORR9& (7Vheb_\XWTSPONMLKKJIJ KLNORTE- ,ACCB@=:51-)&$$&+% !0889BFJLNNMJFB=72-)&$$%(,' !-879=AFJNPRRPMJE?:4/*&%$$&).!!$988DHNSVYZ[XUQKE?82,)&%$$%',* $ +879=AGMRWZ]_^]YUOHA:3.)'%%$$%).%&#778<@FKQW[_bcca]XRKD<5/*(&%$$%'+0  377;>CIOU[_cfgfea[UME>70+)'%&)-.( +879=AHMSZ_dhjkjhd^WOH?82,)(&&%%&'*.( $:88<@FLRX^chlnnmkf`YRIA93.*)''&(+0#!!7;:<@EKQW]chlpqrpmib[SJB:4.+*(('&')-1, /><=@DJPV\bhmqtvutpjd\TLC;4/,+)((''&&(+0. &?(ADIOU[agmrvzzyvrle]ULD<50-++))(''&')-2(/#964200//.-,+*)('(+0,;":EDEINSZ_ejouy~~uj_UKD?:74200//..-,+)(('&').4$),HEEGLRX_dkpuz}sh]SJE?;85310/..,+*)('&&(+13 * $BGEFKPV]dkqw||rf\PID?=963200/.-,+)('&&'*.4* 2HEFINT\cjqw}{peYPHC?=:74210..,+*)(&(,16 *&EFEGLRYaiqx~zocXMFB><:753210/.-,+)('&&'*.3.7!6FDFJOV^gow~ynbWMEB?<:865332110/.,+*('&(+05#8&GEEGLS\dmv~xmbVLEA><;997644321/.-,*)('&(,21 8HEFJPXais|*wk`ULFA?==<;;9864310.-,+)('&&%'*/5%: &IHFHMT\eoywk_ULE@>>=>?><:75210..,+*('&%',22D6KHHKPX`juwk`ULFA@??@@A><85310/--+*)'&%$$&)/6#&$GKIINS[eozwk`UMGC@ABB@=85310/.-,*)(&%$$%',3/&.LIIKOV_hs~wk`VNHC@A?<85210/.-,*)(&%$##&*05 (!>=;8632100..,+)(&%$#"#&*/0G,JHGINT\fp|xlaXPJEB@>=<;97531100/.,+*(&%$""#$',2 26HFFJOU^gr}wlaXPKFB@>=;:964210/.,+*(&%$"#%)/&3!>GDFJOV^hr~ſvkaYQKGC@>=;9864210 /.-+)(&%#"!#'-*3#CECEJOV_hr}ľujaXPKFCA>=;9864210/.-+)(&%#"!! !$+.3$GDBDINV^gq|~si_WPKFCA>=;9864210 /.-+)(&%#"! #)/$ICBDHNU]fozƀ½{pg^WOJFC@>=;9864210 /.-+)(&$#" "(03$HCBCHLT[dnwxne\UNIEB@>=;:964210 /.,+)(&$#! "'0I$GCBCGLRYbkt~~tkbZSMIDB@>=<;97531100/.,+)'&$"! !'/I#EDBBFJPW_gpyypg_XQLHDB@?>>=;8632100..,+)'%$"!"(.)#BCAADHNU[dku}}tkd[UOKFCA@?=;74210/.-,*('%#" "(,(!?DAACGLRX_gowwog_YRMIEB@A?<85210/.-+*(&$#!  #)*(9DAABEINT[bipxxpib[UOJFCA@ABB@=85310.--+)'&$"  $*''3EA@ACGKQV\bjpw||vpjb\WQLHEB@?@@A><85310/-,*)'%#! !%+#',FB@@BEHLRW]biotx||xtoib]WRMIFB@>=>?><:75210.-,*(&$"!"'- $FCA@@BEINSW\bgkosux&usokgb\WSNIFCA?>=<=<;;986421/.-+)'%#"  #(.G!@D@??@BFINRV[_cgjlmoomljgc_[VRNJGEA@>=<;;997644321/.,*(&%#! $*+6EA?>>@CFILQTX[^ace/ca^[XTQMIGDB@?==<;:865332110/-+)(%$" !&,%#+FB>=<>@CEHKNRUWY[\]]\[YWUROLHFDB@>=<;9753210/.,*)'%#!"'-"DC?< =?BDGILNPRTUTRPNLIGECA?>==<=<;964210.-+*'&$" #)-7D@<;:;<>@CDGIKLLN LLKIGEDB@?>==<;:863200/.,*('%#!$+&)E@=:;<=?ACDFGGHIIHGGFDCBA?>==<;;:975310/.-+)'%$"  &-  ?A=;9;;<>?@BBCDCCBAA?>==<;:9753200/..-,*(&$"!"().C>;98899;<=>>??@?>>=<;!:;::87543100/.-,*)'%#! $*  !??;87789:;<=<>=>==;::99:98653110.-,+)'&$" !&) .?<97789;<;:;<==>=;;987642100/ .,+)(&$"!$)   ;<86679;<<;:89:;=>?><976545310//. ,+*(&%#! "')(=96679<=<;986778:<>?><96421100/.-,+*(&%#"  %*3:6578;<;97654569;=>=;7420//..-, +**('%#" #(&!:7567964324468;852/-, ++*)(&%#" !&+ ):655665420//0 123577641.-+ **)('&$#"  %* 0853221/.--,-..0120/,+*)((&&$#!  $)% 5631/.,+*+,,-.-,++)(('&%$#!  $() !651.+*)(('()*)()('&%$#"!  $(*#73/+)'&'&'(('&$$#"  $(, #62-*(&%$%$%$%%&&'&%%$#"!  $(,#41-*'&$$#$#$##$%& %%$$#"! !$(, !31-*(&$#$#$%$##""! !%)+ 12.*'&%$# "!! "&** ,3.+)'%%$#"!! #&*& %21-+)('&&$##""!   !$(* ,31.,+)'&%#"!!   !"#%'*%!/520-+('%#"!  !"#%')+' !-520-*(%$#"!! ! "$&(+,& &-1/,*('&% &()+'!    %(*+, +*(%" t8mk@dd #&88RNqh۲D $u G5!pk/" @.?k:& pG0k<& OI0 l;% :H/ws;% .L0oԁ=& +V2 p@*0j6" yJ.=և;& `2 QE*ԃ8$ k_1 6D*Շ7# Xe0 'I* zے8$ Mq2 !S+v>& Jс4!  a. uG(Kّ7# !q0 vR*Lߝ<% !~2 v\, KB& Ӈ4! qd. BE'Պ5" eb. 1B'  ~ρ3! KV+ۘ9$ [i/ @& du2 "D) _y4  D* Pr3   ?( 1`2^׉<& G.&c6" DԀ?( ^H.tP5V:# \?& aB) cE+ eF, weF, idF+ XbD* Dߛ^A( .֋Z>& yV:"  |nP5YfJ05א_C* vW<&  ejN5  7֑bF.uX=&  RޤjN5  ́_D, _oT:%  "ΆdI1]rW>'  ɃeJ2 IڠpV>(  y{bH2 *͋jR:&  IןrZB-  i߰xbJ4" fP:& (ÅjT>+  0ƉmWB. 5ƋnYD1! 5ÉnYE2"  1޽lXE2# )vױ~jVC2# %[̞wfSA1"  #?غq`N>.!  -_ěwiYI9*  (:oĠ{l^OA2&  ".=kѺxj^RE8+!  &0;V}λpfZOD9.$  &.8BTp¾znf^UJ@6-$  #+3;DKRY^bdfffca]WRJB:2*"  %+27<@CFFGFEB?;60*$  !$'*+,-,+)&#     qsynth-1.0.3/src/images/PaxHeaders/save1.png0000644000000000000000000000012714771226115015712 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/save1.png0000644000175000001440000000027714771226115015704 0ustar00rncbcusersPNG  IHDRasRGByIDAT8œ 0 F_; 5 - JOJQQ9!y-`fsK>b4JtH"MjU8sxT@)7[tzdo!TzˇΐsӰ0DIENDB`qsynth-1.0.3/src/images/PaxHeaders/formRemove.png0000644000000000000000000000013214771226115017010 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/formRemove.png0000644000175000001440000000110114771226115016771 0ustar00rncbcusersPNG  IHDRasBIT|d pHYsu85tEXtSoftwarewww.inkscape.org<IDAT8ŐMkQLrcL246%tJI]TJ)])] bE\ B\ EJJ I|ndwq_898m IoC,ʝ_sڶ7<:{PԲyOM8{?Ra4*{ssi U.@~6,iB䵮*QZ.oJIM)k|2 yz0@dԨD2`rR 5INЬ]f3vNS)\HZDFI>z[7Mi}me!RT3|uqfg(\;Rf"Ppo--U6Af{uM,[͚@£E0E|oؤEIENDB`qsynth-1.0.3/src/images/PaxHeaders/itemReset.png0000644000000000000000000000013214771226115016630 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/itemReset.png0000644000175000001440000000110314771226115016613 0ustar00rncbcusersPNG  IHDRasBIT|d pHYsbb8ztEXtSoftwarewww.inkscape.org<IDAT8R`__] NHMP ]ڥCS'(tS7%O24bHi/5{clt{s? D$(M/Lr)˲|i .y'aE1'mq("( ԡ}eYf)q mE1;͒l6re}u=" ѨZUBl[c $۶ziVs !Kv;cEp΁R R4M$~;9?5 s~Z!g~Q20J)AG"H7Bay?m4J1LRT.v$"!`8(ur|V*c}q%N~3υri6MZ.:GixUs IENDB`qsynth-1.0.3/src/images/PaxHeaders/qsynth.xcf0000644000000000000000000000012714771226115016215 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10007624 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/qsynth.xcf0000644000175000001440000022162514771226115016211 0ustar00rncbcusersgimp xcf v011BBfPath 2Bx@BxBABpABABB0BBBBBBBBBBBpBxABx@Bxgimp-image-grid(style solid) (fgcolor (color-rgba 0.000000 0.000000 0.000000 1.000000)) (bgcolor (color-rgba 1.000000 1.000000 1.000000 1.000000)) (xspacing 10.000000) (yspacing 10.000000) (spacing-unit inches) (xoffset 0.000000) (yoffset 0.000000) (offset-unit inches)  &? ! Stroke Path!? "     %$# z&=<; ;$;/E;Lo;o;;: :AX: :G9B9r9S;,;; 0;h;V;Q:k;L :p;V:e;n:L;;0*:;b:Y;;E#: w;:91:;:76:;:95: ;::4: ;:55:;| :%@:;Z:a;:$2;#>o>>=~=<T<j< A<{<B<y; V<e;{<A<<M<n ;<.=< ;<1@<~;<'R<k;;q<M0< ; </O<o;;u<J1< ; </I<u;<!X<d;<S<h;<*6<; `6;;;;;*;; *;[<j; ;D<<W<.<<<< <<+<F<h<u<H<<5<y<Q< <p<S<9<<#<<"+<<S<h;<$_<`/<; ; ;" ;(;$,;\; ;c_:#G:\[9 tF8d[7 4,7NZ ;{<@<<< <l<R;<<<.<5<t<`<3<<<< <<+<G<i<u<H;;5<y<Q; ;p<S;9;;$;;+";;S:h;:_$:/`:: 9 9 #9(9+$9[8 7^c8F#6[\4Fu / 7[d 1ς-4˪O@@ Highlight!? "     %$#  & #o%6Kaw-*V~-V-%~-6 -I -\ -o - - - - ) 4) =:41 #+3:?BCB>80 '08?DHIGC=/ #,5>EKNNMHA/ (2;DLQTURMF. %.8BLSY[[YSK- ",6@JT[acc_YQ-  *4>IS]dikjf`V, (2)7uaH-R-Hy!? !' !HϺ~V!'?Wk||l[H6% uaH-R-Hy!? !' !HϺ~V!'?Wk||l[H6% uaH-R-Hy!? !' !HϺ~V!'?Wk||l[H6%  (4@LXdp|{fO  *7DP\hut_H  !-9FS_lxlWB #/;HUanzwcO; $00#  $-6@IR[ckqvxxvrldZOB4(  '08@HPW^cghhfb\ULA6*   !(07>EKPTWXXVRLE=4+!  !'.39>BFHHGEA<6/(  ! $).25799862.)# !  #&)*++*(%! "  #  $  % (,0  I555555{5m5]5J5؝45سq5םq< 54 5999o9U9ڠ79Ƞa9wU79~%=V=*= 555555{5m5]5J5؝45سq5םq< 54 5999o9U9ڠ79Ƞa9wU79~%=V=*= 555555{5m5]5J5؝45سq5םq< 54 5999o9U9ڠ79Ƞa9wU79~%=V=*= 8$ 83  8.8(8# 9 9: : : : ; ;;<<<= @@Gradient Glow!? "     %$#''(9Jjg7Tn1a171T-?^-l-? -^ -y - - - )+Sv )+ )S )v ))))% :h%:%h%!:Y!f !:!Y!s!!! =m=m%Jl%|Jl  BcqB"c#}$%2   2  1  /   . - --- - ! -"#"! * "&%$#"!! )-570,+*))(('&%%$#""!) -8;;720.-,*)(''&%$)5;<<:74210//.-,,+*)(')9<==<:864332100/.--,+)$<=>>=<;987655433210/.))>?@@?>=<;;99877654432)-ABA@?>=<<;::98765% .>EDCBA@@??>=<<;:9%7LTTNJIHHGFEDCCBBA@?>=<% LVYYTPNLKJIHHGFFEDDCBA@%.TYZZXURPONNMLLKKJJIHGFEDC"?WZYWUTRRQPPOONNMMLKJIHG!%AQZ\[ZYXWVUTTSSRRQQPOONMLJ!AYac`^]]\\[ZZXXWWVUTSRQPON!Qaeeca`__^]\[[ZYXWVUTSQ!+[dffecbbaa`_^]\[ZYWVU!7bhiihgfedcba`_^]\[ZX!Bhlkjihgfedcba`^]\!Kmonmlkkjihgfedcba_3EaqrqpoonmlkjihgedcQlvywutsrqponnmljigf3lz|}{yxwwvvw vuttsrqonmkiEv|}~}{zzyyz{|{zyxvusrpom !3\{}~}|~􃂁}{yxvtrp <^oy􋊈~|zxvt!^v}~|zx3o}}BxO[h𖙝(>{Hs復(s>P_2   2  1  /   . - --- - ! -"#"! * "&%$#"!! )-570,+*))(('&%%$#""!) -8;;720.-,*)(''&%$)5;<<:74210//.-,,+*)(')9<==<:864332100/.--,+)$<=>>=<;987655433210/.))>?@@?>=<;;99877654432)-ABA@?>=<<;::98765% .>EDCBA@@??>=<<;:9%7LTTNJIHHGFEDCCBBA@?>=<% LVYYTPNLKJIHHGFFEDDCBA@%.TYZZXURPONNMLLKKJJIHGFEDC"?WZYWUTRRQPPOONNMMLKJIHG!%AQZ\[ZYXWVUTTSSRRQQPOONMLJ!AYac`^]]\\[ZZXXWWVUTSRQPON!Qaeeca`__^]\[[ZYXWVUTSQ!+[dffecbbaa`_^]\[ZYWVU!7bhiihgfedcba`_^]\[ZX!Bhlkjihgfedcba`^]\!Kmonmlkkjihgfedcba_3EaqrqpoonmlkjihgedcQlvywutsrqponnmljigf3lz|}{yxwwvvw vuttsrqonmkiEv|}~}{zzyyz{|{zyxvusrpom !3\{}~}|~􃂁}{yxvtrp <^oy􋊈~|zxvt!^v}~|zx3o}}BxO[h𖙝(>{Hs復(s>P_|::9998  8  7  7 66 54433  !""! 2!#$#"!1!$&''&%$#1!%')('&%0&)++,+*)((0&*,-.-,+*/#+./0/.--,.*/123210/..)/24543210-%/3578765433,/479:987665,.58:<<==<<;;::9987+(5:<>?>=<;;:9*4:>@A@?>=<;*19>ACDCBA@?>=)+9>BDFEDCBA@(":@CFGHIJHGECB(=DGHIIJKLNPQQOLIFD' ;KOONLKLMPTWYYVRMIG&-OVXVROMLMPTY^a`]WQMI&JX^^ZUQNMOQV\bffb[UOL%;R\a`\VRONORW]cggc]VRO$%FS\`_[VRONORV[`cc`[VSR$;HQX[[XTQPOPQTX\^^[XUTU#-@HOTVVUSQPQSUWXXVUTTV"9BINQSRSTSRRSV" 1>EJNPRSTUTSRQSU!#9AHLORSUVWWXYXWWVUTRQRT!4>EKORTVXY[\]]^^]]\[YXVUSRQQR +;CINRUWZ\^`abcba`^\ZXVTSRQ 8AGMRVY\^acegijigeca^\YWUSRs`H-5ӹR5͎-5H5؉Z;1ͦg1ݦ;1Z1O2-Z- Ԙ2- O- h- }- - -rP() ()P)r) T7% ǟ`% ؟7% T%n%%%%zW-!ɍ-!W!z!Y;̦f ܦ; Y t oM& ݾ& M o     lJ% ۻ|%97663  2  1  1 / . --- -#"!  -&%$#"!-*)'&%$$##"!!  *-,+*)'&&%%#%&$)1/.-,+*(('&&%%&'()(&)4320/.-+**)()*)($ )7654210.-,*)'&;:9764310/..,+*'! %>=<;9864320.--,+*%%BA?><;98653211/.-,*!%EDCA@><;976533100//..--+& %IHFECA@><:9765432110/..-*%LKJHFECA?=<:8766432210-%PNMKJHFDB@>=;9877543321%SRPOMKIGECA?><:99765543' "WUTRPNLKIGDB@>=;::876530)!ZYWUSRPNLJHECA?><;:988776552) !^\ZYWUSQOMKHFDB@>=<:998876650!a_^\ZXVTRPNKIGDB@>=<;:9876653 dca_][YWUSQNLIGDB@?>=;98764-&hfdb`^\ZXVSQNLIGEBA?>=:9877641/*kigfda_][YVTQOLIGECA?>;:9876421/& nmkigeb`^\YWTQOLIGEC@?>;:9864220+rpnljheca^\YWTQOLIGDB@?=;:864322/vtqomkhfda_\YWTQNLIFDB@><;97541zxuspnkifda_\YVSQNKHFCA?><:876654 |yvsqnlifda^\YVSPMJGEB@?>;9876'㄀}ywtqnlifda^[XUROLIFDB@><:9860*#ڊ}zwtqnlifc`]ZWTQNKHEC@?=;:998520-#ڐ~zwtqnkheb_\YVSPMJGDB?><::974210*ږ~zwtqnkhea^[XURNKHEC@>=;:864221.ߝ~zwspmjgd`]ZWTPMJGDA?=<:86420ڤ}yvsolifb_\YUROKHEC@><;8643221߫}yuqnkgda^ZWTPMJGDA?=;86432!߱|xtpmifc_\YUROKHEB?=;96543% ֵzvrnkhda^ZWSPMIFC@>;9755442*$97663  2  1  1 / . --- -#"!  -&%$#"!-*)'&%$$##"!!  *-,+*)'&&%%#%&$)1/.-,+*(('&&%%&'()(&)4320/.-+**)()*)($ )7654210.-,*)'&;:9764310/..,+*'! %>=<;9864320.--,+*%%BA?><;98653211/.-,*!%EDCA@><;976533100//..--+& %IHFECA@><:9765432110/..-*%LKJHFECA?=<:8766432210-%PNMKJHFDB@>=;9877543321%SRPOMKIGECA?><:99765543' "WUTRPNLKIGDB@>=;::876530)!ZYWUSRPNLJHECA?><;:988776552) !^\ZYWUSQOMKHFDB@>=<:998876650!a_^\ZXVTRPNKIGDB@>=<;:9876653 dca_][YWUSQNLIGDB@?>=;98764-&hfdb`^\ZXVSQNLIGEBA?>=:9877641/*kigfda_][YVTQOLIGECA?>;:9876421/& nmkigeb`^\YWTQOLIGEC@?>;:9864220+rpnljheca^\YWTQOLIGDB@?=;:864322/vtqomkhfda_\YWTQNLIFDB@><;97541zxuspnkifda_\YVSQNKHFCA?><:876654 |yvsqnlifda^\YVSPMJGEB@?>;9876'㄀}ywtqnlifda^[XUROLIFDB@><:9860*#ڊ}zwtqnlifc`]ZWTQNKHEC@?=;:998520-#ڐ~zwtqnkheb_\YVSPMJGDB?><::974210*ږ~zwtqnkhea^[XURNKHEC@>=;:864221.ߝ~zwspmjgd`]ZWTPMJGDA?=<:86420ڤ}yvsolifb_\YUROKHEC@><;8643221߫}yuqnkgda^ZWTPMJGDA?=;86432!߱|xtpmifc_\YUROKHEB?=;96543% ֵzvrnkhda^ZWSPMIFC@>;9755442*$@>>==<;; : : 9 88 7 665 4 4"! 3%$#"!  2'&%$#"! 2)('&%$#"!1+*)('&%$#!0-,++*('&%#" 0/.-,*)('%$" /210/.,+*)(&$" .43210.-,+*('%"-654321/.-,*)'%" -87654310/-,+)'$",:98765321/.,+)'$!+<;:98754310.-+)'$  +>=<;:9764320.-+)&#*A?>=<:9865320/-+)&")CA@?><;:875420/-+($ (EDBA@>=;:875420.,*'# (HFEDB@?=<:875420.,)&#'KIHGECA?=<:875320.+)%"&NLJHECA?=<:87531/-+($  &RQOLHECA?=<:86431/,*'#%VWVSPLHECA?=;:86420.,)%!$XZYWSOKHECA?=;97531/-*'$  $Y[[ZWSOLHEC@><:97530.,)&"#XZ[[YWSPLHEB@><:86420-+(%!"VXZ[[ZWSOJGDA?=;97531.,*'# "SUWZ[[YVQLHEB@><:86420-+(% !RSUXZ[ZWRNIFDA?=;97531.,)&" !QRSVXYXVRNKHECA><:8642/-+($  %&&&''''''''''''''''''''''&" o ?   ?o    !k; ;kwEEw!!s!B! Bs % %h%:% :h)N )2 )Y )2Nh~kv~봶֋擷ܻ޽ݽ޾޾޿޾ݽݽ޽޼޻۳챲۫쩪럡y똛r뒔k댏d]T}Hz5p}Tpz~~5Hm{|~_yz{~}Zwxyz||}~~|zxSuvwxyz{|}~􋊈~|zxvtKruvwxy{|~􃂁}{yxvtrp?ntuvuutuvwxyzz{|{zyxvusrpom.ertutssrstuvuttsrqonmkiJenrrqpqpqponnmljigf.?Znpon mlkjihgedcAkopponmlkjihgfedcba_1cmoonlkjihgfedcba`^]\Mckmkiihhgffeeddcba`_^]\[ZX1AVfgfedcbaa`_^]]\\[ZYWVU!:bfggfdca``_^]\[ZZYXWVUTSQ!+Zdffeb`^]]\]\\[[ZYXWVVUTSRPON!EZbda^]\[Z[ZZYWVUTSRRQPNMLK!+:KYZYXWUTSQPPONMLKIH%.TYZYXWVUSRRPONMLKJIHGF% LVYXWVTSRPONMMLLKJIHGFE%7LTWWUSRPONMMLLKKJIIHGFED% .:GLKJIHGFEDC)8FJKJIHGFEDC)*>FIJKJIHGFEDC)*8@DGHIJIHGFEDC*!',0357787654kv~봶֋擷ܻ޽ݽ޾޾޿޾ݽݽ޽޼޻۳챲۫쩪럡y똛r뒔k댏d]T}Hz5p}Tpz~~5Hm{|~_yz{~}Zwxyz||}~~|zxSuvwxyz{|}~􋊈~|zxvtKruvwxy{|~􃂁}{yxvtrp?ntuvuutuvwxyzz{|{zyxvusrpom.ertutssrstuvuttsrqonmkiJenrrqpqpqponnmljigf.?Znpon mlkjihgedcAkopponmlkjihgfedcba_1cmoonlkjihgfedcba`^]\Mckmkiihhgffeeddcba`_^]\[ZX1AVfgfedcbaa`_^]]\\[ZYWVU!:bfggfdca``_^]\[ZZYXWVUTSQ!+Zdffeb`^]]\]\\[[ZYXWVVUTSRPON!EZbda^]\[Z[ZZYWVUTSRRQPNMLK!+:KYZYXWUTSQPPONMLKIH%.TYZYXWVUSRRPONMLKJIHGF% LVYXWVTSRPONMMLLKJIHGFE%7LTWWUSRPONMMLLKKJIIHGFED% .:GLKJIHGFEDC)8FJKJIHGFEDC)*>FIJKJIHGFEDC)*8@DGHIJIHGFEDC*!',03577876540>FLQVZ]`dgjlnpqrrqpnljgd`]ZXUS:DKQVZ^bfimpsvxyzzyxvspmifb^[XU/?HPUZ^cgkptx{~~{xtpkgc_[X7CLSY^chlqv{{vqlhc^Z+;FOW]bglrx}}xrlgb]3?IRZ`fkqx~~xqkf`&8CMU]cipv}}vpid 1HPX_gnv~~vn6AKSZahpxxp9DMU\biqyyq$;FOV]cjrz¾zr'EKPTW[_cgkptx{~~{xtpkgc_[X3FKOPQRTVXZ\^`abcba`^\ZXVTSRQ 0=&%,26:=?@A@?>=<;'$+048;=>?>=<;;:9(!(.258:<;:987) &+/36898765+$)-024565433,%)+-/011210.#&()+,-././ "%'(*+1 "$%&''&&4  6 < J l                                     t Z ݦ; ͦgZ;   f E׵u!fE!yVȋ,yV,z!W!ɍ-!zW-!t%Q%Å)%ՙtQ)%?)Â')ʭH)lW?'ֹ}xtpmifc_\XUQNJGDA>;9865430+)&ּzvrokgda]ZVSOLHEB?<:87542/+*)$ ־|xtpmieb^[WTPMIFB?<:87530-++*'~zvrnjgc`\YUQNJGC@=:8752/-+)¿|xsolhda]ZVROKGDA>;8651/-+*~yuqmieb^[WSPLHEA>;9641/-,++*{vrnjfc_[XTPMIEB?<9642/-,+}xsnkgc`\XUQMJFB?<9632/-,+¿ytokgd`\YUQNJFC@<96310--,ztplhda]YURNJGC@=9631/-,{uplhea]ZVRNKGD@=9631/.-,|vqliea^ZVROKGD@=:631/.-, ¿|vqmiea^ZVSOKHDA=:631/.- ¿|vqmieb^ZVSOKHDA=9631/.- ¿|vqmieb^ZVSOKHDA=9631/.- ¿|vqmiea^ZVSOKHD@=9630/.- |vqliea^ZVROKGD@=9630/.- {uplhea]ZVRNKGD@<9520/.-, ztplhda]YURNJGC@<8520.-, ¿ytokgd`\YUQNJFC?<8520.-, }xsnkgc`\XUQMJFB?;842/.-,+{vrnjfc_[XTPMIEB>;741/--+~yuqmieb^[WSOLHEA=:741.-+*¿|xsolhda]ZVROKGD@=9630.-+*~zvrnjgc`\YUQNJFC?<9520-,**)ܾ|xtpmieb^[WTPMIEB>;852/-,)(ۼzvrokgda]ZVSOLHDA=:741/-+)('۹}xtpmifc_\XUQNJGC@<9631.,*('&۵zvrnkhda^ZWSPLIEB?;8530.,)'&%۱|xtpmifc_\YURNKHDA=:7520.,)'%$֫}yuqnkgda^ZWTPMJFC?<9641/.+(&%$$#֤}yvsolifb_\YUROKHEA>;8531/.+(&$$#!۝~zwspmjgd`]ZWSPMJFC@=97420.-+(%# ֖~zwtqnkhea^[XURNKHEA>;8530/.,+)&##" ֐~zwtqnkheb_\YVSPLIFC@=:742/.-,+)'#" ֊}zwtqnlifc`]ZWTQNKGDA>;8530.-++**'# }ywtqnlifda^[XUROLIEB?<9742/.-*)(!|yvsqnlifda^\YVSPMJGC@=:8531/-*)('zxuspnkifda_\YVSQNKHDA>;96420.+)('&vtqomkhfda_\YWTQNKHEB?<:7520/.+)'&$rpnljheca^\YWTQNLIFC@=;8531/.,*(&%#nmkigeb`^\YWTQOLIFDA>;96420/-+*(&%%$! kigfda_][YVTQOLIGDA?<:7531/.,+*)'%$#hfdb`^\ZXVSQNLIGDB?=:86420/,++*)'$# dca_][YWUSQNLIGDB?=;864210-,+**)'" a_^\ZXVTRPNKIFDB?=;975310.-,+**)'^\ZYWUSQOMKHFDA?=;975321/.-,+**)%ZYWUTRPNLJHECA?=;975421/..-,+*)'WUTRPNMKIGEC@><;9754320/.--,+(%SRPOMKJHFDB@><:9754320/.-,*POMKJHGECA@><:8754310//.-,(!MKJHGEDBA?=<:8764310/.-,*"!JHGEDBA@>=;:8765310/..--,*("!GFDCA@?=<:98764321/.-,*"EDBA@>=;:987543210/.--,,'%CBA@>=<:98543210//..-,,) %CB@?>=:9764321/.--,,+*' %BA@>=;:8754210.-+*)("&BA@>=;:875421/.,*)($)BA?>=;:875321/-+)'$)B@?><;986431/-+($*3210.-+)'%#  ֹ}xtpmifc_\XUQNJGDA>;9865430+)&ּzvrokgda]ZVSOLHEB?<:87542/+*)$ ־|xtpmieb^[WTPMIFB?<:87530-++*'~zvrnjgc`\YUQNJGC@=:8752/-+)¿|xsolhda]ZVROKGDA>;8651/-+*~yuqmieb^[WSPLHEA>;9641/-,++*{vrnjfc_[XTPMIEB?<9642/-,+}xsnkgc`\XUQMJFB?<9632/-,+¿ytokgd`\YUQNJFC@<96310--,ztplhda]YURNJGC@=9631/-,{uplhea]ZVRNKGD@=9631/.-,|vqliea^ZVROKGD@=:631/.-, ¿|vqmiea^ZVSOKHDA=:631/.- ¿|vqmieb^ZVSOKHDA=9631/.- ¿|vqmieb^ZVSOKHDA=9631/.- ¿|vqmiea^ZVSOKHD@=9630/.- |vqliea^ZVROKGD@=9630/.- {uplhea]ZVRNKGD@<9520/.-, ztplhda]YURNJGC@<8520.-, ¿ytokgd`\YUQNJFC?<8520.-, }xsnkgc`\XUQMJFB?;842/.-,+{vrnjfc_[XTPMIEB>;741/--+~yuqmieb^[WSOLHEA=:741.-+*¿|xsolhda]ZVROKGD@=9630.-+*~zvrnjgc`\YUQNJFC?<9520-,**)ܾ|xtpmieb^[WTPMIEB>;852/-,)(ۼzvrokgda]ZVSOLHDA=:741/-+)('۹}xtpmifc_\XUQNJGC@<9631.,*('&۵zvrnkhda^ZWSPLIEB?;8530.,)'&%۱|xtpmifc_\YURNKHDA=:7520.,)'%$֫}yuqnkgda^ZWTPMJFC?<9641/.+(&%$$#֤}yvsolifb_\YUROKHEA>;8531/.+(&$$#!۝~zwspmjgd`]ZWSPMJFC@=97420.-+(%# ֖~zwtqnkhea^[XURNKHEA>;8530/.,+)&##" ֐~zwtqnkheb_\YVSPLIFC@=:742/.-,+)'#" ֊}zwtqnlifc`]ZWTQNKGDA>;8530.-++**'# }ywtqnlifda^[XUROLIEB?<9742/.-*)(!|yvsqnlifda^\YVSPMJGC@=:8531/-*)('zxuspnkifda_\YVSQNKHDA>;96420.+)('&vtqomkhfda_\YWTQNKHEB?<:7520/.+)'&$rpnljheca^\YWTQNLIFC@=;8531/.,*(&%#nmkigeb`^\YWTQOLIFDA>;96420/-+*(&%%$! kigfda_][YVTQOLIGDA?<:7531/.,+*)'%$#hfdb`^\ZXVSQNLIGDB?=:86420/,++*)'$# dca_][YWUSQNLIGDB?=;864210-,+**)'" a_^\ZXVTRPNKIFDB?=;975310.-,+**)'^\ZYWUSQOMKHFDA?=;975321/.-,+**)%ZYWUTRPNLJHECA?=;975421/..-,+*)'WUTRPNMKIGEC@><;9754320/.--,+(%SRPOMKJHFDB@><:9754320/.-,*POMKJHGECA@><:8754310//.-,(!MKJHGEDBA?=<:8764310/.-,*"!JHGEDBA@>=;:8765310/..--,*("!GFDCA@?=<:98764321/.-,*"EDBA@>=;:987543210/.--,,'%CBA@>=<:98543210//..-,,) %CB@?>=:9764321/.--,,+*' %BA@>=;:8754210.-+*)("&BA@>=;:875421/.,*)($)BA?>=;:875321/-+)'$)B@?><;986431/-+($*3210.-+)'%#  RQRSUVVUROLIGDB@=;97530.,)%"SRQRSSTTSROMIFCA><:8631/-*'#USQRTUVVUQMIEB?=;96420-+(%!WTRQQRUX[][WRLGC@>;97530.+)&#YVSQQSV[`cb]VOHDA><:8531/,*'$ \XURRTX^cgf`YQJEA?=:8641/-*(%!^ZVTSTX^cgfaYQJEB?=;96420-+(&" a\XUSTW\`cb^WPJFB@>;97520.+)&#c^YVTSUX[]\YTNIFC@><:7531.,)'$ e`[WTSSTVWVTPLIFCA><:8531/,*'$!ga\WTRQQRRQPMKHFCA?=:8631/,*(%"ib]XTRPPOMLJHFDA?=:8641/-*(%"jc]YURPONNMLKJHFDB?=;8641/-*(%#  jc^YURPONNMLKJHFDB?=;8641/-+(&#  jc^YURPONNMLKJHFDB?=;8641/-+(&#!jc]YURPONNMLKJHFDB?=;8641/-*(&#!ib]XTRPPOMLJHFDA?=:8641/-*(&#!ga\WTRQQRRQPMKHFCA?=:8631/,*(%# e`[WTSSTVWVTPLIFCA><:8531/,*'%# c^YVTSUX[]\YTNIFC@><:7531.,*'%"  a\XUSTW\`cb^WPJFB@>;97520.,)'$" ^ZVTSTX^cgfaYQJEB?=;96420-+)&$! \XURRTX^cgf`YQJEA?=:8641/-+(&#!YVSQQSV[`cb]VOHDA><:8531/,*(%# WTRQQRUX[][WRLGC@>;97530.,*'%"USQRTUVVUQMIEB?=;96420-+)'$! SRQRSSTTSROMIFCA><:8631/-+(&$!RQRTUVVUROLIGDB@=;97530.,*(%# QRSVXYXVRNKHECA><:8642/-+)'%" RSUXZ[ZWRNIFDA?=;97531/,*(&$!SUWZ[[YVQLHEB@><:86420.+)'%# VXZ[[ZWSOJGDA?=;97531/-+(&$" XZ[[YWSPLHEB@><:86420.,)'%# Y[[ZWSOLHEC@><:97531.,*(&$" XZYWSOKHECA?=;97531/-+)'%# VWVSPLHECA?=;:86420.,*(&$"RQOLHECA?=<:86431/-+)'%#  NLJHECA?=<:87531/-,*(&#!  KIHGECA?=<:875320.,*(&$"!HFEDB@?=<:875420.-+)'%" "EDBA@>=;:875420/-+)'%#  "CA@?><;:875420/-+)(&#!#A?>=<:9865320/-+*(&$!$>=<;:9764320/-+*(&$!%<;:98754310.-+*(&$"&:98765321/.-+)(&$" &87654310/-,+)'&$! '654320/.-+*)'%#!)43210.-,*)(&%# *210.-,+)(&%#! +/.-,+)(&%#! ,-,+*(&%#! .*)(&%#! /%$#"  14 7@@Shade!? "     %$#-A!) 2.$  #  #   " " !$&'&$" # "'+.01210/-,++*)$  &,158;<=<<;:98$ ")06;?BEGGHIHG% "*29?DHLNPRSTUVWWXW&!*2:AGLPTWZ]_acdeeffee& '08@GMRX\`dgjmopqr' #+4>;6/'+ '09?CDC@;3** "-7?FIKIE?6,+ (3>GMQRPKC:/* $/;FOUXYVPG<0*  +7CNW]``[TJ>0 ) '3?LW`egf`XL?-( #.;HU_hmnkeZM>&' *6CQ]gosspg[L<' %1>LYenuxxri[J8& !-:GTaluz}{thYG/% )5BP]isz|tgVC% &2>KYepy|rdQ< $ $/;HUbmw~zo_L.! #-8ER^ju}vjYE #,7CO\hr{|qcR6 $-7BNZfpzwk[I  '/9CNYdoy}qbR8 $+3FOX`irzvgVA! "&*06=EMU]fnu|ym]K"!*+-048>ELT\cksz|pbR3"89;>BGMT[cjqx~~reV@ #HJMRW]cjqw~tfXF$WXZ]afkqx~tgXH$efhkosy~ugYH$%rsuw{ugYI%&}~tgXH%'酆}reWF ({obT@)쌍vk_P6+~wndYH%,}xrkcYM3-|}}|{zvrmf_VK4/noonljfaZRE.1\[YVQG5 3=<;5,!6@@ Gradient!? "     %$#3Ks2\|121\1|1 1 1 1 1 1 1 1 1 1 1 1 -X -X - -----)X)X))))))%d%d%% ! 6c !6 !c!!!!!bb 8g8g   9g9g(8CLSX[]_``_1B[eikllm1([hklm18ekl m1Cil m1Jk m1Pk m1Sl m1Vl m1X m1Z m1[ m1\ m1] m1^ m1^ m-&>Ke m-&Ygkl m->glm-Kkm-Slm-Xlm-[m-\m)&>Kem)&Ygklm)>glm)Kkm)Slm)Xlm)[m)\m% .GUim%.drutpnnm%Grvwvsponm%Uuwusqpoonn m!/Bfvwvtsqppon m!Mjuyxxwvtsrqpoonn m!/jy||zyxwvutrqqponm!Bu|}}|zyxwvutsrqqponm!Nz}~~}{{zzyyxwvutsrrqqponnmm!X|~}||{zyxwwvuttssrqponnm!`~~}|{{zyyxwwvvuutrqonn!f~}|{zyxwvtrqpo 0L\w~}|{zyxvtsqp0m~~}|{zxwusrL~~}|{zywvt\~}|{yxw3Gp~}|{zySr~~}}|z3r~~}|G~~}U~_ ho 򈇇9N}[} 9}𐏎N]헖g 11 1  1 1 1 1 1 1 1 1 1 1 1 1 .  - - -----* )) )))))& % %%  #  "  ! ! !  ! !  !                        !) 134567<)9 ;?;/ȁ:]Ӹ:::M99 8a8 8@77/66*55144>3 2R21o110 /T/.|-D- ,u +@ + *o )< )(n'='&m%;%$g$5#"W"#!q : PĿrD5ШD5r5ܐ555555555ҐrD1ШD1r1 ܐ1 1 1 1 1 ћP- ֵP- -ߛ-----է_)_)܎))ȐrD%ШD%r%ܐ%%%%%ԧ_!_!܎!!ȐrDШDrܐӢXٽXهբXٽX^\ZWRLB35mlkibN5mlkb35mliB5mkL5mlR5mlU5mX5mZ5m[5m\5m]5mcB31mlibN1 mlkb31 mliB1 mkL1 mlR1 mlV1 mY1 mcH9!- mljfU!- mlkf9-mljH-mlP-mlU-mY-m[-meNA))mlkh[))mlhA)mkN)ml^B3%mkibN%mlkb3%mliB%mkL%mlR%mlV%mZ%mdNA)!mlkh[)!mlhA!nmkN!onml^B3qpoonnmkibNsrqponnmlkb3utrqponnmliBwvtrqponnmkLywvtrqponnmlRzywvtrqponmlV|zywvtrqonnmZ}|zywvtrponmdK>&~}|zywusqonmlkgY&~}|zywtrponmlg>~}|zxvsqpnnmkK~}{ywusqonnmlS~}|{ywtrqonnmlX~}|zxvtrponm[񂁀~}{zxvtqpnm\~}|{ywurpnnmeK>&~}|zxusponmlkgY& 65 5555555555 2 1  1 1 1 1 1 1  . - ------)))) &% %%%%%%!!!!                >>T==4=߅<%<x;#;{:-:ۋ9C88c7%7ׇ6J5ڭ5Ӏ4H3ڪ3z2ڿK1ҩ"1̈ 0[/״0/ϕ.m- չC, Х , ʂ + پV* ϩ.* Ì) Һg(̯>'ǚ'׿t&ϰH%Ŝ!%վ{ $жL#ʠ!#ؽt"˩=!ջ!ȬZ Խ%  !""$$%%%&&&&&&&&%%%$$##"!  ZZ  bbn"n!!!l!!l % % %d %d)|)\)2 )2\|ovퟞ{󙚚좡ۚܜܝܞ챯ܠܡۡܢݣĿݣݣܢĿݢܡݡݠ챯ޞݜޛݙ좡ퟞ}z헖ws𐏎oh]򈇇K-n -K]}~q~}n ~~}|k ~}}|ze ~}|{zy\~}|{yxwL}~}|{zywvt/l}~}|{zxwusr /L\u~}|{zyxvtsqp_~}|{zyxwvtrqpoQ|~}|{zzyxxwvvuutrqonn6o|~}|{{zyxxwvuttssrqponnm 6Q_s~}||{zyyxwvutsrqponnmm!\|~}|{zzyxwvutsrqponm!Oy}~~}{zyxxwvutsrqponm!4ly|}{yxxwwvutsrqponnm! 4O\nwvutrqponn m%Uuwvutsqponn m%Grvwwvutrqponn m%.druvusqponn m% .GUbmnnm)8eklm)([hklm)B[eikll m)(8CKQUX[\^__``a89:;<<================<<;:98765431"                               ! !  ! "  %  % %  & ) ))* YQ@ v(W "A^s~~rdS=%qK% wM g4 y= ~: n!$!K" m##0$@%I &L 'L (@)/*k, J-c/(b1$X3~}{yvtqonmkK~}{ywtrpnnmlS~}|zwurqonnmlW~|zxvsqponmZ텄~}{yvtrqonnm\톅~}{ywusqponm^톅}|zxvtrponm^퇅~|zywtrqonm_퇆~|{ywusqonm`퇆~}{zxvsqonm`툆~}|zxvtrpnm`툆~}|zxvtrpnma숆~}|zyvtrpnnma숆~}|zyvtrpnnma툆~}|zxvtrpnma툆~}|zxvtrpnma퇆~}{zxvsqonma퇆~|{ywusqonma퇅~|zywtrqonma톅}|zxvtrponma톅~}{ywusqponma텄~}{yvtrqonnm`~|zxvsqponm`~}|zwurqonnm`~}{ywtrpnnm_~}{yvtqonm_򂁀~}|{xvsqonm^~}|zxusponm]~}|{ywurpnnm\񂁀~}{zxvtqpnm[~}|zxvtrponmY~}|{ywtrqonnmlU~}{ywusqonnmlP~}|zxvsqpnnmljH~}|zywtrponmlkf9~}|zywusqonmljfU!}|zywvtrponmdH9!|zywvtrqonnm\zywvtrqponm[ywvtrqponnmlXwvtrqponnmlSutrqponnmkKsrqponnmlg>qpoonnmlkgY&onmlaK>&nmkOmliCmlki],mlbOC,mkO!mliC!mlki],!mlbOC,!mkN%mlhA%mlkh[)%mlj\NA)%mlke8)mlkh[() mlkie[B)a`_^\[XUQKC8(                                            !!!!%%%% ))) ˲n0βsٿ0ˬoԹ,ũf϶§Jʹzʩ;ҲYٹq޾~ݾ~ںrյdЯRɨ=%иǭqվKͳ%Ũw ׻Mϱ ǥgؼ4ΰy =˲~ Ӽ:Īn ͳ$!ҼK!m "ì#í0#í@$ ĭI% ­L& L'μ@(˸/)ųl*ƹJ ,Ⱦc-ƺb(/ĹY%1i<3{o\D'6@@Fill!? "     %$#<` ϐE 33   9g!(++(! 9(/440)" $''# g  +4884/+.5=BB=3'   +488524>LX__XK:' (04423=NapyyqbM7" #*.4CZpu`I4"   %()*3G`yr]I7'   %))*3G`zr`M:' #*.4CZqvcM7# (05545>Ocvv`I4#    ,49:87:CQbsr]I7(  ,4:<;97:AN_sr`N<,#   (17:;;978@NbwubM;/+,,(! !*16:;;978ARewr[F94540)  !(06;=<97:CRbs|dN@;;:6/%    )18<=;97:AN_s}gRD>><92+# d !*28;978@NbvwdRF@?>;73.)$  d "*16:;;978AQcr{}wl^QIEDDCCA?<83.("  !)06;=<97:CP[cec]VPNMOQTVSOJC<4,$  )18<=;97:?EJMNOPRW\afknppmic[RH=2)!!+38;<;976569>EMWblu}|sh\OB6+"$,38;<<940-/6BO_n|}oaRE9. (/6;>><72.08EVgysdVH< (/6;>?=9537AO_qy$-39<==;879AM[k{*39==<:769@LZixĿ $09?A?;635Pf *7AGGC<78BTj *7AGGC=9;EVk *7AGHD?;=GWj *7AGHE@<>GUgz *7AGIE@<=ERar )7AGHE@;FQ\hv '4>DEC?:8:@GPZfs $09@BA>;99;@EMWds*3:=?>=;:9;>DLXeu"+27<>?><:9:>FOZgv !)07;99=BIQZgx  )29=??=;;=@DIOZj!+39<>=>>@BFO] "+27;>@@?>==?FR  !)07<@A@=;:;@I   )29>@?=;;Pt !+39<>>=Q "+17;>?u  !)07LX__XK:' (04423=NapyyqbM7" #*.4CZpu`I4"   %()*3G`yr]I7'   %))*3G`zr`M:' #*.4CZqvcM7# (05545>Ocvv`I4#    ,49:87:CQbsr]I7(  ,4:<;97:AN_sr`N<,#   (17:;;978@NbwubM;/+,,(! !*16:;;978ARewr[F94540)  !(06;=<97:CRbs|dN@;;:5.$    )18<=;97:AN_s}gRD>=<70( d !*28;978@NbvwdRF@><83-(# d "*16:;;978AQcr{}wl]PGBA?><963/+'"  !)06;=<97:CP[ceb\UOJIIJKLLKHD?93,&   )18<=;97:?EJMMNQTW[_bcb_ZTME<3+$!+38;<;976569=BIQYahotxzyvqjaWMB8.&$,38;<<94/,-3=IUbnx}ti]QE:0( (/6;>><71,,3>L[jxznaTH=3 (/6;>?=83029EScr}qh~$-39<==:755:DP]ky*39==<9656;DP]jv $09?A?:5228BP^lx '3=CD@:3/2K[l~ *7AGHD=86>;963248@JVeu"+27;=><952149AKWfx !)07;86568=;8535;F  !)07   )18=?>;87Lq !*38<==;P "*17;=>t  !)07LX__XK:' (04423=NapyyqbM7" #*.4CZpu`I4"   %()*3G`yr]I7'   %))*3G`zr`M:' #*.4CZqvcM7# (05545>Ocvv`I4#    ,49:87:CQbsr]I7(  ,4:<;97:AN_sr`N<,#  (17:;;978@NbwubM;/+,,(! !*16:;;978ARewr[F84540( !(06;=<97:CRbs|dN@:;94,!    )18<=;97:AN_s}gRD><:5,! c !*28;978@NbvwdRE>;82*  c "*16:;;978AQcr{}wk]ND=83-&   !)06;=<97:CP[beb[RIA:4/*%    )18<=;97:?DILLJGC>82.*(&$! !+38;<;97579;<<9630//.-*'" $,38;<<94.)'*.254556753/*%   (/6:=>;6.&!!%*.1468;<=<:62-'!  (/6;>>;6.% $).27:=@AA?<84.)#*f$-39;=<83+$#(-26:>ACA>:50*i*39==;83-'" #'+/269=@CDEDB?;61 $09?A?:3,&"!"&*.13569@BDEFECA= (6?EE@8-#$,4;@BB@>=<=>@BDEFEDB )6@FFA7,!'1:BGIIGDA?==>@BCEFFE *7AFFA7,! )3=FLOOMJFC@>=>?ACEGG *7AFFA7,!!*4>GMQRQOLHDA>=>?Iz *7AFFA8," )2>x *7AFFA8,!&/7?FMRUWVTPKFB?> *7AFFA8,!"*19@HNTWYWTPLGC@ *7AFFA8,!$*19AIPVYYXUS^y )7@FFA8,!$*1:CKQVYZYe (6?EFA8-"#*2;CKQVZ\ '4=CD@9/%#*2;CKSY] $09?A?:3+$"*2;ENV\*39<=;72,$"*4>ISZ"*17:<;83,##-8DNV !)06;=<82*"'2=HQ  )18<=;71*#!5o!*28;;:72,$i "*16:;;83,#  !)06;=<82*"   )18<=;71-Ck !*28;;:7K "*16:;;s  !)06;=   )183 2R21o110 /T/.|-D- ,u +@ + *o )< )(n'='&m%;%$g$5#"W"#!q : PĶL5L55555555555ꡀL1L11 1 1 1 1 1 魎Z- Z- ------k )k)))ߡL%L%%%%%%%캞k !k!!!ߡLL뵗c c!"####$c$cĶL5L55555555555ꡀL1L11 1 1 1 1 1 魎Z- Z- ------k )k)))ߡL%L%%%%%%%캞k !k!!!ߡLL뵗c c!"####$c$cĶL5L55555555555ꡀL1L11 1 1 1 1 1 魎Z- Z- ------k )k)))ߡL%L%%%%%%%캞k !k!!!ߡLL뵗c c!"####$c$c>>T==4=߅<%<x;#;{:-:ۋ9C88c7%7ׇ6J5ڭ5Ӏ4H3ڪ3z2ڿK1ҩ"1̈ 0[/״0/ϕ.m- չC, Х , ʂ + پV* ϩ.* Ì) Һg(̯>'ǚ'׿t&ϰH%Ŝ!%վ{ $жL#ʠ!#ؽt"˩=!ջ!ȬZ Խ% &''''((((((((((((((((((((((((''''&&%Z$Z$####"!c cq#q!!!q!#q%%%k% k))g)9 ) 9g&''''((((((((((((((((((((((((''''&&%Z$Z$####"!c cq#q!!!q!#q%%%k% k))g)9 ) 9g&''''((((((((((((((((((((((((''''&&%Z$Z$####"!c cq#q!!!q!#q%%%k% k))g)9 ) 9gYQ@ v(W "A^s~~rdS=%qK% wM g4 y= ~: n!$!K" m##0$@%I &L 'L (@)/*k, J-c/(b1$X3[|#  5Qp"-Fe! &=Zz!  5Po -Fd &' $ɯqQ6" #§gI0 #Ѻ~^A)"˲tU9$ !ĪkL2 !ӽaD, ͵xX<& ƬnO4   ԾdF. ζzZ>'  ǭpQ7"  ԿfI0  θ}]A)  ȰsT9#  iK1  к_B*ʱtU9# ¨iK1Ѻ~^@) ɰrR6! eF-ζxX;$  '@]~4Pp )Ba5Qs (Aa2Op %=] .Ij!8Vx (Bc1Mo!9X{ 'Ac -Il2Qu6W| :["<^#=_#=`"<^!:\7X~4Ty 0Os ,Il 'Bd";[~4Rt ,Hi &?^5Su -Hh %=\}2Op )Bb  6St +Ed !7Ss  +Ca   4Nm  '=Yw .Fb !5Mi &:So*?Wr -BZt /C[t  0D[s!  /CYq! .@Vl" ,=Qf|# (8K_s$ $2CUgy% +9IYiy& #/EKPT+ $)-14- . /1ĪjK0й}\?' ƭnN3Ҽ_A( ȯpO4ӽ_@( ȯoN2Ҽ~]>& ǬkK/иzX:" èeD* ̳rO2Խ~Z:"ƪdB' ͲlI, ӹsO0 ׾yS3¢|V6ã~X7ä~X7¢}W6zU4ռvQ2 ѷqM/ ̱kH+ ƫdB' \<#иwT5ɯmK/ bB( йzW9!ɯnL0aB( ζwU7!ūiI. к}[=% ƭmM1Ϲ~]?' êlM2ʴzZ>& мfI0«qS8#  ưz\A* ȴdH0  ɶiN6" ɷmR:& ɷoU=)ǵoV?+ ijnV?, lT?, ɺhQ=+ xbM9) o[G5& ƼvcQ?/" ǿvfVF6)  ¾qcUG9-! "碤uj]PD8-# #}|ytmf]SH>4*! $WXYXVSOJC<5-% %6787630,(# & ( )+,@@ Background!?2 "     %$#"###I#Y#i#y@@qsynth-1.0.3/src/images/PaxHeaders/down1.png0000644000000000000000000000013214771226115015717 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/down1.png0000644000175000001440000000030614771226115015706 0ustar00rncbcusersPNG  IHDRasRGBIDAT8 DƎׄeeHMNMx^ r:O\kMc"K0zvPESwA0zUID`>4Mf=gnjHw?x.:cIENDB`qsynth-1.0.3/src/images/PaxHeaders/formOpen.png0000644000000000000000000000013214771226115016454 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/formOpen.png0000644000175000001440000000105214771226115016442 0ustar00rncbcusersPNG  IHDRasBIT|d pHYsu85tEXtSoftwarewww.inkscape.org<IDAT8?AGW# M!8V%} I!)m *hw,bac"ץHHsn&wy/!3B]Pǀ π@~_0 qsynth-1.0.3/src/images/PaxHeaders/add1.png0000644000000000000000000000013214771226115015500 xustar0030 mtime=1743072333.097076256 30 atime=1743072333.097076256 30 ctime=1743072333.097076256 qsynth-1.0.3/src/images/add1.png0000644000175000001440000000027514771226115015474 0ustar00rncbcusersPNG  IHDRasRGBwIDAT8c`hS 8,C:vLx?I7D0@3`& p!¤b/`86'q¤,,@@#FG# THaB+ 0UIENDB`qsynth-1.0.3/src/images/PaxHeaders/qtlogo1.png0000644000000000000000000000012714771226115016261 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/qtlogo1.png0000644000175000001440000000563414771226115016255 0ustar00rncbcusersPNG  IHDR szzzTXtRaw profile type exifx՗[(߽Y `9\#fdg]DWUytdp _$_?>׿jRrK>>5>b'~?0s_y]L?y_&}^z "Z=S?z~vs! Գ6 7$c*vfanj-({+ w+aSg6ld奫,[uwPy.vm׎|cv;j/TtB-H}W|{>APcɑsBKBAcbW,@wLz;v}\[rCKז? Ԗ;{T9 מj'9DcMN\B*!N<}Jzz՘5)x>>#\lG\Yl~V~W~C6Ȼw O(b/-+9lK~>S(έ fliT)~2$¨v7J^8N4CetCI'k"$['uW)cWIYV7(} إ#m6ߪldjw*dWwQheEe`L4++.܍Ig/FwƞgrtRQ [Y CgndVu],OhGGI;·9GNaX:s"5zY;U=Έ7#ű¾9H4=X;yd W/\Jc"Nɠډ]}COHOhZXVs/!=vyB1qǮG`ќ@t29:J+nV: Ch`lB8ݱ"0IQSIG-M(",uzJyzUz|>+s^ I?|NHۚ?ȚJ>}np.RuiuDKs6N;;e nF;V7$ƛT˽01 LeY(z*i;uP-5۩N&膊6^]^ĦThQ5-QYL>V \xMDC~,boM.ד ! -#P[,]gS-h$³Є fxݏ']PpwjvFl`CxY ԗef&(*"=H` 최Y=MqBNN牢%ӧ**J)$RH"W#=SҎ.%XWh9§-CPHZ)edeo2Xv:X*cֲY(EF.ub/ #rl+WK1\C>p=v3IF"0m󱿲f:ܪ6=>E2n"(YƆtSgxM>H_ϯ&8P]4}H 8aڹVϩr _dV/MT{blb6K6b~ufwnU#|¾N7g7?mv:WD!QvҝX䷁-H `;3Nz= BRtxpIENDB`qsynth-1.0.3/src/images/PaxHeaders/remove1.png0000644000000000000000000000012714771226115016251 xustar0029 mtime=1743072333.10207623 29 atime=1743072333.10207623 29 ctime=1743072333.10207623 qsynth-1.0.3/src/images/remove1.png0000644000175000001440000000030514771226115016233 0ustar00rncbcusersPNG  IHDRasRGBIDAT8˵S \jhA,`$P! B-LH0azOLD 9\JVx] N ,@dS8]x ijػ[i xY>Rh #IENDB`qsynth-1.0.3/src/PaxHeaders/qsynthDialClassicStyle.h0000644000000000000000000000013214771226115017530 xustar0030 mtime=1743072333.108076199 30 atime=1743072333.107076204 30 ctime=1743072333.108076199 qsynth-1.0.3/src/qsynthDialClassicStyle.h0000644000175000001440000000343114771226115017521 0ustar00rncbcusers/****************************************************************************** Based on an original design by Thorsten Wilms. Implemented as a widget for the Rosegarden MIDI and audio sequencer and notation editor by Chris Cannam. Extracted into a standalone Qt3 widget by Pedro Lopez-Cabanillas and adapted for use in QSynth. Ported to Qt4 by Chris Cannam. Adapted as a QStyle by Pedro Lopez-Cabanillas. This file, copyright 2019 rncbc aka Rui Nuno Capela, copyright 2003-2006 Chris Cannam, copyright 2005,2008 Pedro Lopez-Cabanillas, copyright 2006 Queen Mary, University of London. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef CLASSICTYLE_H_ #define CLASSICTYLE_H_ #include class qsynthDialClassicStyle : public QCommonStyle { public: qsynthDialClassicStyle() {}; virtual ~qsynthDialClassicStyle() {}; virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = 0) const; }; #endif /*CLASSICTYLE_H_*/ qsynth-1.0.3/src/PaxHeaders/qsynthDialVokiStyle.cpp0000644000000000000000000000013214771226115017412 xustar0030 mtime=1743072333.109076194 30 atime=1743072333.109076194 30 ctime=1743072333.109076194 qsynth-1.0.3/src/qsynthDialVokiStyle.cpp0000644000175000001440000001516714771226115017414 0ustar00rncbcusers/****************************************************************************** This style is based on a design by Thorsten Wilms, implemented as a widget by Chris Cannam in Rosegarden, adapted for QSynth by Pedro Lopez-Cabanillas, improved for Qt4 by David Garcia Garzon, adapted as a QStyle by Pedro Lopez-Cabanillas, updated for Qt5 by rncbc aka Rui Nuno Capela. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthDialVokiStyle.h" #include #include #include #include #define DIAL_MIN (0.25 * M_PI) #define DIAL_MAX (1.75 * M_PI) #define DIAL_RANGE (DIAL_MAX - DIAL_MIN) void qsynthDialVokiStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const { if (cc != QStyle::CC_Dial) { QCommonStyle::drawComplexControl(cc, opt, p, widget); return; } const QStyleOptionSlider *dial = qstyleoption_cast(opt); if (dial == nullptr) return; double angle = DIAL_MIN // offset + (DIAL_RANGE * (double(dial->sliderValue - dial->minimum) / (double(dial->maximum - dial->minimum)))); int degrees = int(angle * 180.0 / M_PI); int side = dial->rect.width() < dial->rect.height() ? dial->rect.width() : dial->rect.height(); int xcenter = dial->rect.width() / 2; int ycenter = dial->rect.height() / 2; int notchWidth = 1 + side / 400; int pointerWidth = 2 + side / 30; int scaleShadowWidth = 1 + side / 100; int knobBorderWidth = 0; int ns = dial->tickInterval; int numTicks = 1 + (dial->maximum + ns - dial->minimum) / ns; int indent = int(0.15 * side) + 2; int knobWidth = side - 2 * indent; int shineFocus = knobWidth / 4; int shineCenter = knobWidth / 5; int shineExtension = shineCenter * 4; int shadowShift = shineCenter * 2; int meterWidth = side - 2 * scaleShadowWidth; QPalette pal = opt->palette; QColor knobColor = pal.mid().color(); QColor borderColor = knobColor.lighter(); QColor meterColor = (dial->state & State_Enabled) ? pal.highlight().color() : pal.mid().color(); QColor background = pal.window().color(); p->save(); p->setRenderHint(QPainter::Antialiasing, true); // The bright metering bit... QConicalGradient meterShadow(xcenter, ycenter, -90); meterShadow.setColorAt(0, meterColor.darker()); meterShadow.setColorAt(0.5, meterColor); meterShadow.setColorAt(1.0, meterColor.lighter().lighter()); p->setBrush(meterShadow); p->setPen(Qt::transparent); p->drawPie(xcenter - meterWidth / 2, ycenter - meterWidth / 2, meterWidth, meterWidth, (180 + 45) * 16, -(degrees - 45) * 16); // Knob projected shadow QRadialGradient projectionGradient( xcenter + shineCenter, ycenter + shineCenter, shineExtension, xcenter + shadowShift, ycenter + shadowShift); projectionGradient.setColorAt(0, QColor( 0, 0, 0, 100)); projectionGradient.setColorAt(1, QColor(200, 0, 0, 10)); QBrush shadowBrush(projectionGradient); p->setBrush(shadowBrush); p->drawEllipse(xcenter - shadowShift, ycenter - shadowShift, knobWidth, knobWidth); // Knob body and face... QPen pen; pen.setColor(knobColor); pen.setWidth(knobBorderWidth); p->setPen(pen); QRadialGradient gradient( xcenter - shineCenter, ycenter - shineCenter, shineExtension, xcenter - shineFocus, ycenter - shineFocus); gradient.setColorAt(0.2, knobColor.lighter().lighter()); gradient.setColorAt(0.5, knobColor); gradient.setColorAt(1.0, knobColor.darker(150)); QBrush knobBrush(gradient); p->setBrush(knobBrush); p->drawEllipse(xcenter - knobWidth / 2, ycenter - knobWidth / 2, knobWidth, knobWidth); // Tick notches... p->setBrush(Qt::NoBrush); if (dial->subControls & QStyle::SC_DialTickmarks) { pen.setColor(pal.dark().color()); pen.setWidth(notchWidth); p->setPen(pen); double hyp = double(side - scaleShadowWidth) / 2.0; double len = hyp / 4; for (int i = 0; i < numTicks; ++i) { int div = numTicks; if (div > 1) --div; bool internal = (i != 0 && i != numTicks - 1); double angle = DIAL_MIN + (DIAL_MAX - DIAL_MIN) * i / div; double dir = (internal ? -1 : len); double sinAngle = sin(angle); double cosAngle = cos(angle); double x0 = xcenter - (hyp - len) * sinAngle; double y0 = ycenter + (hyp - len) * cosAngle; double x1 = xcenter - (hyp + dir) * sinAngle; double y1 = ycenter + (hyp + dir) * cosAngle; p->drawLine(QLineF(x0, y0, x1, y1)); } } // Shadowing... // Knob shadow... if (knobBorderWidth > 0) { QLinearGradient inShadow(xcenter - side / 4, ycenter - side / 4, xcenter + side / 4, ycenter + side / 4); inShadow.setColorAt(0.0, borderColor.lighter()); inShadow.setColorAt(1.0, borderColor.darker()); p->setPen(QPen(QBrush(inShadow), knobBorderWidth * 7 / 8)); p->drawEllipse(xcenter - side / 2 + indent, ycenter - side / 2 + indent, side - 2 * indent, side - 2 * indent); } // Scale shadow... QLinearGradient outShadow(xcenter - side / 3, ycenter - side / 3, xcenter + side / 3, ycenter + side / 3); outShadow.setColorAt(0.0, background.darker().darker()); outShadow.setColorAt(1.0, background.lighter().lighter()); p->setPen(QPen(QBrush(outShadow), scaleShadowWidth)); p->drawArc(xcenter - side / 2 + scaleShadowWidth / 2, ycenter - side / 2 + scaleShadowWidth / 2, side - scaleShadowWidth, side - scaleShadowWidth, -45 * 16, 270 * 16); // Pointer notch... double hyp = double(side) / 2.0; double len = hyp - indent - 1; double x = xcenter - len * sin(angle); double y = ycenter + len * cos(angle); QColor pointerColor = pal.dark().color(); pen.setColor((dial->state & State_Enabled) ? pointerColor.darker(140) : pointerColor); pen.setWidth(pointerWidth + 2); p->setPen(pen); p->drawLine(QLineF(xcenter, ycenter, x, y)); pen.setColor((dial->state & State_Enabled) ? pointerColor.lighter() : pointerColor.lighter(140)); pen.setWidth(pointerWidth); p->setPen(pen); p->drawLine(QLineF(xcenter - 1, ycenter - 1, x - 1, y - 1)); // done p->restore(); } qsynth-1.0.3/src/PaxHeaders/qsynthMainForm.cpp0000644000000000000000000000013214771226115016377 xustar0030 mtime=1743072333.111076183 30 atime=1743072333.110076189 30 ctime=1743072333.111076183 qsynth-1.0.3/src/qsynthMainForm.cpp0000644000175000001440000024176414771226115016405 0ustar00rncbcusers// qsynthMainForm.cpp // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthMainForm.h" #include "qsynthEngine.h" #include "qsynthTabBar.h" #ifdef CONFIG_SYSTEM_TRAY #include "qsynthSystemTray.h" #endif #include "qsynthAboutForm.h" #include "qsynthSetupForm.h" #include "qsynthOptionsForm.h" #include "qsynthMessagesForm.h" #include "qsynthChannelsForm.h" #include "qsynthDialClassicStyle.h" #include "qsynthDialVokiStyle.h" #include "qsynthDialPeppinoStyle.h" #include "qsynthDialSkulptureStyle.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #endif #if QT_VERSION < QT_VERSION_CHECK(4, 5, 0) namespace Qt { const WindowFlags WindowCloseButtonHint = WindowFlags(0x08000000); } #endif // Timer constant stuff. #define QSYNTH_TIMER_MSECS 100 #define QSYNTH_DELAY_MSECS 300 // Scale factors. #define QSYNTH_MASTER_GAIN_SCALE 100.0f #define QSYNTH_REVERB_ROOM_SCALE 100.0f #define QSYNTH_REVERB_DAMP_SCALE 100.0f #define QSYNTH_REVERB_WIDTH_SCALE 100.0f #define QSYNTH_REVERB_LEVEL_SCALE 100.0f #define QSYNTH_CHORUS_NR_SCALE 1.0f #define QSYNTH_CHORUS_LEVEL_SCALE 100.0f #define QSYNTH_CHORUS_SPEED_SCALE 100.0f #define QSYNTH_CHORUS_DEPTH_SCALE 10.0f #if defined(Q_OS_WINDOWS) #undef HAVE_SIGNAL_H #else #include #include // Notification pipe descriptors #define QSYNTH_FDNIL -1 #define QSYNTH_FDREAD 0 #define QSYNTH_FDWRITE 1 static int g_fdStdout[2] = { QSYNTH_FDNIL, QSYNTH_FDNIL }; #endif //------------------------------------------------------------------------- // Fix deprecated Reverb/Chorus API (FluidSynth >= 2.2.0). // #if (FLUIDSYNTH_VERSION_MAJOR >= 2 && FLUIDSYNTH_VERSION_MINOR >= 2) || (FLUIDSYNTH_VERSION_MAJOR > 2) static void qsynth_set_reverb_on(fluid_synth_t *synth, int on) { ::fluid_synth_reverb_on(synth, 0, on); } static void qsynth_set_reverb ( fluid_synth_t *synth, double roomsize, double damp, double width, double level ) { ::fluid_synth_set_reverb_group_roomsize(synth, 0, roomsize); ::fluid_synth_set_reverb_group_damp(synth, 0, damp); ::fluid_synth_set_reverb_group_width(synth, 0, width); ::fluid_synth_set_reverb_group_level(synth, 0, level); } static void qsynth_get_reverb ( fluid_synth_t *synth, double *roomsize, double *damp, double *width, double *level ) { ::fluid_synth_get_reverb_group_roomsize(synth, 0, roomsize); ::fluid_synth_get_reverb_group_damp(synth, 0, damp); ::fluid_synth_get_reverb_group_width(synth, 0, width); ::fluid_synth_get_reverb_group_level(synth, 0, level); } static void qsynth_set_chorus_on(fluid_synth_t *synth, int on) { ::fluid_synth_chorus_on(synth, 0, on); } static void qsynth_set_chorus ( fluid_synth_t *synth, int nr, double level, double speed, double depth, int type ) { ::fluid_synth_set_chorus_group_nr(synth, 0, nr); ::fluid_synth_set_chorus_group_level(synth, 0, level); ::fluid_synth_set_chorus_group_speed(synth, 0, speed); ::fluid_synth_set_chorus_group_depth(synth, 0, depth); ::fluid_synth_set_chorus_group_type(synth, 0, type); } static void qsynth_get_chorus ( fluid_synth_t *synth, int *nr, double *level, double *speed, double *depth, int *type ) { ::fluid_synth_get_chorus_group_nr(synth, 0, nr); ::fluid_synth_get_chorus_group_level(synth, 0, level); ::fluid_synth_get_chorus_group_speed(synth, 0, speed); ::fluid_synth_get_chorus_group_depth(synth, 0, depth); ::fluid_synth_get_chorus_group_type(synth, 0, type); } #else static void qsynth_set_reverb_on(fluid_synth_t *synth, int on) { ::fluid_synth_set_reverb_on(synth, on); } static void qsynth_set_reverb ( fluid_synth_t *synth, double roomsize, double damp, double width, double level ) { ::fluid_synth_set_reverb_roomsize(synth, roomsize); ::fluid_synth_set_reverb_damp(synth, damp); ::fluid_synth_set_reverb_width(synth, width); ::fluid_synth_set_reverb_level(synth, level); } static void qsynth_get_reverb ( fluid_synth_t *synth, double *roomsize, double *damp, double *width, double *level ) { *roomsize = ::fluid_synth_get_reverb_roomsize(synth); *damp = ::fluid_synth_get_reverb_damp(synth); *width = ::fluid_synth_get_reverb_width(synth); *level = ::fluid_synth_get_reverb_level(synth); } static void qsynth_set_chorus_on(fluid_synth_t *synth, int on) { ::fluid_synth_set_chorus_on(synth, on); } static void qsynth_set_chorus ( fluid_synth_t *synth, int nr, double level, double speed, double depth, int type ) { ::fluid_synth_set_chorus_nr(synth, nr); ::fluid_synth_set_chorus_level(synth, level); ::fluid_synth_set_chorus_speed(synth, speed); ::fluid_synth_set_chorus_depth(synth, depth); ::fluid_synth_set_chorus_type(synth, type); } static void qsynth_get_chorus ( fluid_synth_t *synth, int *nr, double *level, double *speed, double *depth, int *type ) { *nr = ::fluid_synth_get_chorus_nr(synth); *level = ::fluid_synth_get_chorus_level(synth); #ifdef CONFIG_FLUID_SYNTH_GET_CHORUS_SPEED *speed = ::fluid_synth_get_chorus_speed(synth); #else *speed = ::fluid_synth_get_chorus_speed_Hz(synth); #endif #ifdef CONFIG_FLUID_SYNTH_GET_CHORUS_DEPTH *depth = ::fluid_synth_get_chorus_depth(synth); #else *depth = ::fluid_synth_get_chorus_depth_ms(synth); #endif *type = ::fluid_synth_get_chorus_type(synth); } #endif //------------------------------------------------------------------------- // UNIX Signal handling support stuff. #ifdef HAVE_SIGNAL_H #include #include #include // File descriptor for SIGTERM notifier. static int g_fdSigterm[2] = { QSYNTH_FDNIL, QSYNTH_FDNIL }; // Unix SIGTERM signal handler. static void qsynth_sigterm_handler ( int /* signo */ ) { char c = 1; (void) (::write(g_fdSigterm[0], &c, sizeof(c)) > 0); } #endif // HAVE_SIGNAL_H // Needed for lroundf() #ifdef CONFIG_ROUND #include #else static inline long lroundf ( float x ) { if (x >= 0.0f) return long(x + 0.5f); else return long(x - 0.5f); } #endif // The current selected engine. static qsynthEngine *g_pCurrentEngine = nullptr; #ifdef CONFIG_FLUID_SERVER #ifndef CONFIG_NEW_FLUID_SERVER // Hold last shell/server port in use. static int g_iLastShellPort = 0; // Needed for server mode. static fluid_cmd_handler_t *qsynth_newclient ( void *data, char * ) { qsynthEngine *pEngine = (qsynthEngine *) data; if (pEngine) return ::new_fluid_cmd_handler(pEngine->pSynth); else return nullptr; } #endif #endif //------------------------------------------------------------------------- // Audio driver processing stub. int qsynth_process ( void *pvData, int len, int nfx, float **fx, int nout, float **out ) { qsynthEngine *pEngine = (qsynthEngine *) pvData; #if FLUIDSYNTH_VERSION_MAJOR >= 2 nfx = nout; fx = out; #endif // Call the synthesizer process function to fill // the output buffers with its audio output. return ::fluid_synth_process(pEngine->pSynth, len, nfx, fx, nout, out); } int qsynth_process_meters ( void *pvData, int len, int nfx, float **fx, int nout, float **out ) { qsynthEngine *pEngine = (qsynthEngine *) pvData; #if FLUIDSYNTH_VERSION_MAJOR >= 2 nfx = nout; fx = out; #endif // Call the synthesizer process function to fill // the output buffers with its audio output. if (::fluid_synth_process(pEngine->pSynth, len, nfx, fx, nout, out) != 0) return -1; // Now find the peak level for this buffer run... if (pEngine == g_pCurrentEngine) { for (int i = 0; i < nout; ++i) { const float *out_i = out[i]; for (int j = 0; j < len; ++j) { const float fValue = out_i[j]; if (pEngine->fMeterValue[i & 1] < fValue) pEngine->fMeterValue[i & 1] = fValue; } } } // Surely a success :) return 0; } //------------------------------------------------------------------------- // Midi router stubs to have some midi activity feedback. #define QSYNTH_MIDI_NOTE_OFF 0x80 #define QSYNTH_MIDI_NOTE_ON 0x90 #define QSYNTH_MIDI_CONTROL_CHANGE 0xb0 #define QSYNTH_MIDI_PROGRAM_CHANGE 0xc0 #define QSYNTH_MIDI_CC_BANK_SELECT_MSB 0x00 #define QSYNTH_MIDI_CC_BANK_SELECT_LSB 0x20 #define QSYNTH_MIDI_CC_ALL_SOUND_OFF 0x78 struct qsynth_midi_channel { int iEvent; // Event occurrence accumulator. int iState; // Activity state tracker. int iChange; // Change activity accumulator. }; static int g_iMidiChannels = 0; static qsynth_midi_channel *g_pMidiChannels = nullptr; static void qsynth_midi_event ( qsynthEngine *pEngine, fluid_midi_event_t *pMidiEvent ) { pEngine->iMidiEvent++; if (g_pMidiChannels && pEngine == g_pCurrentEngine) { const int iChan = ::fluid_midi_event_get_channel(pMidiEvent); #ifdef CONFIG_DEBUG const int iType = ::fluid_midi_event_get_type(pMidiEvent); const int iKey = ::fluid_midi_event_get_control(pMidiEvent); const int iVal = ::fluid_midi_event_get_value(pMidiEvent); qDebug("Type=%03d (0x%02x) Chan=%02d Key=%03d (0x%02x) Val=%03d (0x%02x).", iType, iType, iChan, iKey, iKey, iVal, iVal); #endif if (iChan >= 0 && iChan < g_iMidiChannels) { switch (::fluid_midi_event_get_type(pMidiEvent)) { case QSYNTH_MIDI_CONTROL_CHANGE: { // Avoid bank selects or global control changes... const int iCC = ::fluid_midi_event_get_control(pMidiEvent); if (iCC == QSYNTH_MIDI_CC_BANK_SELECT_MSB || iCC == QSYNTH_MIDI_CC_BANK_SELECT_LSB || iCC >= QSYNTH_MIDI_CC_ALL_SOUND_OFF) break; } // Fall thru... case QSYNTH_MIDI_PROGRAM_CHANGE: g_pMidiChannels[iChan].iChange++; // Fall thru... case QSYNTH_MIDI_NOTE_ON: case QSYNTH_MIDI_NOTE_OFF: g_pMidiChannels[iChan].iEvent++; break; } } } } static int qsynth_dump_postrouter ( void *pvData, fluid_midi_event_t *pMidiEvent ) { qsynthEngine *pEngine = (qsynthEngine *) pvData; qsynth_midi_event(pEngine, pMidiEvent); return ::fluid_midi_dump_postrouter(pEngine->pSynth, pMidiEvent); } static int qsynth_handle_midi_event ( void *pvData, fluid_midi_event_t *pMidiEvent ) { qsynthEngine *pEngine = (qsynthEngine *) pvData; qsynth_midi_event(pEngine, pMidiEvent); return ::fluid_synth_handle_midi_event(pEngine->pSynth, pMidiEvent); } //------------------------------------------------------------------------- // Scaling & Clipping helpers. static int qsynth_set_range_value ( QDial *pDial, float fScale, float fValue ) { int iValue = int(::lroundf(fScale * fValue)); if (iValue < pDial->minimum()) iValue = pDial->minimum(); else if (iValue > pDial->maximum()) iValue = pDial->maximum(); pDial->setValue(iValue); return iValue; } static float qsynth_get_range_value ( QSpinBox *pSpinBox, float fScale ) { float fValue = float(pSpinBox->value()) / fScale; const float fMinimum = float(pSpinBox->minimum()) / fScale; const float fMaximum = float(pSpinBox->maximum()) / fScale; if (fValue < fMinimum) fValue = fMinimum; else if (fValue > fMaximum) fValue = fMaximum; return fValue; } #ifdef QSYNTH_CUSTOM_LOADER //------------------------------------------------------------------------- // (EXPERIMENTAL) Soundfont loader: feature to avoid loading // duplicate soundfonts for multiple engines. static struct qsynthEngineNode { qsynthEngine *pEngine; qsynthEngineNode *pPrev; qsynthEngineNode *pNext; } *g_pEngineList = nullptr; static int qsynth_sfont_free ( fluid_sfont_t *pSoundFont ) { #ifdef CONFIG_DEBUG qDebug("qsynth_sfont_free(%p)", pSoundFont); #endif if (pSoundFont) ::free(pSoundFont); return 0; } static int qsynth_sfloader_free ( fluid_sfloader_t * pLoader ) { #ifdef CONFIG_DEBUG qDebug("qsynth_sfloader_free(%p)", pLoader); #endif if (pLoader) ::free(pLoader); return 0; } static fluid_sfont_t *qsynth_sfloader_load ( fluid_sfloader_t *pLoader, const char *pszFilename ) { #ifdef CONFIG_DEBUG qDebug("qsynth_sfloader_load(%p, \"%s\")", pLoader, pszFilename); #endif if (pLoader == nullptr) return nullptr; // Look thru all the synths' sfonts for the requested one... qsynthEngineNode *pNode = g_pEngineList; while (pNode) { fluid_synth_t *pSynth = (pNode->pEngine)->pSynth; const int iSoundFonts = ::fluid_synth_sfcount(pSynth); for (int i = 0; i < iSoundFonts; ++i) { fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(pSynth, i); // Somehow get the name of this sfont... char *pszName = pSoundFont->get_name(pSoundFont); // Create a dup sfont node with our 'free' routine, // when we have a match if (::strcmp(pszName, pszFilename) == 0) { fluid_sfont_t *pNewSoundFont = (fluid_sfont_t *) ::malloc(sizeof(fluid_sfont_t)); ::memcpy(pNewSoundFont, pSoundFont, sizeof(fluid_sfont_t)); pNewSoundFont->free = qsynth_sfont_free; return pNewSoundFont; } } pNode = pNode->pNext; } // fluidsynth will call next (or default) loader... return nullptr; } #endif // QSYNTH_CUSTOM_LOADER //---------------------------------------------------------------------------- // qsynthMainForm -- UI wrapper form. // Kind of singleton reference. qsynthMainForm *qsynthMainForm::g_pMainForm = nullptr; // Constructor. qsynthMainForm::qsynthMainForm ( QWidget *pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags), m_menu(this) { // Setup UI struct... m_ui.setupUi(this); #if QT_VERSION < QT_VERSION_CHECK(6, 1, 0) QWidget::setWindowIcon(QIcon(":/images/qsynth.png")); #endif // Pseudo-singleton reference setup. g_pMainForm = this; m_pOptions = nullptr; m_iTimerDelay = 0; m_iCurrentTab = -1; m_pStdoutNotifier = nullptr; m_iGainChanged = 0; m_iReverbChanged = 0; m_iChorusChanged = 0; m_iGainUpdated = 0; m_iReverbUpdated = 0; m_iChorusUpdated = 0; // All forms are to be created later on setup. m_pMessagesForm = nullptr; m_pChannelsForm = nullptr; #ifdef CONFIG_SYSTEM_TRAY // The eventual system tray widget. m_pSystemTray = nullptr; m_iSystemTrayState = 0; m_bQuitClose = false; #endif // We're not quitting so early :) m_bQuitForce = false; // Whether we've Qt::Tool flag (from bKeepOnTop), // this is actually the main last application window... QWidget::setAttribute(Qt::WA_QuitOnClose); #ifdef HAVE_SIGNAL_H // Set to ignore any fatal "Broken pipe" signals. ::signal(SIGPIPE, SIG_IGN); // Initialize file descriptors for SIGTERM socket notifier. ::socketpair(AF_UNIX, SOCK_STREAM, 0, g_fdSigterm); m_pSigtermNotifier = new QSocketNotifier(g_fdSigterm[1], QSocketNotifier::Read, this); QObject::connect(m_pSigtermNotifier, SIGNAL(activated(int)), SLOT(sigtermNotifySlot(int))); // Install SIGTERM signal handler. struct sigaction sigterm; sigterm.sa_handler = qsynth_sigterm_handler; sigemptyset(&sigterm.sa_mask); sigterm.sa_flags = 0; sigterm.sa_flags |= SA_RESTART; ::sigaction(SIGTERM, &sigterm, nullptr); ::sigaction(SIGQUIT, &sigterm, nullptr); // Ignore SIGHUP/SIGINT signals. ::signal(SIGHUP, SIG_IGN); ::signal(SIGINT, SIG_IGN); // Also ignore SIGUSR1 (LADISH Level 1). ::signal(SIGUSR1, SIG_IGN); #else // HAVE_SIGNAL_H m_pSigtermNotifier = nullptr; #endif // !HAVE_SIGNAL_H m_ui.GainSpinBox->setAccelerated(true); m_ui.ReverbRoomSpinBox->setAccelerated(true); m_ui.ReverbDampSpinBox->setAccelerated(true); m_ui.ReverbWidthSpinBox->setAccelerated(true); m_ui.ReverbLevelSpinBox->setAccelerated(true); m_ui.ChorusNrSpinBox->setAccelerated(true); m_ui.ChorusLevelSpinBox->setAccelerated(true); m_ui.ChorusSpeedSpinBox->setAccelerated(true); m_ui.ChorusDepthSpinBox->setAccelerated(true); // UI connections... QObject::connect(m_ui.SetupPushButton, SIGNAL(clicked()), SLOT(showSetupForm())); QObject::connect(m_ui.GainDial, SIGNAL(valueChanged(int)), m_ui.GainSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ReverbActiveCheckBox, SIGNAL(toggled(bool)), SLOT(reverbActivate(bool))); QObject::connect(m_ui.ReverbRoomDial, SIGNAL(valueChanged(int)), m_ui.ReverbRoomSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ReverbDampDial, SIGNAL(valueChanged(int)), m_ui.ReverbDampSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ReverbWidthDial, SIGNAL(valueChanged(int)), m_ui.ReverbWidthSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ReverbLevelDial, SIGNAL(valueChanged(int)), m_ui.ReverbLevelSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ChorusActiveCheckBox, SIGNAL(toggled(bool)), SLOT(chorusActivate(bool))); QObject::connect(m_ui.ChorusNrDial, SIGNAL(valueChanged(int)), m_ui.ChorusNrSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ChorusLevelDial, SIGNAL(valueChanged(int)), m_ui.ChorusLevelSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ChorusSpeedDial, SIGNAL(valueChanged(int)), m_ui.ChorusSpeedSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ChorusDepthDial, SIGNAL(valueChanged(int)), m_ui.ChorusDepthSpinBox, SLOT(setValue(int))); QObject::connect(m_ui.ChorusTypeComboBox, SIGNAL(activated(int)), SLOT(chorusChanged(int))); QObject::connect(m_ui.GainSpinBox, SIGNAL(valueChanged(int)), SLOT(gainChanged(int))); QObject::connect(m_ui.ReverbRoomSpinBox, SIGNAL(valueChanged(int)), SLOT(reverbChanged(int))); QObject::connect(m_ui.ReverbDampSpinBox, SIGNAL(valueChanged(int)), SLOT(reverbChanged(int))); QObject::connect(m_ui.ReverbWidthSpinBox, SIGNAL(valueChanged(int)), SLOT(reverbChanged(int))); QObject::connect(m_ui.ReverbLevelSpinBox, SIGNAL(valueChanged(int)), SLOT(reverbChanged(int))); QObject::connect(m_ui.ChorusNrSpinBox, SIGNAL(valueChanged(int)), SLOT(chorusChanged(int))); QObject::connect(m_ui.ChorusLevelSpinBox, SIGNAL(valueChanged(int)), SLOT(chorusChanged(int))); QObject::connect(m_ui.ChorusSpeedSpinBox, SIGNAL(valueChanged(int)), SLOT(chorusChanged(int))); QObject::connect(m_ui.ChorusDepthSpinBox, SIGNAL(valueChanged(int)), SLOT(chorusChanged(int))); QObject::connect(m_ui.ProgramResetPushButton, SIGNAL(clicked()), SLOT(programReset())); QObject::connect(m_ui.SystemResetPushButton, SIGNAL(clicked()), SLOT(systemReset())); QObject::connect(m_ui.RestartPushButton, SIGNAL(clicked()), SLOT(promptRestart())); QObject::connect(m_ui.ChannelsPushButton, SIGNAL(clicked()), SLOT(toggleChannelsForm())); QObject::connect(m_ui.QuitPushButton, SIGNAL(clicked()), SLOT(quitMainForm())); QObject::connect(m_ui.OptionsPushButton, SIGNAL(clicked()), SLOT(showOptionsForm())); QObject::connect(m_ui.MessagesPushButton, SIGNAL(clicked()), SLOT(toggleMessagesForm())); QObject::connect(m_ui.AboutPushButton, SIGNAL(clicked()), SLOT(showAboutForm())); QObject::connect(m_ui.NewEngineToolButton, SIGNAL(clicked()), SLOT(newEngine())); QObject::connect(m_ui.DeleteEngineToolButton, SIGNAL(clicked()), SLOT(deleteEngine())); m_pKnobStyle = nullptr; } // Destructor. qsynthMainForm::~qsynthMainForm (void) { #ifdef HAVE_SIGNAL_H if (m_pSigtermNotifier) delete m_pSigtermNotifier; #endif // Stop the press! const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); if (pEngine) stopEngine(pEngine); } // No more options descriptor. m_pOptions = nullptr; // Finally drop any popup widgets around... if (m_pMessagesForm) delete m_pMessagesForm; if (m_pChannelsForm) delete m_pChannelsForm; #ifdef CONFIG_SYSTEM_TRAY // Quit off system tray widget. if (m_pSystemTray) delete m_pSystemTray; #endif // Scrap the engines! for (int iTab = 0; iTab < iTabCount; ++iTab) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); if (pEngine) delete pEngine; } // Pseudo-singleton reference shut-down. g_pMainForm = nullptr; if (m_pKnobStyle) delete m_pKnobStyle; } // Kind of singleton reference. qsynthMainForm *qsynthMainForm::getInstance (void) { return g_pMainForm; } // Make and set a proper setup step. void qsynthMainForm::setup ( qsynthOptions *pOptions ) { // Finally, fix settings descriptor // and stabilize the form. m_pOptions = pOptions; // What style do we create these forms? QWidget *pParent = nullptr; Qt::WindowFlags wflags = Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint; if (m_pOptions->bKeepOnTop) { pParent = this; wflags |= Qt::Tool; } // All forms are to be created right now. m_pMessagesForm = new qsynthMessagesForm(pParent, wflags); m_pChannelsForm = new qsynthChannelsForm(pParent, wflags); // Setup appropriately... m_pMessagesForm->setLogging(m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); // Get the default setup and dummy instace tab. m_ui.TabBar->addEngine(new qsynthEngine(m_pOptions)); // And all additional custom ones... QStringListIterator iter(m_pOptions->engines); while (iter.hasNext()) m_ui.TabBar->addEngine(new qsynthEngine(m_pOptions, iter.next())); // Try to restore old window positioning. m_pOptions->loadWidgetGeometry(this, true); // And for the whole widget gallore... m_pOptions->loadWidgetGeometry(m_pMessagesForm); m_pOptions->loadWidgetGeometry(m_pChannelsForm); // Set defaults... updateMessagesFont(); updateMessagesLimit(); updateOutputMeters(); #ifdef CONFIG_SYSTEM_TRAY updateSystemTray(); #endif // Knobs updateKnobs(); #if !defined(Q_OS_WINDOWS) // Check if we can redirect our own stdout/stderr... if (m_pOptions->bStdoutCapture && ::pipe(g_fdStdout) == 0) { ::dup2(g_fdStdout[QSYNTH_FDWRITE], STDOUT_FILENO); ::dup2(g_fdStdout[QSYNTH_FDWRITE], STDERR_FILENO); stdoutBlock(g_fdStdout[QSYNTH_FDWRITE], false); m_pStdoutNotifier = new QSocketNotifier( g_fdStdout[QSYNTH_FDREAD], QSocketNotifier::Read, this); QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), SLOT(stdoutNotifySlot(int))); } #endif // We'll accept drops from now on... setAcceptDrops(true); // Initial selection... tabSelect(0); // Final startup stabilization... stabilizeForm(); // TabBar management. QObject::connect(m_ui.TabBar, SIGNAL(currentChanged(int)), SLOT(tabSelect(int))); QObject::connect(m_ui.TabBar, SIGNAL(contextMenuRequested(int, const QPoint &)), SLOT(tabContextMenu(int, const QPoint &))); // Register the initial timer slot. QTimer::singleShot(QSYNTH_TIMER_MSECS, this, SLOT(timerSlot())); } // Window close event handlers. bool qsynthMainForm::queryClose (void) { bool bQueryClose = true; // Now's the time? if (m_pOptions) { #ifdef CONFIG_SYSTEM_TRAY // If we're not quitting explicitly and there's an // active system tray icon, then just hide ourselves. if (!m_bQuitClose && !m_bQuitForce && isVisible() && m_pOptions->bSystemTray && m_pSystemTray) { m_pOptions->saveWidgetGeometry(this, true); if (m_pOptions->bSystemTrayQueryClose) { const QString& sTitle = tr("Information"); const QString& sText = tr("The program will keep running in the system tray.\n\n" "To terminate the program, please choose \"Quit\"\n" "in the context menu of the system tray icon."); #if 0//QSYNTH_SYSTEM_TRAY_QUERY_CLSOE if (QSystemTrayIcon::supportsMessages()) { m_pSystemTray->showMessage( sTitle, sText, QSystemTrayIcon::Information); } else QMessageBox::information(this, sTitle, sText); #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Information); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok|QMessageBox::Cancel); QCheckBox cbox(tr("Don't show this message again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); bQueryClose = (mbox.exec() == QMessageBox::Ok); if (cbox.isChecked()) m_pOptions->bSystemTrayQueryClose = false; #endif } if (bQueryClose) hide(); updateContextMenu(); bQueryClose = false; } #endif // Dow we quit right away? if (bQueryClose && !m_bQuitForce && m_pOptions->bQueryClose) { const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); if (pEngine && pEngine->pSynth) { show(); raise(); activateWindow(); updateContextMenu(); const QString& sTitle = tr("Warning"); const QString& sText = QSYNTH_TITLE " " + tr("is about to terminate.") + "\n\n" + tr("Are you sure?"); #if 0//QSYNTH_QUERY_CLOSE bQueryClose = (QMessageBox::warning(this, sTitle, sText, QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); #else QMessageBox mbox(this); mbox.setIcon(QMessageBox::Warning); mbox.setWindowTitle(sTitle); mbox.setText(sText); mbox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); QCheckBox cbox(tr("Don't ask this again")); cbox.setChecked(false); cbox.blockSignals(true); mbox.addButton(&cbox, QMessageBox::ActionRole); bQueryClose = (mbox.exec() == QMessageBox::Ok); if (bQueryClose && cbox.isChecked()) m_pOptions->bQueryClose = false; #endif break; } } } // Some windows default fonts is here on demeand too. if (bQueryClose && m_pMessagesForm) m_pOptions->sMessagesFont = m_pMessagesForm->messagesFont().toString(); // Try to save current positioning. if (bQueryClose) { m_pOptions->saveWidgetGeometry(m_pChannelsForm); m_pOptions->saveWidgetGeometry(m_pMessagesForm); m_pOptions->saveWidgetGeometry(this, true); // Close popup widgets. if (m_pMessagesForm) m_pMessagesForm->close(); if (m_pChannelsForm) m_pChannelsForm->close(); #if 0//CONFIG_SYSTEM_TRAY_0 // And the system tray icon too. if (m_pSystemTray) m_pSystemTray->close(); #endif } } // Whether we're really quitting. #ifdef CONFIG_SYSTEM_TRAY m_bQuitClose = bQueryClose; #endif m_bQuitForce = bQueryClose; return bQueryClose; } void qsynthMainForm::showEvent ( QShowEvent *pShowEvent ) { QWidget::showEvent(pShowEvent); updateContextMenu(); } void qsynthMainForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); updateContextMenu(); } void qsynthMainForm::closeEvent ( QCloseEvent *pCloseEvent ) { // Let's be sure about that... if (queryClose()) { pCloseEvent->accept(); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QApplication::exit(0); #else QApplication::quit(); #endif } else { pCloseEvent->ignore(); } } // Add dropped files to playlist or soundfont stack. void qsynthMainForm::playLoadFiles ( qsynthEngine *pEngine, const QStringList& files, bool bSetup ) { if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return; // Add each list item to Soundfont stack or MIDI player playlist... const QString sPrefix = pEngine->name() + ": "; const QString sElipsis = "..."; int iSoundFonts = 0; int iMidiFiles = 0; QStringListIterator iter(files); while (iter.hasNext()) { const QString& sFilename = iter.next(); // Is it a soundfont file... if (::fluid_is_soundfont(sFilename.toLocal8Bit().data())) { if (bSetup || !pSetup->soundfonts.contains(sFilename)) { appendMessagesColor(sPrefix + tr("Loading soundfont: \"%1\"") .arg(sFilename) + sElipsis, "#999933"); if (::fluid_synth_sfload( pEngine->pSynth, sFilename.toLocal8Bit().data(), 1) >= 0) { iSoundFonts++; if (!bSetup) { pSetup->soundfonts.append(sFilename); pSetup->bankoffsets.append("0"); } } else { appendMessagesError(sPrefix + tr("Failed to load the soundfont: \"%1\".") .arg(sFilename)); } } } else // Or is it a bare midifile? if (::fluid_is_midifile(sFilename.toLocal8Bit().data())) { // Destroy the MIDI player, if done already... if (pEngine->pPlayer && ::fluid_player_get_status(pEngine->pPlayer) == FLUID_PLAYER_DONE) { appendMessages(sPrefix + tr("Destroying MIDI player") + sElipsis); ::delete_fluid_player(pEngine->pPlayer); pEngine->pPlayer = nullptr; } // Create the MIDI player, if not already... if (pEngine->pPlayer == nullptr) { appendMessages(sPrefix + tr("Creating MIDI player") + sElipsis); pEngine->pPlayer = ::new_fluid_player(pEngine->pSynth); if (pEngine->pPlayer == nullptr) { appendMessagesError(sPrefix + tr("Failed to create the MIDI player.\n\n" "Continuing without a player.")); } } // Add file to the MIDI player play-list... if (pEngine->pPlayer) { appendMessagesColor(sPrefix + tr("Playing MIDI file: \"%1\"") .arg(sFilename) + sElipsis, "#99cc66"); if (::fluid_player_add( pEngine->pPlayer, sFilename.toLocal8Bit().data()) >= 0) { iMidiFiles++; } else { appendMessagesError(sPrefix + tr("Failed to play MIDI file: \"%1\".") .arg(sFilename)); } } } } // Reset all presets, if applicable... if (!bSetup && iSoundFonts > 0) { resetEngine(pEngine); resetChannelsForm(pEngine, false); } // Start playing, if any... if (pEngine->pPlayer && iMidiFiles > 0) { ::fluid_player_set_loop(pEngine->pPlayer, 1); ::fluid_player_play(pEngine->pPlayer); } } void qsynthMainForm::dragEnterEvent ( QDragEnterEvent* pDragEnterEvent ) { bool bAccept = false; if (pDragEnterEvent->source() == nullptr) { const QMimeData *pMimeData = pDragEnterEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) { const QByteArray aFilename = sFilename.toLocal8Bit(); const char *pszFilename = aFilename.constData(); if (::fluid_is_midifile(pszFilename) || ::fluid_is_soundfont(pszFilename)) bAccept = true; } } } } if (bAccept) pDragEnterEvent->accept(); else pDragEnterEvent->ignore(); } void qsynthMainForm::dropEvent ( QDropEvent* pDropEvent ) { if (pDropEvent->source()) return; const QMimeData *pMimeData = pDropEvent->mimeData(); if (pMimeData && pMimeData->hasUrls()) { QStringList files; QListIterator iter(pMimeData->urls()); while (iter.hasNext()) { const QString& sFilename = iter.next().toLocalFile(); if (!sFilename.isEmpty()) files.append(sFilename); } playLoadFiles(currentEngine(), files, false); } } // SIGTERM signal handler... void qsynthMainForm::sigtermNotifySlot ( int /* fd */ ) { #ifdef HAVE_SIGNAL_H char c; if (::read(g_fdSigterm[1], &c, sizeof(c)) > 0) quitMainForm(); #endif } #if defined(Q_CC_GNU) || defined(Q_CC_MINGW) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #endif // Set stdout/stderr blocking mode. bool qsynthMainForm::stdoutBlock ( int fd, bool bBlock ) const { #if !defined(Q_OS_WINDOWS) const int iFlags = ::fcntl(fd, F_GETFL, 0); const bool bNonBlock = bool(iFlags & O_NONBLOCK); if (bBlock && bNonBlock) bBlock = (::fcntl(fd, F_SETFL, iFlags & ~O_NONBLOCK) == 0); else if (!bBlock && !bNonBlock) bBlock = (::fcntl(fd, F_SETFL, iFlags | O_NONBLOCK) != 0); #endif return bBlock; } // Own stdout/stderr socket notifier slot. void qsynthMainForm::stdoutNotifySlot ( int fd ) { #if !defined(Q_OS_WINDOWS) // Set non-blocking reads, if not already... const bool bBlock = stdoutBlock(fd, false); // Read as much as is available... QString sTemp; char achBuffer[1024]; const int cchBuffer = sizeof(achBuffer) - 1; int cchRead = ::read(fd, achBuffer, cchBuffer); while (cchRead > 0) { achBuffer[cchRead] = (char) 0; sTemp.append(achBuffer); cchRead = (bBlock ? 0 : ::read(fd, achBuffer, cchBuffer)); } // Needs to be non-empty... if (!sTemp.isEmpty()) appendStdoutBuffer(sTemp); #endif } #if defined(Q_CC_GNU) || defined(Q_CC_MINGW) #pragma GCC diagnostic pop #endif // Stdout buffer handler -- now splitted by complete new-lines... void qsynthMainForm::appendStdoutBuffer ( const QString& s ) { m_sStdoutBuffer.append(s); processStdoutBuffer(); } void qsynthMainForm::processStdoutBuffer (void) { const int iLength = m_sStdoutBuffer.lastIndexOf('\n'); if (iLength > 0) { QStringListIterator iter(m_sStdoutBuffer.left(iLength).split('\n')); while (iter.hasNext()) { const QString& sTemp = iter.next(); if (!sTemp.isEmpty()) #if defined(Q_OS_WINDOWS) appendMessagesText(sTemp.trimmed()); #else appendMessagesText(sTemp); #endif } m_sStdoutBuffer.remove(0, iLength + 1); } } // Stdout flusher -- show up any unfinished line... void qsynthMainForm::flushStdoutBuffer (void) { processStdoutBuffer(); if (!m_sStdoutBuffer.isEmpty()) { #if defined(Q_OS_WINDOWS) appendMessagesText(m_sStdoutBuffer.trimmed()); #else appendMessagesText(m_sStdoutBuffer); #endif m_sStdoutBuffer.clear(); } } // Messages output methods. void qsynthMainForm::appendMessages ( const QString& s ) { if (m_pMessagesForm) m_pMessagesForm->appendMessages(s); } void qsynthMainForm::appendMessagesColor ( const QString& s, const QColor& rgb ) { if (m_pMessagesForm) m_pMessagesForm->appendMessagesColor(s, rgb); } void qsynthMainForm::appendMessagesText ( const QString& s ) { if (m_pMessagesForm) m_pMessagesForm->appendMessagesText(s); } void qsynthMainForm::appendMessagesError ( const QString& s ) { if (m_pMessagesForm) m_pMessagesForm->show(); appendMessagesColor(s.simplified(), Qt::red); const QString& sTitle = tr("Error"); #ifdef CONFIG_SYSTEM_TRAY if (m_pOptions->bSystemTray && m_pSystemTray && QSystemTrayIcon::supportsMessages()) { m_pSystemTray->showMessage(sTitle, s, QSystemTrayIcon::Critical); } else #endif QMessageBox::critical(this, sTitle, s, QMessageBox::Cancel); } // Force update of the messages font. void qsynthMainForm::updateMessagesFont (void) { if (m_pOptions == nullptr) return; if (m_pMessagesForm && !m_pOptions->sMessagesFont.isEmpty()) { QFont font; if (font.fromString(m_pOptions->sMessagesFont)) m_pMessagesForm->setMessagesFont(font); } } // Update messages window line limit. void qsynthMainForm::updateMessagesLimit (void) { if (m_pOptions == nullptr) return; if (m_pMessagesForm) { if (m_pOptions->bMessagesLimit) m_pMessagesForm->setMessagesLimit(m_pOptions->iMessagesLimitLines); else m_pMessagesForm->setMessagesLimit(-1); } } // Force update of the output meters visibility. void qsynthMainForm::updateOutputMeters (void) { if (m_pOptions == nullptr) return; if (m_pOptions->bOutputMeters) m_ui.OutputGroupBox->show(); else m_ui.OutputGroupBox->hide(); // adjustSize(); } #ifdef CONFIG_SYSTEM_TRAY // System tray master switcher. void qsynthMainForm::updateSystemTray (void) { if (m_pOptions == nullptr) return; if (!QSystemTrayIcon::isSystemTrayAvailable()) return; if (!m_pOptions->bSystemTray && m_pSystemTray) { // Strange enough, this would close the application too. // m_pSystemTray->close(); delete m_pSystemTray; m_pSystemTray = nullptr; } if (m_pOptions->bSystemTray && m_pSystemTray == nullptr) { m_pSystemTray = new qsynthSystemTray(this); m_pSystemTray->setContextMenu(&m_menu); m_pSystemTray->show(); QObject::connect(m_pSystemTray, SIGNAL(clicked()), SLOT(toggleMainForm())); } else { // Make sure the main widget is visible. show(); raise(); activateWindow(); } updateContextMenu(); } #endif // Common context menu request slot. void qsynthMainForm::updateContextMenu (void) { if (m_pOptions == nullptr) return; m_menu.clear(); QAction *pAction; QString sHideMinimize = tr("Mi&nimize"); QString sShowRestore = tr("Rest&ore"); #ifdef CONFIG_SYSTEM_TRAY if (m_pOptions->bSystemTray && m_pSystemTray) { sHideMinimize = tr("&Hide"); sShowRestore = tr("S&how"); } #endif pAction = m_menu.addAction(isVisible() && !isMinimized() ? sHideMinimize : sShowRestore, this, SLOT(toggleMainForm())); m_menu.addSeparator(); pAction = m_menu.addAction(QIcon(":/images/add1.png"), tr("&New engine..."), this, SLOT(newEngine())); pAction = m_menu.addAction(QIcon(":/images/remove1.png"), tr("&Delete"), this, SLOT(deleteEngine())); pAction->setEnabled(g_pCurrentEngine && !g_pCurrentEngine->isDefault()); m_menu.addSeparator(); const bool bEnabled = (g_pCurrentEngine && g_pCurrentEngine->pSynth); pAction = m_menu.addAction(QIcon(":/images/restart1.png"), bEnabled ? tr("Re&start") : tr("&Start"), this, SLOT(promptRestart())); pAction = m_menu.addAction(QIcon(":/images/reset1.png"), tr("&Reset"), this, SLOT(programReset())); pAction->setEnabled(bEnabled); pAction = m_menu.addAction(QIcon(":/images/panic1.png"), tr("&Panic"), this, SLOT(systemReset())); pAction->setEnabled(bEnabled); m_menu.addSeparator(); pAction = m_menu.addAction(QIcon(":/images/channels1.png"), tr("&Channels"), this, SLOT(toggleChannelsForm())); pAction->setCheckable(true); pAction->setChecked(m_pChannelsForm && m_pChannelsForm->isVisible()); pAction->setEnabled(bEnabled); pAction = m_menu.addAction(QIcon(":/images/setup1.png"), tr("Set&up..."), this, SLOT(showSetupForm())); m_menu.addSeparator(); // Construct the actual engines menu, // overriding the last one, if any... // Add presets menu to the main context menu... QMenu *pEnginesMenu = m_menu.addMenu(tr("Engines")); const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); if (pEngine) { pAction = pEnginesMenu->addAction(pEngine->name()); pAction->setCheckable(true); pAction->setChecked(pEngine == g_pCurrentEngine); pAction->setData(iTab); } } QObject::connect(pEnginesMenu, SIGNAL(triggered(QAction*)), SLOT(activateEnginesMenu(QAction*))); m_menu.addSeparator(); pAction = m_menu.addAction(QIcon(":/images/messages1.png"), tr("&Messages"), this, SLOT(toggleMessagesForm())); pAction->setCheckable(true); pAction->setChecked(m_pMessagesForm && m_pMessagesForm->isVisible()); pAction = m_menu.addAction(QIcon(":/images/options1.png"), tr("&Options..."), this, SLOT(showOptionsForm())); // pAction = menu.AddAction(QIcon(":/images/about1.png"), // tr("A&bout..."), this, SLOT(showAboutForm())); m_menu.addSeparator(); pAction = m_menu.addAction(QIcon(":/images/quit1.png"), tr("&Quit"), this, SLOT(quitMainForm())); } // Stabilize current form toggle buttons that may be astray. void qsynthMainForm::stabilizeForm (void) { qsynthEngine *pEngine = currentEngine(); const bool bEnabled = (pEngine && pEngine->pSynth); m_ui.GainGroupBox->setEnabled(bEnabled); m_ui.ReverbGroupBox->setEnabled(bEnabled); m_ui.ChorusGroupBox->setEnabled(bEnabled); m_ui.OutputGroupBox->setEnabled(bEnabled && pEngine->bMeterEnabled); m_ui.ProgramResetPushButton->setEnabled(bEnabled); m_ui.SystemResetPushButton->setEnabled(bEnabled); m_ui.ChannelsPushButton->setEnabled(bEnabled); if (bEnabled) { const bool bReverbActive = m_ui.ReverbActiveCheckBox->isChecked(); m_ui.ReverbRoomTextLabel->setEnabled(bReverbActive); m_ui.ReverbDampTextLabel->setEnabled(bReverbActive); m_ui.ReverbWidthTextLabel->setEnabled(bReverbActive); m_ui.ReverbLevelTextLabel->setEnabled(bReverbActive); m_ui.ReverbRoomDial->setEnabled(bReverbActive); m_ui.ReverbDampDial->setEnabled(bReverbActive); m_ui.ReverbWidthDial->setEnabled(bReverbActive); m_ui.ReverbLevelDial->setEnabled(bReverbActive); m_ui.ReverbRoomSpinBox->setEnabled(bReverbActive); m_ui.ReverbDampSpinBox->setEnabled(bReverbActive); m_ui.ReverbWidthSpinBox->setEnabled(bReverbActive); m_ui.ReverbLevelSpinBox->setEnabled(bReverbActive); const bool bChorusActive = m_ui.ChorusActiveCheckBox->isChecked(); m_ui.ChorusNrTextLabel->setEnabled(bChorusActive); m_ui.ChorusLevelTextLabel->setEnabled(bChorusActive); m_ui.ChorusSpeedTextLabel->setEnabled(bChorusActive); m_ui.ChorusDepthTextLabel->setEnabled(bChorusActive); m_ui.ChorusTypeTextLabel->setEnabled(bChorusActive); m_ui.ChorusNrDial->setEnabled(bChorusActive); m_ui.ChorusLevelDial->setEnabled(bChorusActive); m_ui.ChorusSpeedDial->setEnabled(bChorusActive); m_ui.ChorusDepthDial->setEnabled(bChorusActive); m_ui.ChorusNrSpinBox->setEnabled(bChorusActive); m_ui.ChorusLevelSpinBox->setEnabled(bChorusActive); m_ui.ChorusSpeedSpinBox->setEnabled(bChorusActive); m_ui.ChorusDepthSpinBox->setEnabled(bChorusActive); m_ui.ChorusTypeComboBox->setEnabled(bChorusActive); m_ui.RestartPushButton->setText(tr("Re&start")); } else { m_ui.RestartPushButton->setText(tr("&Start")); } m_ui.RestartPushButton->setEnabled(true); m_ui.DeleteEngineToolButton->setEnabled(pEngine && !pEngine->isDefault()); m_ui.MessagesPushButton->setChecked( m_pMessagesForm && m_pMessagesForm->isVisible()); m_ui.ChannelsPushButton->setChecked( m_pChannelsForm && m_pChannelsForm->isVisible()); } void qsynthMainForm::stabilizeFormEx (void) { updateContextMenu(); stabilizeForm(); } // Program reset command slot (all channels). void qsynthMainForm::programReset (void) { m_ui.ProgramResetPushButton->setEnabled(false); resetGain(); resetReverb(); resetChorus(); resetEngine(currentEngine()); if (m_pChannelsForm) m_pChannelsForm->resetAllChannels(true); stabilizeForm(); } // System reset command slot. void qsynthMainForm::systemReset (void) { m_ui.SystemResetPushButton->setEnabled(false); qsynthEngine *pEngine = currentEngine(); if (pEngine && pEngine->pSynth) { #ifdef CONFIG_FLUID_SYSTEM_RESET appendMessagesColor(pEngine->name() + ": fluid_synth_system_reset()", "#993366"); ::fluid_synth_system_reset(pEngine->pSynth); #else appendMessagesColor(pEngine->name() + ": fluid_synth_program_reset()", "#996666"); ::fluid_synth_program_reset(pEngine->pSynth); #endif if (m_pChannelsForm) m_pChannelsForm->resetAllChannels(true); } stabilizeForm(); } // Complete engine restart. void qsynthMainForm::promptRestart (void) { restartEngine(currentEngine()); } // Prompt and create a new engine instance. void qsynthMainForm::newEngine (void) { qsynthEngine *pEngine; QString sName; // Simple hack for finding a unused engine name... const QString sPrefix = QSYNTH_TITLE; const int iTabCount = m_ui.TabBar->count(); int iSuffix = iTabCount + 1; // One is always there, so try after... bool bRetry = true; while (bRetry) { sName = sPrefix + QString::number(iSuffix++); bRetry = false; for (int iTab = 0; iTab < iTabCount && !bRetry; ++iTab) { pEngine = m_ui.TabBar->engine(iTab); if (pEngine && pEngine->name() == sName) bRetry = true; } } // Probably a good idea to prompt for the setup dialog. pEngine = new qsynthEngine(m_pOptions, sName); if (setupEngineTab(pEngine, -1)) { // Success, add a new tab... const int iTab = m_ui.TabBar->addEngine(pEngine); // And try to be persistent... m_pOptions->newEngine(pEngine); // Update bar... m_ui.TabBar->setCurrentIndex(iTab); m_ui.TabBar->update(); } else { // As this will not be mangaed by a qsynthTab instance, // we better free it up right now... delete pEngine; } // Refresh context-menu... updateContextMenu(); } // Delete the current engine instance. void qsynthMainForm::deleteEngine (void) { // Check if we're doing everything all right. qsynthEngine *pEngine = m_ui.TabBar->engine(m_iCurrentTab); if (pEngine) deleteEngineTab(pEngine, m_iCurrentTab); } // Delete and engine instance. bool qsynthMainForm::deleteEngineTab ( qsynthEngine *pEngine, int iTab ) { if (pEngine == nullptr || iTab < 0) return false; // Try to prompt user if he/she really wants this... const bool bResult = (QMessageBox::warning(this, tr("Warning"), tr("Delete fluidsynth engine:") + "\n\n" + pEngine->name() + "\n\n" + tr("Are you sure?"), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok); if (bResult) { // First we try to stop the angine. stopEngine(pEngine); // Better nullify the current reference, if applicable. if (g_pCurrentEngine == pEngine) g_pCurrentEngine = nullptr; if (m_iCurrentTab == iTab) m_iCurrentTab = -1; // Nows time to remove those crappy entries... m_pOptions->deleteEngine(pEngine); // Then, we delete the instance (note that the engine object // is owned by the tab instance, so it will be delete here). m_ui.TabBar->removeEngine(iTab); m_ui.TabBar->update(); tabSelect(m_ui.TabBar->currentIndex()); } return bResult; } // Edit settings of a given engine instance. bool qsynthMainForm::setupEngineTab ( qsynthEngine *pEngine, int iTab ) { if (pEngine == nullptr || pEngine->setup() == nullptr) return false; qsynthSetupForm setupForm(this); // Load the current instance settings. setupForm.setup(m_pOptions, pEngine, iTab < 0); // Show the instance setup dialog, then ask for a engine restart? if (!setupForm.exec()) return false; // Have we changed names? Ugly uh? m_pOptions->renameEngine(pEngine); if (iTab >= 0) { // Update main caption, if we're on current engine tab... if (iTab == m_ui.TabBar->currentIndex()) { setWindowTitle(pEngine->name()); } // Finally update tab text... m_ui.TabBar->setTabText(iTab, pEngine->name()); } // Now we may restart this. restartEngine(pEngine); // Done. return true; } // Main form visibility requester slot. void qsynthMainForm::toggleMainForm (void) { if (m_pOptions == nullptr) return; m_pOptions->saveWidgetGeometry(this, true); if (isVisible() && !isMinimized()) { #ifdef CONFIG_SYSTEM_TRAY // Hide away from sight, totally... if (m_pOptions->bSystemTray && m_pSystemTray) hide(); else #endif // Minimize (iconify) normally. showMinimized(); } else { // Show normally. showNormal(); raise(); activateWindow(); } // updateContextMenu(); } // Message log form requester slot. void qsynthMainForm::toggleMessagesForm (void) { if (m_pOptions == nullptr) return; if (m_pMessagesForm) { m_pOptions->saveWidgetGeometry(m_pMessagesForm); if (m_pMessagesForm->isVisible()) { m_pMessagesForm->hide(); } else { m_pMessagesForm->show(); m_pMessagesForm->raise(); m_pMessagesForm->activateWindow(); } } updateContextMenu(); } // Channels view form requester slot. void qsynthMainForm::toggleChannelsForm (void) { if (m_pOptions == nullptr) return; if (m_pChannelsForm) { m_pOptions->saveWidgetGeometry(m_pChannelsForm); if (m_pChannelsForm->isVisible()) { m_pChannelsForm->hide(); } else { m_pChannelsForm->show(); m_pChannelsForm->raise(); m_pChannelsForm->activateWindow(); } } updateContextMenu(); } // Instance dialog requester slot. void qsynthMainForm::showSetupForm (void) { const int iTab = m_ui.TabBar->currentIndex(); if (iTab >= 0) setupEngineTab(m_ui.TabBar->engine(iTab), iTab); } // Setup dialog requester slot. void qsynthMainForm::showOptionsForm (void) { if (m_pOptions == nullptr) return; qsynthOptionsForm *pOptionsForm = new qsynthOptionsForm(this); if (pOptionsForm) { // Check out some initial nullities(tm)... if (m_pOptions->sMessagesFont.isEmpty() && m_pMessagesForm) m_pOptions->sMessagesFont = m_pMessagesForm->messagesFont().toString(); // To track down deferred or immediate changes. const bool bOldMessagesLog = m_pOptions->bMessagesLog; const QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; const QString sOldMessagesFont = m_pOptions->sMessagesFont; #ifdef CONFIG_SYSTEM_TRAY const bool bOldSystemTray = m_pOptions->bSystemTray; #endif const bool bOldOutputMeters = m_pOptions->bOutputMeters; const int bOldMessagesLimit = m_pOptions->bMessagesLimit; const int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; const int iOldKnobStyle = m_pOptions->iKnobStyle; const int iOldKnobMotion = m_pOptions->iKnobMotion; // Load the current setup settings. pOptionsForm->setup(m_pOptions); // Show the setup dialog... if (pOptionsForm->exec()) { // Check wheather something immediate has changed. if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || (!bOldMessagesLog && m_pOptions->bMessagesLog) || (sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) m_pMessagesForm->setLogging( m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); if (sOldMessagesFont != m_pOptions->sMessagesFont) updateMessagesFont(); if (( bOldMessagesLimit && !m_pOptions->bMessagesLimit) || (!bOldMessagesLimit && m_pOptions->bMessagesLimit) || (iOldMessagesLimitLines != m_pOptions->iMessagesLimitLines)) updateMessagesLimit(); #ifdef CONFIG_SYSTEM_TRAY if (( bOldSystemTray && !m_pOptions->bSystemTray) || (!bOldSystemTray && m_pOptions->bSystemTray)) updateSystemTray(); #endif if ((iOldKnobStyle != m_pOptions->iKnobStyle) || (iOldKnobMotion != m_pOptions->iKnobMotion)) updateKnobs(); // There's some option(s) that need a global restart... if (( bOldOutputMeters && !m_pOptions->bOutputMeters) || (!bOldOutputMeters && m_pOptions->bOutputMeters)) { updateOutputMeters(); restartAllEngines(); } } // Done. delete pOptionsForm; } } // About dialog requester slot. void qsynthMainForm::showAboutForm (void) { qsynthAboutForm *pAboutForm = new qsynthAboutForm(this); if (pAboutForm) { pAboutForm->exec(); delete pAboutForm; } } // Tab selection slot. void qsynthMainForm::tabSelect ( int iTab ) { if (iTab == m_iCurrentTab) return; // Try to save old tab settings... if (m_iCurrentTab >= 0) { qsynthEngine *pEngine = m_ui.TabBar->engine(m_iCurrentTab); if (pEngine) savePanelSettings(pEngine); } // Make it official. m_iCurrentTab = iTab; // And set new ones, while refreshing views... if (m_iCurrentTab >= 0) { qsynthEngine *pEngine = m_ui.TabBar->engine(m_iCurrentTab); if (pEngine) { // Set current engine reference hack. g_pCurrentEngine = pEngine; // And do the change. setWindowTitle(pEngine->name()); loadPanelSettings(pEngine, false); resetChannelsForm(pEngine, false); } } // Update context-menu for sure... updateContextMenu(); // Finally, stabilize main form. stabilizeForm(); } // Common context request slot. void qsynthMainForm::tabContextMenu ( int iTab, const QPoint& pos ) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); m_ui.TabBar->setCurrentIndex(iTab); QMenu menu(this); QAction *pAction; pAction = menu.addAction(QIcon(":/images/add1.png"), tr("&New engine..."), this, SLOT(newEngine())); pAction = menu.addAction(QIcon(":/images/remove1.png"), tr("&Delete"), this, SLOT(deleteEngine())); pAction->setEnabled(pEngine && !pEngine->isDefault()); menu.addSeparator(); pAction = menu.addAction(QIcon(":/images/setup1.png"), tr("Set&up..."), this, SLOT(showSetupForm())); pAction->setEnabled(pEngine != nullptr); menu.exec(pos); } // Timer callback funtion. void qsynthMainForm::timerSlot (void) { // Is it the first shot on synth start after a one slot delay? if (m_iTimerDelay < QSYNTH_DELAY_MSECS) { m_iTimerDelay += QSYNTH_TIMER_MSECS; if (m_iTimerDelay >= QSYNTH_DELAY_MSECS) { // Start the press! const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) startEngine(m_ui.TabBar->engine(iTab)); } } // Some global MIDI activity? int iTabUpdate = 0; const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) { qsynthEngine *pEngine = m_ui.TabBar->engine(iTab); if (pEngine->iMidiEvent > 0) { pEngine->iMidiEvent = 0; if (pEngine->iMidiState == 0) { pEngine->iMidiState++; m_ui.TabBar->setOn(iTab, true); iTabUpdate++; #ifdef CONFIG_SYSTEM_TRAY // Change the system tray icon background color! if (m_pSystemTray && m_iSystemTrayState == 0) { m_iSystemTrayState++; m_pSystemTray->setBackground(Qt::green); } #endif } } else if (pEngine->iMidiEvent == 0 && pEngine->iMidiState > 0) { if (--(pEngine->iMidiState) == 0) { m_ui.TabBar->setOn(iTab, false); iTabUpdate++; } #ifdef CONFIG_SYSTEM_TRAY // Reset the system tray icon background! if (m_pSystemTray && m_iSystemTrayState > 0) { if (--m_iSystemTrayState == 0) m_pSystemTray->setBackground(Qt::transparent); } #endif } } // Have we an update? if (iTabUpdate > 0) m_ui.TabBar->update(); // MIDI Channel activity breakout... if (m_pChannelsForm) { for (int iChan = 0; iChan < g_iMidiChannels; ++iChan) { if (g_pMidiChannels[iChan].iEvent > 0) { g_pMidiChannels[iChan].iEvent = 0; // Activity tracking... if (g_pMidiChannels[iChan].iState == 0) { m_pChannelsForm->setChannelOn(iChan, true); g_pMidiChannels[iChan].iState++; } // Control and/or program change... if (g_pMidiChannels[iChan].iChange > 0) { g_pMidiChannels[iChan].iChange = 0; m_pChannelsForm->updateChannel(iChan); } } // Activity fallback... else if (g_pMidiChannels[iChan].iEvent == 0 && g_pMidiChannels[iChan].iState > 0) { if (--(g_pMidiChannels[iChan].iState) == 0) m_pChannelsForm->setChannelOn(iChan, false); } } } // Gain changes? if (m_iGainChanged > 0) updateGain(); // Reverb changes? if (m_iReverbChanged > 0) updateReverb(); // Chorus changes? if (m_iChorusChanged > 0) updateChorus(); // Meter update. if (g_pCurrentEngine && g_pCurrentEngine->bMeterEnabled) { m_ui.OutputMeter->setValue(0, g_pCurrentEngine->fMeterValue[0]); m_ui.OutputMeter->setValue(1, g_pCurrentEngine->fMeterValue[1]); // m_ui.OutputMeter->refresh(); g_pCurrentEngine->fMeterValue[0] = 0.0f; g_pCurrentEngine->fMeterValue[1] = 0.0f; } // Register for the next timer slot. QTimer::singleShot(QSYNTH_TIMER_MSECS, this, SLOT(timerSlot())); } // Return the current selected engine. qsynthEngine *qsynthMainForm::currentEngine (void) const { return g_pCurrentEngine; } // Start the fluidsynth clone, based on given settings. bool qsynthMainForm::startEngine ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return false; if (pEngine->pSynth) return true; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return false; // Start realizing settings... pSetup->realize(); const QString sPrefix = pEngine->name() + ": "; const QString sElipsis = "..."; // Create the synthesizer. appendMessages(sPrefix + tr("Creating synthesizer engine") + sElipsis); pEngine->pSynth = ::new_fluid_synth(pSetup->fluid_settings()); if (pEngine->pSynth == nullptr) { appendMessagesError(sPrefix + tr("Failed to create the synthesizer.\n\nCannot continue without it.")); return false; } #ifdef QSYNTH_CUSTOM_LOADER // Add special loader to mirror fonts in use by another engine... fluid_sfloader_t *pLoader = (fluid_sfloader_t *) ::malloc(sizeof(fluid_sfloader_t)); pLoader->data = (void *) pEngine; pLoader->load = qsynth_sfloader_load; pLoader->free = qsynth_sfloader_free; ::fluid_synth_add_sfloader(pEngine->pSynth, pLoader); // Push on to engine list. qsynthEngineNode *pNode = new qsynthEngineNode; pNode->pEngine = pEngine; pNode->pNext = g_pEngineList; pNode->pPrev = nullptr; if (g_pEngineList) g_pEngineList->pPrev = pNode; g_pEngineList = pNode; #endif // Load soundfonts... int i = 0; QStringListIterator iter(pSetup->soundfonts); while (iter.hasNext()) { const QString& sFilename = iter.next(); // Is it a soundfont file... if (::fluid_is_soundfont(sFilename.toLocal8Bit().data())) { const int iBankOffset = pSetup->bankoffsets[i].toInt(); appendMessagesColor(sPrefix + tr("Loading soundfont: \"%1\" (bank offset %2)") .arg(sFilename).arg(iBankOffset) + sElipsis, "#999933"); const int iSFID = ::fluid_synth_sfload( pEngine->pSynth, sFilename.toLocal8Bit().data(), 1); if (iSFID < 0) appendMessagesError(sPrefix + tr("Failed to load the soundfont: \"%1\".") .arg(sFilename)); #ifdef CONFIG_FLUID_BANK_OFFSET else if (::fluid_synth_set_bank_offset( pEngine->pSynth, iSFID, iBankOffset) < 0) { appendMessagesError(sPrefix + tr("Failed to set bank offset (%1) for soundfont: \"%2\".") .arg(iBankOffset).arg(sFilename)); } #endif } ++i; } // Start the synthesis thread... appendMessages(sPrefix + tr("Creating audio driver (%1)") .arg(pSetup->sAudioDriver) + sElipsis); pEngine->pAudioDriver = nullptr; pEngine->bMeterEnabled = false; if (m_pOptions->bOutputMeters) { pEngine->pAudioDriver = ::new_fluid_audio_driver2( pSetup->fluid_settings(), qsynth_process_meters, pEngine); pEngine->bMeterEnabled = (pEngine->pAudioDriver != nullptr); } if (pEngine->pAudioDriver == nullptr) pEngine->pAudioDriver = ::new_fluid_audio_driver2( pSetup->fluid_settings(), qsynth_process, pEngine); if (pEngine->pAudioDriver == nullptr) { appendMessagesError(sPrefix + tr("Failed to create the audio driver (%1).\n\n" "Cannot continue without it.") .arg(pSetup->sAudioDriver)); stopEngine(pEngine); return false; } // Start the midi router and link it to the synth... if (pSetup->bMidiIn) { // In dump mode, text output is generated for events going into // and out of the router. The example dump functions are put into // the chain before and after the router.. appendMessages(sPrefix + tr("Creating MIDI router (%1)") .arg(pSetup->sMidiDriver) + sElipsis); pEngine->pMidiRouter = ::new_fluid_midi_router( pSetup->fluid_settings(), pSetup->bMidiDump ? qsynth_dump_postrouter : qsynth_handle_midi_event, (void *) pEngine); if (pEngine->pMidiRouter == nullptr) { appendMessagesError(sPrefix + tr("Failed to create the MIDI input router (%1).\n\n" "No MIDI input will be available.") .arg(pSetup->sMidiDriver)); } else { #ifdef CONFIG_FLUID_MIDI_ROUTER ::fluid_synth_set_midi_router(pEngine->pSynth, pEngine->pMidiRouter); #endif appendMessages(sPrefix + tr("Creating MIDI driver (%1)") .arg(pSetup->sMidiDriver) + sElipsis); pEngine->pMidiDriver = ::new_fluid_midi_driver( pSetup->fluid_settings(), pSetup->bMidiDump ? ::fluid_midi_dump_prerouter : ::fluid_midi_router_handle_midi_event, static_cast (pEngine->pMidiRouter)); if (pEngine->pMidiDriver == nullptr) appendMessagesError(sPrefix + tr("Failed to create the MIDI driver (%1).\n\n" "No MIDI input will be available.") .arg(pSetup->sMidiDriver)); } } // Run the server, if requested. if (pSetup->bServer) { #ifdef CONFIG_FLUID_SERVER appendMessages(sPrefix + tr("Creating server") + sElipsis); #ifdef CONFIG_NEW_FLUID_SERVER // Create the server now... pEngine->pServer = ::new_fluid_server( pSetup->fluid_settings(), pEngine->pSynth, pEngine->pMidiRouter); #else // Server port must be different for each engine... char szShellPort[] = "shell.port"; if (g_iLastShellPort > 0) { g_iLastShellPort++; } else { g_iLastShellPort = 0; ::fluid_settings_getint( pSetup->fluid_settings(), szShellPort, &g_iLastShellPort); if (g_iLastShellPort == 0) { #ifdef CONFIG_FLUID_SETTINGS_GETINT_DEFAULT g_iLastShellPort = 0; ::fluid_settings_getint_default( pSetup->fluid_settings(), szShellPort, &g_iLastShellPort); #else g_iLastShellPort = ::fluid_settings_getint_default( pSetup->fluid_settings(), szShellPort); #endif } } // Set the (new) server port for this engne... ::fluid_settings_setint( pSetup->fluid_settings(), szShellPort, g_iLastShellPort); // Create the server now... pEngine->pServer = ::new_fluid_server( pSetup->fluid_settings(), qsynth_newclient, pEngine); #endif if (pEngine->pServer == nullptr) appendMessagesError(sPrefix + tr("Failed to create the server.\n\n" "Continuing without it.")); #else appendMessagesError(sPrefix + tr("Server mode disabled.\n\n" "Continuing without it.")); #endif } // Make an initial program reset. m_pOptions->loadPreset(pEngine, pSetup->sDefPreset); // Show up our efforts, if we're currently selected :) if (pEngine == currentEngine()) { loadPanelSettings(pEngine, true); resetChannelsForm(pEngine, true); stabilizeForm(); } else { setEngineReverbOn(pEngine, pSetup->bReverbActive); setEngineChorusOn(pEngine, pSetup->bChorusActive); setEngineGain(pEngine, pSetup->fGain); setEngineReverb(pEngine, pSetup->fReverbRoom, pSetup->fReverbDamp, pSetup->fReverbWidth, pSetup->fReverbLevel); setEngineChorus(pEngine, pSetup->iChorusNr, pSetup->fChorusLevel, pSetup->fChorusSpeed, pSetup->fChorusDepth, pSetup->iChorusType); } // All is right. appendMessages(sPrefix + tr("Synthesizer engine started.")); // Play the midi files, if any... playLoadFiles(pEngine, pSetup->midifiles, false); return true; } // Stop the fluidsynth clone. void qsynthMainForm::stopEngine ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return; // Only if there's a legal audio driver... if (pEngine->pAudioDriver) { // Before all else save current engine panel settings... if (pEngine == currentEngine()) savePanelSettings(pEngine); // Make those settings persist over... m_pOptions->saveSetup(pSetup, pEngine->isDefault() ? QString() : pEngine->name()); } // Flush anything that maybe pending... flushStdoutBuffer(); const QString sPrefix = pEngine->name() + ": "; const QString sElipsis = "..."; #ifdef CONFIG_FLUID_SERVER // Destroy server. if (pEngine->pServer) { // Server join is not necessary, causes seg fault when multiple engines. // appendMessages(sPrefix + tr("Waiting for server to terminate") + sElipsis); // ::fluid_server_join(pEngine->pServer); appendMessages(sPrefix + tr("Destroying server") + sElipsis); ::delete_fluid_server(pEngine->pServer); pEngine->pServer = nullptr; } #endif // Destroy player. if (pEngine->pPlayer) { appendMessages(sPrefix + tr("Stopping MIDI player") + sElipsis); ::fluid_player_stop(pEngine->pPlayer); appendMessages(sPrefix + tr("Waiting for MIDI player to terminate") + sElipsis); ::fluid_player_join(pEngine->pPlayer); appendMessages(sPrefix + tr("Destroying MIDI player") + sElipsis); ::delete_fluid_player(pEngine->pPlayer); pEngine->pPlayer = nullptr; } // Destroy MIDI router. if (pEngine->pMidiRouter) { if (pEngine->pMidiDriver) { appendMessages(sPrefix + tr("Destroying MIDI driver") + sElipsis); ::delete_fluid_midi_driver(pEngine->pMidiDriver); pEngine->pMidiDriver = nullptr; } appendMessages(sPrefix + tr("Destroying MIDI router") + sElipsis); ::delete_fluid_midi_router(pEngine->pMidiRouter); pEngine->pMidiRouter = nullptr; } // Destroy audio driver. if (pEngine->pAudioDriver) { appendMessages(sPrefix + tr("Destroying audio driver") + sElipsis); ::delete_fluid_audio_driver(pEngine->pAudioDriver); pEngine->pAudioDriver = nullptr; pEngine->bMeterEnabled = false; } // Unload soundfonts from actual synth stack... const int iSoundFonts = ::fluid_synth_sfcount(pEngine->pSynth); for (int i = 0; i < iSoundFonts; ++i) { fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(pEngine->pSynth, i); if (pSoundFont) { #ifdef CONFIG_FLUID_SFONT_GET_ID const int iSFID = ::fluid_sfont_get_id(pSoundFont); #else const int iSFID = pSoundFont->id; #endif #ifdef CONFIG_FLUID_SFONT_GET_NAME const QString sSFName = ::fluid_sfont_get_name(pSoundFont); #else const QString sSFName = pSoundFont->get_name(pSoundFont); #endif appendMessagesColor(sPrefix + tr("Unloading soundfont: \"%1\" (SFID=%2)") .arg(sSFName).arg(iSFID) + sElipsis, "#999933"); if (::fluid_synth_sfunload(pEngine->pSynth, iSFID, 0) < 0) appendMessagesError(sPrefix + tr("Failed to unload the soundfont: \"%1\".") .arg(sSFName)); } } // And finally, destroy the synthesizer engine. if (pEngine->pSynth) { appendMessages(sPrefix + tr("Destroying synthesizer engine") + sElipsis); ::delete_fluid_synth(pEngine->pSynth); pEngine->pSynth = nullptr; // We're done. appendMessages(sPrefix + tr("Synthesizer engine terminated.")); } #ifdef QSYNTH_CUSTOM_LOADER // Remove engine from custom loader list, if any... qsynthEngineNode *pNode = g_pEngineList; while (pNode) { if (pNode->pEngine == pEngine ) { if (pNode->pPrev) (pNode->pPrev)->pNext = pNode->pNext; else g_pEngineList = pNode->pNext; if (pNode->pNext) (pNode->pNext)->pPrev = pNode->pPrev; delete pNode; break; } pNode = pNode->pNext; } #endif // Show up our efforts, if we're currently selected :p if (pEngine == currentEngine()) { resetChannelsForm(pEngine, true); stabilizeForm(); } // Wait a litle bit before continue... QElapsedTimer timer; timer.start(); while (timer.elapsed() < QSYNTH_DELAY_MSECS) QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); } // Start all synth engines (schedule). void qsynthMainForm::startAllEngines (void) { m_iTimerDelay = 0; } // Restart all synth engines. void qsynthMainForm::restartAllEngines (void) { // Always prompt user... const bool bRestart = (QMessageBox::warning(this, tr("Warning"), tr("New settings will be effective after\n" "restarting all fluidsynth engines.") + "\n\n" + tr("Please note that this operation may cause\n" "temporary MIDI and Audio disruption.") + "\n\n" + tr("Do you want to restart all engines now?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes); // Just restart every engine out there... if (bRestart) { // Restarting means stopping an engine... const int iTabCount = m_ui.TabBar->count(); for (int iTab = 0; iTab < iTabCount; ++iTab) stopEngine(m_ui.TabBar->engine(iTab)); // Must make this one grayed out for a while... m_ui.RestartPushButton->setEnabled(false); // And making room for immediate restart... startAllEngines(); } } // Start the fluidsynth clone, based on given settings. void qsynthMainForm::restartEngine ( qsynthEngine *pEngine ) { bool bRestart = true; // If currently running, prompt user... if (pEngine && pEngine->pSynth) { bRestart = (QMessageBox::warning(this, tr("Warning"), tr("New settings will be effective after\n" "restarting the fluidsynth engine:") + "\n\n" + pEngine->name() + "\n\n" + tr("Please note that this operation may cause\n" "temporary MIDI and Audio disruption.") + "\n\n" + tr("Do you want to restart the engine now?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes); } // If allowed, just restart the engine... if (bRestart) { // Must make current one grayed out for a while... if (pEngine == currentEngine()) m_ui.RestartPushButton->setEnabled(false); // Restarting means stopping the engine... stopEngine(pEngine); // And making room for immediate restart... startAllEngines(); } } // Engine reset (all channels program reset). void qsynthMainForm::resetEngine ( qsynthEngine *pEngine ) { if (pEngine && pEngine->pSynth) { appendMessagesColor(pEngine->name() + ": fluid_synth_program_reset()", "#996666"); ::fluid_synth_program_reset(pEngine->pSynth); } } // Engine gain settings. void qsynthMainForm::setEngineGain ( qsynthEngine *pEngine, float fGain ) { appendMessagesColor(pEngine->name() + ": fluid_synth_set_gain(" + QString::number(fGain) + ")", "#6699cc"); ::fluid_synth_set_gain(pEngine->pSynth, fGain); } // Engine reverb settings. void qsynthMainForm::setEngineReverbOn ( qsynthEngine *pEngine, bool bActive ) { appendMessagesColor(pEngine->name() + ": fluid_synth_set_reverb_on(" + QString::number((int) bActive) + ")", "#99cc33"); qsynth_set_reverb_on(pEngine->pSynth, (int) bActive); } void qsynthMainForm::setEngineReverb ( qsynthEngine *pEngine, double fRoom, double fDamp, double fWidth, double fLevel ) { appendMessagesColor(pEngine->name() + ": fluid_synth_set_reverb(" + QString::number(fRoom) + "," + QString::number(fDamp) + "," + QString::number(fWidth) + "," + QString::number(fLevel) + ")", "#99cc66"); qsynth_set_reverb(pEngine->pSynth, fRoom, fDamp, fWidth, fLevel); } // Engine chorus settings. void qsynthMainForm::setEngineChorusOn ( qsynthEngine *pEngine, bool bActive ) { appendMessagesColor(pEngine->name() + ": fluid_synth_set_chorus_on(" + QString::number((int) bActive) + ")", "#cc9933"); qsynth_set_chorus_on(pEngine->pSynth, (int) bActive); } void qsynthMainForm::setEngineChorus ( qsynthEngine *pEngine, int iNr, double fLevel, double fSpeed, double fDepth, int iType ) { appendMessagesColor(pEngine->name() + ": fluid_synth_set_chorus(" + QString::number(iNr) + "," + QString::number(fLevel) + "," + QString::number(fSpeed) + "," + QString::number(fDepth) + "," + QString::number(iType) + ")", "#cc9966"); qsynth_set_chorus(pEngine->pSynth, iNr, fLevel, fSpeed, fDepth, iType); } // Front panel state load routine. void qsynthMainForm::loadPanelSettings ( qsynthEngine *pEngine, bool bUpdate ) { if (pEngine == nullptr) return; // if (pEngine->pSynth == nullptr || pEngine->pAudioDriver == nullptr) // return; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return; // Reset change flags. m_iGainChanged = 0; m_iReverbChanged = 0; m_iChorusChanged = 0; // Avoid update races: set update counters > 0 ... m_iGainUpdated = 1; m_iReverbUpdated = 1; m_iChorusUpdated = 1; m_ui.GainDial->setDefaultValue(qsynth_set_range_value( m_ui.GainDial, QSYNTH_MASTER_GAIN_SCALE, pSetup->fGain)); m_ui.ReverbActiveCheckBox->setChecked(pSetup->bReverbActive); m_ui.ReverbRoomDial->setDefaultValue(qsynth_set_range_value( m_ui.ReverbRoomDial, QSYNTH_REVERB_ROOM_SCALE, pSetup->fReverbRoom)); m_ui.ReverbDampDial->setDefaultValue(qsynth_set_range_value( m_ui.ReverbDampDial, QSYNTH_REVERB_DAMP_SCALE, pSetup->fReverbDamp)); m_ui.ReverbWidthDial->setDefaultValue(qsynth_set_range_value( m_ui.ReverbWidthDial, QSYNTH_REVERB_WIDTH_SCALE, pSetup->fReverbWidth)); m_ui.ReverbLevelDial->setDefaultValue(qsynth_set_range_value( m_ui.ReverbLevelDial, QSYNTH_REVERB_LEVEL_SCALE, pSetup->fReverbLevel)); m_ui.ChorusActiveCheckBox->setChecked(pSetup->bChorusActive); m_ui.ChorusNrDial->setDefaultValue(pSetup->iChorusNr); m_ui.ChorusNrDial->setValue(pSetup->iChorusNr); m_ui.ChorusLevelDial->setDefaultValue(qsynth_set_range_value( m_ui.ChorusLevelDial, QSYNTH_CHORUS_LEVEL_SCALE, pSetup->fChorusLevel)); m_ui.ChorusSpeedDial->setDefaultValue(qsynth_set_range_value( m_ui.ChorusSpeedDial, QSYNTH_CHORUS_SPEED_SCALE, pSetup->fChorusSpeed)); m_ui.ChorusDepthDial->setDefaultValue(qsynth_set_range_value( m_ui.ChorusDepthDial, QSYNTH_CHORUS_DEPTH_SCALE, pSetup->fChorusDepth)); m_ui.ChorusTypeComboBox->setCurrentIndex(pSetup->iChorusType); // Make them dirty. if (bUpdate) { setEngineReverbOn(pEngine, pSetup->bReverbActive); setEngineChorusOn(pEngine, pSetup->bChorusActive); ++m_iGainChanged; ++m_iReverbChanged; ++m_iChorusChanged; } // Let them get updated, possibly on next tick. m_iGainUpdated = 0; m_iReverbUpdated = 0; m_iChorusUpdated = 0; } // Front panel state save routine. void qsynthMainForm::savePanelSettings ( qsynthEngine *pEngine ) { if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr || pEngine->pAudioDriver == nullptr) return; qsynthSetup *pSetup = pEngine->setup(); if (pSetup == nullptr) return; pSetup->fGain = qsynth_get_range_value( m_ui.GainSpinBox, QSYNTH_MASTER_GAIN_SCALE); pSetup->bReverbActive = m_ui.ReverbActiveCheckBox->isChecked(); pSetup->fReverbRoom = qsynth_get_range_value( m_ui.ReverbRoomSpinBox, QSYNTH_REVERB_ROOM_SCALE); pSetup->fReverbDamp = qsynth_get_range_value( m_ui.ReverbDampSpinBox, QSYNTH_REVERB_DAMP_SCALE); pSetup->fReverbWidth = qsynth_get_range_value( m_ui.ReverbWidthSpinBox, QSYNTH_REVERB_WIDTH_SCALE); pSetup->fReverbLevel = qsynth_get_range_value( m_ui.ReverbLevelSpinBox, QSYNTH_REVERB_LEVEL_SCALE); pSetup->bChorusActive = m_ui.ChorusActiveCheckBox->isChecked(); pSetup->iChorusNr = m_ui.ChorusNrSpinBox->value(); pSetup->fChorusLevel = qsynth_get_range_value( m_ui.ChorusLevelSpinBox, QSYNTH_CHORUS_LEVEL_SCALE); pSetup->fChorusSpeed = qsynth_get_range_value( m_ui.ChorusSpeedSpinBox, QSYNTH_CHORUS_SPEED_SCALE); pSetup->fChorusDepth = qsynth_get_range_value( m_ui.ChorusDepthSpinBox, QSYNTH_CHORUS_DEPTH_SCALE); pSetup->iChorusType = m_ui.ChorusTypeComboBox->currentIndex(); } // Complete refresh of the floating channels form. void qsynthMainForm::resetChannelsForm ( qsynthEngine *pEngine, bool bPreset ) { if (m_pChannelsForm == nullptr) return; // Setup the channels view window. m_pChannelsForm->setup(m_pOptions, pEngine, bPreset); // Reset the channel event state flaggers. if (g_pMidiChannels) delete [] g_pMidiChannels; g_pMidiChannels = nullptr; g_iMidiChannels = 0; // Prepare the new channel event state flaggers. if (pEngine && pEngine->pSynth) g_iMidiChannels = ::fluid_synth_count_midi_channels(pEngine->pSynth); if (g_iMidiChannels > 0) g_pMidiChannels = new qsynth_midi_channel [g_iMidiChannels]; if (g_pMidiChannels) { for (int iChan = 0; iChan < g_iMidiChannels; ++iChan) { g_pMidiChannels[iChan].iEvent = 0; g_pMidiChannels[iChan].iState = 0; g_pMidiChannels[iChan].iChange = 0; } } } // Increment reverb change flag. void qsynthMainForm::reverbActivate ( bool bActive ) { if (m_iReverbUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; setEngineReverbOn(pEngine, bActive); if (bActive) refreshReverb(); stabilizeForm(); } // Increment chorus change flag. void qsynthMainForm::chorusActivate ( bool bActive ) { if (m_iChorusUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; setEngineChorusOn(pEngine, bActive); if (bActive) refreshChorus(); stabilizeForm(); } // Increment gain change flag. void qsynthMainForm::gainChanged (int) { if (m_iGainUpdated == 0) m_iGainChanged++; } // Increment reverb change flag. void qsynthMainForm::reverbChanged (int) { if (m_iReverbUpdated == 0) m_iReverbChanged++; } // Increment chorus change flag. void qsynthMainForm::chorusChanged (int) { if (m_iChorusUpdated == 0) m_iChorusChanged++; } // Reset gain state. void qsynthMainForm::resetGain (void) { if (m_iGainUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iGainUpdated++; const float fGain = QSYNTH_MASTER_DEFAULT_GAIN; setEngineGain(pEngine, fGain); refreshGain(); m_iGainUpdated--; m_iGainChanged = 0; } // Reset reverb state. void qsynthMainForm::resetReverb (void) { if (m_iReverbUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iReverbUpdated++; const double fReverbRoom = QSYNTH_REVERB_DEFAULT_ROOMSIZE; const double fReverbDamp = QSYNTH_REVERB_DEFAULT_DAMP; const double fReverbWidth = QSYNTH_REVERB_DEFAULT_WIDTH; const double fReverbLevel = QSYNTH_REVERB_DEFAULT_LEVEL; setEngineReverb(pEngine, fReverbRoom, fReverbDamp, fReverbWidth, fReverbLevel); refreshReverb(); m_iReverbUpdated--; m_iReverbChanged = 0; } // Reset chorus state. void qsynthMainForm::resetChorus (void) { if (m_iChorusUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iChorusUpdated++; const int iChorusNr = QSYNTH_CHORUS_DEFAULT_N; const double fChorusLevel = QSYNTH_CHORUS_DEFAULT_LEVEL; const double fChorusSpeed = QSYNTH_CHORUS_DEFAULT_SPEED; const double fChorusDepth = QSYNTH_CHORUS_DEFAULT_DEPTH; const int iChorusType = QSYNTH_CHORUS_DEFAULT_TYPE; setEngineChorus(pEngine, iChorusNr, fChorusLevel, fChorusSpeed, fChorusDepth, iChorusType); refreshChorus(); m_iChorusUpdated--; m_iChorusChanged = 0; } // Update gain state. void qsynthMainForm::updateGain (void) { if (m_iGainUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iGainUpdated++; const float fGain = qsynth_get_range_value( m_ui.GainSpinBox, QSYNTH_MASTER_GAIN_SCALE); setEngineGain(pEngine, fGain); refreshGain(); m_iGainUpdated--; m_iGainChanged = 0; } // Update reverb state. void qsynthMainForm::updateReverb (void) { if (m_iReverbUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iReverbUpdated++; const double fReverbRoom = qsynth_get_range_value( m_ui.ReverbRoomSpinBox, QSYNTH_REVERB_ROOM_SCALE); const double fReverbDamp = qsynth_get_range_value( m_ui.ReverbDampSpinBox, QSYNTH_REVERB_DAMP_SCALE); const double fReverbWidth = qsynth_get_range_value( m_ui.ReverbWidthSpinBox, QSYNTH_REVERB_WIDTH_SCALE); const double fReverbLevel = qsynth_get_range_value( m_ui.ReverbLevelSpinBox, QSYNTH_REVERB_LEVEL_SCALE); setEngineReverb(pEngine, fReverbRoom, fReverbDamp, fReverbWidth, fReverbLevel); refreshReverb(); m_iReverbUpdated--; m_iReverbChanged = 0; } // Update chorus state. void qsynthMainForm::updateChorus (void) { if (m_iChorusUpdated > 0) return; qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; m_iChorusUpdated++; const int iChorusNr = m_ui.ChorusNrSpinBox->value(); const double fChorusLevel = qsynth_get_range_value( m_ui.ChorusLevelSpinBox, QSYNTH_CHORUS_LEVEL_SCALE); const double fChorusSpeed = qsynth_get_range_value( m_ui.ChorusSpeedSpinBox, QSYNTH_CHORUS_SPEED_SCALE); const double fChorusDepth = qsynth_get_range_value( m_ui.ChorusDepthSpinBox, QSYNTH_CHORUS_DEPTH_SCALE); const int iChorusType = m_ui.ChorusTypeComboBox->currentIndex(); setEngineChorus(pEngine, iChorusNr, fChorusLevel, fChorusSpeed, fChorusDepth, iChorusType); refreshChorus(); m_iChorusUpdated--; m_iChorusChanged = 0; } // Refresh gain panel controls. void qsynthMainForm::refreshGain (void) { qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; float fGain = ::fluid_synth_get_gain(pEngine->pSynth); qsynth_set_range_value( m_ui.GainDial, QSYNTH_MASTER_GAIN_SCALE, fGain); } // Refresh reverb panel controls. void qsynthMainForm::refreshReverb (void) { qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; double fReverbRoom = 0.0; double fReverbDamp = 0.0; double fReverbWidth = 0.0; double fReverbLevel = 0.0; qsynth_get_reverb(pEngine->pSynth, &fReverbRoom, &fReverbDamp, &fReverbWidth, &fReverbLevel); qsynth_set_range_value( m_ui.ReverbRoomDial, QSYNTH_REVERB_ROOM_SCALE, fReverbRoom); qsynth_set_range_value( m_ui.ReverbDampDial, QSYNTH_REVERB_DAMP_SCALE, fReverbDamp); qsynth_set_range_value( m_ui.ReverbWidthDial, QSYNTH_REVERB_WIDTH_SCALE, fReverbWidth); qsynth_set_range_value( m_ui.ReverbLevelDial, QSYNTH_REVERB_LEVEL_SCALE, fReverbLevel); } // Refresh chorus panel controls. void qsynthMainForm::refreshChorus (void) { qsynthEngine *pEngine = currentEngine(); if (pEngine == nullptr) return; if (pEngine->pSynth == nullptr) return; int iChorusNr = 0; double fChorusLevel = 0.0; double fChorusSpeed = 0.0; double fChorusDepth = 0.0; int iChorusType = 0; qsynth_get_chorus(pEngine->pSynth, &iChorusNr, &fChorusLevel, &fChorusSpeed, &fChorusDepth, &iChorusType); m_ui.ChorusNrDial->setValue(iChorusNr); qsynth_set_range_value( m_ui.ChorusLevelDial, QSYNTH_CHORUS_LEVEL_SCALE, fChorusLevel); qsynth_set_range_value( m_ui.ChorusSpeedDial, QSYNTH_CHORUS_SPEED_SCALE, fChorusSpeed); qsynth_set_range_value( m_ui.ChorusDepthDial, QSYNTH_CHORUS_DEPTH_SCALE, fChorusDepth); m_ui.ChorusTypeComboBox->setCurrentIndex(iChorusType); } // Select the current default preset name from context menu. void qsynthMainForm::activateEnginesMenu ( QAction *pAction ) { const int iTab = pAction->data().toInt(); if (iTab < 0) return; m_ui.TabBar->setCurrentIndex(iTab); } // Close main form slot. void qsynthMainForm::quitMainForm (void) { #ifdef CONFIG_SYSTEM_TRAY // Flag that we're quitting explicitly. m_bQuitClose = true; #endif // And then, do the closing dance. close(); } // Context menu event handler. void qsynthMainForm::contextMenuEvent ( QContextMenuEvent *pEvent ) { m_menu.exec(pEvent->globalPos()); } void qsynthMainForm::updateKnobs (void) { if (m_pOptions == nullptr) return; if (m_pKnobStyle) delete m_pKnobStyle; const KnobStyle style = KnobStyle(m_pOptions->iKnobStyle); switch (style) { case Classic: m_pKnobStyle = new qsynthDialClassicStyle(); break; case Vokimon: m_pKnobStyle = new qsynthDialVokiStyle(); break; case Peppino: m_pKnobStyle = new qsynthDialPeppinoStyle(); break; case Skulpture: m_pKnobStyle = new qsynthDialSkulptureStyle(); break; default: m_pKnobStyle = nullptr; break; } const qsynthKnob::DialMode mode = qsynthKnob::DialMode(m_pOptions->iKnobMotion); QList allKnobs = findChildren(); foreach (qsynthKnob* knob, allKnobs) { knob->setStyle(m_pKnobStyle); knob->setDialMode(mode); } } void qsynthMainForm::commitData ( QSessionManager& sm ) { sm.release(); #ifdef CONFIG_SYSTEM_TRAY m_bQuitClose = true; #endif m_bQuitForce = true; } // end of qsynthMainForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthDialPeppinoStyle.cpp0000644000000000000000000000013214771226115020114 xustar0030 mtime=1743072333.108076199 30 atime=1743072333.108076199 30 ctime=1743072333.108076199 qsynth-1.0.3/src/qsynthDialPeppinoStyle.cpp0000644000175000001440000001417614771226115020115 0ustar00rncbcusers/*************************************************************************** This style is based on a widget designed by Giuseppe Cigala, adapted as a Qt style for QSynth by Pedro Lopez-Cabanillas This file, Copyright (C) 2019 rncbc aka Rui Nuno Capela , Copyright (C) 2008 Giuseppe Cigala , Copyright (C) 2008 Pedro Lopez-Cabanillas , Copyright (C) 2024 Rui Nuno Capela . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthDialPeppinoStyle.h" #include #include #include #include inline void paintBorder(QPainter *p, const QStyleOptionSlider *dial) { #if 0//--rncbc Sep 25 2024 p->setPen(QPen(Qt::black, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); QLinearGradient linGrad1(0, 100, 100, 80); linGrad1.setColorAt(0, Qt::gray); linGrad1.setColorAt(1, Qt::white); linGrad1.setSpread(QGradient::ReflectSpread); p->setBrush(linGrad1); QRectF border(5, 5, 190, 190); p->drawRect(border); #endif // draw screws p->setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); p->drawEllipse(10, 10, 10, 10); p->drawLine(13, 13, 17, 17); p->drawLine(17, 13, 13, 17); p->drawEllipse(180, 10, 10, 10); p->drawLine(183, 13, 187, 17); p->drawLine(187, 13, 183, 17); p->drawEllipse(10, 180, 10, 10); p->drawLine(13, 183, 17, 187); p->drawLine(17, 183, 13, 187); p->drawEllipse(180, 180, 10, 10); p->drawLine(183, 183, 187, 187); p->drawLine(187, 183, 183, 187); QLinearGradient linGrad(20, 150, 210, 160); #if 0//--rncbc Sep 25 2024 linGrad.setColorAt(0, Qt::white); linGrad.setColorAt(1, Qt::drakGray); #else const QPalette& pal = dial->palette; const QColor& btnColor = pal.button().color(); linGrad.setColorAt(0, btnColor.value() < 0x7f ? btnColor.lighter() : btnColor.darker()); linGrad.setColorAt(1, btnColor); #endif linGrad.setSpread(QGradient::PadSpread); p->setBrush(linGrad); p->setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); QRectF rectangle(15, 15, 170, 170); p->drawPie(rectangle, 225*16, -270*16); } inline int valueAngle(const QStyleOptionSlider *dial) { return -((dial->sliderValue - dial->minimum) * 4320) / (dial->maximum - dial->minimum); } inline void paintArc(QPainter *p, const QStyleOptionSlider *dial) { QPalette pal = dial->palette; QColor arcColor = (dial->state & QStyle::State_Enabled) ? pal.highlight().color() : pal.mid().color(); QLinearGradient linGrad(80, 100, 140, 140); linGrad.setColorAt(0, arcColor.darker(140)); linGrad.setColorAt(1, arcColor.lighter().lighter()); linGrad.setSpread(QGradient::PadSpread); p->setBrush(linGrad); p->setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); QRectF rectangle(15, 15, 170, 170); int spanAngle = valueAngle(dial); int startAngle = 225 * 16; p->drawPie(rectangle, startAngle, spanAngle); } inline void paintDial(QPainter *p, const QStyleOptionSlider *dial) { p->setPen(QPen(Qt::black, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); QLinearGradient linGrad1(20, 140, 90, 90); #if 0//--rncbc Sep 25 2024 linGrad1.setColorAt(0, Qt::gray); linGrad1.setColorAt(1, Qt::white); #else const QPalette& pal = dial->palette; const QColor& btnColor = pal.button().color(); linGrad1.setColorAt(0, btnColor); linGrad1.setColorAt(1, btnColor.value() < 0x7f ? btnColor.lighter() : btnColor.darker()); #endif linGrad1.setSpread(QGradient::ReflectSpread); p->setBrush(linGrad1); QRectF border1(35, 35, 130, 130); p->drawEllipse(border1); p->setPen(QPen(Qt::black, 1, Qt::DotLine, Qt::RoundCap, Qt::RoundJoin)); QRectF border2(40, 40, 120, 120); p->drawEllipse(border2); } inline void paintDot(QPainter *p, const QStyleOptionSlider *dial) { int startPoint = (225 * 16) + valueAngle(dial); QPalette pal = dial->palette; QPen dotPen((dial->state & QStyle::State_Enabled) ? Qt::red : pal.mid().color(), 7, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); QRect rectangle1(45, 45, 110, 110); p->setPen(dotPen); p->drawArc(rectangle1, startPoint, 5); if (dial->subControls & QStyle::SC_DialTickmarks) { QRect rectangle2(10, 10, 180, 180); int ns = dial->tickInterval; int dot = 1 + (dial->maximum + ns - dial->minimum) / ns; //int dot = 25; double delta = 4320.0 / dot; p->setPen(QPen(Qt::black, 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); for (int i = 0; i <= dot; i++) { p->drawArc(rectangle2, int(225*16 - delta*i), 5); } } } void qsynthDialPeppinoStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const { if (cc != QStyle::CC_Dial) { QCommonStyle::drawComplexControl(cc, opt, p, widget); return; } const QStyleOptionSlider *dial = qstyleoption_cast(opt); if (dial == nullptr) return; p->save(); int size = dial->rect.width() < dial->rect.height() ? dial->rect.width() : dial->rect.height(); p->setViewport((dial->rect.width()-size)/2, (dial->rect.height()-size)/2, size, size); p->setWindow(0, 0, 200, 200); p->setRenderHint(QPainter::Antialiasing); paintBorder(p, dial); paintArc(p, dial); paintDial(p, dial); paintDot(p, dial); // done p->restore(); } qsynth-1.0.3/src/PaxHeaders/qsynthPresetForm.cpp0000644000000000000000000000013214771226115016755 xustar0030 mtime=1743072333.114076168 30 atime=1743072333.114076168 30 ctime=1743072333.114076168 qsynth-1.0.3/src/qsynthPresetForm.cpp0000644000175000001440000003227514771226115016756 0ustar00rncbcusers// qsynthPresetForm.cpp // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthPresetForm.h" #include "qsynthOptions.h" #include #include #include // Custom list-view item (as for numerical sort purposes...) class qsynthPresetItem : public QTreeWidgetItem { public: // Constructor. qsynthPresetItem(QTreeWidget *pListView, QTreeWidgetItem *pItemAfter) : QTreeWidgetItem(pListView, pItemAfter) {} // Sort/compare overriden method. bool operator< (const QTreeWidgetItem& other) const { int iColumn = QTreeWidgetItem::treeWidget()->sortColumn(); const QString& s1 = text(iColumn); const QString& s2 = other.text(iColumn); if (iColumn == 0 || iColumn == 2) { return (s1.toInt() < s2.toInt()); } else { return (s1 < s2); } } }; //---------------------------------------------------------------------------- // qsynthPresetForm -- UI wrapper form. // Constructor. qsynthPresetForm::qsynthPresetForm ( QWidget *pParent ) : QDialog(pParent) { // Setup UI struct... m_ui.setupUi(this); m_pSynth = nullptr; m_iChan = 0; m_iBank = 0; m_iProg = 0; // To avoid setup jitterness and preview side effects. m_iDirtySetup = 0; m_iDirtyCount = 0; // Some default sorting, initially. //m_ui.BankListView->setSorting(0); //m_ui.ProgListView->setSorting(0); // Soundfonts list view... QHeaderView *pHeader = m_ui.ProgListView->header(); pHeader->setDefaultAlignment(Qt::AlignLeft); // pHeader->setDefaultSectionSize(200); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // pHeader->setSectionResizeMode(QHeaderView::Custom); pHeader->setSectionsMovable(false); #else // pHeader->setResizeMode(QHeaderView::Custom); pHeader->setMovable(false); #endif pHeader->setStretchLastSection(true); m_ui.ProgListView->resizeColumnToContents(0); // Prog. pHeader->resizeSection(1, 200); // Name. m_ui.ProgListView->resizeColumnToContents(2); // SFID. m_ui.ProgListView->resizeColumnToContents(3); // Soundfont. // Initial sort order... m_ui.BankListView->sortItems(0, Qt::AscendingOrder); m_ui.ProgListView->sortItems(0, Qt::AscendingOrder); // UI connections... QObject::connect(m_ui.BankListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(bankChanged())); QObject::connect(m_ui.ProgListView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), SLOT(progChanged())); QObject::connect(m_ui.PreviewCheckBox, SIGNAL(toggled(bool)), SLOT(previewChanged())); // QObject::connect(m_ui.ProgListView, // SIGNAL(itemActivated(QTreeWidgetItem*,int)), // SLOT(accept())); QObject::connect(m_ui.ProgListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(accepted()), SLOT(accept())); QObject::connect(m_ui.DialogButtonBox, SIGNAL(rejected()), SLOT(reject())); } // Destructor. qsynthPresetForm::~qsynthPresetForm (void) { } // Dialog setup loader. void qsynthPresetForm::setup ( qsynthOptions *pOptions, fluid_synth_t *pSynth, int iChan ) { // Set our internal stuff... m_pOptions = pOptions; m_pSynth = pSynth; m_iChan = iChan; // We'll goinfg to changes the whole thing... m_iDirtySetup++; // Set the proper caption... setWindowTitle(tr("Channel %1").arg(m_iChan + 1)); // Load bank list from actual synth stack... m_ui.BankListView->setUpdatesEnabled(false); m_ui.BankListView->setSortingEnabled(false); m_ui.BankListView->clear(); QTreeWidgetItem *pBankItem = nullptr; // For all soundfonts (in reversed stack order) fill the available banks... int cSoundFonts = ::fluid_synth_sfcount(m_pSynth); for (int i = 0; i < cSoundFonts; ++i) { fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i); if (pSoundFont) { #ifdef CONFIG_FLUID_BANK_OFFSET #ifdef CONFIG_FLUID_SFONT_GET_ID const int iSFID = ::fluid_sfont_get_id(pSoundFont); #else const int iSFID = pSoundFont->id; #endif const int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, iSFID); #endif #ifdef CONFIG_FLUID_SFONT_ITERATION_START ::fluid_sfont_iteration_start(pSoundFont); #else pSoundFont->iteration_start(pSoundFont); #endif fluid_preset_t *pPreset; #ifdef CONFIG_FLUID_SFONT_ITERATION_NEXT while ((pPreset = ::fluid_sfont_iteration_next(pSoundFont)) != nullptr) { #else fluid_preset_t preset; pPreset = &preset; while (pSoundFont->iteration_next(pSoundFont, pPreset)) { #endif #ifdef CONFIG_FLUID_PRESET_GET_BANKNUM int iBank = ::fluid_preset_get_banknum(pPreset); #else int iBank = pPreset->get_banknum(pPreset); #endif #ifdef CONFIG_FLUID_BANK_OFFSET iBank += iBankOffset; #endif if (!findBankItem(iBank)) { pBankItem = new qsynthPresetItem(m_ui.BankListView, pBankItem); if (pBankItem) pBankItem->setText(0, QString::number(iBank)); } } } } m_ui.BankListView->setSortingEnabled(true); m_ui.BankListView->setUpdatesEnabled(true); // Set the selected bank. m_iBank = 0; #ifdef CONFIG_FLUID_CHANNEL_INFO fluid_synth_channel_info_t info; ::memset(&info, 0, sizeof(info)); ::fluid_synth_get_channel_info(m_pSynth, iChan, &info); if (info.assigned) { m_iBank = info.bank; #ifdef CONFIG_FLUID_BANK_OFFSET m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, info.sfont_id); #endif } #else fluid_preset_t *pPreset = ::fluid_synth_get_channel_preset(m_pSynth, m_iChan); if (pPreset) { #ifdef CONFIG_FLUID_PRESET_GET_BANKNUM m_iBank = ::fluid_preset_get_banknum(pPreset); #else m_iBank = pPreset->get_banknum(pPreset); #endif #ifdef CONFIG_FLUID_BANK_OFFSET int iSFID = 0; #ifdef CONFIG_FLUID_PRESET_GET_SFONT fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset); #else fluid_sfont_t *pSoundFont = pPreset->sfont; #endif if (pSoundFont) { #ifdef CONFIG_FLUID_SFONT_GET_ID iSFID = ::fluid_sfont_get_id(pSoundFont); #else iSFID = pSoundFont->id; #endif } m_iBank += ::fluid_synth_get_bank_offset(m_pSynth, iSFID); #endif } #endif pBankItem = findBankItem(m_iBank); m_ui.BankListView->setCurrentItem(pBankItem); // m_ui.BankListView->ensureItemVisible(pBankItem); bankChanged(); // Set the selected program. #ifdef CONFIG_FLUID_CHANNEL_INFO if (info.assigned) m_iProg = info.program; #else if (pPreset) #if CONFIG_FLUID_PRESET_GET_NUM m_iProg = ::fluid_preset_get_num(pPreset); #else m_iProg = pPreset->get_num(pPreset); #endif #endif QTreeWidgetItem *pProgItem = findProgItem(m_iProg); m_ui.ProgListView->setCurrentItem(pProgItem); // m_ui.ProgListView->ensureItemVisible(pProgItem); // And the preview state... m_ui.PreviewCheckBox->setChecked(m_pOptions->bPresetPreview); // Done with setup... m_iDirtySetup--; } // Stabilize current state form. void qsynthPresetForm::stabilizeForm() { m_ui.DialogButtonBox->button( QDialogButtonBox::Ok)->setEnabled(validateForm()); } // Validate form fields. bool qsynthPresetForm::validateForm() { bool bValid = true; bValid = bValid && (m_ui.BankListView->currentItem() != nullptr); bValid = bValid && (m_ui.ProgListView->currentItem() != nullptr); return bValid; } // Realize a bank-program selection preset. void qsynthPresetForm::setBankProg ( int iBank, int iProg ) { if (m_pSynth == nullptr) return; // just select the synth's program preset... ::fluid_synth_bank_select(m_pSynth, m_iChan, iBank); ::fluid_synth_program_change(m_pSynth, m_iChan, iProg); // Maybe this is needed to stabilize things around. ::fluid_synth_program_reset(m_pSynth); } // Validate form fields and accept it valid. void qsynthPresetForm::accept() { if (validateForm()) { // Unload from current selected dialog items. int iBank = (m_ui.BankListView->currentItem())->text(0).toInt(); int iProg = (m_ui.ProgListView->currentItem())->text(0).toInt(); // And set it right away... setBankProg(iBank, iProg); // Do remember preview state... if (m_pOptions) m_pOptions->bPresetPreview = m_ui.PreviewCheckBox->isChecked(); // We got it. QDialog::accept(); } } // Reject settings (Cancel button slot). void qsynthPresetForm::reject (void) { // Reset selection to initial selection, if applicable... if (m_iDirtyCount > 0) setBankProg(m_iBank, m_iProg); // Done (hopefully nothing). QDialog::reject(); } // Find the bank item of given bank number id. QTreeWidgetItem *qsynthPresetForm::findBankItem ( int iBank ) { QList banks = m_ui.BankListView->findItems( QString::number(iBank), Qt::MatchExactly, 0); QListIterator iter(banks); if (iter.hasNext()) return iter.next(); else return nullptr; } // Find the program item of given program number id. QTreeWidgetItem *qsynthPresetForm::findProgItem ( int iProg ) { QList progs = m_ui.ProgListView->findItems( QString::number(iProg), Qt::MatchExactly, 0); QListIterator iter(progs); if (iter.hasNext()) return iter.next(); else return nullptr; } // Bank change slot. void qsynthPresetForm::bankChanged (void) { if (m_pSynth == nullptr) return; QTreeWidgetItem *pBankItem = m_ui.BankListView->currentItem(); if (pBankItem == nullptr) return; int iBankSelected = pBankItem->text(0).toInt(); // Clear up the program listview. m_ui.ProgListView->setUpdatesEnabled(false); m_ui.ProgListView->setSortingEnabled(false); m_ui.ProgListView->clear(); // fluid_preset_t preset; QTreeWidgetItem *pProgItem = nullptr; // For all soundfonts (in reversed stack order) fill the available programs... int cSoundFonts = ::fluid_synth_sfcount(m_pSynth); for (int i = 0; i < cSoundFonts; ++i) { fluid_sfont_t *pSoundFont = ::fluid_synth_get_sfont(m_pSynth, i); if (pSoundFont) { #ifdef CONFIG_FLUID_SFONT_GET_ID const int iSFID = ::fluid_sfont_get_id(pSoundFont); #else const int iSFID = pSoundFont->id; #endif #ifdef CONFIG_FLUID_SFONT_GET_NAME const QString sSFName = ::fluid_sfont_get_name(pSoundFont); #else const QString sSFName = pSoundFont->get_name(pSoundFont); #endif #ifdef CONFIG_FLUID_BANK_OFFSET const int iBankOffset = ::fluid_synth_get_bank_offset(m_pSynth, iSFID); #endif #ifdef CONFIG_FLUID_SFONT_ITERATION_START ::fluid_sfont_iteration_start(pSoundFont); #else pSoundFont->iteration_start(pSoundFont); #endif fluid_preset_t *pPreset; #ifdef CONFIG_FLUID_SFONT_ITERATION_NEXT while ((pPreset = ::fluid_sfont_iteration_next(pSoundFont)) != nullptr) { #else fluid_preset_t preset; pPreset = &preset; while (pSoundFont->iteration_next(pSoundFont, pPreset)) { #endif #ifdef CONFIG_FLUID_PRESET_GET_BANKNUM int iBank = ::fluid_preset_get_banknum(pPreset); #else int iBank = pPreset->get_banknum(pPreset); #endif #ifdef CONFIG_FLUID_BANK_OFFSET iBank += iBankOffset; #endif #ifdef CONFIG_FLUID_PRESET_GET_NUM const int iProg = ::fluid_preset_get_num(pPreset); #else const int iProg = pPreset->get_num(pPreset); #endif if (iBank == iBankSelected && !findProgItem(iProg)) { pProgItem = new qsynthPresetItem(m_ui.ProgListView, pProgItem); if (pProgItem) { #ifdef CONFIG_FLUID_PRESET_GET_NAME const QString sName = ::fluid_preset_get_name(pPreset); #else const QString sName = pPreset->get_name(pPreset); #endif pProgItem->setText(0, QString::number(iProg)); pProgItem->setText(1, sName); pProgItem->setText(2, QString::number(iSFID)); pProgItem->setText(3, QFileInfo(sSFName).baseName()); } } } } } m_ui.ProgListView->setSortingEnabled(true); m_ui.ProgListView->setUpdatesEnabled(true); // Stabilize the form. stabilizeForm(); } // Program change slot. void qsynthPresetForm::progChanged (void) { if (m_pSynth == nullptr) return; // Which preview state... if (m_ui.PreviewCheckBox->isChecked() && validateForm()) { // Set current selection. int iBank = (m_ui.BankListView->currentItem())->text(0).toInt(); int iProg = (m_ui.ProgListView->currentItem())->text(0).toInt(); // And set it right away... setBankProg(iBank, iProg); // Now we're dirty nuff. m_iDirtyCount++; } // Have we done anything dirty before? else if (m_iDirtyCount > 0) { // Restore initial preset... setBankProg(m_iBank, m_iProg); // And we're clean again. m_iDirtyCount = 0; } // Stabilize the form. stabilizeForm(); } // Preview change slot. void qsynthPresetForm::previewChanged (void) { // Just like a program change, if not on setup... if (m_iDirtySetup == 0) progChanged(); } // end of qsynthPresetForm.cpp qsynth-1.0.3/src/PaxHeaders/translations0000644000000000000000000000013214771226115015360 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.116076158 30 ctime=1743072333.118076147 qsynth-1.0.3/src/translations/0000755000175000001440000000000014771226115015425 5ustar00rncbcusersqsynth-1.0.3/src/translations/PaxHeaders/qsynth_sr.ts0000644000000000000000000000013214771226115020037 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.118076147 30 ctime=1743072333.118076147 qsynth-1.0.3/src/translations/qsynth_sr.ts0000644000175000001440000027471614771226115020050 0ustar00rncbcusers QObject (default) (подразумевано) Usage: %1 [options] [soundfonts] [midifiles] Options Параметри Don't create a midi driver to read MIDI input events [default = yes] Не стварај миди посредника за читање улазних миди-догађаја [подразумевано = yes] The name of the midi driver to use [oss,alsa,alsa_seq,...] Назив миди посредника који ће се користити [oss,alsa,alsa_seq,...] The number of midi channels [default = 16] Број миди-канала [подразумевано = 16] The audio driver [alsa,jack,oss,dsound,...] Звучни посредник [alsa,jack,oss,dsound,...] Attempt to connect the jack outputs to the physical ports Покушавај да повежеш излазе Џек посредника на физичке портове The number of stereo audio channels [default = 1] Број звучних стерео канала [подразумевано = 1] The number of audio groups [default = 1] Број звучних група [подразумевано = 1] Size of each audio buffer Величина сваког звучног бафера Number of audio buffers Број звучних бафера Set the sample rate Постави учестаност узорковања Turn the reverb on or off [1|0|yes|no|on|off, default = on] Укљ./Искљ. јека еф. [1|0|yes|no|on|off, подразумевано = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Укљ./Искљ. хорус еф. [1|0|yes|no|on|off, подразумевано = on] Set the master gain [0 < gain < 2, default = 1] Постави Мастер-појачање [0 < gain < 2, подразумевано = 1] Define a setting name=value Одреди назив поставке=вредност Create and start server [default = no] Створи и покрени сервер [подразумевано = no] Don't read commands from the shell [ignored] Не читај команде из наредбене линије [занемарено] Dump midi router events Избаци догађаје миди-рутера Print out verbose messages about midi events Штампај опширније поруке о миди-догађајима Show help about command line options Show version information Set the master gain [0 < gain < 10, default = 1] SoundFont Files [soundfonts] MIDI Files [midifiles] Option -m requires an argument (midi-driver). Опција „-m“ захтева аргумент (миди посредник). Option -K requires an argument (midi-channels). Опција „-K“ захтева аргумент (миди-канали). Option -a requires an argument (audio-driver). Опција „-a“ захтева аргумент (звучни посредник). Option -L requires an argument (audio-channels). Опција „-L“ захтева аргумент (звучни канали). Option -G requires an argument (audio-groups). Опција „-G“ захтева аргумент (звучне групе). Option -z requires an argument (audio-bufsize). Опција „-z“ захтева аргумент (вел. зв. бафера). Option -c requires an argument (audio-bufcount). Опција „-c“ захтева аргумент (број зв. бафера). Option -r requires an argument (sample-rate). Опција „-r“ захтева аргумент (учестаност узорковања). Option -g requires an argument (gain). Опција „-g“ захтева аргумент (појачање). Option -o requires an argument. Опција „-o“ захтева аргумент. Unknown option '%1'. Непозната опција „%1“. qsynthAboutForm About О програму &Close &Затвори About Qt О КуТ Version Издање Debugging option enabled. Омогућено праћење грешака. System tray disabled. Онемогућена икона у обавештајној зони. Server option disabled. Онемогућена серверска опција. System reset option disabled. Онемогућена опција поновног покретања система. Bank offset option disabled. Онемогућена опција офсет банке. Using: Qt %1 FluidSynth %1 Website Интернет страница This program is free software; you can redistribute it and/or modify it Овај програм је слободан софтвер; можете га прослеђивати и/или мењати under the terms of the GNU General Public License version 2 or later. под условима ГНУ Опште Јавне Лиценце верзије 2 или (по вашем избору) било које касније верзије. qsynthChannelsForm Preset &Name: &Назив поставке: Settings preset name Подешавања назива поставке (default) (подразумевано) Save settings as current preset name Сачувај подешавања као текући назив поставке &Save &Сачувај Delete current settings preset Уклони текуће подешавање поставке &Delete &Уклони Channels view Преглед канала In Ул. Chan Канал Bank Банка Prog Програм Name Назив SFID З-ИБ Soundfont Звукотека Channels Канали Edit Уреди Unset Ослободи Refresh Освежи Warning Упозорење Delete preset: Уклањање поставке: Are you sure? Да ли сте сигурни? qsynthMainForm Master Мастер &Gain По&јачање Master Gain Главни појачавач Complete engine restart Наново покрени све Re&start Ре&старт Reverb Јека Reverb effect activation Покретање ефекта јеке Ac&tive О&могући Reverb Level Количина ефекта јеке &Level Ко&личина Reverb Width Ширина ефекта јеке &Width &Ширина Reverb Damp Factor Фактор пригушивања ефекта јеке D&amp При&гушено Reverb Room Size Величина собе за ефекат јеке R&oom С&оба Chorus Хорус Chorus Modulation Type Врста модулације за хорус ефекат Sine синусна Triangle троугласта T&ype: Врс&та: Chorus effect activation Покретање хорус ефекта Act&ive Омогућ&и Number of Chorus Stages Број етапа хорус ефекта &N &Број Chorus Level Количина хорус ефекта Le&vel Коли&чина Chorus Speed (Hz) Брзина хоруса (Hz) Chorus Speed Hz Брзина хоруса у херцима Spee&d Брзин&а Chorus Depth (ms) Дубина хоруса у милисекундама Dept&h &Дубина Output peak level Ниво вршних вредности на излазу Quit this application Напуштање програма &Quit И&злаз Show general options dialog Прикажи прозорче са општим опцијама &Options... &Опције… Show/hide the messages log window Приказује/Скрива прозорче за преглед дневника са порукама &Messages Порук&е Show information about this application Прикажи податке о овом програму A&bout... О про&граму… System reset Ресет система &Panic &Узбуна Program reset (all channels) Ресет програма (на свим каналима) &Reset &Ресет Show instance settings and configuration dialog Приказује прозорче поставки и подешавања Set&up... &Поставке… Show/hide the channels view window Приказује/Скрива прозорче за преглед канала &Channels &Канали Add a new engine Додај нови покретач Engine selector (right-click for menu) Избор покретача (десни клик за мени) Delete current engine Уклони текући покретач Information Подаци The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. Програм ће остати покренут у обавештајној зони. За затварање програма, одаберите „Излаз“ из контекстног менија на икони у обавештајној зони. Don't show this message again Не приказуј ово поново Warning Упозорење is about to terminate. ће завршити са радом. Are you sure? Да ли сте сигурни? Don't ask this again Не питај ме ово поново Loading soundfont: "%1" Учитавање звукотеке: „%1“ Failed to load the soundfont: "%1". Није успело учитавање звукотеке: „%1“. Playing MIDI file: "%1" Свирам миди датотеку: „%1“ Failed to play MIDI file: "%1". Нисам успео да одсвирам миди датотеку: „%1“. Error Грешка &Hide &Сакриј Mi&nimize У&мањи S&how При&кажи Rest&ore Вра&ти &New engine... &Нови покретач… &Delete &Уклони &Start &Старт Engines Покретачи Delete fluidsynth engine: Уклони флуид-синт покретач: Creating synthesizer engine Створи покретач синтисајзера Failed to create the synthesizer. Cannot continue without it. Нисам успео да створим синтисајзер. Не могу да радим без њега. Loading soundfont: "%1" (bank offset %2) Учитавање звукотеке: „%1“ (офсет банке %2) Failed to set bank offset (%1) for soundfont: "%2". Нисам успео да поставим офсет банке (%1) за звукотеку: „%2“. Creating audio driver (%1) Стварање звучног посредника (%1) Failed to create the audio driver (%1). Cannot continue without it. Није успело стварање зв. посредника (%1). Не могу да радим без њега. Creating MIDI router (%1) Стварање миди-рутера (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Нисам успео да створим улазни миди рутер (%1). Миди-улази неће бити доступни. Creating MIDI driver (%1) Стварање миди посредника (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Нисам успео да створим миди посредника (%1). Миди-улази неће бити доступни. Creating MIDI player Стварање миди-свирача Failed to create the MIDI player. Continuing without a player. Нисам успео да створим миди-свирача. Настављам без њега. Creating server Стварање сервера Failed to create the server. Continuing without it. Нисам успео да створим сервер. Не могу да радим без њега. Server mode disabled. Continuing without it. Онемогућено је серверски режим. Настављам без њега. Synthesizer engine started. Покретач синтисајзера је у употреби. Destroying server Уништавање сервера Stopping MIDI player Заустављање миди-свирача Waiting for MIDI player to terminate Чекам да се заустави миди-свирач Destroying MIDI player Уништавање миди-свирача Destroying MIDI driver Уништавање миди-посредника Destroying MIDI router Уништавање миди-рутера Destroying audio driver Уништавање звучног посредника Unloading soundfont: "%1" (SFID=%2) Избацивање звукотеке: „%1“ (З-ИБ=%2) Failed to unload the soundfont: "%1". Није успело избацивање звукотеке: „%1“. Destroying synthesizer engine Уништавање покретача синтисајзера Synthesizer engine terminated. Покретач синтисајзера је заустављен. New settings will be effective after restarting all fluidsynth engines. Нова подешавања ће се применити само по поновном покретању флуид-синт покретача. Please note that this operation may cause temporary MIDI and Audio disruption. Ова радња може довести до привремених миди и звучних поремећаја у раду. Do you want to restart all engines now? Желите ли да поново покренете све покретаче? New settings will be effective after restarting the fluidsynth engine: Нова подешавања ће се применити само по поновном покретању флуид-синт покретача: Do you want to restart the engine now? Желите ли да поново покренете овај покретач? qsynthMessagesForm Messages Поруке Messages output log Дневник порука на излазу Logging stopped --- %1 --- Праћење порука заустављено --- %1 --- Logging started --- %1 --- Праћење порука започето --- %1 --- qsynthOptionsForm Display Приказ Messages Поруке General Опште Sample messages text font display Пример приказа слова текстуалних порука Select font for the messages text display Одабир словолика за приказ текстуалних порука &Font... &Словолик… Whether to keep a maximum number of lines in the messages window Омогућава ограничавање броја линија у прозорчету са порукама које треба задржати &Messages limit: Ограничавање у порук&ма: The maximum number of message lines to keep in view Највећи број линија у прозорчету са порукама које треба задржати 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 Logging Дневник рада Messages log file Датотека дневника порука Browse for the messages log file location Разгледај за путањом до датотеке дневника порука ... Whether to activate a messages logging to file. Омогућава вођење дневника са порукама у датотеци. Messages &log file: Датотека &дневника порука: Knobs Дугмад Kno&b graphic style: Изглед ду&гмади: Graphic style for knobs Подешавање графичког приказа (изгледа) дугмади Classic подразумевано Vokimon воукимон Peppino пепино Skulpture скулптура Legacy старински Mouse motion be&havior: Управља&ње мишом: Mouse motion behavior for knobs Подешавање управљања дугмадима помоћу миша Radial кружно Linear линијски Custom Прилагођено &Color palette theme: Тема са палетом &боја: Custom color palette theme Прилагођена тема са палетом боја Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes Управљање прилагођеном темом са палетом боја &Widget style theme: Тема за &додатке: Custom widget style theme Прилагођена тема за додатке Other Остало Whether to ask for confirmation on application exit Да ли да затражим потврду по напуштању програма &Confirm application close Потврда &за напуштање програма Whether to show system tray message on main window close Да ли да прикажем поруку у об. зони по затварању гл. прозора Sho&w system tray message on close Прикажи поруку у обавештајној зони по оконча&њу Defaults Подразумевано Whether to keep all child windows on top of the main window Да ли да издигнем потчињене прозоре у први план Options Параметри &Keep child windows always on top Потчињени прозори су у првом п&лану Whether to capture standard output (stdout/stderr) into messages window Да ли да пратим стандардни излаз („stdout/stderr“) кроз прозорче са порукама Capture standard &output Прати стандардни &излаз Whether to monitor and show engine output peak level meters Да ли да пратим и приказујем ниво излазних вршних вредности сигнала Output &peak level meters &Прати ниво вршних вредности покретача Whether to enable the system tray icon Да ли да омогућим употребу иконе у обавештајној зони &Enable system tray icon Омогући икону у обав&ештајној зони Whether to start minimized to system tray Да ли да сакријем програм при покретању у обавештајну зону Start minimi&zed to system tray По покретању смести у &обавештајну зону Language &Base font size: Величина &слова: Base application font size (pt.) Основна величина слова у програму (у тачкама-пт.) (default) (подразумевано) 6 6 7 7 8 8 9 9 10 10 11 11 12 12 Information Подаци Some settings may be only effective next time you start this application. Нека од подешавања ће се применити само по поновном покретању програма. Warning Упозорење Some options have been changed. Измењена су нека подешавања. Do you want to apply the changes? Желите ли да примените ове измене? Messages Log Дневник порука Log files Датотеке дневника qsynthPaletteForm Color Themes Тема боја Name Назив Current color palette name Назив текуће палете боја Save current color palette name Сачувај назив текуће палете боја Save Сачувај Delete current color palette name Уклони назив текуће палете боја Delete Уклони Palette Палета Current color palette Текућа палета боја Generate: Стварај: Base color to generate palette Из основне боје створи палету Reset all current palette colors Поништи све текуће палете боја Reset Поништи Import a custom color theme (palette) from file Увези прилагођену тему боја (палету) из датотеке Import... Увези… Export a custom color theme (palette) to file Извези прилагођену тему боја (палету) у датотеку Export... Извези… Show Details Прикажи детаље Import File - %1 Увези датотеку — %1 Palette files (*.%1) Датотеке палета (*.%1) Save Palette - %1 All files (*.*) Све датотеке (*.*) Warning - %1 Упозорење — %1 Could not import from file: %1 Sorry. Не могу да увезем из датотеке: %1 Праштајте. Export File - %1 Извези датотеку — %1 Some settings have been changed. Do you want to discard the changes? Измењена су нека подешавања. Желите ли да одбаците ове измене? Some settings have been changed: "%1". Do you want to save the changes? Измењена су нека подешавања: "%1". Желите ли да сачувате ове измене? qsynthPaletteForm::PaletteModel Color Role Улога боје Active Укључено Inactive Искључено Disabled Онемогућено qsynthPresetForm Channel Preset Поставка канала Preset Поставка Bank selector Изборник банке Bank Банка Program selector Изборник програма Prog Програм Name Назив SFID З-ИБ Soundfont Звукотека Whether to preview the current selection Омогућава преглед текућег избора Preview Преглед Channel %1 Канал %1 qsynthSetupForm Engine &Name: &Назив покретача: Engine display name Приказан назив покретача &MIDI &Миди Whether to show MIDI router events on messages window Омогућава преглед догађаја миди-рутирања у прозорчету са порукама MIDI device name Назив миди-уређаја Enable MIDI input Омогући миди-улаз Enable MIDI &Input Омогућ&и миди-улаз Input MIDI driver Миди посредник на улазу Print out verbose messages about MIDI events Штампај опширније поруке о миди-догађајима &Verbose MIDI event messages Опширни&је поруке о миди-догађају MIDI &Channels: Миди-&канали: Number of MIDI channels Број миди-канала MIDI &Bank Select mode: Начин избора миди-&банке: MIDI Bank Select mode Начин избора миди-банке gm ЏМ gs ГС mma ММА xs Икс-С ALSA Sequencer client name identification Идентификација назива АЛСА секвенцер клијента pid ПИБ qsynth Ку-синт &Audio &Звук Sample &Format: О&блик узорка: Output audio driver Звучни посредник на излазу MIDI &Driver: MIDI D&evice: MIDI Client &Name ID (ALSA/CoreMidi): Attempt to connect the MIDI inputs to the physical ports &Auto Connect MIDI Inputs D&ump MIDI router events Audio &Driver: Sample format Облик (формат) узорка Period size in bytes (audio buffer size) Величина периода у бајтима (вел. звучног бафера) 64 64 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8192 Buffer Cou&nt: Број&ност бафера: Sample rate in samples per second (Hz) Учестаност узорковања у узорцима у секунди (Hz) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample &Rate: Учестаност узо&рковања: Period count (number of audio buffers) Бројност периода (количина, број звучних бафера) 2 2 4 4 8 8 16 16 32 32 Buffer &Size: &Величина бафера: Audio &Channels: Звучни &канали: Number of audio groups Бројност звучних група Number of enabled polyphonic voices Број омогућених вишезвучних (полифоних) гласова Number of stereo audio channels Број звучних стерео канала &Polyphony: Ви&шезвучје: Audio &Groups: Звучне &групе: JACK client name identification Идентификација назива Џек-клијента fluidsynth Флуид-синт Attempt to connect the JACK outputs to the physical ports Покушавај да повежеш излазе Џек посредника на физичке портове Audio D&evice: JACK Client &Name ID: &Auto Connect JACK Outputs Create multiple JACK output ports for channels, groups and effects Створи вишеструке излазе за канале групе и ефекте у Џек посреднику &Multiple JACK Outputs Виш&еструки излази у Џек посреднику &WASAPI Exclusive Mode &Soundfonts &Звукотеке Soundfont stack Библиотека звукотека SFID З-ИБ Name Назив Offset Офсет Open soundfont file for loading Отвори звукотеку за учитавање &Open... &Отвори… Edit selected soundfont bank offset Уреди офсет за изабрану банку звукотеке &Edit Ур&еди Remove selected soundfont from stack Уклони изабрану звукотеку из бибиотеке &Remove &Уклони Move up selected soundfont towards the top of stack Премести звукотеку ка врху &Up &Горе Move down selected soundfont towards the bottom of stack Премести звукотеку ка дну &Down &Доле S&ettings Под&ешавања Type Врста Realtime У стварном времену Current Тренутно Default Подразумевано Min Мин. Max Макс. Options Параметри Setup Поставке Warning Упозорење Some settings have been changed. Измењена су нека подешавања. Do you want to apply the changes? Желите ли да примените ове измене? Open... Отвори… Edit Уреди Remove Уклони Move Up Подигни Move Down Спусти Soundfont files Звукотеке All files Soundfont file already on list Звукотека је већ на списку Add anyway? Да ли да је додам упркос томе? Error Грешка Failed to add soundfont file Нисам успео да додам звукотеку Please, check for a valid soundfont file. Потражите ваљану звукотеку. qsynth-1.0.3/src/translations/PaxHeaders/qsynth_fr.ts0000644000000000000000000000013214771226115020022 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.118076147 30 ctime=1743072333.118076147 qsynth-1.0.3/src/translations/qsynth_fr.ts0000644000175000001440000026173214771226115020025 0ustar00rncbcusers QObject (default) (défaut) Usage: %1 [options] [soundfonts] [midifiles] Utilisation : %1 [options] [banquedesons] [fichiersmidi] Options Options Don't create a midi driver to read MIDI input events [default = yes] Ne pas créer un pilote midi pour lire les évènements d'entrée MIDI [défaut = oui] The name of the midi driver to use [oss,alsa,alsa_seq,...] Le nom du pilote MIDI à utiliser [oss,alsa,alsa_esq,...] The number of midi channels [default = 16] Le nombre de canaux MIDI [défaut = 16] The audio driver [alsa,jack,oss,dsound,...] Le pilote audio [alsa,jack,oss,dsound,...] Attempt to connect the jack outputs to the physical ports Tentative de connecter les sorties JACK aux ports physiques The number of stereo audio channels [default = 1] Le nombre de canaux audio stéréo [défaut = 1] The number of audio groups [default = 1] Le nombre de groupes audio [défaut = 1] Size of each audio buffer Taille de chaque tampon audio Number of audio buffers Nombre de tampons audio Set the sample rate Défini la fréquence d'échantillonnage Turn the reverb on or off [1|0|yes|no|on|off, default = on] Allume ou éteind la réverbération [1|0|yes|no|on|off, défaut = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Allume ou éteind le chorus [1|0|yes|no|on|yes, défaut = on] Set the master gain [0 < gain < 2, default = 1] Défini le gain général [0 < gain < 2, défaut = 1] Define a setting name=value Défini un paramètre nom=valeur Create and start server [default = no] Crée et démarre un serveur [défaut = no] Don't read commands from the shell [ignored] Ne pas lire les commandes à partir de la console [ignoré] Dump midi router events Affiche les évènements du routeur MIDI Print out verbose messages about midi events Affiche les messages détaillés concernant les évènements MIDI Show help about command line options Affiche l'aide à propos des options de ligne de commande Show version information Affiche les informations de version Set the master gain [0 < gain < 10, default = 1] SoundFont Files Fichiers de banque de sons [soundfonts] [banque de sons] MIDI Files Fichiers MIDI [midifiles] [fichiersmidi] Option -m requires an argument (midi-driver). L'option -m requiert un argument (pilote-midi). Option -K requires an argument (midi-channels). L'option -K requiert un argument (canaux-midi). Option -a requires an argument (audio-driver). L'option -a requiert un argument (pilote-audio). Option -L requires an argument (audio-channels). L'option -L requiert un argument (canaux-audio). Option -G requires an argument (audio-groups). L'option -G requiert un argument (groupes-audio). Option -z requires an argument (audio-bufsize). L'option -z requiert un argument (taille-tampon-audio). Option -c requires an argument (audio-bufcount). L'option -c requiert un argument (compte-tampon-audio). Option -r requires an argument (sample-rate). L'option -r requiert un argument (taux-échantillonnage). Option -g requires an argument (gain). L'option -g requiert un argument (gain). Option -o requires an argument. L'option -o requiert un argument. Unknown option '%1'. Option '%1' inconnue. qsynthAboutForm About À propos &Close &Fermer About Qt À propos de Qt Version Version Debugging option enabled. Option de débogage activée. System tray disabled. Barre d'état desactivée. Server option disabled. Option du serveur désactivée. System reset option disabled. Option de remise à zéro du système désactivée. Bank offset option disabled. Option de décalage de banque désactivée. Using: Qt %1 Utilisant : Qt %1 FluidSynth %1 FluidSynth %1 Website Site web This program is free software; you can redistribute it and/or modify it Ce programme est un programme libre; vous pouvez le redistribuer et/ou le modifier under the terms of the GNU General Public License version 2 or later. sous les termes de la license publique générale GNU version 2 ou plus récente. qsynthChannelsForm Preset &Name: &Nom du pré-réglage : Settings preset name Définir le nom de pré-réglage (default) (défaut) Save settings as current preset name Sauvegarder les réglages sous le nom courant de pré-réglage &Save &Sauvegarder Delete current settings preset Supprimer les paramètres actuels prédéfinis &Delete &Supprimer Channels view Vue des canaux In Entrée Chan Canal Bank Banque Prog Prog Name Nom SFID SFID Soundfont Banque de son Channels Canaux Edit Éditer Unset Désactiver Refresh Rafraichir Warning Attention Delete preset: Supprimer le pré-réglage : Are you sure? Êtes-vous sûr ? qsynthMainForm Master Général &Gain &Volume Master Gain Volume Général Complete engine restart Redémarrage complet du moteur Re&start R&edémarrage Reverb Réverbération Reverb effect activation Activation de l'effet de réverbération Ac&tive Ac&tiver Reverb Level Niveau de réverbération &Level &Niveau Reverb Width Largeur de réverbération &Width &Largeur Reverb Damp Factor Facteur d'atténuation de la réverbération D&amp &Atténuation Reverb Room Size Dimension de la pièce de réverbération R&oom P&ièce Chorus Chorus Chorus Modulation Type Type de modulation de chorus Sine Sinus Triangle Triangle T&ype: T&ype : Chorus effect activation Activation de l'effet chorus Act&ive Act&iver Number of Chorus Stages Nombre d'Etages de Chorus &N &N Chorus Level Niveau de Chorus Le&vel Ni&veau Chorus Speed (Hz) Vitesse du Chorus (Hz) Chorus Speed Hz Vitesse du Chorus Hz Spee&d Vi&tesse Chorus Depth (ms) Profondeur du Chorus (ms) Dept&h Profon&deur Output peak level Niveau de sortie crête Quit this application Quitter cette application &Quit &Quitter Show general options dialog Afficher la fenêtre de dialogue des options générales &Options... &Options... Show/hide the messages log window Afficher/cacher la fenêtre de log des messages &Messages &Messages Show information about this application Afficher les informations à propos de cette application A&bout... À &propos... System reset Remise à zéro du système &Panic &Panique Program reset (all channels) Remise à zéro du programme (tous les canaux) &Reset &Remise à zéro Show instance settings and configuration dialog Afficher la fenêtre de réglage et de configuration de l'instance Set&up... Config&uration... Show/hide the channels view window Afficher/cacher la fenêtre de vue des canaux &Channels &Canaux Add a new engine Ajouter un nouveau moteur Engine selector (right-click for menu) Sélectionneur de moteur (clic droit pour le menu) Delete current engine Supprimer le moteur courant Information Information The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. Le programme continuera de s'exécuter dans la barre d'état du système. Pour terminer ce programme, veuillez choisir "Quitter" dans le menu contextuel de l'icône de la barre d'état du système. Don't show this message again Ne pas montrer ce message à nouveau Warning Attention is about to terminate. est sur le point de terminer. Are you sure? Êtes-vous sûr ? Don't ask this again Ne pas le redemander Loading soundfont: "%1" Charge la banque de son : "%1" Failed to load the soundfont: "%1". Échec du chargement de la banque de son : "%1". Playing MIDI file: "%1" Joue le fichier MIDI : "%1" Failed to play MIDI file: "%1". N'a pas pu jouer le fichier MIDI : "%1". Error Erreur &Hide &Cacher Mi&nimize &Minimiser S&how Affic&her Rest&ore Restaurati&on &New engine... &Nouveau moteur... &Delete &Supprimer &Start &Démarrer Engines Moteurs Delete fluidsynth engine: Supprimer le moteur fluidsynth : Creating synthesizer engine Création du moteur de synthèse Failed to create the synthesizer. Cannot continue without it. Échec lors de la création du synthétiseur. Ne peut pas continuer sans. Loading soundfont: "%1" (bank offset %2) Chargement de la banque de son : "%1" (décalage de banque %2) Failed to set bank offset (%1) for soundfont: "%2". Échec d'affectation du décalage de banque (%1) pour la banque de son : "%2". Creating audio driver (%1) Création du pilote audio (%1) Failed to create the audio driver (%1). Cannot continue without it. Échec de création du pilote audio (%1). Ne peut pas continuer sans. Creating MIDI router (%1) Création du routeur MIDI (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Échec de création du routeur MIDI (%1). Aucune entrée MIDI ne sera disponible. Creating MIDI driver (%1) Création du pilote MIDI (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Échec de création du pilote MIDI (%1). Aucune entrée MIDI ne sera disponible. Creating MIDI player Création du lecteur MIDI Failed to create the MIDI player. Continuing without a player. Échec de création du lecteur MIDI. Continue sans le lecteur. Creating server Création du serveur Failed to create the server. Continuing without it. Échec de création du serveur. Continue sans. Server mode disabled. Continuing without it. Mode serveur désactivé. Continue sans. Synthesizer engine started. Moteur du synthétiseur démarré. Destroying server Destruction du serveur Stopping MIDI player Arrêt du lecteur MIDI Waiting for MIDI player to terminate Attends que le lecteur MIDI s'arrête Destroying MIDI player Destruction du lecteur MIDI Destroying MIDI driver Destruction du pilote MIDI Destroying MIDI router Destruction du routeur MIDI Destroying audio driver Destruction du pilote audio Unloading soundfont: "%1" (SFID=%2) Chargement de la banque de son : "%1" (SFID=%2) Failed to unload the soundfont: "%1". Échec du chargement de la banque de son : "%1". Destroying synthesizer engine Destruction du moteur du synthétiseur Synthesizer engine terminated. Moteur du synthétiseur arrêté. New settings will be effective after restarting all fluidsynth engines. Les nouveaux réglages ne seront effectifs qu'après le redémarrage de tous les moteurs de fluildsynth. Please note that this operation may cause temporary MIDI and Audio disruption. Veuillez noter que cette opération peut causer une interruption temporaire du MIDI et de l'audio. Do you want to restart all engines now? Voulez-vous redémarrer tous les moteurs maintenant? New settings will be effective after restarting the fluidsynth engine: Les nouveaux réglages ne seront effectifs qu'après le redémarrage du moteur fluidsynth : Do you want to restart the engine now? Voulez-vous redémarrer le moteur maintenant? qsynthMessagesForm Messages Messages Messages output log Sortie des messages de log Logging stopped --- %1 --- Enregistrement arrêté --- %1 --- Logging started --- %1 --- Enregistrement démarré --- %1 --- qsynthOptionsForm Display Affichage Messages Messages General Général Sample messages text font display Messages d'exemple pour l'affichage de la police Select font for the messages text display Sélection de la police pour l'affichage du texte des messages &Font... &Police... Whether to keep a maximum number of lines in the messages window Si on doit conserver un nombre maximum de lignes dans la fenêtre de messages &Messages limit: Limite de &messages : The maximum number of message lines to keep in view Le nombre maximum de lignes de message à conserver 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 Logging Connection Messages log file Fichier d'enregistrement des messages Browse for the messages log file location Parcourir l'emplacement des messages du fichiers log ... ... Whether to activate a messages logging to file. Doit-on activer l'enregistrement des messages dans un fichier. Messages &log file: F&ichier d'enregistrement des messages : Knobs Boutons Kno&b graphic style: Style graphique des &boutons : Graphic style for knobs Style graphique pour les boutons Classic Classique Vokimon Vokimon Peppino Peppino Skulpture Skulpture Legacy Legacy Mouse motion be&havior: Compor&tement du déplacement de la souris : Mouse motion behavior for knobs Comportement du déplacement de la souris pour les boutons Radial Radiale Linear Linéaire Custom Personnalisé &Color palette theme: Thème de palette de &couleur : Custom color palette theme Theme de palette de couleur personnalisé Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes Gérer les thèmes de palette de couleur personnalisés &Widget style theme: Thème de style de &widget : Custom widget style theme Thème de style de widget personnalisé : Other Autre Whether to ask for confirmation on application exit Doit-on demander une confirmation lors de la fermeture de l'application &Confirm application close &Confirmer la fermeture de l'application Whether to show system tray message on main window close Si on doit afficher les messages de la barre d'état lors de la fermeture de la fenêtre principale Sho&w system tray message on close Af&ficher les messages de la barre d'état à la fermeture Defaults Défauts Whether to keep all child windows on top of the main window Doit-on conserver toutes les sous-fenêtres au dessus de la fenêtre principale Options Options &Keep child windows always on top Conserver les sous fenêtres &toujours au dessus Whether to capture standard output (stdout/stderr) into messages window Doit-on capturer la sortie standard (stdout/stderr) dans la fenêtre de messages Capture standard &output Capturer la s&ortie standard Whether to monitor and show engine output peak level meters Doit-on suivre et afficher le niveau de crête en sortie du moteur audio Output &peak level meters Afficher le niveau c&rête de la sortie Whether to enable the system tray icon Doit-on activer l'icône de la barre d'état &Enable system tray icon Activ&er l'icône de la barre d'état Whether to start minimized to system tray Doit-on démarrer minimisé dans la barre d'état Start minimi&zed to system tray Démarrer minimi&sé dans la barre d'état Language Langue &Base font size: Taille de police de &base : Base application font size (pt.) Taille de base de la police de l'application (pt.) (default) (défaut) 6 6 7 7 8 8 9 9 10 10 11 11 12 12 Information Informations Some settings may be only effective next time you start this application. Certains paramètres peuvent n'être effectifs qu'après le prochain démarrage de cette application. Warning Attention Some options have been changed. Des options ont été modifiées. Do you want to apply the changes? Voulez-vous appliquer les changements? Messages Log Journal des messages Log files Fichiers d'enregistrement qsynthPaletteForm Color Themes Thèmes de couleur Name Nom Current color palette name Nom de la palette de couleur actuelle Save current color palette name Sauvegarder le nom de la palette de couleur actuelle Save Sauvegarder Delete current color palette name Effacer le nom de la palette de couleur actuelle Delete Effacer Palette Palette Current color palette Palette de couleur actuelle Generate: Générer : Base color to generate palette Couleur de base pour générer la palette Reset all current palette colors Réinitialiser toutes les couleurs de la palette actuelle Reset Réinitialiser Import a custom color theme (palette) from file Importer un thème (palette) de couleur personnalisé depuis un fichier Import... Importer... Export a custom color theme (palette) to file Exporter un thème (palette) de couleur personnalisé vers un fichier Export... Exporter... Show Details Afficher les détails Import File - %1 Importer le fichier - %1 Palette files (*.%1) Fichiers de palette (*.%1) Save Palette - %1 Sauvegarder la palette - %1 All files (*.*) Tous les fichiers (*.*) Warning - %1 Attention - %1 Could not import from file: %1 Sorry. Impossible d'importer depuis le fichier : %1 Navré. Export File - %1 Exporter le fichier - %1 Some settings have been changed. Do you want to discard the changes? Certains paramètres ont été modifié. Souhaitez-vous abandonner les modifications ? Some settings have been changed: "%1". Do you want to save the changes? Certains paramètres ont été modifié. "%1". Souhaitez-vous sauvegarder les modifications ? qsynthPaletteForm::PaletteModel Color Role Role de couleur Active Actif Inactive Inactif Disabled Désactivé qsynthPresetForm Channel Preset Présélection de canal Preset Pré-réglage Bank selector Sélection de banque Bank Banque Program selector Sélection de programme Prog Prog Name Nom SFID SFID Soundfont Banque de son Whether to preview the current selection Doit on générer un aperçu de la sélection courante Preview Aperçu Channel %1 Canal %1 qsynthSetupForm Engine &Name: &Nom du moteur : Engine display name Nom d'affichage du moteur &MIDI &MIDI Whether to show MIDI router events on messages window Si on doit afficher les évènements du routeur MIDI dans la fenêtre de messages MIDI device name Nom du pilote MIDI Enable MIDI input Activer l'entrée MIDI Enable MIDI &Input Activer l'entrée M&IDI Input MIDI driver Pilote d'entrée MIDI Print out verbose messages about MIDI events Afficher des messages détaillés concernant les évènements MIDI &Verbose MIDI event messages Messages détaillés concernant les é&vènements MIDI MIDI &Channels: &Canaux MIDI : Number of MIDI channels Nombre de canaux MIDI MIDI &Bank Select mode: Mode MIDI de sélection de &banque : MIDI Bank Select mode Mode MIDI de sélection de banque gm gm gs gs mma mma xs xs ALSA Sequencer client name identification Nom d'identifiant du client séquenceur ALSA pid pid qsynth qsynth &Audio &Audio Sample &Format: &Format d'échantillon : Output audio driver Pilote de sortie audio MIDI &Driver: &Pilote MIDI : MIDI D&evice: Périphériqu&e MIDI : MIDI Client &Name ID (ALSA/CoreMidi): &Nom du client MIDI ID (ALSA/CoreMidi) : Attempt to connect the MIDI inputs to the physical ports Essaie de connecter les entrées MIDI aux ports physiques &Auto Connect MIDI Inputs &Auto-connecte les entrées MIDI D&ump MIDI router events D&umper les événements du routeur MIDI Audio &Driver: Pilote au&dio : Sample format Format d'échantillon Period size in bytes (audio buffer size) Taille de période en bytes (taille du tampon audio) 64 64 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8192 Buffer Cou&nt: &Nombre de tampons : Sample rate in samples per second (Hz) Fréquence d'échantillonnage en échantillons par second (Hz) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample &Rate: F&réquence d'échantillonnage : Period count (number of audio buffers) Nombre de période (nombre de tampons audio) 2 2 4 4 8 8 16 16 32 32 Buffer &Size: Dimen&sion du tampon : Audio &Channels: &Canaux audio : Number of audio groups Nombre de groupes audio Number of enabled polyphonic voices Nombre de voix polyphoniques activées Number of stereo audio channels Nombre de canaux audio stéréos &Polyphony: &Polyphonie : Audio &Groups: &Groupes audio : JACK client name identification Nom d'identifiant du client JACK fluidsynth fluidsynth Attempt to connect the JACK outputs to the physical ports Tentative de connection des sorties JACK aux ports physiques Audio D&evice: Périphériqu&e audio JACK Client &Name ID: &Nom du client JACK ID &Auto Connect JACK Outputs &Auto-connecte les sorties JACK Create multiple JACK output ports for channels, groups and effects Crée de multiples ports de sortie JACK pour les canaux, groupes et effets &Multiple JACK Outputs Sorties JACK &multiples &WASAPI Exclusive Mode Mode exclusif &WASAPI &Soundfonts &Banques de son Soundfont stack Pile de banques de son SFID SFID Name Nom Offset Décalage Open soundfont file for loading Ouvre un fichier de banque de son pour lecture &Open... &Ouvrir... Edit selected soundfont bank offset Édite le décalage de banque de la banque de son sélectionnée &Edit Édit&er Remove selected soundfont from stack Supprime la banque de son sélectionnée de la pile &Remove Supp&rimer Move up selected soundfont towards the top of stack Déplace la banque de son sélectionnée vers le haut de la pile &Up Ha&ut Move down selected soundfont towards the bottom of stack Déplace la banque de son sélectionnée vers le bas de la pile &Down &Bas S&ettings Réglag&es Type Type Realtime Temps réel Current Courant Default Défaut Min Min Max Max Options Options Setup Réglage Warning Attention Some settings have been changed. Des réglages ont été changés. Do you want to apply the changes? Voulez-vous appliquer les changements? Open... Ouvrir... Edit Éditer Remove Supprimer Move Up Déplace vers le Haut Move Down Déplace vers le Bas Soundfont files Fichiers de banque de son All files Tous les fichiers Soundfont file already on list Le fichier de banque de son est déjà dans la liste Add anyway? Ajouter quand même? Error Erreur Failed to add soundfont file Impossible d'ajouter le fichier de banque de son Please, check for a valid soundfont file. Veuillez vérifier la validité du fichier de banque de son. qsynth-1.0.3/src/translations/PaxHeaders/qsynth_cs.ts0000644000000000000000000000013214771226115020020 xustar0030 mtime=1743072333.117076153 30 atime=1743072333.116076158 30 ctime=1743072333.117076153 qsynth-1.0.3/src/translations/qsynth_cs.ts0000644000175000001440000026034014771226115020015 0ustar00rncbcusers QObject (default) (výchozí) Usage: %1 [options] [soundfonts] [midifiles] Použití: %1 [volby] [zvukové banky] [soubory MIDI] Options Volby Don't create a midi driver to read MIDI input events [default = yes] Nevytvářet žádný ovladač MIDI kvůli čtení vstupních událostí MIDI [výchozí = yes] The name of the midi driver to use [oss,alsa,alsa_seq,...] Název používaného ovladače MIDI [oss, alsa, alsa_seq,...] The number of midi channels [default = 16] Počet kanálů MIDIe [výchozí = 16] The audio driver [alsa,jack,oss,dsound,...] Zvukový ovladač [alsa, jack, oss, dsound,...] Attempt to connect the jack outputs to the physical ports Pokusit se o spojení výstupů JACK s fyzickými přípojkami The number of stereo audio channels [default = 1] Počet stereo zvukových kanálů [výchozí = 1] The number of audio groups [default = 1] Počet zvukových skupin [výchozí = 1] Size of each audio buffer Velikost zvukové vyrovnávací paměti Number of audio buffers Počet zvukových vyrovnávacích pamětí Set the sample rate Nastavit vzorkovací kmitočet Turn the reverb on or off [1|0|yes|no|on|off, default = on] Zapnout nebo vypnout dozvuk [[1|0|yes|no|on|off, výchozí = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Zapnout nebo vypnout sbor [[1|0|yes|no|on|off, výchozí = on] Set the master gain [0 < gain < 2, default = 1] Nastavit výstupní zesílení [0 < zesílení < 2, výchozí = 1] Define a setting name=value Stanovit nastavení název=hodnota Create and start server [default = no] Vytvořit a spustit server [výchozí = ne] Don't read commands from the shell [ignored] Nečíst příkazy ze shellu [nebráno na vědomí] Dump midi router events Zobrazit události směrovače MIDI Print out verbose messages about midi events Zobrazit podrobná hlášení o událostech MIDI Show help about command line options Ukázat nápovědu k volbám příkazového řádku Show version information Ukázat informace o verzi Set the master gain [0 < gain < 10, default = 1] SoundFont Files Soubory SoundFont [soundfonts] [zvukové banky] MIDI Files Soubory MIDI [midifiles] [soubory MIDI] Option -m requires an argument (midi-driver). Volba -m potřebuje argument (midi-driver). Option -K requires an argument (midi-channels). Volba -K potřebuje argument (midi-channels). Option -a requires an argument (audio-driver). Volba -a potřebuje argument (audio-driver). Option -L requires an argument (audio-channels). Volba -L potřebuje argument (audio-channels). Option -G requires an argument (audio-groups). Volba -G potřebuje argument (audio-groups). Option -z requires an argument (audio-bufsize). Volba -z potřebuje aArgument (audio-bufsize). Option -c requires an argument (audio-bufcount). Volba -c potřebuje argument (audio-bufcount). Option -r requires an argument (sample-rate). Volba -r potřebuje argument (sample-rate). Option -g requires an argument (gain). Volba -g potřebuje argument (gain). Option -o requires an argument. Volba -o potřebuje argument. Unknown option '%1'. Neznámá volba: '%1'. qsynthAboutForm About O programu &Close &Zavřít About Qt O Qt Version Verze Debugging option enabled. Povolena možnost ladění. System tray disabled. Oznamovací oblast panelu zakázána. Server option disabled. Zakázána možnost serveru. System reset option disabled. Zakázána možnost znovunastavení systému. Bank offset option disabled. Zakázána možnost polohy banky. Using: Qt %1 Používající: Qt %1 FluidSynth %1 FluidSynth %1 Website Stránky This program is free software; you can redistribute it and/or modify it Tento program je svobodným software; Můžete jej rozšiřovat a/nebo upravovat under the terms of the GNU General Public License version 2 or later. za podmínek GNU General Public License. qsynthChannelsForm Preset &Name: &Název přednastavení: Settings preset name Název přednastavení nastavení (default) (výchozí) Save settings as current preset name Uložit nastavení pod nynějším názvem přednastavení &Save &Uložit Delete current settings preset Smazat nynější přednastavení nastavení &Delete &Smazat Channels view Pohled na kanály In Vstup Chan Kanál Bank Banka Prog Prog Name Název SFID SFID Soundfont Zvuková banka Channels Kanály Edit Upravit Unset Odložit Refresh Obnovit Warning Varování Delete preset: Smazat přednastavení: Are you sure? Jste si jistý? qsynthMainForm Add a new engine Přidat nový zvukový modul Engine selector (right-click for menu) Vybrat zvukový modul (pravým klepnutím v nabídce) Delete current engine Smazat nynější zvukový modul Show/hide the channels view window Ukázat/Skrýt okno s pohledem na kanály &Channels &Kanály Complete engine restart Zvukový modul spustit úplně znovu Re&start &Spustit znovu Program reset (all channels) Nastavit znovu program (všechny kanály) &Reset &Nastavit znovu Show instance settings and configuration dialog Ukázat dialog nastavení s nynějším nastavením Set&up... &Nastavení... Master Výstup &Gain &Zesílení Master Gain Nastavení zesílení pro výstupní signál System reset Znovunastavit systém &Panic &Panika Reverb Dozvuk Reverb effect activation Spustit efekt dozvuku Ac&tive &Spuštěný Reverb Level Síla dozvuku &Level &Síla Reverb Width Vzdálenost ke zdroji zvuku (poloměr dozvuku) &Width &Vzdálenost Reverb Damp Factor Tlumení dozvuku D&amp &Tlumení Reverb Room Size Velikost prostorui dozvuku R&oom &Prostor Chorus Sbor Chorus Modulation Type Typ obměňování sboru Sine Sinus Triangle Trojúhelník T&ype: &Typ: Chorus effect activation Spuštění efektu sboru Act&ive &Spuštěný Number of Chorus Stages Počet sborových hlasů &N &Hlasy Chorus Level Síla sboru Le&vel &Síla Chorus Speed (Hz) Rychlost obměňování sboru (Hz) Chorus Speed Hz Rychlost obměňování sboru Hz Spee&d &Rychlost Chorus Depth (ms) Hloubka sboru - čas oddělení hlasu (ms) Dept&h &Hloubka - čas oddělení Output peak level Ukazatel výstupní hladiny Quit this application Ukončit tento program &Quit &Ukončit Show general options dialog Ukázat dialog pro všeobecné volby &Options... &Volby... Show/hide the messages log window Ukázat/Skrýt okno se zápisy hlášení &Messages &Hlášení Show information about this application Ukázat informace o tomto programu A&bout... &O... Information Informace The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. Program poběží dále v oznamovací oblasti panelu. Pro ukončení programu vyberte, prosím, "Ukončit" v související nabídce vyskakující z ikony v oznamovací oblasti panelu. Don't show this message again Toto hlášení neukazovat znovu Warning Varování is about to terminate. má být ukončen. Are you sure? Jste si jistý? Don't ask this again Neptat se znovu Loading soundfont: "%1" Nahrává se zvuková banka: "%1" Failed to load the soundfont: "%1". Nahrávání zvukové banky se nezdařilo: "%1". Playing MIDI file: "%1" Přehrává se soubor MIDI: "%1" Failed to play MIDI file: "%1". Přehrávání souboru MIDI se nezdařilo: "%1". Error Chyba &Hide &Skrýt Mi&nimize &Zmenšit S&how &Ukázat Rest&ore &Obnovit &New engine... &Nový zvukový modul... &Delete &Smazat &Start &Spustit Engines Zvukové moduly Delete fluidsynth engine: Smazat fluidsynthový zvukový modul: Creating synthesizer engine Vytváří se syntetizátorový zvukový modul Failed to create the synthesizer. Cannot continue without it. Syntetizátorový zvukový modul se nepodařilo vytvořit. Bez něj nelze pokračovat. Loading soundfont: "%1" (bank offset %2) Nahrává se zvuková banka: "%1" (poloha banky %2) Failed to set bank offset (%1) for soundfont: "%2". Nastavení hodnoty polohy banky (%1) pro zvukovou banku: "%2" se nepodařilo. Creating audio driver (%1) Vytváří se zvukový ovladač (%1) Failed to create the audio driver (%1). Cannot continue without it. Zvukový ovladač (%1) se vytvořit nepodařilo. Bez něj nelze pokračovat. Creating MIDI router (%1) Vytváří se směrovač MIDI (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Směrovač vstupu MIDI (%1) se vytvořit nepodařilo. Nebude dostupný žádný MIDI vstup. Creating MIDI driver (%1) Vytváří se ovladač MIDI (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Ovladač MIDI (%1) se vytvořit nepodařilo. Nebude dostupný žádný MIDI vstup. Creating MIDI player Vytváří se přehrávač MIDI Failed to create the MIDI player. Continuing without a player. Přehrávač MIDI se vytvořit nepodařilo. Pokračuje se bez přehrávače. Creating server Vytváří se server Failed to create the server. Continuing without it. Server se vytvořit nepodařilo. Pokračuje se bez něj. Server mode disabled. Continuing without it. Režim serveru zakázán. Pokračuje se bez něj. Synthesizer engine started. Syntetizátorový zvukový modul spuštěn. Destroying server Vypíná se server Stopping MIDI player Zastavuje se přehrávač MIDI Waiting for MIDI player to terminate Čeká se na ukončení přehrávače MIDI Destroying MIDI player Vypíná se přehrávač MIDI Destroying MIDI driver Vypíná se ovladač MIDI Destroying MIDI router Vypíná se směrovač MIDI Destroying audio driver Vypíná se zvukový ovladač Unloading soundfont: "%1" (SFID=%2) Ruší se nahrání zvukové banky: "%1" (SFID=%2) Failed to unload the soundfont: "%1". Vyjmutí zvukové banky: "%1" se nezdařilo. Destroying synthesizer engine Vypíná se syntetizátorový zvukový modul Synthesizer engine terminated. Syntetizátorový zvukový modul ukončen. New settings will be effective after restarting all fluidsynth engines. Nová nastavení začnou působit až po novém spuštění všech fluidsynthových zvukových modulů. Please note that this operation may cause temporary MIDI and Audio disruption. Všimněte si, prosím, že toto nové spuštění bude mít za následek dočasné přerušení MIDI a Audia. Do you want to restart all engines now? Chtěl byste nyní spustit všechny zvukové moduly znovu? New settings will be effective after restarting the fluidsynth engine: Nová nastavení začnou působit až po novém spuštění fluidsynthovéhoh zvukového modulu: Do you want to restart the engine now? Chtěl byste nyní spustit zvukový modul znovu? qsynthMessagesForm Messages Hlášení Messages output log Historie zaznamenaných hlášení Logging stopped --- %1 --- Zaznamenávání zastaveno --- %1 --- Logging started --- %1 --- Zaznamenávání spuštěno --- %1 --- qsynthOptionsForm Display Zobrazit Messages Hlášení Options Volby General Obecné Sample messages text font display Písmo pro okno s hlášeními Select font for the messages text display Vybrat písmo pro okno s hlášeními &Font... &Písmo... Whether to keep a maximum number of lines in the messages window Omezit nejvyšší počet ukázaných řádků hlášení &Messages limit: &Nejvyšší počet hlášení: The maximum number of message lines to keep in view Nejvyšší počet ukázaných řádků hlášení 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 Logging Přihlášení Messages log file Soubor se zápisem hlášení Browse for the messages log file location Hledat umístění souboru se zápisem hlášení ... ... Whether to activate a messages logging to file. Hlášení zapisovat do souboru. Other Další Whether to ask for confirmation on application exit Při ukončení aplikace žádat o potvrzení &Confirm application close &Potvrdit zavření aplikace Whether to keep all child windows on top of the main window Všechna podokna rozmístit nad hlavním oknem &Keep child windows always on top Podokna &rozmístit vždy nad hlavním oknem Whether to capture standard output (stdout/stderr) into messages window Standardní výstup (stdout/stderr) převádět do hlavního okna Capture standard &output Standardní výstup &převést Whether to monitor and show engine output peak level meters Sledovat a ukazovat nástroj výstupní hladiny Output &peak level meters Ukazovat &nástroj výstupní hladiny Whether to enable the system tray icon V oznamovací oblasti panelu ukazovat symbol aplikace &Enable system tray icon S&ymbol aplikace ukazovat v oznamovací oblasti panelu Whether to start minimized to system tray Aplikaci spustit zmenšenou jako symbol v oznamovací oblasti panelu Start minimi&zed to system tray Spustit se &zmenšením do oznamovací oblasti panelu Information Informace Some settings may be only effective next time you start this application. Některá nastavení se projeví až tehdy, když příště spustíte tento program. Warning Varování Some options have been changed. Některá nastavení byla změněna. Do you want to apply the changes? Chtěl byste použít změny? Messages Log Zápis hlášení Log files Soubory se zápisy Knobs Otočný regulátor Graphic style for knobs Obrazový styl točných regulátorů Classic Klasický Vokimon Vokimon Peppino Peppino Legacy Dědictví Mouse motion behavior for knobs Odezva otočného regulátoru na pohyb myši Radial Paprskovitý Linear Přímočarý Whether to show system tray message on main window close Ukázat zprávu v oznamovací oblasti panelu při zavření hlavního okna Sho&w system tray message on close &Ukázat zprávu v oznamovací oblasti panelu při zavření Defaults Výchozí &Base font size: Základní velikost &písma: Base application font size (pt.) Základní velikost písma v aplikaci (v bodech) (default) (výchozí) Custom Vlastní &Color palette theme: &Motiv palety barev: Custom color palette theme Vlastní motiv palety barev Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes Spravovat vlastní motivy palety barev &Widget style theme: Motiv stylu &prvku: Custom widget style theme Vlastní motiv stylu prvku Language Jazyk 8 8 9 9 10 10 11 11 12 12 Messages &log file: Soubor se &zápisem hlášení: Kno&b graphic style: Obrazový styl točných &regulátorů: Mouse motion be&havior: Odezva otočného regulátoru na po&hyb myši: 6 6 7 7 Skulpture Skulpture qsynthPaletteForm Color Themes Barevné motivy Name Název Current color palette name Název nynější palety barev Save current color palette name Uložit název nynější palety barev Save Uložit Delete current color palette name Smazat název nynější palety barev Delete Smazat Palette Paleta Current color palette Nynější paleta barev Generate: Vytvořit: Base color to generate palette Základní barva pro vytvoření palety Reset all current palette colors Nastavit všechny barvy palety barev na výchozí Reset Obnovit výchozí Import a custom color theme (palette) from file Zavést vlastní barevný motiv (paleta) ze souboru Import... Zavést... Export a custom color theme (palette) to file Vyvést vlastní barevný motiv (paleta) do souboru Export... Vyvést... Show Details Ukázat podrobnosti Import File - %1 Zavést soubor - %1 Palette files (*.%1) Soubory s paletami (*.%1) Save Palette - %1 Uložit paletu - %1 All files (*.*) Všechny soubory (*.*) Warning - %1 Varování - %1 Could not import from file: %1 Sorry. Nepodařilo se zavést ze souboru. %1 Promiňte. Export File - %1 Vyvést soubor - %1 Some settings have been changed. Do you want to discard the changes? Některá nastavení byla změněna. Chcete zahodit změny? Some settings have been changed: "%1". Do you want to save the changes? Některá nastavení byla změněna: "%1" Chcete uložit změny? qsynthPaletteForm::PaletteModel Color Role Barevná role Active Činný Inactive Nečinný Disabled Zakázáno qsynthPresetForm Channel Preset Přednastavení kanálu Preset Přednastavení Bank selector Přepínač banky Bank Banka Program selector Přepínač programu Prog Prog Name Název SFID SFID Soundfont Zvuková banka Whether to preview the current selection Ukázat náhled nynějšího výběru Preview Náhled Channel %1 Kanál %1 qsynthSetupForm Engine &Name: &Název zvukového modulu: Engine display name Zobrazený název zvukového modulu &MIDI &MIDI MIDI device name Název zařízení MIDI Input MIDI driver Ovladač pro vstup MIDI ALSA Sequencer client name identification ID názvu klienta u ALSA sequenceru pid pid qsynth qsynth Whether to show MIDI router events on messages window Ukázat události směrovače MIDI v okně hlášení Print out verbose messages about MIDI events Zobrazit podrobná hlášení o událostech MIDI &Verbose MIDI event messages &Podrobná hlášení o událostech MIDI Number of MIDI channels Počet kanálů MIDI MIDI &Channels: &Kanály MIDI: Enable MIDI input Spustit vstup MIDI Enable MIDI &Input Spustit &vstup MIDI gm gm gs gs mma mma xs xs MIDI &Bank Select mode: Režim výběru &banky MIDI: MIDI Bank Select mode Režim výběru banky MIDI &Audio &Zvuk Sample &Format: Vzorkovací &formát (rozlišení): Output audio driver Ovladač zvuku pro výstup MIDI &Driver: &Ovladač MIDI: MIDI D&evice: &Zařízení MIDI: MIDI Client &Name ID (ALSA/CoreMidi): ID &názvu klienta MIDI (ALSA/CoreMidi): Attempt to connect the MIDI inputs to the physical ports Pokusit o spojení výstupů MIDI s fyzickými přípojkami &Auto Connect MIDI Inputs &Automaticky spojit vstupy MIDI D&ump MIDI router events &Zobrazit události směrovače MIDI Audio &Driver: O&vladač zvuku: Sample format Vzorkovací formát - Číselný formát zdigitalizovaného zvukového signálu Period size in bytes (audio buffer size) Velikost periody (velikost zvukové vyrovnávací paměti) v bytech 64 64 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8192 Buffer Cou&nt: &Množství vyrovnávací paměti: Sample rate in samples per second (Hz) Vzorkovací kmitočet ve vzorcích za sekundu (Hz) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample &Rate: Vzorkovací &kmitočet: Period count (number of audio buffers) Počet period (počet zvukových vyrovnávacích pamětí) 2 2 4 4 8 8 16 16 32 32 Buffer &Size: &Velikost vyrovnávací paměti: Audio &Channels: Zvukové &kanály: Number of audio groups Počet zvukových skupin Number of enabled polyphonic voices Počet povolených vícehlasých hlasů Number of stereo audio channels Počet stereo zvukových kanálů &Polyphony: &Vícehlas: Audio &Groups: Zvukové &skupiny: JACK client name identification Identifikátor názvu klienta JACK fluidsynth fluidsynth Attempt to connect the JACK outputs to the physical ports Pokusit o spojení výstupů JACK s fyzickými přípojkami Audio D&evice: Zvukové z&ařízení: JACK Client &Name ID: ID &názvu klienta JACK: &Auto Connect JACK Outputs &Automaticky spojit výstupy JACK Create multiple JACK output ports for channels, groups and effects Vytvořit více připojení výstupů JACK pro kanály, skupiny a efekty &Multiple JACK Outputs &Více výstupů JACK &WASAPI Exclusive Mode Uzavřený režim &WASAPI &Soundfonts &Zvukové banky Soundfont stack Zásobník zvukových písem SFID SFID Name Název Offset Posun Open soundfont file for loading Otevřít soubor se zvukovou bankou pro nahrání &Open... &Otevřít... Edit selected soundfont bank offset Upravit hodnotu polohy vybrané banky se zvukovou bankou &Edit &Úpravy Remove selected soundfont from stack Odstranit vybranou zvukovou banku ze zásobníku &Remove &Odstranit Move up selected soundfont towards the top of stack Vybranou zvukovou banku přesunout v zásobníku nahoru &Up &Nahoru Move down selected soundfont towards the bottom of stack Vybranou zvukovou banku přesunout v zásobníku dolů &Down &Dolů S&ettings &Nastavení Type Typ Realtime Prováděný v reálném čase Current Nynější Default Výchozí Min Min Max Max Options Volby Setup Nachystat Warning Varování Some settings have been changed. Některá nastavení byla změněna. Do you want to apply the changes? Chtěl byste použít změny? Open... Otevřít... Edit Upravit Remove Odstranit Move Up Přesunout nahoru Move Down Přesunout dolů Soundfont files Soubory se zvukovými bankami All files Všechny soubory Soundfont file already on list Soubor se zvukovou bankou je již součástí seznamu Add anyway? Přesto přidat? Error Chyba Failed to add soundfont file Nepodařilo se přidat soubor se zvukovou bankou Please, check for a valid soundfont file. Zvolte, prosím, platný soubor se zvukovou bankou. qsynth-1.0.3/src/translations/PaxHeaders/qsynth_de.ts0000644000000000000000000000013214771226115020003 xustar0030 mtime=1743072333.117076153 30 atime=1743072333.117076153 30 ctime=1743072333.117076153 qsynth-1.0.3/src/translations/qsynth_de.ts0000644000175000001440000025745314771226115020013 0ustar00rncbcusers QObject (default) (voreingestellt) Usage: %1 [options] [soundfonts] [midifiles] Options Optionen Don't create a midi driver to read MIDI input events [default = yes] Keinen MIDI-Treiber erzeugen, um eingehende MIDI-Ereignisse zu lesen [Voreinstellung = yes] The name of the midi driver to use [oss,alsa,alsa_seq,...] Name des zu benutzenden MIDI-Treibers [oss, alsa, alsa_seq,...] The number of midi channels [default = 16] Anzahl der MIDI-Kanäle [Voreinstellung = 16] The audio driver [alsa,jack,oss,dsound,...] Der Audiotreiber [alsa, jack, oss, dsound,...] Attempt to connect the jack outputs to the physical ports Versuch, die JACK-Ausgänge mit den physikalischen Anschlüssen zu verbinden The number of stereo audio channels [default = 1] Anzahl der Stereo-Audiokanäle [Voreinstellung = 1] The number of audio groups [default = 1] Anzahl der Audiogruppen [Voreinstellung = 1] Size of each audio buffer Größe eines Audiopuffers Number of audio buffers Anzahl der Audiopuffer Set the sample rate Abtastrate festlegen Turn the reverb on or off [1|0|yes|no|on|off, default = on] Hall ein- oder ausschalten [[1|0|yes|no|on|off, Voreinstellung = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Chor ein- oder ausschalten [[1|0|yes|no|on|off, Voreinstellung = on] Set the master gain [0 < gain < 2, default = 1] Ausgangsverstärkung festlegen [0 < gain < 2, Voreinstellung = 1] Define a setting name=value Einstellung definieren Name=Wert Create and start server [default = no] Server erzeugen und Starten [Voreinstellung = nein] Don't read commands from the shell [ignored] Lese keine Kommandos von der Shell [ignoriert] Dump midi router events Ereignisse des MIDI-Routers ausgeben Print out verbose messages about midi events Zeige ausführliche Meldungen für MIDI-Ereignisse an Show help about command line options Show version information Set the master gain [0 < gain < 10, default = 1] SoundFont Files [soundfonts] MIDI Files [midifiles] Option -m requires an argument (midi-driver). Option -m benötigt ein Argument (midi-driver). Option -K requires an argument (midi-channels). Option -K benötigt ein Argument (midi-channels). Option -a requires an argument (audio-driver). Option -a benötigt ein Argument (audio-driver). Option -L requires an argument (audio-channels). Option -L benötigt ein Argument (audio-channels). Option -G requires an argument (audio-groups). Option -G benötigt ein Argument (audio-groups). Option -z requires an argument (audio-bufsize). Option -z benötigt ein Argument (audio-bufsize). Option -c requires an argument (audio-bufcount). Option -c benötigt ein Argument (audio-bufcount). Option -r requires an argument (sample-rate). Option -R benötigt ein Argument (sample-rate). Option -g requires an argument (gain). Option -g benötigt ein Argument (gain). Option -o requires an argument. Option -o benötigt ein Argument. Unknown option '%1'. Unbekannte Option: '%1'. qsynthAboutForm About Über &Close &Schließen About Qt Über Qt Version Version Debugging option enabled. Debugging-Option aktiviert. System tray disabled. Benachrichtigungsfeld deaktiviert. Server option disabled. Server-Option deaktiviert. System reset option disabled. System-Zurücksetzen deaktiviert. Bank offset option disabled. Bank-Position-Option deaktiviert. Using: Qt %1 Verwendet: Qt %1 FluidSynth %1 FluidSynth %1 Website Webseite This program is free software; you can redistribute it and/or modify it Dieses Programm ist freie Software; Sie können es gemäß der under the terms of the GNU General Public License version 2 or later. GNU General Public License weiterverteilen und/oder modifizieren. qsynthChannelsForm Preset &Name: &Benennung: Settings preset name Benennung der Einstellung (default) (voreingestellt) Save settings as current preset name Einstellungen mit aktueller Benennung speichern &Save &Speichern Delete current settings preset Aktuelle Einstellung löschen &Delete &Löschen Channels view Kanalübersicht In Ein Chan Kanal Bank Bank Prog Prog Name Name SFID SFID Soundfont Soundfont Channels Kanäle Edit Bearbeiten Unset Aufheben Refresh Erneuern Warning Warnung Delete preset: Einstellung löschen: Are you sure? Sind Sie sicher? qsynthMainForm Add a new engine Neues Klangmodul hinzufügen Engine selector (right-click for menu) Klangmodul auswählen (Rechtsklick für Menü) Delete current engine Aktuelles Klangmodul löschen Show/hide the channels view window Zeige/verberge Fenster mit Kanalübersicht &Channels &Kanäle Complete engine restart Klangmodul vollständig neu starten Re&start &Neu starten Program reset (all channels) Programm zurücksetzen (alle Kanäle) &Reset &Zurücksetzen Show instance settings and configuration dialog Konfigurationsdialog mit den aktuellen Einstellungen anzeigen Set&up... Konfi&guration... Master Ausgang &Gain &Verstärkung Master Gain Verstärkereinstellung für Ausgangsignal System reset System zurücksetzen &Panic &Panik Reverb Hall Reverb effect activation Halleffekt aktivieren Ac&tive Ak&tiv Reverb Level Hallintensität &Level I&ntensität Reverb Width Entfernung zur Schallquelle (Hallradius) &Width W&eite Reverb Damp Factor Halldämpfung D&amp D&ämpfung Reverb Room Size Hallraumgröße R&oom Ra&um Chorus Chor Chorus Modulation Type Typ für Chor-Modulation Sine Sinus Triangle Dreieck T&ype: T&yp: Chorus effect activation Choreffekt aktivieren Act&ive &Aktiv Number of Chorus Stages Anzahl der Chorstimmen &N &Stimmen Chorus Level Chorintensität Le&vel &Intensität Chorus Speed (Hz) Modulationsrate (Hz) Chorus Speed Hz Modulationsrate Hz Spee&d Ra&te Chorus Depth (ms) Stimmtrennzeit (ms) Dept&h Trenn&zeit Output peak level Ausgangspegelanzeige Quit this application Diese Anwendung beenden &Quit &Beenden Show general options dialog Dialog für die allgemeinen Optionen anzeigen &Options... &Optionen... Show/hide the messages log window Meldungsfenster anzeigen/verbergen &Messages &Meldungen Show information about this application Informationen über diese Anwendung anzeigen A&bout... &Über... Information Information The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. Programm läuft weiter sichtbar als Symbol im Benachrichtigungsfeld. Zum Beenden des Programms, wählen Sie bitte "Beenden" im Kontextmenü des Symbols im Benachrichtigungsfeld. Don't show this message again Diese Meldung nicht mehr anzeigen Warning Warnung is about to terminate. soll beendet werden. Are you sure? Sind Sie sicher? Don't ask this again Nicht nochmal nachfragen Loading soundfont: "%1" Lade Soundfont: "%1" Failed to load the soundfont: "%1". Fehler beim Laden von Soundfont: "%1". Playing MIDI file: "%1" Spiele MIDI-Datei ab: "%1" Failed to play MIDI file: "%1". Fehler beim Abspielen der MIDI-Datei: "%1". Error Fehler &Hide &Verbergen Mi&nimize &Minimieren S&how &Anzeigen Rest&ore Wieder&herstellen &New engine... &Neues Klangmodul... &Delete &Löschen &Start &Starten Engines Klangmodule Delete fluidsynth engine: Lösche fluidsynth Klangmodul: Creating synthesizer engine Erzeuge Synthesizer-Klangmodul Failed to create the synthesizer. Cannot continue without it. Fehler beim Erzeugen des Synthesizers. Kann ohne ihn nicht weitermachen. Loading soundfont: "%1" (bank offset %2) Lade Soundfont: "%1" (Bankposition %2) Failed to set bank offset (%1) for soundfont: "%2". Fehler beim Setzen des Bankpositionswertes (%1) für Soundfont: "%2". Creating audio driver (%1) Erzeuge Audiotreiber (%1) Failed to create the audio driver (%1). Cannot continue without it. Fehler beim Erzeugen des Audiotreibers (%1). Kann nicht ohne ihn fortfahren. Creating MIDI router (%1) Erzeuge MIDI-Router (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Fehler beim Erzeugen des Routers für den MIDI-Eingang (%1). Es wird kein MIDI-Eingang verfügbar sein. Creating MIDI driver (%1) Erzeuge MIDI-Treiber (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Fehler beim Erzeugen des MIDI-Treibers (%1). MIDI-Eingang wird nicht zur Verfügung stehen. Creating MIDI player Erzeuge MIDI-Spieler Failed to create the MIDI player. Continuing without a player. Fehler beim Erzeugen des MIDI-Spielers MAche ohne Spieler weiter. Creating server Erzeuge Server Failed to create the server. Continuing without it. Fehler beim Erzeugen des Servers. Mache ohne in weiter. Server mode disabled. Continuing without it. Server-Modus deaktiviert. Mache ohne ihn weiter. Synthesizer engine started. Synthesizer-Klangmodul gestartet. Destroying server Fahre Server herunter Stopping MIDI player MIDI-Spieler wird angehalten Waiting for MIDI player to terminate Warte auf Beenden des MIDI-Spielers Destroying MIDI player Beende MIDI-Spieler Destroying MIDI driver Beende MIDI-Treiber Destroying MIDI router Beende MIDI-Router Destroying audio driver Beende Audiotreiber Unloading soundfont: "%1" (SFID=%2) Entlade Soundfont: "%1" (SFID=%2) Failed to unload the soundfont: "%1". Fehler beim Entladen von Soundfont: "%1". Destroying synthesizer engine Beende Synthesizer-Klangmodul Synthesizer engine terminated. Synthesizer-Klangmodul beendet. New settings will be effective after restarting all fluidsynth engines. Die neuen Einstellungen werden erst nach einem Neustart aller fluidsynth-Klangmodule effektiv sein. Please note that this operation may cause temporary MIDI and Audio disruption. Bitte beachten Sie, dass dieser Neustart temporäre MIDI- und Audiounterbrechungen verursacht. Do you want to restart all engines now? Möchten Sie nun alle Klangmodule neu starten? New settings will be effective after restarting the fluidsynth engine: Die neuen Einstellungen werden erst nach einem Neustart dieses fluidsynth-Klangmoduls effektiv sein: Do you want to restart the engine now? Möchten Sie das Klangmodul nun neu starten? qsynthMessagesForm Messages Meldungen Messages output log Historie der aufgezeichneten Meldungen Logging stopped --- %1 --- Aufzeichung angehalten --- %1 --- Logging started --- %1 --- Aufzeichnung gestartet --- %1 --- qsynthOptionsForm Display Anzeige Messages Meldungen General Allgemein Sample messages text font display Schriftart für das Meldungsfenster Select font for the messages text display Schriftart für Meldungsfenster auswählen &Font... Schri&ftart... Whether to keep a maximum number of lines in the messages window Maximale Anzahl der angezeigten Meldungen limitieren &Messages limit: &Max. Meldungen: The maximum number of message lines to keep in view Maximale Anzahl angezeigter Zeilen 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 Logging Aufzeichnung Messages log file Protokolldatei Browse for the messages log file location Ablage für Protokolldatei nachschlagen ... ... Whether to activate a messages logging to file. Meldungen in einer Protokolldatei aufzeichen. Custom Anpassung &Color palette theme: &Farbpalettenthema: Custom color palette theme Angepasstes Farbpalettenthema Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes Farbpalettenthema anpassen &Widget style theme: &Thema der grafischen Komponenten: Custom widget style theme Angepasstes Thema der grafischen Komponenten Other Weiteres Whether to ask for confirmation on application exit Beim Schließen der Anwendung nachfragen &Confirm application close &Schließen der Anwendung bestätigen Whether to keep all child windows on top of the main window Alle Unterfenster oberhalb des Hauptfensters anordnen &Keep child windows always on top Unterfenster immer &oberhalb anordnen Whether to capture standard output (stdout/stderr) into messages window Standardausgabe (stdout/stderr) in das Meldungsfenster umleiten Capture standard &output Standardausgabe &umleiten Whether to monitor and show engine output peak level meters Ausgangspegelinstrument anzeigen Output &peak level meters Ausgangs&pegelinstrument anzeigen Whether to enable the system tray icon Anwendungssymbol im Benachrichtigungsfeld anzeigen &Enable system tray icon S&ymbol im Benachrichtigungsfeld anzeigen Whether to start minimized to system tray Anwendung minimiert als Symbol im Benachrichtigungsfeld starten Start minimi&zed to system tray Minimiert im &Benachrichtigungsfeld starten Information Information Some settings may be only effective next time you start this application. Einige Einstellunge werden erst aktiviert, wenn die Anwendung neu getartet wird. Warning Warnung Some options have been changed. Einige Einstellungen wurden verändert. Do you want to apply the changes? Möchten Sie die Änderungen anwenden? Messages Log Meldungsprotokoll Log files Protokolldateien Knobs Drehregler Graphic style for knobs Graphischer Stil der Drehregler Classic Klassisch Vokimon Vokimon Peppino Peppino Legacy Legacy Mouse motion behavior for knobs Reaktion der Drehregler auf Mausbewegung Radial Radial Linear Linear Whether to show system tray message on main window close Nachrichten des Benachrichtigungsfelds beim Schließen des Hauptfensters anzeigen Sho&w system tray message on close &Nachrichten des Benachrichtigungsfelds beim Beenden anzeigen Defaults Voreinstellungen &Base font size: Schrift&größe: Base application font size (pt.) Standardschriftgröße für die Anwendung (default) (voreingestellt) Language 8 8 9 9 10 10 11 11 12 12 Messages &log file: Protokoll&datei: Options Optionen Kno&b graphic style: Dreh&reglerstil: Mouse motion be&havior: Reaktion auf Mausbe&wegung: 6 6 7 7 Skulpture Skulpture qsynthPaletteForm Color Themes Farbthemen Name Name Current color palette name Name der aktuellen Farbpalette Save current color palette name Aktuellen Palettenamen speichern Save Speichern Delete current color palette name Name der aktuellen Farbpalette löschen Delete Löschen Palette Palette Current color palette Aktuelle Farbpalette Generate: Erzeugen: Base color to generate palette Basisfarbe zur Erzeugung der Palette Reset all current palette colors Alle aktuellen Farben der Palette löschen Reset Zurücksetzen Import a custom color theme (palette) from file Ein angepasstes Farbschema (Palette) aus Datei importieren Import... Importieren... Export a custom color theme (palette) to file Eine angepasstes Farbschema (Palette) in Datei exportieren Export... Exportieren... Show Details Details anzeigen Import File - %1 Importiere Datei - %1 Palette files (*.%1) Palettendateien (*.%1) Save Palette - %1 All files (*.*) Alle Dateien (*.*) Warning - %1 Warnung - %1 Could not import from file: %1 Sorry. Der Import aus Datei: %1 konnte nicht abgeschlossen weden. Export File - %1 Exportiere Datei - %1 Some settings have been changed. Do you want to discard the changes? Einige Einstellungen wurden verändert. Änderungen verwerfen? Some settings have been changed: "%1". Do you want to save the changes? Einige Einstellungen wurden verändert: "%1". Änderungen speichern? qsynthPaletteForm::PaletteModel Color Role Farbfunktion Active Aktiv Inactive icht aktiv Disabled Deaktiviert qsynthPresetForm Channel Preset Kanalvoreinstellung Preset Voreinstellung Bank selector Bank einstellen Bank Bank Program selector Programm einstellen Prog Prog Name Name SFID SFID Soundfont Soundfont Whether to preview the current selection Voransicht für akktuelle Auswahl anzeigen Preview Voransicht Channel %1 Kanal %1 qsynthSetupForm Engine &Name: Klangmodul&benennung: Engine display name Angezeigter Name des Klangmoduls &MIDI &MIDI MIDI device name MIDI-Gerätename Input MIDI driver Treiber für MIDI-Eingang ALSA Sequencer client name identification Identifikationsname fürs Anmelden beim ALSA-Sequenzer pid pid qsynth qsynth Whether to show MIDI router events on messages window MIDI-Router-Ereignisse im Meldungsfenster anzeigen Print out verbose messages about MIDI events Ausführliche Meldungen über MIDI-Ereignisse ausgeben &Verbose MIDI event messages Aus&führliche Meldungen über MIDI-Ereignisse Number of MIDI channels Anzahl der MIDI-Kanäle MIDI &Channels: MIDI-&Kanäle: Enable MIDI input MIDI-Eingang aktivieren Enable MIDI &Input MI&DI-Eingang aktivieren gm gm gs gs mma mma xs xs MIDI &Bank Select mode: MIDI-&Bank Einstellmodus: MIDI Bank Select mode MIDI-Bank Einstellmodus &Audio &Audio Sample &Format: Au&flösung: Output audio driver Audiotreiber für Ausgabe MIDI &Driver: MIDI D&evice: MIDI Client &Name ID (ALSA/CoreMidi): Attempt to connect the MIDI inputs to the physical ports &Auto Connect MIDI Inputs D&ump MIDI router events Audio &Driver: Sample format Numerisches Format des digitalisierten Audiosignals Period size in bytes (audio buffer size) Größe des Audiopuffers in Byte 64 64 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8129 Buffer Cou&nt: Pufferan&zahl: Sample rate in samples per second (Hz) Abtastrate in Hz (Samples pro Sekunde) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample &Rate: Abtast&rate: Period count (number of audio buffers) Anzahl der Perioden (Anzahl der Audiopuffer) 2 2 4 4 8 8 16 16 32 32 Buffer &Size: Puffergr&öße: Audio &Channels: Audio&kanäle: Number of audio groups Anzahl der Audiogruppen Number of enabled polyphonic voices Anzahl der aktiven Polyphoniestimmen Number of stereo audio channels Anzahl der Stereo-Audiokanäle &Polyphony: &Polyphonie: Audio &Groups: A&udiogruppen: JACK client name identification Identifikationsname als JACK-Client fluidsynth fluidsynth Attempt to connect the JACK outputs to the physical ports Versuche, die JACK-Ausgänge mit den physikalischen Anschlüssen zuverbinden Audio D&evice: JACK Client &Name ID: &Auto Connect JACK Outputs Create multiple JACK output ports for channels, groups and effects Erzeuge mehrere JACK-Ausgänge für Kanäle, Gruppen und Effekte &Multiple JACK Outputs Me&hrere JACK-Ausgänge &WASAPI Exclusive Mode &Soundfonts &Soundfonts Soundfont stack Soundfont-Stapel SFID SFID Name Name Offset Position Open soundfont file for loading Soundfont-Datei zum Laden öffnen &Open... &Öffnen... Edit selected soundfont bank offset Positionswert der gewählten Soundfont-Bank bearbeiten &Edit Bea&rbeiten Remove selected soundfont from stack Gewählten Soundfont aus Stapel entfernen &Remove En&tfernen Move up selected soundfont towards the top of stack Gewählten Soundfont im Stapel nach oben bewegen &Up A&uf Move down selected soundfont towards the bottom of stack Gewählten Soundfont im Stapel nach unten bewegen &Down A&b S&ettings &Einstellungen Type Typ Realtime Realtime Current Aktuell Default Voreinstellung Min Min Max Max Options Optionen Setup Konfigurieren Warning Warnung Some settings have been changed. Einige Einstellungen wurden geändert. Do you want to apply the changes? Möchten Sie die Änderungen anwenden? Open... Öffnen... Edit Bearbeiten Remove Entfernen Move Up Auf Move Down Ab Soundfont files Soundfont-Dateien All files Soundfont file already on list Soundfont-Datei ist bereits Bestandteil der Liste Add anyway? Dennoch hinzufügen? Error Fehler Failed to add soundfont file Fehler beim Hinzufügen der Soundfont-Datei Please, check for a valid soundfont file. Bitte wählen Sie eine gültige Soundfont-Datei. qsynth-1.0.3/src/translations/PaxHeaders/qsynth_ru.ts0000644000000000000000000000013214771226115020041 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.118076147 30 ctime=1743072333.118076147 qsynth-1.0.3/src/translations/qsynth_ru.ts0000644000175000001440000027253714771226115020051 0ustar00rncbcusers QObject (default) (по умолчанию) Usage: %1 [options] [soundfonts] [midifiles] Options Параметры Don't create a midi driver to read MIDI input events [default = yes] Не создавать драйвер MIDI для чтения входящих событий MIDI [по умолчанию = yes] The name of the midi driver to use [oss,alsa,alsa_seq,...] Имя используемого драйвера MIDI [oss,alsa,alsa_seq,...] The number of midi channels [default = 16] Количество каналов MIDI [по умолчанию = 16] The audio driver [alsa,jack,oss,dsound,...] Звуковой драйвер [alsa,jack,oss,dsound,...] Attempt to connect the jack outputs to the physical ports Попытка связать выход JACK с физическими портами The number of stereo audio channels [default = 1] Количество стереофонических звуковых каналов [по умолчанию = 1] The number of audio groups [default = 1] Количиство звуковых групп [по умолчанию = 1] Size of each audio buffer Размер каждого звукового буфера Number of audio buffers Количество звуковых буферов Set the sample rate Установить частоту семплирования Turn the reverb on or off [1|0|yes|no|on|off, default = on] Включить/выключить реверберацию [1|0|yes|no|on|off, по умолчанию = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Включить/выключить хорус [1|0|yes|no|on|off, по умолчанию = on] Set the master gain [0 < gain < 2, default = 1] Установить главное усиление [0 < усиление < 2, по умолчанию = 1] Define a setting name=value Определите имя=значение настройки Create and start server [default = no] Создать и запустить сервер [по умолчанию = no] Don't read commands from the shell [ignored] Не считывать команды из оболочки [проигнорировано] Dump midi router events Глушить события маршрутизатора MIDI Print out verbose messages about midi events Показывать подробную информацию о сообщениях MIDI Show help about command line options Show version information Set the master gain [0 < gain < 10, default = 1] SoundFont Files [soundfonts] MIDI Files [midifiles] Option -m requires an argument (midi-driver). Ключ -m требует аргумента (midi-driver). Option -K requires an argument (midi-channels). Ключ -K требует аргумента (midi-channels). Option -a requires an argument (audio-driver). Ключ -a требует аргумента (audio-driver). Option -L requires an argument (audio-channels). Ключ -L требует аргумента (audio-channels). Option -G requires an argument (audio-groups). Ключ -G требует аргумента (audio-groups). Option -z requires an argument (audio-bufsize). Ключ -a требует аргумента (audio-bufsize). Option -c requires an argument (audio-bufcount). Ключ -c требует аргумента (audio-bufcount). Option -r requires an argument (sample-rate). Ключ -r требует аргумента (sample-rate). Option -g requires an argument (gain). Ключ -g требует аргумента (gain). Option -o requires an argument. Ключ -o требует аргумента. Unknown option '%1'. неизвестный ключ '%1'. qsynthAboutForm About About Qt О программе &Close &Закрыть Version Версия System tray disabled. Server option disabled. Параметр сервера отключен. Using: Qt %1 FluidSynth %1 Website Веб-сайт This program is free software; you can redistribute it and/or modify it Эта программа является свободной; вы имеете право распространять и/или under the terms of the GNU General Public License version 2 or later. изменять её на условиях лицензии GNU GPL версии 2 или более новой. Debugging option enabled. Параметр отладки включён. System reset option disabled. Параметр перезагрузки системы включён. Bank offset option disabled. Функция смещения банка отключена. qsynthChannelsForm Edit Изменить Refresh Обновить Preset &Name: Имя &предустановки: (default) (по умолчанию) Settings preset name Имя предустановки настроек &Save Со&хранить Save settings as current preset name Сохранить настройки в текущую предустановку &Delete У&далить Delete current settings preset Удалить текущую предустановку In Вх Bank Банк Prog Программа Name Имя SFID SFID Soundfont SF2-файл Channels view Вид каналов Channels Каналы Unset Снять Warning Предупреждение Delete preset: Удалить пресет: Are you sure? Вы уверены? Chan Канал qsynthMainForm Chorus Хор Chorus Level Громкость хора Le&vel Гро&мк. Dept&h Глу&бина T&ype: &Тип: Sine Синусоида Triangle Треугольная Chorus Modulation Type Тип модуляции хора Reverb Реверберация D&amp При&глуш. Reverb Room Size Объём помещения R&oom &Комната &Level &Громк. Ac&tive &Вкл &Quit В&ыйти Quit this application Выйти из программы Set&up... &Настроить... &Messages &Сообщения Show/hide the messages log window Показать/скрыть окно отображения сообщений программы A&bout... О &программе... Show information about this application Показать информацию об этом приложении Master Мастер Master Gain Общее усиление &Gain &Усиление &Reset С&бросить Program reset (all channels) Сброс программ (все каналы) Complete engine restart Полная перезагрузка синтезатора Warning Предупреждение Are you sure? Вы уверены? Error Ошибка Please note that this operation may cause temporary MIDI and Audio disruption. Обратите внимание на то, что выполнение этой операции может привести к временным сбоям в воспроизведении MIDI и аудио. Do you want to restart the engine now? Вы хотите перезагрузить движок синтезатора? Creating synthesizer engine Создается движок синтезатора Creating MIDI player Создается проигрыватель MIDI Creating server Создается сервер Synthesizer engine started. Движок синтезатора запущен Destroying server Выполняется разрушение сервера Stopping MIDI player Останавливается устройство воспроизведения MIDI Waiting for MIDI player to terminate Ожидается выгрузка устройства воспроизведения MIDI Destroying MIDI player Выполняется разрушение проигрывателя MIDI Destroying MIDI driver Выполняется разрушение драйвера MIDI Destroying MIDI router Выполняется разрушение маршрутизатора MIDI Destroying audio driver Выполняется разрушение звукового драйвера Destroying synthesizer engine Разрушается движок синтезатора Synthesizer engine terminated. Движок синтезатора остановлен Information Информация Engine selector (right-click for menu) Выбор движка (меню под правой клавишей мыши) Re&start Пере&запустить &Panic &Паника System reset Перезагрузка системы Chorus Speed (Hz) Скорость хора (Гц) Spee&d &Скорость Chorus Speed Hz Скорость хора (Гц) Number of Chorus Stages Число стадий хора &N &N Chorus Depth (ms) Глубина хора (мс) Act&ive Вк&л Chorus effect activation Включение эффект хора &Channels &Каналы Show/hide the channels view window Переключить отображение окна каналов Reverb Damp Factor Фактор затухания реверберации Reverb Width Ширина стереобазы &Width &Ширина Reverb Level Громкость реверберации Reverb effect activation Включение эффекта хора Show instance settings and configuration dialog Показать параметры запущенной копии движка синтезатора и диалог настройки &Options... &Параметры... Show general options dialog Показать главный диалог настройки параметров is about to terminate. собирается завершить работу. Don't ask this again &Start &Запустить Delete fluidsynth engine: Удалить движок fluidsynth: New settings will be effective after restarting the fluidsynth engine: Некоторые изменения будут учтены только после перезагрузки движка fluidsynth: The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. Программа продолджит работу в области уведомления. Для завершения работы с ней выберите пункт «Выход» в контекстном меню элемента области уведомления. Don't show this message again Loading soundfont: "%1" Загружается файл SF2: "%1" Failed to load the soundfont: "%1". Не удалось загрузить файл SF2: "%1". Playing MIDI file: "%1" Воспроизводится файл MIDI: "%1" Failed to play MIDI file: "%1". Не удалось воспроизвести файл MIDI: "%1". &Hide С&крыть Mi&nimize Св&ернуть S&how &Показать Rest&ore &Восстановить &New engine... &Создать движок... &Delete &Удалить Engines Движки Failed to create the synthesizer. Cannot continue without it. Не удалось создать синтезатор. Продолжение без него невозможно. Loading soundfont: "%1" (bank offset %2) Загружается файл SF2: "%1" (смещение банка %2) Failed to set bank offset (%1) for soundfont: "%2". Не удалось задать смещение банка (%1) для файла "%2". Creating audio driver (%1) Создается звуковой драйвер (%1) Failed to create the audio driver (%1). Cannot continue without it. Не удалось создать звуковой драйвер (%1). Продолжение без него невозможно. Creating MIDI router (%1) Создается маршрутизатор MIDI (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Не удалось создать входящий маршрутизатор MIDI (%1). Вход MIDI будет недоступен. Creating MIDI driver (%1) Создается драйвер MIDI (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Не удалось создать драйвер MIDI (%1). Вход MIDI будет недоступен. Failed to create the MIDI player. Continuing without a player. Не удалось создать проигрыватель MIDI. Придется обойтись без проигрывателя. Failed to create the server. Continuing without it. Не удалось создать сервер. Придется обойтись без сервера. Server mode disabled. Continuing without it. Режим сервера выключен. Придется обойтись без сервера. Unloading soundfont: "%1" (SFID=%2) Выгружается файл SF2: "%1" (SFID=%2) Failed to unload the soundfont: "%1". Не удалось выгрузить файл SF2: "%1". New settings will be effective after restarting all fluidsynth engines. Некоторые изменения будут учтены только после перезагрузки всех движков fluidsynth. Do you want to restart all engines now? Вы хотите перезапустить все движки? Add a new engine Добавить новый движок Delete current engine Удалить активный движок Output peak level Индикатор уровня громкости qsynthMessagesForm Messages Сообщения Messages output log Журнал сообщений Qsynth Logging stopped --- %1 --- Журналирование остановлено --- %1 --- Logging started --- %1 --- Журналирование начато --- %1 --- qsynthOptionsForm Display Интерфейс Sample messages text font display Шрифт для отображения сообщения &Font... &Шрифт... Select font for the messages text display Выберите шрифт для отображения сообщений &Messages limit: &Строк сообщений: Whether to keep a maximum number of lines in the messages window Сохранять ли максимально возможное количество строк сообщений 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 The maximum number of message lines to keep in view Максимальное количество показываемых строк сообщений Other Другое &Confirm application close &Запрашивать подтверждение на выход из программы Whether to ask for confirmation on application exit Запрашивать ли подтверждение на выход из приложения &Keep child windows always on top &Держать подчинённые окна всегда наверху Whether to keep all child windows on top of the main window Держать ли подчинённые окна над основным окном программы Capture standard &output Захватывать стандартный интерфейс &вывода сообщений Whether to capture standard output (stdout/stderr) into messages window Захватывать ли стандартный интерфейс вывода сообщений (stdout/stderr) для окна сообщений Warning Предупреждение Do you want to apply the changes? Вы хотите учесть изменения? Some options have been changed. Некоторые параметры были изменены. Information Информация Some settings may be only effective next time you start this application. Messages Log Журнал сообщений Log files Файлы журналов Messages Сообщения Logging Журналирование Messages log file Файл журнала сообщений Browse for the messages log file location Укажите каталог для хранения файла с журналом сообщений ... ... Whether to activate a messages logging to file. Записывать ли журнал сообщений в файл Messages &log file: &Файл журнала сообщений: Knobs Кнопки Kno&b graphic style: &Стиль оформления кнопок: Graphic style for knobs Стиль оформления кнопок Classic Классический Vokimon Вокимон Peppino Пеппино Skulpture Скульптура Legacy Прежний Mouse motion be&havior: Поведение при вращении &мышью: Mouse motion behavior for knobs Поведение кнопок при вращении их мышью Radial Радиальное Linear Линейное Custom &Color palette theme: Custom color palette theme Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes &Widget style theme: Custom widget style theme Whether to monitor and show engine output peak level meters Показывать ли индикатор уровня громкости движка Output &peak level meters Включить &индикатор уровня громкости Whether to show system tray message on main window close Sho&w system tray message on close Defaults Whether to enable the system tray icon Включать ли значок в области уведомления Options Параметры &Enable system tray icon &Использовать область уведомления Whether to start minimized to system tray Убирать ли окно в область уведомления Start minimi&zed to system tray &При старте скрывать окно в область уведомления &Base font size: &Кегль шрифта в GUI: Base application font size (pt.) Кегль шрифта в интерфейсе приложения (пункты) (default) (по умолчанию) General Language 6 6 7 7 8 8 9 9 10 10 11 11 12 12 qsynthPaletteForm Color Themes Name Имя Current color palette name Save current color palette name Save Delete current color palette name Delete Palette Current color palette Generate: Base color to generate palette Reset all current palette colors Reset Import a custom color theme (palette) from file Import... Export a custom color theme (palette) to file Export... Show Details Import File - %1 Palette files (*.%1) Save Palette - %1 All files (*.*) Warning - %1 Could not import from file: %1 Sorry. Export File - %1 Some settings have been changed. Do you want to discard the changes? Some settings have been changed: "%1". Do you want to save the changes? qsynthPaletteForm::PaletteModel Color Role Active Inactive Disabled qsynthPresetForm Preset Предустановка Prog Прогр. Name Имя SFID SFID Soundfont Soundfont Program selector Выбор программы Channel Preset Bank Банк Bank selector Выбор банка Preview Прослушать Whether to preview the current selection Просматривать ли текущее выделение Channel %1 Канал %1 qsynthSetupForm Enable MIDI &Input Разрешить чтение &событий MIDI Enable MIDI input Разрешить чтение событий MIDI Whether to show MIDI router events on messages window Показывать ли события маршрутизатора MIDI в окне сообщений &Verbose MIDI event messages &Подробный вывод сообщений MIDI Print out verbose messages about MIDI events Показывать подробную информацию о сообщениях MIDI MIDI &Channels: &Каналов MIDI: Number of MIDI channels Количество каналов MIDI Input MIDI driver Драйвер входа MIDI Attempt to connect the JACK outputs to the physical ports Попытка связать выход JACK с физическими портами 64 64 MIDI &Driver: MIDI D&evice: 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8192 Period size in bytes (audio buffer size) Размер периода в байтах (размер звукового буфера) Sample &Format: &Формат выборок: Sample &Rate: &Частота дискретизации: 2 2 4 4 8 8 16 16 32 32 Period count (number of audio buffers) Число периодов (числов звуковых буферов) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample rate in samples per second (Hz) Частота дискретизации в выборках на секунду (Гц) Buffer Cou&nt: Число &буферов: Sample format Формат выборок Buffer &Size: &Размер буфера: Output audio driver Звуковой драйвер выхода Audio &Channels: Звуковых &каналов: &Polyphony: &Полифония: Number of stereo audio channels Количество стереофонических звуковых каналов Audio &Groups: Звуковых &групп: Number of enabled polyphonic voices Количество включённых полифонических голосов gm gs mma xs MIDI Client &Name ID (ALSA/CoreMidi): Attempt to connect the MIDI inputs to the physical ports &Auto Connect MIDI Inputs D&ump MIDI router events Audio &Driver: Audio D&evice: Number of audio groups Количество звуковых групп JACK Client &Name ID: &Auto Connect JACK Outputs &WASAPI Exclusive Mode Name Имя Open soundfont file for loading Открыть для загрузки файл SF2 &Remove &Удалить &Up &Выше &Down &Ниже Type Тип Realtime Реал. время Current Сейчас Default Стандарт. Min Мин Max Макс Options Параметры Warning Предупреждение Some settings have been changed. Некоторые настройки изменились. Do you want to apply the changes? Вы хотите учесть изменения? Remove Удалить Move Up Переместить выше Move Down Переместить ниже Soundfont files Файлы SF2 All files Error Ошибка Failed to add soundfont file Не удалось добавить файл SF2 Please, check for a valid soundfont file. Проверьте целостность файла SF2 Open... Открыть... Soundfont file already on list Этот файл SF2 уже есть в списке Add anyway? Всё равно добавить? Engine &Name: Название &движка: Engine display name Отображать имя движка pid pid qsynth qsynth ALSA Sequencer client name identification Идентификация клиента секвенсера ALSA &Multiple JACK Outputs &Несколько выходов JACK Create multiple JACK output ports for channels, groups and effects Создать несколько портов выхода JACK для каналов, групп и эффектов fluidsynth fluidsynth JACK client name identification Идентификация клиента JACK Soundfont stack Список файлов SF2 &Open... &Открыть... Remove selected soundfont from stack Удалить файл SF2 из списка Move up selected soundfont towards the top of stack Переместить файл SF2 вверх по списку Move down selected soundfont towards the bottom of stack Переместить файл SF2 вниз по списку Setup Параметры движка Edit Изменить &MIDI &MIDI MIDI device name Название устройства MIDI MIDI &Bank Select mode: MIDI Bank Select mode &Audio &Звук &Soundfonts &Файлы SF2 SFID SFID Offset Смещение Edit selected soundfont bank offset Изменить выбранное смещение банка SF2 &Edit &Изменить S&ettings &Сводка qsynth-1.0.3/src/translations/PaxHeaders/qsynth_es.ts0000644000000000000000000000013214771226115020022 xustar0030 mtime=1743072333.118076147 30 atime=1743072333.117076153 30 ctime=1743072333.118076147 qsynth-1.0.3/src/translations/qsynth_es.ts0000644000175000001440000026121014771226115020014 0ustar00rncbcusers QObject (default) (por omisión) Usage: %1 [options] [soundfonts] [midifiles] Uso: %1 [opciones] [soundfonts] [midifiles] Options Opciones Don't create a midi driver to read MIDI input events [default = yes] No crear un controlador de entrada MIDI [por omisión = sí] The name of the midi driver to use [oss,alsa,alsa_seq,...] El nombre del controlador MIDI que se va a utilizar [oss,alsa,alsa_seq,...] The number of midi channels [default = 16] El número de canales MIDI [por omisión = 16] The audio driver [alsa,jack,oss,dsound,...] El controlador de audio [alsa,jack,oss,dsound,...] Attempt to connect the jack outputs to the physical ports Intentar la conexión de las salidas de jack a puertos físicos The number of stereo audio channels [default = 1] El número de canales estereofónicos de audio [por omisión = 1] The number of audio groups [default = 1] El número de grupos de audio [por omisión = 1] Size of each audio buffer Tamaño de cada memoria intermedia de audio Number of audio buffers Número de memorias intermedias de audio Set the sample rate Establecer la frecuencia de muestreo Turn the reverb on or off [1|0|yes|no|on|off, default = on] Habilitar o deshabilitar la reverberación [1|0|yes|no|on|off, por omisión = on] Turn the chorus on or off [1|0|yes|no|on|off, default = on] Habilitar o deshabilitar el efecto "coro" [1|0|yes|no|on|off, por omisión = on] Set the master gain [0 < gain < 2, default = 1] Establecer la ganancia de la salida principal [0 < ganancia < 2, por omisión = 1] Define a setting name=value Definir un ajuste nombre=valor Create and start server [default = no] Crear e iniciar el servidor [por omisión = no] Don't read commands from the shell [ignored] No leer mandatos desde el intérprete [ignorado] Dump midi router events Volcar eventos MIDI de encaminamiento Print out verbose messages about midi events Imprimir mensajes detallados sobre eventos MIDI Show help about command line options Mostrar ayuda sobre las opciones de línea de mandatos Show version information Mostrar información de versión Set the master gain [0 < gain < 10, default = 1] SoundFont Files Archivos de soundfonts [soundfonts] [soundfonts] MIDI Files Archivos MIDI [midifiles] [midifiles] Option -m requires an argument (midi-driver). La opción -m requiere un argumento (midi-driver). Option -K requires an argument (midi-channels). La opción -K requiere un argumento (midi-channels). Option -a requires an argument (audio-driver). La opción -a requiere un argumento (audio-driver). Option -L requires an argument (audio-channels). La opción -L requiere un argumento (audio-channels). Option -G requires an argument (audio-groups). La opción -G requiere un argumento (audio-groups). Option -z requires an argument (audio-bufsize). La opción -z requiere un argumento (audio-bufsize). Option -c requires an argument (audio-bufcount). La opción -c requiere un argumento (audio-bufcount). Option -r requires an argument (sample-rate). La opción -r requiere un argumento (sample-rate). Option -g requires an argument (gain). La opción -g requiere un argumento (gain). Option -o requires an argument. La opción -o requiere un argumento. Unknown option '%1'. Opción desconocida '%1'. qsynthAboutForm Version Versión Debugging option enabled. Opción de depuración habilitada. System tray disabled. Bandeja del sistema deshabilitada. Server option disabled. Opción de servidor deshabilitada. System reset option disabled. Opción de reajuste del sistema deshabilitada. Bank offset option disabled. Opción de desplazamiento de bancos deshabilitada. Using: Qt %1 Usando: Qt %1 FluidSynth %1 FluidSynth %1 Website Sitio web This program is free software; you can redistribute it and/or modify it Este programa es software libre; puede redistribuirlo y/o modificarlo under the terms of the GNU General Public License version 2 or later. bajo los términos de la Licencia Pública General GNU versión 2 o posterior. About Acerca de &Close &Cerrar About Qt Acerca de Qt qsynthChannelsForm Channels Canales Edit Editar Unset Deponer Refresh Refrescar Warning Aviso Delete preset: Borrar preajustes: Are you sure? ¿Está seguro? Preset &Name: &Nombre de los preajustes: Settings preset name Nombre de los preajustes (default) (por omisión) Save settings as current preset name Guardar ajustes con el nombre de preajustes actual &Save &Guardar Delete current settings preset Borrar el conjunto de ajustes actual &Delete &Borrar Channels view Vista de canales In Entrada Chan Canal Bank Banco Prog Prog Name Nombre SFID SFID Soundfont Soundfont qsynthMainForm Information Información Warning Aviso is about to terminate. está a punto de terminar. Are you sure? ¿Está seguro? The program will keep running in the system tray. To terminate the program, please choose "Quit" in the context menu of the system tray icon. El programa va a continuar en ejecución en la bandeja del sistema Para terminar el programa, por favor elija "Terminar" en el menú contextual del icono de la bandeja del sistema. Don't show this message again No mostrar de nuevo este mensaje Loading soundfont: "%1" Cargando soundfont: "%1" Failed to load the soundfont: "%1". Ha fallado la carga del soundfont "%1". Playing MIDI file: "%1" Reproduciendo archivo MIDI: "%1" Failed to play MIDI file: "%1". Ha fallado la reproducción del archivo MIDI: "%1". Error Error &Hide &Ocultar Mi&nimize Mi&nimizar S&how &Mostrar Rest&ore Re&staurar &New engine... &Nuevo motor... &Delete &Borrar Re&start Re&iniciar &Start &Arrancar &Reset &Reajustar &Panic &Pánico &Channels &Canales Set&up... C&onfiguración... Engines Motores &Messages M&ensajes &Options... O&pciones... &Quit &Terminar Don't ask this again No preguntar esto de nuevo Delete fluidsynth engine: Borrar motor fluidsynth: Creating synthesizer engine Creación del motor del sintetizador Failed to create the synthesizer. Cannot continue without it. Ha fallado la creación del sintetizador No es posible continuar. Loading soundfont: "%1" (bank offset %2) Cargando el soundfont "%1" (desplazamiento de banco %2) Failed to set bank offset (%1) for soundfont: "%2". Ha fallado el desplazamiento de banco (%1) para el soundfont "%2". Creating audio driver (%1) Creación del controlador de audio (%1) Failed to create the audio driver (%1). Cannot continue without it. Ha fallado la creación del controlador de audio (%1) No es posible continuar. Creating MIDI router (%1) Creación del encaminador MIDI (%1) Failed to create the MIDI input router (%1). No MIDI input will be available. Ha fallado la creación del encaminador MIDI (%1) No estará disponible la entrada MIDI. Creating MIDI driver (%1) Creación del controlador MIDI (%1) Failed to create the MIDI driver (%1). No MIDI input will be available. Ha fallado la creación del controlador MIDI (%1). No estará disponible la entrada MIDI. Creating MIDI player Creación del reproductor MIDI Failed to create the MIDI player. Continuing without a player. Ha fallado la creación del reproductor MIDI. Continuando sin un reproductor. Creating server Creación del servidor Failed to create the server. Continuing without it. Ha fallado la creación del servidor. Continuando sin él. Server mode disabled. Continuing without it. Modo servidor deshabilitado. Continuando sin él. Synthesizer engine started. Motor de sintetizador iniciado. Destroying server Destrucción del servidor Stopping MIDI player Deteniendo reproductor MIDI Waiting for MIDI player to terminate Esperando que el reproductor MIDI termine Destroying MIDI player Destrucción del reproducción MIDI Destroying MIDI driver Destrucción del controlador MIDI Destroying MIDI router Destrucción del encaminador MIDI Destroying audio driver Destrucción del controlador de audio Unloading soundfont: "%1" (SFID=%2) Descargando el soundfont "%1" (SFID=%2) Failed to unload the soundfont: "%1". Ha fallado la descarga del soundfont: "%1". Destroying synthesizer engine Destruyendo el motor del sintetizador Synthesizer engine terminated. Motor del sintetizador terminado. New settings will be effective after restarting all fluidsynth engines. Los nuevos ajustes serán efectivas después de reiniciar todos los motores de Fluidsynth. Please note that this operation may cause temporary MIDI and Audio disruption. Por favor, tenga en cuenta que esta operacón puede causar trastornos temporales en MIDI y audio. Do you want to restart all engines now? ¿Quiere reiniciar todos los motores ahora? New settings will be effective after restarting the fluidsynth engine: Los nuevos ajustes serán efectivos después de reiniciar el motor de Fluidsynth: Do you want to restart the engine now? ¿Quiere reiniciar el motor ahora? Add a new engine Añadir un nuevo motor Engine selector (right-click for menu) Selector de motor (clic con el botón derecho del ratón para menú) Delete current engine Borrar el motor actual Show/hide the channels view window Mostrar/ocultar la ventana de vista de canales Complete engine restart Reinicio completo del motor Program reset (all channels) Reajustar el programa (todos los canales) Show instance settings and configuration dialog Mostrar ajustes de la instancia y diálogo de configuración Master Salida principal &Gain &Ganancia Master Gain Ganancia de la salida principal System reset Reajuste del sistema Reverb Reverberación Reverb effect activation Activación del efecto de reverberación Ac&tive Ac&tivar Reverb Level Nivel de reverberación &Level &Nivel Reverb Width Amplitud de reverberación &Width &Amplitud Reverb Damp Factor Factor de humedad de reverberación D&amp &Humedad Reverb Room Size Tamaño de sala de reverberación R&oom &Sala Chorus Coro Chorus Modulation Type Tipo de modulación de coro Sine Seno Triangle Triángulo T&ype: T&ipo: Chorus effect activation Activación del efecto de coro Act&ive Act&ivar Number of Chorus Stages Número de etapas de coro &N &N Chorus Level Nivel de coro Le&vel Ni&vel Chorus Speed (Hz) Velocidad de coro (Hz) Chorus Speed Hz Velocidad de coro Hz Spee&d Veloci&dad Chorus Depth (ms) Intensidad de coro (ms) Dept&h &Intensidad Output peak level Nivel de pico de salida Quit this application Terminar esta aplcación Show general options dialog Mostrar diálogo de opciones generales Show/hide the messages log window Mostrar/ocultar la ventana de registro de mensajes Show information about this application Mostrar información sobre esta aplicación A&bout... A&cerca de... qsynthMessagesForm Logging stopped --- %1 --- Registro parado --- %1 --- Logging started --- %1 --- Registro iniciado --- %1 --- Messages Mensajes Messages output log Registro de salida de mensajes qsynthOptionsForm Information Información Some settings may be only effective next time you start this application. Algunas opciones pueden tener efecto solamente después de la próxima vez que inicie esta aplicación. Warning Aviso Some options have been changed. Algunas opciones han cambiado. Do you want to apply the changes? ¿Quiere aplicar los cambios? Messages Log Registro de mensajes Log files Archivos de registro Display Visualización Messages Mensajes General General Sample messages text font display Texto de muestra para visualización de tipografía de mensajes Select font for the messages text display Seleccionar tipografía para la visualización de texto de mensajes &Font... &Tipografía... Whether to keep a maximum number of lines in the messages window Determina si se ha de conservar un máximo número de líneas en la ventana de mensajes &Messages limit: Límite de &mensajes: The maximum number of message lines to keep in view El máximo número de líneas de mensajes que se conservan en la vista 100 100 250 250 500 500 1000 1000 2500 2500 5000 5000 Logging Registro Messages log file Archivo de registro de mensajes Browse for the messages log file location Explorar la ubicación del archivo de registro de mensajes ... ... Whether to activate a messages logging to file. Determina si se ha de activar el registro de mensajes en un archivo. Custom Personalización &Color palette theme: Paleta de &colores del tema: Custom color palette theme Paleta de colores personalizada Wonton Soup DO NOT TRANSLATE KXStudio DO NOT TRANSLATE Manage custom color palette themes Gestionar los temas personalizados de paleta de color &Widget style theme: Tema de estilo de &widgets: Custom widget style theme Tema de estilo de widgets personalizado Other Otros Whether to ask for confirmation on application exit Determina si se ha de solicitar confirmación para terminar la aplicación &Confirm application close &Confirmar el cierre de la aplicación Whether to keep all child windows on top of the main window Determina si se han de mantener todas las ventanas hijas por encima de la ventana principal &Keep child windows always on top &Mantener las ventanas hijas siempre encima Whether to capture standard output (stdout/stderr) into messages window Determina si se ha de capturar la salida estándar (stdout/stderr) en la ventana de mensajes Capture standard &output Capturar la salida &estándard Whether to monitor and show engine output peak level meters Determina si se han de monitorizar y mostrar los medidores de picos de salida del motor Output &peak level meters Medidores de &picos de nivel de salida Whether to enable the system tray icon Determina si se habilita el icono en la bandeja del sistema &Enable system tray icon &Habilitar el icono en la bandeja del sistema Whether to start minimized to system tray Determina si se inicia minimizado en la bandeja del sistema Start minimi&zed to system tray Iniciar minimi&zado en la bandeja del sistema Knobs Botones giratorios Graphic style for knobs Estilo gráfico para los botones rotatorios Classic Clásico Vokimon Vokimon Peppino Peppino Legacy Heredado Radial Radial Linear Lineal Mouse motion behavior for knobs Comportamiento del movimiento del ratón para los botones rotatorios Options Opciones Whether to show system tray message on main window close Mostrar o no un mensaje en la bandeja del sistema al cerrar la ventana principal Sho&w system tray message on close Mostra&r mensaje en la bandeja del sistema al cerrar Language Idioma Defaults Por omisión &Base font size: Tamaño &base de fuentes: Base application font size (pt.) Tamaño base de fuentes de la aplicación (pt.) (default) (por omisión) 8 8 9 9 10 10 11 11 12 12 Messages &log file: Archivo de &registro de mensajes: Kno&b graphic style: Estilo gráfico de &botones rotatorios: Mouse motion be&havior: Comportamiento del &movimiento del ratón: 6 6 7 7 Skulpture Skulpture qsynthPaletteForm Color Themes Temas de colores Name Nombre Current color palette name Nombre actual de la paleta de colores Save current color palette name Guardar el nombre actual de la paleta de colores Save Guardar Delete current color palette name Borrar nombre actual de la paleta de colores Delete Borrar Palette Paleta Current color palette Paleta de colores actual Generate: Generar: Base color to generate palette Color base para generar la paleta Reset all current palette colors Restablecer todos los colores de la paleta actual Reset Restablecer Import a custom color theme (palette) from file Importar un tema personalizado de colores (paleta) desde un archivo Import... Importar... Export a custom color theme (palette) to file Exportar un tema personalizado de colores (paleta) a un archivo Export... Exportar... Show Details Mostrar detalles Import File - %1 Importar archivo - %1 Palette files (*.%1) Archivos de paletas (*.%1) Save Palette - %1 Guardar paleta - %1 All files (*.*) Todos los archivos (*.*) Warning - %1 Aviso - %1 Could not import from file: %1 Sorry. No se ha podido importar desde archivo: %1. Lo siento. Export File - %1 Exportar archivo - %1 Some settings have been changed. Do you want to discard the changes? Algunas opciones han cambiado. ¿Desea descartar los cambios? Some settings have been changed: "%1". Do you want to save the changes? Algunas opciones han cambiado: "%1". ¿Desea guardar los cambios? qsynthPaletteForm::PaletteModel Color Role Rol de color Active Activo Inactive Inactivo Disabled Deshabilitado qsynthPresetForm Channel %1 Canal %1 Channel Preset Preajuste de canal Preset Preajuste Bank selector Selector de canales Bank Banco Program selector Selector de programa Prog Prog Name Nombre SFID SFID Soundfont Soundfont Whether to preview the current selection Determina si se previsualizará la selección actual Preview Previsualización qsynthSetupForm Setup Configuración Warning Aviso Some settings have been changed. Algunos ajustes han cambiado. Do you want to apply the changes? ¿Quiere aplicar los cambios? Open... Abrir... Edit Editar Remove Borrar Move Up Mover hacia arriba Move Down Moves hacia abajo Soundfont files Archivos de soundfonts All files Todos los archivos Soundfont file already on list Archivo de soundfont ya está en la lista Add anyway? ¿Añadir de todas formas? Error Error Failed to add soundfont file Ha fallado la adición del arhivo de soundfont Please, check for a valid soundfont file. Por favor, verifique se trata de un soundfont válido. Engine &Name: &Nombre del motor: Engine display name Nombre visible de motor &MIDI &MIDI MIDI device name nombre de dispositivo MIDI Input MIDI driver Controlador de entrada MIDI ALSA Sequencer client name identification Identificador de cliente del secuenciador de ALSA pid pid qsynth qsynth Whether to show MIDI router events on messages window Determina si se mostrarán eventos del encaminador MIDI en la ventana de mensajes Print out verbose messages about MIDI events Imprimir mensajes detallados sobre eventos MIDI &Verbose MIDI event messages Mensajes &detallados de eventos MIDI Number of MIDI channels Número de canales MIDI MIDI &Channels: &Canales MIDI: Enable MIDI input Habilitar entrada MIDI Enable MIDI &Input Habilitar &Entrada MIDI gm gm gs gs mma mma xs xs MIDI &Bank Select mode: Modo de selección de &Banco MIDI: MIDI Bank Select mode Modo de selección de Banco MIDI &Audio &Audio Sample &Format: &Formato de muestra: Output audio driver Controlador de salida de audio MIDI &Driver: &Controlador MIDI: MIDI D&evice: &Dispositivo MIDI: MIDI Client &Name ID (ALSA/CoreMidi): &Nombre ID de Cliente MIDI: Attempt to connect the MIDI inputs to the physical ports Intentar conectar las entradas MIDI a los puertos físicos &Auto Connect MIDI Inputs &Auto conectar entradas MIDI D&ump MIDI router events &Volcado de eventos del enrutador MIDI Audio &Driver: Controlador de &Audio: Sample format Formato de muestra Period size in bytes (audio buffer size) Tamaño del periodo en bytes (tamaño de la memoria intermedia de audio) 64 64 128 128 256 256 512 512 1024 1024 2048 2048 4096 4096 8192 8192 Buffer Cou&nt: &Número de memorias intermedias: Sample rate in samples per second (Hz) Frecuencia de muestreo en muestras por segundo (Hz) 22050 22050 44100 44100 48000 48000 88200 88200 96000 96000 Sample &Rate: F&recuencia de muestreo: Period count (number of audio buffers) Número de periodos (número de memorias intermedias de audio) 2 2 4 4 8 8 16 16 32 32 Buffer &Size: &Tamaño de la memoria intermedia: Audio &Channels: &Canales de Audio: Number of audio groups Número de grupos de audio Number of enabled polyphonic voices Número de voces polifónicas habilitadas Number of stereo audio channels Número de canales estereofónicos de audio &Polyphony: &Polifonía: Audio &Groups: &Grupos de Audio: JACK client name identification Identificación del nombre de cliente de JACK fluidsynth fluidsynth Attempt to connect the JACK outputs to the physical ports Intentar la conexión de las salidas de JACK a los puertos físicos Audio D&evice: D&ispositivo de Audio: JACK Client &Name ID: &Nombre ID del cliente JACK: &Auto Connect JACK Outputs &Auto conexión de salidas JACK Create multiple JACK output ports for channels, groups and effects Creación de múltiples puertos de salida de JACK para canales, grupos y efectos &Multiple JACK Outputs &Múltiples salidas de JACK &WASAPI Exclusive Mode Modo exclusivo de &WASAPI &Soundfonts &Soundfonts Soundfont stack Pila de soundfont SFID SFID Name Nombre Offset Desplazamiento Open soundfont file for loading Abrir archivo de soundfont para carga &Open... &Abrir... Edit selected soundfont bank offset Editar desplazamiento del banco de soundfont &Edit &Edición Remove selected soundfont from stack Borrar el soundfont seleccionado de la pila &Remove &Borrar Move up selected soundfont towards the top of stack Mover hacia arriba el soundfont seleccionado hacia la cima de la pila &Up A&rriba Move down selected soundfont towards the bottom of stack Mover hacia abajo el soundfont seleccionado hacia la base de la pila &Down A&bajo S&ettings A&justes Type Tipo Realtime Tiempo real Current Actual Default Por omisión Min Min Max Max Options Opciones qsynth-1.0.3/src/PaxHeaders/qsynthChannelsForm.cpp0000644000000000000000000000013214771226115017246 xustar0030 mtime=1743072333.106076209 30 atime=1743072333.105076214 30 ctime=1743072333.106076209 qsynth-1.0.3/src/qsynthChannelsForm.cpp0000644000175000001440000003457214771226115017251 0ustar00rncbcusers// qsynthChannelsForm.cpp // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthChannelsForm.h" #include "qsynthChannels.h" #include "qsynthEngine.h" #include "qsynthMainForm.h" #include "qsynthPresetForm.h" #include #include #include #include #include #include #include #include //---------------------------------------------------------------------------- // qsynthChannelsForm -- UI wrapper form. // Constructor. qsynthChannelsForm::qsynthChannelsForm ( QWidget *pParent, Qt::WindowFlags wflags ) : QWidget(pParent, wflags) { // Setup UI struct... m_ui.setupUi(this); m_iChannels = 0; m_ppChannels = nullptr; // No setup synth references initially (the caller will set them). m_pOptions = nullptr; m_pEngine = nullptr; m_pSynth = nullptr; // Initialize dirty control state. m_iDirtySetup = 0; m_iDirtyCount = 0; // Our activity leds (same of main form :). m_pXpmLedOn = new QPixmap(":/images/ledon1.png"); m_pXpmLedOff = new QPixmap(":/images/ledoff1.png"); // Set validators... m_ui.PresetComboBox->setValidator( new QRegularExpressionValidator(QRegularExpression("[\\w-]+"), m_ui.PresetComboBox)); // Soundfonts list view... QHeaderView *pHeader = m_ui.ChannelsListView->header(); pHeader->setDefaultAlignment(Qt::AlignLeft); // pHeader->setDefaultSectionSize(320); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // pHeader->setSectionResizeMode(QHeaderView::Custom); pHeader->setSectionsMovable(false); #else // pHeader->setResizeMode(QHeaderView::Custom); pHeader->setMovable(false); #endif pHeader->setStretchLastSection(true); pHeader->resizeSection(0, 24); // In. m_ui.ChannelsListView->resizeColumnToContents(1); // Ch. m_ui.ChannelsListView->resizeColumnToContents(2); // Bank. m_ui.ChannelsListView->resizeColumnToContents(3); // Prog. pHeader->resizeSection(4, 320); // Name. m_ui.ChannelsListView->resizeColumnToContents(5); // SFID. m_ui.ChannelsListView->resizeColumnToContents(6); // Soundfont. // Initial sort order... m_ui.ChannelsListView->sortItems(1, Qt::AscendingOrder); // UI connections... QObject::connect(m_ui.PresetComboBox, SIGNAL(editTextChanged(const QString&)), SLOT(changePreset(const QString&))); QObject::connect(m_ui.PresetSavePushButton, SIGNAL(clicked()), SLOT(savePreset())); QObject::connect(m_ui.PresetDeletePushButton, SIGNAL(clicked()), SLOT(deletePreset())); QObject::connect(m_ui.ChannelsListView, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(contextMenuRequested(const QPoint&))); // QObject::connect(m_ui.ChannelsListView, // SIGNAL(itemActivated(QTreeWidgetItem*,int)), // SLOT(itemActivated(QTreeWidgetItem*,int))); QObject::connect(m_ui.ChannelsListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(itemActivated(QTreeWidgetItem*,int))); } // Destructor. qsynthChannelsForm::~qsynthChannelsForm (void) { // Nullify references. setup(nullptr, nullptr, false); // Delete pixmaps. delete m_pXpmLedOn; delete m_pXpmLedOff; } // Notify our parent that we're emerging. void qsynthChannelsForm::showEvent ( QShowEvent *pShowEvent ) { qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->stabilizeFormEx(); QWidget::showEvent(pShowEvent); } // Notify our parent that we're closing. void qsynthChannelsForm::hideEvent ( QHideEvent *pHideEvent ) { QWidget::hideEvent(pHideEvent); qsynthMainForm *pMainForm = qsynthMainForm::getInstance(); if (pMainForm) pMainForm->stabilizeFormEx(); } // Populate (setup) synth settings descriptors. void qsynthChannelsForm::setup ( qsynthOptions *pOptions, qsynthEngine *pEngine, bool bPreset ) { // Set the proper descriptors. m_pOptions = pOptions; m_pEngine = pEngine; m_pSynth = pEngine ? pEngine->pSynth : nullptr; // Update caption. QString sTitle; if (pEngine) sTitle += pEngine->name(); setWindowTitle(sTitle); // Free up current channel list view. if (m_ppChannels) { delete [] m_ppChannels; m_ppChannels = nullptr; m_iChannels = 0; } // Allocate a new channel list view... m_ui.ChannelsListView->clear(); if (m_pSynth && m_ppChannels == nullptr) { m_iChannels = ::fluid_synth_count_midi_channels(m_pSynth); if (m_iChannels > 0) m_ppChannels = new qsynthChannelsItemPtr [m_iChannels]; if (m_ppChannels) { for (int iChan = 0; iChan < m_iChannels; iChan++) { qsynthChannelsItem *pItem = new qsynthChannelsItem( m_ui.ChannelsListView); if (pItem) { pItem->setIcon(QSYNTH_CHANNELS_IN, *m_pXpmLedOff); pItem->setText(QSYNTH_CHANNELS_CHAN, QString::number(iChan + 1)); } m_ppChannels[iChan] = pItem; } } // Load preset list... m_iDirtySetup++; resetPresets(); m_ui.PresetComboBox->setEditText((m_pEngine->setup())->sDefPreset); m_iDirtySetup--; // Load default preset and update/refresh the whole thing... resetAllChannels(bPreset); } } // Channel item update. void qsynthChannelsForm::updateChannel ( int iChan ) { if (m_pSynth == nullptr || m_ppChannels == nullptr) return; if (iChan < 0 || iChan >= m_iChannels) return; qsynthChannelsItem *pItem = m_ppChannels[iChan]; const QString n = "-"; #ifdef CONFIG_FLUID_CHANNEL_INFO fluid_synth_channel_info_t info; ::memset(&info, 0, sizeof(info)); ::fluid_synth_get_channel_info(m_pSynth, iChan, &info); if (info.assigned) { #ifdef CONFIG_FLUID_BANK_OFFSET info.bank += ::fluid_synth_get_bank_offset(m_pSynth, info.sfont_id); #endif pItem->setText(QSYNTH_CHANNELS_BANK, QString::number(info.bank)); pItem->setText(QSYNTH_CHANNELS_PROG, QString::number(info.program)); pItem->setText(QSYNTH_CHANNELS_NAME, info.name); pItem->setText(QSYNTH_CHANNELS_SFID, QString::number(info.sfont_id)); fluid_sfont_t *sfont = ::fluid_synth_get_sfont_by_id(m_pSynth, info.sfont_id); pItem->setText(QSYNTH_CHANNELS_SFNAME, sfont ? QFileInfo(sfont->get_name(sfont)).baseName() : n); // Make this a dirty-operation. m_iDirtyCount++; } #else fluid_preset_t *pPreset = ::fluid_synth_get_channel_preset(m_pSynth, iChan); if (pPreset) { #ifdef CONFIG_FLUID_PRESET_GET_BANKNUM int iBank = ::fluid_preset_get_banknum(pPreset); #else int iBank = pPreset->get_banknum(pPreset); #endif #ifdef CONFIG_FLUID_BANK_OFFSET int iSFID = 0; QString sSFName; #ifdef CONFIG_FLUID_PRESET_GET_SFONT fluid_sfont_t *pSoundFont = ::fluid_preset_get_sfont(pPreset); #else fluid_sfont_t *pSoundFont = pPreset->sfont; #endif if (pSoundFont) { #ifdef CONFIG_FLUID_SFONT_GET_ID iSFID = ::fluid_sfont_get_id(pSoundFont); #else iSFID = pSoundFont->id; #endif #ifdef CONFIG_FLUID_SFONT_GET_NAME sSFName = ::fluid_sfont_get_name(pSoundFont); #else sSFName = pSoundFont->get_name(pSoundFont); #endif } iBank += ::fluid_synth_get_bank_offset(m_pSynth, iSFID); #endif #ifdef CONFIG_FLUID_PRESET_GET_NUM const int iProg = ::fluid_preset_get_num(pPreset); #else const int iProg = pPreset->get_num(pPreset); #endif #ifdef CONFIG_FLUID_PRESET_GET_NAME const QString sName = ::fluid_preset_get_name(pPreset); #else const QString sName = pPreset->get_name(pPreset); #endif pItem->setText(QSYNTH_CHANNELS_BANK, QString::number(iBank)); pItem->setText(QSYNTH_CHANNELS_PROG, QString::number(iProg)); pItem->setText(QSYNTH_CHANNELS_NAME, sName); pItem->setText(QSYNTH_CHANNELS_SFID, QString::number(iSFID)); pItem->setText(QSYNTH_CHANNELS_SFNAME, QFileInfo(sSFName).baseName()); // Make this a dirty-operation. m_iDirtyCount++; } #endif else { pItem->setText(QSYNTH_CHANNELS_BANK, n); pItem->setText(QSYNTH_CHANNELS_PROG, n); pItem->setText(QSYNTH_CHANNELS_NAME, n); pItem->setText(QSYNTH_CHANNELS_SFID, n); pItem->setText(QSYNTH_CHANNELS_SFNAME, n); } } // All channels update. void qsynthChannelsForm::updateAllChannels (void) { for (int iChan = 0; iChan < m_iChannels; iChan++) updateChannel(iChan); m_ui.ChannelsListView->update(); stabilizeForm(); } // All channels reset update. void qsynthChannelsForm::resetAllChannels ( bool bPreset ) { if (m_pEngine == nullptr) return; qsynthSetup *pSetup = m_pEngine->setup(); if (pSetup == nullptr) return; if (bPreset) changePreset(pSetup->sDefPreset); else updateAllChannels(); } // Update channel activity status LED. void qsynthChannelsForm::setChannelOn ( int iChan, bool bOn ) { if (m_ppChannels == nullptr) return; if (iChan < 0 || iChan >= m_iChannels) return; m_ppChannels[iChan]->setIcon(QSYNTH_CHANNELS_IN, (bOn ? *m_pXpmLedOn : *m_pXpmLedOff)); } // Channel view context menu handler. void qsynthChannelsForm::contextMenuRequested ( const QPoint& pos ) { QTreeWidgetItem *pItem = m_ui.ChannelsListView->itemAt(pos); // Build the channel context menu... QMenu menu(this); QAction *pAction; bool bEnabled = (m_pSynth && pItem); pAction = menu.addAction( QIcon(":/images/edit1.png"), tr("Edit") + "...", this, SLOT(editSelectedChannel())); pAction->setEnabled(bEnabled); #ifdef CONFIG_FLUID_UNSET_PROGRAM pAction = menu.addAction( QIcon(":/images/remove1.png"), tr("Unset"), this, SLOT(unsetSelectedChannel())); #endif menu.addSeparator(); pAction = menu.addAction( tr("Refresh"), this, SLOT(updateAllChannels())); pAction->setEnabled(bEnabled); menu.exec((m_ui.ChannelsListView->viewport())->mapToGlobal(pos)); } // Edit detail dialog. void qsynthChannelsForm::editSelectedChannel (void) { itemActivated(m_ui.ChannelsListView->currentItem(), 0); } // Unset program slot. void qsynthChannelsForm::unsetSelectedChannel (void) { QTreeWidgetItem *pItem = m_ui.ChannelsListView->currentItem(); if (pItem == nullptr) return; if (m_ppChannels == nullptr) return; if (m_pOptions == nullptr || m_pEngine == nullptr || m_pSynth == nullptr) return; int iChan = (pItem->text(QSYNTH_CHANNELS_CHAN).toInt() - 1); if (iChan < 0 || iChan >= m_iChannels) return; #ifdef CONFIG_FLUID_UNSET_PROGRAM ::fluid_synth_unset_program(m_pSynth, iChan); // Make this a dirty-operation. m_iDirtyCount++; #endif updateChannel(iChan); stabilizeForm(); } // Show detail dialog. void qsynthChannelsForm::itemActivated ( QTreeWidgetItem *pItem, int ) { if (pItem == nullptr) return; if (m_ppChannels == nullptr) return; if (m_pOptions == nullptr || m_pEngine == nullptr || m_pSynth == nullptr) return; int iChan = (pItem->text(QSYNTH_CHANNELS_CHAN).toInt() - 1); if (iChan < 0 || iChan >= m_iChannels) return; qsynthPresetForm *pPresetForm = new qsynthPresetForm(this); if (pPresetForm) { // The the proper context. pPresetForm->setup(m_pOptions, m_pSynth, iChan); // Show the channel preset dialog... if (pPresetForm->exec()) updateChannel(iChan); // Done. delete pPresetForm; } stabilizeForm(); } // Channels preset naming slots. void qsynthChannelsForm::changePreset ( const QString& sPreset ) { if (m_pOptions == nullptr || m_pEngine == nullptr || m_pSynth == nullptr) return; if (m_iDirtySetup > 0) return; // Force this is pseudo-dirty procedure... m_iDirtyCount++; // Load presets and update/refresh the whole thing. if (m_pOptions->loadPreset(m_pEngine, sPreset)) { updateAllChannels(); // Very special, make this the new default preset. (m_pEngine->setup())->sDefPreset = sPreset; // This is clean now, for sure. m_iDirtyCount = 0; } stabilizeForm(); } void qsynthChannelsForm::savePreset (void) { if (m_pOptions == nullptr || m_pEngine == nullptr || m_pSynth == nullptr) return; QString sPreset = m_ui.PresetComboBox->currentText(); if (sPreset.isEmpty()) return; // Unload presets (from synth). if (m_pOptions->savePreset(m_pEngine, sPreset)) { m_iDirtySetup++; resetPresets(); m_ui.PresetComboBox->setEditText(sPreset); m_iDirtySetup--; // Again special, force this the default preset. (m_pEngine->setup())->sDefPreset = sPreset; // Not dirty anymore, by definition. m_iDirtyCount = 0; } stabilizeForm(); } void qsynthChannelsForm::deletePreset (void) { if (m_pOptions == nullptr || m_pEngine == nullptr || m_pSynth == nullptr) return; QString sPreset = m_ui.PresetComboBox->currentText(); if (sPreset.isEmpty()) return; // Try to prompt user if he/she really wants this... if (QMessageBox::warning(this, tr("Warning"), tr("Delete preset:") + "\n\n" + sPreset + "\n\n" + tr("Are you sure?"), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Cancel) return; // Remove current preset item... m_iDirtySetup++; int iItem = m_ui.PresetComboBox->currentIndex(); m_pOptions->deletePreset(m_pEngine, sPreset); resetPresets(); m_ui.PresetComboBox->setCurrentIndex(iItem); m_iDirtySetup--; // Load a new preset... changePreset(m_ui.PresetComboBox->currentText()); } void qsynthChannelsForm::resetPresets (void) { if (m_pEngine == nullptr) return; qsynthSetup *pSetup = m_pEngine->setup(); if (pSetup == nullptr) return; m_ui.PresetComboBox->clear(); m_ui.PresetComboBox->addItems(pSetup->presets); m_ui.PresetComboBox->addItem(pSetup->sDefPresetName); } // Stabilize current form state. void qsynthChannelsForm::stabilizeForm (void) { if (m_pEngine == nullptr) return; qsynthSetup *pSetup = m_pEngine->setup(); if (pSetup == nullptr) return; QString sPreset = m_ui.PresetComboBox->currentText(); if (m_pSynth && !sPreset.isEmpty()) { bool bPreset = pSetup->presets.contains(sPreset); m_ui.PresetSavePushButton->setEnabled(m_iDirtyCount > 0 || (!bPreset && sPreset != pSetup->sDefPresetName)); m_ui.PresetDeletePushButton->setEnabled(bPreset); } else { m_ui.PresetSavePushButton->setEnabled(false); m_ui.PresetDeletePushButton->setEnabled(false); } } // end of qsynthChannelsForm.cpp qsynth-1.0.3/src/PaxHeaders/qsynthChannelsForm.ui0000644000000000000000000000013214771226115017101 xustar0030 mtime=1743072333.107076204 30 atime=1743072333.106076209 30 ctime=1743072333.107076204 qsynth-1.0.3/src/qsynthChannelsForm.ui0000644000175000001440000001366314771226115017102 0ustar00rncbcusers rncbc aka Rui Nuno Capela qsynth - A fluidsynth Qt GUI Interface. Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. qsynthChannelsForm 0 0 520 320 Channels :/images/channels1.png 4 4 4 4 Preset &Name: false PresetComboBox 7 0 0 0 Settings preset name true (default) Save settings as current preset name &Save :/images/save1.png false Delete current settings preset &Delete :/images/remove1.png false 7 7 0 0 320 0 Qt::CustomContextMenu Channels view true 4 false true false true true In Chan Bank Prog Name SFID Soundfont PresetComboBox PresetSavePushButton PresetDeletePushButton ChannelsListView qsynth-1.0.3/src/PaxHeaders/config.h.cmake0000644000000000000000000000013214771226115015411 xustar0030 mtime=1743072333.096790475 30 atime=1743072333.096790475 30 ctime=1743072333.096790475 qsynth-1.0.3/src/config.h.cmake0000644000175000001440000001222214771226115015400 0ustar00rncbcusers#ifndef CONFIG_H #define CONFIG_H /* Define to the title of this package. */ #cmakedefine PROJECT_TITLE "@PROJECT_TITLE@" /* Define to the name of this package. */ #cmakedefine PROJECT_NAME "@PROJECT_NAME@" /* Define to the version of this package. */ #cmakedefine PROJECT_VERSION "@PROJECT_VERSION@" /* Define to the description of this package. */ #cmakedefine PROJECT_DESCRIPTION "@PROJECT_DESCRIPTION@" /* Define to the homepage of this package. */ #cmakedefine PROJECT_HOMEPAGE_URL "@PROJECT_HOMEPAGE_URL@" /* Define to the copyright of this package. */ #cmakedefine PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@" /* Define to the domain of this package. */ #cmakedefine PROJECT_DOMAIN "@PROJECT_DOMAIN@" /* Default installation prefix. */ #cmakedefine CONFIG_PREFIX "@CONFIG_PREFIX@" /* Define to target installation dirs. */ #cmakedefine CONFIG_BINDIR "@CONFIG_BINDIR@" #cmakedefine CONFIG_LIBDIR "@CONFIG_LIBDIR@" #cmakedefine CONFIG_DATADIR "@CONFIG_DATADIR@" #cmakedefine CONFIG_MANDIR "@CONFIG_MANDIR@" /* Define if debugging is enabled. */ #cmakedefine CONFIG_DEBUG @CONFIG_DEBUG@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SIGNAL_H @HAVE_SIGNAL_H@ /* Define if lroundf is available. */ #cmakedefine CONFIG_ROUND @CONFIG_ROUND@ /* Define if Unique/Single instance is enabled. */ #cmakedefine CONFIG_XUNIQUE @CONFIG_XUNIQUE@ /* Define if gradient eye-candy is enabled. */ #cmakedefine CONFIG_GRADIENT @CONFIG_GRADIENT@ /* Define if debugger stack-trace is enabled. */ #cmakedefine CONFIG_STACKTRACE @CONFIG_STACKTRACE@ /* Define if FluidSynth server support is enabled. */ #cmakedefine CONFIG_FLUID_SERVER @CONFIG_FLUID_SERVER@ /* Define if FluidSynth system reset support is enabled. */ #cmakedefine CONFIG_FLUID_SYSTEM_RESET @CONFIG_FLUID_SYSTEM_RESET@ /* Define if FluidSynth bank offset support is enabled. */ #cmakedefine CONFIG_FLUID_BANK_OFFSET @CONFIG_FLUID_BANK_OFFSET@ /* Define if FluidSynth channel info is enabled. */ #cmakedefine CONFIG_FLUID_CHANNEL_INFO @CONFIG_FLUID_CHANNEL_INFO@ /* Define if FluidSynth MIDI router is enabled. */ #cmakedefine CONFIG_FLUID_MIDI_ROUTER @CONFIG_FLUID_MIDI_ROUTER@ /* Define if FluidSynth unset program support is enabled. */ #cmakedefine CONFIG_FLUID_UNSET_PROGRAM @CONFIG_UNSET_PROGRAM@ /* Define if FluidSynth version string support is enabled. */ #cmakedefine CONFIG_FLUID_VERSION_STR @CONFIG_FLUID_VERSION_STR@ /* Define if fluid_settings_dupstr function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_DUPSTR @CONFIG_FLUID_SETTINGS_DUPSTR@ /* Define if fluid_preset_get_banknum function is available. */ #cmakedefine CONFIG_FLUID_PRESET_GET_BANKNUM @CONFIG_FLUID_PRESET_GET_BANKNUM@ /* Define if fluid_preset_get_num function is available. */ #cmakedefine CONFIG_FLUID_PRESET_GET_NUM @CONFIG_FLUID_PRESET_GET_NUM@ /* Define if fluid_preset_get_name function is available. */ #cmakedefine CONFIG_FLUID_PRESET_GET_NAME @CONFIG_FLUID_PRESET_GET_NAME@ /* Define if fluid_preset_get_sfont function is available. */ #cmakedefine CONFIG_FLUID_PRESET_GET_SFONT @CONFIG_FLUID_PRESET_GET_SFONT@ /* Define if fluid_sfont_get_id function is available. */ #cmakedefine CONFIG_FLUID_SFONT_GET_ID @CONFIG_FLUID_SFONT_GET_ID@ /* Define if fluid_sfont_get_name function is available. */ #cmakedefine CONFIG_FLUID_SFONT_GET_NAME @CONFIG_FLUID_SFONT_GET_NAME@ /* Define if fluid_sfont_iteration_start function is available. */ #cmakedefine CONFIG_FLUID_SFONT_ITERATION_START @CONFIG_FLUID_SFONT_ITERATION_START@ /* Define if fluid_sfont_iteration_next function is available. */ #cmakedefine CONFIG_FLUID_SFONT_ITERATION_NEXT @CONFIG_FLUID_SFONT_ITERATION_NEXT@ /* Define if fluid_synth_get_chorus_speed function is available. */ #cmakedefine CONFIG_FLUID_SYNTH_GET_CHORUS_SPEED @CONFIG_FLUID_SYNTH_GET_CHORUS_SPEED@ /* Define if fluid_synth_get_chorus_depth function is available. */ #cmakedefine CONFIG_FLUID_SYNTH_GET_CHORUS_DEPTH @CONFIG_FLUID_SYNTH_GET_CHORUS_DEPTH@ /* Define if fluid_settings_getnum_default function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_GETNUM_DEFAULT @CONFIG_FLUID_SETTINGS_GETNUM_DEFAULT@ /* Define if fluid_settings_getint_default function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_GETINT_DEFAULT @CONFIG_FLUID_SETTINGS_GETINT_DEFAULT@ /* Define if fluid_settings_getstr_default function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_GETSTR_DEFAULT @CONFIG_FLUID_SETTINGS_GETSTR_DEFAULT@ /* Define if fluid_settings_foreach function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_FOREACH @CONFIG_FLUID_SETTINGS_FOREACH@ /* Define if fluid_settings_foreach_option function is available. */ #cmakedefine CONFIG_FLUID_SETTINGS_FOREACH_OPTION @CONFIG_FLUID_SETTINGS_FOREACH_OPTION@ /* Define if new_fluid_server function is available. */ #cmakedefine CONFIG_NEW_FLUID_SERVER @CONFIG_NEW_FLUID_SERVER@ /* Define if system tray is enabled. */ #cmakedefine CONFIG_SYSTEM_TRAY @CONFIG_SYSTEM_TRAY@ /* Define if fluid_free function is available. */ #cmakedefine CONFIG_FLUID_FREE @CONFIG_FLUID_FREE@ /* Define if PipeWire is supported. */ #cmakedefine CONFIG_PIPEWIRE @CONFIG_PIPEWIRE@ /* Define if Wayland is supported */ #cmakedefine CONFIG_WAYLAND @CONFIG_WAYLAND@ #endif /* CONFIG_H */ qsynth-1.0.3/src/PaxHeaders/qsynthMeter.cpp0000644000000000000000000000013214771226115015743 xustar0030 mtime=1743072333.112076178 30 atime=1743072333.112076178 30 ctime=1743072333.112076178 qsynth-1.0.3/src/qsynthMeter.cpp0000644000175000001440000002645614771226115015750 0ustar00rncbcusers// qsynthMeter.cpp // /**************************************************************************** Copyright (C) 2004-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthMeter.h" #include #include #include #include #include #if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) #define horizontalAdvance width #endif // Meter level limits (in dB). #define QSYNTH_METER_MAXDB (+3.0f) #define QSYNTH_METER_MINDB (-70.0f) // The decay rates (magic goes here :). // - value decay rate (faster) #define QSYNTH_METER_DECAY_RATE1 (1.0f - 3E-2f) // - peak decay rate (slower) #define QSYNTH_METER_DECAY_RATE2 (1.0f - 3E-6f) // Number of cycles the peak stays on hold before fall-off. #define QSYNTH_METER_PEAK_FALLOFF 16 // Ref. P.448. Approximate cube root of an IEEE float // Hacker's Delight (2nd Edition), by Henry S. Warren // http://www.hackersdelight.org/hdcodetxt/acbrt.c.txt // static inline float cbrtf2 ( float x ) { // Avoid strict-aliasing optimization (gcc -O2). union { float f; int i; } u; u.f = x; u.i = (u.i >> 4) + (u.i >> 2); u.i += (u.i >> 4) + 0x2a6a8000; // 0x2a6497f8; // return 0.33333333f * (2.0f * u.f + x / (u.f * u.f)); return u.f; } //---------------------------------------------------------------------------- // qsynthMeterScale -- Meter bridge scale widget. // Constructor. qsynthMeterScale::qsynthMeterScale( qsynthMeter *pMeter ) : QWidget(pMeter), m_pMeter(pMeter) { m_iLastY = 0; QWidget::setMinimumWidth(16); // QWidget::setBackgroundRole(QPalette::Mid); const QFont& font = QWidget::font(); QWidget::setFont(QFont(font.family(), font.pointSize() - 4)); } // Draw IEC scale line and label; assumes labels drawed from top to bottom. void qsynthMeterScale::drawLineLabel ( QPainter *p, int y, const QString& sLabel ) { const int iCurrY = QWidget::height() - y; const int iWidth = QWidget::width() - 2; const QFontMetrics& fm = p->fontMetrics(); const int iMidHeight = (fm.height() >> 1); if (iCurrY < iMidHeight || iCurrY > m_iLastY + iMidHeight) { if (fm.horizontalAdvance(sLabel) < iWidth - 5) { p->drawLine(0, iCurrY, 2, iCurrY); if (m_pMeter->portCount() > 1) p->drawLine(iWidth - 3, iCurrY, iWidth - 1, iCurrY); } p->drawText(0, iCurrY - iMidHeight, iWidth - 2, fm.height(), Qt::AlignHCenter | Qt::AlignVCenter, sLabel); m_iLastY = iCurrY + 1; } } // Paint event handler. void qsynthMeterScale::paintEvent ( QPaintEvent * ) { QPainter p(this); m_iLastY = 0; const QPalette& pal = QWidget::palette(); const bool bDark = (pal.base().color().value() < 0x7f); const QColor& color = pal.midlight().color(); p.setPen(bDark ? color.lighter() : color.darker()); drawLineLabel(&p, m_pMeter->iec_level(qsynthMeter::Color0dB), "0"); drawLineLabel(&p, m_pMeter->iec_level(qsynthMeter::Color3dB), "3"); drawLineLabel(&p, m_pMeter->iec_level(qsynthMeter::Color6dB), "6"); drawLineLabel(&p, m_pMeter->iec_level(qsynthMeter::Color10dB), "10"); for (float dB = -20.0f; dB > QSYNTH_METER_MINDB; dB -= 10.0f) drawLineLabel(&p, m_pMeter->iec_scale(dB), QString::number(-int(dB))); } //---------------------------------------------------------------------------- // qsynthMeterValue -- Meter bridge value widget. // Constructor. qsynthMeterValue::qsynthMeterValue ( qsynthMeter *pMeter ) : QFrame(pMeter), m_pMeter(pMeter) { m_fValue = 0.0f; m_iValue = 0; m_fValueDecay = QSYNTH_METER_DECAY_RATE1; m_iPeak = 0; m_fPeakDecay = QSYNTH_METER_DECAY_RATE2; m_iPeakHold = 0; m_iPeakColor = qsynthMeter::Color6dB; QWidget::setMinimumWidth(12); QFrame::setBackgroundRole(QPalette::NoRole); QFrame::setFrameShape(QFrame::StyledPanel); QFrame::setFrameShadow(QFrame::Sunken); } // Frame value one-way accessors. void qsynthMeterValue::setValue ( float fValue ) { if (m_fValue < fValue) m_fValue = fValue; refresh(); } // Reset peak holder. void qsynthMeterValue::peakReset (void) { m_iPeak = 0; } // Value refreshment. void qsynthMeterValue::refresh (void) { if (m_fValue < 0.001f && m_iPeak < 1) return; #if 0 float dB = QSYNTH_METER_MINDB; if (m_fValue > 0.0f) { dB = 20.0f * ::log10f(m_fValue); m_fValue = 0.0f; } if (dB < QSYNTH_METER_MINDB) dB = QSYNTH_METER_MINDB; else if (dB > QSYNTH_METER_MAXDB) dB = QSYNTH_METER_MAXDB; int iValue = m_pMeter->iec_scale(dB); #else int iValue = 0; if (m_fValue > 0.001f) { iValue = m_pMeter->scale(::cbrtf2(m_fValue)); m_fValue = 0.0f; } #endif if (iValue < m_iValue) { iValue = int(m_fValueDecay * float(m_iValue)); m_fValueDecay *= m_fValueDecay; } else { m_fValueDecay = QSYNTH_METER_DECAY_RATE1; } int iPeak = m_iPeak; if (iPeak < iValue) { iPeak = iValue; m_iPeakHold = 0; m_fPeakDecay = QSYNTH_METER_DECAY_RATE2; m_iPeakColor = qsynthMeter::Color10dB; for (; m_iPeakColor > qsynthMeter::ColorOver && iPeak >= m_pMeter->iec_level(m_iPeakColor); --m_iPeakColor) /* empty body loop */; } else if (++m_iPeakHold > m_pMeter->peakFalloff()) { iPeak = int(m_fPeakDecay * float(iPeak)); if (iPeak < iValue) { iPeak = iValue; } else { m_fPeakDecay *= m_fPeakDecay; } } if (iValue == m_iValue && iPeak == m_iPeak) return; m_iValue = iValue; m_iPeak = iPeak; update(); } // Paint event handler. void qsynthMeterValue::paintEvent ( QPaintEvent * ) { QPainter painter(this); const int w = QWidget::width(); const int h = QWidget::height(); int y; if (isEnabled()) { painter.fillRect(0, 0, w, h, m_pMeter->color(qsynthMeter::ColorBack)); y = m_pMeter->iec_level(qsynthMeter::Color0dB); painter.setPen(m_pMeter->color(qsynthMeter::ColorFore)); painter.drawLine(0, h - y, w, h - y); } else { painter.fillRect(0, 0, w, h, QWidget::palette().dark().color()); } painter.drawPixmap(0, h - m_iValue, m_pMeter->pixmap(), 0, h - m_iValue, w, m_iValue); painter.setPen(m_pMeter->color(m_iPeakColor)); painter.drawLine(0, h - m_iPeak, w, h - m_iPeak); } // Resize event handler. void qsynthMeterValue::resizeEvent ( QResizeEvent *pResizeEvent ) { m_iPeak = 0; QWidget::resizeEvent(pResizeEvent); // QWidget::repaint(true); } //---------------------------------------------------------------------------- // qsynthMeter -- Meter bridge slot widget. // Constructor. qsynthMeter::qsynthMeter ( QWidget *pParent ) : QWidget(pParent) { m_iPortCount = 2; // FIXME: Default port count. m_iScaleCount = m_iPortCount; m_ppValues = nullptr; m_ppScales = nullptr; m_fScale = 0.0f; m_iPeakFalloff = QSYNTH_METER_PEAK_FALLOFF; for (int i = 0; i < LevelCount; i++) m_levels[i] = 0; m_colors[ColorOver] = QColor(240, 0, 20); m_colors[Color0dB] = QColor(240,160, 20); m_colors[Color3dB] = QColor(220,220, 20); m_colors[Color6dB] = QColor(160,220, 20); m_colors[Color10dB] = QColor( 40,160, 40); m_colors[ColorBack] = QColor( 20, 40, 20); m_colors[ColorFore] = QColor( 80, 80, 80); m_pHBoxLayout = new QHBoxLayout(); m_pHBoxLayout->setContentsMargins(0, 0, 0, 0); m_pHBoxLayout->setSpacing(0); QWidget::setLayout(m_pHBoxLayout); QWidget::setBackgroundRole(QPalette::NoRole); if (m_iPortCount > 0) { if (m_iPortCount > 1) m_iScaleCount--; m_ppValues = new qsynthMeterValue *[m_iPortCount]; m_ppScales = new qsynthMeterScale *[m_iScaleCount]; for (int iPort = 0; iPort < m_iPortCount; iPort++) { m_ppValues[iPort] = new qsynthMeterValue(this); m_pHBoxLayout->addWidget(m_ppValues[iPort]); if (iPort < m_iScaleCount) { m_ppScales[iPort] = new qsynthMeterScale(this); m_pHBoxLayout->addWidget(m_ppScales[iPort]); } } int iStripCount = 2 * m_iPortCount; if (m_iPortCount > 1) --iStripCount; QWidget::setMinimumSize(12 * iStripCount, 120); QWidget::setMaximumWidth(16 * iStripCount); } else { QWidget::setMinimumSize(2, 120); QWidget::setMaximumWidth(4); } QWidget::setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding)); } // Default destructor. qsynthMeter::~qsynthMeter (void) { for (int iPort = 0; iPort < m_iPortCount; iPort++) { delete m_ppValues[iPort]; if (iPort < m_iScaleCount) delete m_ppScales[iPort]; } delete [] m_ppScales; delete [] m_ppValues; delete m_pHBoxLayout; } // Child widget accessors. int qsynthMeter::iec_scale ( float dB ) const { float fDef = 1.0; if (dB < -70.0) fDef = 0.0; else if (dB < -60.0) fDef = (dB + 70.0) * 0.0025; else if (dB < -50.0) fDef = (dB + 60.0) * 0.005 + 0.025; else if (dB < -40.0) fDef = (dB + 50.0) * 0.0075 + 0.075; else if (dB < -30.0) fDef = (dB + 40.0) * 0.015 + 0.15; else if (dB < -20.0) fDef = (dB + 30.0) * 0.02 + 0.3; else /* if (dB < 0.0) */ fDef = (dB + 20.0) * 0.025 + 0.5; return scale(fDef); } int qsynthMeter::iec_level ( int iIndex ) const { return m_levels[iIndex]; } int qsynthMeter::portCount (void) const { return m_iPortCount; } // Peak falloff mode setting. void qsynthMeter::setPeakFalloff ( int iPeakFalloff ) { m_iPeakFalloff = iPeakFalloff; } int qsynthMeter::peakFalloff (void) const { return m_iPeakFalloff; } // Reset peak holder. void qsynthMeter::peakReset (void) { for (int iPort = 0; iPort < m_iPortCount; iPort++) m_ppValues[iPort]->peakReset(); } // Pixmap accessors. const QPixmap& qsynthMeter::pixmap (void) const { return m_pixmap; } void qsynthMeter::updatePixmap (void) { const int w = QWidget::width(); const int h = QWidget::height(); m_pixmap = QPixmap(w, h); #ifdef CONFIG_GRADIENT QLinearGradient grad(0, 0, 0, h); grad.setColorAt(0.2f, color(ColorOver)); grad.setColorAt(0.3f, color(Color0dB)); grad.setColorAt(0.4f, color(Color3dB)); grad.setColorAt(0.6f, color(Color6dB)); grad.setColorAt(0.8f, color(Color10dB)); QPainter(&m_pixmap).fillRect(0, 0, w, h, grad); #else QPainter painter(&m_pixmap); int y0 = 0; for (int i = Color10dB; i > ColorOver; --i) { const int y1 = iec_level(i); painter.fillRect(0, h - y1, w, y1 - y0, color(i)); y0 = y1; } painter.fillRect(0, 0, w, h - y0, color(ColorOver)); #endif } // Slot refreshment. void qsynthMeter::refresh (void) { for (int iPort = 0; iPort < m_iPortCount; iPort++) m_ppValues[iPort]->refresh(); } // Resize event handler. void qsynthMeter::resizeEvent ( QResizeEvent * ) { m_fScale = 0.85f * float(QWidget::height()); m_levels[Color0dB] = iec_scale( 0.0f); m_levels[Color3dB] = iec_scale( -3.0f); m_levels[Color6dB] = iec_scale( -6.0f); m_levels[Color10dB] = iec_scale(-10.0f); updatePixmap(); } // Meter value proxy. void qsynthMeter::setValue ( int iPort, float fValue ) { m_ppValues[iPort]->setValue(fValue); } // Common resource accessor. const QColor& qsynthMeter::color ( int iIndex ) const { return m_colors[iIndex]; } // end of qsynthMeter.cpp qsynth-1.0.3/src/PaxHeaders/qsynthTabBar.h0000644000000000000000000000013214771226115015467 xustar0030 mtime=1743072333.116076158 30 atime=1743072333.116076158 30 ctime=1743072333.116076158 qsynth-1.0.3/src/qsynthTabBar.h0000644000175000001440000000356514771226115015470 0ustar00rncbcusers// qsynthTabBar.h // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthTabBar_h #define __qsynthTabBar_h #include // Forward declarations. class qsynthEngine; //------------------------------------------------------------------------- // qsynthTabBar - Instance tab widget class. // class qsynthTabBar : public QTabBar { Q_OBJECT public: // Constructor. qsynthTabBar(QWidget *pParent); // Destructor. ~qsynthTabBar(); // Engine accessor. qsynthEngine *engine(int iTab) const; // Current engine accessor. qsynthEngine *currentEngine() const; // Engine adder. int addEngine(qsynthEngine *pEngine); // Engine removal. void removeEngine(int iTab); // Engine tab icon accessor. void setOn(int iTab, bool bOn); signals: // Context menu signal. void contextMenuRequested(int iTab, const QPoint& pos); protected: // Context menu event. void contextMenuEvent(QContextMenuEvent *pContextMenuEvent); }; #endif // __qsynthTabBar_h // end of qsynthTabBar.h qsynth-1.0.3/src/PaxHeaders/qsynthSetup.cpp0000644000000000000000000000013214771226115015767 xustar0030 mtime=1743072333.114076168 30 atime=1743072333.114076168 30 ctime=1743072333.114076168 qsynth-1.0.3/src/qsynthSetup.cpp0000644000175000001440000002301514771226115015760 0ustar00rncbcusers// qsynthSetup.cpp // /**************************************************************************** Copyright (C) 2003-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #include "qsynthAbout.h" #include "qsynthSetup.h" #include //------------------------------------------------------------------------- // qsynthSetup - Prototype settings structure. // // Constructor. qsynthSetup::qsynthSetup (void) { m_pFluidSettings = nullptr; sDefPresetName = QObject::tr("(default)"); } // Default Destructor. qsynthSetup::~qsynthSetup (void) { if (m_pFluidSettings) ::delete_fluid_settings(m_pFluidSettings); m_pFluidSettings = nullptr; } // Fluidsynth settings accessor. fluid_settings_t *qsynthSetup::fluid_settings (void) const { return m_pFluidSettings; } //------------------------------------------------------------------------- // Settings cache realization. // void qsynthSetup::realize (void) { if (m_pFluidSettings) ::delete_fluid_settings(m_pFluidSettings); m_pFluidSettings = ::new_fluid_settings(); // The 'groups' setting is only relevant for LADSPA operation // If not given, set number groups to number of audio channels, because // they are the same (there is nothing between synth output and 'sound card') if ((iAudioGroups == 0) && (iAudioChannels != 0)) iAudioGroups = iAudioChannels; // We'll need these to avoid pedandic compiler warnings... char *pszKey; #if FLUIDSYNTH_VERSION_MAJOR < 2 char *pszVal; #endif // First we'll force all other conmmand line options... if (!sMidiDriver.isEmpty()) { pszKey = (char *) "midi.driver"; ::fluid_settings_setstr(m_pFluidSettings, pszKey, sMidiDriver.toLocal8Bit().data()); } if (sMidiDriver == "alsa_seq" || sMidiDriver == "coremidi") { QString sKey = "midi." + sMidiDriver + ".id"; if (!sMidiName.isEmpty()) { ::fluid_settings_setstr(m_pFluidSettings, sKey.toLocal8Bit().data(), sMidiName.toLocal8Bit().data()); } } else if (!sMidiDevice.isEmpty()) { QString sMidiKey = "midi."; if (sMidiDriver == "alsa_raw") sMidiKey += "alsa"; else sMidiKey += sMidiDriver; sMidiKey += ".device"; ::fluid_settings_setstr(m_pFluidSettings, sMidiKey.toLocal8Bit().data(), sMidiDevice.toLocal8Bit().data()); } #if FLUIDSYNTH_VERSION_MAJOR >= 2 pszKey = (char *) "midi.autoconnect"; ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bMidiAutoConnect)); #endif if (!sAudioDriver.isEmpty()) { pszKey = (char *) "audio.driver"; ::fluid_settings_setstr(m_pFluidSettings, pszKey, sAudioDriver.toLocal8Bit().data()); } if (!sAudioDevice.isEmpty()) { QString sAudioKey = "audio." + sAudioDriver + '.'; if (sAudioDriver == "file") sAudioKey += "name"; else sAudioKey += "device"; ::fluid_settings_setstr(m_pFluidSettings, sAudioKey.toLocal8Bit().data(), sAudioDevice.toLocal8Bit().data()); } if (!sJackName.isEmpty()) { pszKey = (char *) "audio.jack.id"; ::fluid_settings_setstr(m_pFluidSettings, pszKey, sJackName.toLocal8Bit().data()); } pszKey = (char *) "audio.jack.autoconnect"; ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bJackAutoConnect)); pszKey = (char *) "audio.jack.multi"; #if FLUIDSYNTH_VERSION_MAJOR < 2 pszVal = (char *) (bJackMulti ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #else ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bJackMulti)); #endif #if (FLUIDSYNTH_VERSION_MAJOR >= 2 && FLUIDSYNTH_VERSION_MINOR >= 2) || (FLUIDSYNTH_VERSION_MAJOR > 2) #if defined(Q_OS_WINDOWS) pszKey = (char *) "audio.wasapi.exclusive-mode"; ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bWasapiExclusive)); #endif #endif if (!sSampleFormat.isEmpty()) { pszKey = (char *) "audio.sample-format"; ::fluid_settings_setstr(m_pFluidSettings, pszKey, sSampleFormat.toLocal8Bit().data()); } if (iAudioBufSize > 0) { pszKey = (char *) "audio.period-size"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iAudioBufSize); } if (iAudioBufCount > 0) { pszKey = (char *) "audio.periods"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iAudioBufCount); } if (iMidiChannels > 0) { pszKey = (char *) "synth.midi-channels"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iMidiChannels); } pszKey = (char *) "synth.midi-bank-select"; ::fluid_settings_setstr(m_pFluidSettings, pszKey, sMidiBankSelect.toLocal8Bit().data()); if (iAudioChannels > 0) { pszKey = (char *) "synth.audio-channels"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iAudioChannels); } if (iAudioChannels > 1) { pszKey = (char *) "synth.effects-groups"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iAudioChannels / 2); } if (iAudioGroups > 0) { pszKey = (char *) "synth.audio-groups"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iAudioGroups); } if (fSampleRate > 0.0f) { pszKey = (char *) "synth.sample-rate"; ::fluid_settings_setnum(m_pFluidSettings, pszKey, double(fSampleRate)); } if (iPolyphony > 0) { pszKey = (char *) "synth.polyphony"; ::fluid_settings_setint(m_pFluidSettings, pszKey, iPolyphony); } #if 0//Gain is set on realtime (don't need to set it here) if (fGain > 0.0f) { pszKey = (char *) "synth.gain"; ::fluid_settings_setnum(m_pFluidSettings, pszKey, double(fGain)); } #endif pszKey = (char *) "synth.reverb.active"; #if FLUIDSYNTH_VERSION_MAJOR < 2 pszVal = (char *) (bReverbActive ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #else ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bReverbActive)); #endif pszKey = (char *) "synth.chorus.active"; #if FLUIDSYNTH_VERSION_MAJOR < 2 pszVal = (char *) (bChorusActive ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #else ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bChorusActive)); #endif pszKey = (char *) "synth.ladspa.active"; #if FLUIDSYNTH_VERSION_MAJOR < 2 pszVal = (char *) (bLadspaActive ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #else ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bLadspaActive)); #endif #if FLUIDSYNTH_VERSION_MAJOR < 2 pszKey = (char *) "synth.dump"; pszVal = (char *) (bMidiDump ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #endif pszKey = (char *) "synth.verbose"; #if FLUIDSYNTH_VERSION_MAJOR < 2 pszVal = (char *) (bVerbose ? "yes" : "no"); ::fluid_settings_setstr(m_pFluidSettings, pszKey, pszVal); #else ::fluid_settings_setint(m_pFluidSettings, pszKey, int(bVerbose)); #endif // We get command-line supplied options... QStringListIterator options_iter(options); while (options_iter.hasNext()) { const QString& sOpt = options_iter.next(); const QString& sKey = sOpt.section('=', 0, 0); const QString& sVal = sOpt.section('=', 1, 1); settings.insert(sKey, sVal); } options.clear(); // Last we set custom settings... QStringList keys; Settings::ConstIterator iter = settings.constBegin(); const Settings::ConstIterator& iter_end = settings.constEnd(); for ( ; iter != iter_end; ++iter) { const QString& sKey = iter.key(); const QString& sVal = iter.value(); QByteArray tmp = sKey.toLocal8Bit(); pszKey = tmp.data(); switch (::fluid_settings_get_type(m_pFluidSettings, pszKey)) { case FLUID_INT_TYPE: { const int iValue = sVal.toInt(); #ifdef CONFIG_FLUID_SETTINGS_GETINT_DEFAULT int iDefValue = 0; ::fluid_settings_getint_default(m_pFluidSettings, pszKey, &iDefValue); #else const int fDefValue = ::fluid_settings_getint_default(m_pFluidSettings, pszKey); #endif if (iDefValue == iValue) { keys.append(sKey); } else { ::fluid_settings_setint(m_pFluidSettings, pszKey, iValue); } break; } case FLUID_NUM_TYPE: { const double fValue = sVal.toDouble(); #ifdef CONFIG_FLUID_SETTINGS_GETNUM_DEFAULT double fDefValue = 0.0; ::fluid_settings_getnum_default(m_pFluidSettings, pszKey, &fDefValue); #else const double fDefValue = ::fluid_settings_getnum_default(m_pFluidSettings, pszKey); #endif if (fDefValue == fValue) { keys.append(sKey); } else { ::fluid_settings_setnum(m_pFluidSettings, pszKey, fValue); } break; } case FLUID_STR_TYPE: default: { #ifdef CONFIG_FLUID_SETTINGS_GETSTR_DEFAULT char *pszDefValue = nullptr; ::fluid_settings_getstr_default(m_pFluidSettings, pszKey, &pszDefValue); #else const char *pszDefValue = ::fluid_settings_getstr_default(m_pFluidSettings, pszKey); #endif if ((pszDefValue == nullptr) || (QString::fromLocal8Bit(pszDefValue) == sVal)) { keys.append(sKey); } else { ::fluid_settings_setstr(m_pFluidSettings, pszKey, sVal.toLocal8Bit().data()); } break; }} } // Finally, clear-up all default settings... QStringListIterator keys_iter(keys); while (keys_iter.hasNext()) settings.remove(keys_iter.next()); } // end of qsynthSetup.cpp qsynth-1.0.3/src/PaxHeaders/qsynthPaletteForm.h0000644000000000000000000000013214771226115016556 xustar0030 mtime=1743072333.113076173 30 atime=1743072333.113076173 30 ctime=1743072333.113076173 qsynth-1.0.3/src/qsynthPaletteForm.h0000644000175000001440000001675614771226115016565 0ustar00rncbcusers// qsynthPaletteForm.h // /**************************************************************************** Copyright (C) 2005-2024, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthPaletteForm_h #define __qsynthPaletteForm_h #include #include #include #include #include #include // Forward decls. class QListView; class QLabel; class QToolButton; //------------------------------------------------------------------------- // qsynthPaletteForm namespace Ui { class qsynthPaletteForm; } class qsynthPaletteForm: public QDialog { Q_OBJECT public: qsynthPaletteForm(QWidget *parent = nullptr, const QPalette& pal = QPalette()); virtual ~qsynthPaletteForm(); void setPalette(const QPalette& pal); const QPalette& palette() const; void setSettings(QSettings *settings, bool owner = false); QSettings *settings() const; void setPaletteName(const QString& name); QString paletteName() const; bool isDirty() const; static bool namedPalette(QSettings *settings, const QString& name, QPalette& pal, bool fixup = false); static QStringList namedPaletteList(QSettings *settings); static QString namedPaletteConf( QSettings *settings, const QString& name); static void addNamedPaletteConf( QSettings *settings, const QString& name, const QString& filename); static QPalette::ColorRole colorRole(const QString& name); class PaletteModel; class ColorDelegate; class ColorButton; class ColorEditor; class RoleEditor; protected slots: void nameComboChanged(const QString& name); void saveButtonClicked(); void deleteButtonClicked(); void generateButtonChanged(); void resetButtonClicked(); void detailsCheckClicked(); void importButtonClicked(); void exportButtonClicked(); void paletteChanged(const QPalette& pal); void accept(); void reject(); protected: void setPalette(const QPalette& pal, const QPalette& parentPal); bool namedPalette(const QString& name, QPalette& pal) const; QStringList namedPaletteList() const; QString namedPaletteConf(const QString& name) const; void addNamedPaletteConf(const QString& name, const QString& filename); void deleteNamedPaletteConf(const QString& name); static bool loadNamedPaletteConf( const QString& name, const QString& filename, QPalette& pal); static bool saveNamedPaletteConf( const QString& name, const QString& filename, const QPalette& pal); static bool loadNamedPalette( QSettings *settings, const QString& name, QPalette& pal); static bool saveNamedPalette( QSettings *settings, const QString& name, const QPalette& pal); void updateNamedPaletteList(); void updateGenerateButton(); void updateDialogButtons(); void setDefaultDir(const QString& dir); QString defaultDir() const; void setShowDetails(bool on); bool isShowDetails() const; void showEvent(QShowEvent *event); void resizeEvent(QResizeEvent *event); private: Ui::qsynthPaletteForm *p_ui; Ui::qsynthPaletteForm& m_ui; QSettings *m_settings; bool m_owner; QPalette m_palette; QPalette m_parentPalette; PaletteModel *m_paletteModel; bool m_modelUpdated; bool m_paletteUpdated; int m_dirtyCount; int m_dirtyTotal; }; //------------------------------------------------------------------------- // qsynthPaletteForm::PaletteModel class qsynthPaletteForm::PaletteModel : public QAbstractTableModel { Q_OBJECT Q_PROPERTY(QPalette::ColorRole colorRole READ colorRole) public: PaletteModel(QObject *parent = nullptr); int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; bool setData(const QModelIndex &index, const QVariant &value, int role); Qt::ItemFlags flags(const QModelIndex &index) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; void setPalette(const QPalette &palette, const QPalette &parentPalette); const QPalette& palette() const; void setGenerate(bool on) { m_generate = on; } QPalette::ColorRole colorRole() const { return QPalette::NoRole; } signals: void paletteChanged(const QPalette &palette); protected: QPalette::ColorGroup columnToGroup(int index) const; int groupToColumn(QPalette::ColorGroup group) const; private: QPalette m_palette; QPalette m_parentPalette; QMap m_roleNames; int m_nrows; bool m_generate; }; //------------------------------------------------------------------------- // qsynthPaletteForm::ColorDelegate class qsynthPaletteForm::ColorDelegate : public QItemDelegate { public: ColorDelegate(QObject *parent = nullptr) : QItemDelegate(parent) {} QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget *editor, const QModelIndex& index) const; void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex& index) const; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem& option, const QModelIndex &index) const; virtual void paint(QPainter *painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; }; //------------------------------------------------------------------------- // qsynthPaletteForm::ColorButton class qsynthPaletteForm::ColorButton : public QPushButton { Q_OBJECT Q_PROPERTY(QBrush brush READ brush WRITE setBrush) public: ColorButton (QWidget *parent = nullptr); const QBrush& brush() const; void setBrush(const QBrush& b); signals: void changed(); protected slots: void chooseColor(); protected: void paintEvent(QPaintEvent *event); private: QBrush m_brush; }; //------------------------------------------------------------------------- // PaleteEditor::ColorEditor class qsynthPaletteForm::ColorEditor : public QWidget { Q_OBJECT public: ColorEditor(QWidget *parent = nullptr); void setColor(const QColor &color); QColor color() const; bool changed() const; signals: void changed(QWidget *widget); protected slots: void colorChanged(); private: qsynthPaletteForm::ColorButton *m_button; bool m_changed; }; //------------------------------------------------------------------------- // PaleteEditor::RoleEditor class qsynthPaletteForm::RoleEditor : public QWidget { Q_OBJECT public: RoleEditor(QWidget *parent = nullptr); void setLabel(const QString &label); void setEdited(bool on); bool edited() const; signals: void changed(QWidget *widget); protected slots: void resetProperty(); private: QLabel *m_label; QToolButton *m_button; bool m_edited; }; #endif // __qsynthPaletteForm_h // end of qsynthPaletteForm.h qsynth-1.0.3/src/PaxHeaders/qsynthChannelsForm.h0000644000000000000000000000013214771226115016713 xustar0030 mtime=1743072333.106076209 30 atime=1743072333.106076209 30 ctime=1743072333.106076209 qsynth-1.0.3/src/qsynthChannelsForm.h0000644000175000001440000000475114771226115016712 0ustar00rncbcusers// qsynthChannelsForm.h // /**************************************************************************** Copyright (C) 2003-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthChannelsForm_h #define __qsynthChannelsForm_h #include "ui_qsynthChannelsForm.h" #include // Forward declarations. class qsynthOptions; class qsynthEngine; class qsynthChannelsItem; class QPixmap; //---------------------------------------------------------------------------- // qsynthChannelsForm -- UI wrapper form. class qsynthChannelsForm : public QWidget { Q_OBJECT public: // Constructor. qsynthChannelsForm(QWidget *pParent = nullptr, Qt::WindowFlags wflags = Qt::WindowFlags()); // Destructor. ~qsynthChannelsForm(); void setup(qsynthOptions *pOptions, qsynthEngine *pEngine, bool bPreset); void setChannelOn(int iChan, bool bOn); void resetAllChannels(bool bPreset); void updateChannel(int iChan); public slots: void itemActivated(QTreeWidgetItem*,int); void changePreset(const QString& sPreset); void savePreset(); void deletePreset(); void editSelectedChannel(); void unsetSelectedChannel(); void updateAllChannels(); void contextMenuRequested(const QPoint&); protected: void showEvent(QShowEvent *); void hideEvent(QHideEvent *); void stabilizeForm(); void resetPresets(); private: // The Qt-designer UI struct... Ui::qsynthChannelsForm m_ui; // Instance variables. int m_iChannels; qsynthChannelsItem **m_ppChannels; qsynthOptions *m_pOptions; qsynthEngine *m_pEngine; fluid_synth_t *m_pSynth; int m_iDirtySetup; int m_iDirtyCount; QPixmap *m_pXpmLedOn; QPixmap *m_pXpmLedOff; }; #endif // __qsynthChannelsForm_h // end of qsynthChannelsForm.h qsynth-1.0.3/src/PaxHeaders/qsynthDialSkulptureStyle.cpp0000644000000000000000000000013214771226115020500 xustar0030 mtime=1743072333.108076199 30 atime=1743072333.108076199 30 ctime=1743072333.108076199 qsynth-1.0.3/src/qsynthDialSkulptureStyle.cpp0000644000175000001440000004161514771226115020477 0ustar00rncbcusers/****************************************************************************** Skulpture - Classical Three-Dimensional Artwork for Qt 4 Copyright (c) 2019 rncbc aka Rui Nuno Capela Copyright (c) 2007-2009 Christoph Feck This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ /* This code is borrowed from the Skulpture KDE4 style * http://skulpture.maxiom.de/ */ #include "qsynthDialSkulptureStyle.h" #include #include #include #include static const bool UsePixmapCache = true; static void paintIndicatorCached(QPainter *painter, const QStyleOption *option, void (*paintIndicator)(QPainter *painter, const QStyleOption *option), bool useCache, const QString &pixmapName) { QPixmap pixmap; if (!useCache || !QPixmapCache::find(pixmapName, &pixmap)) { pixmap = QPixmap(option->rect.size()); #if 1 pixmap.fill(Qt::transparent); // pixmap.fill(Qt::red); #else pixmap.fill(option->palette.color(QPalette::Window)); #endif QPainter p(&pixmap); QStyleOption opt = *option; opt.rect = QRect(QPoint(0, 0), option->rect.size()); // p.setCompositionMode(QPainter::CompositionMode_Clear); // p.setCompositionMode(QPainter::CompositionMode_Source); // p.fillRect(opt.rect, Qt::transparent); // p.setCompositionMode(QPainter::CompositionMode_SourceOver); p.setFont(painter->font()); p.setRenderHint(QPainter::Antialiasing, true); paintIndicator(&p, &opt); p.end(); if (useCache) { QPixmapCache::insert(pixmapName, pixmap); // qDebug() << "inserted into cache:" << pixmapName; } } painter->drawPixmap(option->rect, pixmap); } void paintDialBase(QPainter *painter, const QStyleOption *option) { // painter->fillRect(option->rect, Qt::red); // painter->save(); // painter->setRenderHint(QPainter::Antialiasing, true); int d = qMin(option->rect.width(), option->rect.height()); /* if (d > 20 && option->notchTarget > 0) { d += -1; } */ QRectF r((option->rect.width() - d) / 2.0, (option->rect.height() - d) / 2.0, d, d); const qreal angle = option->direction == Qt::LeftToRight ? 135.0 : 45.0; // const qreal angle = 90; painter->setPen(Qt::NoPen); QColor border_color = option->palette.color(QPalette::Window); #if 0 { QRadialGradient depth_gradient(r.center(), d / 2); // depth_gradient.setColorAt(0.0, QColor(0, 0, 0, 255)); depth_gradient.setColorAt(0.5, QColor(0, 0, 0, 255)); depth_gradient.setColorAt(1.0, QColor(0, 0, 0, 0)); painter->setBrush(depth_gradient); painter->drawEllipse(r); } #endif #if 1 if (option->state & QStyle::State_HasFocus && option->state & QStyle::State_KeyboardFocusChange) { painter->setBrush(option->palette.color(QPalette::Highlight).darker(180)); r.adjust(1, 1, -1, -1); painter->drawEllipse(r); painter->setBrush(border_color); r.adjust(1, 1, -1, -1); painter->drawEllipse(r); r.adjust(1, 1, -1, -1); } else { painter->setBrush(border_color); r.adjust(1, 1, -1, -1); painter->drawEllipse(r); r.adjust(1, 1, -1, -1); QConicalGradient border_gradient(r.center(), angle); if (!(option->state & QStyle::State_Enabled)) { border_color = border_color.lighter(120); } border_gradient.setColorAt(0.0, border_color.darker(180)); border_gradient.setColorAt(0.3, border_color.darker(130)); border_gradient.setColorAt(0.5, border_color.darker(170)); border_gradient.setColorAt(0.7, border_color.darker(130)); border_gradient.setColorAt(1.0, border_color.darker(180)); painter->setBrush(border_gradient); // painter->setBrush(Qt::blue); painter->drawEllipse(r); r.adjust(1, 1, -1, -1); } d -= 6; QColor dial_color; if (option->state & QStyle::State_Enabled) { dial_color = option->palette.color(QPalette::Button).lighter(101); if (option->state & QStyle::State_MouseOver) { dial_color = dial_color.lighter(103); } } else { dial_color = option->palette.color(QPalette::Window); } qreal t = option->state & QStyle::State_Enabled ? 2.0 : 1.5; if (1) { // ###: work around Qt 4.3.0 bug? (this works for 4.3.1) QConicalGradient border_gradient(r.center(), angle); border_gradient.setColorAt(0.0, dial_color.lighter(120)); border_gradient.setColorAt(0.2, dial_color); border_gradient.setColorAt(0.5, dial_color.darker(130)); border_gradient.setColorAt(0.8, dial_color); border_gradient.setColorAt(1.0, dial_color.lighter(120)); painter->setPen(QPen(border_gradient, t)); } else { painter->setPen(QPen(Qt::red, t)); } #if 0 QLinearGradient dial_gradient(r.topLeft(), r.bottomLeft()); dial_gradient.setColorAt(0.0, dial_color.darker(105)); dial_gradient.setColorAt(0.5, dial_color.lighter(102)); dial_gradient.setColorAt(1.0, dial_color.lighter(105)); #elif 1 QLinearGradient dial_gradient(option->direction == Qt::LeftToRight ? r.topLeft() : r.topRight(), option->direction == Qt::LeftToRight ? r.bottomRight() : r.bottomLeft()); // QLinearGradient dial_gradient(r.topLeft(), r.bottomLeft()); if (true || option->state & QStyle::State_Enabled) { #if 1 dial_gradient.setColorAt(0.0, dial_color.darker(106)); dial_gradient.setColorAt(1.0, dial_color.lighter(104)); #else dial_gradient.setColorAt(0.0, dial_color.lighter(101)); dial_gradient.setColorAt(0.5, dial_color.darker(103)); dial_gradient.setColorAt(1.0, dial_color.lighter(104)); #endif } else { dial_gradient.setColorAt(0.0, dial_color); dial_gradient.setColorAt(1.0, dial_color); } #elif 0 QConicalGradient dial_gradient(r.center(), angle); dial_gradient.setColorAt(0.0, dial_color.lighter(102)); dial_gradient.setColorAt(0.5, dial_color.darker(103)); dial_gradient.setColorAt(1.0, dial_color.lighter(102)); #else QBrush dial_gradient(dial_color); #endif painter->setBrush(dial_gradient); t = t / 2; painter->drawEllipse(r.adjusted(t, t, -t, -t)); // painter->setPen(Qt::NoPen); // painter->setBrush(dial_color); // painter->drawEllipse(r.adjusted(d / 4, d / 4, - d / 4, - d / 4)); #if 0 QLinearGradient border2_gradient(r.topLeft(), r.bottomRight()); border2_gradient.setColorAt(1.0, dial_color.darker(425)); border2_gradient.setColorAt(0.9, dial_color); border2_gradient.setColorAt(0.0, dial_color.darker(400)); painter->setPen(QPen(border2_gradient, 1.3)); painter->setBrush(Qt::NoBrush); painter->drawEllipse(r.adjusted(0.3, 0.3, -0.3, -0.3)); #endif // painter->restore(); #endif } void paintCachedDialBase(QPainter *painter, const QStyleOptionSlider *option) { bool useCache = UsePixmapCache; QString pixmapName; QRect r = option->rect; int d = qMin(r.width(), r.height()); if (/* option->state & (QStyle::State_HasFocus | QStyle::State_MouseOver) ||*/ d > 128) { useCache = false; } if (useCache) { uint state = uint(option->state) & (QStyle::State_Enabled | QStyle::State_On | QStyle::State_MouseOver | QStyle::State_KeyboardFocusChange | QStyle::State_HasFocus); if (!(state & QStyle::State_Enabled)) { state &= ~(QStyle::State_MouseOver | QStyle::State_HasFocus | QStyle::State_KeyboardFocusChange); } // state &= ~(QStyle::State_HasFocus); #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) pixmapName.sprintf("scp-qdb-%x-%x-%llx-%x", state, option->direction, option->palette.cacheKey(), d); #else pixmapName = QString::asprintf("scp-qdb-%x-%x-%llx-%x", state, option->direction, option->palette.cacheKey(), d); #endif } paintIndicatorCached(painter, option, paintDialBase, useCache, pixmapName); } void paintIndicatorDial(QPainter *painter, const QStyleOptionSlider *option) { int d = qMin(option->rect.width(), option->rect.height()); QRect rect(option->rect.center() - QPoint((d - 1) / 2, (d - 1) / 2), QSize(d, d)); QStyleOptionSlider opt; opt.QStyleOption::operator=(*option); opt.rect = rect; paintCachedDialBase(painter, &opt); } QColor shaded_color(const QColor &color, int shade) { #if 1 const qreal contrast = 1.0; int r, g, b; color.getRgb(&r, &g, &b); int gray = qGray(r, g, b); gray = qMax(r, qMax(g, b)); gray = (r + b + g + 3 * gray) / 6; if (shade < 0) { qreal k = 220.0 / 255.0 * shade; k *= contrast; int a = 255; if (gray > 0) { a = int(k * 255 / (0 - gray)); if (a < 0) a = 0; if (a > 255) a = 255; } return QColor(0, 0, 0, a); } else { qreal k = (255 - 220.0) / (255.0) * shade; k *= contrast; int a = 255; if (gray < 255) { a = int(k * 255 / (255 - gray)); if (a < 0) a = 0; if (a > 255) a = 255; } return QColor(255, 255, 255, a); } #else if (shade < 0) { return QColor(0, 0, 0, -shade); } else { return QColor(255, 255, 255, shade); } #endif } static void paintGrip(QPainter *painter, const QStyleOption *option) { // painter->fillRect(option->rect, Qt::red); int d = qMin(option->rect.width(), option->rect.height()); // good values are 3 (very small), 4 (small), 5 (good), 7 (large), 9 (huge) // int d = 5; QRectF rect(QRectF(option->rect).center() - QPointF(d / 2.0, d / 2.0), QSizeF(d, d)); const qreal angle = option->direction == Qt::LeftToRight ? 135.0 : 45.0; // const qreal angle = 90; QColor color; qreal opacity = 0.9; painter->save(); painter->setPen(Qt::NoPen); if (option->state & QStyle::State_Enabled) { if (option->state & QStyle::State_Sunken) { color = option->palette.color(QPalette::Highlight).darker(110); } else { color = option->palette.color(QPalette::Button); } } else { color = option->palette.color(QPalette::Button); opacity = 0.5; } QConicalGradient gradient1(rect.center(), angle); gradient1.setColorAt(0.0, shaded_color(color, -110)); gradient1.setColorAt(0.25, shaded_color(color, -30)); gradient1.setColorAt(0.5, shaded_color(color, 180)); gradient1.setColorAt(0.75, shaded_color(color, -30)); gradient1.setColorAt(1.0, shaded_color(color, -110)); painter->setBrush(color); painter->drawEllipse(rect); painter->setBrush(gradient1); #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)) // ### merge opacity into color painter->setOpacity(opacity); #endif painter->drawEllipse(rect); #if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0)) painter->setOpacity(1.0); if (d > 2) { QConicalGradient gradient2(rect.center(), angle); gradient2.setColorAt(0.0, shaded_color(color, -40)); gradient2.setColorAt(0.25, shaded_color(color, 0)); gradient2.setColorAt(0.5, shaded_color(color, 210)); gradient2.setColorAt(0.75, shaded_color(color, 0)); gradient2.setColorAt(1.0, shaded_color(color, -40)); rect.adjust(1, 1, -1, -1); painter->setBrush(color); painter->drawEllipse(rect); painter->setBrush(gradient2); painter->setOpacity(opacity); painter->drawEllipse(rect); painter->setOpacity(1.0); if (d > 8) { QConicalGradient gradient3(rect.center(), angle); gradient3.setColorAt(0.0, shaded_color(color, -10)); gradient3.setColorAt(0.25, shaded_color(color, 0)); gradient3.setColorAt(0.5, shaded_color(color, 180)); gradient3.setColorAt(0.75, shaded_color(color, 0)); gradient3.setColorAt(1.0, shaded_color(color, -10)); rect.adjust(2, 2, -2, -2); painter->setBrush(color); painter->drawEllipse(rect); painter->setBrush(gradient3); painter->setOpacity(opacity); painter->drawEllipse(rect); painter->setOpacity(1.0); } } #endif painter->restore(); } void paintCachedGrip(QPainter *painter, const QStyleOption *option, QPalette::ColorRole /*bgrole*/) { bool useCache = UsePixmapCache; QString pixmapName; if (/* option->state & (QStyle::State_HasFocus | QStyle::State_MouseOver) ||*/ option->rect.width() * option->rect.height() > 4096) { useCache = false; } if (useCache) { uint state = uint(option->state) & (QStyle::State_Enabled | QStyle::State_On | QStyle::State_MouseOver | QStyle::State_Sunken | QStyle::State_HasFocus); if (!(state & QStyle::State_Enabled)) { state &= ~(QStyle::State_MouseOver | QStyle::State_HasFocus); } state &= ~(QStyle::State_HasFocus); QByteArray colorName = option->palette.color(QPalette::Button).name().toLatin1(); #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) pixmapName.sprintf("scp-isg-%x-%x-%s-%x-%x", state, option->direction, colorName.constData(), option->rect.width(), option->rect.height()); #else pixmapName = QString::asprintf("scp-isg-%x-%x-%s-%x-%x", state, option->direction, colorName.constData(), option->rect.width(), option->rect.height()); #endif } paintIndicatorCached(painter, option, paintGrip, useCache, pixmapName); } void qsynthDialSkulptureStyle::drawComplexControl( ComplexControl cc, const QStyleOptionComplex *optc, QPainter *painter, const QWidget *widget) const { if (cc != QStyle::CC_Dial) { QCommonStyle::drawComplexControl(cc, optc, painter, widget); return; } const QStyleOptionSlider *option = qstyleoption_cast(optc); if (option == nullptr) return; int d = qMin(option->rect.width() & ~1, option->rect.height() & ~1); QStyleOptionSlider opt = *option; const QAbstractSlider *slider = nullptr; // always highlight knob if pressed (even if mouse is not over knob) if ((option->state & QStyle::State_HasFocus) && (slider = qobject_cast(widget))) { if (slider->isSliderDown()) { opt.state |= QStyle::State_MouseOver; } } // tickmarks opt.palette.setColor(QPalette::Inactive, QPalette::WindowText, QColor(120, 120, 120, 255)); opt.palette.setColor(QPalette::Active, QPalette::WindowText, QColor(120, 120, 120, 255)); opt.state &= ~QStyle::State_HasFocus; opt.rect.setWidth(opt.rect.width() & ~1); opt.rect.setHeight(opt.rect.height() & ~1); //((QCommonStyle *) this)-> QCommonStyle::drawComplexControl(QStyle::CC_Dial, &opt, painter, widget); // focus rectangle if (option->state & QStyle::State_HasFocus) { QStyleOptionFocusRect focus; opt.state |= QStyle::State_HasFocus; focus.QStyleOption::operator=(opt); focus.rect.adjust(-1, -1, 1, 1); drawPrimitive(QStyle::PE_FrameFocusRect, &focus, painter, widget); } opt.palette = option->palette; // dial base if (d <= 256) { paintIndicatorDial(painter, &opt); } else { // large dials are slow to render, do not render them } // dial knob d -= 6; int gripSize = (option->fontMetrics.height() / 4) * 2 - 1; opt.rect.setSize(QSize(gripSize, gripSize)); opt.rect.moveCenter(option->rect.center()); // angle calculation from qcommonstyle.cpp (c) Trolltech 1992-2007, ASA. qreal angle; int sliderPosition = option->upsideDown ? option->sliderPosition : (option->maximum - option->sliderPosition); int range = option->maximum - option->minimum; if (!range) { angle = M_PI / 2; } else if (option->dialWrapping) { angle = M_PI * 1.5 - (sliderPosition - option->minimum) * 2 * M_PI / range; } else { angle = (M_PI * 8 - (sliderPosition - option->minimum) * 10 * M_PI / range) / 6; } qreal rr = d / 2.0 - gripSize - 2; opt.rect.translate(int(0.5 + rr * cos(angle)), int(0.5 - rr * sin(angle))); paintCachedGrip(painter, &opt, option->state & QStyle::State_Enabled ? QPalette::Button : QPalette::Window); } qsynth-1.0.3/src/PaxHeaders/CMakeLists.txt0000644000000000000000000000013214771226115015454 xustar0030 mtime=1743072333.096076261 30 atime=1743072333.096076261 30 ctime=1743072333.096076261 qsynth-1.0.3/src/CMakeLists.txt0000644000175000001440000001475314771226115015456 0ustar00rncbcusers# project (qsynth) set (CMAKE_INCLUDE_CURRENT_DIR ON) set (CMAKE_AUTOUIC ON) set (CMAKE_AUTOMOC ON) set (CMAKE_AUTORCC ON) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.h) file (REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/config.h) endif () configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) set (HEADERS qsynth.h qsynthEngine.h qsynthChannels.h qsynthKnob.h qsynthMeter.h qsynthSetup.h qsynthOptions.h qsynthSystemTray.h qsynthTabBar.h qsynthAboutForm.h qsynthChannelsForm.h qsynthMainForm.h qsynthMessagesForm.h qsynthOptionsForm.h qsynthPaletteForm.h qsynthPresetForm.h qsynthSetupForm.h qsynthDialClassicStyle.h qsynthDialPeppinoStyle.h qsynthDialVokiStyle.h qsynthDialSkulptureStyle.h ) set (SOURCES qsynth.cpp qsynthEngine.cpp qsynthChannels.cpp qsynthKnob.cpp qsynthMeter.cpp qsynthSetup.cpp qsynthOptions.cpp qsynthSystemTray.cpp qsynthTabBar.cpp qsynthAboutForm.cpp qsynthChannelsForm.cpp qsynthMainForm.cpp qsynthMessagesForm.cpp qsynthOptionsForm.cpp qsynthPaletteForm.cpp qsynthPresetForm.cpp qsynthSetupForm.cpp qsynthDialClassicStyle.cpp qsynthDialPeppinoStyle.cpp qsynthDialVokiStyle.cpp qsynthDialSkulptureStyle.cpp ) set (FORMS qsynthAboutForm.ui qsynthChannelsForm.ui qsynthMainForm.ui qsynthMessagesForm.ui qsynthOptionsForm.ui qsynthPaletteForm.ui qsynthPresetForm.ui qsynthSetupForm.ui ) set (RESOURCES qsynth.qrc ) set ( TRANSLATIONS translations/qsynth_cs.ts translations/qsynth_de.ts translations/qsynth_es.ts translations/qsynth_fr.ts translations/qsynth_ru.ts translations/qsynth_sr.ts ) add_custom_target (update_translations COMMAND Qt${QT_VERSION_MAJOR}::lupdate -recursive ${CMAKE_CURRENT_SOURCE_DIR} -ts ${TRANSLATIONS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Updating translations..." ) if (QT_VERSION VERSION_LESS 5.15.0) qt5_add_translation (QM_FILES ${TRANSLATIONS}) else() qt_add_translation (QM_FILES ${TRANSLATIONS}) endif() add_custom_target (translations ALL DEPENDS ${QM_FILES}) if (WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win32/setup.nsi.in ${CMAKE_CURRENT_BINARY_DIR}/setup.nsi IMMEDIATE @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win32/${PROJECT_NAME}.rc.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.rc IMMEDIATE @ONLY) set (RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.rc) set (RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.res.obj) if (MINGW) get_filename_component (compiler_location "${CMAKE_CXX_COMPILER}" DIRECTORY) find_program (WINDRES_EXECUTABLE NAMES windres mingw32-windres i686-mingw32-windres PATHS ${compiler_location} NO_DEFAULT_PATH) execute_process (COMMAND ${WINDRES_EXECUTABLE} -i ${RC_FILE} -o ${RES_FILE} --include-dir=${CMAKE_CURRENT_SOURCE_DIR}/images/ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) list (APPEND SOURCES ${RES_FILE}) else () list (APPEND SOURCES ${RC_FILE}) endif () endif () if (APPLE) set (ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/images/${PROJECT_NAME}.icns) list (APPEND SOURCES ${ICON_FILE} ${QM_FILES}) set (MACOSX_BUNDLE_ICON_FILE ${PROJECT_NAME}.icns) set_source_files_properties (${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties (${QM_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION translations) include(TranslationUtils) add_qt_translations(QT_TRANSLATIONS cs de es fr ru sr) set_source_files_properties (${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations) list (APPEND SOURCES ${QT_TRANSLATIONS}) endif () add_executable (${PROJECT_NAME} ${HEADERS} ${SOURCES} ${FORMS} ${RESOURCES} ) # Add some debugger flags. if (CONFIG_DEBUG AND UNIX AND NOT APPLE) set (CONFIG_DEBUG_OPTIONS -g -fsanitize=address -fno-omit-frame-pointer) target_compile_options (${PROJECT_NAME} PRIVATE ${CONFIG_DEBUG_OPTIONS}) target_link_options (${PROJECT_NAME} PRIVATE ${CONFIG_DEBUG_OPTIONS}) endif () set_target_properties (${PROJECT_NAME} PROPERTIES CXX_STANDARD 17) if (WIN32) set_target_properties (${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE true) endif () if (APPLE) set_target_properties (${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE true MACOSX_BUNDLE_GUI_IDENTIFIER "org.rncbc.${PROJECT_NAME}" MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}" MACOSX_BUNDLE_DISPLAY_NAME "${PROJECT_NAME}" MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}" MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}" MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}" MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}" MACOSX_BUNDLE_COPYRIGHT "Copyright © 2003-2024, Rui Nuno Capela. All rights reserved.") endif () target_link_libraries (${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg) if (CONFIG_XUNIQUE) target_link_libraries (${PROJECT_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Network) endif () if (CONFIG_FLUIDSYNTH) target_link_libraries (${PROJECT_NAME} PRIVATE PkgConfig::FLUIDSYNTH) endif () if (CONFIG_ROUND) target_link_libraries (${PROJECT_NAME} PRIVATE ${MATH_LIBRARY}) endif () if (CONFIG_PIPEWIRE) target_link_libraries (${PROJECT_NAME} PRIVATE PkgConfig::PIPEWIRE) endif () if (UNIX AND NOT APPLE) install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations) install (FILES images/${PROJECT_NAME}.png RENAME org.rncbc.${PROJECT_NAME}.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps) install (FILES images/${PROJECT_NAME}.svg RENAME org.rncbc.${PROJECT_NAME}.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) install (FILES appdata/org.rncbc.${PROJECT_NAME}.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install (FILES appdata/org.rncbc.${PROJECT_NAME}.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) install (FILES man1/${PROJECT_NAME}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) install (FILES man1/${PROJECT_NAME}.fr.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/fr/man1 RENAME ${PROJECT_NAME}.1) install (FILES palette/KXStudio.conf palette/Wonton\ Soup.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/palette) endif () if (WIN32) install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) install (FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations) endif () include(DeploymentUtils) qsynth-1.0.3/src/PaxHeaders/qsynthAbout.h0000644000000000000000000000013214771226115015406 xustar0030 mtime=1743072333.104076219 30 atime=1743072333.104076219 30 ctime=1743072333.104076219 qsynth-1.0.3/src/qsynthAbout.h0000644000175000001440000000245314771226115015402 0ustar00rncbcusers// qsynthAbout.h // /**************************************************************************** Copyright (C) 2003-2025, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef __qsynthAbout_h #define __qsynthAbout_h #include "config.h" #define QSYNTH_TITLE PROJECT_TITLE #define QSYNTH_SUBTITLE PROJECT_DESCRIPTION #define QSYNTH_WEBSITE PROJECT_HOMEPAGE_URL #define QSYNTH_COPYRIGHT PROJECT_COPYRIGHT #define QSYNTH_DOMAIN PROJECT_DOMAIN #endif // __qsynthAbout_h // end of qsynthAbout.h qsynth-1.0.3/src/PaxHeaders/palette0000644000000000000000000000013214771226115014275 xustar0030 mtime=1743072333.103984486 30 atime=1743072333.103650084 30 ctime=1743072333.103984486 qsynth-1.0.3/src/palette/0000755000175000001440000000000014771226115014342 5ustar00rncbcusersqsynth-1.0.3/src/palette/PaxHeaders/KXStudio.conf0000644000000000000000000000013214771226115016733 xustar0030 mtime=1743072333.103650084 30 atime=1743072333.103650084 30 ctime=1743072333.103650084 qsynth-1.0.3/src/palette/KXStudio.conf0000644000175000001440000000165514771226115016732 0ustar00rncbcusers[ColorThemes] KXStudio\AlternateBase=#0e0e0e, #0e0e0e, #0c0c0c KXStudio\Base=#070707, #070707, #060606 KXStudio\BrightText=#ffffff, #ffffff, #ffffff KXStudio\Button=#1c1c1c, #1c1c1c, #181818 KXStudio\ButtonText=#f0f0f0, #f0f0f0, #5a5a5a KXStudio\Dark=#818181, #818181, #818181 KXStudio\Highlight=#3c3c3c, #222222, #0e0e0e KXStudio\HighlightedText=#ffffff, #f0f0f0, #535353 KXStudio\Light=#bfbfbf, #bfbfbf, #bfbfbf KXStudio\Link=#6464e6, #6464e6, #22224a KXStudio\LinkVisited=#e664e6, #e664e6, #4a224a KXStudio\Mid=#5e5e5e, #5e5e5e, #5e5e5e KXStudio\Midlight=#9b9b9b, #9b9b9b, #9b9b9b KXStudio\NoRole=#000000, #000000, #000000 KXStudio\PlaceholderText=#000000, #000000, #000000 KXStudio\Shadow=#9b9b9b, #9b9b9b, #9b9b9b KXStudio\Text=#e6e6e6, #e6e6e6, #4a4a4a KXStudio\ToolTipBase=#040404, #040404, #040404 KXStudio\ToolTipText=#e6e6e6, #e6e6e6, #e6e6e6 KXStudio\Window=#111111, #111111, #0e0e0e KXStudio\WindowText=#f0f0f0, #f0f0f0, #535353 qsynth-1.0.3/src/palette/PaxHeaders/Wonton Soup.conf0000644000000000000000000000013214771226115017414 xustar0030 mtime=1743072333.103984486 30 atime=1743072333.103650084 30 ctime=1743072333.103984486 qsynth-1.0.3/src/palette/Wonton Soup.conf0000644000175000001440000000202614771226115017404 0ustar00rncbcusers[ColorThemes] Wonton%20Soup\AlternateBase=#434750, #434750, #3b3e46 Wonton%20Soup\Base=#3c4048, #3c4048, #34383f Wonton%20Soup\BrightText=#ffffff, #ffffff, #ffffff Wonton%20Soup\Button=#525863, #525863, #484d57 Wonton%20Soup\ButtonText=#d2def0, #d2def0, #6f7682 Wonton%20Soup\Dark=#282b31, #282b31, #23262b Wonton%20Soup\Highlight=#78889c, #515a67, #40444d Wonton%20Soup\HighlightedText=#d1e1f4, #b6c1d0, #616872 Wonton%20Soup\Light=#5f6572, #5f6572, #565c68 Wonton%20Soup\Link=#9cd4ff, #9cd4ff, #526677 Wonton%20Soup\LinkVisited=#4080ff, #4080ff, #364c77 Wonton%20Soup\Mid=#3f444c, #3f444c, #383b43 Wonton%20Soup\Midlight=#545a65, #545a65, #4b515b Wonton%20Soup\NoRole=#000000, #000000, #000000 Wonton%20Soup\PlaceholderText=#000000, #000000, #000000 Wonton%20Soup\Shadow=#1d1f23, #1d1f23, #191b1e Wonton%20Soup\Text=#d2def0, #d2def0, #636973 Wonton%20Soup\ToolTipBase=#b6c1d0, #b6c1d0, #b6c1d0 Wonton%20Soup\ToolTipText=#2a2c30, #2a2c30, #2a2c30 Wonton%20Soup\Window=#494e58, #494e58, #40444d Wonton%20Soup\WindowText=#b6c1d0, #b6c1d0, #616872