zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit a5bd08fe147f95e1ee8c92f60a89433f11be5fd2
parent c05bff25f45f11e410662113a5ae17739ee72945
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sat, 20 Apr 2013 21:23:32 -0400

Merge remote-tracking branch 'origin/master' into multi-jack

Conflicts:
	src/Nio/EngineMgr.cpp

Diffstat:
M.gitmodules | 2+-
MAUTHORS.txt | 4++++
MCMakeLists.txt | 8+++++++-
MChangeLog | 15+++++++++++++++
MExternalPrograms/Controller/Controller.C | 11+++++------
MExternalPrograms/Controller/main.C | 1-
MExternalPrograms/Spliter/Spliter.C | 15+++++++--------
MExternalPrograms/Spliter/main.C | 1-
MHISTORY.txt | 9++++++++-
Acmake/FindCxxTest.cmake | 200+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dcmake/FindMXML.cmake | 17-----------------
Dcmake/FindMYFLTK.cmake | 49-------------------------------------------------
Dcmake/FindPortAudio.cmake | 19-------------------
Dcmake/Findfftw.cmake | 17-----------------
Dcmake/LibFindMacros.cmake | 93-------------------------------------------------------------------------------
Adoc/IT/01-intro_IT.txt | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/02-filter_IT.txt | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/03-lfo_IT.txt | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/04-envelope_IT.txt | 134+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/05-adsynth_IT.txt | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/06-controller_IT.txt | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/08-saving_IT.txt | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/APPENDIX_A-mididefaults_IT.txt | 22++++++++++++++++++++++
Adoc/IT/APPENDIX_B-build_IT.txt | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/APPENDIX_C-doc_getting_IT.txt | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adoc/IT/zynaddsubfx_IT.txt | 28++++++++++++++++++++++++++++
Mdoc/Makefile | 17+++++++----------
Mdoc/adsynth.txt | 55+++++++++++++++++++++++++++++++++++++++++++------------
Adoc/effects.txt | 152+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdoc/filter.txt | 63+++++++++++++++++++++++++++++++++++++++++++++------------------
Mdoc/gen/Makefile | 10+++++-----
Mdoc/gen/ad-note.tex | 82++++++++++++++++++++++++++++++++++---------------------------------------------
Mdoc/gen/chorus.tex | 1+
Mdoc/gen/distort.tex | 1+
Mdoc/gen/dynamic.tex | 1+
Mdoc/gen/echo.tex | 1+
Adoc/gen/fig.sty | 14++++++++++++++
Mdoc/gen/reverb.tex | 74+++++++++++++++++++++++++++++++++++++++++++-------------------------------
Adoc/gen/velf.tex | 16++++++++++++++++
Mdoc/getting.txt | 4++--
Adoc/images/uifilter.png | 0
Adoc/images/uimain.png | 0
Adoc/images/uioscil.png | 0
Mdoc/intro.txt | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
Ddoc/myconf.conf | 2--
Adoc/zynaddsubfx.1.txt | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdoc/zynaddsubfx.txt | 24+++++++++++++-----------
Apixmaps/black_key.png | 0
Apixmaps/black_key_pressed.png | 0
Apixmaps/knob.png | 0
Apixmaps/module_backdrop.png | 0
Apixmaps/white_key.png | 0
Apixmaps/white_key_pressed.png | 0
Apixmaps/window_backdrop.png | 0
Msrc/CMakeLists.txt | 174++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
Msrc/DSP/AnalogFilter.cpp | 10+++++-----
Msrc/DSP/CMakeLists.txt | 19+++++++------------
Msrc/DSP/FormantFilter.cpp | 11++++++-----
Msrc/DSP/FormantFilter.h | 2+-
Msrc/DSP/Unison.cpp | 62+++++++++++++++++++++++++++++++++++---------------------------
Msrc/DSP/Unison.h | 10+++++-----
Msrc/Effects/Alienwah.cpp | 10+++++-----
Msrc/Effects/CMakeLists.txt | 29++++++++++++-----------------
Msrc/Effects/Chorus.cpp | 34+++++++++++++++++++---------------
Msrc/Effects/Chorus.h | 4++--
Msrc/Effects/Distorsion.cpp | 22+++++++++++-----------
Msrc/Effects/Distorsion.h | 2+-
Msrc/Effects/DynamicFilter.h | 2+-
Msrc/Effects/EQ.cpp | 2+-
Msrc/Effects/EQ.h | 4++--
Msrc/Effects/Echo.cpp | 6+++---
Msrc/Effects/Effect.cpp | 10+++++-----
Msrc/Effects/Effect.h | 4++--
Msrc/Effects/EffectLFO.cpp | 26+++++++++++++-------------
Msrc/Effects/EffectMgr.cpp | 5++---
Msrc/Effects/EffectMgr.h | 4++--
Msrc/Effects/Reverb.cpp | 14++++++++------
Msrc/Effects/Reverb.h | 23+++++++++++------------
Dsrc/Misc/Atomic.cpp | 70----------------------------------------------------------------------
Dsrc/Misc/Atomic.h | 45---------------------------------------------
Msrc/Misc/Bank.cpp | 12+++++++-----
Msrc/Misc/Bank.h | 4++--
Msrc/Misc/CMakeLists.txt | 39+++++++++++++++++++++------------------
Msrc/Misc/Dump.cpp | 8+++++---
Msrc/Misc/Master.cpp | 71++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
Msrc/Misc/Master.h | 18+++++++++++++-----
Msrc/Misc/Microtonal.cpp | 16+++++++++++-----
Msrc/Misc/Part.cpp | 63++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
Msrc/Misc/Part.h | 8++++++--
Msrc/Misc/Recorder.cpp | 15+++++++--------
Msrc/Misc/Util.cpp | 10+++++-----
Msrc/Misc/Util.h | 4++--
Msrc/Misc/XMLwrapper.cpp | 8++++----
Msrc/Nio/AlsaEngine.cpp | 8++++++++
Msrc/Nio/CMakeLists.txt | 13++-----------
Msrc/Nio/EngineMgr.cpp | 24+++++-------------------
Msrc/Nio/InMgr.cpp | 57++++++++++++++++++++++++++++++---------------------------
Msrc/Nio/InMgr.h | 4+++-
Msrc/Nio/JackEngine.cpp | 37+++++++++++++++++++++++++++++--------
Msrc/Nio/MidiIn.cpp | 7+++++++
Msrc/Nio/Nio.cpp | 50++++++++++++++++++++++++++++++++++++++++++++++----
Msrc/Nio/Nio.h | 13+++++++++++++
Msrc/Nio/NulEngine.cpp | 4+++-
Msrc/Nio/NulEngine.h | 2+-
Msrc/Nio/OssEngine.cpp | 6+++---
Msrc/Nio/OutMgr.cpp | 22+++++++++++++++-------
Msrc/Nio/OutMgr.h | 2+-
Msrc/Nio/PaEngine.cpp | 2+-
Msrc/Nio/WavEngine.h | 2+-
Msrc/Output/DSSIaudiooutput.cpp | 19++++++++++++++++---
Msrc/Params/CMakeLists.txt | 28+++++++++++-----------------
Msrc/Params/LFOParams.cpp | 2+-
Msrc/Params/PADnoteParameters.cpp | 5+++--
Msrc/Params/PresetsStore.h | 4++++
Msrc/Synth/ADnote.cpp | 29++++++++++++++++-------------
Msrc/Synth/ADnote.h | 6+++---
Msrc/Synth/CMakeLists.txt | 24+++++++++---------------
Msrc/Synth/Envelope.cpp | 2+-
Msrc/Synth/OscilGen.cpp | 70+++++++++++++++++++++++++++++++++++++++-------------------------------
Msrc/Synth/PADnote.cpp | 5+++--
Msrc/Synth/PADnote.h | 2+-
Msrc/Synth/SUBnote.cpp | 2+-
Msrc/Synth/SynthNote.cpp | 7+++++++
Msrc/Synth/SynthNote.h | 10++++++++++
Msrc/Tests/AdNoteTest.h | 27++++++++++++++++++++++++++-
Msrc/Tests/CMakeLists.txt | 11++++++++++-
Msrc/Tests/ControllerTest.h | 4++--
Msrc/Tests/EchoTest.h | 7++++---
Msrc/Tests/MicrotonalTest.h | 14++------------
Msrc/Tests/OscilGenTest.h | 23++++++++++++++++++++++-
Asrc/Tests/PadNoteTest.h | 207+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/Tests/PluginTest.h | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/Tests/SubNoteTest.h | 22++++++++++++++++++++++
Msrc/Tests/guitar-adnote.xmz | 2045+++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/UI/ADnoteUI.fl | 261++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/UI/BankUI.fl | 50++++++++++++++++++++++++++------------------------
Msrc/UI/CMakeLists.txt | 15++++++++++++++-
Msrc/UI/EffUI.fl | 559+++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/UI/EnvelopeUI.fl | 101++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Msrc/UI/FilterUI.fl | 49+++++++++++++++++++++++++++++++------------------
Msrc/UI/LFOUI.fl | 37+++++++++++++++++++++----------------
Msrc/UI/MasterUI.fl | 367++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
Msrc/UI/MicrotonalUI.fl | 2+-
Asrc/UI/NSM.C | 163+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/UI/NSM.H | 45+++++++++++++++++++++++++++++++++++++++++++++
Asrc/UI/NSM/Client.C | 403+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/UI/NSM/Client.H | 143+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/UI/NioUI.cpp | 4++--
Msrc/UI/NioUI.h | 2+-
Msrc/UI/OscilGenUI.fl | 103++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Msrc/UI/PADnoteUI.fl | 99+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Msrc/UI/PartUI.fl | 93+++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/UI/PresetsUI.fl | 4++--
Msrc/UI/ResonanceUI.fl | 26++++++++++++++++----------
Msrc/UI/SUBnoteUI.fl | 61+++++++++++++++++++++++++++++++------------------------------
Msrc/UI/VirKeyboard.fl | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
Msrc/UI/WidgetPDial.cpp | 26++++++++++++++++++++++----
Asrc/UI/common.H | 29+++++++++++++++++++++++++++++
Msrc/globals.h | 21++++++++++-----------
Msrc/main.cpp | 261++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
Dsrc/zynaddsubfx_icon.svg | 286-------------------------------------------------------------------------------
Mstyle.sh | 3+++
Azynaddsubfx-alsa.desktop | 8++++++++
Azynaddsubfx-jack.desktop | 8++++++++
Rzynaddsubfx_icon.ico -> zynaddsubfx.ico | 0
Azynaddsubfx.svg | 313+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
166 files changed, 6026 insertions(+), 3237 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -1,3 +1,3 @@ [submodule "instruments"] path = instruments - url = git://zynaddsubfx.git.sourceforge.net/gitroot/zynaddsubfx/instruments + url = git://git.code.sf.net/p/zynaddsubfx/instruments diff --git a/AUTHORS.txt b/AUTHORS.txt @@ -21,4 +21,8 @@ Contributors: Hans Petter Selasky (OSS Midi, FreeBSD support, Bank UI bug fix) Damien Goutte-Gattat (Bank select midi support) Lieven Moors (Spike/Circle waveform) + Olaf Schulz (MIDI Aftertouch support) + Jonathan Liles (NSM & NTK support) + Johannes Lorenz (Effect Documentation) + Ilario Glasgo (Italian Doc Translation) diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/") project(zynaddsubfx) -set(VERSION "2.4.2") +set(VERSION "2.4.3") enable_testing() include(CTestConfig.cmake) @@ -11,3 +11,9 @@ add_subdirectory(src) install(FILES AUTHORS.txt COPYING FAQ.txt HISTORY.txt README.txt DESTINATION share/doc/zynaddsubfx ) +install(FILES zynaddsubfx-jack.desktop zynaddsubfx-alsa.desktop + DESTINATION share/applications) +install(FILES zynaddsubfx.svg + DESTINATION share/pixmaps) +install(DIRECTORY instruments/banks + DESTINATION share/zynaddsubfx) diff --git a/ChangeLog b/ChangeLog @@ -1019,3 +1019,18 @@ 22 Feb 2012 (Liven Moors) - Added circle waveform to oscilator options + +26 Mar 2012 (Mark McCurry) + - Fixed Segfault in Oscillgen + +27 Mar 2012 (Mark McCurry) + - Fixed chorus noise bug + +14 Apr 2012 (Mark McCurry) + - Removed Nio debugging code + +18 Apr 2012 (Jonathan Liles) + - Added Non-session-manager support + +31 Mar 2012 (Olaf Schulz) + - Added Midi aftertouch support diff --git a/ExternalPrograms/Controller/Controller.C b/ExternalPrograms/Controller/Controller.C @@ -55,8 +55,8 @@ void Controller::sendcontroller(int par, unsigned char val) { void Controller::sendnrpn(int npar, unsigned char val) { // fprintf(stderr,"NRPN: %d %d %d %d\n",pars[npar].nrpn.cpar,pars[npar].nrpn.fpar,pars[npar].nrpn.cval,val); - sendcontroller(0x99, pars[npar].nrpn.cpar); - sendcontroller(0x98, pars[npar].nrpn.fpar); + sendcontroller(0x63, pars[npar].nrpn.cpar); + sendcontroller(0x62, pars[npar].nrpn.fpar); sendcontroller(0x06, pars[npar].nrpn.cval); sendcontroller(0x26, val); // fprintf(stderr,"------------\n\n"); @@ -77,9 +77,8 @@ void Controller::send(int npar, float xval) { * (pars[npar].val2 - pars[npar].val1 - 1.0) * 0.9999 + pars[npar].val1 + 1.0); switch(pars[npar].mode) { - case 1: sendcontroller(pars[npar].ctl.par, val); break; - //case 2:break; - case 3: sendnrpn(npar, val); break; + case 1: sendcontroller(pars[npar].ctl.par, val); break; + //case 2:break; + case 3: sendnrpn(npar, val); break; } } - diff --git a/ExternalPrograms/Controller/main.C b/ExternalPrograms/Controller/main.C @@ -14,4 +14,3 @@ main() delete controllerUI; }; - diff --git a/ExternalPrograms/Spliter/Spliter.C b/ExternalPrograms/Spliter/Spliter.C @@ -10,11 +10,11 @@ int Pexitprogram; Spliter::Spliter() { //init Psplitpoint = 60; - Pchin = 0; - Pchout1 = 0; - Pchout2 = 1; - Poct1 = 0; - Poct2 = 0; + Pchin = 0; + Pchout1 = 0; + Pchout2 = 1; + Poct1 = 0; + Poct2 = 0; //ALSA init snd_seq_open(&midi_in, "default", SND_SEQ_OPEN_INPUT, 0); snd_seq_open(&midi_out, "default", SND_SEQ_OPEN_OUTPUT, 0); @@ -58,7 +58,7 @@ void Spliter::midievents() { midievent->data.note.channel = Pchout1; int tmp = midievent->data.note.note; tmp += Poct1 * 12; if(tmp > 127) - tmp = 127;if(tmp < 0) + tmp = 127; if(tmp < 0) tmp = 0; midievent->data.note.note = tmp; } @@ -66,7 +66,7 @@ void Spliter::midievents() { midievent->data.note.channel = Pchout2; int tmp = midievent->data.note.note; tmp += Poct2 * 12; if(tmp > 127) - tmp = 127;if(tmp < 0) + tmp = 127; if(tmp < 0) tmp = 0; midievent->data.note.note = tmp; } @@ -80,4 +80,3 @@ void Spliter::midievents() { } snd_seq_free_event(midievent); } - diff --git a/ExternalPrograms/Spliter/main.C b/ExternalPrograms/Spliter/main.C @@ -35,4 +35,3 @@ main() pthread_mutex_destroy(&mutex); delete spliterUI; }; - diff --git a/HISTORY.txt b/HISTORY.txt @@ -1,4 +1,11 @@ -2.4.2 (26 Feb 2011) +2.4.3 (15 Jun 2012) + - Non-session manager support + - Midi aftertouch support + - Documentation additions + - Somewhat more sane Nio defaults + - Misc bug fixes + +2.4.2 (26 Feb 2012) - New IO backend support - MIDI bank select - Spike/Circle waveform diff --git a/cmake/FindCxxTest.cmake b/cmake/FindCxxTest.cmake @@ -0,0 +1,200 @@ +# - Find CxxTest +# Find the CxxTest suite and declare a helper macro for creating unit tests +# and integrating them with CTest. +# For more details on CxxTest see http://cxxtest.tigris.org +# +# INPUT Variables +# +# CXXTEST_USE_PYTHON [deprecated since 1.3] +# Only used in the case both Python & Perl +# are detected on the system to control +# which CxxTest code generator is used. +# Valid only for CxxTest version 3. +# +# NOTE: In older versions of this Find Module, +# this variable controlled if the Python test +# generator was used instead of the Perl one, +# regardless of which scripting language the +# user had installed. +# +# CXXTEST_TESTGEN_ARGS (since CMake 2.8.3) +# Specify a list of options to pass to the CxxTest code +# generator. If not defined, --error-printer is +# passed. +# +# OUTPUT Variables +# +# CXXTEST_FOUND +# True if the CxxTest framework was found +# CXXTEST_INCLUDE_DIRS +# Where to find the CxxTest include directory +# CXXTEST_PERL_TESTGEN_EXECUTABLE +# The perl-based test generator +# CXXTEST_PYTHON_TESTGEN_EXECUTABLE +# The python-based test generator +# CXXTEST_TESTGEN_EXECUTABLE (since CMake 2.8.3) +# The test generator that is actually used (chosen using user preferences +# and interpreters found in the system) +# CXXTEST_TESTGEN_INTERPRETER (since CMake 2.8.3) +# The full path to the Perl or Python executable on the system +# +# MACROS for optional use by CMake users: +# +# CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>) +# Creates a CxxTest runner and adds it to the CTest testing suite +# Parameters: +# test_name The name of the test +# gen_source_file The generated source filename to be +# generated by CxxTest +# input_files_to_testgen The list of header files containing the +# CxxTest::TestSuite's to be included in +# this runner +# +# #============== +# Example Usage: +# +# find_package(CxxTest) +# if(CXXTEST_FOUND) +# include_directories(${CXXTEST_INCLUDE_DIR}) +# enable_testing() +# +# CXXTEST_ADD_TEST(unittest_foo foo_test.cc +# ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h) +# target_link_libraries(unittest_foo foo) # as needed +# endif() +# +# This will (if CxxTest is found): +# 1. Invoke the testgen executable to autogenerate foo_test.cc in the +# binary tree from "foo_test.h" in the current source directory. +# 2. Create an executable and test called unittest_foo. +# +# #============= +# Example foo_test.h: +# +# #include <cxxtest/TestSuite.h> +# +# class MyTestSuite : public CxxTest::TestSuite +# { +# public: +# void testAddition( void ) +# { +# TS_ASSERT( 1 + 1 > 1 ); +# TS_ASSERT_EQUALS( 1 + 1, 2 ); +# } +# }; +# + +#============================================================================= +# Copyright 2008-2010 Kitware, Inc. +# Copyright 2008-2010 Philip Lowman <philip@yhbt.com> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Version 1.4 (11/18/10) (CMake 2.8.4) +# Issue 11384: Added support to the CXX_ADD_TEST macro so header +# files (containing the tests themselves) show up in +# Visual Studio and other IDEs. +# +# Version 1.3 (8/19/10) (CMake 2.8.3) +# Included patch by Simone Rossetto to check if either Python or Perl +# are present in the system. Whichever intepreter that is detected +# is now used to run the test generator program. If both interpreters +# are detected, the CXXTEST_USE_PYTHON variable is obeyed. +# +# Also added support for CXXTEST_TESTGEN_ARGS, for manually specifying +# options to the CxxTest code generator. +# Version 1.2 (3/2/08) +# Included patch from Tyler Roscoe to have the perl & python binaries +# detected based on CXXTEST_INCLUDE_DIR +# Version 1.1 (2/9/08) +# Clarified example to illustrate need to call target_link_libraries() +# Changed commands to lowercase +# Added licensing info +# Version 1.0 (1/8/08) +# Fixed CXXTEST_INCLUDE_DIRS so it will work properly +# Eliminated superfluous CXXTEST_FOUND assignment +# Cleaned up and added more documentation + +#============================================================= +# CXXTEST_ADD_TEST (public macro) +#============================================================= +macro(CXXTEST_ADD_TEST _cxxtest_testname _cxxtest_outfname) + set(_cxxtest_real_outfname ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_outfname}) + + add_custom_command( + OUTPUT ${_cxxtest_real_outfname} + DEPENDS ${ARGN} + COMMAND ${CXXTEST_TESTGEN_INTERPRETER} + ${CXXTEST_TESTGEN_EXECUTABLE} ${CXXTEST_TESTGEN_ARGS} -o ${_cxxtest_real_outfname} ${ARGN} + ) + + set_source_files_properties(${_cxxtest_real_outfname} PROPERTIES GENERATED true) + add_executable(${_cxxtest_testname} ${_cxxtest_real_outfname} ${ARGN}) + + if(CMAKE_RUNTIME_OUTPUT_DIRECTORY) + add_test(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname}) + elseif(EXECUTABLE_OUTPUT_PATH) + add_test(${_cxxtest_testname} ${EXECUTABLE_OUTPUT_PATH}/${_cxxtest_testname}) + else() + add_test(${_cxxtest_testname} ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_testname}) + endif() + +endmacro(CXXTEST_ADD_TEST) + +#============================================================= +# main() +#============================================================= +if(NOT DEFINED CXXTEST_TESTGEN_ARGS) + set(CXXTEST_TESTGEN_ARGS --error-printer) +endif() + +find_package(PythonInterp QUIET) +find_package(Perl QUIET) + +find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h) +find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE + NAMES cxxtestgen cxxtestgen.py + PATHS ${CXXTEST_INCLUDE_DIR}) +find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl + PATHS ${CXXTEST_INCLUDE_DIR}) + +if(PYTHONINTERP_FOUND OR PERL_FOUND) + include(FindPackageHandleStandardArgs) + + if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND OR NOT DEFINED CXXTEST_USE_PYTHON)) + set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE}) + set(CXXTEST_TESTGEN_INTERPRETER ${PYTHON_EXECUTABLE}) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG + CXXTEST_INCLUDE_DIR CXXTEST_PYTHON_TESTGEN_EXECUTABLE) + + elseif(PERL_FOUND) + set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PERL_TESTGEN_EXECUTABLE}) + set(CXXTEST_TESTGEN_INTERPRETER ${PERL_EXECUTABLE}) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG + CXXTEST_INCLUDE_DIR CXXTEST_PERL_TESTGEN_EXECUTABLE) + endif() + + if(CXXTEST_FOUND) + set(CXXTEST_INCLUDE_DIRS ${CXXTEST_INCLUDE_DIR}) + endif() + +else() + + set(CXXTEST_FOUND false) + if(NOT CxxTest_FIND_QUIETLY) + if(CxxTest_FIND_REQUIRED) + message(FATAL_ERROR "Neither Python nor Perl found, cannot use CxxTest, aborting!") + else() + message(STATUS "Neither Python nor Perl found, CxxTest will not be used.") + endif() + endif() + +endif() diff --git a/cmake/FindMXML.cmake b/cmake/FindMXML.cmake @@ -1,17 +0,0 @@ -#Find mxml (mini xml library) - -include(LibFindMacros) -libfind_pkg_check_modules(MXML mxml) -find_path(MXML_INCLUDE_DIR - NAMES mxml.h - PATHS ${MXML_INCLUDE_DIRS} - ) - -find_library(MXML_LIBRARY - NAMES mxml - PATHS ${MXML_LIBRARY_DIRS} - ) - -set(MXML_PROCESS_INCLUDES MXML_INCLUDE_DIR) -set(MXML_PROCESS_LIBS MXML_LIBRARY) -libfind_process(MXML) diff --git a/cmake/FindMYFLTK.cmake b/cmake/FindMYFLTK.cmake @@ -1,49 +0,0 @@ -# The CMake supplied FindFLTK delivers FLTK_LIBRARIES as a full list of -# static and shared libs, with full paths. We really want just a list of -# the lib names. This slight perversion defines -# MYFLTK_FOUND true or false -# MYFLTK_CONFIG fltk-config executable -# FLTK_FLUID_EXECUTABLE fluid executable -# MYFLTK_LDFLAGS a list of libs required for linking -# - -if (MYFLTK_LDFLAGS) - # in cache already - set(MYFLTK_FOUND TRUE) -else (MYFLTK_LDFLAGS) - find_program (MYFLTK_CONFIG fltk-config) - if (MYFLTK_CONFIG) - execute_process (COMMAND ${MYFLTK_CONFIG} --ldflags OUTPUT_VARIABLE MYFLTK_LDFLAGS) - message("MYFLTK_LDFLAGS: ${MYFLTK_LDFLAGS}") - string(STRIP ${MYFLTK_LDFLAGS} MYFLTK_LIBS) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - string(REPLACE "-l" "" MYFLTK_LIBS ${MYFLTK_LIBS}) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - string(REPLACE " " "; " MYFLTK_LIBS ${MYFLTK_LIBS}) - message("MYFLTK_LINK_LIBS: ${MYFLTK_LINK_LIBS}") - #list(APPEND MYFLTK_LIBS ${MYFLTK_LINK_LIBS}) - message("MYFLTK_LIBS: ${MYFLTK_LIBS}") - find_program (FLTK_FLUID_EXECUTABLE fluid) - if (FLTK_FLUID_EXECUTABLE) -# mark_as_advanced(MYFLTK_CONFIG) -# mark_as_advanced(FLTK_EXECUTABLE) -# mark_as_advanced(MYFLTK_LIBRARIES) - set(MYFLTK_FOUND TRUE) - set(FLTK_WRAP_UI 1) - endif(FLTK_FLUID_EXECUTABLE) - endif (MYFLTK_CONFIG) -endif (MYFLTK_LDFLAGS) - -# message("MYFLTK_LDFLAGS: ${MYFLTK_LDFLAGS}") -# message("FLTK_WRAP_UI: ${FLTK_WRAP_UI}") - -if (MYFLTK_FOUND) - if (NOT MYFLTK_FIND_QUIETLY) - message(STATUS "found ${MYFLTK_CONFIG}") - # message(STATUS "found ${FLTK_FLUID_EXECUTABLE}") - endif (NOT MYFLTK_FIND_QUIETLY) -else (MYFLTK_FOUND) - if (MYFLTK_FIND_REQUIRED) - message(FATAL_ERROR "could not find MYFLTK, aborting.") - endif (MYFLTK_FIND_REQUIRED) -endif (MYFLTK_FOUND) diff --git a/cmake/FindPortAudio.cmake b/cmake/FindPortAudio.cmake @@ -1,19 +0,0 @@ -#Find Port Audio - - -include(LibFindMacros) -libfind_pkg_check_modules(PORTAUDIO portaudio-2.0>=19) - -find_path(PORTAUDIO_INCLUDE_DIR - NAMES portaudio.h - PATHS ${PortAudio_INCLUDE_DIRS} - ) - -find_library(PORTAUDIO_LIBRARY - NAMES portaudio - PATHS ${PortAudio_LIBRARY_DIRS} - ) - -set(PORTAUDIO_PROCESS_INCLUDES PORTAUDIO_INCLUDE_DIR) -set(PORTAUDIO_PROCESS_LIBS PORTAUDIO_LIBRARY) -libfind_process(PORTAUDIO) diff --git a/cmake/Findfftw.cmake b/cmake/Findfftw.cmake @@ -1,17 +0,0 @@ -#Find fftw (FFT algorithm library) - -include(LibFindMacros) -libfind_pkg_check_modules(FFTW fftw3) -find_path(FFTW_INCLUDE_DIR - NAMES fftw3.h - PATHS ${FFTW_INCLUDE_DIRS} - ) - -find_library(FFTW_LIBRARY - NAMES fftw3 - PATHS ${FFTW_LIBRARY_DIRS} - ) - -set(FFTW_PROCESS_INCLUDES FFTW_INCLUDE_DIR) -set(FFTW_PROCESS_LIBS FFTW_LIBRARY) -libfind_process(FFTW) diff --git a/cmake/LibFindMacros.cmake b/cmake/LibFindMacros.cmake @@ -1,93 +0,0 @@ -# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments -# used for the current package. For this to work, the first parameter must be the -# prefix of the current package, then the prefix of the new package etc, which are -# passed to find_package. -macro (libfind_package PREFIX) - set (LIBFIND_PACKAGE_ARGS ${ARGN}) - if (${PREFIX}_FIND_QUIETLY) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) - endif (${PREFIX}_FIND_QUIETLY) - if (${PREFIX}_FIND_REQUIRED) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) - endif (${PREFIX}_FIND_REQUIRED) - find_package(${LIBFIND_PACKAGE_ARGS}) -endmacro (libfind_package) - -# CMake developers made the UsePkgConfig system deprecated in the same release (2.6) -# where they added pkg_check_modules. Consequently I need to support both in my scripts -# to avoid those deprecated warnings. Here's a helper that does just that. -# Works identically to pkg_check_modules, except that no checks are needed prior to use. -macro (libfind_pkg_check_modules PREFIX PKGNAME) - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(${PREFIX} ${PKGNAME}) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) -endmacro (libfind_pkg_check_modules) - -# Do the final processing once the paths have been detected. -# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain -# all the variables, each of which contain one include directory. -# Ditto for ${PREFIX}_PROCESS_LIBS and library files. -# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. -# Also handles errors in case library detection was required, etc. -macro (libfind_process PREFIX) - # Process all includes and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_INCLUDES}) - if (${i}) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Process all libraries and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_LIBS}) - if (${i}) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Print message and/or exit on fatal error - if (${PREFIX}_FOUND) - if (NOT ${PREFIX}_FIND_QUIETLY) - message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") - endif (NOT ${PREFIX}_FIND_QUIETLY) - else (${PREFIX}_FOUND) - if (${PREFIX}_FIND_REQUIRED) - foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) - message("${i}=${${i}}") - endforeach (i) - message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") - endif (${PREFIX}_FIND_REQUIRED) - endif (${PREFIX}_FOUND) -endmacro (libfind_process) - -macro(libfind_library PREFIX basename) - set(TMP "") - if(MSVC80) - set(TMP -vc80) - endif(MSVC80) - if(MSVC90) - set(TMP -vc90) - endif(MSVC90) - set(${PREFIX}_LIBNAMES ${basename}${TMP}) - if(${ARGC} GREATER 2) - set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) - string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) - set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) - endif(${ARGC} GREATER 2) - find_library(${PREFIX}_LIBRARY - NAMES ${${PREFIX}_LIBNAMES} - PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} - ) -endmacro(libfind_library) - diff --git a/doc/IT/01-intro_IT.txt b/doc/IT/01-intro_IT.txt @@ -0,0 +1,55 @@ +Come iniziare +--------------- +ZynAddSubFX è un sintetizzatore software piuttosto complesso, con un gran numero +di controlli. Perciò l'uso di ZynAddSubFX non è sempre ovvio. + +Molte applicazioni sotto Linux trasportano il MIDI con AlSA e trasmettono l'audio +con JACK. ZynAddSubFX può essere lanciato con questa configurazione eseguendo: + +------------------------------ +zynaddsubfx -I alsa -O jack -a +------------------------------ + +Questo imposta ALSA come driver input e JACK come driver audio, che dovrebbe +tentare di connettersi automaticamente alla tua scheda audio, per via del flag -a. +Se questa è la prima volta che lanci ZynAddSubFX, vedrai una schermata che ti lascia +scegliere tra l'interfaccia per principianti e quella avanzata. Attualmente +l'interfaccia 'beginner' è deprecata, quindi è raccomandato usare l'interfaccia +'advanced'. + +Ora dovresti essere in grado di vedere la finestra principale di ZynAddSubFX, dalla +quale puoi impostare patch, effetti e altre configurazioni generali, ma la cosa più +importante è che fornisce i collegamenti tra le patch. ZynAddSubFX è uno strumento +potente con una serie di patch di base, ma la vera forza sta dietro all'abilità di +creare delle patch personali. + +.Main Window +image::./images/uimain.png[] + +Per un utilizzo base, potrai usare il pulsante alla destra dell'etichetta 'enabled'. +Questo pulsante consentirà di selezionare lo strumento desiderato dai banchi +disponibili in ZynAddSubFX. Per suonare note in ZynAddSubFX puoi usare la tastiera +virtuale integrata (accessibile dal pulsante 'vK') oppure puoi connettere la tua +tastiera al sistema e usare *aconnect* per connetterla in ZynAddSubFX (supponendo +che si stia usando ALSA). + +Questa finestra principale consente l'accesso a molte features più avanzate. +Di cui alcune sono: + +* System Effects +* Insertion Effects +* Recording +* Part Settings (strumento impostazioni del livello) +* Master Settings +* Microtonal Settings + +Ad esempio, per utilizzare la funzione di registrazione deve essere selezionato un +file wave dal menù di registrazione, poi può essere avviata con il pulsante 'record' +e stoppata con il pulsante 'stop'. Questo è un modo semplice e veloce di registrare +alcuni samples da ZynAddSubFX, anche se ci sono strumenti con caratteristiche più +complete disponibili tramite gli strumenti di registrazione di JACK. + +NOTE: Dopo aver premuto 'record', il file wave non partirà la registrazione fino a +quando un nuovo tasto non sarà premuto da una sorgente MIDI esterna o dalla virtual +keyboard. Le proprietà dei 'System Effects' e degli 'Insertion Effects' sono +accessibili e disponibili così come le proprietà di ogni strumento. diff --git a/doc/IT/02-filter_IT.txt b/doc/IT/02-filter_IT.txt @@ -0,0 +1,61 @@ +Filters +------- +:Author: Mark McCurry +:Date: June 24, 2012 + +ZynAddSubFX offre diversi tipi di filtri, che possono essere usati per modellare +lo spettro di un segnale. I parametri primari che influenzano le caratteristiche +del filtro sono 'cutoff', 'resonance', 'filter stages' e il tipo di filtro '(filter type)'. + +* *Cutoff (frequenza di taglio)*: Questo valore determina quale frequenza segna + il punto di cambiamento per il filtro. + In un filtro 'low-pass' (passa-bassi) questo + valore segna il punto da cui le frequenze alte + verranno attenuate. +* *Resonance*: La Resonance di un filtro determina l'enfatizzazione del filtro + sulla frequenza di taglio. In ZynAddSubFX è rappresentata dal + fattore 'Q', che è definito come la frequenza di taglio diviso + la larghezza di banda '(bandwidth)'. In altre parole un più alto + valore di Q causa un picco molto più stretto e risonante. +* *Stages*: Il numero di fasi di filtrazione in un dato filtro descrive quanto + bruscamente è in grado di applicare cambiamenti nella risposta in + frequenza. + +I filtri analogici di base '(analog)' che ZynAddSubFX offre sono mostrati di +seguito, con la frequenza centrale segnata con una linea rossa. I filtri a stato +variabile '(state variable)' dovrebbero essere molto simili. + +image:images/filter0.png[] + +Come detto in precedenza, il valore Q di un filtro influenza quanto concentrata è +l'energia del segnale nella frequenza di taglio; il risultato di differenti valori +di Q sono mostrati sotto. + +TIP: Per molti suoni analogici classici, alti valori di Q sono ussati sugli +'sweeping filters'. Un semplice low-pass filter con Q alto modulato da un forte +'envelope' solitamente è sufficiente per avere un buon suono. + +image:images/filter1.png[] + +Infine, l'effetto dell'ordine del filtro può essere visto sotto. Questo è +approssimativamente il numero di fasi del filtro '(filter stages)'. Per patches +più complesse è importante capire che la nitidezza in più nel filtro non è gratuita, +in quanto richiede molti più calcoli in corso di esecuzione; questo fenomeno +è più facilmente visibile nel 'subsynth', dove è facile avere bisogno di centinaia +di 'filter stages' per produrre una certa nota. + +image:images/filter2.png[] + +User Interface +~~~~~~~~~~~~~~ + +image:images/uifilter.png[] + +* *C.freq*: Cutoff frequency +* *Q*: Level of resonance for the filter +* *V.SnsA.*: Velocity sensing amount for filter cutoff +* *V.Sns.*: Velocity sensing function +* *freq.tr*: Frequency tracking amount. When this parameter is positive, higher + note frequencies shift the filter's cutoff frequency higher. +* *gain*: Additional gain/attenuation for filter +* *St*: Filter stages diff --git a/doc/IT/03-lfo_IT.txt b/doc/IT/03-lfo_IT.txt @@ -0,0 +1,64 @@ +LFO +--- +:author: Paul Nasca + +Introduzione +~~~~~~~~~~~~ + +"LFO" significa Low Frequency Oscillator. Questi oscillatori non sono usati per +fare suoni da soli, ma per cambiare alcuni parametri (come le frequenze, le +ampiezze o i filtri). + +L'LFO ha alcuni parametri di base: + +* *Delay*: Questo parametro imposta il tempo tra l'inizio della nota e l'inizio + dell'LFO +* *Start Phase*: La posizione che avrà l'LFO alla partenza +* *Frequency*: La velocità dell'LFO (quanto velocemente il parametro è controllato + dai cambiamenti dell'LFO) +* *Depth*: L'ampiezza dell'LFO (quanto il parametro è controllato dai cambiamenti + dell'LFO) + +image:images/lfo0.png[] + +Un altro importante parametro dell'LFO è la forma '(shape)'. Ci sono molti +tipi di LFO in base alla forma. ZynAddSubFX supporta le seguenti forme: + +image:images/lfo1.png[] + +Un altro parametro è 'LFO Randomness' (casualità dell'LFO). +Esso modifica casualmente l'ampiezza o la frequenza dell'LFO ed in ZynAddSubFX puoi scegliere quanto, con questo parametro. +Nelle seguenti immagini sono mostrati alcuni esempi di casualità e come cambia la +forma d'onda triangolare dell'LFO. + +image:images/lfo2.png[] + +Altri parametri sono: + +* *Continous mode*: Se si utilizza questa modalità, l'LFO non partirà da "zero" +ad ogni nuova nota, ma sarà continuo. E' molto utile applicato sui filtri, per +fare interessanti 'sweeps'. +* *Stretch*: Controlla quanto la frequenza dell'LFO cambia in base alla frequenza +della nota. +Si può passare da 'stretch' negativo (la frequenza dell'LFO diminuisce sulle +note più alte) a zero (rimane la stessa in tutte le note) a 'stretch' positivo +(aumenta sulle note più alte). + +User Interface +~~~~~~~~~~~~~~ + +In ZynAddSubFX i parametri dell'LFO sono mostrati così: + +image:images/uilfo.jpg[] + +Questi parametri sono: + +* *Freq*: LFO Frequency +* *Depth*: LFO Depth +* *Start*: LFO Start Phase - +Se questo knob è al valore più basso, LFO Start Phase sarà random +* *Delay*: LFO Delay +* *A.R.*: LFO Amplitude Randomnes +* *F.R.*: LFO Frequency Randomness +* *C.*: LFO Continous Mode +* *Str.*: LFO Stretch - Nell'immagine sopra LFO Stretch è impostato a zero diff --git a/doc/IT/04-envelope_IT.txt b/doc/IT/04-envelope_IT.txt @@ -0,0 +1,134 @@ +Envelopes +--------- + +Introduzione +~~~~~~~~~~~~ +Gli inviluppi controllano come cambiano nel tempo l'ampiezza, la frequenza o il +filtro. + +Amplitude Envelopes (inviluppi di ampiezza) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Questi inviluppi controllano l'ampiezza del suono. +In ZynAddSubFX, gli inviluppi di ampiezza possono essere lineari o logaritmici. +Nell'immagine seguente sono mostrate le differenze tra questi inviluppi. + +image:images/envelope1.png[Alt text] + +L'inviluppo di ampiezza è diviso in: +* *Attack*: Inizia all'attacco della nota (Note On). Il volume inizia da 0 al +massimo. In ZynAddSubFX l'attack è sempre lineare +* *Decay*: Il volume scende dal valore massimo ad un livello chiamato "Sustain level" +* *Sustain*: Il volume rimane costante fino a quando il tasto non viene +rilasciato (Note Off). Dopo questo, avviene l'ultima fase. +* *Release*: Il volume scende a zero. + +Frequency Envelopes +~~~~~~~~~~~~~~~~~~~ + +Questi inviluppi controllano la frequenza (o, più esattamente, il 'pitch') +degli oscillatori. +La seguente figura disegna le fasi di questi inviluppi. + +image::images/envelope2.png[Alt text] + +La linea puntinata rappresenta il pitch reale del suono senza inviluppo. + +Gli inviluppi di frequenza sono divisi in 3 fasi: + +* *Attack*: Inizia all'attacco della nota (Note On). La frequenza inizia da un +certo valore e "scivola" alla reale frequenza della nota. +* *Sustain*: La frequenza è la stessa per tutto il periodo di Sustain +* *Release*: Questa fase inizia con il Note Off e scala la frequenza della nota +ad un certo valore + +Filter Envelopes +~~~~~~~~~~~~~~~~ + +Questi inviluppi controllano la frequenza di cutoff dei filtri e sono divisi in: + +image:images/envelope3.png[Alt Text] + +* *Attack*: Inizia all'inizio della nota (Note On). La frequenza di cutoff inizia +ad un certo valore e scala ad un altro +* *Decay*: La frequenza di cutoff continua a scivolare verso il valore reale della +frequenza di cutoff del filtro (linea puntinata) +* *Sustain*: La frequenza di cutoff è la stessa per tutto il periodo di +Sustain (linea puntinata) +* *Release*: Questa fase inizia con il Note Off e scala la frequenza di cutoff della +nota ad un certo valore + +Freemode Envelopes +~~~~~~~~~~~~~~~~~~ + +Per tutti gli inviluppi c'è una modalità che consente all'utente di impostare un numero +arbitrario di fasi e punti di controllo. Questa modalità è chiamata 'Freemode'. + +image:images/envelope4.png[Alt Text] + +L'unica fase che rimane sempre definita è il Sustain, dove gli inviluppi si bloccano +fino ad un evento Note Off. + +User Interface +~~~~~~~~~~~~~~ +Tutti i tipi di inviluppi hanno alcuni controlli comuni: + +* *E*: Mostra una finestra che può far vedere la vera forma dell'inviluppo o convertirlo +in 'Freemode' per editarlo +* *Stretch*: Come l'inviluppo è allungato in base alla nota. +Sulle note più alte gli inviluppi sono più corti delle note più basse. +Nel valore più a sinistra lo 'stretch' è zero. +Il valore più a destra indica un allungamento del 200%; ciò significa che l'inviluppo +è allungato circa 4 volte/ottava. +* *frcR*: Release forzato. Se questa opzione è settata su On, il rilascio andrà al +valore finale anche se la fase di Sustain non è stata completata. +Di solito questo parametro è settato. + + +I parametri degli Amplitude Evelopes in ZynAddSubFX sono: + +image:images/uienvelope3.jpg[Alt Text] + +* *A.dt*: Durata Attack +* *D.dt*: Durata Decay +* *S.Val*: Valore di Sustain +* *R.dt*: Release time +* *L*: Se questa opzione è settata l'inviluppo è lineare, altrimenti sarà logaritmico. + + +Per i Frequency Envelopes l'interfaccia ha i seguenti parametri: + +image:images/uienvelope2.jpg[Alt Text] + +* *A.val*: Valore di Attack +* *A.dt*: Durata Attack +* *R.dt*: Release time +* *R.val*: Valore di Release + + +I Filter Evelopes hanno i parametri: + +image:images/uienvelope1.jpg[Alt Text] + +* *A.val*: Valore di Attack +* *A.dt*: Durata di Attack +* *D.val*: Valore di Decay +* *D.dt*: Decay time +* *R.dt*: Release time +* *R.val*: Valore di Release + +I Freemode Envelopes hanno una finestra separata per impostare parametri e controlli: + +image:images/uienvelope0.jpg[] + +* *Control points (punti di controllo)*: Puoi muovere i punti usando il mouse. +In basso a destra nella finestra viene mostrata la durata totale dell'inviluppo. +Se si clicka su un control point verrà visualizzata la durata della fase in cui +è quel punto. +* *Freemode*: Questo pulsante attiva o disattiva la modalità 'Freemode' +* *Add Point*: Aggiunge un punto dopo il punto correntemente selezionato. +Puoi selezionare un punto clickandoci su. +* *Delete point*: Rimuove il punto dall'inviluppo. +* *Sust.*: Imposta il punto di Sustain. E' mostrato usando la linea gialla. +* *Str.*: Envelope stretch + diff --git a/doc/IT/05-adsynth_IT.txt b/doc/IT/05-adsynth_IT.txt @@ -0,0 +1,78 @@ +AdSynth +------- + +AdSynth, principalmente un motore di sintesi additiva, è uno dei tre principali +motori di sintesi disponibili in ZynAddSubFX. +Il concetto base di questo motore è la somma di un insieme di voci, ciascuno dei +quali consiste in oscillatori. + +High Level (Global) +~~~~~~~~~~~~~~~~~~~ + +Il livello globale di AdSynth consiste negli elementi mostrati nella figura sotto: + +.AdSynth Global Elements +image::gen/ad-note.png[scalewidth="50%",width="700"] + +Il livello globale di AdSynth è quasi interamente composto dagli elementi +precedentemente discussi. +Comunque appaiono qui alcune nuove features, come: il rilevamento di velocità +'(velocity sensing)', 'punch', opzioni di detune e relativa bandwidth, resonance. + +.AdSynth Global Window +image::images/ad-global.png[] + +Il rilevamento di velocità è semplicemente una trasformazione esponenziale dalla +velocità della nota ad alcuni cambiamenti di parametro (!?). +Il diagramma sotto mostra come il 'velocity sensing' controlla questa traslazione +in tutto il range di velocity delle note possibili. + +.Velocity Sensing Chart +image::gen/velf.png[scalewidth="50%",width="600"] + +Il 'punch' di una nota in AdSynth è un'amplificazione costante dell'output +alla partenza della nota, con una lunghezza determinata dal 'punch time' e 'stretch' +e l'ampiezza determinata da 'punch strength' e 'velocity sensing'. +Il controllo relBw nel riquadro di frequenza è di fatto un moltiplicatore per +"scordare" '(detuning)' tutte le voci di una nota. + +NOTE: TODO Talk about resonance + + +La somma delle voci passa attraverso filtri e amplificazione per produrre il +suono finale. +Questro potrebbe far pensare che ad-note è solo un mucchio di post-elaborazione +minore e che a questo livello molto della generazione del suono è nascosta. + +Voices +~~~~~~ + +La voce da accesso ad un configurazione simile dei parametri globali più altre +cose come il modulatore, l'oscillatore e features di unison. + +.AdSynth Voice Window +image::images/ad-voice.png[] + +Modulation +^^^^^^^^^^ + +Tra le opzioni di modulazione si può selezionare: + +* Morph +* Ring Modulation +* Phase Modulation +* Frequency Modulation +* Disabled + +Unison +^^^^^^ + +Unison è utile nel creare il suono tipo chorus di più oscillatori simultanei. + +Oscillator +~~~~~~~~~~ + +NOTE: TODO show waveforms, talk about distortions somewhere, etc + +.Oscillator Window +image::images/uioscil.png[] diff --git a/doc/IT/06-controller_IT.txt b/doc/IT/06-controller_IT.txt @@ -0,0 +1,56 @@ +Controller +--------- + +image::./images/uicontroller.png[] + +General +~~~~~~~ + +* *ModWh*: Modulation Wheel depth (profondità della Modulation Wheel) +* *Exp MWh*: Exponential Modulation Wheel (cambia la scala di mudulazione in + esponenziale) +* *BwDpth*: Bandwidth Depth (profondità della Bandwidth) +* *Exp BW*: Exponential Bandwidth (cambia la scala di Bandwidth in esponenziale) +* *PanDpth*: Panning Depth (profondità del pan) +* *FltQ*: Filter Q (resonance) depth +* *FltCut* Filter Cutoff frequency depth (profondità della frequenza di taglio) +* *Expr*: Attiva/disattiva Expression +* *Vol*: Attiva/disattiva la ricezione di Volume controller +* *FMamp*: Attiva/disattiva la ricezione di Modulation Amplitude controller (76) +* *Sustain*: Attiva/disattiva sustain pedal +* *PWheelB.Rng (cents)*: Pitch Wheel Bend Range (cents; 100 cents = 1 semitono) + +Portamento +~~~~~~~~~~ + +* *Rcv.*: Controlla se la parte riceve il Portamento - On/Off (65) +* *time*: La durata del Portamento +* *thresh*: La soglia '(Threshold)' del Portamento. +Rappresenta il minimo o il massimo numero di semitoni (o centesimi di semitono) +richiesti per lo start del Portamento. +La differenza è calcolata tra l'ultima nota e la corrente. +* *th.type*: Il tipo di Threshold +Se selezionato significa che il Portamento si attiva quando la differenza +delle frequenze è al di sopra della soglia ("thresh"); non selezionato si attiva +quando è al di sotto della soglia. + +NOTE: La Threshold si riferisce alle frequenze e non alle note MIDI + (si potrebbe tenere in considerazione se si usano scale microtonali). + + +Proportional Portamento +^^^^^^^^^^^^^^^^^^^^^^ +//// +TODO: add graphs to explain prp.rate and prp. depth +//// + +* *Propt.*: Se il Portamento è proporzionale al rapporto '(Ratio)' delle frequenze +* *Prp. Rate*: Ratio necessaria per raddoppiare il tempo del Portamento +* *Prp. Dpth* + +Resonance +~~~~~~~~~ + +* *CFdpth*: Controlla la profondità del centro della Resonance +* *BWdpth*: Controlla la profondità della larghezza di banda (Bandwidth) della +Resonance diff --git a/doc/IT/08-saving_IT.txt b/doc/IT/08-saving_IT.txt @@ -0,0 +1,54 @@ +Persistence +----------- + +Come la gran parte delle applicazioni ZynAddSubFX consente di salvare il tuo +lavoro e ricaricarlo. + +Salvare tutto +~~~~~~~~~~~~~ + +Uno dei modi più semplici di salvare il tuo lavoro è quello di salvare l'intera +sessione. Questo può essere fatto dal menu File e il risultato sarà la creazione +di un .xmz file. +Una volta creato, questo file conterrà le tutte le impostazioni della sessione, +come le accordature microtonali, tutte le patch, tutti i tipi di effetti, ecc... + +Salvare delle parti +~~~~~~~~~~~~~~~~~~~ + +In alcuni casi salvare tutto non è quello che si desidera. +Di seguito c'è un esempio di salvataggio di una patch. + +Patches +^^^^^^^ +Per salvare una patch, si può salvare dal menu strumenti o dalla bank window. + +Con il menu strumenti si può solo salvare il file in una dato percorso con +l'estensione .xiz. + +Con il menu dei banchi si può assegnare una patch ad un certo slot con un banco. +Questo strumento rimarrà qui per un futuro uso fin quando non viene cancellato. +Per vedere la posizione fisica del file .xiz si può controllare la finestra in +File->Settings->Bank_Root_Dirs, per vedere i percorsi dei banchi. + +NOTE: Devi avere i permessi di scrittura per aggiungere uno strumento al banco. + +Presets +^^^^^^^ + +Avete un'impostazione favorita per un inviluppo o un oscillatore difficile da +rifare? Allora i preset fanno al caso vostro. +I preset consentono di salvare le impostazioni per ogni componente che supporta +operazioni di copia/incolla. +Questo viene fatto con i prest file (.xpz), che sono memorizzati nelle cartelle +indicate da File->Settings->Preset_Root_Dirs. + +Riepilogo +~~~~~~~ + +.Riepilogo delle estensioni +[literal] +xmz Everything +xiz Instrument +xsz Scale Settings +xpz Presets diff --git a/doc/IT/APPENDIX_A-mididefaults_IT.txt b/doc/IT/APPENDIX_A-mididefaults_IT.txt @@ -0,0 +1,22 @@ +Appendice A: Default MIDI +------------------------- + +.Connessioni MIDI di Default +[literal] +001 - Modulation Wheel +007 - Volume +010 - Pan +011 - Expression +064 - Sustain +065 - Portamento Enable +071 - Filter Q +074 - Filter Cutoff +075 - Bandwidth(*) +076 - Modulation Amplitude(*) +077 - Resonance Center Frequency(*) +078 - Resonance Bandwidth(*) +120 - All Sounds Off +121 - Reset All Controllers +123 - All Notes Off + +Le voci con '(*)' non rientrano nelle specifiche General Midi. diff --git a/doc/IT/APPENDIX_B-build_IT.txt b/doc/IT/APPENDIX_B-build_IT.txt @@ -0,0 +1,61 @@ +Appendice B: Compilare ZynAddSubFX +-------------------------------- + +Introduzione a CMake +~~~~~~~~~~~~~~~~~~~~~ + +************************************************************************ +Note: Questa sezione è in gran parte copiata dal wiki di OpenSceneGraph: +http://www.openscenegraph.org/projects/osg/wiki/Build/CMake +************************************************************************ + +ZynAddSubFX usa CMake come suo sistema di compilazione unificato. CMake +è capace di leggere semplici build script dall'albero dei sorgenti e +creare da questo un sistema di compilazione specifico per la piattaforma. +Questo sistema di compilazione può avere la forma di VisualStudio project +files, Unix Makefiles o XCode project files. CMake è capace di individuare +automaticamente le dipendeze esterne e consente di attivare/disattivare +la compilazione del modulo e di configurare varie opzioni di compilazione. + +L'uso di un sistema di compilazione unificato consente di evitare rotture +di compilazione che erano presenti nel precedente metodo di compilazione, +ovvero quello di mantenere tre obiettivi di compilazione separati per +VisualStudio, Unix "make" and XCode. Si riduce anche l'onere della +manutenzione per gli sviluppatori base e collaboratori. +Nell'insieme, l'uso di CMake dovrebbe portare come risultato una migliore +coerenza e build più stabili su ogni piattaforma per gli utenti finali e +una maggiore produttività nello sviluppo di nuove versioni. +Speriamo che con una maggior coerenza di builds tra piattaforme renderà +più facile per gli sviluppatori utilizzare la 'development version' di +ZynAddSubFX e aiutare a contribuire ai testing e alle migliorie, +portando ad un codice di più alta qualità. + +Quick start guide +~~~~~~~~~~~~~~~~~ + +Per i più impazienti, qui c'è una guida veloce su come compilare +immediatamente ZynAddSubFX da sorgenti. + +************************************************************************ +Note: Ciò presuppone che tu abbia già una copia dei sorgenti. +************************************************************************ + +--------------------------------- +#enter the source directory +cd zynaddsubfx + +#make a directory for an out-of-source build +mkdir build +cd build + +#generate a cmake build project here from the cmake root, which is +#found in the directory below the current one +cmake .. + +#OPTIONAL: Adjust compile variables in the Cache file: +ccmake . + +#And finally, build as usual using make +make +--------------------------------- + diff --git a/doc/IT/APPENDIX_C-doc_getting_IT.txt b/doc/IT/APPENDIX_C-doc_getting_IT.txt @@ -0,0 +1,63 @@ +Appendix C: Ottenere ZynAddSubFX +------------------------------- + +Normalmente ci sono diversi modi per ottenere una copia di ZynAddSubFX. + +SourceForge:: + http://sourceforge.net/projects/zynaddsubfx/files/ +Distribuition:: + apt/yum/others +Git:: + git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfxg + +Introduzione a Git +~~~~~~~~~~~~~~~~~~~ + +Per coloro che vogliono vivere "on the bleeding edge" o chi vuole essere certo che +la prossima release abbia meno bug, si può avere il codice con git. +Git è usato per gestire il codice sorgente di questo progetto ed è utile per +ottenere velocemente e facilmente una copia "up-to-date" del codice sorgente. + +Ottenere il codice sorgente +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Per avere una copia dei sorgenti di ZynAddSubFX tutto il necessario da fare è: + +--------------------------------------------- +git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx + +cd zynaddsubfx + +#Download additional resources +git submodule init +git submodule update +--------------------------------------------- + +Ora dovresti essere nella directory del codice sorgente. + +Per compilare facilmente si guardi l'Appendice B del manuale. + +Dare un'occhiata ai branch +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Diciamo che lo sviluppo si è esteso ad una creazione di una feature che si vuole +vedere in anteprima. +Per il bene di questa guida, supponiamo che il nome del branch della feature che +verrà è 'foo'. + +----------------------------------------- +#checkout the foo branch from sourceforge +git checkout --track -b foo origin/foo + +#lets checkout the primary branch again +git checkout master + +#hop back to the other branch +git checkout foo +---------------------------------------- + +Ora si dovrebbe essere in grado di cambiare branches e andare nella build-directory +(come descritto in Appendice B) e ricompilare ZynAddSubFX. + +NOTE: Quando si usano i branches può venir meno un po' di stabilità. + diff --git a/doc/IT/zynaddsubfx_IT.txt b/doc/IT/zynaddsubfx_IT.txt @@ -0,0 +1,28 @@ +Zynaddsubfx +=========== +:Author: Paul Nasca and Mark McCurry, translated by Ilario Glasgo + +include::01-intro_IT.txt[] + +include::02-filter_IT.txt[] + +include::03-lfo_IT.txt[] + +include::04-envelope_IT.txt[] + +include::05-adsynth_IT.txt[] + +include::06-controller_IT.txt[] + +///////////////////////////// +include 07-effects_IT.txt +include nrpn.txt +///////////////////////////// + +include::08-saving_IT.txt[] + +include::APPENDIX_A-mididefaults_IT.txt[] + +include::APPENDIX_B-build_IT.txt[] + +include::APPENDIX_C-doc_getting_IT.txt[] diff --git a/doc/Makefile b/doc/Makefile @@ -1,19 +1,19 @@ .PHONY: subdirs gen -all: gen-files xhtml chunked pdf +all: gen-files man xhtml chunked pdf gen-files: cd gen; make xhtml: zynaddsubfx.txt envelope.txt intro.txt lfo.txt - asciidoc -a numbered -a toc -b xhtml11 \ + asciidoc -a numbered -a toc -b html5 \ zynaddsubfx.txt chunked: asciidoc --doctype=article -b docbook \ - --conf-file=myconf.conf zynaddsubfx.txt + zynaddsubfx.txt rm -rf ./zynaddsubfx.chunked mkdir ./zynaddsubfx.chunked rm -f "./zynaddsubfx.chunked/*.html" @@ -29,13 +29,10 @@ chunked: "./zynaddsubfx.xml" \ pdf: - asciidoc -b latex --conf-file=myconf.conf zynaddsubfx.txt - grep -v figure zynaddsubfx.tex | \ - sed -e 's~^\\includegraphics~\\par\\noindent\{\} \\includegraphics~' | \ - sed -e 's~includegraphics\[\]~includegraphics[scale=0.5]~' > tmp.tex - mv tmp.tex zynaddsubfx.tex - pdflatex zynaddsubfx.tex - pdflatex zynaddsubfx.tex + a2x -f pdf zynaddsubfx.txt + +man: zynaddsubfx.1.txt + a2x -f manpage zynaddsubfx.1.txt clean: rm -f *~ *html *pdf *xml *tex *log zynaddsubfx.chunked/images diff --git a/doc/adsynth.txt b/doc/adsynth.txt @@ -1,22 +1,44 @@ -Add Synth ---------- +AdSynth +------- -Additive Synthesis is one of the three major synthesis engines available in -ZynAddSubFX. -Overall it adds together several voices with an oscillator as their sound -source. +AdSynth, a primarily additive synthesis engine, is one of the three major +synthesis engines available in ZynAddSubFX. +The basic concept of this engine is the summation of a collection of voices, +each of which consist of oscillators. High Level (Global) ~~~~~~~~~~~~~~~~~~~ -From a high level perspective, Add synth can be understood with this block -diagram: +AdSynth's global level consists of the elements shown in the below figure: -image:gen/ad-note.png[] +.AdSynth Global Elements +image::gen/ad-note.png[scalewidth="50%",width="700"] -The red/yellow nodes are controllable with the main adsynth window. +The global level of adsynth is almost entirely composed of previously discussed +elements. +However a few new features appear here, this includes velocity sensing, punch, +detune options and realative bandwidth , and resonance. + +.AdSynth Global Window +image::images/ad-global.png[] + + +Velocity sensing is simply an exponental transformation from the note's velocity +to some parameter change. +The below diagram shows how the velocity senseing controls affects this +translation over the whole range of possible note velocities. + +.Velocity Sensing Chart +image::gen/velf.png[scalewidth="50%",width="600"] + +The puch of a note in AdSynth is a constant amplification to the output at the +start of the note, with its length determined by the punch time and stretch and +the amplitude being determined by the punch strength and velocity sensing. +The relBW control in the frequency pane is effectively a multiplier for detuning +all voices within an adnote. + +NOTE: TODO Talk about resonance -image:images/ad-global.png[] The sum of the voices are passed through filters and amplification to produce the final sound. @@ -29,12 +51,14 @@ Voices The voice gives access to a similar setup to the global parameters and then some more, such as the modulator, oscillator, and unison features. -image:images/ad-voice.png[] +.AdSynth Voice Window +image::images/ad-voice.png[] Modulation ^^^^^^^^^^ Within the options for modulation, one can select: + * Morph * Ring Modulation * Phase Modulation @@ -47,3 +71,10 @@ Unison Unison is useful in creating the chorus like sound of many simultaneous oscillators +Oscillator +~~~~~~~~~~ + +NOTE: TODO show waveforms, talk about distortions somewhere, etc + +.Oscillator Window +image::images/uioscil.png[] diff --git a/doc/effects.txt b/doc/effects.txt @@ -0,0 +1,152 @@ +Effects +------- + +Effects are, generally, blackboxes that transform audio signals in a specified way. More exactly, the only input data for an effect in Zynaddsubfx is: + +* an array of samples, which is read *on line* +* the current system time (used for LFOs) + +The output is the transformed array of samples. + +NOTE: As described, effects have no information about anything else. For example, key presses are not recognized. Therefore, pressing a key does not initiate the LFO. Phase nobs will always be relative to a *global* LFO, which is only dependent on the system time. + +ZynAddSubFx has 3 types of effects: + +* System Effects +* Insertion Effects +* Instrument Effects + +TODO: Describe these 3 types. + +General topics +~~~~~~~~~~~~~~ + +* *Wetness* determines the mix of the results of the effect and its input. This mix is made the effects output. If an effect is wet, it means that nothing of the input signal is bypassing the effect. If it is dry, then the effect has no effect. +* *Filter stages* are the number of times that this filter is applied in series. So, if this number is 1, you simply have this one filter. If it is two, the sound first passes the filter, and the results then pass the same filter again. In ZynAddSubFx, the wetness is applied after all stages were passed. + +TODO: Can you make a diagram for these two, please? + +Equalizer +~~~~~~~~~ + +An equalizer is a filter effect that applies different volume to different frequencies of the input signal. http://en.wikipedia.org/wiki/Filter_%28signal_processing%29[Wikipedia] has some information about filters. Also, most of ZynAddSubFx's implementations follow the http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt["Cookbook formulae for audio EQ"] by Robert Bristow-Johnson. + +There are different types of filters. The number of poles ... TODO + +ZynAddSubFx offers the following filters: + +* LPF 1 means Low Pass Filter with one pole. TODO: more description +* LPF 2 means Low Pass Filter with two poles. +* HPF 1 means High Pass Filter with one pole. +* HPF 2 means High Pass Filter with two poles. +* BPF 2 means Band Pass Filter with two poles. +* NF 2 means Notch Filter with two poles +* PK 2 means Peak Filter with two poles. +* LS 2 Means Low Shelf with two poles. +* HS 2 means High Shelf with two poles. + +TODO: describe other nobs... + +Chorus +~~~~~~ + +Introduction +^^^^^^^^^^^^ + +In a chorus, there are many people. Even if each of them sings at exactly the same frequency, all their voices usually sound different. We say the have a different timbre. Timbre is the way we perceive sound and makes us differ between different music instruments. This is, physically, achieved by varying both the amplitude envelope and the frequency spectrum. Multiple sounds with slightly different timbre make a sound more shimmering, or powerful. This is the chorus effect. + +The chorus effect can be achieved by multiple people singing together. In a concert, there are many instruments, resulting in the same effect. When making electronic music, we only have an input wave and have to generate these different timbres by ourselves. + +Description +^^^^^^^^^^^ + +We explain the functionality in a diagram and list the components below. + +image::./gen/chorus.png[width="700"] + +We explain it in detail: + +* First, crossover is applied. The *LR Mix* wheel lets you set the amount. If you set it to the highest possible value, you will always have a stereo input. +* ... +* Next, the singal can be negated, If the *Neg* Checkbox is activated, the amplitude is multiplied by -1. +* Finally, *Panning* is applied. + +Distort +~~~~~~~ + +Introduction +^^^^^^^^^^^^ + +Distortion means, in general, altering a signal. Natural instruments usually produce sine like waves. A wave is transformed in an unnatural way when distortion is used. The most distorted waves are pulse waves. It is typical for distortion to add overtones to a sound. Distortion often increases the power and the http://en.wikipedia.org/wiki/Loudness[loudness] of a signal, while the db level is not increased. + +Distortion can happen in many situations when working with audio. Often, this is not wanted. In classical music, for example, distortion does not occur naturally. However, distortion can also be a wanted effect. It is typical for Rock guitars, but also present in electronic music, mostly in Dubstep and DrumNBass. Distortion is an important topic in the http://en.wikipedia.org/wiki/Loudness_war[Loudness War]. + +NOTE: As distortion increases loudness, distorted music can cause ear damage at lower volume levels. Thus, you might want to use it a bit careful. + +Description +^^^^^^^^^^^ + +We explain the functionality in a diagram and list the components below. + +image::./gen/distort.png[width="700"] + +* Negation is the first thing to happen. If the *Neg* Checkbox is activated, the amplitude is multiplied by -1. +* Panning is applied. Note, however, that you have to activate the Stereo Checkbox, labeled *St*, before. +* Pre amplification is done next. The amount can be changed using the *Drive* nob. Indeed, this is the amount of distortion. For example, if you clip a signal, the louder the input gets, the more distortion you will get. This can have different meanings for different types of distortion, as described below. +* Before applying the waveshape, or afterwards, you can apply Highpass and Lowpass filters. The type is HPF2 or LPF2, meaning butterworth lowpasses. They are labeled *HPF* and *LPF*. Whether this is done before, or after the waveshape, depends on the checkbox labeled *PF*. +* The next step is the wave shape. This defines how the wave is actually modified. The *Type* ComboBox lets you define how. We will discuss some types below. +* After the wave shape, we scale the level again. This is called output amplification. You can change the value using the *Level* wheel. +* Crossover is the last step. This is controlled by the wheel *LR Mix* and means that afterwards, a percentage of the left side is applied to the right side, and, synchronously, the other way round. It is a kind of interpolation between left and right. If you set the LR Mix to the highest possible value, you will always have a stereo output. + +******************************************************************** +One practical reason for using filters afterwards is that distortion can lead to waves with undesired high frequency parts. Those can be filtered out using the HPF. +A reason for using filters before applying is to achieve multiband distortion. ZynAddSubFx has no "real" multiband distortion by now, however. +******************************************************************** + +For a few types of distortion we will make a description below. Please note that you can get a very good impression for this using the *Wsh* ComboBox in the Oscillator editor. + +Atan & Sigmoid +^^^^^^^^^^^^^^ + +This is the default setting. It is an easy way to apply loudness to a wave without getting undesired effects. Thus, it can be used both for making instruments that sound like "real" ones, but also for electronic music. The transformation turns, roughly said, every amplitude into a square amplitude. Thus, sine, power, pulse and triangle turn into a usual square wave, while a saw turns into a phased square wave. A chirp wave turns into a kind of phase modulated square wave. + +Quants +^^^^^^ + +Quantization can be seen as an unnatural effect, which is often used for electronic music. The transformation is similar to building the http://en.wikipedia.org/wiki/Riemann_sum[lower sum] of a wave, mathematically said. This means that the transformation effect turns your "endless high" sampled wave into only a few samples. For more information, read http://en.wikipedia.org/wiki/Quantization_%28sound_processing%29[Wikipedia's article]. + +The more distortion you will apply, the less samples will be used. Indeed, this is equivalent to say that more input amplification is used. To see this, here is a small sample of code, where "ws" is the (correctly scaled amount of input amplification, and "n" the number of original samples. + +--------------------------------- +for(i = 0; i < n; ++i) + smps[i] = floor(smps[i] / ws + 0.5f) * ws; +--------------------------------- + +******************************************************************** +This kind of distortion might remind you of gaming console sound. Let's say we have a computer which is not able to play sounds with many samples. Therefore, it can only play sounds with a low sample rate. This leads to exactly this effect. +******************************************************************** + +NOTE: If you turn on quantisation very high, you might be confused that, especially high notes, make no sound. The reason is simple: High frequencies are "forgotten" if you sample with only few samples. Also, the sign of an amplitude can be forgotten. This behaviour might make some quantisations a bit unexpected. + + +Limiting & Clipping +^^^^^^^^^^^^^^^^^^^ + +Limiting usually means that for a signal, the amplitude is modified because it exceeds its maximum value. Overdrive, as often used for guitars, is often achieved by limiting: It happens because an amplifier "overdrives" the maximum amplitude it can deliver. For more general information, you can try http://en.wikipedia.org/wiki/Limiting[Wikipedia]. + +ZynAddSubFx has two types of limiting. Soft limiting, here as *Lmt*, means that the sound may not exceed a certain value. If the amplitude does so, it will simply be reduced to the limiting value. Hard limiting, is also called clipping and abbreviated *Clip*. This means that if the maximum is exceeded, instead of being constant at the limiting value, the original signal still has some influence on the output signal. Still, it does not exceed the limiting value. For ZynAddSubFx, a signal exeeding the limiting value will continue to grow "in the negative". + +Dynamic Filter +~~~~~~~~~~~~~ + +image::./gen/dynamic.png[width="700"] + +Echo +~~~~ + +image::./gen/echo.png[width="700"] + +Reverb +~~~~~~ + +image::./gen/reverb.png[width="700"] diff --git a/doc/filter.txt b/doc/filter.txt @@ -1,34 +1,61 @@ Filters ------- :Author: Mark McCurry -:Date: July 5, 2009 - -In ZynAddSubFX filters can be used at several different stages to -increase or decrease a defined set of frequencys. - -Types -~~~~~ - -ZynAddSubFX currently supports a wide set of filters that it can provide +:Date: June 24, 2012 + +ZynAddSubFX offers several different types of filters, which can be used to +shape the spectrum of a signal. +The primary parameters that affect the characteristics of the filter are the +cutoff, resonance, filter stages, and the filter type. + +* *Cutoff*: This value determines which frequency marks the changing point for + the filter. In a low pass filter, this value marks the point where + higher frequencies are attenuated. +* *Resonance*: The resonance of a filter determines how much excess energy is + present at the cutoff frequency. In ZynAddSubFX, this is + represented by the Q-factor, which is defined to be the cutoff + frequency divided by the bandwidth. In other words higher Q + values result in a much more narrow resonant spike. +* *Stages*: The number of stages in a given filter describes how sharply it is + able to make changes in the frequency response. + +The basic 'analog' filters that ZynAddSubFX offers are shown below, with the +center frequency being marked by the red line. +The 'state variable' filters should look quite similar. image:images/filter0.png[] -Values -~~~~~~ +As previously mentioned, the Q value of a filter affects how concentrated the +signal's energy is at the cutoff frequency; The result of differing Q values are +below. -Each of these filters will be affected by their Q values, number of poles, and -cutoff values. - -The folowing diagram shows the frequency response under different Q values: +TIP: For many classical analog sounds, high Q values were used on sweeping +filters. A simple high Q low pass filter modulated by a strong envelope is +usually sufficient to get a good sound. image:images/filter1.png[] -The folowing diagram shows the frequency response under a different number of -poles: +Lastly, the affect of the order of the filter can be seen below. +This is roughly synonymous with the number of stages of the filter. +For more complex patches it is important to realize that the extra sharpness in +the filter does not come for free as it requires many more calculations being +performed; This phenomena is the most visible in subsynth, where it is easy to +need several hundred filter stages to produce a given note. image:images/filter2.png[] User Interface ~~~~~~~~~~~~~~ -A picture of the UI will go here +image:images/uifilter.png[] + +* *C.freq*: Cutoff frequency +* *Q*: Level of resonance for the filter +* *V.SnsA.*: Velocity sensing amount for filter cutoff +* *V.Sns.*: Velocity sensing function +* *freq.tr*: Frequency tracking amount. When this parameter is positive, higher + note frequencies shift the filter's cutoff frequency higher. +* *gain*: Additional gain/attenuation for filter +* *St*: Filter stages + +NOTE: TODO add a lengthy section on the formant filter setup diff --git a/doc/gen/Makefile b/doc/gen/Makefile @@ -1,14 +1,14 @@ -SOURCES=ad-note.tex echo.tex distort.tex dynamic.tex reverb.tex chorus.tex +SOURCES=velf.tex ad-note.tex echo.tex distort.tex dynamic.tex reverb.tex chorus.tex OBJECTS=$(SOURCES:.tex=.png) all:$(OBJECTS) %.png: %.tex - pslatex $< - convert $(<:.tex=.dvi) -resize 200% -trim $@ - rm $(<:.tex=.dvi) $(<:.tex=.log) $(<:.tex=.aux) + pdflatex -shell-escape $< + convert -trim -density 300 $(<:.tex=.pdf) $@ + rm -f $(<:.tex=.pdf) $(<:.tex=.log) $(<:.tex=.aux) $(<:.tex=-pic*) $(<:.tex=.pgf-plot*) .PHONY: clean clean: - rm -f *.png *~ + rm -f *.png *~ *.aux *.auxlock *.table *.log *.gnuplot *.dpth *.dep diff --git a/doc/gen/ad-note.tex b/doc/gen/ad-note.tex @@ -1,49 +1,37 @@ -\documentclass[11pt]{report} -\pagestyle{empty} -\usepackage{pst-sigsys} +\documentclass{standalone} +\usepackage{tikz} +\usetikzlibrary{matrix,shapes,chains,scopes} \begin{document} -\begin{pspicture}[showgrid=false](-5,-3)(12,3) -\psset{framesize=2 .65} -\psfblock(-4,1){inFq}{Note Fq.} -\psfblock(-4,0){lfoFq}{Fq. LFO} -\psfblock(-4,-1){envFq}{Fq. Env.} - -\dotnode(-2.5,1){dot1} -\dotnode(-2.5,0){dot2} -\dotnode(-2.5,-1){dot3} - -\psfblock(-1,0){vce}{Voices} - - -\psfblock(2,0){flt}{Filter} - -\psfblock(1,-2){envFl}{Filter Env.} -\psfblock(3,-2){lfoFl}{Filter LFO} - -\pspolygon(4,1)(6,0)(4,-1) -\psfblock[linecolor=white](5,0){amp}{Amp} - -\psfblock(4,2){envAmp}{Amp. Env.} -\psfblock(6,2){lfoAmp}{Amp. LFO} - -\psfblock(7.5,0){pnch}{Punch} - -\psfblock(10,0){out}{Output} - -\ncline{inFq}{dot1} -\ncline{dot1}{dot2} -\ncline{lfoFq}{dot2} -\ncline{dot3}{dot2} -\ncline{envFq}{dot3} - -\dotnode(2,-1){fltdot} -\ncline{envFl}{fltdot} -\ncline{lfoFl}{fltdot} -\ncline{fltdot}{flt} -\dotnode(5,1){ampdot} -\ncline{lfoAmp}{ampdot} -\ncline{envAmp}{ampdot} -\ncline{ampdot}{amp} -\nclist[arrows=->]{ncline}{dot2,vce,flt,amp,pnch,out} -\end{pspicture} +\input{fig.sty} +\begin{tikzpicture} + \matrix (mtx) [matrix of nodes, row sep=5mm, column sep=5mm] { + & + |[lfo]| Freq LFO & + |[lfo]| Filter LFO & + |[lfo]| Amp LFO & + &\\ + |[block]| Base Fq. & + |[block]| Voices & + |[block]| Filter & + |[block, shape=isosceles triangle]| Volume & + {Output} \\ + & + |[env]| Freq Env& + |[env]| Filter Env& + |[env]| Amp Env&\\ + }; + + { [start chain=trunk] + \chainin (mtx-2-1)[join=by tip]; + \chainin (mtx-2-2)[join=by tip]; + \chainin (mtx-2-3)[join=by tip]; + \chainin (mtx-2-4)[join=by tip]; + \chainin (mtx-2-5)[join=by tip]; + } + \foreach \i in {2,3,4} + { + \draw[->] (mtx-1-\i) -- (mtx-2-\i); + \draw[->] (mtx-3-\i) -- (mtx-2-\i); + } +\end{tikzpicture} \end{document} diff --git a/doc/gen/chorus.tex b/doc/gen/chorus.tex @@ -1,6 +1,7 @@ \documentclass[12pt]{report} \pagestyle{empty} \usepackage{pst-sigsys} +\usepackage{auto-pst-pdf} \begin{document} \begin{pspicture}[showgrid=false](0,-1)(8,2) %Style diff --git a/doc/gen/distort.tex b/doc/gen/distort.tex @@ -1,6 +1,7 @@ \documentclass[11pt]{report} \pagestyle{empty} \usepackage{pst-sigsys} +\usepackage{auto-pst-pdf} \begin{document} \begin{pspicture}[showgrid=false](0,-2)(10,2) %Style diff --git a/doc/gen/dynamic.tex b/doc/gen/dynamic.tex @@ -1,6 +1,7 @@ \documentclass[11pt]{report} \pagestyle{empty} \usepackage{pst-sigsys} +\usepackage{auto-pst-pdf} \begin{document} \begin{pspicture}[showgrid=false](0,0)(8,2) %Style diff --git a/doc/gen/echo.tex b/doc/gen/echo.tex @@ -1,6 +1,7 @@ \documentclass[11pt]{report} \pagestyle{empty} \usepackage{pst-sigsys} +\usepackage{auto-pst-pdf} \begin{document} \begin{pspicture}[showgrid=false](0,0)(8,2) %Style diff --git a/doc/gen/fig.sty b/doc/gen/fig.sty @@ -0,0 +1,14 @@ +\tikzset{ +>=stealth, +thick, +block/.style={rectangle, draw=black!50, thick, + top color=white, + bottom color=red!50!black!20, + font=\itshape}, +op/.style={circle, draw=black!50, thick, + top color=white,bottom color=black!20, + font=\ttfamily}, +lfo/.style={block,bottom color=orange!80}, +env/.style={block,bottom color=yellow!80}, +tip/.style={->,shorten >=1pt} +} diff --git a/doc/gen/reverb.tex b/doc/gen/reverb.tex @@ -1,38 +1,50 @@ -\documentclass[11pt]{report} -\pagestyle{empty} -\usepackage{pst-sigsys} +\documentclass{standalone} +\usepackage{tikz} +\usetikzlibrary{matrix,shapes,chains,scopes} \begin{document} -\begin{pspicture}[showgrid=false](0,-1)(11,2) - %Style - \psset{framesize=1 .65} - \psset{style=Arrow} +\input{fig.sty} - %In/Out - \rput(0,0){\rnode{in}{$x[n]$}} - \rput(11,0){\rnode{out}{$y[n]$}} +\begin{tikzpicture}[ + point/.style={coordinate}, + every on chain/.style={rounded corners}] + %Style - %feedback loop - \pscircleop(1,0){fbcomb} - \pnode(2.5,0){decoration} - \psfblock(2.5,1){delay}{$z^{-n}$} - \rput(2.5,1.5){delaylen} - \pscircleop[operation=times](1,1){fb} - \rput(1,1.55){feedback} - \nclist{ncline}{decoration,delay,fb,fbcomb} + \matrix[row sep=5mm, column sep=5mm] { + & + \node (fb) {$f_b$};& + \node (del) {$Delay$}; + &&&&& \\ + & + \node[op] (pb1) {$\times$};& + \node[block] (pb2) {$z^{-n}$}; & + &&&& \\ - %Filter - \psfblock(4,0){fil}{Filter} - \rput(4,.5){LP/HP} + \node (p1) {$x[n]$}; & + \node[op] (p2) {$+$}; & + \node[point] (p3) {};& + \node[block] (p4) {HP/LP}; & + \node[block] (p5) {Comb Filter}; & + \node[block] (p6) {Allpass}; & + \node (p7) {$y[n]$}; \\ + }; - %Magic (aka, I am not sure if I read the code right) - \psfblock[framesize=1.9 .65](6,0){comb}{Comb Filter} - \psfblock[framesize=1.9 .65](8.5,0){pass}{All Passr} - - %Panning - \pscircleop[operation=times] (10,0){pan} - \rput(10,0.5){Panning} + \draw[->] (fb) -- (pb1); + \draw[->] (del) -- (pb2); + { [start chain=trunk] + \chainin (p1)[join=by tip]; + \chainin (p2)[join=by tip] ; + \chainin (p3)[join=by {}]; + %\chainin[join by={}] (p3); + { [start branch] + \chainin (pb2)[join=by tip]; + \chainin (pb1)[join=by tip]; + \chainin (p2)[join=by tip]; + } + \chainin (p4)[join=by tip]; + \chainin (p5)[join=by tip]; + \chainin (p6)[join=by tip]; + \chainin (p7)[join=by tip]; + } - %Connections - \nclist{ncline}{in,fbcomb,fil,comb,pass,pan,out} -\end{pspicture} +\end{tikzpicture} \end{document} diff --git a/doc/gen/velf.tex b/doc/gen/velf.tex @@ -0,0 +1,16 @@ +\documentclass{standalone} +\usepackage{tikz,pgfplots} +\begin{document} +\begin{tikzpicture} + \begin{axis}[domain=0:1,samples=128,no markers, + xlabel=Note Velocity,ylabel=Param Magnitude, + legend style={ cells={anchor=east}, legend pos=outer north east}] + \addplot gnuplot{x^8^1}; + \addlegendentry{max sensing} + \addplot gnuplot{x^(8^-1)}; + \addlegendentry{min sensing} + \addplot gnuplot{x}; + \addlegendentry{avg sensing} + \end{axis} +\end{tikzpicture} +\end{document} diff --git a/doc/getting.txt b/doc/getting.txt @@ -8,7 +8,7 @@ SourceForge:: Distribuition:: apt/yum/others Git:: - git://zynaddsubfx.git.sourceforge.net/gitroot/zynaddsubfx/zynaddsubfx + git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx Introduction to Git ~~~~~~~~~~~~~~~~~~~ @@ -25,7 +25,7 @@ Getting the Source Code In order to get a copy of the ZynAddSubFX source code, all that needs to be done is: --------------------------------------------- -git clone git://zynaddsubfx.git.sourceforge.net/gitroot/zynaddsubfx/zynaddsubfx +git clone git://git.code.sf.net/p/zynaddsubfx/code zynaddsubfx cd zynaddsubfx diff --git a/doc/images/uifilter.png b/doc/images/uifilter.png Binary files differ. diff --git a/doc/images/uimain.png b/doc/images/uimain.png Binary files differ. diff --git a/doc/images/uioscil.png b/doc/images/uioscil.png Binary files differ. diff --git a/doc/intro.txt b/doc/intro.txt @@ -1,22 +1,59 @@ Getting Started --------------- -In most cases ZynAddSubFX is used it will not alone, and it will be linked -with other programs. - -MIDI -~~~~ - -MIDI can be used to connect other applications to ZynAddSubFX. -Under ALSA on Linux the standard tool to connect ZynAddSubFX's MIDI is -aconnect. - -ZynAddSubFX has one incomming MIDI port. -Once another application is connected to this port, then it should be -able to send information on notes, pitches, and modulations to -ZynAddSubFX. -For more specific information see INSERT CHAPTER NAME HERE. - -JACK -~~~~ -JACK can be used to connect the output of ZynAddSubFX to other -applications. + +ZynAddSubFX is a fairly complex software synthesizer with a very large number of +controls. +As such, it is not alway obvious how to use ZynAddSubFX. + +Many applications under Linux transport MIDI over ALSA and transmit audio over +JACK. +ZynAddSubFX can be run in this configuration by running: + +------------------------------ +zynaddsubfx -I alsa -O jack -a +------------------------------ + +This sets the input driver to be alsa and the output driver to be jack, which +should attempt to autoconnect to your soundcard as per the '-a' flag. +If this is your first time running ZynAddSubFX, you will see a screen that lets +you choose between the advanced and beginner interface. +Currently the beginner interface is deprecated, so the advanced one is +recommended. + +Now you should be able to see ZynAddSubFX's main window, from which you can +setup patches, effects, and general configurations, but more importatnly it +provides links into the parameters of the patches. +ZynAddSubFX is a powerful tool with a number of base patches, but its true power +lies in the ability to make your own patches. + +.Main Window +image::./images/uimain.png[] + +For basic usage, you will want to use the button to the right of the enabled +label. +This button will allow for one to select the desired instrument from the banks +that ZynAddSubFX has available. +To play notes in ZynAddSubFX, either utilize the builtin virtual keyboard +(accessible via the vK button) or connect your keyboard to the system and use +*aconnect* to connect it to ZynAddSubFX (assuming that ALSA was used). + +This main window provides access to a number of more advanced features. +Some of these features are: + +* System Effects +* Insertion Effects +* Recording +* Part Settings (instrument level settings) +* Master Settings +* Microtonal Settings + +For instance to use the recording feature, a wave file must be selected from the +recording menu and then the recording can be started with the record button and +stopped with the stop button. +This is a simple and quick way of recording some samples from ZynAddSubFX, +though there are more full featured options available via JACK recording tools. + +NOTE: After hitting record, the wave file will not start recording until a new +key has been pressed via either an external midi source or the virtual keyboard +Both system and insertion effects can be accessed, the properties are available as well as properties of each +instrument. diff --git a/doc/myconf.conf b/doc/myconf.conf @@ -1,2 +0,0 @@ -[titles] -underlines="__","==","--","~~","^^" diff --git a/doc/zynaddsubfx.1.txt b/doc/zynaddsubfx.1.txt @@ -0,0 +1,82 @@ +ZYNADDSUBFX(1) +============== +:doctype: manpage + +NAME +---- +zynaddsubfx - a software synthesizer + +SYNOPSIS +-------- +*zynaddsubfx* ['OPTIONS'] + +DESCRIPTION +----------- + +*zynaddsubfx* is a polyphonic multimbral synthesizer, which supports three +synthesis engines and numerous effects to generate sound. + +1) ADsynth generates sounds by adding a number of voices. + Each voice has filters, envelopes, LFOs, morphing, modulation + (Ring Modulation, Phase Modulation... the modulators can have any + shape), resonance, etc... + Each voice includes a waveform generator with up to 128 sine/non-sine + harmonics. + You can use Fourier synthesis or if you don't like it you + can wave-shaping/filtering of functions. + +2) SUBsynth is a simple engine which makes sounds through + harmonic filtering of white noise + +3) PADsynth is an engine that makes very beautiful pads and other instruments, + which can be exported for use with other programs. + +Midi and audio support exists for OSS, ALSA, JACK, and others... + +OPTIONS +------- + +*-h, --help*:: + Display command-line help and exit +*-v, --version*:: + Display version and exit +*-l, --load=FILE*:: + Loads a .xmz file +*-L, --load-instrument*=FILE:: + Loads a .xiz file +*-r --sample-rate*=SR:: + Set the sample rate SR +*-b, --buffer-size*=SR:: + Set the buffer size, which determines the granularity of how often parameter + changes can be applied +*-o, --oscil-size*=OS:: + Set the ADsynth oscillator size +*-S, --swap*:: + Swap Left and Right output channels +*-D, --dump*:: + Dumps midi note ON/OFF commands +*-U, --no-gui*:: + Run ZynAddSubFX without user interface +*-N, --named*=Name:: + Postfix IO Name when possible +*-a, --auto-connect*:: + AutoConnect when using JACK +*-O, --output*=engine:: + Set Output Engine +*-I, --input*=engine:: + Set Input Engine +*-e, --exec-after-init*=command:: + Run post-initialization script. This script will be run after midi and audio + drivers have been initialized. + +BUGS +---- +Please report any bugs to either the mailing list + zynaddsubfx-user@lists.sourceforge.net +or the bugtracker + http://sourceforge.net/tracker/?group_id=62934 + +AUTHOR +------ +ZynAddSubFX was originally written by Nasca Octavian Paul. It is currently being +maintained by Mark McCurry. diff --git a/doc/zynaddsubfx.txt b/doc/zynaddsubfx.txt @@ -4,26 +4,28 @@ Zynaddsubfx This documentation is a work in progress -include::./intro.txt[] +include::intro.txt[] -include::./filter.txt[] +include::filter.txt[] -include::./lfo.txt[] +include::lfo.txt[] -include::./envelope.txt[] +include::envelope.txt[] -include::./adsynth.txt[] +include::adsynth.txt[] -include::./controller.txt[] +include::controller.txt[] + +include::effects.txt[] ///////////////////////////// -include::./nrpn.txt[] +include::nrpn.txt[] ///////////////////////////// -include::./saving.txt[] +include::saving.txt[] -include::./mididefaults.txt[] +include::mididefaults.txt[] -include::./build.txt[] +include::build.txt[] -include::./getting.txt[] +include::getting.txt[] diff --git a/pixmaps/black_key.png b/pixmaps/black_key.png Binary files differ. diff --git a/pixmaps/black_key_pressed.png b/pixmaps/black_key_pressed.png Binary files differ. diff --git a/pixmaps/knob.png b/pixmaps/knob.png Binary files differ. diff --git a/pixmaps/module_backdrop.png b/pixmaps/module_backdrop.png Binary files differ. diff --git a/pixmaps/white_key.png b/pixmaps/white_key.png Binary files differ. diff --git a/pixmaps/white_key_pressed.png b/pixmaps/white_key_pressed.png Binary files differ. diff --git a/pixmaps/window_backdrop.png b/pixmaps/window_backdrop.png Binary files differ. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -3,32 +3,37 @@ message(STATUS "Checking Include Path" $ENV{CMAKE_INCLUDE_PATH} ${CMAKE_INCLUDE_ message(STATUS "Checking Library Path" $ENV{CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH}) #Dependency check -find_package(zlib REQUIRED) -find_package(fftw REQUIRED) -find_package(MXML REQUIRED) find_package(PkgConfig REQUIRED) +find_package(zlib REQUIRED) +pkg_check_modules(FFTW REQUIRED fftw3) +pkg_check_modules(MXML REQUIRED mxml) find_package(Threads REQUIRED) find_package(OSS) find_package(Alsa) -find_package(JACK) -find_package(PortAudio) +pkg_check_modules(JACK jack) +pkg_check_modules(PORTAUDIO portaudio-2.0>=19) set(FLTK_SKIP_OPENGL true) +pkg_check_modules(NTK ntk) +pkg_check_modules(NTK_IMAGES ntk_images) find_package(FLTK) find_package(OpenGL) #for FLTK find_package(CxxTest) +if(CXXTEST_FOUND) + set(CXXTEST_USE_PYTHON TRUE) +endif() # lash pkg_search_module(LASH lash-1.0) mark_as_advanced(LASH_LIBRARIES) pkg_search_module(DSSI dssi>=0.9.0) mark_as_advanced(DSSI_LIBRARIES) +pkg_search_module(LIBLO liblo>=0.26) +mark_as_advanced(LIBLO_LIBRARIES) ######### Settings ########### # NOTE: These cache variables should normally not be changed in this # file, but either in in CMakeCache.txt before compile, or by passing # parameters directly into cmake using the -D flag. -SET (DefaultOutput oss CACHE STRING - "Default Output module: [null, alsa, oss, jack, portaudio]") -SET (GuiModule fltk CACHE STRING "GUI module, either fltk, qt or off") +SET (GuiModule fltk CACHE STRING "GUI module, either fltk, ntk or off") SET (CompileTests ${CXXTEST_FOUND} CACHE BOOL "whether tests should be compiled in or not") SET (AlsaEnable ${ALSA_FOUND} CACHE BOOL "Enable support for Advanced Linux Sound Architecture") @@ -42,7 +47,8 @@ SET (LashEnable ${LASH_FOUND} CACHE BOOL "Enable LASH Audio Session Handler") SET (DssiEnable ${DSSI_FOUND} CACHE BOOL "Enable DSSI Plugin compilation") - +SET (LibloEnable ${LIBLO_FOUND} CACHE BOOL + "Enable Liblo") # Now, handle the incoming settings and set define flags/variables based # on this @@ -50,8 +56,44 @@ SET (DssiEnable ${DSSI_FOUND} CACHE BOOL # Add version information add_definitions(-DVERSION="${VERSION}") +# Give a good guess on the best Input/Output default backends +if (JackEnable) + SET (DefaultOutput jack CACHE STRING + "Default Output module: [null, alsa, oss, jack, portaudio]") + # Override with perhaps more helpful midi backends + if (AlsaEnable) + SET (DefaultInput alsa CACHE STRING + "Default Input module: [null, alsa, oss, jack]") + elseif (OssEnable) + SET (DefaultInput oss CACHE STRING + "Default Input module: [null, alsa, oss, jack]") + else () + SET (DefaultInput jack CACHE STRING + "Default Input module: [null, alsa, oss, jack]") + endif () +elseif (AlsaEnable) + SET (DefaultOutput alsa CACHE STRING + "Default Output module: [null, alsa, oss, jack, portaudio]") + SET (DefaultInput alsa CACHE STRING + "Default Input module: [null, alsa, oss, jack]") +elseif (OssEnable) + SET (DefaultOutput oss CACHE STRING + "Default Output module: [null, alsa, oss, jack, portaudio]") + SET (DefaultInput oss CACHE STRING + "Default Input module: [null, alsa, oss, jack]") +else() + SET (DefaultOutput null CACHE STRING + "Default Output module: [null, alsa, oss, jack, portaudio]") + SET (DefaultInput null CACHE STRING + "Default Input module: [null, alsa, oss, jack]") +endif() + + + if (GuiModule STREQUAL qt AND QT_FOUND) set (QtGui TRUE) +elseif(GuiModule STREQUAL ntk AND NTK_FOUND) + set (NtkGui TRUE) elseif(GuiModule STREQUAL fltk AND FLTK_FOUND) set (FltkGui TRUE) elseif(GuiModule STREQUAL off) @@ -62,9 +104,6 @@ else () message(STATUS "GUI module defaulting to off") endif() -if(NOT PKG_CONFIG_FOUND) - message(FATAL_ERROR "pkg-config not found") -endif(NOT PKG_CONFIG_FOUND) #Build Flags option (BuildForAMD_X86_64 "Build for AMD x86_64 system" OFF) @@ -129,6 +168,13 @@ if(LashEnable) list(APPEND AUDIO_LIBRARY_DIRS ${LASH_LIBRARY_DIRS}) message(STATUS "Compiling with lash") endif() +if(LibloEnable) + include_directories(${LIBLO_INCLUDE_DIRS}) + add_definitions(-DUSE_NSM=1) + list(APPEND AUDIO_LIBRARIES ${LIBLO_LIBRARIES}) + list(APPEND AUDIO_LIBRARY_DIRS ${LIBLO_LIBRARY_DIRS}) + message(STATUS "Compiling with liblo") +endif() # other include directories include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS}) @@ -158,10 +204,7 @@ else (BuildForDebug) message (STATUS "Building for ${CMAKE_BUILD_TYPE}, flags: ${CMAKE_CXX_FLAGS_RELEASE}") endif (BuildForDebug) -if (DssiEnable) - add_definitions(-fPIC) -endif() - +add_definitions(-fPIC) if(FLTK_FOUND) mark_as_advanced(FORCE FLTK_BASE_LIBRARY) @@ -175,22 +218,33 @@ if(FLTK_FOUND) mark_as_advanced(FORCE FLTK_MATH_LIBRARY) endif(FLTK_FOUND) +if(NTK_FOUND) + mark_as_advanced(FORCE NTK_BASE_LIBRARY) + mark_as_advanced(FORCE NTK_CONFIG_SCRIPT) + mark_as_advanced(FORCE NTK_DIR) + mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE) + mark_as_advanced(FORCE NTK_FORMS_LIBRARY) + mark_as_advanced(FORCE NTK_GL_LIBRARY) + mark_as_advanced(FORCE NTK_IMAGES_LIBRARY) + mark_as_advanced(FORCE NTK_INCLUDE_DIR) + mark_as_advanced(FORCE NTK_MATH_LIBRARY) +endif(NTK_FOUND) + if(FltkGui) #UGLY WORKAROUND - find_program (MYFLTK_CONFIG fltk-config) - if (MYFLTK_CONFIG) - execute_process (COMMAND ${MYFLTK_CONFIG} --ldflags OUTPUT_VARIABLE MYFLTK_LDFLAGS) - string(STRIP ${MYFLTK_LDFLAGS} MYFLTK_LIBRARIES) + find_program (FLTK_CONFIG fltk-config) + if (FLTK_CONFIG) + execute_process (COMMAND ${FLTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE FLTK_LDFLAGS) + string(STRIP ${FLTK_LDFLAGS} FLTK_LIBRARIES) endif() - message(STATUS ${MYFLTK_LDFLAGS}) + message(STATUS ${FLTK_LDFLAGS}) - set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) + set(GUI_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) add_definitions(-DFLTK_GUI) - - message(STATUS "Will build fltk gui") + message(STATUS "Will build FLTK gui") include_directories( ${FLTK_INCLUDE_DIR} @@ -201,11 +255,32 @@ if(FltkGui) add_subdirectory(UI) endif() +if(NtkGui) + + find_program( FLTK_FLUID_EXECUTABLE ntk-fluid) + + message(STATUS ${NTK_LDFLAGS} ${NTK_IMAGES_LDFLAGS}) + + set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_IMAGES_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui) + + add_definitions(-DNTK_GUI) + + message(STATUS "Will build NTK gui") + + include_directories( + ${NTK_INCLUDE_DIRS} + "${CMAKE_CURRENT_SOURCE_DIR}/UI" + "${CMAKE_CURRENT_BINARY_DIR}/UI" + ) + + add_subdirectory(UI) +endif() + ########### General section ############## # Following this should be only general compilation code, and no mention # of module-specific variables -link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS}) +link_directories(${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS}) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} @@ -228,32 +303,38 @@ add_subdirectory(Synth) add_subdirectory(Effects) add_subdirectory(Params) add_subdirectory(DSP) -if(CompileTests) - add_subdirectory(Tests) -endif(CompileTests) add_subdirectory(Nio) -set(zynaddsubfx_SRCS - main.cpp +add_library(zynaddsubfx_core STATIC + ${zynaddsubfx_dsp_SRCS} + ${zynaddsubfx_effect_SRCS} + ${zynaddsubfx_misc_SRCS} + ${zynaddsubfx_params_SRCS} + ${zynaddsubfx_synth_SRCS} ) +target_link_libraries(zynaddsubfx_core + ${ZLIB_LIBRARIES} + ${FFTW_LIBRARIES} + ${MXML_LIBRARIES} + ${OS_LIBRARIES} + pthread) + +if(CompileTests) + add_subdirectory(Tests) +endif(CompileTests) + message(STATUS "using link directories: ${AUDIO_LIBRARY_DIRS} ${ZLIB_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${MXML_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS}") -add_executable(zynaddsubfx - ${zynaddsubfx_SRCS} -) +add_executable(zynaddsubfx main.cpp) target_link_libraries(zynaddsubfx - ${NONGUI_LIBRARIES} + zynaddsubfx_core + zynaddsubfx_nio ${GUI_LIBRARIES} - ${ZLIB_LIBRARIES} - ${FFTW_LIBRARIES} - ${MXML_LIBRARIES} ${NIO_LIBRARIES} ${AUDIO_LIBRARIES} - ${OS_LIBRARIES} - pthread ) if (DssiEnable) @@ -262,12 +343,7 @@ if (DssiEnable) ) target_link_libraries(zynaddsubfx_dssi - ${NONGUI_LIBRARIES} - ${ZLIB_LIBRARIES} - ${FFTW_LIBRARY} - ${MXML_LIBRARY} - ${NIO_LIBRARIES} - ${AUDIO_LIBRARIES} + zynaddsubfx_core ${OS_LIBRARIES} ) if (${CMAKE_SIZEOF_VOID_P} EQUAL "8") @@ -277,9 +353,15 @@ if (DssiEnable) endif () endif() -message(STATUS "Link libraries: ${ZLIB_LIBRARY} ${FFTW_LIBRARY} ${MXML_LIBRARY} ${AUDIO_LIBRARIES} ${OS_LIBRARIES}") +message(STATUS "Link libraries: ${ZLIB_LIBRARY} ${FFTW_LIBRARY} ${MXML_LIBRARIES} ${AUDIO_LIBRARIES} ${OS_LIBRARIES}") install(TARGETS zynaddsubfx RUNTIME DESTINATION bin ) +if(NtkGui) +install(DIRECTORY ../pixmaps DESTINATION share/zynaddsubfx) +add_definitions(-DPIXMAP_PATH="${CMAKE_INSTALL_PREFIX}/share/zynaddsubfx/pixmaps/") +add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") +endif(NtkGui) + include(CTest) diff --git a/src/DSP/AnalogFilter.cpp b/src/DSP/AnalogFilter.cpp @@ -45,7 +45,7 @@ AnalogFilter::AnalogFilter(unsigned char Ftype, if(stages >= MAX_FILTER_STAGES) stages = MAX_FILTER_STAGES; cleanup(); - firsttime = false; + firsttime = false; setfreq_and_q(Ffreq, Fq); firsttime = true; coeff.d[0] = 0; //this is not used @@ -223,9 +223,9 @@ void AnalogFilter::computefiltercoefs(void) * ((tmpgain + 1.0f) - (tmpgain - 1.0f) * cs - beta * sn) / tmp; d[1] = -2.0f * ((tmpgain - 1.0f) + (tmpgain + 1.0f) * cs) - / tmp * -1.0f; + / tmp * -1.0f; d[2] = ((tmpgain + 1.0f) + (tmpgain - 1.0f) * cs - beta * sn) - / tmp * -1.0f; + / tmp * -1.0f; } else { c[0] = tmpgain; @@ -249,9 +249,9 @@ void AnalogFilter::computefiltercoefs(void) * ((tmpgain + 1.0f) + (tmpgain - 1.0f) * cs - beta * sn) / tmp; d[1] = 2.0f * ((tmpgain - 1.0f) - (tmpgain + 1.0f) * cs) - / tmp * -1.0f; + / tmp * -1.0f; d[2] = ((tmpgain + 1.0f) - (tmpgain - 1.0f) * cs - beta * sn) - / tmp * -1.0f; + / tmp * -1.0f; } else { c[0] = 1.0f; diff --git a/src/DSP/CMakeLists.txt b/src/DSP/CMakeLists.txt @@ -1,14 +1,9 @@ set(zynaddsubfx_dsp_SRCS - AnalogFilter.cpp - FFTwrapper.cpp - Filter.cpp - FormantFilter.cpp - SVFilter.cpp - Unison.cpp + DSP/AnalogFilter.cpp + DSP/FFTwrapper.cpp + DSP/Filter.cpp + DSP/FormantFilter.cpp + DSP/SVFilter.cpp + DSP/Unison.cpp + PARENT_SCOPE ) - -add_library(zynaddsubfx_dsp STATIC - ${zynaddsubfx_dsp_SRCS} - ) - -target_link_libraries(zynaddsubfx_dsp) diff --git a/src/DSP/FormantFilter.cpp b/src/DSP/FormantFilter.cpp @@ -149,18 +149,19 @@ void FormantFilter::setpos(float input) currentformants[i].freq = currentformants[i].freq * (1.0f - formantslowness) + (formantpar[p1][i].freq - * (1.0f - pos) + formantpar[p2][i].freq * pos) + * (1.0f - pos) + formantpar[p2][i].freq * pos) * formantslowness; currentformants[i].amp = currentformants[i].amp * (1.0f - formantslowness) + (formantpar[p1][i].amp * (1.0f - pos) - + formantpar[p2][i].amp * pos) * formantslowness; + + formantpar[p2][i].amp * pos) * formantslowness; currentformants[i].q = currentformants[i].q - * (1.0f - formantslowness) - + (formantpar[p1][i].q * (1.0f - pos) - + formantpar[p2][i].q * pos) * formantslowness; + * (1.0f - formantslowness) + + (formantpar[p1][i].q * (1.0f - pos) + + formantpar[p2][i].q + * pos) * formantslowness; formant[i]->setfreq_and_q(currentformants[i].freq, diff --git a/src/DSP/FormantFilter.h b/src/DSP/FormantFilter.h @@ -44,7 +44,7 @@ class FormantFilter:public Filter void setpos(float input); - class AnalogFilter *formant[FF_MAX_FORMANTS]; + class AnalogFilter * formant[FF_MAX_FORMANTS]; struct { float freq, amp, q; //frequency,amplitude,Q diff --git a/src/DSP/Unison.cpp b/src/DSP/Unison.cpp @@ -21,21 +21,22 @@ #include <cmath> #include <cstring> +#include <err.h> #include "Unison.h" Unison::Unison(int update_period_samples_, float max_delay_sec_) :unison_size(0), - base_freq(1.0f), - uv(NULL), - update_period_samples(update_period_samples_), - update_period_sample_k(0), - max_delay((int)(synth->samplerate_f * max_delay_sec_) + 1), - delay_k(0), - first_time(false), - delay_buffer(NULL), - unison_amplitude_samples(0.0f), - unison_bandwidth_cents(10.0f) + base_freq(1.0f), + uv(NULL), + update_period_samples(update_period_samples_), + update_period_sample_k(0), + max_delay((int)(synth->samplerate_f * max_delay_sec_) + 1), + delay_k(0), + first_time(false), + delay_buffer(NULL), + unison_amplitude_samples(0.0f), + unison_bandwidth_cents(10.0f) { if(max_delay < 10) max_delay = 10; @@ -74,8 +75,10 @@ void Unison::setBandwidth(float bandwidth) if(bandwidth > 1200.0f) bandwidth = 1200.0f; -#warning \ - : todo: if bandwidth is too small the audio will be self canceled (because of the sign change of the outputs) + /* If the bandwidth is too small, the audio may cancel itself out + * (due to the sign change of the outputs) + * TODO figure out the acceptable lower bound and codify it + */ unison_bandwidth_cents = bandwidth; updateParameters(); } @@ -100,12 +103,15 @@ void Unison::updateParameters(void) float max_speed = powf(2.0f, unison_bandwidth_cents / 1200.0f); unison_amplitude_samples = 0.125f * (max_speed - 1.0f) - * synth->samplerate_f / base_freq; + * synth->samplerate_f / base_freq; -#warning \ - todo: test if unison_amplitude_samples is to big and reallocate bigger memory - if(unison_amplitude_samples >= max_delay - 1) + //If functions exceed this limit, they should have requested a bigguer delay + //and thus are buggy + if(unison_amplitude_samples >= max_delay - 1) { + warnx("BUG: Unison amplitude samples too big"); + warnx("Unision max_delay should be larger"); unison_amplitude_samples = max_delay - 2; + } updateUnisonData(); } @@ -134,13 +140,14 @@ void Unison::process(int bufsize, float *inbuf, float *outbuf) float pos = (float)(delay_k + max_delay) - vpos - 1.0f; int posi; F2I(pos, posi); //optimize! + int posi_next = posi + 1; if(posi >= max_delay) posi -= max_delay; + if(posi_next >= max_delay) + posi_next -= max_delay; float posf = pos - floorf(pos); - out += - ((1.0f - - posf) * delay_buffer[posi] + posf - * delay_buffer[posi + 1]) * sign; + out += ((1.0f - posf) * delay_buffer[posi] + posf + * delay_buffer[posi_next]) * sign; sign = -sign; } outbuf[i] = out * volume; @@ -163,18 +170,19 @@ void Unison::updateUnisonData() pos = -1.0f; step = -step; } - else if(pos >= 1.0f) { + else + if(pos >= 1.0f) { pos = 1.0f; step = -step; } float vibratto_val = (pos - 0.333333333f * pos * pos * pos) * 1.5f; //make the vibratto lfo smoother -#warning \ - I will use relative amplitude, so the delay might be bigger than the whole buffer -#warning \ - I have to enlarge (reallocate) the buffer to make place for the whole delay + + //Relative amplitude is utilized, so the delay may be larger than the + //whole buffer, if the buffer is too small, this indicates a buggy call + //to Unison() float newval = 1.0f + 0.5f - * (vibratto_val + 1.0f) * unison_amplitude_samples - * uv[k].relative_amplitude; + * (vibratto_val + 1.0f) * unison_amplitude_samples + * uv[k].relative_amplitude; if(first_time) uv[k].realpos1 = uv[k].realpos2 = newval; diff --git a/src/DSP/Unison.h b/src/DSP/Unison.h @@ -54,11 +54,11 @@ class Unison float lin_fpos; float lin_ffreq; UnisonVoice() { - position = RND * 1.8f - 0.9f; - realpos1 = 0.0f; - realpos2 = 0.0f; - step = 0.0f; - relative_amplitude = 1.0f; + position = RND * 1.8f - 0.9f; + realpos1 = 0.0f; + realpos2 = 0.0f; + step = 0.0f; + relative_amplitude = 1.0f; } } *uv; diff --git a/src/Effects/Alienwah.cpp b/src/Effects/Alienwah.cpp @@ -25,8 +25,8 @@ Alienwah::Alienwah(bool insertion_, float *efxoutl_, float *efxoutr_) :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), - oldl(NULL), - oldr(NULL) + oldl(NULL), + oldr(NULL) { setpreset(Ppreset); cleanup(); @@ -65,7 +65,7 @@ void Alienwah::out(const Stereo<float *> &smp) complex<float> tmp = clfol * x + oldclfol * x1; complex<float> out = tmp * oldl[oldk]; - out.real() += (1 - fabs(fb)) * smp.l[i] * pangainL; + out += (1 - fabs(fb)) * smp.l[i] * pangainL; oldl[oldk] = out; float l = out.real() * 10.0f * (fb + 0.1f); @@ -74,7 +74,7 @@ void Alienwah::out(const Stereo<float *> &smp) tmp = clfor * x + oldclfor * x1; out = tmp * oldr[oldk]; - out.real() += (1 - fabs(fb)) * smp.r[i] * pangainR; + out += (1 - fabs(fb)) * smp.r[i] * pangainR; oldr[oldk] = out; float r = out.real() * 10.0f * (fb + 0.1f); @@ -168,7 +168,7 @@ void Alienwah::setpreset(unsigned char npreset) for(int n = 0; n < PRESET_SIZE; ++n) changepar(n, presets[npreset][n]); if(insertion == 0) - changepar(0, presets[npreset][0] / 2); //lower the volume if this is system effect + changepar(0, presets[npreset][0] / 2); //lower the volume if this is system effect Ppreset = npreset; } diff --git a/src/Effects/CMakeLists.txt b/src/Effects/CMakeLists.txt @@ -1,19 +1,14 @@ set(zynaddsubfx_effect_SRCS - Alienwah.cpp - Chorus.cpp - Distorsion.cpp - DynamicFilter.cpp - Echo.cpp - Effect.cpp - EffectLFO.cpp - EffectMgr.cpp - EQ.cpp - Phaser.cpp - Reverb.cpp + Effects/Alienwah.cpp + Effects/Chorus.cpp + Effects/Distorsion.cpp + Effects/DynamicFilter.cpp + Effects/Echo.cpp + Effects/Effect.cpp + Effects/EffectLFO.cpp + Effects/EffectMgr.cpp + Effects/EQ.cpp + Effects/Phaser.cpp + Effects/Reverb.cpp + PARENT_SCOPE ) - -add_library(zynaddsubfx_effect STATIC - ${zynaddsubfx_effect_SRCS} - ) - -target_link_libraries(zynaddsubfx_effect) diff --git a/src/Effects/Chorus.cpp b/src/Effects/Chorus.cpp @@ -28,8 +28,8 @@ using namespace std; Chorus::Chorus(bool insertion_, float *const efxoutl_, float *efxoutr_) :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), - maxdelay((int)(MAX_CHORUS_DELAY / 1000.0f * synth->samplerate_f)), - delaySample(new float[maxdelay], new float[maxdelay]) + maxdelay((int)(MAX_CHORUS_DELAY / 1000.0f * synth->samplerate_f)), + delaySample(new float[maxdelay], new float[maxdelay]) { dlk = 0; drk = 0; @@ -55,8 +55,9 @@ float Chorus::getdelay(float xlfo) //check if delay is too big (caused by bad setdelay() and setdepth() if((result + 0.5f) >= maxdelay) { - cerr << - "WARNING: Chorus.cpp::getdelay(..) too big delay (see setdelay and setdepth funcs.)" + cerr + << + "WARNING: Chorus.cpp::getdelay(..) too big delay (see setdelay and setdepth funcs.)" << endl; result = maxdelay - 1.0f; } @@ -85,18 +86,20 @@ void Chorus::out(const Stereo<float *> &input) //Left channel //compute the delay in samples using linear interpolation between the lfo delays - float mdel = (dl1 * (synth->buffersize - i) + dl2 * i) / synth->buffersize_f; + float mdel = + (dl1 * (synth->buffersize - i) + dl2 * i) / synth->buffersize_f; if(++dlk >= maxdelay) dlk = 0; float tmp = dlk - mdel + maxdelay * 2.0f; //where should I get the sample from - F2I(tmp, dlhi); + dlhi = (int) tmp; dlhi %= maxdelay; - float dlhi2 = (dlhi - 1 + maxdelay) % maxdelay; - float dllo = 1.0f - fmod(tmp, one); - efxoutl[i] = cinterpolate(delaySample.l, maxdelay, dlhi2) * dllo + - cinterpolate(delaySample.l, maxdelay, dlhi) * (1.0f - dllo); + float dlhi2 = (dlhi - 1 + maxdelay) % maxdelay; + float dllo = 1.0f - fmod(tmp, one); + efxoutl[i] = cinterpolate(delaySample.l, maxdelay, dlhi2) * dllo + + cinterpolate(delaySample.l, maxdelay, + dlhi) * (1.0f - dllo); delaySample.l[dlk] = inL + efxoutl[i] * fb; //Right channel @@ -107,13 +110,14 @@ void Chorus::out(const Stereo<float *> &input) drk = 0; tmp = drk * 1.0f - mdel + maxdelay * 2.0f; //where should I get the sample from - F2I(tmp, dlhi); + dlhi = (int) tmp; dlhi %= maxdelay; - dlhi2 = (dlhi - 1 + maxdelay) % maxdelay; - dllo = 1.0f - fmodf(tmp, one); - efxoutr[i] = cinterpolate(delaySample.r, maxdelay, dlhi2) * dllo + - cinterpolate(delaySample.r, maxdelay, dlhi) * (1.0f - dllo); + dlhi2 = (dlhi - 1 + maxdelay) % maxdelay; + dllo = 1.0f - fmodf(tmp, one); + efxoutr[i] = cinterpolate(delaySample.r, maxdelay, dlhi2) * dllo + + cinterpolate(delaySample.r, maxdelay, + dlhi) * (1.0f - dllo); delaySample.r[dlk] = inR + efxoutr[i] * fb; } diff --git a/src/Effects/Chorus.h b/src/Effects/Chorus.h @@ -98,8 +98,8 @@ class Chorus:public Effect float depth, delay, fb; float dl1, dl2, dr1, dr2, lfol, lfor; int maxdelay; - Stereo<float*> delaySample; - int dlk, drk, dlhi; + Stereo<float *> delaySample; + int dlk, drk, dlhi; float getdelay(float xlfo); }; diff --git a/src/Effects/Distorsion.cpp b/src/Effects/Distorsion.cpp @@ -27,15 +27,15 @@ Distorsion::Distorsion(bool insertion_, float *efxoutl_, float *efxoutr_) :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), - Pvolume(50), - Pdrive(90), - Plevel(64), - Ptype(0), - Pnegate(0), - Plpf(127), - Phpf(0), - Pstereo(0), - Pprefiltering(0) + Pvolume(50), + Pdrive(90), + Plevel(64), + Ptype(0), + Pnegate(0), + Plpf(127), + Phpf(0), + Pstereo(0), + Pprefiltering(0) { lpfl = new AnalogFilter(2, 22000, 1, 0); lpfr = new AnalogFilter(2, 22000, 1, 0); @@ -175,7 +175,7 @@ void Distorsion::setpreset(unsigned char npreset) for(int n = 0; n < PRESET_SIZE; ++n) changepar(n, presets[npreset][n]); if(!insertion) //lower the volume if this is system effect - changepar(0, (int) (presets[npreset][0] / 1.5f)); + changepar(0, (int) (presets[npreset][0] / 1.5f)); Ppreset = npreset; cleanup(); } @@ -201,7 +201,7 @@ void Distorsion::changepar(int npar, unsigned char value) break; case 5: if(value > 13) - Ptype = 13; //this must be increased if more distorsion types are added + Ptype = 13; //this must be increased if more distorsion types are added else Ptype = value; break; diff --git a/src/Effects/Distorsion.h b/src/Effects/Distorsion.h @@ -55,7 +55,7 @@ class Distorsion:public Effect void sethpf(unsigned char _Phpf); //Real Parameters - class AnalogFilter *lpfl, *lpfr, *hpfl, *hpfr; + class AnalogFilter * lpfl, *lpfr, *hpfl, *hpfr; }; #endif diff --git a/src/Effects/DynamicFilter.h b/src/Effects/DynamicFilter.h @@ -58,7 +58,7 @@ class DynamicFilter:public Effect //Internal Values float depth, ampsns, ampsmooth; - class Filter *filterl, *filterr; + class Filter * filterl, *filterr; float ms1, ms2, ms3, ms4; //mean squares }; diff --git a/src/Effects/EQ.cpp b/src/Effects/EQ.cpp @@ -116,7 +116,7 @@ void EQ::changepar(int npar, unsigned char value) case 0: filter[nb].Ptype = value; if(value > 9) - filter[nb].Ptype = 0; //has to be changed if more filters will be added + filter[nb].Ptype = 0; //has to be changed if more filters will be added if(filter[nb].Ptype != 0) { filter[nb].l->settype(value - 1); filter[nb].r->settype(value - 1); diff --git a/src/Effects/EQ.h b/src/Effects/EQ.h @@ -30,7 +30,7 @@ class EQ:public Effect { public: EQ(bool insertion_, float *efxoutl_, float *efxoutr_); - ~EQ() {}; + ~EQ() {} void out(const Stereo<float *> &smp); void setpreset(unsigned char npreset); void changepar(int npar, unsigned char value); @@ -48,7 +48,7 @@ class EQ:public Effect //parameters unsigned char Ptype, Pfreq, Pgain, Pq, Pstages; //internal values - class AnalogFilter *l, *r; + class AnalogFilter * l, *r; } filter[MAX_EQ_BANDS]; }; diff --git a/src/Effects/Echo.cpp b/src/Effects/Echo.cpp @@ -98,9 +98,9 @@ void Echo::out(const Stereo<float *> &input) //LowPass Filter old.l = delay.l[(pos.l + delta.l) % (MAX_DELAY * synth->samplerate)] = - ldl * hidamp + old.l * (1.0f - hidamp); + ldl * hidamp + old.l * (1.0f - hidamp); old.r = delay.r[(pos.r + delta.r) % (MAX_DELAY * synth->samplerate)] = - rdl * hidamp + old.r * (1.0f - hidamp); + rdl * hidamp + old.r * (1.0f - hidamp); //increment ++pos.l; // += delta.l; @@ -184,7 +184,7 @@ void Echo::setpreset(unsigned char npreset) for(int n = 0; n < PRESET_SIZE; ++n) changepar(n, presets[npreset][n]); if(insertion) - setvolume(presets[npreset][0] / 2); //lower the volume if this is insertion effect + setvolume(presets[npreset][0] / 2); //lower the volume if this is insertion effect Ppreset = npreset; } diff --git a/src/Effects/Effect.cpp b/src/Effects/Effect.cpp @@ -26,12 +26,12 @@ #include <cmath> Effect::Effect(bool insertion_, float *efxoutl_, float *efxoutr_, - FilterParams *filterpars_, unsigned char Ppreset_) + FilterParams *filterpars_, unsigned char Ppreset_) :Ppreset(Ppreset_), - efxoutl(efxoutl_), - efxoutr(efxoutr_), - filterpars(filterpars_), - insertion(insertion_) + efxoutl(efxoutl_), + efxoutr(efxoutr_), + filterpars(filterpars_), + insertion(insertion_) {} void Effect::out(float *const smpsl, float *const smpsr) diff --git a/src/Effects/Effect.h b/src/Effects/Effect.h @@ -43,7 +43,7 @@ class Effect * @param Ppreset_ chosen preset * @return Initialized Effect object*/ Effect(bool insertion_, float *efxoutl_, float *efxoutr_, - FilterParams *filterpars_, unsigned char Ppreset_); + FilterParams *filterpars_, unsigned char Ppreset_); virtual ~Effect() {} /** * Choose a preset @@ -76,7 +76,7 @@ class Effect unsigned char Ppreset; /**<Currently used preset*/ float *const efxoutl; /**<Effect out Left Channel*/ float *const efxoutr; /**<Effect out Right Channel*/ - float outvolume;/**<This is the volume of effect and is public because + float outvolume; /**<This is the volume of effect and is public because * it is needed in system effects. * The out volume of such effects are always 1.0f, so * this setting tells me how is the volume to the diff --git a/src/Effects/EffectLFO.cpp b/src/Effects/EffectLFO.cpp @@ -27,16 +27,16 @@ EffectLFO::EffectLFO(void) :Pfreq(40), - Prandomness(0), - PLFOtype(0), - Pstereo(64), - xl(0.0f), - xr(0.0f), - ampl1(RND), - ampl2(RND), - ampr1(RND), - ampr2(RND), - lfornd(0.0f) + Prandomness(0), + PLFOtype(0), + Pstereo(64), + xl(0.0f), + xr(0.0f), + ampl1(RND), + ampl2(RND), + ampr1(RND), + ampr2(RND), + lfornd(0.0f) { updateparams(); } @@ -49,13 +49,13 @@ void EffectLFO::updateparams(void) float lfofreq = (powf(2.0f, Pfreq / 127.0f * 10.0f) - 1.0f) * 0.03f; incx = fabsf(lfofreq) * synth->buffersize_f / synth->samplerate_f; if(incx > 0.49999999f) - incx = 0.499999999f; //Limit the Frequency + incx = 0.499999999f; //Limit the Frequency lfornd = Prandomness / 127.0f; lfornd = (lfornd > 1.0f) ? 1.0f : lfornd; if(PLFOtype > 1) - PLFOtype = 1; //this has to be updated if more lfo's are added + PLFOtype = 1; //this has to be updated if more lfo's are added lfotype = PLFOtype; xr = fmodf(xl + (Pstereo - 64.0f) / 127.0f + 1.0f, 1.0f); } @@ -75,7 +75,7 @@ float EffectLFO::getlfoshape(float x) else out = 4.0f * x - 4.0f; break; - //when adding more, ensure ::updateparams() gets updated + //when adding more, ensure ::updateparams() gets updated default: out = cosf(x * 2.0f * PI); //EffectLFO_SINE } diff --git a/src/Effects/EffectMgr.cpp b/src/Effects/EffectMgr.cpp @@ -176,14 +176,13 @@ unsigned char EffectMgr::geteffectpar(int npar) void EffectMgr::out(float *smpsl, float *smpsr) { if(!efx) { - if(!insertion) { + if(!insertion) for(int i = 0; i < synth->buffersize; ++i) { smpsl[i] = 0.0f; smpsr[i] = 0.0f; efxoutl[i] = 0.0f; efxoutr[i] = 0.0f; } - } return; } for(int i = 0; i < synth->buffersize; ++i) { @@ -214,7 +213,7 @@ void EffectMgr::out(float *smpsl, float *smpsr) v2 = 1.0f; } if((nefx == 1) || (nefx == 2)) - v2 *= v2; //for Reverb and Echo, the wet function is not liniar + v2 *= v2; //for Reverb and Echo, the wet function is not liniar if(dryonly) //this is used for instrument effect only for(int i = 0; i < synth->buffersize; ++i) { diff --git a/src/Effects/EffectMgr.h b/src/Effects/EffectMgr.h @@ -69,7 +69,7 @@ class EffectMgr:public Presets unsigned char geteffectpar(int npar); const bool insertion; - float *efxoutl, *efxoutr; + float *efxoutl, *efxoutr; // used by UI float getEQfreqresponse(float freq); @@ -80,7 +80,7 @@ class EffectMgr:public Presets int nefx; Effect *efx; pthread_mutex_t *mutex; - bool dryonly; + bool dryonly; }; #endif diff --git a/src/Effects/Reverb.cpp b/src/Effects/Reverb.cpp @@ -29,7 +29,7 @@ //todo: EarlyReflections, Prdelay, Perbalance Reverb::Reverb(bool insertion_, float *efxoutl_, float *efxoutr_) - :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), + :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0), // defaults Pvolume(48), Ptime(64), @@ -152,7 +152,7 @@ void Reverb::out(const Stereo<float *> &smp) for(int i = 0; i < synth->buffersize; ++i) inputbuf[i] = (smp.l[i] + smp.r[i]) / 2.0f; - if(idelay) { + if(idelay) for(int i = 0; i < synth->buffersize; ++i) { //Initial delay r float tmp = inputbuf[i] + idelay[idelayk] * idelayfb; @@ -162,7 +162,6 @@ void Reverb::out(const Stereo<float *> &smp) if(idelayk >= idelaylen) idelayk = 0; } - } if(bandwidth) bandwidth->process(synth->buffersize, inputbuf); @@ -357,10 +356,13 @@ void Reverb::settype(unsigned char _Ptype) delete bandwidth; bandwidth = NULL; if(Ptype == 2) { //bandwidth + //TODO the size of the unison buffer may be too small, though this has + //not been verified yet. + //As this cannot be resized in a RT context, a good upper bound should + //be found bandwidth = new Unison(synth->buffersize / 4 + 1, 2.0f); bandwidth->setSize(50); bandwidth->setBaseFrequency(1.0f); -#warning sa schimb size-ul } settime(Ptime); cleanup(); @@ -370,7 +372,7 @@ void Reverb::setroomsize(unsigned char _Proomsize) { Proomsize = _Proomsize; if(!Proomsize) - this->Proomsize = 64; //this is because the older versions consider roomsize=0 + this->Proomsize = 64; //this is because the older versions consider roomsize=0 roomsize = (this->Proomsize - 64.0f) / 64.0f; if(roomsize > 0.0f) roomsize *= 2.0f; @@ -425,7 +427,7 @@ void Reverb::setpreset(unsigned char npreset) for(int n = 0; n < PRESET_SIZE; ++n) changepar(n, presets[npreset][n]); if(insertion) - changepar(0, presets[npreset][0] / 2); //lower the volume if reverb is insertion effect + changepar(0, presets[npreset][0] / 2); //lower the volume if reverb is insertion effect Ppreset = npreset; } diff --git a/src/Effects/Reverb.h b/src/Effects/Reverb.h @@ -72,16 +72,16 @@ class Reverb:public Effect float erbalance; //Parameters - int lohidamptype; //0=disable, 1=highdamp (lowpass), 2=lowdamp (highpass) - int idelaylen, rdelaylen; - int idelayk; - float lohifb; - float idelayfb; - float roomsize; - float rs; //rs is used to "normalise" the volume according to the roomsize - int comblen[REV_COMBS * 2]; - int aplen[REV_APS * 2]; - class Unison *bandwidth; + int lohidamptype; //0=disable, 1=highdamp (lowpass), 2=lowdamp (highpass) + int idelaylen, rdelaylen; + int idelayk; + float lohifb; + float idelayfb; + float roomsize; + float rs; //rs is used to "normalise" the volume according to the roomsize + int comblen[REV_COMBS * 2]; + int aplen[REV_APS * 2]; + class Unison * bandwidth; //Internal Variables float *comb[REV_COMBS * 2]; @@ -91,8 +91,7 @@ class Reverb:public Effect float *ap[REV_APS * 2]; int apk[REV_APS * 2]; float *idelay; - class AnalogFilter *lpf, *hpf; //filters - + class AnalogFilter * lpf, *hpf; //filters }; #endif diff --git a/src/Misc/Atomic.cpp b/src/Misc/Atomic.cpp @@ -1,70 +0,0 @@ -/* - ZynAddSubFX - a software synthesizer - - Atomic.cpp - Simple Atomic operation wrapper - Copyright (C) 2009-2009 Mark McCurry - Author: Mark McCurry - - This program is free software; you can redistribute it and/or modify - it under the terms of version 2 of the GNU General Public License - as published by the Free Software Foundation. - - 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 (version 2 or later) for more details. - - You should have received a copy of the GNU General Public License (version 2) - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -template<class T> -Atomic<T>::Atomic(const T &val) - :value(val) -{ - pthread_mutex_init(&mutex, NULL); -} - -template<class T> -Atomic<T>::~Atomic() -{ - pthread_mutex_destroy(&mutex); -} - -template<class T> -void Atomic<T>::operator=(const T &nval) -{ - pthread_mutex_lock(&mutex); - value = nval; - pthread_mutex_unlock(&mutex); -} - -template<class T> -T Atomic<T>::operator()() const -{ - T tmp; - pthread_mutex_lock(&mutex); - tmp = value; - pthread_mutex_unlock(&mutex); - return tmp; -} - -template<class T> -T Atomic<T>::operator++() -{ - T tmp; - pthread_mutex_lock(&mutex); - tmp = ++value; - pthread_mutex_unlock(&mutex); - return tmp; -} - -template<class T> -T Atomic<T>::operator--() { - T tmp; - pthread_mutex_lock(&mutex); - tmp = --value; - pthread_mutex_unlock(&mutex); - return tmp; -} diff --git a/src/Misc/Atomic.h b/src/Misc/Atomic.h @@ -1,45 +0,0 @@ -/* - ZynAddSubFX - a software synthesizer - - Atomic.h - Simple Atomic operation wrapper - Copyright (C) 2009-2009 Mark McCurry - Author: Mark McCurry - - This program is free software; you can redistribute it and/or modify - it under the terms of version 2 of the GNU General Public License - as published by the Free Software Foundation. - - 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 (version 2 or later) for more details. - - You should have received a copy of the GNU General Public License (version 2) - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#ifndef ATOM_H -#define ATOM_H - -#include <pthread.h> - -/**Very simple threaded value container*/ -template<class T> -class Atomic -{ - public: - /**Initializes Atom - * @param val the value of the atom*/ - Atomic(const T &val); - ~Atomic(); - - void operator=(const T &val); - T operator()() const; - T operator++(); - T operator--(); - private: - mutable pthread_mutex_t mutex; - T value; -}; -#include "Atomic.cpp" -#endif diff --git a/src/Misc/Bank.cpp b/src/Misc/Bank.cpp @@ -91,6 +91,7 @@ void Bank::setname(unsigned int ninstrument, const string &newname, int newslot) string newfilename; char tmpfilename[100 + 1]; + tmpfilename[100] = 0; if(newslot >= 0) snprintf(tmpfilename, 100, "%4d-%s", newslot + 1, newname.c_str()); @@ -107,7 +108,7 @@ void Bank::setname(unsigned int ninstrument, const string &newname, int newslot) rename(ins[ninstrument].filename.c_str(), newfilename.c_str()); ins[ninstrument].filename = newfilename; - ins[ninstrument].name = legalizeFilename(tmpfilename); //TODO limit name to PART_MAX_NAME_LEN + ins[ninstrument].name = newname; } /* @@ -164,7 +165,7 @@ void Bank::savetoslot(unsigned int ninstrument, Part *part) remove(filename.c_str()); part->saveXML(filename.c_str()); - addtobank(ninstrument, legalizeFilename(tmpfilename), (char *) part->Pname); + addtobank(ninstrument, legalizeFilename(tmpfilename) + ".xiz", (char *) part->Pname); } /* @@ -175,6 +176,7 @@ void Bank::loadfromslot(unsigned int ninstrument, Part *part) if(emptyslot(ninstrument)) return; + part->AllNotesOff(); part->defaultsinstrument(); part->loadXMLinstrument(ins[ninstrument].filename.c_str()); @@ -219,7 +221,7 @@ int Bank::loadbank(string bankdirname) } if((startname + 1) < strlen(filename)) - startname++; //to take out the "-" + startname++; //to take out the "-" string name = filename; @@ -408,7 +410,7 @@ int Bank::addtobank(int pos, string filename, string name) { if((pos >= 0) && (pos < BANK_SIZE)) { if(ins[pos].used) - pos = -1; //force it to find a new free position + pos = -1; //force it to find a new free position } else if(pos >= BANK_SIZE) @@ -423,7 +425,7 @@ int Bank::addtobank(int pos, string filename, string name) } if(pos < 0) - return -1; //the bank is full + return -1; //the bank is full deletefrombank(pos); diff --git a/src/Misc/Bank.h b/src/Misc/Bank.h @@ -49,9 +49,9 @@ class Bank /**Empties out the selected slot*/ void clearslot(unsigned int ninstrument); /**Saves the given Part to slot*/ - void savetoslot(unsigned int ninstrument, class Part *part); + void savetoslot(unsigned int ninstrument, class Part * part); /**Loads the given slot into a Part*/ - void loadfromslot(unsigned int ninstrument, class Part *part); + void loadfromslot(unsigned int ninstrument, class Part * part); /**Swaps Slots*/ void swapslot(unsigned int n1, unsigned int n2); diff --git a/src/Misc/CMakeLists.txt b/src/Misc/CMakeLists.txt @@ -1,25 +1,28 @@ include_directories(${MXML_INCLUDE_DIR}) set(zynaddsubfx_misc_SRCS - Bank.cpp - Config.cpp - Dump.cpp - Master.cpp - Microtonal.cpp - Part.cpp - Util.cpp - XMLwrapper.cpp - Recorder.cpp - WavFile.cpp - WaveShapeSmps.cpp + Misc/Bank.cpp + Misc/Config.cpp + Misc/Dump.cpp + Misc/Master.cpp + Misc/Microtonal.cpp + Misc/Part.cpp + Misc/Util.cpp + Misc/XMLwrapper.cpp + Misc/Recorder.cpp + Misc/WavFile.cpp + Misc/WaveShapeSmps.cpp ) -if(LashEnable) - set(zynaddsubfx_misc_SRCS ${zynaddsubfx_misc_SRCS} LASHClient.cpp) -endif() -add_library(zynaddsubfx_misc STATIC - ${zynaddsubfx_misc_SRCS} - ) -target_link_libraries(zynaddsubfx_misc zynaddsubfx_nio) +if(LashEnable) + set(zynaddsubfx_misc_SRCS + ${zynaddsubfx_misc_SRCS} + Misc/LASHClient.cpp + PARENT_SCOPE) +else() + set(zynaddsubfx_misc_SRCS + ${zynaddsubfx_misc_SRCS} + PARENT_SCOPE) +endif() diff --git a/src/Misc/Dump.cpp b/src/Misc/Dump.cpp @@ -38,9 +38,11 @@ Dump::~Dump() { if(file != NULL) { int duration = tick * synth->buffersize_f / synth->samplerate_f; - fprintf(file, + fprintf( + file, "\n# statistics: duration = %d seconds; keyspressed = %d\n\n\n\n", - duration, keyspressed); + duration, + keyspressed); fclose(file); } } @@ -86,7 +88,7 @@ void Dump::dumpnote(char chan, char note, char vel) if(vel == 0) fprintf(file, "n %d -> %d %d \n", tick, chan, note); //note off else - fprintf(file, "N %d -> %d %d %d \n", tick, chan, note, vel); //note on + fprintf(file, "N %d -> %d %d %d \n", tick, chan, note, vel); //note on if(vel != 0) keyspressed++; diff --git a/src/Misc/Master.cpp b/src/Misc/Master.cpp @@ -42,12 +42,18 @@ using namespace std; vuData::vuData(void) :outpeakl(0.0f), outpeakr(0.0f), maxoutpeakl(0.0f), maxoutpeakr(0.0f), - rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) + rmspeakl(0.0f), rmspeakr(0.0f), clipped(0) {} +static Master* masterInstance = NULL; + Master::Master() { swaplr = 0; + off = 0; + smps = 0; + bufl = new float[synth->buffersize]; + bufr = new float[synth->buffersize]; pthread_mutex_init(&mutex, NULL); pthread_mutex_init(&vumutex, NULL); @@ -121,11 +127,19 @@ bool Master::mutexLock(lockset request) Master &Master::getInstance() { - static Master *instance = NULL; - if(!instance) - instance = new Master; + if (!masterInstance) + masterInstance = new Master; + + return *masterInstance; +} - return *instance; +void Master::deleteInstance() +{ + if (masterInstance) + { + delete masterInstance; + masterInstance = NULL; + } } /* @@ -157,6 +171,22 @@ void Master::noteOff(char chan, char note) } /* + * Pressure Messages (velocity=0 for NoteOff) + */ +void Master::polyphonicAftertouch(char chan, char note, char velocity) +{ + if(velocity) { + for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) + if(chan == part[npart]->Prcvchn) + if(part[npart]->Penabled) + part[npart]->PolyphonicAftertouch(note, velocity, keyshift); + + } + else + this->noteOff(chan, note); +} + +/* * Controllers */ void Master::setController(char chan, int type, int par) @@ -182,7 +212,8 @@ void Master::setController(char chan, int type, int par) } ; } - else if(type == C_bankselectmsb) { // Change current bank + else + if(type == C_bankselectmsb) { // Change current bank if(((unsigned int)par < bank.banks.size()) && (bank.banks[par].dir != bank.bankfiletitle)) bank.loadbank(bank.banks[par].dir); @@ -204,7 +235,7 @@ void Master::setController(char chan, int type, int par) void Master::setProgram(char chan, unsigned int pgm) { - for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) { + for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) if(chan == part[npart]->Prcvchn) { bank.loadfromslot(pgm, part[npart]); @@ -215,7 +246,6 @@ void Master::setProgram(char chan, unsigned int pgm) part[npart]->applyparameters(); pthread_mutex_lock(&mutex); } - } } void Master::vuUpdate(const float *outl, const float *outr) @@ -302,9 +332,12 @@ void Master::AudioOut(float *outl, float *outr) memset(outr, 0, synth->bufferbytes); //Compute part samples and store them part[npart]->partoutl,partoutr - for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) - if(part[npart]->Penabled != 0) + for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) { + if(part[npart]->Penabled != 0 && !pthread_mutex_trylock(&part[npart]->load_mutex)) { part[npart]->ComputePartSmps(); + pthread_mutex_unlock(&part[npart]->load_mutex); + } + } //Insertion effects for(int nefx = 0; nefx < NUM_INS_EFX; ++nefx) @@ -356,7 +389,7 @@ void Master::AudioOut(float *outl, float *outr) //System effects for(int nefx = 0; nefx < NUM_SYS_EFX; ++nefx) { if(sysefx[nefx]->geteffect() == 0) - continue; //the effect is disabled + continue; //the effect is disabled float *tmpmixl = getTmpBuffer(); float *tmpmixr = getTmpBuffer(); @@ -449,15 +482,10 @@ void Master::AudioOut(float *outl, float *outr) //TODO review the respective code from yoshimi for this //If memory serves correctly, libsamplerate was used void Master::GetAudioOutSamples(size_t nsamples, - int samplerate, + unsigned samplerate, float *outl, float *outr) { - static float *bufl = new float[synth->buffersize], - *bufr = new float[synth->buffersize]; - static off_t off = 0; - static size_t smps = 0; - off_t out_off = 0; //Fail when resampling rather than doing a poor job @@ -471,14 +499,13 @@ void Master::GetAudioOutSamples(size_t nsamples, if(nsamples >= smps) { memcpy(outl + out_off, bufl + off, sizeof(float) * smps); memcpy(outr + out_off, bufr + off, sizeof(float) * smps); + nsamples -= smps; //generate samples AudioOut(bufl, bufr); off = 0; - smps = synth->buffersize; - out_off += smps; - nsamples -= smps; + smps = synth->buffersize; } else { //use some samples memcpy(outl + out_off, bufl + off, sizeof(float) * nsamples); @@ -492,6 +519,9 @@ void Master::GetAudioOutSamples(size_t nsamples, Master::~Master() { + delete []bufl; + delete []bufr; + for(int npart = 0; npart < NUM_MIDI_PARTS; ++npart) delete part[npart]; for(int nefx = 0; nefx < NUM_INS_EFX; ++nefx) @@ -500,7 +530,6 @@ Master::~Master() delete sysefx[nefx]; delete fft; - FFT_cleanup(); pthread_mutex_destroy(&mutex); pthread_mutex_destroy(&vumutex); diff --git a/src/Misc/Master.h b/src/Misc/Master.h @@ -58,6 +58,7 @@ class Master ~Master(); static Master &getInstance(); + static void deleteInstance(); /**Saves all settings to a XML file * @return 0 for ok or <0 if there is an error*/ @@ -91,6 +92,7 @@ class Master //Midi IN void noteOn(char chan, char note, char velocity); void noteOff(char chan, char note); + void polyphonicAftertouch(char chan, char note, char velocity); void setController(char chan, int type, int par); void setProgram(char chan, unsigned int pgm); //void NRPN... @@ -105,7 +107,7 @@ class Master void AudioOut(float *outl, float *outr); /**Audio Output (for callback mode). This allows the program to be controled by an external program*/ void GetAudioOutSamples(size_t nsamples, - int samplerate, + unsigned samplerate, float *outl, float *outr); @@ -113,7 +115,7 @@ class Master void partonoff(int npart, int what); /**parts \todo see if this can be made to be dynamic*/ - class Part *part[NUM_MIDI_PARTS]; + class Part * part[NUM_MIDI_PARTS]; //parameters @@ -129,8 +131,8 @@ class Master void setPsysefxsend(int Pefxfrom, int Pefxto, char Pvol); //effects - class EffectMgr *sysefx[NUM_SYS_EFX]; //system - class EffectMgr *insefx[NUM_INS_EFX]; //insertion + class EffectMgr * sysefx[NUM_SYS_EFX]; //system + class EffectMgr * insefx[NUM_INS_EFX]; //insertion // void swapcopyeffects(int what,int type,int neff1,int neff2); //HDD recorder @@ -157,7 +159,7 @@ class Master Microtonal microtonal; Bank bank; - class FFTwrapper *fft; + class FFTwrapper * fft; pthread_mutex_t mutex; pthread_mutex_t vumutex; @@ -169,6 +171,12 @@ class Master float sysefxvol[NUM_SYS_EFX][NUM_MIDI_PARTS]; float sysefxsend[NUM_SYS_EFX][NUM_SYS_EFX]; int keyshift; + + //information relevent to generating plugin audio samples + float *bufl; + float *bufr; + off_t off; + size_t smps; }; #endif diff --git a/src/Misc/Microtonal.cpp b/src/Misc/Microtonal.cpp @@ -186,8 +186,8 @@ float Microtonal::getnotefreq(int note, int keyshift) const float oct = octave[octavesize - 1].tuning; float freq = - octave[(ntkey + octavesize - 1) % octavesize].tuning *powf(oct, - ntoct) + octave[(ntkey + octavesize - 1) % octavesize].tuning * powf(oct, + ntoct) * PAfreq; if(ntkey == 0) freq /= oct; @@ -209,11 +209,11 @@ bool Microtonal::operator!=(const Microtonal &micro) const //A simple macro to test equality MiCRotonal EQuals (not the perfect //approach, but good enough) #define MCREQ(x) if(x != micro.x) \ - return true; + return true //for floats #define FMCREQ(x) if(!((x < micro.x + 0.0001f) && (x > micro.x - 0.0001f))) \ - return true; + return true MCREQ(Pinvertupdown); MCREQ(Pinvertupdowncenter); @@ -632,8 +632,14 @@ void Microtonal::getfromXML(XMLwrapper *xml) if(octave[i].x2 != 0) octave[i].type = 2; - else + else { octave[i].type = 1; + //populate fields for display + float x = logf(octave[i].tuning) / LOG_2 * 1200.0f; + octave[i].x1 = (int) floor(x); + octave[i].x2 = (int) (floor(fmodf(x, 1.0f) * 1e6)); + } + xml->exitbranch(); } diff --git a/src/Misc/Part.cpp b/src/Misc/Part.cpp @@ -41,6 +41,7 @@ Part::Part(Microtonal *microtonal_, FFTwrapper *fft_, pthread_mutex_t *mutex_) microtonal = microtonal_; fft = fft_; mutex = mutex_; + pthread_mutex_init(&load_mutex, NULL); partoutl = new float [synth->buffersize]; partoutr = new float [synth->buffersize]; @@ -227,7 +228,7 @@ void Part::NoteOn(unsigned char note, I'm not sure why though... */ if((partnote[lastpos].status != KEY_PLAYING) && (partnote[lastpos].status != KEY_RELASED_AND_SUSTAINED)) - ismonofirstnote = true; // No other keys are held or sustained. + ismonofirstnote = true; // No other keys are held or sustained. } else // Poly mode is On so just make sure the list is empty. @@ -394,7 +395,7 @@ void Part::NoteOn(unsigned char note, if((lastnotecopy < kit[item].Pminkey) || (lastnotecopy > kit[item].Pmaxkey)) - continue; // We will not perform legato across 2 key regions. + continue; // We will not perform legato across 2 key regions. partnote[pos].kititem[ci].sendtoparteffect = (kit[item].Psendtoparteffect < @@ -635,7 +636,7 @@ void Part::NoteOff(unsigned char note) //relase the key if((partnote[i].status == KEY_PLAYING) && (partnote[i].note == note)) { if(ctl.sustain.sustain == 0) { //the sustain pedal is not pushed if((Ppolymode == 0) && (not monomemnotes.empty())) - MonoMemRenote(); // To play most recent still held note. + MonoMemRenote(); // To play most recent still held note. else RelaseNotePos(i); /// break; @@ -645,6 +646,58 @@ void Part::NoteOff(unsigned char note) //relase the key } } +void Part::PolyphonicAftertouch(unsigned char note, + unsigned char velocity, + int masterkeyshift) +{ + (void) masterkeyshift; + if(!Pnoteon || (note < Pminkey) || (note > Pmaxkey)) + return; + if(Pdrummode) + return; + + // MonoMem stuff: + if(!Ppolymode) // if Poly is off + + monomem[note].velocity = velocity; // Store this note's velocity. + + + for(int i = 0; i < POLIPHONY; ++i) + if((partnote[i].note == note) && (partnote[i].status == KEY_PLAYING)) { + /* update velocity */ + // compute the velocity offset + float vel = + VelF(velocity / 127.0f, Pvelsns) + (Pveloffs - 64.0f) / 64.0f; + vel = (vel < 0.0f) ? 0.0f : vel; + vel = (vel > 1.0f) ? 1.0f : vel; + + if(!Pkitmode) { // "normal mode" + if(kit[0].Padenabled) + partnote[i].kititem[0].adnote->setVelocity(vel); + if(kit[0].Psubenabled) + partnote[i].kititem[0].subnote->setVelocity(vel); + if(kit[0].Ppadenabled) + partnote[i].kititem[0].padnote->setVelocity(vel); + } + else // "kit mode" + for(int item = 0; item < NUM_KIT_ITEMS; ++item) { + if(kit[item].Pmuted) + continue; + if((note < kit[item].Pminkey) + || (note > kit[item].Pmaxkey)) + continue; + + if(kit[item].Padenabled) + partnote[i].kititem[item].adnote->setVelocity(vel); + if(kit[item].Psubenabled) + partnote[i].kititem[item].subnote->setVelocity(vel); + if(kit[item].Ppadenabled) + partnote[i].kititem[item].padnote->setVelocity(vel); + } + } + +} + /* * Controllers */ @@ -745,7 +798,7 @@ void Part::RelaseSustainedKeys() // Let's call MonoMemRenote() on some conditions: if((Ppolymode == 0) && (not monomemnotes.empty())) if(monomemnotes.back() != lastnote) // Sustain controller manipulation would cause repeated same note respawn without this check. - MonoMemRenote(); // To play most recent still held note. + MonoMemRenote(); // To play most recent still held note. for(int i = 0; i < POLIPHONY; ++i) if(partnote[i].status == KEY_RELASED_AND_SUSTAINED) @@ -1001,7 +1054,7 @@ void Part::setPpanning(char Ppanning_) */ void Part::setkititemstatus(int kititem, int Penabled_) { - if((kititem == 0) && (kititem >= NUM_KIT_ITEMS)) + if((kititem == 0) || (kititem >= NUM_KIT_ITEMS)) return; //nonexistent kit item and the first kit item is always enabled kit[kititem].Penabled = Penabled_; diff --git a/src/Misc/Part.h b/src/Misc/Part.h @@ -56,6 +56,9 @@ class Part unsigned char velocity, int masterkeyshift); void NoteOff(unsigned char note); + void PolyphonicAftertouch(unsigned char note, + unsigned char velocity, + int masterkeyshift); void AllNotesOff(); //panic void SetController(unsigned int type, int par); void RelaseSustainedKeys(); //this is called when the sustain pedal is relased @@ -149,6 +152,7 @@ class Part pthread_mutex_t *mutex; + pthread_mutex_t load_mutex; int lastnote; @@ -166,8 +170,8 @@ class Part int itemsplaying; struct { SynthNote *adnote, - *subnote, - *padnote; + *subnote, + *padnote; int sendtoparteffect; } kititem[NUM_KIT_ITEMS]; int time; diff --git a/src/Misc/Recorder.cpp b/src/Misc/Recorder.cpp @@ -23,8 +23,7 @@ #include <sys/stat.h> #include "Recorder.h" #include "WavFile.h" -#include "../Nio/OutMgr.h" -#include "../Nio/WavEngine.h" +#include "../Nio/Nio.h" Recorder::Recorder() :status(0), notetrigger(0) @@ -46,7 +45,7 @@ int Recorder::preparefile(std::string filename_, int overwrite) return 1; } - OutMgr::getInstance(). wave->newFile(new WavFile(filename_, synth->samplerate, 2)); + Nio::waveNew(new WavFile(filename_, synth->samplerate, 2)); status = 1; //ready @@ -61,15 +60,15 @@ void Recorder::start() void Recorder::stop() { - OutMgr::getInstance(). wave->Stop(); - OutMgr::getInstance(). wave->destroyFile(); + Nio::waveStop(); + Nio::waveStart(); status = 0; } void Recorder::pause() { status = 0; - OutMgr::getInstance(). wave->Stop(); + Nio::waveStop(); } int Recorder::recording() @@ -84,9 +83,9 @@ void Recorder::triggernow() { if(status == 2) { if(notetrigger != 1) - OutMgr::getInstance().wave->Start(); + Nio::waveStart(); notetrigger = 1; } } -#warning todo move recorder inside nio system +//TODO move recorder inside nio system diff --git a/src/Misc/Util.cpp b/src/Misc/Util.cpp @@ -206,17 +206,17 @@ float SYNTH_T::numRandom() const float interpolate(const float *data, size_t len, float pos) { - assert(len > (size_t)pos+1); - const int l_pos = (int)pos, - r_pos = l_pos + 1; + assert(len > (size_t)pos + 1); + const int l_pos = (int)pos, + r_pos = l_pos + 1; const float leftness = pos - l_pos; return data[l_pos] * leftness + data[r_pos] * (1.0f - leftness); } float cinterpolate(const float *data, size_t len, float pos) { - const int l_pos = ((int)pos) % len, - r_pos = (l_pos + 1) % len; + const int l_pos = ((int)pos) % len, + r_pos = (l_pos + 1) % len; const float leftness = pos - l_pos; return data[l_pos] * leftness + data[r_pos] * (1.0f - leftness); } diff --git a/src/Misc/Util.h b/src/Misc/Util.h @@ -84,7 +84,7 @@ T stringTo(const char *x) template<class T> T limit(T val, T min, T max) { - return (val<min ? min : (val> max ? max : val)); + return val < min ? min : (val > max ? max : val); } //Random number generator @@ -93,7 +93,7 @@ typedef uint32_t prng_t; extern prng_t prng_state; // Portable Pseudo-Random Number Generator -inline prng_t prng_r(prng_t & p) +inline prng_t prng_r(prng_t &p) { return p = p * 1103515245 + 12345; } diff --git a/src/Misc/XMLwrapper.cpp b/src/Misc/XMLwrapper.cpp @@ -98,7 +98,7 @@ XMLwrapper::XMLwrapper() { version.Major = 2; version.Minor = 4; - version.Revision = 2; + version.Revision = 3; minimal = true; @@ -313,7 +313,7 @@ int XMLwrapper::loadXMLfile(const string &filename) const char *xmldata = doloadfile(filename.c_str()); if(xmldata == NULL) - return -1; //the file could not be loaded or uncompressed + return -1; //the file could not be loaded or uncompressed root = tree = mxmlLoadString(NULL, trimLeadingWhite( xmldata), MXML_OPAQUE_CALLBACK); @@ -321,7 +321,7 @@ int XMLwrapper::loadXMLfile(const string &filename) delete[] xmldata; if(tree == NULL) - return -2; //this is not XML + return -2; //this is not XML node = root = mxmlFindElement(tree, tree, @@ -330,7 +330,7 @@ int XMLwrapper::loadXMLfile(const string &filename) NULL, MXML_DESCEND); if(root == NULL) - return -3; //the XML doesnt embbed zynaddsubfx data + return -3; //the XML doesnt embbed zynaddsubfx data //fetch version information version.Major = stringTo<int>(mxmlElementGetAttr(root, "version-major")); diff --git a/src/Nio/AlsaEngine.cpp b/src/Nio/AlsaEngine.cpp @@ -136,6 +136,14 @@ void *AlsaEngine::MidiThread(void) InMgr::getInstance().putEvent(ev); break; + case SND_SEQ_EVENT_KEYPRESS: + ev.type = M_PRESSURE; + ev.channel = event->data.note.channel; + ev.num = event->data.note.note; + ev.value = event->data.note.velocity; + InMgr::getInstance().putEvent(ev); + break; + case SND_SEQ_EVENT_PITCHBEND: ev.type = M_CONTROLLER; ev.channel = event->data.control.channel; diff --git a/src/Nio/CMakeLists.txt b/src/Nio/CMakeLists.txt @@ -17,15 +17,8 @@ set(zynaddsubfx_nio_SRCS set(zynaddsubfx_nio_lib ) -if (DefaultOutput STREQUAL alsa) - add_definitions(-DALSA_DEFAULT=1) -elseif(DefaultOutput STREQUAL oss) - add_definitions(-DOSS_DEFAULT=1) -elseif(DefaultOutput STREQUAL jack) - add_definitions(-DJACK_DEFAULT=1) -elseif(DefaultOutput STREQUAL portaudio) - add_definitions(-DPORTAUDIO_DEFAULT=1) -endif() +add_definitions(-DOUT_DEFAULT="${DefaultOutput}") +add_definitions(-DIN_DEFAULT="${DefaultInput}") if(JackEnable) include_directories(${JACK_INCLUDE_DIR}) @@ -52,5 +45,3 @@ endif(OssEnable) add_library(zynaddsubfx_nio STATIC ${zynaddsubfx_nio_SRCS} ) - -target_link_libraries(zynaddsubfx_nio zynaddsubfx_misc) #for WavFile diff --git a/src/Nio/EngineMgr.cpp b/src/Nio/EngineMgr.cpp @@ -31,45 +31,30 @@ EngineMgr &EngineMgr::getInstance() EngineMgr::EngineMgr() { - Engine *defaultEng = NULL; + Engine *defaultEng = new NulEngine(); //conditional compiling mess (but contained) - engines.push_back(defaultEng = new NulEngine()); + engines.push_back(defaultEng); #if OSS -#if OSS_DEFAULT - engines.push_back(defaultEng = new OssEngine()); -#else engines.push_back(new OssEngine()); #endif -#endif #if ALSA -#if ALSA_DEFAULT - engines.push_back(defaultEng = new AlsaEngine()); -#else engines.push_back(new AlsaEngine()); #endif -#endif #if JACK -#if JACK_DEFAULT - engines.push_back(defaultEng = new JackEngine()); -#else engines.push_back(new JackEngine()); #endif engines.push_back(new JackMultiEngine()); #endif #if PORTAUDIO -#if PORTAUDIO_DEFAULT - engines.push_back(defaultEng = new PaEngine()); -#else engines.push_back(new PaEngine()); #endif -#endif defaultOut = dynamic_cast<AudioOut *>(defaultEng); defaultIn = dynamic_cast<MidiIn *>(defaultEng); - //Accept command line options + //Accept command line/compile time options if(!Nio::defaultSink.empty()) setOutDefault(Nio::defaultSink); @@ -152,7 +137,8 @@ bool EngineMgr::setInDefault(string name) } //Warn user - cerr << "Error: " << name << " is not a recognized MIDI input source" << endl; + cerr << "Error: " << name << " is not a recognized MIDI input source" + << endl; cerr << " Defaulting to the NULL input source" << endl; return false; diff --git a/src/Nio/InMgr.cpp b/src/Nio/InMgr.cpp @@ -9,22 +9,22 @@ using namespace std; ostream &operator<<(ostream &out, const MidiEvent &ev) { switch(ev.type) { - case M_NOTE: - out << "MidiNote: note(" << ev.num << ")\n" + case M_NOTE: + out << "MidiNote: note(" << ev.num << ")\n" << " channel(" << ev.channel << ")\n" << " velocity(" << ev.value << ")"; - break; + break; - case M_CONTROLLER: - out << "MidiCtl: controller(" << ev.num << ")\n" + case M_CONTROLLER: + out << "MidiCtl: controller(" << ev.num << ")\n" << " channel(" << ev.channel << ")\n" << " value(" << ev.value << ")"; - break; + break; - case M_PGMCHANGE: - out << "PgmChange: program(" << ev.num << ")\n" + case M_PGMCHANGE: + out << "PgmChange: program(" << ev.num << ")\n" << " channel(" << ev.channel << ")"; - break; + break; } return out; @@ -66,26 +66,29 @@ void InMgr::flush() MidiEvent ev; while(!sem_trywait(&work)) { queue.pop(ev); - cout << ev << endl; + //cout << ev << endl; switch(ev.type) { - case M_NOTE: - dump.dumpnote(ev.channel, ev.num, ev.value); - - if(ev.value) - master.noteOn(ev.channel, ev.num, ev.value); - else - master.noteOff(ev.channel, ev.num); - break; - - case M_CONTROLLER: - dump.dumpcontroller(ev.channel, ev.num, ev.value); - master.setController(ev.channel, ev.num, ev.value); - break; - - case M_PGMCHANGE: - master.setProgram(ev.channel, ev.num); - break; + case M_NOTE: + dump.dumpnote(ev.channel, ev.num, ev.value); + + if(ev.value) + master.noteOn(ev.channel, ev.num, ev.value); + else + master.noteOff(ev.channel, ev.num); + break; + + case M_CONTROLLER: + dump.dumpcontroller(ev.channel, ev.num, ev.value); + master.setController(ev.channel, ev.num, ev.value); + break; + + case M_PGMCHANGE: + master.setProgram(ev.channel, ev.num); + break; + case M_PRESSURE: + master.polyphonicAftertouch(ev.channel, ev.num, ev.value); + break; } } } diff --git a/src/Nio/InMgr.h b/src/Nio/InMgr.h @@ -8,8 +8,10 @@ enum midi_type { M_NOTE = 1, M_CONTROLLER = 2, - M_PGMCHANGE = 3 + M_PGMCHANGE = 3, + M_PRESSURE = 4 }; //type=1 for note, type=2 for controller, type=3 for program change +//type=4 for polyphonic aftertouch struct MidiEvent { MidiEvent(); diff --git a/src/Nio/JackEngine.cpp b/src/Nio/JackEngine.cpp @@ -32,6 +32,8 @@ using namespace std; +extern char *instance_name; + JackEngine::JackEngine() :AudioOut(), jackClient(NULL) { @@ -51,7 +53,6 @@ bool JackEngine::connectServer(string server) if(jackClient) return true; - string clientname = "zynaddsubfx"; string postfix = Nio::getPostfix(); if(!postfix.empty()) @@ -59,15 +60,25 @@ bool JackEngine::connectServer(string server) jack_status_t jackstatus; bool use_server_name = server.size() && server.compare("default") != 0; jack_options_t jopts = (jack_options_t) - (((use_server_name) ? JackServerName : + (((!instance_name + && use_server_name) ? JackServerName : JackNullOption) | ((autostart_jack) ? JackNullOption : JackNoStartServer)); - if(use_server_name) - jackClient = jack_client_open(clientname.c_str(), jopts, &jackstatus, - server.c_str()); - else - jackClient = jack_client_open(clientname.c_str(), jopts, &jackstatus); + + if(instance_name) + jackClient = jack_client_open(instance_name, jopts, &jackstatus); + else { + if(use_server_name) + jackClient = jack_client_open( + clientname.c_str(), jopts, &jackstatus, + server.c_str()); + else + jackClient = jack_client_open( + clientname.c_str(), jopts, &jackstatus); + } + + if(NULL != jackClient) return true; else @@ -107,6 +118,9 @@ bool JackEngine::connectJack() void JackEngine::disconnectJack() { if(jackClient) { + cout << "Deactivating and closing JACK client" << endl; + + jack_deactivate(jackClient); jack_client_close(jackClient); jackClient = NULL; } @@ -294,7 +308,7 @@ bool JackEngine::processAudio(jack_nframes_t nframes) return true; } -int JackEngine::_xrunCallback(void * /*/arg*/) +int JackEngine::_xrunCallback(void *) { cerr << "Jack reports xrun" << endl; return 0; @@ -354,6 +368,13 @@ void JackEngine::handleMidi(unsigned long frames) InMgr::getInstance().putEvent(ev); break; + case 0xA0: /* pressure, aftertouch */ + ev.type = M_PRESSURE; + ev.num = midi_data[1]; + ev.value = midi_data[2]; + InMgr::getInstance().putEvent(ev); + break; + case 0xB0: /* controller */ ev.type = M_CONTROLLER; ev.num = midi_data[1]; diff --git a/src/Nio/MidiIn.cpp b/src/Nio/MidiIn.cpp @@ -45,6 +45,13 @@ void MidiIn::midiProcess(unsigned char head, ev.value = value; InMgr::getInstance().putEvent(ev); break; + case 0xA0: /* pressure, aftertouch */ + ev.type = M_PRESSURE; + ev.channel = chan; + ev.num = num; + ev.value = value; + InMgr::getInstance().putEvent(ev); + break; case 0xb0: //Controller ev.type = M_CONTROLLER; ev.channel = chan; diff --git a/src/Nio/Nio.cpp b/src/Nio/Nio.cpp @@ -4,6 +4,7 @@ #include "EngineMgr.h" #include "MidiIn.h" #include "AudioOut.h" +#include "WavEngine.h" #include <iostream> #include <algorithm> using std::string; @@ -16,15 +17,20 @@ OutMgr *out = NULL; EngineMgr *eng = NULL; string postfix; -bool Nio::autoConnect = false; -string Nio::defaultSource; -string Nio::defaultSink; +bool Nio::autoConnect = false; +string Nio::defaultSource = IN_DEFAULT; +string Nio::defaultSink = OUT_DEFAULT; -bool Nio::start() +void Nio::init(void) { in = &InMgr::getInstance(); //Enable input wrapper out = &OutMgr::getInstance(); //Initialize the Output Systems eng = &EngineMgr::getInstance(); //Initialize The Engines +} + +bool Nio::start() +{ + init(); return eng->start(); } @@ -94,3 +100,39 @@ string Nio::getSink() { return out->getSink(); } + +#if JACK +#include <jack/jack.h> +void Nio::preferedSampleRate(unsigned &rate) +{ + jack_client_t *client = jack_client_open("temp-client", + JackNoStartServer, 0); + if(client) { + rate = jack_get_sample_rate(client); + jack_client_close(client); + } +} +#else +void Nio::preferedSampleRate(unsigned &) +{} +#endif + +void Nio::waveNew(class WavFile *wave) +{ + out->wave->newFile(wave); +} + +void Nio::waveStart(void) +{ + out->wave->Start(); +} + +void Nio::waveStop(void) +{ + out->wave->Stop(); +} + +void Nio::waveEnd(void) +{ + out->wave->destroyFile(); +} diff --git a/src/Nio/Nio.h b/src/Nio/Nio.h @@ -3,11 +3,14 @@ #include <string> #include <set> +class WavFile; + /**Interface to Nio Subsystem * * Should be only externally included header */ namespace Nio { + void init(void); bool start(void); void stop(void); @@ -26,6 +29,16 @@ namespace Nio std::string getSource(void); std::string getSink(void); + //Get the prefered sample rate from jack (if running) + void preferedSampleRate(unsigned &rate); + + + //Wave writing + void waveNew(class WavFile *wave); + void waveStart(void); + void waveStop(void); + void waveEnd(void); + extern bool autoConnect; extern std::string defaultSource; extern std::string defaultSink; diff --git a/src/Nio/NulEngine.cpp b/src/Nio/NulEngine.cpp @@ -23,6 +23,7 @@ #include "NulEngine.h" #include "../globals.h" +#include <unistd.h> #include <iostream> using namespace std; @@ -61,7 +62,8 @@ void *NulEngine::AudioThread() if(remaining < 0) cerr << "WARNING - too late" << endl; } - playing_until.tv_usec += synth->buffersize * 1000000 / synth->samplerate; + playing_until.tv_usec += synth->buffersize * 1000000 + / synth->samplerate; if(remaining < 0) playing_until.tv_usec -= remaining; playing_until.tv_sec += playing_until.tv_usec / 1000000; diff --git a/src/Nio/NulEngine.h b/src/Nio/NulEngine.h @@ -42,7 +42,7 @@ class NulEngine:public AudioOut, MidiIn bool getAudioEn() const; void setMidiEn(bool) {} - bool getMidiEn() const {return true;} + bool getMidiEn() const {return true; } protected: void *AudioThread(); diff --git a/src/Nio/OssEngine.cpp b/src/Nio/OssEngine.cpp @@ -59,7 +59,7 @@ OssEngine::~OssEngine() bool OssEngine::openAudio() { if(audio.handle != -1) - return true; //already open + return true; //already open int snd_bitsize = 16; int snd_fragment = 0x00080009; //fragment size (?); @@ -159,7 +159,7 @@ bool OssEngine::openMidi() { int handle = midi.handle; if(handle != -1) - return true; //already open + return true; //already open handle = open(config.cfg.LinuxOSSSeqInDev, O_RDONLY, 0); @@ -229,7 +229,7 @@ void *OssEngine::thread() } int handle = audio.handle; if(handle != -1) - write(handle, audio.smps, synth->buffersize * 4); // *2 because is 16 bit, again * 2 because is stereo + write(handle, audio.smps, synth->buffersize * 4); // *2 because is 16 bit, again * 2 because is stereo else break; } diff --git a/src/Nio/OutMgr.cpp b/src/Nio/OutMgr.cpp @@ -118,11 +118,15 @@ string OutMgr::getSink() const //perform a cheap linear interpolation for resampling //This will result in some distortion at frame boundries //returns number of samples produced -static size_t resample(float *dest, const float *src, float s_in, float s_out, size_t elms) +static size_t resample(float *dest, + const float *src, + float s_in, + float s_out, + size_t elms) { - size_t out_elms = elms*s_out/s_in; - float r_pos = 0.0f; - for(int i = 0; i < (int)out_elms; ++i, r_pos += s_in/s_out) + size_t out_elms = elms * s_out / s_in; + float r_pos = 0.0f; + for(int i = 0; i < (int)out_elms; ++i, r_pos += s_in / s_out) dest[i] = interpolate(src, elms, r_pos); return out_elms; @@ -133,11 +137,15 @@ void OutMgr::addSmps(float *l, float *r) //allow wave file to syphon off stream wave->push(Stereo<float *>(l, r), synth->buffersize); - const int s_out = currentOut->getSampleRate(), + const int s_out = currentOut->getSampleRate(), s_sys = synth->samplerate; if(s_out != s_sys) { //we need to resample - const size_t steps = resample(priBuffCurrent.l, l, s_sys, s_out, synth->buffersize); + const size_t steps = resample(priBuffCurrent.l, + l, + s_sys, + s_out, + synth->buffersize); resample(priBuffCurrent.r, r, s_sys, s_out, synth->buffersize); priBuffCurrent.l += steps; @@ -158,7 +166,7 @@ void OutMgr::removeStaleSmps() const int leftover = storedSmps() - stales; - assert(leftover>-1); + assert(leftover > -1); //leftover samples [seen at very low latencies] if(leftover) { diff --git a/src/Nio/OutMgr.h b/src/Nio/OutMgr.h @@ -43,7 +43,7 @@ class OutMgr private: OutMgr(); void addSmps(float *l, float *r); - unsigned int storedSmps() const {return priBuffCurrent.l - priBuf.l;} + unsigned int storedSmps() const {return priBuffCurrent.l - priBuf.l; } void removeStaleSmps(); AudioOut *currentOut; /**<The current output driver*/ diff --git a/src/Nio/PaEngine.cpp b/src/Nio/PaEngine.cpp @@ -62,7 +62,7 @@ bool PaEngine::Start() &outputParameters, synth->samplerate, synth->buffersize, - NULL, + 0, PAprocess, (void *) this); Pa_StartStream(stream); diff --git a/src/Nio/WavEngine.h b/src/Nio/WavEngine.h @@ -40,7 +40,7 @@ class WavEngine:public AudioOut void Stop(); void setAudioEn(bool /*nval*/) {} - bool getAudioEn() const {return true;} + bool getAudioEn() const {return true; } void push(Stereo<float *> smps, size_t len); diff --git a/src/Output/DSSIaudiooutput.cpp b/src/Output/DSSIaudiooutput.cpp @@ -37,6 +37,18 @@ using std::string; using std::vector; +//Dummy variables and functions for linking purposes +const char *instance_name = 0; +class WavFile; +namespace Nio { + bool start(void){return 1;}; + void stop(void){}; + void waveNew(WavFile *){} + void waveStart(void){} + void waveStop(void){} + void waveEnd(void){} +} + // // Static stubs for LADSPA member functions // @@ -512,7 +524,7 @@ const DSSI_Descriptor *DSSIaudiooutput::getDssiDescriptor(unsigned long index) // // Initialise the DSSI descriptor, statically: -DSSI_Descriptor *DSSIaudiooutput:: dssiDescriptor = +DSSI_Descriptor *DSSIaudiooutput::dssiDescriptor = DSSIaudiooutput::initDssiDescriptor(); /** @@ -617,6 +629,7 @@ DSSIaudiooutput::DSSIaudiooutput(unsigned long sampleRate) for(int i = 0; i < synth->buffersize; i++) denormalkillbuf[i] = (RND - 0.5f) * 1e-16; + synth->alias(); this->master = new Master(); } @@ -657,13 +670,13 @@ DSSIaudiooutput::ProgramDescriptor::ProgramDescriptor(unsigned long _bank, /** * The map of programs available; held as a single shared statically allocated object. */ -vector<DSSIaudiooutput::ProgramDescriptor> DSSIaudiooutput:: programMap = +vector<DSSIaudiooutput::ProgramDescriptor> DSSIaudiooutput::programMap = vector<DSSIaudiooutput::ProgramDescriptor>(); /** * Index controlling the map of banks */ -long DSSIaudiooutput:: bankNoToMap = 1; +long DSSIaudiooutput::bankNoToMap = 1; /** * Queries and maps the next available bank of instruments. diff --git a/src/Params/CMakeLists.txt b/src/Params/CMakeLists.txt @@ -1,19 +1,13 @@ set(zynaddsubfx_params_SRCS - ADnoteParameters.cpp - Controller.cpp - EnvelopeParams.cpp - FilterParams.cpp - LFOParams.cpp - PADnoteParameters.cpp - Presets.cpp - PresetsArray.cpp - PresetsStore.cpp - SUBnoteParameters.cpp - + Params/ADnoteParameters.cpp + Params/Controller.cpp + Params/EnvelopeParams.cpp + Params/FilterParams.cpp + Params/LFOParams.cpp + Params/PADnoteParameters.cpp + Params/Presets.cpp + Params/PresetsArray.cpp + Params/PresetsStore.cpp + Params/SUBnoteParameters.cpp + PARENT_SCOPE ) - -add_library(zynaddsubfx_params STATIC - ${zynaddsubfx_params_SRCS} - ) - -target_link_libraries(zynaddsubfx_params zynaddsubfx_misc) diff --git a/src/Params/LFOParams.cpp b/src/Params/LFOParams.cpp @@ -25,7 +25,7 @@ #include "../globals.h" #include "LFOParams.h" -int LFOParams:: time; +int LFOParams::time; LFOParams::LFOParams(char Pfreq_, char Pintensity_, diff --git a/src/Params/PADnoteParameters.cpp b/src/Params/PADnoteParameters.cpp @@ -458,7 +458,8 @@ void PADnoteParameters::generatespectrum_bandwidthMode(float *spectrum, if(ibw > profilesize) { //if the bandwidth is larger than the profilesize float rap = sqrt((float)profilesize / (float)ibw); int cfreq = - (int) (realfreq / (synth->samplerate_f * 0.5f) * size) - ibw / 2; + (int) (realfreq + / (synth->samplerate_f * 0.5f) * size) - ibw / 2; for(int i = 0; i < ibw; ++i) { int src = (int)(i * rap * rap); int spfreq = i + cfreq; @@ -476,7 +477,7 @@ void PADnoteParameters::generatespectrum_bandwidthMode(float *spectrum, float idfreq = i / (float)profilesize - 0.5f; idfreq *= ibw; int spfreq = (int) (idfreq + ibasefreq); - float fspfreq = fmod((double)idfreq + ibasefreq, 1.0f); + float fspfreq = fmodf((float)idfreq + ibasefreq, 1.0f); if(spfreq <= 0) continue; if(spfreq >= size - 1) diff --git a/src/Params/PresetsStore.h b/src/Params/PresetsStore.h @@ -20,6 +20,9 @@ */ +#ifndef PRESETSTORE_H +#define PRESETSTORE_H + #include <string> #include <vector> #include "../Misc/XMLwrapper.h" @@ -64,3 +67,4 @@ class PresetsStore }; extern PresetsStore presetsstore; +#endif diff --git a/src/Synth/ADnote.cpp b/src/Synth/ADnote.cpp @@ -164,8 +164,8 @@ ADnote::ADnote(ADnoteParameters *pars, (unison_real_spread - 1.0f) * unison_vibratto_a; float increments_per_second = synth->samplerate_f / synth->buffersize_f; - float vibratto_base_period = 0.25f - * powf( + float vibratto_base_period = 0.25f + * powf( 2.0f, (1.0f - pars->VoicePar[nvoice]. @@ -440,7 +440,7 @@ void ADnote::legatonote(float freq, float velocity, int portamento_, for(int nvoice = 0; nvoice < NUM_VOICES; ++nvoice) { if(NoteVoicePar[nvoice].Enabled == OFF) - continue; //(gf) Stay the same as first note in legato. + continue; //(gf) Stay the same as first note in legato. NoteVoicePar[nvoice].fixedfreq = pars->VoicePar[nvoice].Pfixedfreq; NoteVoicePar[nvoice].fixedfreqET = pars->VoicePar[nvoice].PfixedfreqET; @@ -591,7 +591,7 @@ void ADnote::legatonote(float freq, float velocity, int portamento_, NoteVoicePar[nvoice].Volume = -NoteVoicePar[nvoice].Volume; if(partparams->VoicePar[nvoice].PPanning == 0) - NoteVoicePar[nvoice].Panning = RND; // random panning + NoteVoicePar[nvoice].Panning = RND; // random panning else NoteVoicePar[nvoice].Panning = partparams->VoicePar[nvoice].PPanning / 128.0f; @@ -744,7 +744,7 @@ void ADnote::initparameters() vce.Volume = -vce.Volume; if(param.PPanning == 0) - vce.Panning = RND; // random panning + vce.Panning = RND; // random panning else vce.Panning = param.PPanning / 128.0f; @@ -812,7 +812,8 @@ void ADnote::initparameters() vce.FMSmp[synth->oscilsize + i] = vce.FMSmp[i]; int oscposhiFM_add = (int)((param.PFMoscilphase - - 64.0f) / 128.0f * synth->oscilsize + synth->oscilsize * 4); + - 64.0f) / 128.0f * synth->oscilsize + + synth->oscilsize * 4); for(int k = 0; k < unison_size[nvoice]; ++k) { oscposhiFM[nvoice][k] += oscposhiFM_add; oscposhiFM[nvoice][k] %= synth->oscilsize; @@ -924,7 +925,7 @@ float ADnote::getvoicebasefreq(int nvoice) const + NoteGlobalPar.Detune / 100.0f; if(NoteVoicePar[nvoice].fixedfreq == 0) - return this->basefreq *powf(2, detune / 12.0f); + return this->basefreq * powf(2, detune / 12.0f); else { //the fixed freq is enabled float fixedfreq = 440.0f; int fixedfreqET = NoteVoicePar[nvoice].fixedfreqET; @@ -986,7 +987,7 @@ void ADnote::computecurrentparameters() if(portamento != 0) { //this voice use portamento portamentofreqrap = ctl->portamento.freqrap; if(ctl->portamento.used == 0) //the portamento has finished - portamento = 0; //this note is no longer "portamented" + portamento = 0; //this note is no longer "portamented" } //compute parameters for all voices @@ -1082,7 +1083,7 @@ inline void ADnote::fadein(float *smps) const int zerocrossings = 0; for(int i = 1; i < synth->buffersize; ++i) if((smps[i - 1] < 0.0f) && (smps[i] > 0.0f)) - zerocrossings++; //this is only the possitive crossings + zerocrossings++; //this is only the possitive crossings float tmp = (synth->buffersize_f - 1.0f) / (zerocrossings + 1) / 3.0f; if(tmp < 8.0f) @@ -1342,8 +1343,8 @@ inline void ADnote::ComputeVoiceOscillatorFrequencyModulation(int nvoice, //normalize: makes all sample-rates, oscil_sizes to produce same sound if(FMmode != 0) { //Frequency modulation - float normalize = synth->oscilsize_f / 262144.0f * 44100.0f - / synth->samplerate_f; + float normalize = synth->oscilsize_f / 262144.0f * 44100.0f + / synth->samplerate_f; for(int k = 0; k < unison_size[nvoice]; ++k) { float *tw = tmpwave_unison[k]; float fmold = FMoldsmp[nvoice][k]; @@ -1733,9 +1734,9 @@ void ADnote::Voice::releasekey() } template<class T> -static inline void nullify(T &t) {delete t; t = NULL;} +static inline void nullify(T &t) {delete t; t = NULL; } template<class T> -static inline void arrayNullify(T &t) {delete [] t; t = NULL;} +static inline void arrayNullify(T &t) {delete [] t; t = NULL; } void ADnote::Voice::kill() { @@ -1791,6 +1792,8 @@ void ADnote::Global::initparameters(const ADnoteGlobalParam &param, GlobalFilterL = Filter::generate(param.GlobalFilter); if(stereo) GlobalFilterR = Filter::generate(param.GlobalFilter); + else + GlobalFilterR = NULL; FilterEnvelope = new Envelope(param.FilterEnvelope, basefreq); FilterLfo = new LFO(param.FilterLfo, basefreq); diff --git a/src/Synth/ADnote.h b/src/Synth/ADnote.h @@ -155,7 +155,7 @@ class ADnote:public SynthNote /****************************************** * FILTER GLOBAL PARAMETERS * ******************************************/ - class Filter *GlobalFilterL, *GlobalFilterR; + class Filter * GlobalFilterL, *GlobalFilterR; float FilterCenterPitch; //octaves float FilterQ; @@ -217,8 +217,8 @@ class ADnote:public SynthNote * FILTER PARAMETERS * *************************/ - class Filter *VoiceFilterL; - class Filter *VoiceFilterR; + class Filter * VoiceFilterL; + class Filter * VoiceFilterR; float FilterCenterPitch; /* Filter center Pitch*/ float FilterFreqTracking; diff --git a/src/Synth/CMakeLists.txt b/src/Synth/CMakeLists.txt @@ -1,17 +1,11 @@ set(zynaddsubfx_synth_SRCS - SynthNote.cpp - ADnote.cpp - Envelope.cpp - LFO.cpp - OscilGen.cpp - PADnote.cpp - Resonance.cpp - SUBnote.cpp + Synth/SynthNote.cpp + Synth/ADnote.cpp + Synth/Envelope.cpp + Synth/LFO.cpp + Synth/OscilGen.cpp + Synth/PADnote.cpp + Synth/Resonance.cpp + Synth/SUBnote.cpp + PARENT_SCOPE ) - -add_library(zynaddsubfx_synth STATIC - ${zynaddsubfx_synth_SRCS} - ) - -target_link_libraries(zynaddsubfx_synth) - diff --git a/src/Synth/Envelope.cpp b/src/Synth/Envelope.cpp @@ -53,7 +53,7 @@ Envelope::Envelope(EnvelopeParams *envpars, float basefreq) if(tmp > bufferdt) envdt[i] = bufferdt / tmp; else - envdt[i] = 2.0f; //any value larger than 1 + envdt[i] = 2.0f; //any value larger than 1 switch(mode) { case 2: diff --git a/src/Synth/OscilGen.cpp b/src/Synth/OscilGen.cpp @@ -89,7 +89,7 @@ void rmsNormalize(fft_t *freqs) sum += normal(freqs, i); if(sum < 0.000001f) - return; //data is all ~zero, do not amplify noise + return; //data is all ~zero, do not amplify noise const float gain = 1.0f / sqrt(sum); @@ -156,7 +156,7 @@ void OscilGen::defaults() if(ADvsPAD) Prand = 127; //max phase randomness (usefull if the oscil will be imported to a ADsynth from a PADsynth else - Prand = 64; //no randomness + Prand = 64; //no randomness Pcurrentbasefunc = 0; Pbasefuncpar = 64; @@ -615,13 +615,10 @@ void OscilGen::prepare() clearAll(oscilFFTfreqs); if(Pcurrentbasefunc == 0) //the sine case - for(int i = 0; i < MAX_AD_HARMONICS; ++i) { - oscilFFTfreqs[i - + 1].real() = -hmag[i] - * sinf(hphase[i] * (i + 1)) / 2.0f; - oscilFFTfreqs[i - + 1].imag() = hmag[i] - * cosf(hphase[i] * (i + 1)) / 2.0f; + for(int i = 0; i < MAX_AD_HARMONICS - 1; ++i) { + oscilFFTfreqs[i + 1] = + std::complex<float>(-hmag[i] * sinf(hphase[i] * (i + 1)) / 2.0f, + hmag[i] * cosf(hphase[i] * (i + 1)) / 2.0f); } else for(int j = 0; j < MAX_AD_HARMONICS; ++j) { @@ -698,10 +695,12 @@ void OscilGen::adaptiveharmonic(fft_t *f, float freq) break; else { if(down) { - f[high].real() += inf[i].real() * (1.0f - low); - f[high].imag() += inf[i].imag() * (1.0f - low); - f[high + 1].real() += inf[i].real() * low; - f[high + 1].imag() += inf[i].imag() * low; + f[high] = + std::complex<float>(f[high].real() + inf[i].real() * (1.0f - low), + f[high].imag() + inf[i].imag() * (1.0f - low)); + + f[high + 1] = std::complex<float>(f[high + 1].real() + inf[i].real() * low, + f[high + 1].imag() + inf[i].imag() * low); } else { hc = inf[high].real() @@ -746,7 +745,7 @@ void OscilGen::adaptiveharmonicpostprocess(fft_t *f, int size) if(Padaptiveharmonics == 2) { //2n+1 for(int i = 0; i < size; ++i) if((i % 2) == 0) - f[i] += inf[i]; //i=0 pt prima armonica,etc. + f[i] += inf[i]; //i=0 pt prima armonica,etc. } else { //celelalte moduri int nh = (Padaptiveharmonics - 3) / 2 + 2; @@ -841,7 +840,8 @@ short int OscilGen::get(float *smps, float freqHz, int resonance) outoscilFFTfreqs[i] = oscilFFTfreqs[i]; adaptiveharmonic(outoscilFFTfreqs, freqHz); - adaptiveharmonicpostprocess(&outoscilFFTfreqs[1], synth->oscilsize / 2 - 1); + adaptiveharmonicpostprocess(&outoscilFFTfreqs[1], + synth->oscilsize / 2 - 1); nyquist = realnyquist; } @@ -927,7 +927,8 @@ void OscilGen::getspectrum(int n, float *spc, int what) if(what == 0) { for(int i = 0; i < n; ++i) outoscilFFTfreqs[i] = fft_t(spc[i], spc[i]); - memset(outoscilFFTfreqs + n, 0, (synth->oscilsize / 2 - n) * sizeof(fft_t)); + memset(outoscilFFTfreqs + n, 0, + (synth->oscilsize / 2 - n) * sizeof(fft_t)); adaptiveharmonic(outoscilFFTfreqs, 0.0f); adaptiveharmonicpostprocess(outoscilFFTfreqs, n - 1); for(int i = 0; i < n; ++i) @@ -1110,8 +1111,9 @@ void OscilGen::getfromXML(XMLwrapper *xml) if(xml->enterbranch("BASE_FUNCTION")) { for(int i = 1; i < synth->oscilsize / 2; ++i) if(xml->enterbranch("BF_HARMONIC", i)) { - basefuncFFTfreqs[i].real() = xml->getparreal("cos", 0.0f); - basefuncFFTfreqs[i].imag() = xml->getparreal("sin", 0.0f); + basefuncFFTfreqs[i] = + std::complex<float>(xml->getparreal("cos", 0.0f), + xml->getparreal("sin", 0.0f)); xml->exitbranch(); } xml->exitbranch(); @@ -1270,19 +1272,21 @@ FUNC(spike) { float b = a * 0.66666; // the width of the range: if a == 0.5, b == 0.33333 - if(x < 0.5){ - if(x < (0.5 - (b / 2.0))) return 0.0; + if(x < 0.5) { + if(x < (0.5 - (b / 2.0))) + return 0.0; else { x = (x + (b / 2) - 0.5) * (2.0 / b); // shift to zero, and expand to range from 0 to 1 return x * (2.0 / b); // this is the slope: 1 / (b / 2) } } else { - if(x > (0.5 + (b / 2.0))) return 0.0; - else { - x = (x - 0.5) * (2.0 / b); - return (1 - x) * (2.0 / b); - } + if(x > (0.5 + (b / 2.0))) + return 0.0; + else { + x = (x - 0.5) * (2.0 / b); + return (1 - x) * (2.0 / b); + } } } @@ -1294,15 +1298,19 @@ FUNC(circle) b = 2 - (a * 2); // b goes from 2 to 0 x = x * 4; - if (x < 2){ + if(x < 2) { x = x - 1; // x goes from -1 to 1 - if ((x < -b) || (x > b)) y = 0; - else y = sqrt(1 - (pow(x, 2) / pow(b, 2))); // normally * a^2, but a stays 1 + if((x < -b) || (x > b)) + y = 0; + else + y = sqrt(1 - (pow(x, 2) / pow(b, 2))); // normally * a^2, but a stays 1 } - else{ + else { x = x - 3; // x goes from -1 to 1 as well - if ((x < -b) || (x > b)) y = 0; - else y = -sqrt(1 - (pow(x, 2) / pow(b, 2))); + if((x < -b) || (x > b)) + y = 0; + else + y = -sqrt(1 - (pow(x, 2) / pow(b, 2))); } return y; } diff --git a/src/Synth/PADnote.cpp b/src/Synth/PADnote.cpp @@ -129,7 +129,8 @@ void PADnote::setup(float freq, float time = powf(10, 3.0f * pars->PPunchTime / 127.0f) / 10000.0f; //0.1f .. 100 ms float stretch = powf(440.0f / freq, pars->PPunchStretch / 64.0f); - NoteGlobalPar.Punch.dt = 1.0f / (time * synth->samplerate_f * stretch); + NoteGlobalPar.Punch.dt = 1.0f + / (time * synth->samplerate_f * stretch); } else NoteGlobalPar.Punch.Enabled = 0; @@ -247,7 +248,7 @@ void PADnote::computecurrentparameters() if(portamento != 0) { //this voice use portamento portamentofreqrap = ctl->portamento.freqrap; if(ctl->portamento.used == 0) //the portamento has finished - portamento = 0; //this note is no longer "portamented" + portamento = 0; //this note is no longer "portamented" ; } diff --git a/src/Synth/PADnote.h b/src/Synth/PADnote.h @@ -101,7 +101,7 @@ class PADnote:public SynthNote /****************************************** * FILTER GLOBAL PARAMETERS * ******************************************/ - class Filter *GlobalFilterL, *GlobalFilterR; + class Filter * GlobalFilterL, *GlobalFilterR; float FilterCenterPitch; //octaves float FilterQ; diff --git a/src/Synth/SUBnote.cpp b/src/Synth/SUBnote.cpp @@ -396,7 +396,7 @@ void SUBnote::computecurrentparameters() if(portamento != 0) { //portamento is used envfreq *= ctl->portamento.freqrap; if(ctl->portamento.used == 0) //the portamento has finished - portamento = 0; //this note is no longer "portamented" + portamento = 0; //this note is no longer "portamented" ; } diff --git a/src/Synth/SynthNote.cpp b/src/Synth/SynthNote.cpp @@ -125,3 +125,10 @@ void SynthNote::Legato::apply(SynthNote &note, float *outl, float *outr) break; } } + +void SynthNote::setVelocity(float velocity_) { + legato.setSilent(true); //Let legato.update(...) returns 0. + legatonote(legato.getFreq(), velocity_, + legato.getPortamento(), legato.getMidinote(), true); + legato.setDecounter(0); //avoid chopping sound due fade-in +} diff --git a/src/Synth/SynthNote.h b/src/Synth/SynthNote.h @@ -45,6 +45,8 @@ class SynthNote virtual void legatonote(float freq, float velocity, int portamento_, int midinote_, bool externcall) = 0; + /* For polyphonic aftertouch needed */ + void setVelocity(float velocity_); protected: // Legato transitions class Legato @@ -70,6 +72,14 @@ class SynthNote float freq, vel; int portamento, midinote; } param; + + public: /* Some get routines for legatonote calls (aftertouch feature)*/ + float getFreq() {return param.freq; } + float getVelocity() {return param.vel; } + int getPortamento() {return param.portamento; } + int getMidinote() {return param.midinote; } + void setSilent(bool silent_) {silent = silent_; } + void setDecounter(int decounter_) {decounter = decounter_; } } legato; }; diff --git a/src/Tests/AdNoteTest.h b/src/Tests/AdNoteTest.h @@ -1,3 +1,27 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/ADnote + Copyright (C) 2009-2011 Mark McCurry + Copyright (C) 2009 Harald Hvaal + Authors: Mark McCurry, Harald Hvaal + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + #include <cxxtest/TestSuite.h> #include <iostream> #include <fstream> @@ -9,9 +33,10 @@ #include "../Params/Presets.h" #include "../DSP/FFTwrapper.h" #include "../globals.h" +SYNTH_T *synth; using namespace std; -SYNTH_T *synth; + class AdNoteTest:public CxxTest::TestSuite { diff --git a/src/Tests/CMakeLists.txt b/src/Tests/CMakeLists.txt @@ -11,8 +11,13 @@ CXXTEST_ADD_TEST(ADnoteTest AdNoteTest.cpp CXXTEST_ADD_TEST(SUBnoteTest SubNoteTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/SubNoteTest.h) CXXTEST_ADD_TEST(OscilGenTest OscilGenTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OscilGenTest.h) CXXTEST_ADD_TEST(RandTest RandTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/RandTest.h) +CXXTEST_ADD_TEST(PADnoteTest PadNoteTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/PadNoteTest.h) +CXXTEST_ADD_TEST(PluginTest PluginTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/PluginTest.h) + +#Extra libraries added to make test and full compilation use the same library +#links for quirky compilers +set(test_lib zynaddsubfx_core ${ZLIB_LIBRARY} ${FFTW_LIBRARIES} ${MXML_LIBRARIES} pthread) -set(test_lib ${NONGUI_LIBRARIES} ${ZLIB_LIBRARY} ${FFTW_LIBRARY} ${MXML_LIBRARY} pthread) message(STATUS "Linking tests with: ${test_lib}") target_link_libraries(ADnoteTest ${test_lib}) target_link_libraries(SUBnoteTest ${test_lib}) @@ -22,3 +27,7 @@ target_link_libraries(MicrotonalTest ${test_lib}) target_link_libraries(OscilGenTest ${test_lib}) target_link_libraries(XMLwrapperTest ${test_lib}) target_link_libraries(RandTest ${test_lib}) +target_link_libraries(PADnoteTest ${test_lib}) +target_link_libraries(PluginTest zynaddsubfx_core zynaddsubfx_nio + ${OS_LIBRARIES} ${AUDIO_LIBRARIES}) + diff --git a/src/Tests/ControllerTest.h b/src/Tests/ControllerTest.h @@ -2,7 +2,7 @@ ZynAddSubFX - a software synthesizer ControllerTest.h - CxxTest for Params/Controller - Copyright (C) 2009-2009 Mark McCurry + Copyright (C) 2009-2011 Mark McCurry Author: Mark McCurry This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ class ControllerTest:public CxxTest::TestSuite { public: void setUp() { - synth = new SYNTH_T; + synth = new SYNTH_T; testCtl = new Controller(); } diff --git a/src/Tests/EchoTest.h b/src/Tests/EchoTest.h @@ -2,8 +2,9 @@ ZynAddSubFX - a software synthesizer EchoTest.h - CxxTest for Effect/Echo - Copyright (C) 2009-2009 Mark McCurry - Author: Mark McCurry + Copyright (C) 2009-2011 Mark McCurry + Copyright (C) 2009 Harald Hvaal + Authors: Mark McCurry, Harald Hvaal This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License @@ -34,7 +35,7 @@ class EchoTest:public CxxTest::TestSuite public: void setUp() { synth = new SYNTH_T; - outL = new float[synth->buffersize]; + outL = new float[synth->buffersize]; for(int i = 0; i < synth->buffersize; ++i) outL[i] = 0.0f; outR = new float[synth->buffersize]; diff --git a/src/Tests/MicrotonalTest.h b/src/Tests/MicrotonalTest.h @@ -2,7 +2,7 @@ ZynAddSubFX - a software synthesizer MicrotonalTest.h - CxxTest for Misc/Microtonal - Copyright (C) 2009-2009 Mark McCurry + Copyright (C) 2009-2012 Mark McCurry Author: Mark McCurry This program is free software; you can redistribute it and/or modify @@ -34,7 +34,7 @@ class MicrotonalTest:public CxxTest::TestSuite { public: void setUp() { - synth = new SYNTH_T; + synth = new SYNTH_T; testMicro = new Microtonal(); } @@ -70,14 +70,6 @@ class MicrotonalTest:public CxxTest::TestSuite TS_ASSERT_DELTA(testMicro->getnotefreq(19, 0), 24.4997f, 0.0001f); } - //performs basic sanity check with the == and != operators - void testeqeq() { - Microtonal other; - TS_ASSERT(*testMicro == other); //both are constructed the same, so they should be equal - other.PAfreq = 220.0f; - TS_ASSERT(*testMicro != other); //other is now different - } - //Tests saving/loading to XML void testXML() { //Gah, the XMLwrapper is a twisted maze @@ -110,8 +102,6 @@ class MicrotonalTest:public CxxTest::TestSuite TS_ASSERT(!strcmp(tmp, tmpo)); free(tmp); free(tmpo); - - TS_ASSERT(*testMicro == other); //cxxTest sees error here } #if 0 diff --git a/src/Tests/OscilGenTest.h b/src/Tests/OscilGenTest.h @@ -1,3 +1,24 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/OscilGen + Copyright (C) 20011-2012 Mark McCurry + Author: Mark McCurry + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ #include <cxxtest/TestSuite.h> #include <string> #include "../Synth/OscilGen.h" @@ -18,7 +39,7 @@ class OscilGenTest:public CxxTest::TestSuite synth = new SYNTH_T; //First the sensible settings and variables that have to be set: synth->buffersize = 256; - synth->oscilsize = 1024; + synth->oscilsize = 1024; outL = new float[synth->oscilsize]; outR = new float[synth->oscilsize]; diff --git a/src/Tests/PadNoteTest.h b/src/Tests/PadNoteTest.h @@ -0,0 +1,207 @@ +/* + ZynAddSubFX - a software synthesizer + + PadNoteTest.h - CxxTest for Synth/PADnote + Copyright (C) 20012 zco + Author: zco + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + +//Based Upon AdNoteTest.h and SubNoteTest.h +#include <cxxtest/TestSuite.h> +#include <iostream> +#include <fstream> +#include <ctime> +#include <string> +#include "../Misc/Master.h" +#include "../Misc/Util.h" +#include "../Synth/PADnote.h" +#include "../Params/Presets.h" +#include "../DSP/FFTwrapper.h" +#include "../globals.h" +SYNTH_T *synth; + +using namespace std; + +class PadNoteTest:public CxxTest::TestSuite +{ + public: + PADnote *note; + Master *master; + FFTwrapper *fft; + Controller *controller; + unsigned char testnote; + + + float *outR, *outL; + + void setUp() { + synth = new SYNTH_T; + //First the sensible settings and variables that have to be set: + synth->buffersize = 256; + + outL = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + *(outL + i) = 0; + outR = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + *(outR + i) = 0; + + //next the bad global variables that for some reason have not been properly placed in some + //initialization routine, but rather exist as cryptic oneliners in main.cpp: + denormalkillbuf = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + denormalkillbuf[i] = 0; + + //phew, glad to get thouse out of my way. took me a lot of sweat and gdb to get this far... + + fft = new FFTwrapper(synth->oscilsize); + //prepare the default settings + PADnoteParameters *defaultPreset = new PADnoteParameters(fft,NULL); + + + //Assert defaults + ///TS_ASSERT(!defaultPreset->VoicePar[1].Enabled); + + XMLwrapper *wrap = new XMLwrapper(); + cout << string(SOURCE_DIR) + string("/guitar-adnote.xmz") + << endl; + wrap->loadXMLfile(string(SOURCE_DIR) + + string("/guitar-adnote.xmz")); + TS_ASSERT(wrap->enterbranch("MASTER")); + TS_ASSERT(wrap->enterbranch("PART", 2)); + TS_ASSERT(wrap->enterbranch("INSTRUMENT")); + TS_ASSERT(wrap->enterbranch("INSTRUMENT_KIT")); + TS_ASSERT(wrap->enterbranch("INSTRUMENT_KIT_ITEM", 0)); + TS_ASSERT(wrap->enterbranch("PAD_SYNTH_PARAMETERS")); + defaultPreset->getfromXML(wrap); + + + //defaultPreset->defaults(); + defaultPreset->applyparameters(false); + + //verify xml was loaded + ///TS_ASSERT(defaultPreset->VoicePar[1].Enabled); + + + + controller = new Controller(); + + //lets go with.... 50! as a nice note + testnote = 50; + float freq = 440.0f * powf(2.0f, (testnote - 69.0f) / 12.0f); + + note = new PADnote(defaultPreset, + controller, + freq, + 120, + 0, + testnote, + false); + + //delete defaultPreset; + delete wrap; + } + + void willNoteBeRunButIsHereForLinkingReasonsHowsThisForCamelCaseEh() + { + master = new Master(); + } + + void tearDown() { + delete note; + delete controller; + delete fft; + delete [] outL; + delete [] outR; + delete [] denormalkillbuf; + FFT_cleanup(); + delete synth; + } + + void testDefaults() { + int sampleCount = 0; + + +//#define WRITE_OUTPUT + +#ifdef WRITE_OUTPUT + ofstream file("padnoteout", ios::out); +#endif + note->noteout(outL, outR); + +#ifdef WRITE_OUTPUT + for(int i = 0; i < synth->buffersize; ++i) + file << outL[i] << std::endl; + +#endif + sampleCount += synth->buffersize; + + TS_ASSERT_DELTA(outL[255], 0.0660f, 0.0001f); + + + note->relasekey(); + + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], -0.0729f, 0.0001f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], 0.0613f, 0.0001f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], 0.0378f, 0.0005f); + + note->noteout(outL, outR); + sampleCount += synth->buffersize; + TS_ASSERT_DELTA(outL[255], -0.0070f, 0.0001f); + + while(!note->finished()) { + note->noteout(outL, outR); + +#ifdef WRITE_OUTPUT + for(int i = 0; i < synth->buffersize; ++i) + file << outL[i] << std::endl; + +#endif + sampleCount += synth->buffersize; + } +#ifdef WRITE_OUTPUT + file.close(); +#endif + + TS_ASSERT_EQUALS(sampleCount, 2304); + } + +#define OUTPUT_PROFILE +#ifdef OUTPUT_PROFILE + void testSpeed() { + const int samps = 15000; + + int t_on = clock(); // timer before calling func + for(int i = 0; i < samps; ++i) + note->noteout(outL, outR); + int t_off = clock(); // timer when func returns + + printf("PadNoteTest: %f seconds for %d Samples to be generated.\n", + (static_cast<float>(t_off - t_on)) / CLOCKS_PER_SEC, samps); + } +#endif +}; diff --git a/src/Tests/PluginTest.h b/src/Tests/PluginTest.h @@ -0,0 +1,119 @@ +/* + ZynAddSubFX - a software synthesizer + + PluginTest.h - CxxTest for embedding zyn + Copyright (C) 2013-2013 Mark McCurry + Authors: Mark McCurry + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ +#include <cxxtest/TestSuite.h> +#include <cmath> +#include <cstdlib> +#include <iostream> +#include <fstream> +#include <string> +#include "../Misc/Master.h" +#include "../Misc/Util.h" +#include "../globals.h" +SYNTH_T *synth; + +using namespace std; + +char *instance_name=(char*)""; + +class PluginTest:public CxxTest::TestSuite +{ + public: + void setUp() { + synth = new SYNTH_T; + synth->buffersize = 256; + synth->samplerate = 48000; + synth->alias(); + + outL = new float[1024]; + for(int i = 0; i < synth->buffersize; ++i) + outL[i] = 0.0f; + outR = new float[1024]; + for(int i = 0; i < synth->buffersize; ++i) + outR[i] = 0.0f; + + //next the bad global variables that for some reason have not been properly placed in some + //initialization routine, but rather exist as cryptic oneliners in main.cpp: + denormalkillbuf = new float[synth->buffersize]; + for(int i = 0; i < synth->buffersize; ++i) + denormalkillbuf[i] = 0; + + for(int i = 0; i < 16; ++i) + master[i] = new Master(); + } + + void tearDown() { + for(int i = 0; i < 16; ++i) + delete master[i]; + + delete[] outL; + delete[] outR; + delete synth; + } + + + void testInit() { + + for(int x=0; x<100; ++x) + for(int i=0; i<16; ++i) + master[i]->GetAudioOutSamples(rand()%1025, + synth->samplerate, outL, outR); + } + + void testPanic() + { + master[0]->setController(0, 0x64, 0); + master[0]->noteOn(0,64,64); + master[0]->AudioOut(outL, outR); + + float sum = 0.0f; + for(int i = 0; i < synth->buffersize; ++i) + sum += fabs(outL[i]); + + TS_ASSERT_LESS_THAN(0.1f, sum); + } + + string loadfile(string fname) const + { + std::ifstream t(fname.c_str()); + std::string str((std::istreambuf_iterator<char>(t)), + std::istreambuf_iterator<char>()); + return str; + } + + + void testLoadSave(void) + { + const string fname = string(SOURCE_DIR) + "/guitar-adnote.xmz"; + const string fdata = string("\n") + loadfile(fname); + char *result = NULL; + master[0]->putalldata((char*)fdata.c_str(), fdata.length()); + int res = master[0]->getalldata(&result); + + TS_ASSERT_EQUALS(fdata.length()+1, res); + TS_ASSERT(fdata == result); + } + + + private: + float *outR, *outL; + Master *master[16]; +}; diff --git a/src/Tests/SubNoteTest.h b/src/Tests/SubNoteTest.h @@ -1,3 +1,25 @@ +/* + ZynAddSubFX - a software synthesizer + + AdNoteTest.h - CxxTest for Synth/SUBnote + Copyright (C) 2009-2011 Mark McCurry + Author: Mark McCurry + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License + as published by the Free Software Foundation. + + 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 (version 2 or later) for more details. + + You should have received a copy of the GNU General Public License (version 2) + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + //Based Upon AdNoteTest.h #include <cxxtest/TestSuite.h> #include <iostream> diff --git a/src/Tests/guitar-adnote.xmz b/src/Tests/guitar-adnote.xmz @@ -1,8 +1,7 @@ - -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0f" encoding="UTF-8"?> <!DOCTYPE ZynAddSubFX-data> <ZynAddSubFX-data version-major="2" version-minor="4" -version-revision="1" ZynAddSubFX-author="Nasca Octavian Paul"> +version-revision="3" ZynAddSubFX-author="Nasca Octavian Paul"> <INFORMATION> <par_bool name="PADsynth_used" value="yes" /> </INFORMATION> @@ -1250,2044 +1249,2044 @@ version-revision="1" ZynAddSubFX-author="Nasca Octavian Paul"> </HARMONICS> <BASE_FUNCTION> <BF_HARMONIC id="1"> -<par_real name="cos" value="-0.586935" /> -<par_real name="sin" value="1" /> +<par_real name="cos" value="-0.506187" /> +<par_real name="sin" value="0.862424" /> </BF_HARMONIC> <BF_HARMONIC id="2"> -<par_real name="cos" value="0.284664" /> -<par_real name="sin" value="0.509771" /> +<par_real name="cos" value="0.245501" /> +<par_real name="sin" value="0.439639" /> </BF_HARMONIC> <BF_HARMONIC id="3"> -<par_real name="cos" value="0.00548861" /> -<par_real name="sin" value="0.00011789" /> +<par_real name="cos" value="0.00473351" /> +<par_real name="sin" value="0.000101671" /> </BF_HARMONIC> <BF_HARMONIC id="4"> -<par_real name="cos" value="-0.150973" /> -<par_real name="sin" value="0.245014" /> +<par_real name="cos" value="-0.130203" /> +<par_real name="sin" value="0.211306" /> </BF_HARMONIC> <BF_HARMONIC id="5"> -<par_real name="cos" value="0.110217" /> -<par_real name="sin" value="0.207732" /> +<par_real name="cos" value="0.0950538" /> +<par_real name="sin" value="0.179153" /> </BF_HARMONIC> <BF_HARMONIC id="6"> -<par_real name="cos" value="-0.301957" /> -<par_real name="sin" value="0.524045" /> +<par_real name="cos" value="-0.260415" /> +<par_real name="sin" value="0.451949" /> </BF_HARMONIC> <BF_HARMONIC id="7"> -<par_real name="cos" value="-0.0885982" /> -<par_real name="sin" value="0.137104" /> +<par_real name="cos" value="-0.0764092" /> +<par_real name="sin" value="0.118242" /> </BF_HARMONIC> <BF_HARMONIC id="8"> -<par_real name="cos" value="0.0665272" /> -<par_real name="sin" value="0.132167" /> +<par_real name="cos" value="0.0573746" /> +<par_real name="sin" value="0.113984" /> </BF_HARMONIC> <BF_HARMONIC id="9"> -<par_real name="cos" value="0.005478" /> -<par_real name="sin" value="0.000353421" /> +<par_real name="cos" value="0.00472436" /> +<par_real name="sin" value="0.000304799" /> </BF_HARMONIC> <BF_HARMONIC id="10"> -<par_real name="cos" value="-0.0635812" /> -<par_real name="sin" value="0.0939035" /> +<par_real name="cos" value="-0.0548339" /> +<par_real name="sin" value="0.0809846" /> </BF_HARMONIC> <BF_HARMONIC id="11"> -<par_real name="cos" value="0.0466126" /> -<par_real name="sin" value="0.0977767" /> +<par_real name="cos" value="0.0401998" /> +<par_real name="sin" value="0.084325" /> </BF_HARMONIC> <BF_HARMONIC id="12"> -<par_real name="cos" value="0.154579" /> -<par_real name="sin" value="0.267494" /> +<par_real name="cos" value="0.133313" /> +<par_real name="sin" value="0.230693" /> </BF_HARMONIC> <BF_HARMONIC id="13"> -<par_real name="cos" value="-0.0500581" /> -<par_real name="sin" value="0.0706158" /> +<par_real name="cos" value="-0.0431713" /> +<par_real name="sin" value="0.0609008" /> </BF_HARMONIC> <BF_HARMONIC id="14"> -<par_real name="cos" value="0.0351901" /> -<par_real name="sin" value="0.0780907" /> +<par_real name="cos" value="0.0303488" /> +<par_real name="sin" value="0.0673473" /> </BF_HARMONIC> <BF_HARMONIC id="15"> -<par_real name="cos" value="0.00545682" /> -<par_real name="sin" value="0.000588208" /> +<par_real name="cos" value="0.00470609" /> +<par_real name="sin" value="0.000507285" /> </BF_HARMONIC> <BF_HARMONIC id="16"> -<par_real name="cos" value="-0.0415629" /> -<par_real name="sin" value="0.0560411" /> +<par_real name="cos" value="-0.0358448" /> +<par_real name="sin" value="0.0483312" /> </BF_HARMONIC> <BF_HARMONIC id="17"> -<par_real name="cos" value="0.0277648" /> -<par_real name="sin" value="0.0653231" /> +<par_real name="cos" value="0.023945" /> +<par_real name="sin" value="0.0563362" /> </BF_HARMONIC> <BF_HARMONIC id="18"> -<par_real name="cos" value="0.00831725" /> -<par_real name="sin" value="0.000766919" /> +<par_real name="cos" value="0.007173" /> +<par_real name="sin" value="0.000661409" /> </BF_HARMONIC> <BF_HARMONIC id="19"> -<par_real name="cos" value="-0.0357137" /> -<par_real name="sin" value="0.0460534" /> +<par_real name="cos" value="-0.0308003" /> +<par_real name="sin" value="0.0397176" /> </BF_HARMONIC> <BF_HARMONIC id="20"> -<par_real name="cos" value="0.0225387" /> -<par_real name="sin" value="0.0563597" /> +<par_real name="cos" value="0.0194379" /> +<par_real name="sin" value="0.048606" /> </BF_HARMONIC> <BF_HARMONIC id="21"> -<par_real name="cos" value="0.0054251" /> -<par_real name="sin" value="0.000821755" /> +<par_real name="cos" value="0.00467874" /> +<par_real name="sin" value="0.000708701" /> </BF_HARMONIC> <BF_HARMONIC id="22"> -<par_real name="cos" value="-0.0314275" /> -<par_real name="sin" value="0.0387773" /> +<par_real name="cos" value="-0.0271038" /> +<par_real name="sin" value="0.0334425" /> </BF_HARMONIC> <BF_HARMONIC id="23"> -<par_real name="cos" value="0.018652" /> -<par_real name="sin" value="0.0497112" /> +<par_real name="cos" value="0.0160859" /> +<par_real name="sin" value="0.0428721" /> </BF_HARMONIC> <BF_HARMONIC id="24"> -<par_real name="cos" value="-0.0736757" /> -<par_real name="sin" value="0.129278" /> +<par_real name="cos" value="-0.0635397" /> +<par_real name="sin" value="0.111492" /> </BF_HARMONIC> <BF_HARMONIC id="25"> -<par_real name="cos" value="-0.0281414" /> -<par_real name="sin" value="0.0332373" /> +<par_real name="cos" value="-0.0242698" /> +<par_real name="sin" value="0.0286646" /> </BF_HARMONIC> <BF_HARMONIC id="26"> -<par_real name="cos" value="0.0156415" /> -<par_real name="sin" value="0.0445755" /> +<par_real name="cos" value="0.0134896" /> +<par_real name="sin" value="0.038443" /> </BF_HARMONIC> <BF_HARMONIC id="27"> -<par_real name="cos" value="0.00538291" /> -<par_real name="sin" value="0.00105357" /> +<par_real name="cos" value="0.00464235" /> +<par_real name="sin" value="0.000908624" /> </BF_HARMONIC> <BF_HARMONIC id="28"> -<par_real name="cos" value="-0.0255337" /> -<par_real name="sin" value="0.0288764" /> +<par_real name="cos" value="-0.0220209" /> +<par_real name="sin" value="0.0249037" /> </BF_HARMONIC> <BF_HARMONIC id="29"> -<par_real name="cos" value="0.013236" /> -<par_real name="sin" value="0.0404826" /> +<par_real name="cos" value="0.011415" /> +<par_real name="sin" value="0.0349132" /> </BF_HARMONIC> <BF_HARMONIC id="30"> -<par_real name="cos" value="0.0630907" /> -<par_real name="sin" value="0.109981" /> +<par_real name="cos" value="0.0544109" /> +<par_real name="sin" value="0.0948502" /> </BF_HARMONIC> <BF_HARMONIC id="31"> -<par_real name="cos" value="-0.0234072" /> -<par_real name="sin" value="0.025353" /> +<par_real name="cos" value="-0.0201869" /> +<par_real name="sin" value="0.021865" /> </BF_HARMONIC> <BF_HARMONIC id="32"> -<par_real name="cos" value="0.0112659" /> -<par_real name="sin" value="0.0371387" /> +<par_real name="cos" value="0.00971598" /> +<par_real name="sin" value="0.0320293" /> </BF_HARMONIC> <BF_HARMONIC id="33"> -<par_real name="cos" value="0.00533036" /> -<par_real name="sin" value="0.00128317" /> +<par_real name="cos" value="0.00459703" /> +<par_real name="sin" value="0.00110664" /> </BF_HARMONIC> <BF_HARMONIC id="34"> -<par_real name="cos" value="-0.0216345" /> -<par_real name="sin" value="0.022446" /> +<par_real name="cos" value="-0.0186581" /> +<par_real name="sin" value="0.019358" /> </BF_HARMONIC> <BF_HARMONIC id="35"> -<par_real name="cos" value="0.00961967" /> -<par_real name="sin" value="0.0343507" /> +<par_real name="cos" value="0.00829623" /> +<par_real name="sin" value="0.0296249" /> </BF_HARMONIC> <BF_HARMONIC id="36"> -<par_real name="cos" value="0.00817314" /> -<par_real name="sin" value="0.00152045" /> +<par_real name="cos" value="0.00704871" /> +<par_real name="sin" value="0.00131127" /> </BF_HARMONIC> <BF_HARMONIC id="37"> -<par_real name="cos" value="-0.0201293" /> -<par_real name="sin" value="0.0200061" /> +<par_real name="cos" value="-0.01736" /> +<par_real name="sin" value="0.0172537" /> </BF_HARMONIC> <BF_HARMONIC id="38"> -<par_real name="cos" value="0.00822111" /> -<par_real name="sin" value="0.0319865" /> +<par_real name="cos" value="0.00709008" /> +<par_real name="sin" value="0.0275859" /> </BF_HARMONIC> <BF_HARMONIC id="39"> -<par_real name="cos" value="0.00526757" /> -<par_real name="sin" value="0.00151006" /> +<par_real name="cos" value="0.00454288" /> +<par_real name="sin" value="0.00130231" /> </BF_HARMONIC> <BF_HARMONIC id="40"> -<par_real name="cos" value="-0.0188313" /> -<par_real name="sin" value="0.0179289" /> +<par_real name="cos" value="-0.0162406" /> +<par_real name="sin" value="0.0154623" /> </BF_HARMONIC> <BF_HARMONIC id="41"> -<par_real name="cos" value="0.00701632" /> -<par_real name="sin" value="0.0299528" /> +<par_real name="cos" value="0.00605104" /> +<par_real name="sin" value="0.025832" /> </BF_HARMONIC> <BF_HARMONIC id="42"> -<par_real name="cos" value="-0.0411762" /> -<par_real name="sin" value="0.0734385" /> +<par_real name="cos" value="-0.0355113" /> +<par_real name="sin" value="0.0633351" /> </BF_HARMONIC> <BF_HARMONIC id="43"> -<par_real name="cos" value="-0.0176972" /> -<par_real name="sin" value="0.016139" /> +<par_real name="cos" value="-0.0152625" /> +<par_real name="sin" value="0.0139187" /> </BF_HARMONIC> <BF_HARMONIC id="44"> -<par_real name="cos" value="0.00596609" /> -<par_real name="sin" value="0.0281816" /> +<par_real name="cos" value="0.0051453" /> +<par_real name="sin" value="0.0243045" /> </BF_HARMONIC> <BF_HARMONIC id="45"> -<par_real name="cos" value="0.00519467" /> -<par_real name="sin" value="0.00173378" /> +<par_real name="cos" value="0.00448001" /> +<par_real name="sin" value="0.00149525" /> </BF_HARMONIC> <BF_HARMONIC id="46"> -<par_real name="cos" value="-0.0166948" /> -<par_real name="sin" value="0.0145807" /> +<par_real name="cos" value="-0.014398" /> +<par_real name="sin" value="0.0125747" /> </BF_HARMONIC> <BF_HARMONIC id="47"> -<par_real name="cos" value="0.00504126" /> -<par_real name="sin" value="0.0266224" /> +<par_real name="cos" value="0.0043477" /> +<par_real name="sin" value="0.0229598" /> </BF_HARMONIC> <BF_HARMONIC id="48"> -<par_real name="cos" value="0.040002" /> -<par_real name="sin" value="0.0710745" /> +<par_real name="cos" value="0.0344987" /> +<par_real name="sin" value="0.0612963" /> </BF_HARMONIC> <BF_HARMONIC id="49"> -<par_real name="cos" value="-0.0157999" /> -<par_real name="sin" value="0.0132119" /> +<par_real name="cos" value="-0.0136262" /> +<par_real name="sin" value="0.0113943" /> </BF_HARMONIC> <BF_HARMONIC id="50"> -<par_real name="cos" value="0.00421965" /> -<par_real name="sin" value="0.0252368" /> +<par_real name="cos" value="0.00363913" /> +<par_real name="sin" value="0.0217648" /> </BF_HARMONIC> <BF_HARMONIC id="51"> -<par_real name="cos" value="0.00511182" /> -<par_real name="sin" value="0.00195385" /> +<par_real name="cos" value="0.00440856" /> +<par_real name="sin" value="0.00168505" /> </BF_HARMONIC> <BF_HARMONIC id="52"> -<par_real name="cos" value="-0.0149939" /> -<par_real name="sin" value="0.0120003" /> +<par_real name="cos" value="-0.0129311" /> +<par_real name="sin" value="0.0103493" /> </BF_HARMONIC> <BF_HARMONIC id="53"> -<par_real name="cos" value="0.00348411" /> -<par_real name="sin" value="0.0239949" /> +<par_real name="cos" value="0.00300478" /> +<par_real name="sin" value="0.0206938" /> </BF_HARMONIC> <BF_HARMONIC id="54"> -<par_real name="cos" value="0.00793616" /> -<par_real name="sin" value="0.0022475" /> +<par_real name="cos" value="0.00684433" /> +<par_real name="sin" value="0.0019383" /> </BF_HARMONIC> <BF_HARMONIC id="55"> -<par_real name="cos" value="-0.0142621" /> -<par_real name="sin" value="0.0109206" /> +<par_real name="cos" value="-0.0123" /> +<par_real name="sin" value="0.00941819" /> </BF_HARMONIC> <BF_HARMONIC id="56"> -<par_real name="cos" value="0.0028212" /> -<par_real name="sin" value="0.0228736" /> +<par_real name="cos" value="0.00243307" /> +<par_real name="sin" value="0.0197267" /> </BF_HARMONIC> <BF_HARMONIC id="57"> -<par_real name="cos" value="0.00501922" /> -<par_real name="sin" value="0.00216982" /> +<par_real name="cos" value="0.0043287" /> +<par_real name="sin" value="0.0018713" /> </BF_HARMONIC> <BF_HARMONIC id="58"> -<par_real name="cos" value="-0.0135932" /> -<par_real name="sin" value="0.00995273" /> +<par_real name="cos" value="-0.0117231" /> +<par_real name="sin" value="0.00858347" /> </BF_HARMONIC> <BF_HARMONIC id="59"> -<par_real name="cos" value="0.00222018" /> -<par_real name="sin" value="0.0218543" /> +<par_real name="cos" value="0.00191474" /> +<par_real name="sin" value="0.0188477" /> </BF_HARMONIC> <BF_HARMONIC id="60"> -<par_real name="cos" value="-0.0283351" /> -<par_real name="sin" value="0.0514637" /> +<par_real name="cos" value="-0.0244369" /> +<par_real name="sin" value="0.0443835" /> </BF_HARMONIC> <BF_HARMONIC id="61"> -<par_real name="cos" value="-0.0129779" /> -<par_real name="sin" value="0.00908063" /> +<par_real name="cos" value="-0.0111925" /> +<par_real name="sin" value="0.00783135" /> </BF_HARMONIC> <BF_HARMONIC id="62"> -<par_real name="cos" value="0.00167243" /> -<par_real name="sin" value="0.0209219" /> +<par_real name="cos" value="0.00144234" /> +<par_real name="sin" value="0.0180435" /> </BF_HARMONIC> <BF_HARMONIC id="63"> -<par_real name="cos" value="0.00491707" /> -<par_real name="sin" value="0.00238123" /> +<par_real name="cos" value="0.0042406" /> +<par_real name="sin" value="0.00205363" /> </BF_HARMONIC> <BF_HARMONIC id="64"> -<par_real name="cos" value="-0.0124086" /> -<par_real name="sin" value="0.00829118" /> +<par_real name="cos" value="-0.0107015" /> +<par_real name="sin" value="0.00715051" /> </BF_HARMONIC> <BF_HARMONIC id="65"> -<par_real name="cos" value="0.0011709" /> -<par_real name="sin" value="0.0200643" /> +<par_real name="cos" value="0.00100981" /> +<par_real name="sin" value="0.0173039" /> </BF_HARMONIC> <BF_HARMONIC id="66"> -<par_real name="cos" value="0.0292786" /> -<par_real name="sin" value="0.0537015" /> +<par_real name="cos" value="0.0252506" /> +<par_real name="sin" value="0.0463135" /> </BF_HARMONIC> <BF_HARMONIC id="67"> -<par_real name="cos" value="-0.0118793" /> -<par_real name="sin" value="0.00757364" /> +<par_real name="cos" value="-0.010245" /> +<par_real name="sin" value="0.00653169" /> </BF_HARMONIC> <BF_HARMONIC id="68"> -<par_real name="cos" value="0.000709812" /> -<par_real name="sin" value="0.0192715" /> +<par_real name="cos" value="0.000612159" /> +<par_real name="sin" value="0.0166202" /> </BF_HARMONIC> <BF_HARMONIC id="69"> -<par_real name="cos" value="0.00480561" /> -<par_real name="sin" value="0.00258764" /> +<par_real name="cos" value="0.00414447" /> +<par_real name="sin" value="0.00223164" /> </BF_HARMONIC> <BF_HARMONIC id="70"> -<par_real name="cos" value="-0.0113848" /> -<par_real name="sin" value="0.00691909" /> +<par_real name="cos" value="-0.00981852" /> +<par_real name="sin" value="0.00596719" /> </BF_HARMONIC> <BF_HARMONIC id="71"> -<par_real name="cos" value="0.000284347" /> -<par_real name="sin" value="0.0185351" /> +<par_real name="cos" value="0.000245228" /> +<par_real name="sin" value="0.0159851" /> </BF_HARMONIC> <BF_HARMONIC id="72"> -<par_real name="cos" value="0.00761104" /> -<par_real name="sin" value="0.00293552" /> +<par_real name="cos" value="0.00656394" /> +<par_real name="sin" value="0.00253166" /> </BF_HARMONIC> <BF_HARMONIC id="73"> -<par_real name="cos" value="-0.0109209" /> -<par_real name="sin" value="0.00632009" /> +<par_real name="cos" value="-0.00941845" /> +<par_real name="sin" value="0.0054506" /> </BF_HARMONIC> <BF_HARMONIC id="74"> -<par_real name="cos" value="-0.000109516" /> -<par_real name="sin" value="0.0178481" /> +<par_real name="cos" value="-9.44492e-05" /> +<par_real name="sin" value="0.0153926" /> </BF_HARMONIC> <BF_HARMONIC id="75"> -<par_real name="cos" value="0.00468508" /> -<par_real name="sin" value="0.00278863" /> +<par_real name="cos" value="0.00404053" /> +<par_real name="sin" value="0.00240498" /> </BF_HARMONIC> <BF_HARMONIC id="76"> -<par_real name="cos" value="-0.0104841" /> -<par_real name="sin" value="0.00577037" /> +<par_real name="cos" value="-0.00904174" /> +<par_real name="sin" value="0.0049765" /> </BF_HARMONIC> <BF_HARMONIC id="77"> -<par_real name="cos" value="-0.000475173" /> -<par_real name="sin" value="0.0172048" /> +<par_real name="cos" value="-0.000409801" /> +<par_real name="sin" value="0.0148378" /> </BF_HARMONIC> <BF_HARMONIC id="78"> -<par_real name="cos" value="-0.0215994" /> -<par_real name="sin" value="0.0398762" /> +<par_real name="cos" value="-0.0186278" /> +<par_real name="sin" value="0.0343902" /> </BF_HARMONIC> <BF_HARMONIC id="79"> -<par_real name="cos" value="-0.0100713" /> -<par_real name="sin" value="0.00526462" /> +<par_real name="cos" value="-0.00868573" /> +<par_real name="sin" value="0.00454033" /> </BF_HARMONIC> <BF_HARMONIC id="80"> -<par_real name="cos" value="-0.000815505" /> -<par_real name="sin" value="0.0166" /> +<par_real name="cos" value="-0.000703311" /> +<par_real name="sin" value="0.0143162" /> </BF_HARMONIC> <BF_HARMONIC id="81"> -<par_real name="cos" value="0.00455576" /> -<par_real name="sin" value="0.00298378" /> +<par_real name="cos" value="0.003929" /> +<par_real name="sin" value="0.00257328" /> </BF_HARMONIC> <BF_HARMONIC id="82"> -<par_real name="cos" value="-0.00967999" /> -<par_real name="sin" value="0.00479828" /> +<par_real name="cos" value="-0.00834825" /> +<par_real name="sin" value="0.00413815" /> </BF_HARMONIC> <BF_HARMONIC id="83"> -<par_real name="cos" value="-0.00113298" /> -<par_real name="sin" value="0.0160296" /> +<par_real name="cos" value="-0.000977109" /> +<par_real name="sin" value="0.0138243" /> </BF_HARMONIC> <BF_HARMONIC id="84"> -<par_real name="cos" value="0.0229208" /> -<par_real name="sin" value="0.0439837" /> +<par_real name="cos" value="0.0197674" /> +<par_real name="sin" value="0.0379326" /> </BF_HARMONIC> <BF_HARMONIC id="85"> -<par_real name="cos" value="-0.009308" /> -<par_real name="sin" value="0.00436746" /> +<par_real name="cos" value="-0.00802744" /> +<par_real name="sin" value="0.0037666" /> </BF_HARMONIC> <BF_HARMONIC id="86"> -<par_real name="cos" value="-0.00142971" /> -<par_real name="sin" value="0.0154898" /> +<par_real name="cos" value="-0.00123302" /> +<par_real name="sin" value="0.0133588" /> </BF_HARMONIC> <BF_HARMONIC id="87"> -<par_real name="cos" value="0.00441794" /> -<par_real name="sin" value="0.00317269" /> +<par_real name="cos" value="0.00381014" /> +<par_real name="sin" value="0.0027362" /> </BF_HARMONIC> <BF_HARMONIC id="88"> -<par_real name="cos" value="-0.00895342" /> -<par_real name="sin" value="0.00396878" /> +<par_real name="cos" value="-0.00772164" /> +<par_real name="sin" value="0.00342277" /> </BF_HARMONIC> <BF_HARMONIC id="89"> -<par_real name="cos" value="-0.00170752" /> -<par_real name="sin" value="0.0149777" /> +<par_real name="cos" value="-0.00147261" /> +<par_real name="sin" value="0.0129171" /> </BF_HARMONIC> <BF_HARMONIC id="90"> -<par_real name="cos" value="0.00720426" /> -<par_real name="sin" value="0.0035728" /> +<par_real name="cos" value="0.00621313" /> +<par_real name="sin" value="0.00308127" /> </BF_HARMONIC> <BF_HARMONIC id="91"> -<par_real name="cos" value="-0.00861464" /> -<par_real name="sin" value="0.0035993" /> +<par_real name="cos" value="-0.00742947" /> +<par_real name="sin" value="0.00310412" /> </BF_HARMONIC> <BF_HARMONIC id="92"> -<par_real name="cos" value="-0.00196802" /> -<par_real name="sin" value="0.0144903" /> +<par_real name="cos" value="-0.00169727" /> +<par_real name="sin" value="0.0124968" /> </BF_HARMONIC> <BF_HARMONIC id="93"> -<par_real name="cos" value="0.00427192" /> -<par_real name="sin" value="0.00335498" /> +<par_real name="cos" value="0.00368421" /> +<par_real name="sin" value="0.00289341" /> </BF_HARMONIC> <BF_HARMONIC id="94"> -<par_real name="cos" value="-0.00829023" /> -<par_real name="sin" value="0.00325647" /> +<par_real name="cos" value="-0.00714969" /> +<par_real name="sin" value="0.00280846" /> </BF_HARMONIC> <BF_HARMONIC id="95"> -<par_real name="cos" value="-0.00221258" /> -<par_real name="sin" value="0.0140254" /> +<par_real name="cos" value="-0.00190818" /> +<par_real name="sin" value="0.0120958" /> </BF_HARMONIC> <BF_HARMONIC id="96"> -<par_real name="cos" value="-0.0175751" /> -<par_real name="sin" value="0.0327984" /> +<par_real name="cos" value="-0.0151572" /> +<par_real name="sin" value="0.0282861" /> </BF_HARMONIC> <BF_HARMONIC id="97"> -<par_real name="cos" value="-0.00797899" /> -<par_real name="sin" value="0.00293804" /> +<par_real name="cos" value="-0.00688127" /> +<par_real name="sin" value="0.00253384" /> </BF_HARMONIC> <BF_HARMONIC id="98"> -<par_real name="cos" value="-0.00244242" /> -<par_real name="sin" value="0.0135808" /> +<par_real name="cos" value="-0.0021064" /> +<par_real name="sin" value="0.0117124" /> </BF_HARMONIC> <BF_HARMONIC id="99"> -<par_real name="cos" value="0.00411804" /> -<par_real name="sin" value="0.00353027" /> +<par_real name="cos" value="0.0035515" /> +<par_real name="sin" value="0.00304459" /> </BF_HARMONIC> <BF_HARMONIC id="100"> -<par_real name="cos" value="-0.00767981" /> -<par_real name="sin" value="0.00264203" /> +<par_real name="cos" value="-0.00662325" /> +<par_real name="sin" value="0.00227855" /> </BF_HARMONIC> <BF_HARMONIC id="101"> -<par_real name="cos" value="-0.00265862" /> -<par_real name="sin" value="0.0131547" /> +<par_real name="cos" value="-0.00229286" /> +<par_real name="sin" value="0.0113449" /> </BF_HARMONIC> <BF_HARMONIC id="102"> -<par_real name="cos" value="0.0185817" /> -<par_real name="sin" value="0.037832" /> +<par_real name="cos" value="0.0160253" /> +<par_real name="sin" value="0.0326272" /> </BF_HARMONIC> <BF_HARMONIC id="103"> -<par_real name="cos" value="-0.00739178" /> -<par_real name="sin" value="0.00236668" /> +<par_real name="cos" value="-0.00637485" /> +<par_real name="sin" value="0.00204108" /> </BF_HARMONIC> <BF_HARMONIC id="104"> -<par_real name="cos" value="-0.00286212" /> -<par_real name="sin" value="0.0127456" /> +<par_real name="cos" value="-0.00246836" /> +<par_real name="sin" value="0.0109921" /> </BF_HARMONIC> <BF_HARMONIC id="105"> -<par_real name="cos" value="0.00395663" /> -<par_real name="sin" value="0.0036982" /> +<par_real name="cos" value="0.00341229" /> +<par_real name="sin" value="0.00318942" /> </BF_HARMONIC> <BF_HARMONIC id="106"> -<par_real name="cos" value="-0.00711405" /> -<par_real name="sin" value="0.00211044" /> +<par_real name="cos" value="-0.00613533" /> +<par_real name="sin" value="0.00182009" /> </BF_HARMONIC> <BF_HARMONIC id="107"> -<par_real name="cos" value="-0.00305376" /> -<par_real name="sin" value="0.012352" /> +<par_real name="cos" value="-0.00263364" /> +<par_real name="sin" value="0.0106527" /> </BF_HARMONIC> <BF_HARMONIC id="108"> -<par_real name="cos" value="0.00672393" /> -<par_real name="sin" value="0.00414868" /> +<par_real name="cos" value="0.00579888" /> +<par_real name="sin" value="0.00357792" /> </BF_HARMONIC> <BF_HARMONIC id="109"> -<par_real name="cos" value="-0.00684589" /> -<par_real name="sin" value="0.00187192" /> +<par_real name="cos" value="-0.00590406" /> +<par_real name="sin" value="0.00161439" /> </BF_HARMONIC> <BF_HARMONIC id="110"> -<par_real name="cos" value="-0.0032343" /> -<par_real name="sin" value="0.0119726" /> +<par_real name="cos" value="-0.00278934" /> +<par_real name="sin" value="0.0103255" /> </BF_HARMONIC> <BF_HARMONIC id="111"> -<par_real name="cos" value="0.00378807" /> -<par_real name="sin" value="0.00385845" /> +<par_real name="cos" value="0.00326692" /> +<par_real name="sin" value="0.00332762" /> </BF_HARMONIC> <BF_HARMONIC id="112"> -<par_real name="cos" value="-0.00658666" /> -<par_real name="sin" value="0.00164987" /> +<par_real name="cos" value="-0.00568049" /> +<par_real name="sin" value="0.00142289" /> </BF_HARMONIC> <BF_HARMONIC id="113"> -<par_real name="cos" value="-0.0034044" /> -<par_real name="sin" value="0.0116063" /> +<par_real name="cos" value="-0.00293604" /> +<par_real name="sin" value="0.0100096" /> </BF_HARMONIC> <BF_HARMONIC id="114"> -<par_real name="cos" value="-0.0150059" /> -<par_real name="sin" value="0.0280588" /> +<par_real name="cos" value="-0.0129414" /> +<par_real name="sin" value="0.0241986" /> </BF_HARMONIC> <BF_HARMONIC id="115"> -<par_real name="cos" value="-0.00633577" /> -<par_real name="sin" value="0.00144318" /> +<par_real name="cos" value="-0.00546412" /> +<par_real name="sin" value="0.00124463" /> </BF_HARMONIC> <BF_HARMONIC id="116"> -<par_real name="cos" value="-0.00356467" /> -<par_real name="sin" value="0.0112522" /> +<par_real name="cos" value="-0.00307426" /> +<par_real name="sin" value="0.00970417" /> </BF_HARMONIC> <BF_HARMONIC id="117"> -<par_real name="cos" value="0.00361272" /> -<par_real name="sin" value="0.00401069" /> +<par_real name="cos" value="0.0031157" /> +<par_real name="sin" value="0.00345891" /> </BF_HARMONIC> <BF_HARMONIC id="118"> -<par_real name="cos" value="-0.00609273" /> -<par_real name="sin" value="0.00125083" /> +<par_real name="cos" value="-0.00525452" /> +<par_real name="sin" value="0.00107875" /> </BF_HARMONIC> <BF_HARMONIC id="119"> -<par_real name="cos" value="-0.00371564" /> -<par_real name="sin" value="0.0109093" /> +<par_real name="cos" value="-0.00320446" /> +<par_real name="sin" value="0.00940844" /> </BF_HARMONIC> <BF_HARMONIC id="120"> -<par_real name="cos" value="0.0153286" /> -<par_real name="sin" value="0.0336055" /> +<par_real name="cos" value="0.0132198" /> +<par_real name="sin" value="0.0289822" /> </BF_HARMONIC> <BF_HARMONIC id="121"> -<par_real name="cos" value="-0.00585706" /> -<par_real name="sin" value="0.00107192" /> +<par_real name="cos" value="-0.00505127" /> +<par_real name="sin" value="0.000924449" /> </BF_HARMONIC> <BF_HARMONIC id="122"> -<par_real name="cos" value="-0.0038578" /> -<par_real name="sin" value="0.0105768" /> +<par_real name="cos" value="-0.00332706" /> +<par_real name="sin" value="0.00912169" /> </BF_HARMONIC> <BF_HARMONIC id="123"> -<par_real name="cos" value="0.00343099" /> -<par_real name="sin" value="0.00415462" /> +<par_real name="cos" value="0.00295897" /> +<par_real name="sin" value="0.00358304" /> </BF_HARMONIC> <BF_HARMONIC id="124"> -<par_real name="cos" value="-0.00562837" /> -<par_real name="sin" value="0.000905613" /> +<par_real name="cos" value="-0.00485404" /> +<par_real name="sin" value="0.000781022" /> </BF_HARMONIC> <BF_HARMONIC id="125"> -<par_real name="cos" value="-0.00399161" /> -<par_real name="sin" value="0.0102541" /> +<par_real name="cos" value="-0.00344246" /> +<par_real name="sin" value="0.00884338" /> </BF_HARMONIC> <BF_HARMONIC id="126"> -<par_real name="cos" value="0.00617957" /> -<par_real name="sin" value="0.00465382" /> +<par_real name="cos" value="0.00532941" /> +<par_real name="sin" value="0.00401357" /> </BF_HARMONIC> <BF_HARMONIC id="127"> -<par_real name="cos" value="-0.0054063" /> -<par_real name="sin" value="0.000751163" /> +<par_real name="cos" value="-0.00466252" /> +<par_real name="sin" value="0.000647821" /> </BF_HARMONIC> <BF_HARMONIC id="128"> -<par_real name="cos" value="-0.00411745" /> -<par_real name="sin" value="0.0099404" /> +<par_real name="cos" value="-0.00355099" /> +<par_real name="sin" value="0.00857284" /> </BF_HARMONIC> <BF_HARMONIC id="129"> -<par_real name="cos" value="0.00324327" /> -<par_real name="sin" value="0.00428996" /> +<par_real name="cos" value="0.00279707" /> +<par_real name="sin" value="0.00369976" /> </BF_HARMONIC> <BF_HARMONIC id="130"> -<par_real name="cos" value="-0.00519051" /> -<par_real name="sin" value="0.000607879" /> +<par_real name="cos" value="-0.00447642" /> +<par_real name="sin" value="0.000524249" /> </BF_HARMONIC> <BF_HARMONIC id="131"> -<par_real name="cos" value="-0.0042357" /> -<par_real name="sin" value="0.00963527" /> +<par_real name="cos" value="-0.00365297" /> +<par_real name="sin" value="0.00830969" /> </BF_HARMONIC> <BF_HARMONIC id="132"> -<par_real name="cos" value="-0.0133147" /> -<par_real name="sin" value="0.0246662" /> +<par_real name="cos" value="-0.0114829" /> +<par_real name="sin" value="0.0212727" /> </BF_HARMONIC> <BF_HARMONIC id="133"> -<par_real name="cos" value="-0.00498071" /> -<par_real name="sin" value="0.000475133" /> +<par_real name="cos" value="-0.00429548" /> +<par_real name="sin" value="0.000409766" /> </BF_HARMONIC> <BF_HARMONIC id="134"> -<par_real name="cos" value="-0.00434669" /> -<par_real name="sin" value="0.00933812" /> +<par_real name="cos" value="-0.00374869" /> +<par_real name="sin" value="0.00805342" /> </BF_HARMONIC> <BF_HARMONIC id="135"> -<par_real name="cos" value="0.00304999" /> -<par_real name="sin" value="0.00441645" /> +<par_real name="cos" value="0.00263038" /> +<par_real name="sin" value="0.00380885" /> </BF_HARMONIC> <BF_HARMONIC id="136"> -<par_real name="cos" value="-0.00477664" /> -<par_real name="sin" value="0.000352346" /> +<par_real name="cos" value="-0.00411949" /> +<par_real name="sin" value="0.000303872" /> </BF_HARMONIC> <BF_HARMONIC id="137"> -<par_real name="cos" value="-0.00445073" /> -<par_real name="sin" value="0.00904849" /> +<par_real name="cos" value="-0.00383842" /> +<par_real name="sin" value="0.00780363" /> </BF_HARMONIC> <BF_HARMONIC id="138"> -<par_real name="cos" value="0.0127215" /> -<par_real name="sin" value="0.0305155" /> +<par_real name="cos" value="0.0109713" /> +<par_real name="sin" value="0.0263173" /> </BF_HARMONIC> <BF_HARMONIC id="139"> -<par_real name="cos" value="-0.00457807" /> -<par_real name="sin" value="0.000238988" /> +<par_real name="cos" value="-0.00394824" /> +<par_real name="sin" value="0.000206109" /> </BF_HARMONIC> <BF_HARMONIC id="140"> -<par_real name="cos" value="-0.00454809" /> -<par_real name="sin" value="0.00876597" /> +<par_real name="cos" value="-0.00392238" /> +<par_real name="sin" value="0.00755998" /> </BF_HARMONIC> <BF_HARMONIC id="141"> -<par_real name="cos" value="0.00285158" /> -<par_real name="sin" value="0.00453385" /> +<par_real name="cos" value="0.00245927" /> +<par_real name="sin" value="0.0039101" /> </BF_HARMONIC> <BF_HARMONIC id="142"> -<par_real name="cos" value="-0.00438479" /> -<par_real name="sin" value="0.000134566" /> +<par_real name="cos" value="-0.00378155" /> +<par_real name="sin" value="0.000116053" /> </BF_HARMONIC> <BF_HARMONIC id="143"> -<par_real name="cos" value="-0.00463905" /> -<par_real name="sin" value="0.00849016" /> +<par_real name="cos" value="-0.00400083" /> +<par_real name="sin" value="0.00732212" /> </BF_HARMONIC> <BF_HARMONIC id="144"> -<par_real name="cos" value="0.00558194" /> -<par_real name="sin" value="0.00508036" /> +<par_real name="cos" value="0.004814" /> +<par_real name="sin" value="0.00438142" /> </BF_HARMONIC> <BF_HARMONIC id="145"> -<par_real name="cos" value="-0.00419659" /> -<par_real name="sin" value="3.8626e-05" /> +<par_real name="cos" value="-0.00361924" /> +<par_real name="sin" value="3.3312e-05" /> </BF_HARMONIC> <BF_HARMONIC id="146"> -<par_real name="cos" value="-0.00472385" /> -<par_real name="sin" value="0.00822073" /> +<par_real name="cos" value="-0.00407396" /> +<par_real name="sin" value="0.00708975" /> </BF_HARMONIC> <BF_HARMONIC id="147"> -<par_real name="cos" value="0.00264847" /> -<par_real name="sin" value="0.00464195" /> +<par_real name="cos" value="0.0022841" /> +<par_real name="sin" value="0.00400333" /> </BF_HARMONIC> <BF_HARMONIC id="148"> -<par_real name="cos" value="-0.00401331" /> -<par_real name="sin" value="-4.92532e-05" /> +<par_real name="cos" value="-0.00346117" /> +<par_real name="sin" value="-4.24771e-05" /> </BF_HARMONIC> <BF_HARMONIC id="149"> -<par_real name="cos" value="-0.0048027" /> -<par_real name="sin" value="0.00795735" /> +<par_real name="cos" value="-0.00414196" /> +<par_real name="sin" value="0.00686261" /> </BF_HARMONIC> <BF_HARMONIC id="150"> -<par_real name="cos" value="-0.0121954" /> -<par_real name="sin" value="0.0221025" /> +<par_real name="cos" value="-0.0105176" /> +<par_real name="sin" value="0.0190617" /> </BF_HARMONIC> <BF_HARMONIC id="151"> -<par_real name="cos" value="-0.0038348" /> -<par_real name="sin" value="-0.000129464" /> +<par_real name="cos" value="-0.00330722" /> +<par_real name="sin" value="-0.000111653" /> </BF_HARMONIC> <BF_HARMONIC id="152"> -<par_real name="cos" value="-0.00487581" /> -<par_real name="sin" value="0.00769974" /> +<par_real name="cos" value="-0.00420502" /> +<par_real name="sin" value="0.00664044" /> </BF_HARMONIC> <BF_HARMONIC id="153"> -<par_real name="cos" value="0.00244113" /> -<par_real name="sin" value="0.00474053" /> +<par_real name="cos" value="0.00210529" /> +<par_real name="sin" value="0.00408835" /> </BF_HARMONIC> <BF_HARMONIC id="154"> -<par_real name="cos" value="-0.0036609" /> -<par_real name="sin" value="-0.000202373" /> +<par_real name="cos" value="-0.00315725" /> +<par_real name="sin" value="-0.000174531" /> </BF_HARMONIC> <BF_HARMONIC id="155"> -<par_real name="cos" value="-0.00494338" /> -<par_real name="sin" value="0.00744765" /> +<par_real name="cos" value="-0.00426329" /> +<par_real name="sin" value="0.00642303" /> </BF_HARMONIC> <BF_HARMONIC id="156"> -<par_real name="cos" value="0.0105292" /> -<par_real name="sin" value="0.0281353" /> +<par_real name="cos" value="0.00908063" /> +<par_real name="sin" value="0.0242646" /> </BF_HARMONIC> <BF_HARMONIC id="157"> -<par_real name="cos" value="-0.0034915" /> -<par_real name="sin" value="-0.000268321" /> +<par_real name="cos" value="-0.00301115" /> +<par_real name="sin" value="-0.000231406" /> </BF_HARMONIC> <BF_HARMONIC id="158"> -<par_real name="cos" value="-0.00500559" /> -<par_real name="sin" value="0.00720084" /> +<par_real name="cos" value="-0.00431694" /> +<par_real name="sin" value="0.00621018" /> </BF_HARMONIC> <BF_HARMONIC id="159"> -<par_real name="cos" value="0.00223" /> -<par_real name="sin" value="0.00482944" /> +<par_real name="cos" value="0.00192321" /> +<par_real name="sin" value="0.00416502" /> </BF_HARMONIC> <BF_HARMONIC id="160"> -<par_real name="cos" value="-0.00332648" /> -<par_real name="sin" value="-0.00032763" /> +<par_real name="cos" value="-0.00286884" /> +<par_real name="sin" value="-0.000282556" /> </BF_HARMONIC> <BF_HARMONIC id="161"> -<par_real name="cos" value="-0.00506261" /> -<par_real name="sin" value="0.0069591" /> +<par_real name="cos" value="-0.00436612" /> +<par_real name="sin" value="0.00600169" /> </BF_HARMONIC> <BF_HARMONIC id="162"> -<par_real name="cos" value="0.00494278" /> -<par_real name="sin" value="0.00542209" /> +<par_real name="cos" value="0.00426277" /> +<par_real name="sin" value="0.00467614" /> </BF_HARMONIC> <BF_HARMONIC id="163"> -<par_real name="cos" value="-0.00316573" /> -<par_real name="sin" value="-0.000380599" /> +<par_real name="cos" value="-0.0027302" /> +<par_real name="sin" value="-0.000328238" /> </BF_HARMONIC> <BF_HARMONIC id="164"> -<par_real name="cos" value="-0.0051146" /> -<par_real name="sin" value="0.00672223" /> +<par_real name="cos" value="-0.00441095" /> +<par_real name="sin" value="0.00579741" /> </BF_HARMONIC> <BF_HARMONIC id="165"> -<par_real name="cos" value="0.00201556" /> -<par_real name="sin" value="0.00490852" /> +<par_real name="cos" value="0.00173827" /> +<par_real name="sin" value="0.00423322" /> </BF_HARMONIC> <BF_HARMONIC id="166"> -<par_real name="cos" value="-0.00300916" /> -<par_real name="sin" value="-0.000427514" /> +<par_real name="cos" value="-0.00259517" /> +<par_real name="sin" value="-0.000368698" /> </BF_HARMONIC> <BF_HARMONIC id="167"> -<par_real name="cos" value="-0.00516171" /> -<par_real name="sin" value="0.00649007" /> +<par_real name="cos" value="-0.00445158" /> +<par_real name="sin" value="0.00559719" /> </BF_HARMONIC> <BF_HARMONIC id="168"> -<par_real name="cos" value="-0.0114675" /> -<par_real name="sin" value="0.0200701" /> +<par_real name="cos" value="-0.00988985" /> +<par_real name="sin" value="0.0173089" /> </BF_HARMONIC> <BF_HARMONIC id="169"> -<par_real name="cos" value="-0.00285668" /> -<par_real name="sin" value="-0.00046864" /> +<par_real name="cos" value="-0.00246367" /> +<par_real name="sin" value="-0.000404166" /> </BF_HARMONIC> <BF_HARMONIC id="170"> -<par_real name="cos" value="-0.00520409" /> -<par_real name="sin" value="0.00626244" /> +<par_real name="cos" value="-0.00448813" /> +<par_real name="sin" value="0.00540088" /> </BF_HARMONIC> <BF_HARMONIC id="171"> -<par_real name="cos" value="0.00179827" /> -<par_real name="sin" value="0.00497764" /> +<par_real name="cos" value="0.00155087" /> +<par_real name="sin" value="0.00429284" /> </BF_HARMONIC> <BF_HARMONIC id="172"> -<par_real name="cos" value="-0.00270822" /> -<par_real name="sin" value="-0.000504231" /> +<par_real name="cos" value="-0.00233563" /> +<par_real name="sin" value="-0.000434861" /> </BF_HARMONIC> <BF_HARMONIC id="173"> -<par_real name="cos" value="-0.00524186" /> -<par_real name="sin" value="0.00603922" /> +<par_real name="cos" value="-0.00452071" /> +<par_real name="sin" value="0.00520837" /> </BF_HARMONIC> <BF_HARMONIC id="174"> -<par_real name="cos" value="0.00862188" /> -<par_real name="sin" value="0.0262136" /> +<par_real name="cos" value="0.00743572" /> +<par_real name="sin" value="0.0226072" /> </BF_HARMONIC> <BF_HARMONIC id="175"> -<par_real name="cos" value="-0.0025637" /> -<par_real name="sin" value="-0.000534526" /> +<par_real name="cos" value="-0.002211" /> +<par_real name="sin" value="-0.000460988" /> </BF_HARMONIC> <BF_HARMONIC id="176"> -<par_real name="cos" value="-0.00527517" /> -<par_real name="sin" value="0.00582025" /> +<par_real name="cos" value="-0.00454943" /> +<par_real name="sin" value="0.00501952" /> </BF_HARMONIC> <BF_HARMONIC id="177"> -<par_real name="cos" value="0.00157863" /> -<par_real name="sin" value="0.0050367" /> +<par_real name="cos" value="0.00136145" /> +<par_real name="sin" value="0.00434377" /> </BF_HARMONIC> <BF_HARMONIC id="178"> -<par_real name="cos" value="-0.00242305" /> -<par_real name="sin" value="-0.000559754" /> +<par_real name="cos" value="-0.0020897" /> +<par_real name="sin" value="-0.000482745" /> </BF_HARMONIC> <BF_HARMONIC id="179"> -<par_real name="cos" value="-0.00530413" /> -<par_real name="sin" value="0.00560544" /> +<par_real name="cos" value="-0.00457441" /> +<par_real name="sin" value="0.00483427" /> </BF_HARMONIC> <BF_HARMONIC id="180"> -<par_real name="cos" value="0.00427461" /> -<par_real name="sin" value="0.00567459" /> +<par_real name="cos" value="0.00368653" /> +<par_real name="sin" value="0.0048939" /> </BF_HARMONIC> <BF_HARMONIC id="181"> -<par_real name="cos" value="-0.00228622" /> -<par_real name="sin" value="-0.000580129" /> +<par_real name="cos" value="-0.00197169" /> +<par_real name="sin" value="-0.000500317" /> </BF_HARMONIC> <BF_HARMONIC id="182"> -<par_real name="cos" value="-0.00532886" /> -<par_real name="sin" value="0.00539466" /> +<par_real name="cos" value="-0.00459574" /> +<par_real name="sin" value="0.00465248" /> </BF_HARMONIC> <BF_HARMONIC id="183"> -<par_real name="cos" value="0.00135711" /> -<par_real name="sin" value="0.00508561" /> +<par_real name="cos" value="0.0011704" /> +<par_real name="sin" value="0.00438595" /> </BF_HARMONIC> <BF_HARMONIC id="184"> -<par_real name="cos" value="-0.00215316" /> -<par_real name="sin" value="-0.00059586" /> +<par_real name="cos" value="-0.00185694" /> +<par_real name="sin" value="-0.000513884" /> </BF_HARMONIC> <BF_HARMONIC id="185"> -<par_real name="cos" value="-0.00534948" /> -<par_real name="sin" value="0.00518782" /> +<par_real name="cos" value="-0.00461352" /> +<par_real name="sin" value="0.0044741" /> </BF_HARMONIC> <BF_HARMONIC id="186"> -<par_real name="cos" value="-0.0110151" /> -<par_real name="sin" value="0.0183864" /> +<par_real name="cos" value="-0.00949969" /> +<par_real name="sin" value="0.0158569" /> </BF_HARMONIC> <BF_HARMONIC id="187"> -<par_real name="cos" value="-0.00202381" /> -<par_real name="sin" value="-0.000607143" /> +<par_real name="cos" value="-0.00174538" /> +<par_real name="sin" value="-0.000523615" /> </BF_HARMONIC> <BF_HARMONIC id="188"> -<par_real name="cos" value="-0.00536609" /> -<par_real name="sin" value="0.00498484" /> +<par_real name="cos" value="-0.00462784" /> +<par_real name="sin" value="0.00429905" /> </BF_HARMONIC> <BF_HARMONIC id="189"> -<par_real name="cos" value="0.0011342" /> -<par_real name="sin" value="0.00512431" /> +<par_real name="cos" value="0.000978161" /> +<par_real name="sin" value="0.00441933" /> </BF_HARMONIC> <BF_HARMONIC id="190"> -<par_real name="cos" value="-0.00189813" /> -<par_real name="sin" value="-0.000614167" /> +<par_real name="cos" value="-0.00163699" /> +<par_real name="sin" value="-0.000529672" /> </BF_HARMONIC> <BF_HARMONIC id="191"> -<par_real name="cos" value="-0.0053788" /> -<par_real name="sin" value="0.00478563" /> +<par_real name="cos" value="-0.00463881" /> +<par_real name="sin" value="0.00412724" /> </BF_HARMONIC> <BF_HARMONIC id="192"> -<par_real name="cos" value="0.00692356" /> -<par_real name="sin" value="0.0245934" /> +<par_real name="cos" value="0.00597104" /> +<par_real name="sin" value="0.0212099" /> </BF_HARMONIC> <BF_HARMONIC id="193"> -<par_real name="cos" value="-0.00177608" /> -<par_real name="sin" value="-0.000617113" /> +<par_real name="cos" value="-0.00153173" /> +<par_real name="sin" value="-0.000532213" /> </BF_HARMONIC> <BF_HARMONIC id="194"> -<par_real name="cos" value="-0.00538771" /> -<par_real name="sin" value="0.00459011" /> +<par_real name="cos" value="-0.00464649" /> +<par_real name="sin" value="0.00395862" /> </BF_HARMONIC> <BF_HARMONIC id="195"> -<par_real name="cos" value="0.000910385" /> -<par_real name="sin" value="0.00515278" /> +<par_real name="cos" value="0.000785138" /> +<par_real name="sin" value="0.00444388" /> </BF_HARMONIC> <BF_HARMONIC id="196"> -<par_real name="cos" value="-0.00165762" /> -<par_real name="sin" value="-0.000616155" /> +<par_real name="cos" value="-0.00142957" /> +<par_real name="sin" value="-0.000531387" /> </BF_HARMONIC> <BF_HARMONIC id="197"> -<par_real name="cos" value="-0.00539291" /> -<par_real name="sin" value="0.00439823" /> +<par_real name="cos" value="-0.00465097" /> +<par_real name="sin" value="0.00379314" /> </BF_HARMONIC> <BF_HARMONIC id="198"> -<par_real name="cos" value="0.00359039" /> -<par_real name="sin" value="0.0058353" /> +<par_real name="cos" value="0.00309644" /> +<par_real name="sin" value="0.0050325" /> </BF_HARMONIC> <BF_HARMONIC id="199"> -<par_real name="cos" value="-0.00154271" /> -<par_real name="sin" value="-0.00061146" /> +<par_real name="cos" value="-0.00133047" /> +<par_real name="sin" value="-0.000527338" /> </BF_HARMONIC> <BF_HARMONIC id="200"> -<par_real name="cos" value="-0.00539452" /> -<par_real name="sin" value="0.00420992" /> +<par_real name="cos" value="-0.00465236" /> +<par_real name="sin" value="0.00363074" /> </BF_HARMONIC> <BF_HARMONIC id="201"> -<par_real name="cos" value="0.000686154" /> -<par_real name="sin" value="0.00517099" /> +<par_real name="cos" value="0.000591756" /> +<par_real name="sin" value="0.00445959" /> </BF_HARMONIC> <BF_HARMONIC id="202"> -<par_real name="cos" value="-0.00143132" /> -<par_real name="sin" value="-0.00060319" /> +<par_real name="cos" value="-0.0012344" /> +<par_real name="sin" value="-0.000520205" /> </BF_HARMONIC> <BF_HARMONIC id="203"> -<par_real name="cos" value="-0.00539261" /> -<par_real name="sin" value="0.00402513" /> +<par_real name="cos" value="-0.00465072" /> +<par_real name="sin" value="0.00347137" /> </BF_HARMONIC> <BF_HARMONIC id="204"> -<par_real name="cos" value="-0.0107583" /> -<par_real name="sin" value="0.0169337" /> +<par_real name="cos" value="-0.00927822" /> +<par_real name="sin" value="0.014604" /> </BF_HARMONIC> <BF_HARMONIC id="205"> -<par_real name="cos" value="-0.00132343" /> -<par_real name="sin" value="-0.000591499" /> +<par_real name="cos" value="-0.00114136" /> +<par_real name="sin" value="-0.000510123" /> </BF_HARMONIC> <BF_HARMONIC id="206"> -<par_real name="cos" value="-0.00538727" /> -<par_real name="sin" value="0.00384381" /> +<par_real name="cos" value="-0.00464611" /> +<par_real name="sin" value="0.00331499" /> </BF_HARMONIC> <BF_HARMONIC id="207"> -<par_real name="cos" value="0.000461997" /> -<par_real name="sin" value="0.00517897" /> +<par_real name="cos" value="0.000398437" /> +<par_real name="sin" value="0.00446647" /> </BF_HARMONIC> <BF_HARMONIC id="208"> -<par_real name="cos" value="-0.00121899" /> -<par_real name="sin" value="-0.000576539" /> +<par_real name="cos" value="-0.00105129" /> +<par_real name="sin" value="-0.000497221" /> </BF_HARMONIC> <BF_HARMONIC id="209"> -<par_real name="cos" value="-0.00537861" /> -<par_real name="sin" value="0.00366592" /> +<par_real name="cos" value="-0.00463864" /> +<par_real name="sin" value="0.00316158" /> </BF_HARMONIC> <BF_HARMONIC id="210"> -<par_real name="cos" value="0.00538897" /> -<par_real name="sin" value="0.0231723" /> +<par_real name="cos" value="0.00464758" /> +<par_real name="sin" value="0.0199843" /> </BF_HARMONIC> <BF_HARMONIC id="211"> -<par_real name="cos" value="-0.00111799" /> -<par_real name="sin" value="-0.000558456" /> +<par_real name="cos" value="-0.000964181" /> +<par_real name="sin" value="-0.000481626" /> </BF_HARMONIC> <BF_HARMONIC id="212"> -<par_real name="cos" value="-0.0053667" /> -<par_real name="sin" value="0.00349142" /> +<par_real name="cos" value="-0.00462837" /> +<par_real name="sin" value="0.00301108" /> </BF_HARMONIC> <BF_HARMONIC id="213"> -<par_real name="cos" value="0.000238399" /> -<par_real name="sin" value="0.00517675" /> +<par_real name="cos" value="0.000205601" /> +<par_real name="sin" value="0.00446455" /> </BF_HARMONIC> <BF_HARMONIC id="214"> -<par_real name="cos" value="-0.0010204" /> -<par_real name="sin" value="-0.00053739" /> +<par_real name="cos" value="-0.000880017" /> +<par_real name="sin" value="-0.000463458" /> </BF_HARMONIC> <BF_HARMONIC id="215"> -<par_real name="cos" value="-0.00535163" /> -<par_real name="sin" value="0.00332027" /> +<par_real name="cos" value="-0.00461537" /> +<par_real name="sin" value="0.00286348" /> </BF_HARMONIC> <BF_HARMONIC id="216"> -<par_real name="cos" value="0.00290328" /> -<par_real name="sin" value="0.00590358" /> +<par_real name="cos" value="0.00250386" /> +<par_real name="sin" value="0.00509139" /> </BF_HARMONIC> <BF_HARMONIC id="217"> -<par_real name="cos" value="-0.00092619" /> -<par_real name="sin" value="-0.000513478" /> +<par_real name="cos" value="-0.000798768" /> +<par_real name="sin" value="-0.000442836" /> </BF_HARMONIC> <BF_HARMONIC id="218"> -<par_real name="cos" value="-0.00533348" /> -<par_real name="sin" value="0.00315245" /> +<par_real name="cos" value="-0.00459972" /> +<par_real name="sin" value="0.00271875" /> </BF_HARMONIC> <BF_HARMONIC id="219"> -<par_real name="cos" value="1.58442e-05" /> -<par_real name="sin" value="0.00516439" /> +<par_real name="cos" value="1.36644e-05" /> +<par_real name="sin" value="0.00445389" /> </BF_HARMONIC> <BF_HARMONIC id="220"> -<par_real name="cos" value="-0.000835346" /> -<par_real name="sin" value="-0.000486854" /> +<par_real name="cos" value="-0.000720422" /> +<par_real name="sin" value="-0.000419875" /> </BF_HARMONIC> <BF_HARMONIC id="221"> -<par_real name="cos" value="-0.00531234" /> -<par_real name="sin" value="0.00298791" /> +<par_real name="cos" value="-0.00458149" /> +<par_real name="sin" value="0.00257684" /> </BF_HARMONIC> <BF_HARMONIC id="222"> -<par_real name="cos" value="-0.0106388" /> -<par_real name="sin" value="0.0156338" /> +<par_real name="cos" value="-0.00917516" /> +<par_real name="sin" value="0.013483" /> </BF_HARMONIC> <BF_HARMONIC id="223"> -<par_real name="cos" value="-0.000747843" /> -<par_real name="sin" value="-0.000457648" /> +<par_real name="cos" value="-0.000644958" /> +<par_real name="sin" value="-0.000394687" /> </BF_HARMONIC> <BF_HARMONIC id="224"> -<par_real name="cos" value="-0.00528829" /> -<par_real name="sin" value="0.00282665" /> +<par_real name="cos" value="-0.00456075" /> +<par_real name="sin" value="0.00243777" /> </BF_HARMONIC> <BF_HARMONIC id="225"> -<par_real name="cos" value="-0.000205189" /> -<par_real name="sin" value="0.00514197" /> +<par_real name="cos" value="-0.00017696" /> +<par_real name="sin" value="0.00443456" /> </BF_HARMONIC> <BF_HARMONIC id="226"> -<par_real name="cos" value="-0.000663658" /> -<par_real name="sin" value="-0.000425985" /> +<par_real name="cos" value="-0.000572355" /> +<par_real name="sin" value="-0.00036738" /> </BF_HARMONIC> <BF_HARMONIC id="227"> -<par_real name="cos" value="-0.0052614" /> -<par_real name="sin" value="0.00266863" /> +<par_real name="cos" value="-0.00453756" /> +<par_real name="sin" value="0.00230149" /> </BF_HARMONIC> <BF_HARMONIC id="228"> -<par_real name="cos" value="0.00399131" /> -<par_real name="sin" value="0.0218819" /> +<par_real name="cos" value="0.0034422" /> +<par_real name="sin" value="0.0188715" /> </BF_HARMONIC> <BF_HARMONIC id="229"> -<par_real name="cos" value="-0.000582773" /> -<par_real name="sin" value="-0.000391988" /> +<par_real name="cos" value="-0.000502597" /> +<par_real name="sin" value="-0.00033806" /> </BF_HARMONIC> <BF_HARMONIC id="230"> -<par_real name="cos" value="-0.00523176" /> -<par_real name="sin" value="0.00251383" /> +<par_real name="cos" value="-0.00451199" /> +<par_real name="sin" value="0.00216799" /> </BF_HARMONIC> <BF_HARMONIC id="231"> -<par_real name="cos" value="-0.000424225" /> -<par_real name="sin" value="0.00510961" /> +<par_real name="cos" value="-0.000365862" /> +<par_real name="sin" value="0.00440665" /> </BF_HARMONIC> <BF_HARMONIC id="232"> -<par_real name="cos" value="-0.000505167" /> -<par_real name="sin" value="-0.000355779" /> +<par_real name="cos" value="-0.000435668" /> +<par_real name="sin" value="-0.000306832" /> </BF_HARMONIC> <BF_HARMONIC id="233"> -<par_real name="cos" value="-0.00519944" /> -<par_real name="sin" value="0.00236225" /> +<par_real name="cos" value="-0.00448412" /> +<par_real name="sin" value="0.00203726" /> </BF_HARMONIC> <BF_HARMONIC id="234"> -<par_real name="cos" value="0.00222635" /> -<par_real name="sin" value="0.00588073" /> +<par_real name="cos" value="0.00192006" /> +<par_real name="sin" value="0.00507168" /> </BF_HARMONIC> <BF_HARMONIC id="235"> -<par_real name="cos" value="-0.00043082" /> -<par_real name="sin" value="-0.000317474" /> +<par_real name="cos" value="-0.000371549" /> +<par_real name="sin" value="-0.000273797" /> </BF_HARMONIC> <BF_HARMONIC id="236"> -<par_real name="cos" value="-0.00516452" /> -<par_real name="sin" value="0.00221385" /> +<par_real name="cos" value="-0.00445401" /> +<par_real name="sin" value="0.00190928" /> </BF_HARMONIC> <BF_HARMONIC id="237"> -<par_real name="cos" value="-0.000640798" /> -<par_real name="sin" value="0.00506744" /> +<par_real name="cos" value="-0.00055264" /> +<par_real name="sin" value="0.00437028" /> </BF_HARMONIC> <BF_HARMONIC id="238"> -<par_real name="cos" value="-0.000359712" /> -<par_real name="sin" value="-0.000277187" /> +<par_real name="cos" value="-0.000310224" /> +<par_real name="sin" value="-0.000239053" /> </BF_HARMONIC> <BF_HARMONIC id="239"> -<par_real name="cos" value="-0.00512709" /> -<par_real name="sin" value="0.00206863" /> +<par_real name="cos" value="-0.00442172" /> +<par_real name="sin" value="0.00178404" /> </BF_HARMONIC> <BF_HARMONIC id="240"> -<par_real name="cos" value="-0.010612" /> -<par_real name="sin" value="0.0144341" /> +<par_real name="cos" value="-0.00915204" /> +<par_real name="sin" value="0.0124483" /> </BF_HARMONIC> <BF_HARMONIC id="241"> -<par_real name="cos" value="-0.000291824" /> -<par_real name="sin" value="-0.000235033" /> +<par_real name="cos" value="-0.000251676" /> +<par_real name="sin" value="-0.000202698" /> </BF_HARMONIC> <BF_HARMONIC id="242"> -<par_real name="cos" value="-0.00508721" /> -<par_real name="sin" value="0.00192658" /> +<par_real name="cos" value="-0.00438733" /> +<par_real name="sin" value="0.00166153" /> </BF_HARMONIC> <BF_HARMONIC id="243"> -<par_real name="cos" value="-0.000854446" /> -<par_real name="sin" value="0.0050156" /> +<par_real name="cos" value="-0.000736895" /> +<par_real name="sin" value="0.00432557" /> </BF_HARMONIC> <BF_HARMONIC id="244"> -<par_real name="cos" value="-0.000227137" /> -<par_real name="sin" value="-0.000191119" /> +<par_real name="cos" value="-0.000195888" /> +<par_real name="sin" value="-0.000164826" /> </BF_HARMONIC> <BF_HARMONIC id="245"> -<par_real name="cos" value="-0.00504496" /> -<par_real name="sin" value="0.00178767" /> +<par_real name="cos" value="-0.00435089" /> +<par_real name="sin" value="0.00154173" /> </BF_HARMONIC> <BF_HARMONIC id="246"> -<par_real name="cos" value="0.00271518" /> -<par_real name="sin" value="0.0206757" /> +<par_real name="cos" value="0.00234164" /> +<par_real name="sin" value="0.0178312" /> </BF_HARMONIC> <BF_HARMONIC id="247"> -<par_real name="cos" value="-0.000165631" /> -<par_real name="sin" value="-0.000145554" /> +<par_real name="cos" value="-0.000142844" /> +<par_real name="sin" value="-0.000125529" /> </BF_HARMONIC> <BF_HARMONIC id="248"> -<par_real name="cos" value="-0.00500042" /> -<par_real name="sin" value="0.00165191" /> +<par_real name="cos" value="-0.00431248" /> +<par_real name="sin" value="0.00142465" /> </BF_HARMONIC> <BF_HARMONIC id="249"> -<par_real name="cos" value="-0.00106472" /> -<par_real name="sin" value="0.00495427" /> +<par_real name="cos" value="-0.00091824" /> +<par_real name="sin" value="0.00427268" /> </BF_HARMONIC> <BF_HARMONIC id="250"> -<par_real name="cos" value="-0.000107286" /> -<par_real name="sin" value="-9.8444e-05" /> +<par_real name="cos" value="-9.2526e-05" /> +<par_real name="sin" value="-8.49005e-05" /> </BF_HARMONIC> <BF_HARMONIC id="251"> -<par_real name="cos" value="-0.00495366" /> -<par_real name="sin" value="0.00151929" /> +<par_real name="cos" value="-0.00427215" /> +<par_real name="sin" value="0.00131027" /> </BF_HARMONIC> <BF_HARMONIC id="252"> -<par_real name="cos" value="0.00157232" /> -<par_real name="sin" value="0.00576991" /> +<par_real name="cos" value="0.00135601" /> +<par_real name="sin" value="0.00497611" /> </BF_HARMONIC> <BF_HARMONIC id="253"> -<par_real name="cos" value="-5.20824e-05" /> -<par_real name="sin" value="-4.98921e-05" /> +<par_real name="cos" value="-4.49171e-05" /> +<par_real name="sin" value="-4.30281e-05" /> </BF_HARMONIC> <BF_HARMONIC id="254"> -<par_real name="cos" value="-0.00490475" /> -<par_real name="sin" value="0.00138978" /> +<par_real name="cos" value="-0.00422997" /> +<par_real name="sin" value="0.00119858" /> </BF_HARMONIC> <BF_HARMONIC id="255"> -<par_real name="cos" value="-0.00127117" /> -<par_real name="sin" value="0.00488365" /> +<par_real name="cos" value="-0.00109629" /> +<par_real name="sin" value="0.00421178" /> </BF_HARMONIC> <BF_HARMONIC id="257"> -<par_real name="cos" value="-0.00485378" /> -<par_real name="sin" value="0.0012634" /> +<par_real name="cos" value="-0.00418602" /> +<par_real name="sin" value="0.00108959" /> </BF_HARMONIC> <BF_HARMONIC id="258"> -<par_real name="cos" value="-0.0106428" /> -<par_real name="sin" value="0.0132987" /> +<par_real name="cos" value="-0.0091786" /> +<par_real name="sin" value="0.0114691" /> </BF_HARMONIC> <BF_HARMONIC id="259"> -<par_real name="cos" value="4.8982e-05" /> -<par_real name="sin" value="5.11324e-05" /> +<par_real name="cos" value="4.22432e-05" /> +<par_real name="sin" value="4.40978e-05" /> </BF_HARMONIC> <BF_HARMONIC id="260"> -<par_real name="cos" value="-0.00480081" /> -<par_real name="sin" value="0.00114012" /> +<par_real name="cos" value="-0.00414033" /> +<par_real name="sin" value="0.000983267" /> </BF_HARMONIC> <BF_HARMONIC id="261"> -<par_real name="cos" value="-0.00147338" /> -<par_real name="sin" value="0.00480396" /> +<par_real name="cos" value="-0.00127068" /> +<par_real name="sin" value="0.00414305" /> </BF_HARMONIC> <BF_HARMONIC id="262"> -<par_real name="cos" value="9.48848e-05" /> -<par_real name="sin" value="0.000103407" /> +<par_real name="cos" value="8.18309e-05" /> +<par_real name="sin" value="8.91807e-05" /> </BF_HARMONIC> <BF_HARMONIC id="263"> -<par_real name="cos" value="-0.00474592" /> -<par_real name="sin" value="0.00101994" /> +<par_real name="cos" value="-0.004093" /> +<par_real name="sin" value="0.000879621" /> </BF_HARMONIC> <BF_HARMONIC id="264"> -<par_real name="cos" value="0.00155234" /> -<par_real name="sin" value="0.0195226" /> +<par_real name="cos" value="0.00133878" /> +<par_real name="sin" value="0.0168368" /> </BF_HARMONIC> <BF_HARMONIC id="265"> -<par_real name="cos" value="0.00013773" /> -<par_real name="sin" value="0.000156728" /> +<par_real name="cos" value="0.000118782" /> +<par_real name="sin" value="0.000135166" /> </BF_HARMONIC> <BF_HARMONIC id="266"> -<par_real name="cos" value="-0.00468918" /> -<par_real name="sin" value="0.000902861" /> +<par_real name="cos" value="-0.00404406" /> +<par_real name="sin" value="0.000778649" /> </BF_HARMONIC> <BF_HARMONIC id="267"> -<par_real name="cos" value="-0.00167091" /> -<par_real name="sin" value="0.00471544" /> +<par_real name="cos" value="-0.00144103" /> +<par_real name="sin" value="0.00406671" /> </BF_HARMONIC> <BF_HARMONIC id="268"> -<par_real name="cos" value="0.00017754" /> -<par_real name="sin" value="0.000210999" /> +<par_real name="cos" value="0.000153115" /> +<par_real name="sin" value="0.000181971" /> </BF_HARMONIC> <BF_HARMONIC id="269"> -<par_real name="cos" value="-0.00463067" /> -<par_real name="sin" value="0.00078887" /> +<par_real name="cos" value="-0.0039936" /> +<par_real name="sin" value="0.00068034" /> </BF_HARMONIC> <BF_HARMONIC id="270"> -<par_real name="cos" value="0.000953214" /> -<par_real name="sin" value="0.00557612" /> +<par_real name="cos" value="0.000822075" /> +<par_real name="sin" value="0.00480898" /> </BF_HARMONIC> <BF_HARMONIC id="271"> -<par_real name="cos" value="0.000214338" /> -<par_real name="sin" value="0.000266129" /> +<par_real name="cos" value="0.00018485" /> +<par_real name="sin" value="0.000229516" /> </BF_HARMONIC> <BF_HARMONIC id="272"> -<par_real name="cos" value="-0.00457045" /> -<par_real name="sin" value="0.000677962" /> +<par_real name="cos" value="-0.00394167" /> +<par_real name="sin" value="0.000584691" /> </BF_HARMONIC> <BF_HARMONIC id="273"> -<par_real name="cos" value="-0.00186337" /> -<par_real name="sin" value="0.00461835" /> +<par_real name="cos" value="-0.00160701" /> +<par_real name="sin" value="0.00398298" /> </BF_HARMONIC> <BF_HARMONIC id="274"> -<par_real name="cos" value="0.000248147" /> -<par_real name="sin" value="0.000322026" /> +<par_real name="cos" value="0.000214008" /> +<par_real name="sin" value="0.000277723" /> </BF_HARMONIC> <BF_HARMONIC id="275"> -<par_real name="cos" value="-0.0045086" /> -<par_real name="sin" value="0.000570131" /> +<par_real name="cos" value="-0.00388832" /> +<par_real name="sin" value="0.000491695" /> </BF_HARMONIC> <BF_HARMONIC id="276"> -<par_real name="cos" value="-0.0107025" /> -<par_real name="sin" value="0.0122042" /> +<par_real name="cos" value="-0.00923009" /> +<par_real name="sin" value="0.0105252" /> </BF_HARMONIC> <BF_HARMONIC id="277"> -<par_real name="cos" value="0.000278992" /> -<par_real name="sin" value="0.000378599" /> +<par_real name="cos" value="0.000240609" /> +<par_real name="sin" value="0.000326513" /> </BF_HARMONIC> <BF_HARMONIC id="278"> -<par_real name="cos" value="-0.0044452" /> -<par_real name="sin" value="0.000465371" /> +<par_real name="cos" value="-0.00383365" /> +<par_real name="sin" value="0.000401347" /> </BF_HARMONIC> <BF_HARMONIC id="279"> -<par_real name="cos" value="-0.00205036" /> -<par_real name="sin" value="0.00451296" /> +<par_real name="cos" value="-0.00176828" /> +<par_real name="sin" value="0.00389208" /> </BF_HARMONIC> <BF_HARMONIC id="280"> -<par_real name="cos" value="0.000306897" /> -<par_real name="sin" value="0.00043576" /> +<par_real name="cos" value="0.000264675" /> +<par_real name="sin" value="0.00037581" /> </BF_HARMONIC> <BF_HARMONIC id="281"> -<par_real name="cos" value="-0.00438031" /> -<par_real name="sin" value="0.000363675" /> +<par_real name="cos" value="-0.00377768" /> +<par_real name="sin" value="0.000313642" /> </BF_HARMONIC> <BF_HARMONIC id="282"> -<par_real name="cos" value="0.000498973" /> -<par_real name="sin" value="0.0184023" /> +<par_real name="cos" value="0.000430326" /> +<par_real name="sin" value="0.0158706" /> </BF_HARMONIC> <BF_HARMONIC id="283"> -<par_real name="cos" value="0.000331888" /> -<par_real name="sin" value="0.000493422" /> +<par_real name="cos" value="0.000286228" /> +<par_real name="sin" value="0.000425539" /> </BF_HARMONIC> <BF_HARMONIC id="284"> -<par_real name="cos" value="-0.00431402" /> -<par_real name="sin" value="0.000265037" /> +<par_real name="cos" value="-0.00372051" /> +<par_real name="sin" value="0.000228574" /> </BF_HARMONIC> <BF_HARMONIC id="285"> -<par_real name="cos" value="-0.0022315" /> -<par_real name="sin" value="0.00439958" /> +<par_real name="cos" value="-0.0019245" /> +<par_real name="sin" value="0.0037943" /> </BF_HARMONIC> <BF_HARMONIC id="286"> -<par_real name="cos" value="0.000353993" /> -<par_real name="sin" value="0.0005515" /> +<par_real name="cos" value="0.000305292" /> +<par_real name="sin" value="0.000475627" /> </BF_HARMONIC> <BF_HARMONIC id="287"> -<par_real name="cos" value="-0.00424638" /> -<par_real name="sin" value="0.00016945" /> +<par_real name="cos" value="-0.00366218" /> +<par_real name="sin" value="0.000146138" /> </BF_HARMONIC> <BF_HARMONIC id="288"> -<par_real name="cos" value="0.000380193" /> -<par_real name="sin" value="0.00530605" /> +<par_real name="cos" value="0.000327888" /> +<par_real name="sin" value="0.00457606" /> </BF_HARMONIC> <BF_HARMONIC id="289"> -<par_real name="cos" value="0.000373238" /> -<par_real name="sin" value="0.000609909" /> +<par_real name="cos" value="0.000321889" /> +<par_real name="sin" value="0.000526" /> </BF_HARMONIC> <BF_HARMONIC id="290"> -<par_real name="cos" value="-0.00417747" /> -<par_real name="sin" value="7.69066e-05" /> +<par_real name="cos" value="-0.00360275" /> +<par_real name="sin" value="6.63261e-05" /> </BF_HARMONIC> <BF_HARMONIC id="291"> -<par_real name="cos" value="-0.00240644" /> -<par_real name="sin" value="0.00427851" /> +<par_real name="cos" value="-0.00207537" /> +<par_real name="sin" value="0.00368989" /> </BF_HARMONIC> <BF_HARMONIC id="292"> -<par_real name="cos" value="0.000389651" /> -<par_real name="sin" value="0.000668565" /> +<par_real name="cos" value="0.000336044" /> +<par_real name="sin" value="0.000576586" /> </BF_HARMONIC> <BF_HARMONIC id="293"> -<par_real name="cos" value="-0.00410736" /> -<par_real name="sin" value="-1.26013e-05" /> +<par_real name="cos" value="-0.00354229" /> +<par_real name="sin" value="-1.08677e-05" /> </BF_HARMONIC> <BF_HARMONIC id="294"> -<par_real name="cos" value="-0.0107676" /> -<par_real name="sin" value="0.0111357" /> +<par_real name="cos" value="-0.00928624" /> +<par_real name="sin" value="0.00960369" /> </BF_HARMONIC> <BF_HARMONIC id="295"> -<par_real name="cos" value="0.000403263" /> -<par_real name="sin" value="0.000727389" /> +<par_real name="cos" value="0.000347784" /> +<par_real name="sin" value="0.000627318" /> </BF_HARMONIC> <BF_HARMONIC id="296"> -<par_real name="cos" value="-0.00403614" /> -<par_real name="sin" value="-9.90816e-05" /> +<par_real name="cos" value="-0.00348086" /> +<par_real name="sin" value="-8.54503e-05" /> </BF_HARMONIC> <BF_HARMONIC id="297"> -<par_real name="cos" value="-0.00257482" /> -<par_real name="sin" value="0.0041501" /> +<par_real name="cos" value="-0.00222059" /> +<par_real name="sin" value="0.00357915" /> </BF_HARMONIC> <BF_HARMONIC id="298"> -<par_real name="cos" value="0.000414103" /> -<par_real name="sin" value="0.000786299" /> +<par_real name="cos" value="0.000357132" /> +<par_real name="sin" value="0.000678123" /> </BF_HARMONIC> <BF_HARMONIC id="299"> -<par_real name="cos" value="-0.00396385" /> -<par_real name="sin" value="-0.000182543" /> +<par_real name="cos" value="-0.00341852" /> +<par_real name="sin" value="-0.000157429" /> </BF_HARMONIC> <BF_HARMONIC id="300"> -<par_real name="cos" value="-0.000446151" /> -<par_real name="sin" value="0.0173025" /> +<par_real name="cos" value="-0.000384771" /> +<par_real name="sin" value="0.0149221" /> </BF_HARMONIC> <BF_HARMONIC id="301"> -<par_real name="cos" value="0.000422201" /> -<par_real name="sin" value="0.000845217" /> +<par_real name="cos" value="0.000364116" /> +<par_real name="sin" value="0.000728935" /> </BF_HARMONIC> <BF_HARMONIC id="302"> -<par_real name="cos" value="-0.00389059" /> -<par_real name="sin" value="-0.000262995" /> +<par_real name="cos" value="-0.00335534" /> +<par_real name="sin" value="-0.000226813" /> </BF_HARMONIC> <BF_HARMONIC id="303"> -<par_real name="cos" value="-0.00273631" /> -<par_real name="sin" value="0.00401469" /> +<par_real name="cos" value="-0.00235986" /> +<par_real name="sin" value="0.00346236" /> </BF_HARMONIC> <BF_HARMONIC id="304"> -<par_real name="cos" value="0.000427591" /> -<par_real name="sin" value="0.000904065" /> +<par_real name="cos" value="0.000368765" /> +<par_real name="sin" value="0.000779687" /> </BF_HARMONIC> <BF_HARMONIC id="305"> -<par_real name="cos" value="-0.00381641" /> -<par_real name="sin" value="-0.000340448" /> +<par_real name="cos" value="-0.00329136" /> +<par_real name="sin" value="-0.000293611" /> </BF_HARMONIC> <BF_HARMONIC id="306"> -<par_real name="cos" value="-0.000136753" /> -<par_real name="sin" value="0.00496791" /> +<par_real name="cos" value="-0.000117939" /> +<par_real name="sin" value="0.00428444" /> </BF_HARMONIC> <BF_HARMONIC id="307"> -<par_real name="cos" value="0.000430304" /> -<par_real name="sin" value="0.000962767" /> +<par_real name="cos" value="0.000371104" /> +<par_real name="sin" value="0.000830313" /> </BF_HARMONIC> <BF_HARMONIC id="308"> -<par_real name="cos" value="-0.00374139" /> -<par_real name="sin" value="-0.000414913" /> +<par_real name="cos" value="-0.00322666" /> +<par_real name="sin" value="-0.000357831" /> </BF_HARMONIC> <BF_HARMONIC id="309"> -<par_real name="cos" value="-0.0028906" /> -<par_real name="sin" value="0.00387264" /> +<par_real name="cos" value="-0.00249292" /> +<par_real name="sin" value="0.00333986" /> </BF_HARMONIC> <BF_HARMONIC id="310"> -<par_real name="cos" value="0.000430375" /> -<par_real name="sin" value="0.00102125" /> +<par_real name="cos" value="0.000371166" /> +<par_real name="sin" value="0.00088075" /> </BF_HARMONIC> <BF_HARMONIC id="311"> -<par_real name="cos" value="-0.00366561" /> -<par_real name="sin" value="-0.0004864" /> +<par_real name="cos" value="-0.00316131" /> +<par_real name="sin" value="-0.000419483" /> </BF_HARMONIC> <BF_HARMONIC id="312"> -<par_real name="cos" value="-0.0108189" /> -<par_real name="sin" value="0.0100851" /> +<par_real name="cos" value="-0.00933048" /> +<par_real name="sin" value="0.00869763" /> </BF_HARMONIC> <BF_HARMONIC id="313"> -<par_real name="cos" value="0.000427838" /> -<par_real name="sin" value="0.00107944" /> +<par_real name="cos" value="0.000368978" /> +<par_real name="sin" value="0.000930935" /> </BF_HARMONIC> <BF_HARMONIC id="314"> -<par_real name="cos" value="-0.00358912" /> -<par_real name="sin" value="-0.000554923" /> +<par_real name="cos" value="-0.00309534" /> +<par_real name="sin" value="-0.000478579" /> </BF_HARMONIC> <BF_HARMONIC id="315"> -<par_real name="cos" value="-0.00303741" /> -<par_real name="sin" value="0.00372434" /> +<par_real name="cos" value="-0.00261954" /> +<par_real name="sin" value="0.00321196" /> </BF_HARMONIC> <BF_HARMONIC id="316"> -<par_real name="cos" value="0.00042273" /> -<par_real name="sin" value="0.00113726" /> +<par_real name="cos" value="0.000364572" /> +<par_real name="sin" value="0.0009808" /> </BF_HARMONIC> <BF_HARMONIC id="317"> -<par_real name="cos" value="-0.003512" /> -<par_real name="sin" value="-0.000620495" /> +<par_real name="cos" value="-0.00302883" /> +<par_real name="sin" value="-0.00053513" /> </BF_HARMONIC> <BF_HARMONIC id="318"> -<par_real name="cos" value="-0.00128291" /> -<par_real name="sin" value="0.0162167" /> +<par_real name="cos" value="-0.00110641" /> +<par_real name="sin" value="0.0139857" /> </BF_HARMONIC> <BF_HARMONIC id="319"> -<par_real name="cos" value="0.000415086" /> -<par_real name="sin" value="0.00119464" /> +<par_real name="cos" value="0.00035798" /> +<par_real name="sin" value="0.00103029" /> </BF_HARMONIC> <BF_HARMONIC id="320"> -<par_real name="cos" value="-0.00343432" /> -<par_real name="sin" value="-0.000683129" /> +<par_real name="cos" value="-0.00296184" /> +<par_real name="sin" value="-0.000589147" /> </BF_HARMONIC> <BF_HARMONIC id="321"> -<par_real name="cos" value="-0.00317646" /> -<par_real name="sin" value="0.00357018" /> +<par_real name="cos" value="-0.00273946" /> +<par_real name="sin" value="0.00307901" /> </BF_HARMONIC> <BF_HARMONIC id="322"> -<par_real name="cos" value="0.000404945" /> -<par_real name="sin" value="0.00125152" /> +<par_real name="cos" value="0.000349234" /> +<par_real name="sin" value="0.00107934" /> </BF_HARMONIC> <BF_HARMONIC id="323"> -<par_real name="cos" value="-0.00335615" /> -<par_real name="sin" value="-0.00074284" /> +<par_real name="cos" value="-0.00289442" /> +<par_real name="sin" value="-0.000640643" /> </BF_HARMONIC> <BF_HARMONIC id="324"> -<par_real name="cos" value="-0.000588994" /> -<par_real name="sin" value="0.00457131" /> +<par_real name="cos" value="-0.000507963" /> +<par_real name="sin" value="0.00394241" /> </BF_HARMONIC> <BF_HARMONIC id="325"> -<par_real name="cos" value="0.000392344" /> -<par_real name="sin" value="0.00130782" /> +<par_real name="cos" value="0.000338367" /> +<par_real name="sin" value="0.0011279" /> </BF_HARMONIC> <BF_HARMONIC id="326"> -<par_real name="cos" value="-0.00327756" /> -<par_real name="sin" value="-0.000799645" /> +<par_real name="cos" value="-0.00282665" /> +<par_real name="sin" value="-0.000689633" /> </BF_HARMONIC> <BF_HARMONIC id="327"> -<par_real name="cos" value="-0.0033075" /> -<par_real name="sin" value="0.00341056" /> +<par_real name="cos" value="-0.00285247" /> +<par_real name="sin" value="0.00294135" /> </BF_HARMONIC> <BF_HARMONIC id="328"> -<par_real name="cos" value="0.000377324" /> -<par_real name="sin" value="0.00136347" /> +<par_real name="cos" value="0.000325413" /> +<par_real name="sin" value="0.00117589" /> </BF_HARMONIC> <BF_HARMONIC id="329"> -<par_real name="cos" value="-0.00319861" /> -<par_real name="sin" value="-0.00085356" /> +<par_real name="cos" value="-0.00275856" /> +<par_real name="sin" value="-0.000736131" /> </BF_HARMONIC> <BF_HARMONIC id="330"> -<par_real name="cos" value="-0.0108406" /> -<par_real name="sin" value="0.00904913" /> +<par_real name="cos" value="-0.00934919" /> +<par_real name="sin" value="0.00780419" /> </BF_HARMONIC> <BF_HARMONIC id="331"> -<par_real name="cos" value="0.000359925" /> -<par_real name="sin" value="0.00141843" /> +<par_real name="cos" value="0.000310408" /> +<par_real name="sin" value="0.00122329" /> </BF_HARMONIC> <BF_HARMONIC id="332"> -<par_real name="cos" value="-0.00311938" /> -<par_real name="sin" value="-0.000904602" /> +<par_real name="cos" value="-0.00269023" /> +<par_real name="sin" value="-0.00078015" /> </BF_HARMONIC> <BF_HARMONIC id="333"> -<par_real name="cos" value="-0.00343029" /> -<par_real name="sin" value="0.0032459" /> +<par_real name="cos" value="-0.00295836" /> +<par_real name="sin" value="0.00279934" /> </BF_HARMONIC> <BF_HARMONIC id="334"> -<par_real name="cos" value="0.000340189" /> -<par_real name="sin" value="0.00147261" /> +<par_real name="cos" value="0.000293387" /> +<par_real name="sin" value="0.00127001" /> </BF_HARMONIC> <BF_HARMONIC id="335"> -<par_real name="cos" value="-0.00303992" /> -<par_real name="sin" value="-0.000952791" /> +<par_real name="cos" value="-0.0026217" /> +<par_real name="sin" value="-0.00082171" /> </BF_HARMONIC> <BF_HARMONIC id="336"> -<par_real name="cos" value="-0.00201076" /> -<par_real name="sin" value="0.0151433" /> +<par_real name="cos" value="-0.00173413" /> +<par_real name="sin" value="0.0130599" /> </BF_HARMONIC> <BF_HARMONIC id="337"> -<par_real name="cos" value="0.000318158" /> -<par_real name="sin" value="0.00152595" /> +<par_real name="cos" value="0.000274387" /> +<par_real name="sin" value="0.00131602" /> </BF_HARMONIC> <BF_HARMONIC id="338"> -<par_real name="cos" value="-0.00296032" /> -<par_real name="sin" value="-0.000998146" /> +<par_real name="cos" value="-0.00255305" /> +<par_real name="sin" value="-0.000860825" /> </BF_HARMONIC> <BF_HARMONIC id="339"> -<par_real name="cos" value="-0.00354463" /> -<par_real name="sin" value="0.00307663" /> +<par_real name="cos" value="-0.00305697" /> +<par_real name="sin" value="0.00265336" /> </BF_HARMONIC> <BF_HARMONIC id="340"> -<par_real name="cos" value="0.000293875" /> -<par_real name="sin" value="0.0015784" /> +<par_real name="cos" value="0.000253445" /> +<par_real name="sin" value="0.00136125" /> </BF_HARMONIC> <BF_HARMONIC id="341"> -<par_real name="cos" value="-0.00288064" /> -<par_real name="sin" value="-0.00104069" /> +<par_real name="cos" value="-0.00248433" /> +<par_real name="sin" value="-0.000897516" /> </BF_HARMONIC> <BF_HARMONIC id="342"> -<par_real name="cos" value="-0.00096945" /> -<par_real name="sin" value="0.00412698" /> +<par_real name="cos" value="-0.000836077" /> +<par_real name="sin" value="0.00355921" /> </BF_HARMONIC> <BF_HARMONIC id="343"> -<par_real name="cos" value="0.000267384" /> -<par_real name="sin" value="0.00162989" /> +<par_real name="cos" value="0.000230598" /> +<par_real name="sin" value="0.00140566" /> </BF_HARMONIC> <BF_HARMONIC id="344"> -<par_real name="cos" value="-0.00280093" /> -<par_real name="sin" value="-0.00108044" /> +<par_real name="cos" value="-0.00241559" /> +<par_real name="sin" value="-0.000931797" /> </BF_HARMONIC> <BF_HARMONIC id="345"> -<par_real name="cos" value="-0.00365032" /> -<par_real name="sin" value="0.00290319" /> +<par_real name="cos" value="-0.00314812" /> +<par_real name="sin" value="0.00250378" /> </BF_HARMONIC> <BF_HARMONIC id="346"> -<par_real name="cos" value="0.00023873" /> -<par_real name="sin" value="0.00168036" /> +<par_real name="cos" value="0.000205886" /> +<par_real name="sin" value="0.00144918" /> </BF_HARMONIC> <BF_HARMONIC id="347"> -<par_real name="cos" value="-0.00272128" /> -<par_real name="sin" value="-0.00111742" /> +<par_real name="cos" value="-0.0023469" /> +<par_real name="sin" value="-0.00096369" /> </BF_HARMONIC> <BF_HARMONIC id="348"> -<par_real name="cos" value="-0.0108201" /> -<par_real name="sin" value="0.00802838" /> +<par_real name="cos" value="-0.00933151" /> +<par_real name="sin" value="0.00692387" /> </BF_HARMONIC> <BF_HARMONIC id="349"> -<par_real name="cos" value="0.000207961" /> -<par_real name="sin" value="0.00172977" /> +<par_real name="cos" value="0.000179351" /> +<par_real name="sin" value="0.00149179" /> </BF_HARMONIC> <BF_HARMONIC id="350"> -<par_real name="cos" value="-0.00264174" /> -<par_real name="sin" value="-0.00115166" /> +<par_real name="cos" value="-0.0022783" /> +<par_real name="sin" value="-0.000993219" /> </BF_HARMONIC> <BF_HARMONIC id="351"> -<par_real name="cos" value="-0.00374721" /> -<par_real name="sin" value="0.00272602" /> +<par_real name="cos" value="-0.00323168" /> +<par_real name="sin" value="0.00235098" /> </BF_HARMONIC> <BF_HARMONIC id="352"> -<par_real name="cos" value="0.000175122" /> -<par_real name="sin" value="0.00177804" /> +<par_real name="cos" value="0.000151029" /> +<par_real name="sin" value="0.00153342" /> </BF_HARMONIC> <BF_HARMONIC id="353"> -<par_real name="cos" value="-0.00256237" /> -<par_real name="sin" value="-0.00118318" /> +<par_real name="cos" value="-0.00220985" /> +<par_real name="sin" value="-0.0010204" /> </BF_HARMONIC> <BF_HARMONIC id="354"> -<par_real name="cos" value="-0.00262936" /> -<par_real name="sin" value="0.0140837" /> +<par_real name="cos" value="-0.00226762" /> +<par_real name="sin" value="0.0121461" /> </BF_HARMONIC> <BF_HARMONIC id="355"> -<par_real name="cos" value="0.000140261" /> -<par_real name="sin" value="0.00182513" /> +<par_real name="cos" value="0.000120964" /> +<par_real name="sin" value="0.00157404" /> </BF_HARMONIC> <BF_HARMONIC id="356"> -<par_real name="cos" value="-0.00248325" /> -<par_real name="sin" value="-0.001212" /> +<par_real name="cos" value="-0.00214161" /> +<par_real name="sin" value="-0.00104526" /> </BF_HARMONIC> <BF_HARMONIC id="357"> -<par_real name="cos" value="-0.00383515" /> -<par_real name="sin" value="0.00254558" /> +<par_real name="cos" value="-0.00330753" /> +<par_real name="sin" value="0.00219537" /> </BF_HARMONIC> <BF_HARMONIC id="358"> -<par_real name="cos" value="0.000103427" /> -<par_real name="sin" value="0.00187099" /> +<par_real name="cos" value="8.91979e-05" /> +<par_real name="sin" value="0.00161359" /> </BF_HARMONIC> <BF_HARMONIC id="359"> -<par_real name="cos" value="-0.00240444" /> -<par_real name="sin" value="-0.00123816" /> +<par_real name="cos" value="-0.00207365" /> +<par_real name="sin" value="-0.00106782" /> </BF_HARMONIC> <BF_HARMONIC id="360"> -<par_real name="cos" value="-0.00127274" /> -<par_real name="sin" value="0.00364653" /> +<par_real name="cos" value="-0.00109764" /> +<par_real name="sin" value="0.00314485" /> </BF_HARMONIC> <BF_HARMONIC id="361"> -<par_real name="cos" value="6.46698e-05" /> -<par_real name="sin" value="0.00191555" /> +<par_real name="cos" value="5.57728e-05" /> +<par_real name="sin" value="0.00165202" /> </BF_HARMONIC> <BF_HARMONIC id="362"> -<par_real name="cos" value="-0.002326" /> -<par_real name="sin" value="-0.00126168" /> +<par_real name="cos" value="-0.002006" /> +<par_real name="sin" value="-0.0010881" /> </BF_HARMONIC> <BF_HARMONIC id="363"> -<par_real name="cos" value="-0.00391402" /> -<par_real name="sin" value="0.00236232" /> +<par_real name="cos" value="-0.00337554" /> +<par_real name="sin" value="0.00203732" /> </BF_HARMONIC> <BF_HARMONIC id="364"> -<par_real name="cos" value="2.4039e-05" /> -<par_real name="sin" value="0.00195878" /> +<par_real name="cos" value="2.07318e-05" /> +<par_real name="sin" value="0.0016893" /> </BF_HARMONIC> <BF_HARMONIC id="365"> -<par_real name="cos" value="-0.00224799" /> -<par_real name="sin" value="-0.0012826" /> +<par_real name="cos" value="-0.00193872" /> +<par_real name="sin" value="-0.00110614" /> </BF_HARMONIC> <BF_HARMONIC id="366"> -<par_real name="cos" value="-0.010748" /> -<par_real name="sin" value="0.00702631" /> +<par_real name="cos" value="-0.00926933" /> +<par_real name="sin" value="0.00605966" /> </BF_HARMONIC> <BF_HARMONIC id="367"> -<par_real name="cos" value="-1.8414e-05" /> -<par_real name="sin" value="0.00200062" /> +<par_real name="cos" value="-1.58807e-05" /> +<par_real name="sin" value="0.00172538" /> </BF_HARMONIC> <BF_HARMONIC id="368"> -<par_real name="cos" value="-0.00217047" /> -<par_real name="sin" value="-0.00130093" /> +<par_real name="cos" value="-0.00187187" /> +<par_real name="sin" value="-0.00112195" /> </BF_HARMONIC> <BF_HARMONIC id="369"> -<par_real name="cos" value="-0.00398372" /> -<par_real name="sin" value="0.00217672" /> +<par_real name="cos" value="-0.00343566" /> +<par_real name="sin" value="0.00187726" /> </BF_HARMONIC> <BF_HARMONIC id="370"> -<par_real name="cos" value="-6.26374e-05" /> -<par_real name="sin" value="0.00204102" /> +<par_real name="cos" value="-5.402e-05" /> +<par_real name="sin" value="0.00176022" /> </BF_HARMONIC> <BF_HARMONIC id="371"> -<par_real name="cos" value="-0.00209351" /> -<par_real name="sin" value="-0.00131672" /> +<par_real name="cos" value="-0.00180549" /> +<par_real name="sin" value="-0.00113557" /> </BF_HARMONIC> <BF_HARMONIC id="372"> -<par_real name="cos" value="-0.00313908" /> -<par_real name="sin" value="0.0130423" /> +<par_real name="cos" value="-0.00270722" /> +<par_real name="sin" value="0.011248" /> </BF_HARMONIC> <BF_HARMONIC id="373"> -<par_real name="cos" value="-0.000108579" /> -<par_real name="sin" value="0.00207994" /> +<par_real name="cos" value="-9.36411e-05" /> +<par_real name="sin" value="0.00179379" /> </BF_HARMONIC> <BF_HARMONIC id="374"> -<par_real name="cos" value="-0.00201716" /> -<par_real name="sin" value="-0.00132999" /> +<par_real name="cos" value="-0.00173965" /> +<par_real name="sin" value="-0.00114702" /> </BF_HARMONIC> <BF_HARMONIC id="375"> -<par_real name="cos" value="-0.00404418" /> -<par_real name="sin" value="0.00198923" /> +<par_real name="cos" value="-0.0034878" /> +<par_real name="sin" value="0.00171556" /> </BF_HARMONIC> <BF_HARMONIC id="376"> -<par_real name="cos" value="-0.000156184" /> -<par_real name="sin" value="0.00211734" /> +<par_real name="cos" value="-0.000134697" /> +<par_real name="sin" value="0.00182604" /> </BF_HARMONIC> <BF_HARMONIC id="377"> -<par_real name="cos" value="-0.00194149" /> -<par_real name="sin" value="-0.00134079" /> +<par_real name="cos" value="-0.00167439" /> +<par_real name="sin" value="-0.00115633" /> </BF_HARMONIC> <BF_HARMONIC id="378"> -<par_real name="cos" value="-0.00149532" /> -<par_real name="sin" value="0.00314224" /> +<par_real name="cos" value="-0.0012896" /> +<par_real name="sin" value="0.00270994" /> </BF_HARMONIC> <BF_HARMONIC id="379"> -<par_real name="cos" value="-0.000205401" /> -<par_real name="sin" value="0.00215317" /> +<par_real name="cos" value="-0.000177143" /> +<par_real name="sin" value="0.00185695" /> </BF_HARMONIC> <BF_HARMONIC id="380"> -<par_real name="cos" value="-0.00186655" /> -<par_real name="sin" value="-0.00134914" /> +<par_real name="cos" value="-0.00160976" /> +<par_real name="sin" value="-0.00116353" /> </BF_HARMONIC> <BF_HARMONIC id="381"> -<par_real name="cos" value="-0.00409536" /> -<par_real name="sin" value="0.00180033" /> +<par_real name="cos" value="-0.00353194" /> +<par_real name="sin" value="0.00155265" /> </BF_HARMONIC> <BF_HARMONIC id="382"> -<par_real name="cos" value="-0.000256173" /> -<par_real name="sin" value="0.00218739" /> +<par_real name="cos" value="-0.00022093" /> +<par_real name="sin" value="0.00188646" /> </BF_HARMONIC> <BF_HARMONIC id="383"> -<par_real name="cos" value="-0.0017924" /> -<par_real name="sin" value="-0.00135508" /> +<par_real name="cos" value="-0.00154581" /> +<par_real name="sin" value="-0.00116865" /> </BF_HARMONIC> <BF_HARMONIC id="384"> -<par_real name="cos" value="-0.0106172" /> -<par_real name="sin" value="0.0060485" /> +<par_real name="cos" value="-0.00915653" /> +<par_real name="sin" value="0.00521637" /> </BF_HARMONIC> <BF_HARMONIC id="385"> -<par_real name="cos" value="-0.000308445" /> -<par_real name="sin" value="0.00221995" /> +<par_real name="cos" value="-0.00026601" /> +<par_real name="sin" value="0.00191454" /> </BF_HARMONIC> <BF_HARMONIC id="386"> -<par_real name="cos" value="-0.0017191" /> -<par_real name="sin" value="-0.00135865" /> +<par_real name="cos" value="-0.00148259" /> +<par_real name="sin" value="-0.00117173" /> </BF_HARMONIC> <BF_HARMONIC id="387"> -<par_real name="cos" value="-0.00413721" /> -<par_real name="sin" value="0.0016105" /> +<par_real name="cos" value="-0.00356803" /> +<par_real name="sin" value="0.00138893" /> </BF_HARMONIC> <BF_HARMONIC id="388"> -<par_real name="cos" value="-0.000362162" /> -<par_real name="sin" value="0.00225083" /> +<par_real name="cos" value="-0.000312337" /> +<par_real name="sin" value="0.00194117" /> </BF_HARMONIC> <BF_HARMONIC id="389"> -<par_real name="cos" value="-0.0016467" /> -<par_real name="sin" value="-0.00135989" /> +<par_real name="cos" value="-0.00142015" /> +<par_real name="sin" value="-0.0011728" /> </BF_HARMONIC> <BF_HARMONIC id="390"> -<par_real name="cos" value="-0.00354132" /> -<par_real name="sin" value="0.0120253" /> +<par_real name="cos" value="-0.00305412" /> +<par_real name="sin" value="0.0103709" /> </BF_HARMONIC> <BF_HARMONIC id="391"> -<par_real name="cos" value="-0.000417267" /> -<par_real name="sin" value="0.00227999" /> +<par_real name="cos" value="-0.000359861" /> +<par_real name="sin" value="0.00196632" /> </BF_HARMONIC> <BF_HARMONIC id="392"> -<par_real name="cos" value="-0.00157526" /> -<par_real name="sin" value="-0.00135883" /> +<par_real name="cos" value="-0.00135854" /> +<par_real name="sin" value="-0.00117189" /> </BF_HARMONIC> <BF_HARMONIC id="393"> -<par_real name="cos" value="-0.00416976" /> -<par_real name="sin" value="0.0014202" /> +<par_real name="cos" value="-0.0035961" /> +<par_real name="sin" value="0.00122481" /> </BF_HARMONIC> <BF_HARMONIC id="394"> -<par_real name="cos" value="-0.000473702" /> -<par_real name="sin" value="0.00230738" /> +<par_real name="cos" value="-0.000408532" /> +<par_real name="sin" value="0.00198994" /> </BF_HARMONIC> <BF_HARMONIC id="395"> -<par_real name="cos" value="-0.00150483" /> -<par_real name="sin" value="-0.00135552" /> +<par_real name="cos" value="-0.0012978" /> +<par_real name="sin" value="-0.00116903" /> </BF_HARMONIC> <BF_HARMONIC id="396"> -<par_real name="cos" value="-0.00163552" /> -<par_real name="sin" value="0.00262673" /> +<par_real name="cos" value="-0.00141051" /> +<par_real name="sin" value="0.00226535" /> </BF_HARMONIC> <BF_HARMONIC id="397"> -<par_real name="cos" value="-0.000531411" /> -<par_real name="sin" value="0.00233297" /> +<par_real name="cos" value="-0.000458302" /> +<par_real name="sin" value="0.00201201" /> </BF_HARMONIC> <BF_HARMONIC id="398"> -<par_real name="cos" value="-0.00143548" /> -<par_real name="sin" value="-0.00134999" /> +<par_real name="cos" value="-0.00123799" /> +<par_real name="sin" value="-0.00116426" /> </BF_HARMONIC> <BF_HARMONIC id="399"> -<par_real name="cos" value="-0.00419301" /> -<par_real name="sin" value="0.00122991" /> +<par_real name="cos" value="-0.00361615" /> +<par_real name="sin" value="0.0010607" /> </BF_HARMONIC> <BF_HARMONIC id="400"> -<par_real name="cos" value="-0.000590334" /> -<par_real name="sin" value="0.00235674" /> +<par_real name="cos" value="-0.000509118" /> +<par_real name="sin" value="0.00203251" /> </BF_HARMONIC> <BF_HARMONIC id="401"> -<par_real name="cos" value="-0.00136724" /> -<par_real name="sin" value="-0.0013423" /> +<par_real name="cos" value="-0.00117914" /> +<par_real name="sin" value="-0.00115763" /> </BF_HARMONIC> <BF_HARMONIC id="402"> -<par_real name="cos" value="-0.0104237" /> -<par_real name="sin" value="0.00510206" /> +<par_real name="cos" value="-0.00898965" /> +<par_real name="sin" value="0.00440014" /> </BF_HARMONIC> <BF_HARMONIC id="403"> -<par_real name="cos" value="-0.000650413" /> -<par_real name="sin" value="0.00237865" /> +<par_real name="cos" value="-0.000560932" /> +<par_real name="sin" value="0.0020514" /> </BF_HARMONIC> <BF_HARMONIC id="404"> -<par_real name="cos" value="-0.00130017" /> -<par_real name="sin" value="-0.00133248" /> +<par_real name="cos" value="-0.0011213" /> +<par_real name="sin" value="-0.00114916" /> </BF_HARMONIC> <BF_HARMONIC id="405"> -<par_real name="cos" value="-0.00420702" /> -<par_real name="sin" value="0.0010401" /> +<par_real name="cos" value="-0.00362823" /> +<par_real name="sin" value="0.000897007" /> </BF_HARMONIC> <BF_HARMONIC id="406"> -<par_real name="cos" value="-0.000711588" /> -<par_real name="sin" value="0.00239868" /> +<par_real name="cos" value="-0.000613691" /> +<par_real name="sin" value="0.00206868" /> </BF_HARMONIC> <BF_HARMONIC id="407"> -<par_real name="cos" value="-0.00123432" /> -<par_real name="sin" value="-0.00132057" /> +<par_real name="cos" value="-0.00106451" /> +<par_real name="sin" value="-0.00113889" /> </BF_HARMONIC> <BF_HARMONIC id="408"> -<par_real name="cos" value="-0.00383877" /> -<par_real name="sin" value="0.0110401" /> +<par_real name="cos" value="-0.00331065" /> +<par_real name="sin" value="0.00952125" /> </BF_HARMONIC> <BF_HARMONIC id="409"> -<par_real name="cos" value="-0.000773801" /> -<par_real name="sin" value="0.00241679" /> +<par_real name="cos" value="-0.000667344" /> +<par_real name="sin" value="0.0020843" /> </BF_HARMONIC> <BF_HARMONIC id="410"> -<par_real name="cos" value="-0.00116974" /> -<par_real name="sin" value="-0.00130663" /> +<par_real name="cos" value="-0.00100881" /> +<par_real name="sin" value="-0.00112687" /> </BF_HARMONIC> <BF_HARMONIC id="411"> -<par_real name="cos" value="-0.00421185" /> -<par_real name="sin" value="0.00085123" /> +<par_real name="cos" value="-0.0036324" /> +<par_real name="sin" value="0.000734121" /> </BF_HARMONIC> <BF_HARMONIC id="412"> -<par_real name="cos" value="-0.000836991" /> -<par_real name="sin" value="0.00243295" /> +<par_real name="cos" value="-0.000721841" /> +<par_real name="sin" value="0.00209823" /> </BF_HARMONIC> <BF_HARMONIC id="413"> -<par_real name="cos" value="-0.00110648" /> -<par_real name="sin" value="-0.0012907" /> +<par_real name="cos" value="-0.000954255" /> +<par_real name="sin" value="-0.00111313" /> </BF_HARMONIC> <BF_HARMONIC id="414"> -<par_real name="cos" value="-0.00169363" /> -<par_real name="sin" value="0.00211273" /> +<par_real name="cos" value="-0.00146063" /> +<par_real name="sin" value="0.00182207" /> </BF_HARMONIC> <BF_HARMONIC id="415"> -<par_real name="cos" value="-0.000901098" /> -<par_real name="sin" value="0.00244716" /> +<par_real name="cos" value="-0.000777128" /> +<par_real name="sin" value="0.00211049" /> </BF_HARMONIC> <BF_HARMONIC id="416"> -<par_real name="cos" value="-0.00104458" /> -<par_real name="sin" value="-0.00127282" /> +<par_real name="cos" value="-0.000900871" /> +<par_real name="sin" value="-0.00109771" /> </BF_HARMONIC> <BF_HARMONIC id="417"> -<par_real name="cos" value="-0.0042076" /> -<par_real name="sin" value="0.000663772" /> +<par_real name="cos" value="-0.00362873" /> +<par_real name="sin" value="0.000572453" /> </BF_HARMONIC> <BF_HARMONIC id="418"> -<par_real name="cos" value="-0.00096606" /> -<par_real name="sin" value="0.00245937" /> +<par_real name="cos" value="-0.000833153" /> +<par_real name="sin" value="0.00212102" /> </BF_HARMONIC> <BF_HARMONIC id="419"> -<par_real name="cos" value="-0.000984094" /> -<par_real name="sin" value="-0.00125305" /> +<par_real name="cos" value="-0.000848706" /> +<par_real name="sin" value="-0.00108066" /> </BF_HARMONIC> <BF_HARMONIC id="420"> -<par_real name="cos" value="-0.0101656" /> -<par_real name="sin" value="0.004195" /> +<par_real name="cos" value="-0.00876706" /> +<par_real name="sin" value="0.00361787" /> </BF_HARMONIC> <BF_HARMONIC id="421"> -<par_real name="cos" value="-0.00103182" /> -<par_real name="sin" value="0.00246957" /> +<par_real name="cos" value="-0.000889866" /> +<par_real name="sin" value="0.00212982" /> </BF_HARMONIC> <BF_HARMONIC id="422"> -<par_real name="cos" value="-0.000925064" /> -<par_real name="sin" value="-0.00123144" /> +<par_real name="cos" value="-0.000797797" /> +<par_real name="sin" value="-0.00106202" /> </BF_HARMONIC> <BF_HARMONIC id="423"> -<par_real name="cos" value="-0.00419439" /> -<par_real name="sin" value="0.00047818" /> +<par_real name="cos" value="-0.00361734" /> +<par_real name="sin" value="0.000412394" /> </BF_HARMONIC> <BF_HARMONIC id="424"> -<par_real name="cos" value="-0.00109831" /> -<par_real name="sin" value="0.00247774" /> +<par_real name="cos" value="-0.000947209" /> +<par_real name="sin" value="0.00213686" /> </BF_HARMONIC> <BF_HARMONIC id="425"> -<par_real name="cos" value="-0.000867532" /> -<par_real name="sin" value="-0.00120803" /> +<par_real name="cos" value="-0.00074818" /> +<par_real name="sin" value="-0.00104183" /> </BF_HARMONIC> <BF_HARMONIC id="426"> -<par_real name="cos" value="-0.00403552" /> -<par_real name="sin" value="0.0100951" /> +<par_real name="cos" value="-0.00348033" /> +<par_real name="sin" value="0.00870626" /> </BF_HARMONIC> <BF_HARMONIC id="427"> -<par_real name="cos" value="-0.00116547" /> -<par_real name="sin" value="0.00248387" /> +<par_real name="cos" value="-0.00100513" /> +<par_real name="sin" value="0.00214215" /> </BF_HARMONIC> <BF_HARMONIC id="428"> -<par_real name="cos" value="-0.000811542" /> -<par_real name="sin" value="-0.00118287" /> +<par_real name="cos" value="-0.000699893" /> +<par_real name="sin" value="-0.00102014" /> </BF_HARMONIC> <BF_HARMONIC id="429"> -<par_real name="cos" value="-0.00417236" /> -<par_real name="sin" value="0.000294904" /> +<par_real name="cos" value="-0.00359834" /> +<par_real name="sin" value="0.000254332" /> </BF_HARMONIC> <BF_HARMONIC id="430"> -<par_real name="cos" value="-0.00123324" /> -<par_real name="sin" value="0.00248793" /> +<par_real name="cos" value="-0.00106358" /> +<par_real name="sin" value="0.00214565" /> </BF_HARMONIC> <BF_HARMONIC id="431"> -<par_real name="cos" value="-0.000757134" /> -<par_real name="sin" value="-0.00115602" /> +<par_real name="cos" value="-0.00065297" /> +<par_real name="sin" value="-0.000996979" /> </BF_HARMONIC> <BF_HARMONIC id="432"> -<par_real name="cos" value="-0.00167184" /> -<par_real name="sin" value="0.00161271" /> +<par_real name="cos" value="-0.00144183" /> +<par_real name="sin" value="0.00139084" /> </BF_HARMONIC> <BF_HARMONIC id="433"> -<par_real name="cos" value="-0.00130157" /> -<par_real name="sin" value="0.00248991" /> +<par_real name="cos" value="-0.00112251" /> +<par_real name="sin" value="0.00214736" /> </BF_HARMONIC> <BF_HARMONIC id="434"> -<par_real name="cos" value="-0.000704349" /> -<par_real name="sin" value="-0.00112754" /> +<par_real name="cos" value="-0.000607447" /> +<par_real name="sin" value="-0.000972417" /> </BF_HARMONIC> <BF_HARMONIC id="435"> -<par_real name="cos" value="-0.00414167" /> -<par_real name="sin" value="0.000114387" /> +<par_real name="cos" value="-0.00357188" /> +<par_real name="sin" value="9.86501e-05" /> </BF_HARMONIC> <BF_HARMONIC id="436"> -<par_real name="cos" value="-0.00137037" /> -<par_real name="sin" value="0.0024898" /> +<par_real name="cos" value="-0.00118184" /> +<par_real name="sin" value="0.00214726" /> </BF_HARMONIC> <BF_HARMONIC id="437"> -<par_real name="cos" value="-0.000653225" /> -<par_real name="sin" value="-0.00109746" /> +<par_real name="cos" value="-0.000563357" /> +<par_real name="sin" value="-0.000946476" /> </BF_HARMONIC> <BF_HARMONIC id="438"> -<par_real name="cos" value="-0.00984361" /> -<par_real name="sin" value="0.00333582" /> +<par_real name="cos" value="-0.00848936" /> +<par_real name="sin" value="0.00287689" /> </BF_HARMONIC> <BF_HARMONIC id="439"> -<par_real name="cos" value="-0.00143961" /> -<par_real name="sin" value="0.00248759" /> +<par_real name="cos" value="-0.00124155" /> +<par_real name="sin" value="0.00214536" /> </BF_HARMONIC> <BF_HARMONIC id="440"> -<par_real name="cos" value="-0.000603799" /> -<par_real name="sin" value="-0.00106585" /> +<par_real name="cos" value="-0.000520731" /> +<par_real name="sin" value="-0.000919215" /> </BF_HARMONIC> <BF_HARMONIC id="441"> -<par_real name="cos" value="-0.0041025" /> -<par_real name="sin" value="-6.29366e-05" /> +<par_real name="cos" value="-0.00353809" /> +<par_real name="sin" value="-5.4278e-05" /> </BF_HARMONIC> <BF_HARMONIC id="442"> -<par_real name="cos" value="-0.0015092" /> -<par_real name="sin" value="0.00248326" /> +<par_real name="cos" value="-0.00130157" /> +<par_real name="sin" value="0.00214162" /> </BF_HARMONIC> <BF_HARMONIC id="443"> -<par_real name="cos" value="-0.000556108" /> -<par_real name="sin" value="-0.00103277" /> +<par_real name="cos" value="-0.000479601" /> +<par_real name="sin" value="-0.000890686" /> </BF_HARMONIC> <BF_HARMONIC id="444"> -<par_real name="cos" value="-0.00413718" /> -<par_real name="sin" value="0.00919876" /> +<par_real name="cos" value="-0.003568" /> +<par_real name="sin" value="0.00793323" /> </BF_HARMONIC> <BF_HARMONIC id="445"> -<par_real name="cos" value="-0.00157909" /> -<par_real name="sin" value="0.00247681" /> +<par_real name="cos" value="-0.00136184" /> +<par_real name="sin" value="0.00213606" /> </BF_HARMONIC> <BF_HARMONIC id="446"> -<par_real name="cos" value="-0.000510185" /> -<par_real name="sin" value="-0.000998265" /> +<par_real name="cos" value="-0.000439996" /> +<par_real name="sin" value="-0.000860928" /> </BF_HARMONIC> <BF_HARMONIC id="447"> -<par_real name="cos" value="-0.00405508" /> -<par_real name="sin" value="-0.000236644" /> +<par_real name="cos" value="-0.0034972" /> +<par_real name="sin" value="-0.000204087" /> </BF_HARMONIC> <BF_HARMONIC id="448"> -<par_real name="cos" value="-0.00164922" /> -<par_real name="sin" value="0.00246823" /> +<par_real name="cos" value="-0.00142233" /> +<par_real name="sin" value="0.00212866" /> </BF_HARMONIC> <BF_HARMONIC id="449"> -<par_real name="cos" value="-0.000466065" /> -<par_real name="sin" value="-0.000962394" /> +<par_real name="cos" value="-0.000401946" /> +<par_real name="sin" value="-0.000829992" /> </BF_HARMONIC> <BF_HARMONIC id="450"> -<par_real name="cos" value="-0.00157425" /> -<par_real name="sin" value="0.0011387" /> +<par_real name="cos" value="-0.00135767" /> +<par_real name="sin" value="0.000982042" /> </BF_HARMONIC> <BF_HARMONIC id="451"> -<par_real name="cos" value="-0.00171952" /> -<par_real name="sin" value="0.00245752" /> +<par_real name="cos" value="-0.00148296" /> +<par_real name="sin" value="0.00211942" /> </BF_HARMONIC> <BF_HARMONIC id="452"> -<par_real name="cos" value="-0.00042378" /> -<par_real name="sin" value="-0.000925216" /> +<par_real name="cos" value="-0.000365478" /> +<par_real name="sin" value="-0.000797928" /> </BF_HARMONIC> <BF_HARMONIC id="453"> -<par_real name="cos" value="-0.00399962" /> -<par_real name="sin" value="-0.000406322" /> +<par_real name="cos" value="-0.00344937" /> +<par_real name="sin" value="-0.000350422" /> </BF_HARMONIC> <BF_HARMONIC id="454"> -<par_real name="cos" value="-0.00178994" /> -<par_real name="sin" value="0.00244466" /> +<par_real name="cos" value="-0.00154369" /> +<par_real name="sin" value="0.00210833" /> </BF_HARMONIC> <BF_HARMONIC id="455"> -<par_real name="cos" value="-0.00038336" /> -<par_real name="sin" value="-0.000886788" /> +<par_real name="cos" value="-0.000330619" /> +<par_real name="sin" value="-0.000764787" /> </BF_HARMONIC> <BF_HARMONIC id="456"> -<par_real name="cos" value="-0.00946061" /> -<par_real name="sin" value="0.00253305" /> +<par_real name="cos" value="-0.00815906" /> +<par_real name="sin" value="0.00218456" /> </BF_HARMONIC> <BF_HARMONIC id="457"> -<par_real name="cos" value="-0.0018604" /> -<par_real name="sin" value="0.00242967" /> +<par_real name="cos" value="-0.00160445" /> +<par_real name="sin" value="0.00209541" /> </BF_HARMONIC> <BF_HARMONIC id="458"> -<par_real name="cos" value="-0.000344834" /> -<par_real name="sin" value="-0.000847169" /> +<par_real name="cos" value="-0.000297393" /> +<par_real name="sin" value="-0.000730619" /> </BF_HARMONIC> <BF_HARMONIC id="459"> -<par_real name="cos" value="-0.00393638" /> -<par_real name="sin" value="-0.00057157" /> +<par_real name="cos" value="-0.00339483" /> +<par_real name="sin" value="-0.000492936" /> </BF_HARMONIC> <BF_HARMONIC id="460"> -<par_real name="cos" value="-0.00193086" /> -<par_real name="sin" value="0.00241253" /> +<par_real name="cos" value="-0.00166522" /> +<par_real name="sin" value="0.00208062" /> </BF_HARMONIC> <BF_HARMONIC id="461"> -<par_real name="cos" value="-0.000308231" /> -<par_real name="sin" value="-0.000806418" /> +<par_real name="cos" value="-0.000265826" /> +<par_real name="sin" value="-0.000695474" /> </BF_HARMONIC> <BF_HARMONIC id="462"> -<par_real name="cos" value="-0.00415082" /> -<par_real name="sin" value="0.00835961" /> +<par_real name="cos" value="-0.00357977" /> +<par_real name="sin" value="0.00720953" /> </BF_HARMONIC> <BF_HARMONIC id="463"> -<par_real name="cos" value="-0.00200124" /> -<par_real name="sin" value="0.00239326" /> +<par_real name="cos" value="-0.00172592" /> +<par_real name="sin" value="0.002064" /> </BF_HARMONIC> <BF_HARMONIC id="464"> -<par_real name="cos" value="-0.000273576" /> -<par_real name="sin" value="-0.000764594" /> +<par_real name="cos" value="-0.000235938" /> +<par_real name="sin" value="-0.000659404" /> </BF_HARMONIC> <BF_HARMONIC id="465"> -<par_real name="cos" value="-0.00386563" /> -<par_real name="sin" value="-0.000732001" /> +<par_real name="cos" value="-0.00333381" /> +<par_real name="sin" value="-0.000631295" /> </BF_HARMONIC> <BF_HARMONIC id="466"> -<par_real name="cos" value="-0.00207148" /> -<par_real name="sin" value="0.00237184" /> +<par_real name="cos" value="-0.00178649" /> +<par_real name="sin" value="0.00204553" /> </BF_HARMONIC> <BF_HARMONIC id="467"> -<par_real name="cos" value="-0.000240895" /> -<par_real name="sin" value="-0.000721758" /> +<par_real name="cos" value="-0.000207754" /> +<par_real name="sin" value="-0.000622461" /> </BF_HARMONIC> <BF_HARMONIC id="468"> -<par_real name="cos" value="-0.00140673" /> -<par_real name="sin" value="0.000701925" /> +<par_real name="cos" value="-0.0012132" /> +<par_real name="sin" value="0.000605357" /> </BF_HARMONIC> <BF_HARMONIC id="469"> -<par_real name="cos" value="-0.00214153" /> -<par_real name="sin" value="0.0023483" /> +<par_real name="cos" value="-0.00184691" /> +<par_real name="sin" value="0.00202523" /> </BF_HARMONIC> <BF_HARMONIC id="470"> -<par_real name="cos" value="-0.000210211" /> -<par_real name="sin" value="-0.00067797" /> +<par_real name="cos" value="-0.000181291" /> +<par_real name="sin" value="-0.000584698" /> </BF_HARMONIC> <BF_HARMONIC id="471"> -<par_real name="cos" value="-0.00378765" /> -<par_real name="sin" value="-0.000887242" /> +<par_real name="cos" value="-0.00326656" /> +<par_real name="sin" value="-0.000765179" /> </BF_HARMONIC> <BF_HARMONIC id="472"> -<par_real name="cos" value="-0.00221132" /> -<par_real name="sin" value="0.00232262" /> +<par_real name="cos" value="-0.0019071" /> +<par_real name="sin" value="0.00200308" /> </BF_HARMONIC> <BF_HARMONIC id="473"> -<par_real name="cos" value="-0.000181547" /> -<par_real name="sin" value="-0.000633292" /> +<par_real name="cos" value="-0.00015657" /> +<par_real name="sin" value="-0.000546166" /> </BF_HARMONIC> <BF_HARMONIC id="474"> -<par_real name="cos" value="-0.00902149" /> -<par_real name="sin" value="0.00179485" /> +<par_real name="cos" value="-0.00778035" /> +<par_real name="sin" value="0.00154792" /> </BF_HARMONIC> <BF_HARMONIC id="475"> -<par_real name="cos" value="-0.00228079" /> -<par_real name="sin" value="0.00229483" /> +<par_real name="cos" value="-0.00196701" /> +<par_real name="sin" value="0.00197912" /> </BF_HARMONIC> <BF_HARMONIC id="476"> -<par_real name="cos" value="-0.000154922" /> -<par_real name="sin" value="-0.000587785" /> +<par_real name="cos" value="-0.000133608" /> +<par_real name="sin" value="-0.00050692" /> </BF_HARMONIC> <BF_HARMONIC id="477"> -<par_real name="cos" value="-0.00370277" /> -<par_real name="sin" value="-0.00103694" /> +<par_real name="cos" value="-0.00319336" /> +<par_real name="sin" value="-0.000894282" /> </BF_HARMONIC> <BF_HARMONIC id="478"> -<par_real name="cos" value="-0.00234988" /> -<par_real name="sin" value="0.00226493" /> +<par_real name="cos" value="-0.00202659" /> +<par_real name="sin" value="0.00195333" /> </BF_HARMONIC> <BF_HARMONIC id="479"> -<par_real name="cos" value="-0.000130357" /> -<par_real name="sin" value="-0.000541512" /> +<par_real name="cos" value="-0.000112423" /> +<par_real name="sin" value="-0.000467013" /> </BF_HARMONIC> <BF_HARMONIC id="480"> -<par_real name="cos" value="-0.00408501" /> -<par_real name="sin" value="0.00758564" /> +<par_real name="cos" value="-0.00352301" /> +<par_real name="sin" value="0.00654204" /> </BF_HARMONIC> <BF_HARMONIC id="481"> -<par_real name="cos" value="-0.00241854" /> -<par_real name="sin" value="0.00223292" /> +<par_real name="cos" value="-0.00208581" /> +<par_real name="sin" value="0.00192572" /> </BF_HARMONIC> <BF_HARMONIC id="482"> -<par_real name="cos" value="-0.000107868" /> -<par_real name="sin" value="-0.000494535" /> +<par_real name="cos" value="-9.30279e-05" /> +<par_real name="sin" value="-0.000426499" /> </BF_HARMONIC> <BF_HARMONIC id="483"> -<par_real name="cos" value="-0.00361131" /> -<par_real name="sin" value="-0.00118074" /> +<par_real name="cos" value="-0.00311448" /> +<par_real name="sin" value="-0.0010183" /> </BF_HARMONIC> <BF_HARMONIC id="484"> -<par_real name="cos" value="-0.00248669" /> -<par_real name="sin" value="0.00219883" /> +<par_real name="cos" value="-0.00214458" /> +<par_real name="sin" value="0.00189632" /> </BF_HARMONIC> <BF_HARMONIC id="485"> -<par_real name="cos" value="-8.74726e-05" /> -<par_real name="sin" value="-0.000446916" /> +<par_real name="cos" value="-7.54385e-05" /> +<par_real name="sin" value="-0.000385431" /> </BF_HARMONIC> <BF_HARMONIC id="486"> -<par_real name="cos" value="-0.00117686" /> -<par_real name="sin" value="0.000312603" /> +<par_real name="cos" value="-0.00101495" /> +<par_real name="sin" value="0.000269596" /> </BF_HARMONIC> <BF_HARMONIC id="487"> -<par_real name="cos" value="-0.00255428" /> -<par_real name="sin" value="0.00216266" /> +<par_real name="cos" value="-0.00220287" /> +<par_real name="sin" value="0.00186513" /> </BF_HARMONIC> <BF_HARMONIC id="488"> -<par_real name="cos" value="-6.91844e-05" /> -<par_real name="sin" value="-0.000398719" /> +<par_real name="cos" value="-5.96663e-05" /> +<par_real name="sin" value="-0.000343865" /> </BF_HARMONIC> <BF_HARMONIC id="489"> -<par_real name="cos" value="-0.00351361" /> -<par_real name="sin" value="-0.00131833" /> +<par_real name="cos" value="-0.00303022" /> +<par_real name="sin" value="-0.00113696" /> </BF_HARMONIC> <BF_HARMONIC id="490"> -<par_real name="cos" value="-0.00262126" /> -<par_real name="sin" value="0.00212443" /> +<par_real name="cos" value="-0.00226064" /> +<par_real name="sin" value="0.00183216" /> </BF_HARMONIC> <BF_HARMONIC id="491"> -<par_real name="cos" value="-5.30167e-05" /> -<par_real name="sin" value="-0.000350008" /> +<par_real name="cos" value="-4.57229e-05" /> +<par_real name="sin" value="-0.000301855" /> </BF_HARMONIC> <BF_HARMONIC id="492"> -<par_real name="cos" value="-0.00853301" /> -<par_real name="sin" value="0.00112869" /> +<par_real name="cos" value="-0.00735907" /> +<par_real name="sin" value="0.000973409" /> </BF_HARMONIC> <BF_HARMONIC id="493"> -<par_real name="cos" value="-0.00268756" /> -<par_real name="sin" value="0.00208416" /> +<par_real name="cos" value="-0.00231782" /> +<par_real name="sin" value="0.00179743" /> </BF_HARMONIC> <BF_HARMONIC id="494"> -<par_real name="cos" value="-3.89813e-05" /> -<par_real name="sin" value="-0.000300846" /> +<par_real name="cos" value="-3.36184e-05" /> +<par_real name="sin" value="-0.000259457" /> </BF_HARMONIC> <BF_HARMONIC id="495"> -<par_real name="cos" value="-0.00341004" /> -<par_real name="sin" value="-0.0014494" /> +<par_real name="cos" value="-0.0029409" /> +<par_real name="sin" value="-0.00125" /> </BF_HARMONIC> <BF_HARMONIC id="496"> -<par_real name="cos" value="-0.00275313" /> -<par_real name="sin" value="0.00204186" /> +<par_real name="cos" value="-0.00237436" /> +<par_real name="sin" value="0.00176095" /> </BF_HARMONIC> <BF_HARMONIC id="497"> -<par_real name="cos" value="-2.70881e-05" /> -<par_real name="sin" value="-0.000251297" /> +<par_real name="cos" value="-2.33614e-05" /> +<par_real name="sin" value="-0.000216725" /> </BF_HARMONIC> <BF_HARMONIC id="498"> -<par_real name="cos" value="-0.00394964" /> -<par_real name="sin" value="0.00688405" /> +<par_real name="cos" value="-0.00340626" /> +<par_real name="sin" value="0.00593697" /> </BF_HARMONIC> <BF_HARMONIC id="499"> -<par_real name="cos" value="-0.0028179" /> -<par_real name="sin" value="0.00199755" /> +<par_real name="cos" value="-0.00243022" /> +<par_real name="sin" value="0.00172273" /> </BF_HARMONIC> <BF_HARMONIC id="500"> -<par_real name="cos" value="-1.73457e-05" /> -<par_real name="sin" value="-0.000201425" /> +<par_real name="cos" value="-1.49593e-05" /> +<par_real name="sin" value="-0.000173714" /> </BF_HARMONIC> <BF_HARMONIC id="501"> -<par_real name="cos" value="-0.00330098" /> -<par_real name="sin" value="-0.00157366" /> +<par_real name="cos" value="-0.00284684" /> +<par_real name="sin" value="-0.00135716" /> </BF_HARMONIC> <BF_HARMONIC id="502"> -<par_real name="cos" value="-0.00288183" /> -<par_real name="sin" value="0.00195126" /> +<par_real name="cos" value="-0.00248536" /> +<par_real name="sin" value="0.00168281" /> </BF_HARMONIC> <BF_HARMONIC id="503"> -<par_real name="cos" value="-9.76103e-06" /> -<par_real name="sin" value="-0.000151295" /> +<par_real name="cos" value="-8.41815e-06" /> +<par_real name="sin" value="-0.00013048" /> </BF_HARMONIC> <BF_HARMONIC id="504"> -<par_real name="cos" value="-0.000893711" /> -<par_real name="sin" value="-2.03193e-05" /> +<par_real name="cos" value="-0.000770758" /> +<par_real name="sin" value="-1.75238e-05" /> </BF_HARMONIC> <BF_HARMONIC id="505"> -<par_real name="cos" value="-0.00294485" /> -<par_real name="sin" value="0.001903" /> +<par_real name="cos" value="-0.00253971" /> +<par_real name="sin" value="0.00164119" /> </BF_HARMONIC> <BF_HARMONIC id="506"> -<par_real name="cos" value="-4.33953e-06" /> -<par_real name="sin" value="-0.000100971" /> +<par_real name="cos" value="-3.74251e-06" /> +<par_real name="sin" value="-8.70798e-05" /> </BF_HARMONIC> <BF_HARMONIC id="507"> -<par_real name="cos" value="-0.00318682" /> -<par_real name="sin" value="-0.00169084" /> +<par_real name="cos" value="-0.00274839" /> +<par_real name="sin" value="-0.00145822" /> </BF_HARMONIC> <BF_HARMONIC id="508"> -<par_real name="cos" value="-0.00300692" /> -<par_real name="sin" value="0.00185281" /> +<par_real name="cos" value="-0.00259324" /> +<par_real name="sin" value="0.00159791" /> </BF_HARMONIC> <BF_HARMONIC id="509"> -<par_real name="cos" value="-1.08508e-06" /> -<par_real name="sin" value="-5.05179e-05" /> +<par_real name="cos" value="-9.35799e-07" /> +<par_real name="sin" value="-4.35678e-05" /> </BF_HARMONIC> <BF_HARMONIC id="510"> -<par_real name="cos" value="-0.00800357" /> -<par_real name="sin" value="0.000541017" /> +<par_real name="cos" value="-0.00690247" /> +<par_real name="sin" value="0.000466586" /> </BF_HARMONIC> <BF_HARMONIC id="511"> -<par_real name="cos" value="-0.00306797" /> -<par_real name="sin" value="0.0018007" /> +<par_real name="cos" value="-0.00264589" /> +<par_real name="sin" value="0.00155297" /> </BF_HARMONIC> </BASE_FUNCTION> </OSCIL> diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0109 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -50,21 +50,21 @@ decl {\#include "OscilGenUI.h"} {public decl {\#include "PresetsUI.h"} {public } -class ADvoicelistitem {: {public Fl_Group} +class ADvoicelistitem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window ADnoteVoiceListItem { - private xywh {247 599 615 30} type Double hide - class Fl_Group + Fl_Window ADnoteVoiceListItem {open + private xywh {262 736 615 100} type Double box UP_FRAME + class Fl_Group visible } { Fl_Group voicelistitemgroup { - private xywh {50 0 570 25} box FLAT_BOX + private xywh {50 0 570 25} code0 {if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();} } { Fl_Value_Slider voicevolume { callback {pars->VoicePar[nvoice].PVolume=(int)o->value();} - tooltip Volume xywh {90 5 115 20} type {Horz Knob} box FLAT_BOX labelsize 8 align 5 maximum 127 step 1 + tooltip Volume xywh {90 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PVolume);} } Fl_Check_Button voiceresonanceenabled { @@ -74,7 +74,7 @@ class ADvoicelistitem {: {public Fl_Group} } Fl_Value_Slider voicelfofreq { callback {pars->VoicePar[nvoice].FreqLfo->Pintensity=(int)o->value();} - tooltip {Frequency LFO amount} xywh {500 5 115 20} type {Horz Knob} box FLAT_BOX labelsize 8 align 5 maximum 127 step 1 + tooltip {Frequency LFO amount} xywh {500 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].FreqLfo->Pintensity);} } Fl_Dial voicepanning { @@ -97,7 +97,7 @@ class ADvoicelistitem {: {public Fl_Group} Fl_Slider voicedetune { callback {pars->VoicePar[nvoice].PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {315 5 185 20} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {315 5 185 20} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PDetune-8192);} } Fl_Box noiselabel { @@ -177,40 +177,40 @@ class ADvoiceUI {open : {public Fl_Group} Function {make_window()} {open } { Fl_Window ADnoteVoiceParameters { - label Voice - xywh {69 185 765 575} type Double + label Voice open + xywh {84 305 765 590} type Double box NO_BOX class Fl_Group visible } { Fl_Group voiceparametersgroup {open - xywh {0 0 765 580} box THIN_UP_BOX color 48 + xywh {0 0 765 595} color 48 code0 {if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();} } { Fl_Group voicemodegroup {open - xywh {0 5 760 575} + xywh {0 5 765 590} color 64 } { Fl_Group voiceFMparametersgroup { - label MODULATOR - xywh {530 5 230 565} box THIN_UP_FRAME color 48 labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label MODULATOR open + xywh {530 5 230 580} box UP_FRAME color 48 labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->VoicePar[nvoice].PFMEnabled==0) o->deactivate();} } { Fl_Group modfrequency { label {Mod.FREQUENCY} - xywh {535 220 220 145} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {535 220 220 155} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group voiceFMfreqenvgroup { label {ADSynth Modulator - Frequency Envelope} - xywh {540 290 205 70} box FLAT_BOX color 51 align 144 + xywh {540 300 210 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FMFreqEnvelope);} code1 {if (pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceFMfreqenvgroup->deactivate(); else voiceFMfreqenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {545 295 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {545 305 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled);} } Fl_Counter {} { @@ -219,7 +219,7 @@ o->redraw();} if (k<0) k+=1024; pars->VoicePar[nvoice].PFMCoarseDetune = k+ (pars->VoicePar[nvoice].PFMCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {685 270 60 15} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {685 280 60 15} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -231,7 +231,7 @@ pars->VoicePar[nvoice].PFMCoarseDetune = k+ if (k<0) k+=16; pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+ pars->VoicePar[nvoice].PFMCoarseDetune%1024;} - tooltip Octave xywh {625 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {625 280 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PFMCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} @@ -239,13 +239,13 @@ pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+ Fl_Slider {} { callback {pars->VoicePar[nvoice].PFMDetune=(int)o->value()+8192; fmdetunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {590 245 160 10} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {590 245 155 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMDetune-8192);} } Fl_Value_Output fmdetunevalueoutput { label Detune callback {o->value(getdetune((pars->VoicePar[nvoice].PFMDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));} - xywh {540 245 45 13} labelsize 8 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 8 + xywh {540 245 45 18} labelsize 8 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 8 code0 {o->value(getdetune((pars->VoicePar[nvoice].PFMDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));} code1 {//o->value(getdetune(pars->VoicePar[nvoice].PFMDetuneType,0,pars->VoicePar[nvoice].PFMDetune));} } @@ -253,25 +253,25 @@ fmdetunevalueoutput->do_callback();} label {Detune Type} callback {pars->VoicePar[nvoice].PFMDetuneType=(int) o->value(); fmdetunevalueoutput->do_callback();} open - xywh {540 270 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {540 280 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} code1 {o->value(pars->VoicePar[nvoice].PFMDetuneType);} } {} } Fl_Group {} { label {Mod.AMPLITUDE} - xywh {535 60 220 160} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {535 60 220 160} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider {} { label Vol callback {pars->VoicePar[nvoice].PFMVolume=(int)o->value();} - tooltip Volume xywh {540 80 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {540 80 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVolume);} } Fl_Value_Slider {} { label {V.Sns} callback {pars->VoicePar[nvoice].PFMVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {540 100 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {540 100 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVelocityScaleFunction);} } Fl_Group voiceFMampenvgroup { @@ -282,33 +282,33 @@ fmdetunevalueoutput->do_callback();} open class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceFMampenvgroup->deactivate(); else voiceFMampenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {545 150 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {545 150 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled);} } Fl_Value_Slider {} { label {F.Damp} callback {pars->VoicePar[nvoice].PFMVolumeDamp=(int) o->value()+64;} - tooltip {Modulator Damp at Higher frequency} xywh {540 120 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 minimum -64 maximum 63 step 1 + tooltip {Modulator Damp at Higher frequency} xywh {540 120 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 minimum -64 maximum 63 step 1 code0 {o->value(pars->VoicePar[nvoice].PFMVolumeDamp-64);} } } - Fl_Group modoscil { - xywh {535 365 220 200} + Fl_Group modoscil {open + xywh {535 365 220 220} } { Fl_Group fmoscil {open - xywh {535 425 220 140} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 + xywh {535 440 220 140} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {oscFM=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil;} code2 {oscFM->init(pars->VoicePar[nv].FMSmp,0,pars->VoicePar[nvoice].PFMoscilphase,master);} } {} Fl_Box {} { label {Mod.Oscillator} - xywh {535 365 155 20} labelfont 1 align 20 + xywh {535 375 155 20} labelfont 1 align 20 } Fl_Button changeFMoscilbutton { label Change @@ -318,7 +318,7 @@ int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil; oscedit=new OscilEditor(pars->VoicePar[nv].FMSmp,fmoscil,NULL,NULL,master);} - xywh {700 370 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {700 380 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 code0 {if (pars->VoicePar[nvoice].PextFMoscil>=0) o->labelcolor(FL_BLUE);} } Fl_Slider {} { @@ -326,7 +326,7 @@ oscedit=new OscilEditor(pars->VoicePar[nv].FMSmp,fmoscil,NULL,NULL,master);} callback {pars->VoicePar[nvoice].PFMoscilphase=64-(int)o->value(); oscFM->phase=64-(int) o->value(); fmoscil->redraw();} - xywh {665 400 65 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + xywh {645 415 105 15} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {o->value(64-pars->VoicePar[nvoice].PFMoscilphase);} } Fl_Choice {} { @@ -340,7 +340,7 @@ if ((int) o->value() != 0) { changeFMoscilbutton->labelcolor(FL_BLACK); }; voiceFMparametersgroup->redraw();} open - xywh {560 395 75 15} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 + xywh {560 410 75 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 code0 {o->add("Internal");} code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtM.%2d",i+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].PextFMoscil+1);} @@ -400,38 +400,38 @@ o->redraw();} } Fl_Group {} { label FREQUENCY - xywh {5 250 525 120} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 265 525 120} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group voicefreqenvgroup { label {ADSynth Voice - Frequency Envelope} open - xywh {10 290 205 70} box FLAT_BOX color 51 align 144 + xywh {10 305 205 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FreqEnvelope);} code1 {if (pars->VoicePar[nvoice].PFreqEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFreqEnvelopeEnabled=(int)o->value(); if (o->value()==0) voicefreqenvgroup->deactivate(); else voicefreqenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 295 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 310 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFreqEnvelopeEnabled);} } Fl_Group voicefreqlfogroup { label {Frequency LFO } open - xywh {215 290 230 70} box FLAT_BOX color 47 align 144 + xywh {220 305 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].FreqLfo);} code1 {if (pars->VoicePar[nvoice].PFreqLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFreqLfoEnabled=(int)o->value(); if (o->value()==0) voicefreqlfogroup->deactivate(); else voicefreqlfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {220 295 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {225 311 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFreqLfoEnabled);} } Fl_Counter {} { @@ -440,7 +440,7 @@ o->redraw();} if (k<0) k+=16; pars->VoicePar[nvoice].PCoarseDetune = k*1024+ pars->VoicePar[nvoice].PCoarseDetune%1024;} - tooltip Octave xywh {470 270 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {470 285 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune/1024;} code1 {if (k>=8) k-=16;} code2 {o->value(k);} @@ -451,7 +451,7 @@ pars->VoicePar[nvoice].PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->VoicePar[nvoice].PCoarseDetune = k+ (pars->VoicePar[nvoice].PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 340 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {455 355 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->VoicePar[nvoice].PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -460,13 +460,13 @@ pars->VoicePar[nvoice].PCoarseDetune = k+ Fl_Slider {} { callback {pars->VoicePar[nvoice].PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {58 272 392 13} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {58 287 392 13} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->VoicePar[nvoice].PDetune-8192);} } Fl_Value_Output detunevalueoutput { label Detune callback {o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());} - xywh {10 272 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 + xywh {10 287 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 code0 {o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());} } Fl_Check_Button {} { @@ -475,13 +475,13 @@ detunevalueoutput->do_callback();} pars->VoicePar[nvoice].Pfixedfreq=x; if (x==0) fixedfreqetdial->deactivate(); else fixedfreqetdial->activate();} - tooltip {Set the voice base frequency to 440Hz} xywh {345 253 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 + tooltip {Set the voice base frequency to 440Hz} xywh {345 268 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].Pfixedfreq);} } Fl_Dial fixedfreqetdial { label {Eq.T.} callback {pars->VoicePar[nvoice].PfixedfreqET=(int) o->value();} - tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {405 255 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1 + tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {405 270 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PfixedfreqET);} code1 {if (pars->VoicePar[nvoice].Pfixedfreq==0) o->deactivate();} class WidgetPDial @@ -490,13 +490,13 @@ if (x==0) fixedfreqetdial->deactivate(); label {Detune Type} callback {pars->VoicePar[nvoice].PDetuneType=(int) o->value(); detunevalueoutput->do_callback();} open - xywh {450 305 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {455 320 70 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} code1 {o->value(pars->VoicePar[nvoice].PDetuneType);} } {} } Fl_Group voiceoscil { - xywh {80 375 445 145} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 + xywh {80 390 445 145} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 code0 {osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} code1 {int nv=nvoice; if (pars->VoicePar[nvoice].Pextoscil>=0) nv=pars->VoicePar[nvoice].Pextoscil;} code2 {osc->init(pars->VoicePar[nv].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);} @@ -509,19 +509,19 @@ int nv=nvoice; if (pars->VoicePar[nvoice].Pextoscil>=0) nv=pars->VoicePar[nvoice].Pextoscil; oscedit=new OscilEditor(pars->VoicePar[nv].OscilSmp,voiceoscil,NULL,NULL,master);} - xywh {5 475 65 20} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {5 490 65 20} box THIN_UP_BOX labelfont 1 labelsize 11 code0 {if (pars->VoicePar[nvoice].Pextoscil>=0) o->labelcolor(FL_BLUE);} } Fl_Box {} { label {Voice Oscillator} - xywh {5 375 75 35} labelfont 1 labelsize 12 align 128 + xywh {5 390 75 35} labelfont 1 labelsize 12 align 128 } Fl_Slider {} { label Phase callback {pars->VoicePar[nvoice].Poscilphase=64-(int)o->value(); osc->phase=64-(int) o->value(); voiceoscil->redraw();} - xywh {10 420 65 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + xywh {10 435 65 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {o->value(64-pars->VoicePar[nvoice].Poscilphase);} } Fl_Check_Button {} { @@ -543,39 +543,39 @@ if ((int) o->value() != 0) { voiceparametersgroup->redraw(); voiceonbutton->redraw();} open - xywh {5 455 65 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {5 470 65 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("Internal");} code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"Ext.%2d",i+1);o->add(tmp);};} code3 {o->value(pars->VoicePar[nvoice].Pextoscil+1);} } {} Fl_Group {} {open - xywh {5 525 515 45} box ENGRAVED_BOX + xywh {5 540 515 45} box UP_FRAME } { Fl_Dial {} { label Stereo callback {pars->VoicePar[nvoice].Unison_stereo_spread=(int)o->value();} - tooltip {Stereo Spread} xywh {285 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Stereo Spread} xywh {285 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_stereo_spread);} class WidgetPDial } Fl_Choice {} { label Unison - callback {pars->set_unison_size_index(nvoice,(int) o->value());} open selected - tooltip {Unison size} xywh {10 545 75 20} down_box BORDER_BOX labelfont 1 align 5 textfont 1 textsize 10 + callback {pars->set_unison_size_index(nvoice,(int) o->value());} open + tooltip {Unison size} xywh {10 560 75 20} down_box BORDER_BOX labelfont 1 align 5 textfont 1 textsize 10 code0 {o->add("OFF");char tmp[100];for (int i=1;ADnote_unison_sizes[i];i++){snprintf(tmp,100,"size %d",ADnote_unison_sizes[i]);o->add(tmp);};} code1 {o->value(pars->get_unison_size_index(nvoice));} } {} Fl_Dial {} { label Vibratto callback {pars->VoicePar[nvoice].Unison_vibratto=(int)o->value();} - tooltip Vibratto xywh {340 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip Vibratto xywh {340 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_vibratto);} class WidgetPDial } Fl_Choice {} { label Invert callback {pars->VoicePar[nvoice].Unison_invert_phase=(int) o->value();} open - tooltip {Phase Invert} xywh {445 545 65 15} down_box BORDER_BOX labelsize 11 align 5 textfont 1 textsize 10 + tooltip {Phase Invert} xywh {445 560 65 15} down_box BORDER_BOX labelsize 11 align 5 textfont 1 textsize 10 code0 {o->add("None");o->add("Random");char tmp[100];for (int i=2;i<=5;i++){snprintf(tmp,100,"%d %%",100/i);o->add(tmp);};} code1 {o->value(pars->VoicePar[nvoice].Unison_invert_phase);} } {} @@ -583,38 +583,38 @@ voiceonbutton->redraw();} open label {Frequency Spread} callback {pars->VoicePar[nvoice].Unison_frequency_spread=(int)o->value(); unisonspreadoutput->do_callback();} - tooltip {Frequency Spread of the Unison} xywh {95 547 125 13} type {Horz Knob} box FLAT_BOX labelsize 12 align 1 maximum 127 step 1 value 64 + tooltip {Frequency Spread of the Unison} xywh {95 562 125 13} type {Horz Knob} box NO_BOX labelsize 12 align 1 maximum 127 step 1 value 64 code0 {o->value(pars->VoicePar[nvoice].Unison_frequency_spread);} } Fl_Value_Output unisonspreadoutput { label {(cents)} callback {o->value(pars->getUnisonFrequencySpreadCents(nvoice));} - xywh {225 545 40 15} labelsize 10 align 5 maximum 1000 step 0.1 textfont 1 textsize 10 + xywh {225 560 40 15} labelsize 10 align 5 maximum 1000 step 0.1 textfont 1 textsize 10 code0 {o->value(pars->getUnisonFrequencySpreadCents(nvoice));} } Fl_Dial {} { label {Vib.speed} callback {pars->VoicePar[nvoice].Unison_vibratto_speed=(int)o->value();} - tooltip {Vibratto Average Speed} xywh {390 540 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Vibratto Average Speed} xywh {390 555 25 30} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].Unison_vibratto_speed);} class WidgetPDial } } } Fl_Group {} { - label AMPLITUDE - xywh {5 40 240 210} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label AMPLITUDE open + xywh {5 40 240 220} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider {} { label Vol callback {pars->VoicePar[nvoice].PVolume=(int)o->value();} - tooltip Volume xywh {10 60 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 60 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PVolume);} } Fl_Value_Slider {} { label {V.Sns} callback {pars->VoicePar[nvoice].PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 80 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 80 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PAmpVelocityScaleFunction);} } Fl_Group voiceampenvgroup { @@ -632,28 +632,28 @@ unisonspreadoutput->do_callback();} class WidgetPDial } Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PAmpEnvelopeEnabled=(int)o->value(); if (o->value()==0) voiceampenvgroup->deactivate(); else voiceampenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 110 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 110 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PAmpEnvelopeEnabled);} } Fl_Group voiceamplfogroup { label {Amplitude LFO } open - xywh {10 175 230 70} box FLAT_BOX color 47 align 144 + xywh {10 180 230 75} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].AmpLfo);} code1 {if (pars->VoicePar[nvoice].PAmpLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PAmpLfoEnabled=(int)o->value(); if (o->value()==0) voiceamplfogroup->deactivate(); else voiceamplfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {15 180 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {15 185 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PAmpLfoEnabled);} } Fl_Check_Button {} { @@ -664,8 +664,8 @@ o->redraw();} } } Fl_Group voicefiltergroup { - label FILTER - xywh {245 5 285 245} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FILTER open + xywh {245 5 285 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->VoicePar[nvoice].PFilterEnabled==0) o->deactivate();} } { Fl_Group {} { @@ -676,34 +676,34 @@ o->redraw();} } {} Fl_Group voicefilterenvgroup { label {ADSynth Voice - Filter Envelope} open - xywh {250 105 275 70} box FLAT_BOX color 51 align 144 + xywh {250 115 275 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->VoicePar[nvoice].FilterEnvelope);} code1 {if (pars->VoicePar[nvoice].PFilterEnvelopeEnabled==0) o->deactivate();} class EnvelopeUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterEnvelopeEnabled=(int)o->value(); if (o->value()==0) voicefilterenvgroup->deactivate(); else voicefilterenvgroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {255 110 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {255 119 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterEnvelopeEnabled);} } Fl_Group voicefilterlfogroup { label {Filter LFO } open - xywh {250 175 230 70} box FLAT_BOX color 47 align 144 + xywh {250 190 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->VoicePar[nvoice].FilterLfo);} code1 {if (pars->VoicePar[nvoice].PFilterLfoEnabled==0) o->deactivate();} class LFOUI } {} Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterLfoEnabled=(int)o->value(); if (o->value()==0) voicefilterlfogroup->deactivate(); else voicefilterlfogroup->activate(); o->redraw();} - tooltip {Forced Relase} xywh {255 180 55 10} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Forced Relase} xywh {255 196 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterLfoEnabled);} } } @@ -718,7 +718,7 @@ pars->VoicePar[nvoice].Type=x; if (x==0) voicemodegroup->activate(); else voicemodegroup->deactivate(); noiselabel->do_callback();} - tooltip {Oscillator Type (sound/noise)} xywh {5 500 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 + tooltip {Oscillator Type (sound/noise)} xywh {5 515 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 code0 {o->value(pars->VoicePar[nvoice].Type);} code1 {if (pars->VoicePar[nvoice].Type!=0) voicemodegroup->deactivate();} } { @@ -737,30 +737,30 @@ noiselabel->do_callback();} xywh {425 10 100 20} down_box DOWN_BOX labelfont 1 labelsize 10 align 148 code0 {o->value(pars->VoicePar[nvoice].Pfilterbypass);} } - Fl_Group {} { + Fl_Group {} {open xywh {115 5 95 35} box THIN_UP_BOX } { Fl_Value_Slider {} { label Delay callback {pars->VoicePar[nvoice].PDelay=(int)o->value();} - tooltip Volume xywh {120 21 84 12} type {Horz Knob} box FLAT_BOX labelsize 11 align 5 maximum 127 step 1 + tooltip Volume xywh {120 21 84 12} type {Horz Knob} box NO_BOX labelsize 11 align 5 maximum 127 step 1 code0 {o->value(pars->VoicePar[nvoice].PDelay);} } } Fl_Check_Button {} { - label Enable + label On callback {pars->VoicePar[nvoice].PFilterEnabled=(int)o->value(); if (o->value()==0) voicefiltergroup->deactivate(); else voicefiltergroup->activate(); o->redraw(); bypassfiltercheckbutton->redraw();} - tooltip {Enable Filter} xywh {250 15 60 15} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Enable Filter} xywh {250 15 60 15} down_box DOWN_BOX labelfont 1 labelsize 11 code0 {o->value(pars->VoicePar[nvoice].PFilterEnabled);} } Fl_Box noiselabel { label {White Noise} callback {if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();} - xywh {150 415 300 65} labelfont 1 labelsize 50 labelcolor 7 + xywh {150 430 300 65} labelfont 1 labelsize 50 labelcolor 7 code0 {if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();} } } @@ -789,7 +789,8 @@ make_window(); end(); ADnoteVoiceParameters->show();} {} } - Function {~ADvoiceUI()} {} { + Function {~ADvoiceUI()} {open + } { code {ADnoteVoiceParameters->hide(); hide(); if (oscedit!=NULL) { @@ -810,16 +811,16 @@ class ADnoteUI {open : {public PresetsUI_} Function {make_window()} {open private } { Fl_Window ADnoteGlobalParameters { - label {ADsynth Global Parameters of the Instrument} - xywh {462 186 535 405} type Double hide + label {ADsynth Global Parameters of the Instrument} open + xywh {457 319 540 430} type Double visible } { Fl_Group {} { - label FREQUENCY - xywh {5 255 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FREQUENCY open + xywh {5 280 530 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group freqenv { label {ADSynth Global - Frequency Envelope} open - xywh {10 295 205 70} box FLAT_BOX color 51 align 144 + xywh {10 320 205 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->GlobalPar.FreqEnvelope);} class EnvelopeUI } {} @@ -829,7 +830,7 @@ class ADnoteUI {open : {public PresetsUI_} if (k<0) k+=16; pars->GlobalPar.PCoarseDetune = k*1024+ pars->GlobalPar.PCoarseDetune%1024;} - tooltip Octave xywh {450 275 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 + tooltip Octave xywh {455 300 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 code0 {int k=pars->GlobalPar.PCoarseDetune/1024;if (k>=8) k-=16;} code2 {o->value(k);} } @@ -839,34 +840,34 @@ pars->GlobalPar.PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->GlobalPar.PCoarseDetune = k+ (pars->GlobalPar.PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 345 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {460 370 60 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->GlobalPar.PCoarseDetune%1024;if (k>=512) k-=1024;} code2 {o->value(k);} code3 {o->lstep(10);} } Fl_Group freqlfo { label {Frequency LFO } open - xywh {215 295 230 70} box FLAT_BOX color 47 align 144 + xywh {220 320 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.FreqLfo);} class LFOUI } {} Fl_Slider freq { callback {pars->GlobalPar.PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {60 275 385 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {60 300 385 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->GlobalPar.PDetune-8192);} } Fl_Value_Output detunevalueoutput { label Detune callback {o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));} - xywh {12 275 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 + xywh {12 300 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 code0 {o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));} } Fl_Choice detunetype { label {Detune Type} callback {pars->GlobalPar.PDetuneType=(int) o->value()+1; detunevalueoutput->do_callback();} open - xywh {450 315 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {455 340 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} code1 {o->value(pars->GlobalPar.PDetuneType-1);} } {} @@ -879,25 +880,25 @@ pars->getBandwidthDetuneMultiplier(); for (int i=0;i<NUM_VOICES;i++){ voicelistitem[i]->refreshlist(); };} - tooltip {Bandwidth - how the relative fine detune of the voice are changed} xywh {500 270 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Bandwidth - how the relative fine detune of the voice are changed} xywh {505 295 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PBandwidth);} class WidgetPDial } } Fl_Group {} { label AMPLITUDE - xywh {5 5 240 250} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 5 240 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider volume { label Vol callback {pars->GlobalPar.PVolume=(int)o->value();} - tooltip Volume xywh {10 30 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 30 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->GlobalPar.PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 50 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -910,28 +911,28 @@ for (int i=0;i<NUM_VOICES;i++){ Fl_Dial pstr { label {P.Str.} callback {pars->GlobalPar.PPunchStrength=(int) o->value();} - tooltip {Punch Strength} xywh {125 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Strength} xywh {125 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchStrength);} class WidgetPDial } Fl_Dial pt { label {P.t.} callback {pars->GlobalPar.PPunchTime=(int) o->value();} - tooltip {Punch Time (duration)} xywh {155 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Time (duration)} xywh {155 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchTime);} class WidgetPDial } Fl_Dial pstc { label {P.Stc.} callback {pars->GlobalPar.PPunchStretch=(int) o->value();} - tooltip {Punch Stretch} xywh {185 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Stretch} xywh {185 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchStretch);} class WidgetPDial } Fl_Dial pvel { label {P.Vel.} callback {pars->GlobalPar.PPunchVelocitySensing=(int) o->value();} - tooltip {Punch Velocity Sensing} xywh {215 227 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 + tooltip {Punch Velocity Sensing} xywh {215 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->GlobalPar.PPunchVelocitySensing);} class WidgetPDial } @@ -943,36 +944,36 @@ for (int i=0;i<NUM_VOICES;i++){ } {} Fl_Group amplfo { label {Amplitude LFO } open - xywh {10 145 230 70} box FLAT_BOX color 47 align 144 + xywh {10 150 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.AmpLfo);} class LFOUI } {} Fl_Check_Button rndgrp { label {Rnd Grp} callback {pars->GlobalPar.Hrandgrouping=(int) o->value();} - tooltip {How the Harmonic Amplitude is applied to voices that use the same oscillator} xywh {70 225 40 25} down_box DOWN_BOX labelsize 10 align 148 + tooltip {How the Harmonic Amplitude is applied to voices that use the same oscillator} xywh {70 235 40 25} down_box DOWN_BOX labelsize 10 align 148 code0 {o->value(pars->GlobalPar.Hrandgrouping);} } } Fl_Group {} { - label FILTER - xywh {245 5 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + label FILTER open selected + xywh {250 5 285 265} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group filterenv { label {ADSynth Global - Filter Envelope} open - xywh {250 110 275 70} box FLAT_BOX color 51 align 144 + xywh {255 118 275 70} box FLAT_BOX color 51 align 144 code0 {o->init(pars->GlobalPar.FilterEnvelope);} class EnvelopeUI } {} Fl_Group filterlfo { label {Filter LFO} open - xywh {250 180 230 70} box FLAT_BOX color 47 align 144 + xywh {255 195 230 70} box FLAT_BOX color 47 align 144 code0 {o->init(pars->GlobalPar.FilterLfo);} class LFOUI } {} Fl_Group filterui { label {ADsynth Global - Filter} open - xywh {250 35 275 75} box FLAT_BOX color 50 align 144 + xywh {255 35 275 75} box FLAT_BOX color 50 align 144 code0 {o->init(pars->GlobalPar.GlobalFilter,&pars->GlobalPar.PFilterVelocityScale,&pars->GlobalPar.PFilterVelocityScaleFunction);} class FilterUI } {} @@ -980,7 +981,7 @@ for (int i=0;i<NUM_VOICES;i++){ Fl_Check_Button stereo { label Stereo callback {pars->GlobalPar.PStereo=(int) o->value();} - xywh {5 220 65 35} box ENGRAVED_BOX down_box DOWN_BOX labelfont 1 labelsize 11 + xywh {5 230 65 35} down_box DOWN_BOX labelsize 11 code0 {o->value(pars->GlobalPar.PStereo);} } Fl_Button {} { @@ -989,41 +990,41 @@ for (int i=0;i<NUM_VOICES;i++){ voicelistitem[i]->refreshlist(); } ADnoteVoiceList->show();} - xywh {180 375 125 25} + xywh {180 400 125 25} labelsize 12 } Fl_Button {} { label {Show Voice Parameters} callback {ADnoteVoice->show();} - xywh {5 375 170 25} labelfont 1 labelsize 12 + xywh {5 400 170 25} labelsize 12 } Fl_Button {} { label Close callback {ADnoteGlobalParameters->hide();} - xywh {470 375 60 25} box THIN_UP_BOX + xywh {475 400 60 25} box THIN_UP_BOX } Fl_Button {} { label Resonance callback {resui->resonancewindow->redraw(); resui->resonancewindow->show();} - tooltip Resonance xywh {309 375 86 25} box THIN_UP_BOX + tooltip Resonance xywh {309 400 86 25} box THIN_UP_BOX labelsize 12 } Fl_Button {} { label C callback {presetsui->copy(pars);} - xywh {405 380 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {405 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this);} - xywh {435 380 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {435 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Window ADnoteVoice { - label {ADsynth Voice Parameters} - xywh {152 271 765 620} type Double visible + label {ADsynth Voice Parameters} open + xywh {512 361 765 620} type Double visible } { Fl_Group advoice { - xywh {0 0 760 575} box BORDER_BOX + xywh {0 0 765 585} code0 {o->init(pars,nvoice,master);} code1 {o->show();} class ADvoiceUI @@ -1031,7 +1032,7 @@ resui->resonancewindow->show();} Fl_Button {} { label {Close Window} callback {ADnoteVoice->hide();} - xywh {300 585 195 25} box THIN_UP_BOX labelfont 1 + xywh {305 590 195 25} box THIN_UP_BOX labelfont 1 } Fl_Counter currentvoicecounter { label {Current Voice} @@ -1044,18 +1045,18 @@ ADnoteVoice->add(advoice); advoice->init(pars,nvoice,master); advoice->show(); ADnoteVoice->redraw();} - xywh {5 585 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 13 + xywh {10 590 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 13 code0 {o->bounds(1,NUM_VOICES);} } Fl_Button {} { label C callback {presetsui->copy(pars,nvoice);} - xywh {700 590 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {705 595 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this,nvoice);} - xywh {730 590 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {735 595 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Window ADnoteVoiceList { diff --git a/src/UI/BankUI.fl b/src/UI/BankUI.fl @@ -24,7 +24,7 @@ decl {\#include <FL/Fl_File_Chooser.H>} {public decl {\#include "../Misc/Master.h"} {public } -decl {\#include "../Misc/Part.h"} {selected public +decl {\#include "../Misc/Part.h"} {public } decl {\#include "../Misc/Bank.h"} {public @@ -45,13 +45,15 @@ class BankProcess_ {} { } } -class BankSlot {: {public Fl_Button,BankProcess_} +class BankSlot {open : {public Fl_Button,BankProcess_} } { - Function {BankSlot(int x,int y, int w, int h, const char *label=0):Fl_Button(x,y,w,h,label)} {} { + Function {BankSlot(int x,int y, int w, int h, const char *label=0):Fl_Button(x,y,w,h,label)} {open + } { code {what=NULL; whatslot=NULL; nslot=0; -nselected=NULL;} {} +nselected=NULL;} {selected + } } Function {handle(int event)} {return_type int } { @@ -103,14 +105,15 @@ copy_label(bank->getnamenumbered(nslot).c_str());} {} decl {BankProcess_ *bp;} {} } -class BankUI {: {public BankProcess_} +class BankUI {open : {public BankProcess_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window bankuiwindow { label Bank - xywh {5 64 785 575} type Double hide + xywh {492 406 785 575} type Double code0 {o->label(bank->bankfiletitle.c_str());} - code1 {if (bank->bankfiletitle.empty()) o->label ("Choose a bank from the bank list on the left (or go to settings if to configure the bank location) or choose 'New Bank...' to make a new bank.");} + code1 {if (bank->bankfiletitle.empty()) o->label ("Choose a bank from the bank list on the left (or go to settings if to configure the bank location) or choose 'New Bank...' to make a new bank.");} visible } { Fl_Button {} { label Close @@ -121,27 +124,27 @@ class BankUI {: {public BankProcess_} xywh {5 34 772 491} box ENGRAVED_FRAME } { Fl_Pack {} { - xywh {10 39 150 481} box BORDER_BOX + xywh {10 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=0;i<32;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {163 39 150 481} box BORDER_BOX + xywh {163 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=32;i<64;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {316 39 150 481} box BORDER_BOX + xywh {316 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=64;i<96;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {469 39 150 481} box BORDER_BOX + xywh {469 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=96;i<128;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} Fl_Pack {} { - xywh {622 39 150 481} box BORDER_BOX + xywh {622 39 150 481} box BORDER_FRAME code0 {o->box(FL_NO_BOX);} code1 {for (int i=128;i<160;i++){bs[i]=new BankSlot (0,0,o->w(),15," ");bs[i]->init(i,&what,&slot,&BankProcess_::process,(BankProcess_ *)this,bank,&nselected);};} } {} @@ -153,28 +156,28 @@ class BankUI {: {public BankProcess_} label WRITE callback {if (o->value()>0.5) mode=2; removeselection();} - xywh {116 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 1 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {116 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 1 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } Fl_Light_Button readbutton { label READ callback {if (o->value()>0.5) mode=1; removeselection();} - xywh {11 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 101 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {11 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 101 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {o->value(1);} } Fl_Light_Button clearbutton { label CLEAR callback {if (o->value()>0.5) mode=3; removeselection();} - xywh {221 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 0 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {221 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 0 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } Fl_Light_Button swapbutton { label SWAP callback {if (o->value()>0.5) mode=4; removeselection();} - xywh {325 534 99 30} type Radio box PLASTIC_UP_BOX down_box THIN_DOWN_BOX selection_color 227 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 + xywh {325 534 99 30} type Radio down_box THIN_DOWN_BOX selection_color 227 labeltype ENGRAVED_LABEL labelfont 1 labelsize 13 code0 {if (bank->locked()) o->deactivate();} } } @@ -191,7 +194,7 @@ int result=bank->newbank(dirname); if (result!=0) fl_alert("Error: Could not make a new bank (directory).."); refreshmainwindow();} - xywh {685 5 93 25} box PLASTIC_UP_BOX labelfont 1 labelsize 11 align 128 + xywh {685 5 93 25} labelfont 1 labelsize 11 align 128 } Fl_Check_Button {} { label {auto close} @@ -262,9 +265,9 @@ if ((what==2)&&(bank->emptyslot(slot)==0)&&(mode!=4)) {//Rename slot }; if ((what==1)&&(mode==1)&&(!bank->emptyslot(slot))){//Reads from slot - pthread_mutex_lock(&master->mutex); + pthread_mutex_lock(&master->part[*npart]->load_mutex); bank->loadfromslot(slot,master->part[*npart]); - pthread_mutex_unlock(&master->mutex); + pthread_mutex_unlock(&master->part[*npart]->load_mutex); master->part[*npart]->applyparameters(); snprintf((char *)master->part[*npart]->Pname,PART_MAX_NAME_LEN,"%s",bank->getname(slot).c_str()); cbwig->do_callback(); @@ -278,9 +281,9 @@ if ((what==1)&&(mode==2)){//save(write) to slot if (!bank->emptyslot(slot)){ if (!fl_choice("Overwrite the slot no. %d ?","No","Yes",NULL,slot+1)) goto nooverwriteslot; }; - pthread_mutex_lock(&master->mutex); + pthread_mutex_lock(&master->part[*npart]->load_mutex); bank->savetoslot(slot,master->part[*npart]); - pthread_mutex_unlock(&master->mutex); + pthread_mutex_unlock(&master->part[*npart]->load_mutex); bs[slot]->refresh(); mode=1;readbutton->value(1);writebutton->value(0); @@ -346,8 +349,7 @@ for (unsigned int i=0;i<bank->banks.size();i++) { banklist->add(bank->banks[i].name.c_str()); } if (banklist->size() == 0) - banklist->add(" "); -} {} + banklist->add(" ");} {} } Function {simplesetmode(bool beginnerui)} {} { code {readbutton->value(1); diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt @@ -22,6 +22,13 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) set_source_files_properties(UI/MasterUI.h PROPERTIES GENERATED 1) fltk_wrap_ui(zynaddsubfx_gui ${UI_fl_files}) +add_definitions(-DPIXMAP_PATH="${CMAKE_INSTALL_PREFIX}/share/zynaddsubfx/pixmaps/") +add_definitions(-DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") + +if(LibloEnable) + set(zynaddsubfx_gui_FLTK_UI_SRCS ${zynaddsubfx_gui_FLTK_UI_SRCS} NSM.C NSM/Client.C) +endif() + add_library(zynaddsubfx_gui STATIC ${UI_objs} ${zynaddsubfx_gui_FLTK_UI_SRCS} @@ -29,4 +36,10 @@ add_library(zynaddsubfx_gui STATIC WidgetPDial.cpp ) -target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES} ${MYFLTK_LIBRARIES}) +if(NtkGui) + target_link_libraries(zynaddsubfx_gui ${NTK_LIBRARIES}) +endif(NtkGui) + +if(FltkGui) + target_link_libraries(zynaddsubfx_gui ${FLTK_LIBRARIES}) +endif(FltkGui) diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -36,6 +36,9 @@ decl {\#include "../Effects/EffectMgr.h"} {public decl {\#include "PresetsUI.h"} {public } +decl {\#include "common.H"} {public +} + class EQGraph {: {public Fl_Box} } { Function {EQGraph(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { @@ -65,16 +68,17 @@ if ((freqx>0.0)&&(freqx<1.0)) x()+(int) (freqx*w()),y()+h());} {} } Function {draw()} {} { - code {int ox=x(),oy=y(),lx=w(),ly=h(),i,iy,oiy; + code {int ox=x(),oy=y(),lx=w(),ly=h(),i; + double iy,oiy; float freqx; -if (active_r()) fl_color(0,70,150); - else fl_color(80,120,160); +if (active_r()) fl_color(fl_darker(FL_GRAY)); + else fl_color(FL_GRAY); fl_rectf(ox,oy,lx,ly); //draw the lines -fl_color(FL_GRAY); +fl_color(fl_lighter( FL_GRAY)); fl_line_style(FL_SOLID); fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2); @@ -115,19 +119,23 @@ for (i=1;i<GY;i++){ //draw the frequency response if (active_r()) fl_color(FL_YELLOW); else fl_color(200,200,80); -fl_line_style(FL_SOLID); +fl_line_style(FL_SOLID,2); +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); oiy=getresponse(ly,getfreqx(0.0)); +fl_begin_line(); for (i=1;i<lx;i++){ float frq=getfreqx(i/(float) lx); if (frq>synth->samplerate/2) break; iy=getresponse(ly,frq); if ((oiy>=0) && (oiy<ly) && (iy>=0) && (iy<ly) ) - fl_line(ox+i-1,oy+ly-oiy,ox+i,oy+ly-iy); + fl_vertex(ox+i,oy+ly-iy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {} } - Function {getresponse(int maxy,float freq)} {return_type int + Function {getresponse(int maxy,float freq)} {return_type double } { code {float dbresp=eff->getEQfreqresponse(freq); int idbresp=(int) ((dbresp/maxdB+1.0)*maxy/2.0); @@ -155,7 +163,7 @@ return(log(freq/20.0)/log(1000.0));} {} decl {int maxdB;} {} } -class EffUI {: {public Fl_Group,public PresetsUI_} +class EffUI {open : {public Fl_Group,public PresetsUI_} } { Function {EffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {eff=NULL; @@ -177,84 +185,81 @@ if (filterwindow!=NULL){ delete(filterwindow); };} {} } - Function {make_null_window()} {} { + Function {make_null_window()} {open + } { Fl_Window effnullwindow { - xywh {216 539 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group - } { - Fl_Text_Display {} { - label {No Effect} - xywh {120 35 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 labelcolor 43 align 8 - } - } + label {No Effect} + xywh {612 881 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 16 + code0 {set_module_parameters(o);} + class Fl_Group visible + } {} } - Function {make_reverb_window()} {} { + Function {make_reverb_window()} {open + } { Fl_Window effreverbwindow { - xywh {343 337 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Reverb open + xywh {377 636 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label {Reverb } - xywh {275 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Choice revp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Cathedral 1} - xywh {10 10 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {10 10 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Cathedral 2} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Cathedral 3} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Hall 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Hall 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Room 1} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Room 2} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Basement - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Tunnel - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echoed 1} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echoed 2} - xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {110 110 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Very Long 1} - xywh {120 120 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {120 120 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Very Long 2} - xywh {130 130 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {130 130 100 20} labelfont 1 labelsize 10 } } Fl_Choice revp10 { @@ -262,19 +267,19 @@ refresh(eff);} callback {eff->seteffectpar(10,(int) o->value()); if (eff->geteffectpar(10)==2) revp12->activate(); else revp12->deactivate();} - xywh {110 15 85 15} down_box BORDER_BOX color 14 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {110 15 85 15} down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label Random - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Freeverb - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Bandwidth - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } } Fl_Dial revp0 { @@ -349,58 +354,57 @@ eff->seteffectpar(11,x);} } } } - Function {make_echo_window()} {} { + Function {make_echo_window()} {open + } { Fl_Window effechowindow { - xywh {318 364 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Echo + xywh {897 611 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice echop { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Echo 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echo 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echo 3} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Simple Echo} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Canyon - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 1} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 2} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 3} - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Feedback Echo} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Echo - xywh {295 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial echop0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -445,62 +449,61 @@ refresh(eff);} } } } - Function {make_chorus_window()} {} { + Function {make_chorus_window()} {open + } { Fl_Window effchoruswindow { - xywh {372 287 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Chorus open + xywh {467 742 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice chorusp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Chorus 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Chorus 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Chorus 3} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Celeste 1} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Celeste 2} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 1} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 2} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 3} - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 4} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 5} - xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {110 110 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Chorus - xywh {265 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial chorusp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -564,7 +567,7 @@ refresh(eff);} Fl_Check_Button chorusp11 { label Substract callback {eff->seteffectpar(11,(int) o->value());} - tooltip {inverts the output} xywh {185 10 70 20} box THIN_UP_BOX down_box DOWN_BOX color 230 labelfont 1 labelsize 10 + tooltip {inverts the output} xywh {185 10 70 20} box THIN_UP_BOX down_box DOWN_BOX color 51 labelsize 10 } Fl_Choice chorusp4 { label {LFO type} @@ -582,70 +585,69 @@ refresh(eff);} } } } - Function {make_phaser_window()} {} { + Function {make_phaser_window()} {open + } { Fl_Window effphaserwindow { - xywh {75 25 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Phaser open + xywh {101 232 380 95} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice phaserp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 100 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 100 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Phaser 1} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 2} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 3} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 4} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 5} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 6} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {APhaser 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {APhaser 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {APhaser 3} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {APhaser 4} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {APhaser 5} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { - label {APhaser 6} selected - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + label {APhaser 6} + xywh {90 90 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Phaser - xywh {275 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial phaserp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -716,8 +718,8 @@ refresh(eff);} } Fl_Check_Button phaserp10 { label Substract - callback {eff->seteffectpar(10,(int) o->value());} - tooltip {inverts output} xywh {200 10 74 20} box THIN_UP_BOX down_box DOWN_BOX color 230 labelfont 1 labelsize 10 + callback {eff->seteffectpar(10,(int) o->value());} selected + tooltip {inverts output} xywh {200 10 74 20} box THIN_UP_BOX down_box DOWN_BOX color 51 labelfont 1 labelsize 10 } Fl_Dial phaserp11 { label Phase @@ -743,38 +745,37 @@ refresh(eff);} } } } - Function {make_alienwah_window()} {} { + Function {make_alienwah_window()} {open + } { Fl_Window effalienwahwindow { - xywh {538 250 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label AlienWah + xywh {253 353 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice awp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Alienwah 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 3} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 4} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label AlienWah - xywh {245 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial awp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -851,46 +852,45 @@ refresh(eff);} } } } - Function {make_distorsion_window()} {} { + Function {make_distorsion_window()} {open + } { Fl_Window effdistorsionwindow { - xywh {409 143 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Distortion open + xywh {544 217 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice distp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Overdrive 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Overdrive 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {A. Exciter 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {A. Exciter 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Guitar Amp} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Quantisize - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Distortion - xywh {230 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial distp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1012,15 +1012,14 @@ refresh(eff);} } } } - Function {make_eq_window()} {} { + Function {make_eq_window()} {open + } { Fl_Window effeqwindow { - xywh {258 307 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label EQ open + xywh {682 881 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label EQ - xywh {320 10 15 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial eqp0 { label Gain callback {eff->seteffectpar(0,(int) o->value()); @@ -1143,48 +1142,47 @@ eqgraph->redraw();} } } Fl_Box eqgraph { - xywh {45 10 190 75} box BORDER_BOX color 178 + xywh {45 10 190 75} box BORDER_BOX color 50 code0 {o->init(eff);} class EQGraph } } } - Function {make_dynamicfilter_window()} {} { + Function {make_dynamicfilter_window()} {open + } { Fl_Window effdynamicfilterwindow { - xywh {570 56 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label DynFilter open + xywh {819 290 380 100} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 25 + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice dfp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 14 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label WahWah - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label AutoWah - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sweep - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label VocalMorph1 - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label VocalMorph2 - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label DynFilter - xywh {245 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial dfp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1238,10 +1236,10 @@ refresh(eff);} Fl_Button {} { label Filter callback {filterwindow->show();} - xywh {115 10 55 25} box PLASTIC_THIN_UP_BOX + xywh {115 10 55 25} box THIN_UP_BOX } Fl_Group {} { - xywh {270 40 105 45} box BORDER_BOX color 181 + xywh {270 40 105 45} box UP_FRAME color 51 } { Fl_Dial dfp7 { label {A.S.} @@ -1263,10 +1261,12 @@ refresh(eff);} } } } - Function {make_filter_window()} {} { + Function {make_filter_window()} {open + } { Fl_Window filterwindow { label {Filter Parameters for DynFilter Eff.} - xywh {212 170 290 110} type Double hide + xywh {801 474 290 110} type Double + code0 {set_module_parameters(o);} visible } { Fl_Group {} { label {DynFilter effect - Filter} @@ -1472,7 +1472,7 @@ this->show();} {} decl {int eqband;} {} } -class SimpleEffUI {: {public Fl_Group,public PresetsUI_} +class SimpleEffUI {open : {public Fl_Group,public PresetsUI_} } { Function {SimpleEffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {eff=NULL;} {} @@ -1488,84 +1488,81 @@ effdistorsionwindow->hide();//delete (effdistorsionwindow); effeqwindow->hide();//delete (effeqwindow); effdynamicfilterwindow->hide();//delete (effdynamicfilterwindow);} {} } - Function {make_null_window()} {} { + Function {make_null_window()} {open + } { Fl_Window effnullwindow { - xywh {539 150 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group - } { - Fl_Text_Display {} { - label {No Effect} - xywh {25 35 35 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 labelcolor 43 align 8 - } - } + label {No Effect} open + xywh {1047 755 230 95} type Double box UP_BOX color 221 labelfont 1 labelsize 19 align 16 + code0 {set_module_parameters(o);} + class Fl_Group visible + } {} } - Function {make_reverb_window()} {} { + Function {make_reverb_window()} {open + } { Fl_Window effreverbwindow { - xywh {398 298 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Reverb open + xywh {1047 463 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label {Reverb } - xywh {115 10 20 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Choice revp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Cathedral 1} - xywh {10 10 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {10 10 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Cathedral 2} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Cathedral 3} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Hall 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Hall 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Room 1} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Room 2} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Basement - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Tunnel - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echoed 1} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echoed 2} - xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {110 110 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Very Long 1} - xywh {120 120 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {120 120 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Very Long 2} - xywh {130 130 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {130 130 100 20} labelfont 1 labelsize 10 } } Fl_Dial revp0 { @@ -1594,58 +1591,57 @@ refresh(eff);} } } } - Function {make_echo_window()} {} { + Function {make_echo_window()} {open + } { Fl_Window effechowindow { - xywh {243 350 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Echo open + xywh {428 823 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice echop { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Echo 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echo 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Echo 3} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Simple Echo} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Canyon - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 1} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 2} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Panning Echo 3} - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Feedback Echo} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Echo - xywh {145 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial echop0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1666,62 +1662,61 @@ refresh(eff);} } } } - Function {make_chorus_window()} {} { + Function {make_chorus_window()} {open + } { Fl_Window effchoruswindow { - xywh {234 353 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Chorus open + xywh {719 588 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice chorusp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Chorus 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Chorus 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Chorus 3} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Celeste 1} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Celeste 2} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 1} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 2} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 3} - xywh {90 90 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {90 90 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 4} - xywh {100 100 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {100 100 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Flange 5} - xywh {110 110 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {110 110 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Chorus - xywh {120 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial chorusp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1760,46 +1755,45 @@ refresh(eff);} } } } - Function {make_phaser_window()} {} { + Function {make_phaser_window()} {open + } { Fl_Window effphaserwindow { - xywh {661 430 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Phaser open + xywh {1047 831 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice phaserp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 0 labelfont 1 labelsize 10 labelcolor 55 align 5 textfont 1 textsize 10 textcolor 7 } { MenuItem {} { label {Phaser 1} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 2} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 3} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 4} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 5} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Phaser 6} - xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {80 80 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Phaser - xywh {125 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial phaserp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1838,38 +1832,37 @@ refresh(eff);} } } } - Function {make_alienwah_window()} {} { + Function {make_alienwah_window()} {open + } { Fl_Window effalienwahwindow { - xywh {367 170 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label AlienWah open + xywh {403 480 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice awp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Alienwah 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 3} - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Alienwah 4} - xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {70 70 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label AlienWah - xywh {100 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial awp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -1896,46 +1889,45 @@ refresh(eff);} } } } - Function {make_distorsion_window()} {} { + Function {make_distorsion_window()} {open + } { Fl_Window effdistorsionwindow { - xywh {353 412 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label Distortion open + xywh {353 881 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice distp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {11 15 95 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {11 15 95 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label {Overdrive 1} - xywh {20 20 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {20 20 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Overdrive 2} - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {A. Exciter 1} - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {A. Exciter 2} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label {Guitar Amp} - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Quantisize - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label Distortion - xywh {110 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 8 - } Fl_Dial distp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -2024,15 +2016,14 @@ refresh(eff);} } } } - Function {make_eq_window()} {} { + Function {make_eq_window()} {open + } { Fl_Window effeqwindow { - xywh {318 309 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label EQ open + xywh {1047 881 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { - Fl_Text_Display {} { - label EQ - xywh {170 5 15 25} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Counter bandcounter { label Band callback {eqband=(int) o->value(); @@ -2062,7 +2053,7 @@ stagescounter->value(dbl);} code0 {o->bounds(0,MAX_EQ_BANDS-1);} } Fl_Group bandgroup { - xywh {5 5 75 85} box ENGRAVED_FRAME + xywh {5 5 75 85} box UP_FRAME code0 {if (eff->geteffectpar(10)==0) o->deactivate();} } { Fl_Dial freqdial { @@ -2148,48 +2139,47 @@ eqgraph->redraw();} } } Fl_Box eqgraph { - xywh {85 35 140 55} box BORDER_BOX color 178 + xywh {85 35 140 55} box BORDER_BOX color 50 code0 {o->init(eff);} class EQGraph } } } - Function {make_dynamicfilter_window()} {} { + Function {make_dynamicfilter_window()} {open + } { Fl_Window effdynamicfilterwindow { - xywh {475 471 230 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide - class Fl_Group + label DynFilter open + xywh {965 527 230 100} type Double box UP_BOX color 51 labelfont 1 labelsize 19 align 25 + code3 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Choice dfp { label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 90 15} box UP_BOX down_box BORDER_BOX color 47 selection_color 7 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 } { MenuItem {} { label WahWah - xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {30 30 100 20} labelfont 1 labelsize 10 } MenuItem {} { label AutoWah - xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {40 40 100 20} labelfont 1 labelsize 10 } MenuItem {} { label Sweep - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label VocalMorph1 - xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {50 50 100 20} labelfont 1 labelsize 10 } MenuItem {} { label VocalMorph2 - xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + xywh {60 60 100 20} labelfont 1 labelsize 10 } } - Fl_Text_Display {} { - label DynFilter - xywh {100 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8 - } Fl_Dial dfp0 { label Vol callback {eff->seteffectpar(0,(int) o->value());} @@ -2209,7 +2199,7 @@ refresh(eff);} class WidgetPDial } Fl_Group {} { - xywh {115 40 65 45} box BORDER_BOX color 181 + xywh {115 40 65 45} box UP_FRAME } { Fl_Dial dfp7 { label {A.S.} @@ -2226,7 +2216,8 @@ refresh(eff);} } } } - Function {init(EffectMgr *eff_)} {} { + Function {init(EffectMgr *eff_)} {open + } { code {eff=eff_; make_null_window(); diff --git a/src/UI/EnvelopeUI.fl b/src/UI/EnvelopeUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0106 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -36,6 +36,9 @@ decl {\#include <FL/fl_ask.H>} {public decl {\#include "PresetsUI.h"} {public } +decl {\#include "common.H"} {public +} + class EnvelopeFreeEdit {: {public Fl_Box} } { Function {EnvelopeFreeEdit(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { @@ -195,7 +198,7 @@ return(1);} {} } } -class EnvelopeUI {: {public Fl_Group,PresetsUI_} +class EnvelopeUI {open : {public Fl_Group,PresetsUI_} } { Function {EnvelopeUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {env=NULL; @@ -212,10 +215,11 @@ hide(); freemodeeditwindow->hide(); delete (freemodeeditwindow);} {} } - Function {make_freemode_edit_window()} {} { + Function {make_freemode_edit_window()} {open + } { Fl_Window freemodeeditwindow { label Envelope - xywh {60 308 575 180} type Double hide + xywh {702 269 575 180} type Double visible } { Fl_Box freeedit { label Envelope @@ -248,7 +252,7 @@ envfree->redraw(); sustaincounter->value(env->Penvsustain); sustaincounter->maximum(env->Penvpoints-2);} - xywh {115 155 80 20} box THIN_UP_BOX + xywh {115 155 80 20} box THIN_UP_BOX labelsize 11 code0 {if (env->Pfreemode==0) o->hide();} } Fl_Button deletepoint { @@ -274,7 +278,7 @@ envfree->redraw(); sustaincounter->value(env->Penvsustain); sustaincounter->maximum(env->Penvpoints-2);} - xywh {200 155 80 20} box THIN_UP_BOX + xywh {200 155 80 20} box THIN_UP_BOX labelsize 11 code0 {if (env->Pfreemode==0) o->hide();} } Fl_Light_Button freemodebutton { @@ -283,7 +287,7 @@ sustaincounter->maximum(env->Penvpoints-2);} freeedit->lastpoint=-1; freeedit->redraw();} - tooltip {Enable or disable the freemode} xywh {10 155 95 25} box PLASTIC_UP_BOX + tooltip {Enable or disable the freemode} xywh {10 155 95 20} labelsize 11 } Fl_Check_Button forcedreleasecheck { label frcR @@ -303,7 +307,7 @@ freeedit->redraw();} Fl_Button {} { label Close callback {freemodeeditwindow->hide();} - xywh {510 155 60 25} box THIN_UP_BOX + xywh {510 155 60 20} box THIN_UP_BOX } Fl_Check_Button linearenvelopecheck { label L @@ -334,14 +338,16 @@ envfree->redraw();} } } } - Function {make_ADSR_window()} {} { - Fl_Window envADSR { - xywh {108 336 205 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_ADSR_window()} {open + } { + Fl_Window envADSR {open + xywh {344 788 205 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group {} { label {Amplitude Envelope} - xywh {0 0 205 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 205 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e1adt { label {A.dt} @@ -391,7 +397,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - tooltip {Envelope window} xywh {185 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + tooltip {Envelope window} xywh {185 5 15 15} labelfont 1 labelsize 10 } Fl_Check_Button e1linearenvelope { label L @@ -412,14 +418,16 @@ freeedit->redraw();} } } } - Function {make_ASR_window()} {} { - Fl_Window envASR { - xywh {71 320 210 70} type Double hide - class Fl_Group + Function {make_ASR_window()} {open + } { + Fl_Window envASR {open + xywh {648 667 210 70} type Double + class Fl_Group visible } { Fl_Group {} { label {Frequency Envelope} - xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 210 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e2aval { label {A.val} @@ -480,18 +488,20 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - tooltip {Envelope window} xywh {190 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + tooltip {Envelope window} xywh {190 5 15 15} labelfont 1 labelsize 10 } } } - Function {make_ADSRfilter_window()} {} { - Fl_Window envADSRfilter { - xywh {87 143 275 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_ADSRfilter_window()} {open + } { + Fl_Window envADSRfilter {open selected + xywh {627 569 275 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group {} { label {Filter Envelope} - xywh {0 0 275 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 275 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e3aval { label {A.val} @@ -557,7 +567,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {255 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {255 5 15 15} labelfont 1 labelsize 10 } Fl_Button {} { label C @@ -572,14 +582,17 @@ freeedit->redraw();} } } } - Function {make_ASRbw_window()} {} { - Fl_Window envASRbw { - xywh {224 539 210 70} type Double hide - class Fl_Group + Function {make_ASRbw_window()} {open + } { + Fl_Window envASRbw {open + xywh {362 642 210 70} type Double + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Group {} { label {BandWidth Envelope} - xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 210 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial e4aval { label {A.val} @@ -640,18 +653,21 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {190 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {190 5 15 15} labelfont 1 labelsize 10 } } } - Function {make_free_window()} {} { - Fl_Window envfree { - xywh {373 413 205 70} type Double color 50 labelfont 1 hide resizable - class Fl_Group + Function {make_free_window()} {open + } { + Fl_Window envfree {open + xywh {376 436 205 70} type Double color 50 labelfont 1 resizable + code0 {set_module_parameters(o);} + class Fl_Group visible } { Fl_Group envfreegroup { label {Amplitude Envelope} - xywh {0 0 205 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 resizable + xywh {0 0 205 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 resizable + code0 {set_module_parameters(o);} } { Fl_Box freeeditsmall { label Envelope @@ -663,7 +679,7 @@ freeedit->redraw();} Fl_Button {} { label E callback {freemodeeditwindow->show();} - xywh {185 5 15 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10 + xywh {185 5 15 15} labelfont 1 labelsize 10 } Fl_Button {} { label C @@ -678,7 +694,8 @@ freeedit->redraw();} } } } - Function {init(EnvelopeParams *env_)} {} { + Function {init(EnvelopeParams *env_)} {open + } { code {env=env_; make_ADSR_window(); make_ASR_window(); @@ -743,10 +760,10 @@ if (env->Pfreemode!=0) { addpoint->hide(); deletepoint->hide(); forcedreleasecheck->hide(); -};} {selected - } +};} {} } - Function {refresh()} {} { + Function {refresh()} {open + } { code {freemodebutton->value(env->Pfreemode); sustaincounter->value(env->Penvsustain); diff --git a/src/UI/FilterUI.fl b/src/UI/FilterUI.fl @@ -14,7 +14,7 @@ decl {\#include <cmath>} {} decl {\#include <stdio.h>} {global } -decl {\#include <stdlib.h>} {selected global +decl {\#include <stdlib.h>} {global } decl {\#include "../globals.h"} {public @@ -38,7 +38,10 @@ decl {\#include <FL/fl_ask.H>} {public decl {\#include "PresetsUI.h"} {public } -class FormantFilterGraph {: {public Fl_Box} +decl {\#include "common.H"} {public +} + +class FormantFilterGraph {open : {public Fl_Box} } { Function {FormantFilterGraph(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {pars=NULL; @@ -134,13 +137,17 @@ fl_line_style(FL_SOLID); pars->formantfilterH(*nvowel,lx,graphpoints); +fl_line_style( FL_SOLID, 2 ); +fl_begin_line(); oiy=(int) ((graphpoints[0]/maxdB+1.0)*ly/2.0); for (i=1;i<lx;i++){ - int iy=(int) ((graphpoints[i]/maxdB+1.0)*ly/2.0); + double iy= ((graphpoints[i]/maxdB+1.0)*ly/2.0); if ((iy>=0)&&(oiy>=0)&&(iy<ly)&&(oiy<lx)) - fl_line(ox+i-1,oy+ly-oiy,ox+i,oy+ly-iy); + fl_vertex(ox+i,oy+ly-iy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {} } Function {~FormantFilterGraph()} {} { code {delete [] graphpoints;} {} @@ -151,7 +158,7 @@ for (i=1;i<lx;i++){ decl {float *graphpoints;} {} } -class FilterUI {: {public Fl_Group,PresetsUI_} +class FilterUI {open : {public Fl_Group,PresetsUI_} } { Function {FilterUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {pars=NULL; @@ -166,14 +173,16 @@ hide(); //delete (filterui); delete (formantparswindow);} {} } - Function {make_window()} {} { - Fl_Window filterui { - xywh {211 312 275 75} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_window()} {open + } { + Fl_Window filterui {open + xywh {498 346 275 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group filterparamswindow { label {Filter Parameters} - xywh {0 0 275 75} box PLASTIC_UP_BOX color 183 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 275 75} box UP_FRAME color 183 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters( o );} } { Fl_Choice analogfiltertypechoice { label FilterType @@ -319,7 +328,7 @@ pars->changed=true;} open Fl_Button editbutton { label Edit callback {formantparswindow->show();} - xywh {15 40 50 25} box PLASTIC_UP_BOX labelfont 1 labelsize 11 + xywh {15 40 50 25} labelfont 1 labelsize 11 } Fl_Button {} { label C @@ -333,10 +342,11 @@ pars->changed=true;} open } } } - Function {make_formant_window()} {} { + Function {make_formant_window()} {open + } { Fl_Window formantparswindow { - label {Formant Filter Parameters} - xywh {47 301 700 205} type Double hide + label {Formant Filter Parameters} selected + xywh {518 473 700 205} type Double visible } { Fl_Group {} { xywh {485 47 105 113} box THIN_UP_BOX @@ -511,7 +521,8 @@ pars->changed=true;} } } } - Function {update_formant_window()} {} { + Function {update_formant_window()} {open + } { code {formant_freq_dial->value(pars->Pvowels[nvowel].formants[nformant].freq); formant_q_dial->value(pars->Pvowels[nvowel].formants[nformant].q); formant_amp_dial->value(pars->Pvowels[nvowel].formants[nformant].amp); @@ -592,7 +603,8 @@ formantparswindow->label(this->label()); update_formant_window();} {} } - Function {switchcategory(int newcat)} {} { + Function {switchcategory(int newcat)} {open + } { code {if (pars->Pcategory!=newcat){ pars->Pgain=64; gaindial->value(64); @@ -605,7 +617,8 @@ pars->Pcategory=newcat; refresh();} {} } - Function {use_for_dynamic_filter()} {} { + Function {use_for_dynamic_filter()} {open + } { code {freqtrdial->deactivate(); gaindial->when(0); diff --git a/src/UI/LFOUI.fl b/src/UI/LFOUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -36,7 +36,10 @@ decl {\#include <FL/fl_ask.H>} {public decl {\#include "PresetsUI.h"} {public } -class LFOUI {: {public Fl_Group, PresetsUI_} +decl {\#include "common.H"} {public +} + +class LFOUI {open : {public Fl_Group, PresetsUI_} } { Function {LFOUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {pars=NULL;} {} @@ -46,14 +49,16 @@ class LFOUI {: {public Fl_Group, PresetsUI_} hide(); //delete (lfoui);} {} } - Function {make_window()} {} { - Fl_Window lfoui { - xywh {66 328 230 70} type Double color 50 labelfont 1 hide - class Fl_Group + Function {make_window()} {open + } { + Fl_Window lfoui {open selected + xywh {630 351 230 70} type Double color 50 labelfont 1 + class Fl_Group visible } { Fl_Group lfoparamswindow { label LFO - xywh {0 0 230 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + xywh {0 0 230 70} box UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 10 align 17 + code0 {set_module_parameters(o);} } { Fl_Dial freq { label {Freq.} @@ -90,31 +95,31 @@ hide(); callback {pars->PLFOtype=(int)o->value();} tooltip {LFO function} xywh {180 40 45 15} down_box BORDER_BOX labelsize 10 align 2 textsize 8 } { - menuitem {} { + MenuItem {} { label SINE xywh {20 20 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label TRI xywh {30 30 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label SQR xywh {30 30 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label {R.up} xywh {40 40 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label {R.dn} xywh {50 50 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label E1dn xywh {60 60 100 20} labelfont 1 labelsize 10 } - menuitem {} { + MenuItem {} { label E2dn xywh {70 70 100 20} labelfont 1 labelsize 10 } @@ -138,12 +143,12 @@ hide(); } Fl_Button {} { label C - callback {presetsui->copy(pars);} selected + callback {presetsui->copy(pars);} xywh {145 10 15 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 10 labelcolor 7 } Fl_Button {} { label P - callback {presetsui->paste(pars,this);} selected + callback {presetsui->paste(pars,this);} xywh {162 10 15 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 10 labelcolor 7 } } diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl @@ -57,10 +57,19 @@ decl {\#include "../Misc/Part.h"} {public decl {\#include "../Misc/Util.h"} {public } +decl {\#include "common.H"} {public +} + +decl {\#if USE_NSM +\#include "NSM.H" +extern NSM_Client *nsm; +\#endif} {public +} + decl {\#include "../globals.h"} {public } -class VUMeter {selected : {public Fl_Box} +class VUMeter {: {public Fl_Box} } { Function {VUMeter(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {master=NULL; @@ -104,6 +113,12 @@ if (dbr<0.0) dbr=0.0; dbl=dbl*0.4+olddbl*0.6; dbr=dbr*0.4+olddbr*0.6; +if ( damage() & FL_DAMAGE_USER1 ) +{ + if ( olddbl == dbl && olddbr == dbr ) + return; +} + olddbl=dbl; olddbr=dbr; @@ -183,9 +198,9 @@ if ((maxdbr>MIN_DB-20)){ int ox=x(); int oy=y(); int lx=w(); int ly=h(); if (!active_r()){ - pthread_mutex_lock(&master->mutex); + pthread_mutex_lock(&master->vumutex); int fakedb=master->fakepeakpart[npart]; - pthread_mutex_unlock(&master->mutex); + pthread_mutex_unlock(&master->vumutex); fl_rectf(ox,oy,lx,ly,140,140,140); if (fakedb>0){ fakedb=(int)(fakedb/255.0*ly)+4; @@ -196,9 +211,9 @@ if (!active_r()){ }; //draw the vu lines -pthread_mutex_lock(&master->mutex); +pthread_mutex_lock(&master->vumutex); float db=rap2dB(master->vuoutpeakpart[npart]); -pthread_mutex_unlock(&master->mutex); +pthread_mutex_unlock(&master->vumutex); db=(MIN_DB-db)/MIN_DB; if (db<0.0) db=0.0; @@ -226,18 +241,18 @@ float tmp=ly*1.0/MIN_DB; } Function {tickdraw(VUMeter *o)} {return_type {static void} } { - code {o->redraw();} {} + code {o->damage(FL_DAMAGE_USER1);} {} } Function {tick(void *v)} {return_type {static void} } { code {tickdraw((VUMeter *) v); -Fl::add_timeout(1.0/60.0,tick,v);//60 fps} {} + Fl::repeat_timeout(1.0/18.0,tick,v);//18 fps} {} } Function {handle(int event)} {return_type int } { code {switch(event){ case FL_SHOW: - tick(this); + Fl::add_timeout(1.0/18.0,tick,this); break; case FL_HIDE: Fl::remove_timeout(tick,this); @@ -257,7 +272,7 @@ return(1);} {} decl {float oldrmsdbl,oldrmsdbr;} {} } -class SysEffSend {: {public WidgetPDial} +class SysEffSend {open : {public WidgetPDial} } { Function {SysEffSend(int x,int y, int w, int h, const char *label=0):WidgetPDial(x,y,w,h,label)} {} { code {master=NULL; @@ -295,17 +310,18 @@ return(WidgetPDial::handle(event));} {} decl {int neff2;} {} } -class Panellistitem {: {public Fl_Group} +class Panellistitem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window panellistitem { - private xywh {315 213 70 260} type Double labeltype NORMAL_LABEL align 80 hide - class Fl_Group + Fl_Window panellistitem {open + private xywh {608 711 100 260} type Double box NO_BOX + class Fl_Group visible } { - Fl_Group panellistitemgroup { - private xywh {0 20 70 240} box PLASTIC_THIN_UP_BOX + Fl_Group panellistitemgroup {open + private xywh {0 20 70 240} box UP_FRAME code0 {if (master->part[npart]->Penabled==0) o->deactivate();} + code1 {set_module_parameters( o );} } { Fl_Group {} { xywh {45 65 15 110} box ENGRAVED_FRAME @@ -328,7 +344,7 @@ bankui->show();} } Fl_Slider partvolume { callback {master->part[npart]->setPvolume((int) o->value());} - xywh {10 65 30 110} type {Vert Knob} box FLAT_BOX minimum 127 maximum 0 step 1 value 127 + xywh {10 65 30 110} type {Vert Knob} box NO_BOX minimum 127 maximum 0 step 1 value 127 code0 {o->value(master->part[npart]->Pvolume);} } Fl_Dial partpanning { @@ -343,7 +359,7 @@ bankui->show();} bankui->cbwig->value(npart+1); bankui->cbwig->do_callback(); };} - xywh {15 235 40 20} box PLASTIC_UP_BOX labelsize 10 + xywh {15 235 40 20} labelsize 10 } Fl_Choice partrcv { callback {master->part[npart]->Prcvchn=(int) o->value();} @@ -415,19 +431,27 @@ panellistitemgroup->redraw();} {} decl {BankUI *bankui;} {} } -class MasterUI {} { - Function {make_window()} {} { +class MasterUI {open +} { + Function {make_window()} {open + } { Fl_Window masterwindow { label zynaddsubfx - callback {\#ifdef VSTAUDIOOUT -fl_alert("ZynAddSubFX could not be closed this way, because it's a VST plugin. Please use the host aplication to close it."); + callback {\#ifdef PLUGINVERSION +fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it."); \#else -if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { +if (( +\#if USE_NSM +(nsm && nsm->is_active()) +\#else +0 +\#endif + || fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))) { config.save(); *exitprogram=1; }; -\#endif} - xywh {450 306 390 465} type Double align 80 hide xclass zynaddsubfx +\#endif} open + xywh {80 370 390 525} type Double xclass zynaddsubfx visible } { Fl_Menu_Bar mastermenu { xywh {-5 0 690 25} @@ -443,12 +467,31 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { } MenuItem {} { label {&Open Parameters...} - callback {do_load_master();} + callback {\#if USE_NSM + if ( nsm && nsm->is_active() ) + { + do_load_master(); + do_save_master( nsm->project_filename ); + } + else +\#endif + { + do_load_master(); + }} xywh {20 20 100 20} } MenuItem {} { label {&Save All Parameters...} - callback {do_save_master();} + callback {\#if USE_NSM + if ( nsm && nsm->is_active() ) + { + do_save_master( nsm->project_filename ); + } + else +\#endif + { + do_save_master(); + }} xywh {10 10 100 20} divider } MenuItem {} { @@ -651,16 +694,16 @@ if (result!=0) fl_alert("Error: Could not save the file.");} } } Fl_Dial mastervolumedial { - label {M.Vol} + label {Master Volume} callback {master->setPvolume((int) o->value());} - tooltip {Master Volume} xywh {5 30 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 align 130 maximum 127 step 1 + tooltip {Master Volume} xywh {15 32 55 55} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1 code0 {o->value(master->Pvolume);} class WidgetPDial } Fl_Counter masterkeyshiftcounter { label {Master KeyShift} callback {master->setPkeyshift((int) o->value()+64);} - xywh {45 31 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {150 97 120 23} type Simple labelsize 9 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->Pkeyshift-64);} } @@ -670,31 +713,31 @@ if (result!=0) fl_alert("Error: Could not save the file.");} pthread_mutex_lock(&master->mutex); master->shutup=1; pthread_mutex_unlock(&master->mutex);} - xywh {293 29 92 31} box PLASTIC_UP_BOX color 231 labelfont 1 + xywh {280 29 105 53} color 90 labelfont 1 } - Fl_Group partuigroup { - xywh {0 242 390 183} box ENGRAVED_FRAME + Fl_Group partuigroup {open + xywh {0 310 390 205} } { - Fl_Group partui { - xywh {4 245 383 175} box FLAT_BOX + Fl_Group partui {open selected + xywh {0 310 383 175} code0 {o->init(master->part[0],master,0,bankui);} code1 {o->show();} class PartUI } {} } - Fl_Tabs {} { - xywh {0 80 390 160} + Fl_Tabs {} {open + xywh {0 145 390 165} box UP_FRAME } { Fl_Group {} { - label {System Effects} - xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 + label {System Effects} open + xywh {0 162 390 145} labelsize 15 align 9 } { Fl_Counter syseffnocounter { label {Sys.Effect No.} callback {nsyseff=(int) o->value()-1; sysefftype->value(master->sysefx[nsyseff]->geteffect()); syseffectui->refresh(master->sysefx[nsyseff]);} - xywh {5 120 80 20} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + xywh {5 181 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 code0 {o->bounds(1,NUM_SYS_EFX);} code1 {o->value(nsyseff+1);} } @@ -704,7 +747,7 @@ syseffectui->refresh(master->sysefx[nsyseff]);} master->sysefx[nsyseff]->changeeffect((int) o->value()); pthread_mutex_unlock(&master->mutex); syseffectui->refresh(master->sysefx[nsyseff]);} - xywh {315 125 70 15} down_box BORDER_BOX labelsize 10 + xywh {285 176 100 22} down_box BORDER_BOX labelsize 10 code0 {o->value(master->sysefx[nsyseff]->geteffect());} } { MenuItem {} { @@ -744,11 +787,11 @@ syseffectui->refresh(master->sysefx[nsyseff]);} xywh {90 90 100 20} labelfont 1 labelsize 10 } } - Fl_Group syseffectuigroup { - xywh {5 140 380 95} box FLAT_BOX color 48 + Fl_Group syseffectuigroup {open + xywh {5 203 380 95} color 48 } { Fl_Group syseffectui { - xywh {5 140 380 95} + xywh {5 203 380 95} code0 {o->init(master->sysefx[nsyseff]);} class EffUI } {} @@ -756,24 +799,24 @@ syseffectui->refresh(master->sysefx[nsyseff]);} Fl_Button {} { label {Send to...} callback {syseffsendwindow->show();} - xywh {95 120 75 20} box THIN_UP_BOX labelfont 1 labelsize 11 + xywh {90 181 85 22} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Button {} { label C callback {presetsui->copy(master->sysefx[nsyseff]);} - xywh {215 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {180 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {pthread_mutex_lock(&master->mutex); presetsui->paste(master->sysefx[nsyseff],syseffectui); pthread_mutex_unlock(&master->mutex);} - xywh {245 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {210 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } Fl_Group {} { - label {Insertion Effects} - xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 hide + label {Insertion Effects} open + xywh {0 165 390 145} labelsize 15 align 9 hide } { Fl_Counter inseffnocounter { label {Ins.Effect No.} @@ -791,7 +834,7 @@ if (master->Pinsparts[ninseff]!=-1) { inseffectui->deactivate(); inseffectuigroup->deactivate(); };} - xywh {5 120 80 20} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + xywh {5 183 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1 code0 {o->bounds(1,NUM_INS_EFX);} code1 {o->value(ninseff+1);} } @@ -802,7 +845,7 @@ master->insefx[ninseff]->changeeffect((int) o->value()); pthread_mutex_unlock(&master->mutex); inseffectui->refresh(master->insefx[ninseff]); inseffectui->show();} - xywh {315 125 70 15} down_box BORDER_BOX labelsize 10 + xywh {285 173 100 22} down_box BORDER_BOX labelsize 10 code0 {o->value(master->insefx[ninseff]->geteffect());} code1 {if (master->Pinsparts[ninseff]== -1) o->deactivate();} } { @@ -843,11 +886,11 @@ inseffectui->show();} xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Group inseffectuigroup { - xywh {5 140 380 95} box FLAT_BOX color 48 + Fl_Group inseffectuigroup {open + xywh {5 205 380 95} box FLAT_BOX color 48 } { Fl_Group inseffectui { - xywh {5 140 380 95} + xywh {5 205 380 90} box UP_FRAME code0 {o->init(master->insefx[ninseff]);} code1 {if (master->Pinsparts[ninseff]== -1) o->deactivate();} class EffUI @@ -866,7 +909,7 @@ if ((int) o->value()==1){ inseffectui->activate(); }; master->insefx[ninseff]->cleanup();} open - xywh {95 120 80 20} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10 + xywh {95 183 80 22} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10 code0 {o->add("Master Out");o->add("Off");} code1 {char tmp[50]; for (int i=0;i<NUM_MIDI_PARTS;i++) {sprintf(tmp,"Part %2d",i+1);o->add(tmp);};} code3 {o->value(master->Pinsparts[ninseff]+2);} @@ -874,24 +917,24 @@ master->insefx[ninseff]->cleanup();} open Fl_Button {} { label C callback {presetsui->copy(master->insefx[ninseff]);} - xywh {215 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {180 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {pthread_mutex_lock(&master->mutex); presetsui->paste(master->insefx[ninseff],inseffectui); pthread_mutex_unlock(&master->mutex);} - xywh {245 124 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {210 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } } } Fl_Button {} { label Scales callback {microtonalui->show();} - xywh {330 80 56 19} box PLASTIC_UP_BOX color 231 labeltype ENGRAVED_LABEL labelfont 1 + xywh {320 87 65 23} color 51 labelfont 1 } Fl_Group {} { - xywh {172 30 117 45} box ENGRAVED_BOX + xywh {150 40 117 45} box UP_FRAME } { Fl_Button recordbutton { label {Rec.} @@ -904,7 +947,7 @@ pauselabel->activate(); master->HDDRecorder.start(); master->vuresetpeaks(); mastermenu->redraw();} - tooltip {Start Recording} xywh {181 36 21 21} box ROUND_UP_BOX color 88 labelfont 1 labelsize 10 align 2 deactivate + tooltip {Start Recording} xywh {159 46 21 21} box ROUND_UP_BOX color 88 labelfont 1 labelsize 10 align 2 deactivate } Fl_Button stopbutton { label Stop @@ -916,7 +959,7 @@ pauselabel->deactivate(); recordmenu->activate(); recordmenu->label("&Record"); mastermenu->redraw();} - tooltip {Stop Recording and close the audio file} xywh {259 36 21 21} box THIN_UP_BOX color 4 labelfont 1 labelsize 10 align 2 deactivate + tooltip {Stop Recording and close the audio file} xywh {237 46 21 21} box THIN_UP_BOX color 4 labelfont 1 labelsize 10 align 2 deactivate } Fl_Button pausebutton { label {@||} @@ -924,19 +967,19 @@ mastermenu->redraw();} master->HDDRecorder.pause(); recordbutton->activate(); mastermenu->redraw();} - tooltip {Pause Recording} xywh {220 36 21 21} box THIN_UP_BOX color 4 selection_color 4 labelfont 1 labelcolor 3 align 16 deactivate + tooltip {Pause Recording} xywh {198 46 21 21} box THIN_UP_BOX color 4 selection_color 4 labelfont 1 labelcolor 3 align 16 deactivate } Fl_Box pauselabel { label Pause - xywh {214 56 30 15} labelfont 1 labelsize 10 deactivate + xywh {192 66 30 15} labelfont 1 labelsize 10 deactivate } } - Fl_Group {} { - xywh {1 427 389 33} box ENGRAVED_FRAME + Fl_Group {} {open + xywh {1 490 389 55} } { Fl_Box {} { label {VU-Meter} - xywh {4 430 384 30} box FLAT_BOX color 48 selection_color 75 + xywh {5 490 380 30} box FLAT_BOX color 48 selection_color 75 code0 {o->init(master,-1);} class VUMeter } @@ -944,7 +987,7 @@ mastermenu->redraw();} Fl_Check_Button nrpnbutton { label NRPN callback {master->ctl.NRPN.receive=(int) o->value();} - tooltip {Receive NRPNs} xywh {45 65 47 10} down_box DOWN_BOX labelsize 10 + tooltip {Receive NRPNs} xywh {10 115 60 25} down_box DOWN_BOX labelsize 12 code0 {o->value(master->ctl.NRPN.receive);} } Fl_Counter npartcounter { @@ -961,38 +1004,46 @@ npart=nval; updatepanel(); simplenpartcounter->value(nval+1); simplenpartcounter->do_callback();} - tooltip {The part number} xywh {5 247 70 23} type Simple labelfont 1 minimum 0 maximum 127 step 1 value 1 textfont 1 + tooltip {The part number} xywh {5 312 50 18} type Simple labelfont 1 minimum 0 maximum 127 step 1 value 1 textfont 1 code0 {o->bounds(1,NUM_MIDI_PARTS);} code1 {bankui->init(o);} } Fl_Button {} { label vK callback {virkeyboard->show();} - tooltip {Virtual Keyboard} xywh {292 80 35 19} box PLASTIC_UP_BOX color 231 labeltype ENGRAVED_LABEL labelfont 1 + tooltip {Virtual Keyboard} xywh {280 87 40 23} color 51 labelfont 1 } - Fl_Button {} { - label {R.D.} - callback {globalfinedetuneslider->value(64.0); + Fl_Group {} {open + xywh {85 32 55 110} box UP_FRAME + } { + Fl_Button {} { + label Reset + callback {globalfinedetuneslider->value(64.0); globalfinedetuneslider->do_callback();} - tooltip {Master fine detune reset} xywh {140 65 30 10} box THIN_UP_BOX labelfont 1 labelsize 10 - } - Fl_Dial globalfinedetuneslider { - label {F.Det.} - callback {master->microtonal.Pglobalfinedetune=(int) o->value();} - tooltip {global fine detune} xywh {143 30 20 20} box ROUND_UP_BOX labelsize 10 align 130 maximum 127 step 1 value 64 - code0 {o->value(master->microtonal.Pglobalfinedetune);} - class WidgetPDial + tooltip {Master fine detune reset} xywh {90 37 45 23} box THIN_UP_BOX labelsize 10 + } + Fl_Dial globalfinedetuneslider { + label {Fine Detune} + callback {master->microtonal.Pglobalfinedetune=(int) o->value();} + tooltip {global fine detune} xywh {90 68 45 45} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1 value 64 + code0 {o->value(master->microtonal.Pglobalfinedetune);} + class WidgetPDial + } } Fl_Button {} { label {Panel Window} callback {updatepanel(); panelwindow->show();} - tooltip {Panel Window} xywh {293 62 92 16} box PLASTIC_UP_BOX color 183 labelfont 1 labelsize 10 + tooltip {Panel Window} xywh {280 112 105 23} color 51 labelfont 1 labelsize 10 + } + Fl_Button sm_indicator1 { + label SM + xywh {350 5 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate } } Fl_Window aboutwindow { label {Copyright...} - xywh {411 344 365 280} type Double labeltype NORMAL_LABEL align 80 hide + xywh {411 344 365 280} type Double hide } { Fl_Box {} { label {Copyright (c) 2002-2009 Nasca O. PAUL and others. Please read AUTHORS.txt} @@ -1019,7 +1070,7 @@ GNU General Public License for details.} } Fl_Window syseffsendwindow { label {System Effects Send} - xywh {171 234 120 250} type Double labeltype NORMAL_LABEL align 80 hide resizable + xywh {171 234 120 250} type Double hide resizable } { Fl_Scroll {} {open xywh {0 45 120 170} box FLAT_BOX resizable @@ -1038,7 +1089,7 @@ GNU General Public License for details.} } Fl_Window panelwindow { label {ZynAddSubFX Panel} - xywh {89 59 630 635} type Double labeltype NORMAL_LABEL align 80 hide + xywh {89 59 630 635} type Double hide } { Fl_Scroll {} { xywh {0 5 570 310} type HORIZONTAL box THIN_UP_BOX @@ -1070,17 +1121,17 @@ updatepanel();} } Fl_Window simplemasterwindow { label ZynAddSubFX - callback {\#ifdef VSTAUDIOOUT -fl_alert("ZynAddSubFX could not be closed this way, because it's a VST plugin. Please use the host aplication to close it."); + callback {\#ifdef PLUGINVERSION +fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it."); \#else if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { config.save(); *exitprogram=1; }; -\#endif} - xywh {400 405 600 335} type Double labeltype NORMAL_LABEL align 80 hide +\#endif} open + xywh {283 262 600 335} type Double visible } { - Fl_Menu_Bar {} { + Fl_Menu_Bar simplemastermenu { xywh {0 0 690 25} } { Submenu {} { @@ -1099,7 +1150,16 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) { } MenuItem {} { label {&Save All Parameters...} - callback {do_save_master();} + callback {\#if USE_NSM + if ( nsm && nsm->is_active() ) + { + do_save_master( nsm->project_filename ); + } + else +\#endif + { + do_save_master(); + }} xywh {20 20 100 20} divider } MenuItem {} { @@ -1169,8 +1229,8 @@ if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an } } } - Fl_Group simplelistitemgroup { - private xywh {125 65 215 150} box ENGRAVED_BOX + Fl_Group simplelistitemgroup {open + private xywh {125 65 215 145} box UP_FRAME code0 {if (master->part[npart]->Penabled==0) o->deactivate();} } { Fl_Button partname { @@ -1179,12 +1239,12 @@ if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an bankui->cbwig->do_callback(); }; bankui->show();} - xywh {130 72 205 18} box PLASTIC_THIN_DOWN_BOX down_box FLAT_BOX color 247 labelfont 1 labelsize 11 align 208 + xywh {130 72 205 18} box THIN_DOWN_BOX down_box FLAT_BOX color 50 labelfont 1 labelsize 11 align 208 } Fl_Slider partpanning { label Pan callback {master->part[npart]->setPpanning((int) o->value());} - xywh {185 95 70 15} type {Horz Knob} box FLAT_BOX maximum 127 step 1 value 64 + xywh {185 95 145 15} type {Horz Knob} box NO_BOX labelsize 11 maximum 127 step 1 value 64 code0 {o->value(master->part[npart]->Ppanning);} } Fl_Choice partrcv { @@ -1198,18 +1258,18 @@ virkeys->midich=(int) o->value();} open } {} Fl_Dial partvolume { callback {master->part[npart]->setPvolume((int) o->value());} - xywh {145 95 30 30} maximum 127 step 1 + xywh {135 95 45 40} labelsize 9 maximum 127 step 1 code0 {o->value(master->part[npart]->Pvolume);} class WidgetPDial } Fl_Box {} { label Volume - xywh {130 125 60 15} + xywh {130 130 55 20} labelsize 10 } Fl_Check_Button simplepartportamento { label Portamento callback {master->part[npart]->ctl.portamento.portamento=(int) o->value();} - tooltip {Enable/Disable the portamento} xywh {260 95 75 20} down_box DOWN_BOX labelfont 1 labelsize 10 + tooltip {Enable/Disable the portamento} xywh {193 127 79 23} down_box DOWN_BOX labelsize 9 code0 {o->value(master->part[npart]->ctl.portamento.portamento);} } Fl_Counter simpleminkcounter { @@ -1217,7 +1277,7 @@ virkeys->midich=(int) o->value();} open callback {master->part[npart]->Pminkey=(int) o->value(); if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_RED); else o->textcolor(FL_BLACK);} - tooltip {Minimum key (that the part receives NoteOn messages)} xywh {210 158 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10 + tooltip {Minimum key (that the part receives NoteOn messages)} xywh {210 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10 code0 {o->value(master->part[npart]->Pminkey);} } Fl_Counter simplemaxkcounter { @@ -1226,7 +1286,7 @@ if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_R if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_RED); else o->textcolor(FL_BLACK);} - tooltip {Maximum key (that the part receives NoteOn messages)} xywh {255 158 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10 + tooltip {Maximum key (that the part receives NoteOn messages)} xywh {255 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10 code0 {o->value(master->part[npart]->Pmaxkey);} } Fl_Button {} { @@ -1254,7 +1314,7 @@ simplemaxkcounter->do_callback();} Fl_Counter simplepartkeyshiftcounter { label KeyShift callback {master->part[npart]->Pkeyshift=(int) o->value()+64;} - xywh {240 120 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {280 120 50 20} type Simple labelsize 11 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->part[npart]->Pkeyshift-64);} } @@ -1265,7 +1325,7 @@ simplemaxkcounter->do_callback();} } Fl_Box {} { label Effect - xywh {295 190 40 15} + xywh {295 190 40 15} labelsize 10 } } Fl_Check_Button partenabled { @@ -1294,15 +1354,15 @@ o->redraw();} code0 {o->init(master);} class VirKeys } - Fl_Group {} { - xywh {340 30 255 185} box ENGRAVED_BOX + Fl_Group {} {open + xywh {340 30 255 185} } { - Fl_Tabs {} { - xywh {345 35 245 175} align 18 + Fl_Tabs {} {open + xywh {345 35 245 175} box UP_FRAME align 18 } { Fl_Group {} { - label {System Effects} - xywh {345 55 245 155} box ENGRAVED_FRAME labelfont 1 labelsize 12 align 18 hide + label {System Effects} open + xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18 } { Fl_Counter simplesyseffnocounter { label {Sys.Effect No.} @@ -1360,8 +1420,8 @@ simplesyseffectui->refresh(master->sysefx[nsyseff]);} xywh {100 100 100 20} labelfont 1 labelsize 10 } } - Fl_Group simplesyseffectuigroup { - xywh {350 95 235 95} box FLAT_BOX color 48 + Fl_Group simplesyseffectuigroup {open + xywh {350 95 235 95} color 48 } { Fl_Group simplesyseffectui { xywh {350 95 234 95} @@ -1384,7 +1444,7 @@ pthread_mutex_unlock(&master->mutex);} } Fl_Group {} { label {Insertion Effects} - xywh {345 55 245 155} box ENGRAVED_FRAME labelfont 1 labelsize 12 align 18 + xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18 hide } { Fl_Counter simpleinseffnocounter { label {Ins.Effect No.} @@ -1412,7 +1472,7 @@ if (master->Pinsparts[ninseff]!=-1) { master->insefx[ninseff]->changeeffect((int) o->value()); pthread_mutex_unlock(&master->mutex); simpleinseffectui->refresh(master->insefx[ninseff]); -simpleinseffectui->show();} selected +simpleinseffectui->show();} xywh {515 80 70 15} down_box BORDER_BOX labelsize 10 align 5 code0 {o->value(master->insefx[ninseff]->geteffect());} code1 {if (master->Pinsparts[ninseff]== -1) o->deactivate();} @@ -1492,7 +1552,7 @@ pthread_mutex_unlock(&master->mutex);} } } } - Fl_Group {} { + Fl_Group {} {open xywh {5 300 590 30} box ENGRAVED_FRAME } { Fl_Box {} { @@ -1512,7 +1572,7 @@ pthread_mutex_unlock(&master->mutex);} Fl_Counter simplemasterkeyshiftcounter { label {Master KeyShift} callback {master->setPkeyshift((int) o->value()+64);} - xywh {25 110 90 20} labelsize 11 minimum -64 maximum 64 step 1 + xywh {15 110 90 20} labelsize 11 minimum -64 maximum 64 step 1 code0 {o->lstep(12);} code1 {o->value(master->Pkeyshift-64);} } @@ -1522,18 +1582,18 @@ pthread_mutex_unlock(&master->mutex);} pthread_mutex_lock(&master->mutex); master->shutup=1; pthread_mutex_unlock(&master->mutex);} - xywh {5 149 115 31} box PLASTIC_UP_BOX color 231 labelfont 1 labelsize 11 + xywh {5 149 115 31} color 90 labelfont 1 labelsize 10 } Fl_Button {} { label Reset callback {simpleglobalfinedetuneslider->value(64.0); simpleglobalfinedetuneslider->do_callback();} - tooltip {Master fine detune reset} xywh {70 32 50 10} box THIN_UP_BOX labelfont 1 labelsize 11 align 128 + tooltip {Master fine detune reset} xywh {70 30 50 17} box THIN_UP_BOX labelsize 11 align 128 } Fl_Dial simpleglobalfinedetuneslider { label {Fine Detune} callback {master->microtonal.Pglobalfinedetune=(int) o->value();} - tooltip {global fine detune} xywh {80 45 30 30} box ROUND_UP_BOX labelsize 11 align 130 maximum 127 step 1 value 64 + tooltip {global fine detune} xywh {80 50 30 30} box ROUND_UP_BOX labelsize 11 align 130 maximum 127 step 1 value 64 code0 {o->value(master->microtonal.Pglobalfinedetune);} class WidgetPDial } @@ -1553,14 +1613,18 @@ virkeys->midich=master->part[npart]->Prcvchn;} callback {virkeys->relaseallkeys(0); virkeys->midioct=(int) o->value(); virkeys->take_focus();} - tooltip {Midi Octave} xywh {5 195 55 20} type Simple labelsize 11 align 8 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 11 + tooltip {Midi Octave} xywh {5 190 55 20} type Simple labelsize 11 align 8 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 11 code0 {o->value(virkeys->midioct);} } + Fl_Button sm_indicator2 { + label SM + xywh {560 5 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate + } } Fl_Window selectuiwindow { label {User Interface mode} callback {*exitprogram=1;} - xywh {342 246 430 250} type Double labeltype NORMAL_LABEL align 80 hide non_modal + xywh {342 246 430 250} type Double hide non_modal } { Fl_Box {} { label {Welcome to ZynAddSubFX} @@ -1575,7 +1639,7 @@ virkeys->take_focus();} callback {config.cfg.UserInterfaceMode=1; masterwindow->show(); selectuiwindow->hide();} - xywh {10 165 100 35} box PLASTIC_UP_BOX color 229 labelfont 1 labelsize 16 + xywh {10 165 100 35} color 229 labelfont 1 labelsize 16 } Fl_Box {} { label {.. if you have used ZynAddSubFX before, or you like to have full controll to all parameters.} @@ -1586,7 +1650,7 @@ selectuiwindow->hide();} callback {simplemasterwindow->show(); selectuiwindow->hide(); config.cfg.UserInterfaceMode=2;} - xywh {10 80 100 65} box PLASTIC_UP_BOX color 238 labelfont 1 labelsize 16 + xywh {10 80 100 65} color 238 labelfont 1 labelsize 16 } Fl_Box {} { label {..if you are a beginner, you prefer using presets or you prefer to use simpler user interfaces. Most functionality of ZynAddSubFX will be hidden in this mode to make simple the learning/using it.} @@ -1686,9 +1750,8 @@ simplemaxkcounter->value(master->part[npart]->Pmaxkey); simplepartkeyshiftcounter->value(master->part[npart]->Pkeyshift-64); simplesyseffsend->value(master->Psysefxvol[nsyseff][npart]);} {} } - Function {do_new_master()} {} { - code {if (fl_choice("Clear *ALL* the parameters ?","No","Yes",NULL)){ - delete microtonalui; + Function {do_new_master_unconditional()} {} { + code {delete microtonalui; pthread_mutex_lock(&master->mutex); master->defaults(); @@ -1696,10 +1759,32 @@ simplesyseffsend->value(master->Psysefxvol[nsyseff][npart]);} {} npartcounter->value(1); refresh_master_ui(); - -}; - -updatepanel();} {} + updatepanel();} {} + } + Function {do_new_master()} {} { + code {if (fl_choice("Clear *ALL* the parameters ?","No","Yes",NULL)){ + do_new_master_unconditional(); + }} {} + } + Function {do_load_master_unconditional(const char *filename, const char *display_name)} {return_type int + } { + code {pthread_mutex_lock(&master->mutex); + //clear all parameters + master->defaults(); + + //load the data + int result=master->loadXML(filename); + + master->applyparameters(false); + pthread_mutex_unlock(&master->mutex); + + npartcounter->value(1); + refresh_master_ui(); + updatepanel(); + + if (result>=0) setfilelabel(display_name); + + return result;} {} } Function {do_load_master(const char* file = NULL)} {} { code {const char *filename; @@ -1711,22 +1796,7 @@ updatepanel();} {} filename = file; } - -pthread_mutex_lock(&master->mutex); - //clear all parameters - master->defaults(); - - //load the data - int result=master->loadXML(filename); - -master->applyparameters(false); -pthread_mutex_unlock(&master->mutex); - -npartcounter->value(1); -refresh_master_ui(); -updatepanel(); -if (result>=0) setfilelabel(filename); - + int result = do_load_master_unconditional( filename, filename ); if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not a zynaddsubfx parameters file."); else if (result<0) fl_alert("Error: Could not load the file.");} {} @@ -1757,8 +1827,15 @@ result=master->saveXML(filename); pthread_mutex_unlock(&master->mutex); if (result<0) fl_alert("Error: Could not save the file."); - else setfilelabel(filename); - + else +{ +\#if USE_NSM + if ( nsm && nsm->is_active() ) + setfilelabel( nsm->display_name ); + else +\#endif + setfilelabel(filename); +} updatepanel();} {} } Function {refresh_master_ui()} {} { diff --git a/src/UI/MicrotonalUI.fl b/src/UI/MicrotonalUI.fl @@ -209,7 +209,7 @@ o->redraw();} callback {microtonal->Penabled=(int) o->value(); if (microtonal->Penabled==0) microtonalgroup->deactivate(); else microtonalgroup->activate();} - xywh {3 3 102 45} box PLASTIC_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 11 align 148 + xywh {3 3 102 45} box UP_BOX down_box DOWN_BOX labelfont 1 labelsize 11 align 148 code0 {o->value(microtonal->Penabled);} } } diff --git a/src/UI/NSM.C b/src/UI/NSM.C @@ -0,0 +1,163 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* 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; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + + +#include "NSM.H" + +#include "../Nio/Nio.h" + +#include "MasterUI.h" +#include <FL/Fl.H> +#include <stdio.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> + +extern int Pexitprogram; +extern MasterUI *ui; + +extern NSM_Client *nsm; +extern char *instance_name; + +NSM_Client::NSM_Client() +{ + project_filename = 0; + display_name = 0; +} + +int command_open(const char *name, + const char *display_name, + const char *client_id, + char **out_msg); +int command_save(char **out_msg); + +int +NSM_Client::command_save(char **out_msg) +{ + (void) out_msg; + int r = ERR_OK; + + ui->do_save_master(project_filename); + + return r; +} + +int +NSM_Client::command_open(const char *name, + const char *display_name, + const char *client_id, + char **out_msg) +{ + Nio::stop(); + + if(instance_name) + free(instance_name); + + instance_name = strdup(client_id); + + Nio::start(); + + char *new_filename; + + asprintf(&new_filename, "%s.xmz", name); + + struct stat st; + + int r = ERR_OK; + + if(0 == stat(new_filename, &st)) { + if(ui->do_load_master_unconditional(new_filename, display_name) < 0) { + *out_msg = strdup("Failed to load for unknown reason"); + r = ERR_GENERAL; + + return r; + } + } + else + ui->do_new_master_unconditional(); + + if(project_filename) + free(project_filename); + + if(this->display_name) + free(this->display_name); + + project_filename = new_filename; + + this->display_name = strdup(display_name); + + return r; +} + +static void save_callback(Fl_Widget *, void *v) +{ + MasterUI *ui = static_cast<MasterUI*>(v); + ui->do_save_master(); +} + +void +NSM_Client::command_active(bool active) +{ + if(active) { + Fl_Menu_Item *m; + //TODO see if there is a cleaner way of doing this without voiding + //constness + if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( + "&File/&Open Parameters...")))) + m->label("&Import Parameters..."); + if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( + "&File/&Open Parameters...")))) + m->label("&Import Parameters..."); + + //TODO get this menu entry inserted at the right point + if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item("&File/&Export Parameters...")))) + m->show(); + else + ui->mastermenu->add("&File/&Export Parameters...",0,save_callback,ui); + + if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) + m->show(); + else + ui->simplemastermenu->add("&File/&Export Parameters...",0,save_callback,ui); + + ui->sm_indicator1->value(1); + ui->sm_indicator2->value(1); + ui->sm_indicator1->tooltip(session_manager_name()); + ui->sm_indicator2->tooltip(session_manager_name()); + } + else { + Fl_Menu_Item *m; + if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item( + "&File/&Import Parameters...")))) + m->label("&Open Parameters..."); + if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item( + "&File/&Open Parameters...")))) + m->label("&Open Parameters..."); + + if((m=const_cast<Fl_Menu_Item *>(ui->mastermenu->find_item("&File/&Export Parameters...")))) + m->hide(); + if((m=const_cast<Fl_Menu_Item *>(ui->simplemastermenu->find_item("&File/&Export Parameters...")))) + m->hide(); + + ui->sm_indicator1->value(0); + ui->sm_indicator2->value(0); + ui->sm_indicator1->tooltip(NULL); + ui->sm_indicator2->tooltip(NULL); + } +} diff --git a/src/UI/NSM.H b/src/UI/NSM.H @@ -0,0 +1,45 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* 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; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + +#pragma once + +#if USE_NSM +#include "NSM/Client.H" + +class NSM_Client:public NSM::Client +{ + public: + + char *project_filename; + char *display_name; + + NSM_Client(); + ~NSM_Client() { } + + protected: + + int command_open(const char *name, + const char *display_name, + const char *client_id, + char **out_msg); + int command_save(char **out_msg); + + void command_active(bool active); +}; +#endif diff --git a/src/UI/NSM/Client.C b/src/UI/NSM/Client.C @@ -0,0 +1,403 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* 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; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + +#include "Client.H" +#include <string.h> +#include <sys/types.h> +#include <unistd.h> +#include <stdlib.h> + +#pragma GCC diagnostic ignored "-Wunused-parameter" + +namespace NSM +{ +/************************/ +/* OSC Message Handlers */ +/************************/ + +#undef OSC_REPLY +#undef OSC_REPLY_ERR + +#define OSC_REPLY(value) lo_send_from(((NSM::Client *)user_data)->nsm_addr, \ + ((NSM::Client *)user_data)->_server, \ + LO_TT_IMMEDIATE, \ + "/reply", \ + "ss", \ + path, \ + value) + +#define OSC_REPLY_ERR(errcode, value) lo_send_from( \ + ((NSM::Client *)user_data)->nsm_addr, \ + ((NSM::Client *)user_data)->_server, \ + LO_TT_IMMEDIATE, \ + "/error", \ + "sis", \ + path, \ + errcode, \ + value) + + Client::Client() + { + nsm_addr = 0; + nsm_client_id = 0; + _session_manager_name = 0; + nsm_is_active = false; + _server = 0; + _st = 0; + } + + Client::~Client() + { + if(_st) + stop(); + + if(_st) + lo_server_thread_free(_st); + else + lo_server_free(_server); + } + + void + Client::announce(const char *application_name, + const char *capabilities, + const char *process_name) + { + // MESSAGE( "Announcing to NSM" ); + + lo_address to = lo_address_new_from_url(nsm_url); + + if(!to) + // MESSAGE( "Bad address" ); + return; + + int pid = (int)getpid(); + + lo_send_from(to, + _server, + LO_TT_IMMEDIATE, + "/nsm/server/announce", + "sssiii", + application_name, + capabilities, + process_name, + 1, + /* api_major_version */ + 0, + /* api_minor_version */ + pid); + + lo_address_free(to); + } + + void + Client::progress(float p) + { + if(nsm_is_active) + lo_send_from(nsm_addr, + _server, + LO_TT_IMMEDIATE, + "/nsm/client/progress", + "f", + p); + } + + void + Client::is_dirty(void) + { + if(nsm_is_active) + lo_send_from(nsm_addr, + _server, + LO_TT_IMMEDIATE, + "/nsm/client/is_dirty", + ""); + } + + void + Client::is_clean(void) + { + if(nsm_is_active) + lo_send_from(nsm_addr, + _server, + LO_TT_IMMEDIATE, + "/nsm/client/is_clean", + ""); + } + + void + Client::message(int priority, const char *msg) + { + if(nsm_is_active) + lo_send_from(nsm_addr, + _server, + LO_TT_IMMEDIATE, + "/nsm/client/message", + "is", + priority, + msg); + } + + + void + Client::broadcast(lo_message msg) + { + if(nsm_is_active) + lo_send_message_from(nsm_addr, + _server, + "/nsm/server/broadcast", + msg); + } + + void + Client::check(int timeout) + { + if(lo_server_wait(_server, timeout)) + while(lo_server_recv_noblock(_server, 0)) {} + } + + void + Client::start() + { + lo_server_thread_start(_st); + } + + void + Client::stop() + { + lo_server_thread_stop(_st); + } + + int + Client::init(const char *nsm_url) + { + this->nsm_url = nsm_url; + + lo_address addr = lo_address_new_from_url(nsm_url); + int proto = lo_address_get_protocol(addr); + lo_address_free(addr); + + _server = lo_server_new_with_proto(NULL, proto, NULL); + + if(!_server) + return -1; + + lo_server_add_method(_server, "/error", "sis", &Client::osc_error, this); + lo_server_add_method(_server, + "/reply", + "ssss", + &Client::osc_announce_reply, + this); + lo_server_add_method(_server, + "/nsm/client/open", + "sss", + &Client::osc_open, + this); + lo_server_add_method(_server, + "/nsm/client/save", + "", + &Client::osc_save, + this); + lo_server_add_method(_server, + "/nsm/client/session_is_loaded", + "", + &Client::osc_session_is_loaded, + this); + lo_server_add_method(_server, NULL, NULL, &Client::osc_broadcast, this); + + return 0; + } + + int + Client::init_thread(const char *nsm_url) + { + this->nsm_url = nsm_url; + + lo_address addr = lo_address_new_from_url(nsm_url); + int proto = lo_address_get_protocol(addr); + lo_address_free(addr); + + _st = lo_server_thread_new_with_proto(NULL, proto, NULL); + _server = lo_server_thread_get_server(_st); + + if(!_server || !_st) + return -1; + + lo_server_thread_add_method(_st, + "/error", + "sis", + &Client::osc_error, + this); + lo_server_thread_add_method(_st, + "/reply", + "ssss", + &Client::osc_announce_reply, + this); + lo_server_thread_add_method(_st, + "/nsm/client/open", + "sss", + &Client::osc_open, + this); + lo_server_thread_add_method(_st, + "/nsm/client/save", + "", + &Client::osc_save, + this); + lo_server_thread_add_method(_st, + "/nsm/client/session_is_loaded", + "", + &Client::osc_session_is_loaded, + this); + lo_server_thread_add_method(_st, + NULL, + NULL, + &Client::osc_broadcast, + this); + + return 0; + } + +/************************/ +/* OSC Message Handlers */ +/************************/ + + int + Client::osc_broadcast(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + return ((NSM::Client *)user_data)->command_broadcast(path, msg); + } + + int + Client::osc_save(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + char *out_msg = NULL; + + int r = ((NSM::Client *)user_data)->command_save(&out_msg); + + if(r) + OSC_REPLY_ERR(r, (out_msg ? out_msg : "")); + else + OSC_REPLY("OK"); + + if(out_msg) + free(out_msg); + + return 0; + } + + int + Client::osc_open(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + char *out_msg = NULL; + + NSM::Client *nsm = (NSM::Client *)user_data; + + nsm->nsm_client_id = strdup(&argv[2]->s); + + int r = ((NSM::Client *)user_data)->command_open(&argv[0]->s, + &argv[1]->s, + &argv[2]->s, + &out_msg); + + if(r) + OSC_REPLY_ERR(r, (out_msg ? out_msg : "")); + else + OSC_REPLY("OK"); + + if(out_msg) + free(out_msg); + + return 0; + } + + int + Client::osc_session_is_loaded(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + NSM::Client *nsm = (NSM::Client *)user_data; + + nsm->command_session_is_loaded(); + + return 0; + } + + int + Client::osc_error(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + if(strcmp(&argv[0]->s, "/nsm/server/announce")) + return -1; + + NSM::Client *nsm = (NSM::Client *)user_data; + + +// WARNING( "Failed to register with NSM: %s", &argv[2]->s ); + nsm->nsm_is_active = false; + + nsm->command_active(nsm->nsm_is_active); + + return 0; + } + + int + Client::osc_announce_reply(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data) + { + if(strcmp(&argv[0]->s, "/nsm/server/announce")) + return -1; + + NSM::Client *nsm = (NSM::Client *)user_data; + +// MESSAGE( "Successfully registered. NSM says: %s", &argv[1]->s ); + nsm->nsm_is_active = true; + nsm->_session_manager_name = strdup(&argv[2]->s); + nsm->nsm_addr = + lo_address_new_from_url(lo_address_get_url(lo_message_get_source( + msg))); + + nsm->command_active(nsm->nsm_is_active); + + return 0; + } +}; diff --git a/src/UI/NSM/Client.H b/src/UI/NSM/Client.H @@ -0,0 +1,143 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* 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; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + +#pragma once + +#include <lo/lo.h> + +namespace NSM +{ + class Client + { + private: + + const char *nsm_url; + + lo_server _server; + lo_server_thread _st; + lo_address nsm_addr; + + bool nsm_is_active; + char *nsm_client_id; + char *_session_manager_name; + + public: + + enum { + ERR_OK = 0, + ERR_GENERAL = -1, + ERR_INCOMPATIBLE_API = -2, + ERR_BLACKLISTED = -3, + ERR_LAUNCH_FAILED = -4, + ERR_NO_SUCH_FILE = -5, + ERR_NO_SESSION_OPEN = -6, + ERR_UNSAVED_CHANGES = -7, + ERR_NOT_NOW = -8 + }; + + Client(); + virtual ~Client(); + + bool is_active(void) { return nsm_is_active; } + + const char *session_manager_name(void) { + return + _session_manager_name; + } + + /* Client->Server methods */ + void is_dirty(void); + void is_clean(void); + void progress(float f); + void message(int priority, const char *msg); + void announce(const char *appliction_name, + const char *capabilities, + const char *process_name); + + void broadcast(lo_message msg); + + /* init without threading */ + int init(const char *nsm_url); + /* init with threading */ + int init_thread(const char *nsm_url); + + /* call this periodically to check for new messages */ + void check(int timeout = 0); + + /* or call these to start and stop a thread (must do your own locking in handler!) */ + void start(void); + void stop(void); + + protected: + + /* Server->Client methods */ + virtual int command_open(const char *name, + const char *display_name, + const char *client_id, + char **out_msg) = 0; + virtual int command_save(char **out_msg) = 0; + + virtual void command_active(bool) { } + + virtual void command_session_is_loaded(void) { } + + /* invoked when an unrecognized message is received. Should return 0 if you handled it, -1 otherwise. */ + virtual int command_broadcast(const char *, lo_message) { return -1; } + + private: + + /* osc handlers */ + static int osc_open(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + static int osc_save(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + static int osc_announce_reply(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + static int osc_error(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + static int osc_session_is_loaded(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + static int osc_broadcast(const char *path, + const char *types, + lo_arg **argv, + int argc, + lo_message msg, + void *user_data); + }; +}; diff --git a/src/UI/NioUI.cpp b/src/UI/NioUI.cpp @@ -32,7 +32,7 @@ NioUI::NioUI() string source = Nio::getSource(); int midival = 0; for(set<string>::iterator itr = midiList.begin(); - itr != midiList.end(); ++itr) { + itr != midiList.end(); ++itr) { midi->add(itr->c_str()); if(*itr == source) midival = midi->size() - 2; @@ -46,7 +46,7 @@ NioUI::NioUI() string sink = Nio::getSink(); int audioval = 0; for(set<string>::iterator itr = audioList.begin(); - itr != audioList.end(); ++itr) { + itr != audioList.end(); ++itr) { audio->add(itr->c_str()); if(*itr == sink) audioval = audio->size() - 2; diff --git a/src/UI/NioUI.h b/src/UI/NioUI.h @@ -1,5 +1,5 @@ #ifndef NIOUI_H -#define NIOUT_H +#define NIOUI_H #include <FL/Fl.H> #include <FL/Fl_Window.H> diff --git a/src/UI/OscilGenUI.fl b/src/UI/OscilGenUI.fl @@ -2,8 +2,7 @@ version 1.0110 header_name {.h} code_name {.cc} -decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {selected -} +decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} decl {//License: GNU GPL version 2 or later} {} @@ -51,6 +50,9 @@ decl {\#include "FilterUI.h"} {public decl {\#include "PresetsUI.h"} {public } +decl {\#include <FL/fl_draw.H>} {public +} + class OscilSpectrum {: {public Fl_Box} } { Function {OscilSpectrum(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { @@ -157,12 +159,14 @@ return(1);} {} } } -class Oscilloscope {: {public Fl_Box} +class Oscilloscope {open : {public Fl_Box} } { - Function {Oscilloscope(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { + Function {Oscilloscope(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {open + } { code {oscil=NULL; phase=64; -oscbase=0;} {} +oscbase=0; +box(FL_FLAT_BOX);} {} } Function {init(OscilGen *oscil_,Master *master_)} {} { code {oscil=oscil_; @@ -179,7 +183,8 @@ oscbase=oscbase_; phase=phase_; master=master_;} {} } - Function {draw()} {} { + Function {draw()} {open + } { code {int ox=x(),oy=y(),lx=w(),ly=h()-1,i; float smps[synth->oscilsize]; pthread_mutex_lock(&master->mutex); @@ -188,7 +193,7 @@ if (oscbase==0) oscil->get(smps,-1.0); pthread_mutex_unlock(&master->mutex); if (damage()!=1){ - fl_color(0,0,0); + fl_color( fl_color_average( FL_BLACK, FL_BACKGROUND_COLOR, 0.5 )); fl_rectf(ox,oy,lx,ly); }; @@ -220,17 +225,22 @@ fl_line_style(0,1); fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2); if (this->active_r()) fl_color(this->parent()->selection_color()); else fl_color(this->parent()->labelcolor()); -int lw=1; + +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); + +int lw=2; //if ((lx<135)||(ly<135)) lw=1; -fl_line_style(0,lw); -int ph=(int)((phase-64.0)/128.0*synth->oscilsize+synth->oscilsize); +fl_line_style(FL_SOLID,lw); +fl_begin_line(); +double ph=((phase-64.0)/128.0*synth->oscilsize+synth->oscilsize); for (i=1;i<lx;i++){ - int k1=(int)((float)synth->oscilsize*(i-1)/lx)+ph; - int k2=(int)((float)synth->oscilsize*i/lx)+ph; - float y1=smps[k1%synth->oscilsize]/max; - float y2=smps[k2%synth->oscilsize]/max; - fl_line(i-1+ox,(int)(y1*ly/2.0)+oy+ly/2,i+ox,(int)(y2*ly/2.0)+oy+ly/2); -};} {} + int k2=(synth->oscilsize*i/lx)+ph; + double y2=smps[k2%synth->oscilsize]/max; + fl_vertex(i+ox,y2*ly/2.0+oy+ly/2); +}; +fl_end_line(); + +fl_line_style(FL_SOLID,0);} {} } decl {OscilGen *oscil;} {} decl {int oscbase;} {} @@ -241,11 +251,11 @@ for (i=1;i<lx;i++){ class Oscilharmonic {: {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window harmonic { - private xywh {328 166 90 225} type Double hide - class Fl_Group + Fl_Window harmonic {open + private xywh {338 259 100 225} type Double box NO_BOX + class Fl_Group visible } { Fl_Slider mag { callback {int x=64; @@ -270,7 +280,7 @@ if (cbwidget!=NULL) { applybutton->color(FL_RED); applybutton->redraw(); };} - xywh {0 15 15 115} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 64 + xywh {0 15 15 115} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->value(127-oscil->Phmag[n]);} code1 {if (oscil->Phmag[n]==64) o->selection_color(0);} class PSlider @@ -292,7 +302,7 @@ if (cbwidget!=NULL) { applybutton->color(FL_RED); applybutton->redraw(); };} - xywh {0 135 15 75} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 64 + xywh {0 135 15 75} type {Vert Knob} box NO_BOX selection_color 222 maximum 127 step 1 value 64 code0 {o->value(oscil->Phphase[n]);} class PSlider } @@ -351,13 +361,14 @@ if (oscil->Phmag[n]==64) mag->selection_color(0); decl {Master *master;} {} } -class OscilEditor {: {public PresetsUI_} +class OscilEditor {open : {public PresetsUI_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window osceditUI { - label {ADsynth Oscillator Editor} - xywh {131 90 735 595} type Double hide - code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} + label {ADsynth Oscillator Editor} open + xywh {542 193 735 595} type Double + code0 {if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");} visible } { Fl_Button applybutton { label Apply @@ -372,7 +383,7 @@ if (cbapplywidget!=NULL) { code0 {if (!oscil->ADvsPAD) o->hide();} } Fl_Group oscildisplaygroup { - xywh {5 5 360 300} box ENGRAVED_FRAME + xywh {5 5 360 300} box UP_FRAME } { Fl_Group {} {open xywh {10 85 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 @@ -381,14 +392,14 @@ if (cbapplywidget!=NULL) { } {} Fl_Box {} { label Oscillator - xywh {120 10 110 20} box FLAT_BOX labelfont 1 + xywh {120 10 110 20} labelfont 1 } Fl_Value_Slider rndslider { label rnd callback {oscil->Prand=(int)o->value()+64; oscildisplaygroup->redraw(); oldosc->redraw();} - tooltip {Oscilator Phase Randomness: smaller than 0 is "group", larger than 0 is for each harmonic} xywh {140 285 100 10} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 + tooltip {Oscilator Phase Randomness: smaller than 0 is "group", larger than 0 is for each harmonic} xywh {140 285 100 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -64 maximum 63 step 1 code0 {if (oscil->ADvsPAD) o->hide();} } Fl_Group {} {open @@ -397,7 +408,7 @@ oldosc->redraw();} code1 {spc->init(oscil,0,master);} } {} Fl_Group {} { - xywh {246 277 115 25} box ENGRAVED_BOX + xywh {246 277 115 25} box UP_FRAME code0 {if (oscil->ADvsPAD) o->hide();} } { Fl_Choice hrndtype { @@ -425,12 +436,8 @@ oldosc->redraw();} } } } - Fl_Box {} { - label {Base Func.} - xywh {495 15 110 20} box FLAT_BOX labelfont 1 - } - Fl_Group basefuncdisplaygroup { - xywh {365 5 360 300} box ENGRAVED_FRAME + Fl_Group basefuncdisplaygroup {open selected + xywh {365 5 360 300} box UP_FRAME } { Fl_Group {} { xywh {370 85 350 190} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 @@ -524,7 +531,7 @@ if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodula } Fl_Box {} { label {Base Func.} - xywh {480 10 110 20} box FLAT_BOX labelfont 1 + xywh {480 10 110 20} labelfont 1 } Fl_Group {} {open xywh {370 30 350 50} box THIN_DOWN_BOX color 32 selection_color 218 labelcolor 63 @@ -536,7 +543,7 @@ if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodula xywh {490 285 25 15} labelsize 12 minimum -63 maximum 63 step 1 } Fl_Group basefuncmodulation { - xywh {550 276 169 25} box ENGRAVED_BOX + xywh {550 276 169 25} box UP_FRAME code0 {if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodulation->deactivate();} } { Fl_Choice bfmodtype { @@ -684,7 +691,7 @@ redrawoscil();} xywh {670 505 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 } Fl_Group {} { - xywh {135 308 150 30} box ENGRAVED_BOX + xywh {135 308 150 30} box UP_FRAME } { Fl_Choice wshbutton { label {Wsh.} @@ -770,7 +777,7 @@ redrawoscil();} tooltip {Auto clear when using the oscillator as base function} xywh {95 313 35 20} box THIN_UP_BOX value 1 labelfont 1 labelsize 10 } Fl_Group {} { - xywh {285 308 155 30} box ENGRAVED_BOX + xywh {285 308 155 30} box UP_FRAME } { Fl_Choice fltbutton { label Filter @@ -859,7 +866,7 @@ redrawoscil();} } } Fl_Group {} { - xywh {590 308 135 30} box ENGRAVED_BOX + xywh {590 308 135 30} box UP_FRAME } { Fl_Choice sabutton { label {Sp.adj.} @@ -892,7 +899,7 @@ redrawoscil();} } } Fl_Group {} { - xywh {665 340 65 65} box ENGRAVED_BOX + xywh {665 340 65 65} box UP_FRAME } { Fl_Counter harmonicshiftcounter { label {Harmonic Shift} @@ -914,8 +921,8 @@ redrawoscil();} xywh {670 385 20 15} box THIN_UP_BOX labelfont 1 labelsize 10 } } - Fl_Group {} { - xywh {665 410 65 90} box ENGRAVED_FRAME + Fl_Group {} {open + xywh {665 410 65 90} box UP_FRAME } { Fl_Choice adhrtype { label {Adpt.Harm.} @@ -977,11 +984,11 @@ redrawoscil();} Fl_Slider adhrpar { callback {oscil->Padaptiveharmonicspar=(int)o->value(); redrawoscil();} - xywh {670 445 55 10} type {Horz Knob} box FLAT_BOX maximum 100 step 1 value 50 + xywh {670 445 55 10} type {Horz Knob} box NO_BOX maximum 100 step 1 value 50 } } Fl_Group {} { - xywh {440 308 150 30} box ENGRAVED_BOX + xywh {440 308 150 30} box UP_FRAME } { Fl_Choice modtype { label {Mod.} @@ -1051,7 +1058,7 @@ refresh();} xywh {700 545 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Scroll _this_has_to_be_the_last { - xywh {5 340 660 250} type HORIZONTAL box ENGRAVED_BOX + xywh {5 340 660 250} type HORIZONTAL box FLAT_BOX } { Fl_Pack harmonics {open xywh {10 345 650 225} type HORIZONTAL diff --git a/src/UI/PADnoteUI.fl b/src/UI/PADnoteUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0110 header_name {.h} code_name {.cc} decl {\#include "../Params/PADnoteParameters.h"} {public @@ -69,16 +69,18 @@ bool active=active_r(); //draw the equivalent bandwidth if (active) fl_color(220,220,220); else fl_color(160,165,165); -fl_line_style(0); +fl_line_style(FL_DASH); int rbw=(int)(realbw*(lx-1.0)/2.0); -for (int i=lx/2-rbw;i<(lx/2+rbw);i++) fl_line(ox+i,oy,ox+i,oy+ly-1); +fl_begin_line(); +for (int i=lx/2-rbw;i<(lx/2+rbw);i++) { fl_vertex(ox+i,oy); } +fl_end_line(); -fl_line_style(0); +fl_line_style(FL_DASH); if (active) fl_color(200,200,200); else fl_color(160,160,160); for (int i=1;i<10;i++){ int kx=(int)(lx/10.0*i); - fl_line(ox+kx,oy,ox+kx,oy+ly-1); + fl_line( ox + kx, oy, ox + kx, oy + ly - 1 ); }; for (int i=1;i<5;i++){ int ky=(int)(ly/5.0*i); @@ -87,22 +89,35 @@ for (int i=1;i<5;i++){ fl_color(120,120,120); -fl_line_style(FL_DOT); +fl_line_style(FL_DASH); fl_line(ox+lx/2,oy,ox+lx/2,oy+ly); //draw the graph -fl_line_style(0); -int old=0; -for (int i=0;i<lx;i++){ - int val=(int) ((ly-2)*smps[i]); +fl_line_style(FL_SOLID); if (active) fl_color(180,210,240); else fl_color(150,150,155); - fl_line(ox+i,oy+ly-1,ox+i,oy+ly-1-val); - if (active) fl_color(0,0,100); - else fl_color(150,150,150); - if (i>0) fl_line(ox+i-1,oy+ly-2-old,ox+i,oy+ly-2-val); - old=val; + +fl_color( fl_color_add_alpha( fl_color(), 127 ) ); + +fl_begin_polygon(); +fl_vertex( ox, oy + h() ); +for (int i=0;i<lx;i++){ + int val=(int) ((ly-2)*smps[i]); + +// fl_vertex(ox+i,oy+ly-1); + fl_vertex(ox+i,oy+ly-1-val); + + // if (active) fl_color(0,0,100); + // else fl_color(150,150,150); + +// if (i>0) +// { +// fl_vertex(ox+i-1,oy+ly-2-old); +// fl_vertex(ox+i,oy+ly-2-val); +// } }; +fl_vertex( ox + w(), oy + h() ); +fl_end_polygon(); fl_line_style(FL_DASH); @@ -136,10 +151,10 @@ const int maxharmonic=64; for (int i=1;i<maxharmonic;i++){ - fl_color(200,200,200); + fl_color(100,100,100); fl_line_style(FL_DOT); if (i%5==0) fl_line_style(0); - if (i%10==0) fl_color(160,160,160); + if (i%10==0) fl_color(120,120,120); int kx=(int)(lx/(float)maxharmonic*i); fl_line(ox+kx,oy,ox+kx,oy+ly); }; @@ -227,19 +242,19 @@ make_window();} {} } { Fl_Window padnotewindow { label {PAD synth Parameters} open - xywh {281 302 535 450} type Double visible + xywh {294 392 535 435} type Double visible } { Fl_Tabs {} { callback {if (o->value()!=harmonicstructuregroup) applybutton->hide(); - else applybutton->show();} - xywh {0 0 535 395} + else applybutton->show();} open + xywh {0 0 535 395} box UP_FRAME } { Fl_Group harmonicstructuregroup { - label {Harmonic Structure} - xywh {0 20 535 375} box ENGRAVED_BOX + label {Harmonic Structure} open selected + xywh {0 20 535 375} box UP_FRAME } { Fl_Group bwprofilegroup { - xywh {5 30 90 260} box ENGRAVED_BOX + xywh {5 30 90 260} box UP_FRAME code0 {if (pars->Pmode!=0) o->deactivate();} } { Fl_Dial hpbasepar1 { @@ -450,7 +465,7 @@ cbwidget->do_callback();} code1 {if (pars->Pmode!=0) o->deactivate();} } Fl_Group {} { - xywh {315 295 215 45} box ENGRAVED_BOX + xywh {315 295 215 45} box UP_FRAME } { Fl_Choice hrpostype { label OvertonesPosition @@ -559,7 +574,7 @@ cbwidget->do_callback();} } } Fl_Group overtonepos { - xywh {5 345 525 45} box FLAT_BOX color 54 selection_color 218 labelcolor 63 + xywh {5 345 525 45} box FLAT_BOX color 51 selection_color 218 labelcolor 63 code0 {PADnoteOvertonePosition *opui=new PADnoteOvertonePosition(o->x(),o->y(),o->w(),o->h(),"");} code1 {opui->init(pars,master);} } {} @@ -720,7 +735,7 @@ cbwidget->do_callback();} } } Fl_Group hprofile { - xywh {100 45 430 90} box FLAT_BOX color 54 selection_color 218 labelcolor 63 + xywh {100 45 430 90} box FLAT_BOX color 51 selection_color 218 labelcolor 63 code0 {PADnoteHarmonicProfile *hpui=new PADnoteHarmonicProfile(o->x(),o->y(),o->w(),o->h(),"");} code1 {hpui->init(pars,master);} code2 {if (pars->Pmode!=0) { o->deactivate(); o->color(48);};} @@ -768,12 +783,12 @@ cbwidget->do_callback();} } } Fl_Group {} { - label {Envelopes&LFOs} - xywh {0 20 535 375} box ENGRAVED_BOX hide + label {Envelopes&LFOs} open + xywh {0 20 535 375} box UP_FRAME hide } { Fl_Group {} { label FREQUENCY - xywh {5 275 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 275 525 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group freqenv { label {PADSynth - Frequency Envelope} open @@ -798,7 +813,7 @@ pars->PCoarseDetune = k*1024+ if (k<0) k+=1024; pars->PCoarseDetune = k+ (pars->PCoarseDetune/1024)*1024;} - tooltip {Coarse Detune} xywh {455 365 60 20} labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 + tooltip {Coarse Detune} xywh {455 365 70 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 code0 {int k=pars->PCoarseDetune%1024;} code1 {if (k>=512) k-=1024;} code2 {o->value(k);} @@ -813,7 +828,7 @@ pars->PCoarseDetune = k+ Fl_Slider detune { callback {pars->PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->PDetune-8192);} } Fl_Value_Output detunevalueoutput { @@ -826,7 +841,7 @@ detunevalueoutput->do_callback();} label {Detune Type} callback {pars->PDetuneType=(int) o->value()+1; detunevalueoutput->do_callback();} open - xywh {450 335 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 + xywh {450 330 75 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} code1 {o->value(pars->PDetuneType-1);} } {} @@ -850,18 +865,18 @@ if (x==0) fixedfreqetdial->deactivate(); } Fl_Group {} { label AMPLITUDE - xywh {5 25 240 250} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {5 25 240 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Value_Slider volume { label Vol callback {pars->PVolume=(int)o->value();} - tooltip Volume xywh {10 50 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -921,7 +936,7 @@ hprofile->redraw();} } Fl_Group {} { label FILTER - xywh {245 25 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {245 25 285 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 } { Fl_Group filterenv { label {PADSynth - Filter Envelope} open @@ -956,23 +971,23 @@ if (resui!=NULL) { resui->applybutton->color(FL_GRAY); resui->applybutton->redraw(); };} - xywh {45 405 185 40} box THIN_UP_BOX labelfont 1 labelsize 16 + xywh {300 400 135 30} box THIN_UP_BOX code0 {o->color(FL_RED);} } Fl_Button {} { label Close callback {padnotewindow->hide();} - xywh {320 405 175 40} box THIN_UP_BOX labelsize 17 + xywh {440 400 90 30} box THIN_UP_BOX } Fl_Button {} { label C callback {presetsui->copy(pars);} - xywh {240 430 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {65 400 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label P callback {presetsui->paste(pars,this);} - xywh {270 430 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 + xywh {95 400 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 7 } Fl_Button {} { label export @@ -983,8 +998,8 @@ fl_filename_setext(filename,""); -pars->export2wav(filename);} selected - tooltip {export samples as wav file} xywh {240 405 55 15} box THIN_UP_BOX color 255 labelsize 11 align 128 +pars->export2wav(filename);} + tooltip {export samples as wav file} xywh {5 400 55 30} box THIN_UP_BOX color 51 labelsize 11 align 128 } } } diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -42,13 +42,13 @@ decl {\#include "../Misc/Master.h"} {public decl {\#include "../Misc/Part.h"} {public } -class PartSysEffSend {: {public Fl_Group} +class PartSysEffSend {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { Fl_Window syseffsend { - private xywh {584 83 90 35} type Double hide - class Fl_Group + private xywh {589 129 100 100} type Double box NO_BOX + class Fl_Group visible } { Fl_Dial {} { label 01 @@ -83,16 +83,16 @@ end();} {} decl {int npart;} {} } -class PartKitItem {: {public Fl_Group} +class PartKitItem {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { Fl_Window partkititem { - private xywh {113 271 670 30} type Double hide - class Fl_Group + private xywh {473 406 670 100} type Double box NO_BOX + class Fl_Group visible } { Fl_Group partkititemgroup { - private xywh {55 0 605 20} box FLAT_BOX + private xywh {55 0 605 20} code0 {if (part->kit[n].Penabled==0) o->deactivate();} } { Fl_Counter minkcounter { @@ -249,8 +249,7 @@ partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0 } else o->value(1);} } } - Function {init(Part *part_,int n_,Master *master_,class PartUI *partui_)} {selected - } { + Function {init(Part *part_,int n_,Master *master_,class PartUI *partui_)} {} { code {part=part_; n=n_; partui=partui_; @@ -270,15 +269,15 @@ end();} {} decl {class PartUI *partui;} {} } -class PartUI {: {public Fl_Group} +class PartUI {open : {public Fl_Group} } { - Function {make_window()} {private + Function {make_window()} {open private } { - Fl_Window partgroup { - private xywh {424 178 385 180} type Double hide - class Fl_Group + Fl_Window partgroup {open + private xywh {688 264 385 180} type Double box NO_BOX + class Fl_Group visible } { - Fl_Group partgroupui { + Fl_Group partgroupui {open xywh {0 0 385 180} code0 {if (part->Penabled==0) o->deactivate();} } { @@ -297,7 +296,7 @@ class PartUI {: {public Fl_Group} code1 {o->value(part->Pkeyshift-64);} } Fl_Scroll {} {open - xywh {166 91 125 60} box ENGRAVED_FRAME labelfont 1 labelsize 10 align 21 + xywh {166 91 125 49} box UP_BOX labelfont 1 labelsize 10 align 21 } { Fl_Pack {} {open xywh {171 96 115 35} type HORIZONTAL @@ -315,7 +314,7 @@ if (event==FL_RIGHT_MOUSE){ if (event==FL_LEFT_MOUSE) bankui->show(); else instrumenteditwindow->show(); };} - tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information} xywh {195 5 185 20} box THIN_DOWN_BOX down_box FLAT_BOX labelfont 1 labelsize 11 align 84 + tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information} xywh {195 5 185 20} box UP_FRAME down_box DOWN_FRAME labelfont 1 labelsize 11 align 84 code0 {o->label((char *)part->Pname);} } Fl_Box {} { @@ -369,7 +368,7 @@ if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED); Fl_Button {} { label Controllers callback {ctlwindow->show();} - xywh {295 90 85 30} box PLASTIC_UP_BOX labelfont 1 labelsize 11 + xywh {295 90 85 30} labelfont 1 labelsize 11 } Fl_Check_Button {} { label Portamento @@ -380,7 +379,7 @@ if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED); Fl_Button {} { label {Edit instrument} callback {instrumenteditwindow->show();} - xywh {15 90 130 30} box PLASTIC_UP_BOX color 230 labelfont 1 labelsize 13 + xywh {15 90 130 30} color 52 labelfont 1 labelsize 13 } Fl_Button {} { label m @@ -452,8 +451,8 @@ if (part->Penabled==0) partgroupui->deactivate(); } } Fl_Window ctlwindow { - label Controllers - private xywh {542 212 500 130} type Double hide + label Controllers open + private xywh {777 261 500 130} type Double box NO_BOX visible } { Fl_Check_Button {} { label Expr @@ -528,16 +527,16 @@ if (part->ctl.sustain.receive==0) { Fl_Button {} { label Close callback {ctlwindow->hide();} - xywh {330 105 95 20} box THIN_UP_BOX + xywh {400 107 95 20} box THIN_UP_BOX } Fl_Button {} { label {Reset all controllers} callback {part->SetController(C_resetallcontrollers,0);} - xywh {5 105 210 20} box THIN_UP_BOX + xywh {5 107 210 20} box THIN_UP_BOX } Fl_Group {} { label Portamento - xywh {280 15 160 90} box ENGRAVED_FRAME labelfont 1 labelsize 10 + xywh {280 15 160 90} box UP_FRAME labelsize 10 } { Fl_Check_Button {} { label Rcv @@ -604,19 +603,19 @@ else {propta->deactivate();proptb->deactivate();}} } Fl_Group {} { label Resonance - xywh {440 15 50 90} box ENGRAVED_BOX labelfont 1 labelsize 10 + xywh {445 15 50 90} box UP_FRAME labelsize 10 } { Fl_Dial {} { label BWdpth callback {part->ctl.resonancebandwidth.depth=(int) o->value();} - tooltip {BandWidth controller depth} xywh {450 60 25 25} labelsize 10 maximum 127 step 1 + tooltip {BandWidth controller depth} xywh {455 60 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancebandwidth.depth);} class WidgetPDial } Fl_Dial {} { label CFdpth callback {part->ctl.resonancecenter.depth=(int) o->value();} - tooltip {Center Frequency controller Depth} xywh {450 20 25 25} labelsize 10 maximum 127 step 1 + tooltip {Center Frequency controller Depth} xywh {455 20 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancecenter.depth);} class WidgetPDial } @@ -635,8 +634,8 @@ else {propta->deactivate();proptb->deactivate();}} } } Fl_Window partfx { - label {Part's Insert Effects} - private xywh {121 424 390 145} type Double hide + label {Part's Insert Effects} selected + private xywh {554 660 390 145} type Double box NO_BOX visible } { Fl_Counter inseffnocounter { label {FX No.} @@ -756,16 +755,16 @@ pthread_mutex_unlock(&master->mutex);} } } Fl_Window instrumentkitlist { - label {Instrument Kit} - xywh {113 324 670 370} type Double hide + label {Instrument Kit} open + xywh {586 566 670 370} type Double box NO_BOX visible } { Fl_Button {} { label {Close Window} callback {instrumentkitlist->hide();} xywh {375 350 160 20} box THIN_UP_BOX } - Fl_Scroll kitlist { - xywh {0 15 670 330} type VERTICAL box THIN_UP_BOX + Fl_Scroll kitlist {open + xywh {0 15 670 330} type VERTICAL box UP_FRAME code0 {if (part->Pkitmode==0) o->deactivate();} } { Fl_Pack {} { @@ -837,11 +836,11 @@ if (part->Pkitmode==0) { } } Fl_Window instrumenteditwindow { - label {Instrument Edit} - xywh {182 214 395 360} type Double hide + label {Instrument Edit} open + xywh {247 621 395 360} type Double box NO_BOX visible } { Fl_Group {} { - xywh {0 220 395 110} box ENGRAVED_FRAME + xywh {0 220 395 110} box UP_FRAME } { Fl_Group {} { label PADsynth @@ -850,7 +849,7 @@ if (part->Pkitmode==0) { Fl_Button padeditbutton { label Edit callback {showparameters(0,2);} - xywh {215 280 80 35} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {215 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Ppadenabled==0) o->deactivate();} } Fl_Check_Button padsynenabledcheck { @@ -859,7 +858,7 @@ if (part->Pkitmode==0) { part->kit[0].Ppadenabled=x; if (x==0) padeditbutton->deactivate(); else padeditbutton->activate();} - tooltip {enable/disable PADsynth} xywh {215 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable PADsynth} xywh {215 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Ppadenabled);} } } @@ -873,13 +872,13 @@ if (x==0) padeditbutton->deactivate(); part->kit[0].Padenabled=x; if (x==0) adeditbutton->deactivate(); else adeditbutton->activate();} - tooltip {enable/disable ADsynth} xywh {15 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable ADsynth} xywh {15 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Padenabled);} } Fl_Button adeditbutton { label Edit callback {showparameters(0,0);} - xywh {15 281 80 34} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Padenabled==0) o->deactivate();} } } @@ -893,29 +892,29 @@ if (x==0) adeditbutton->deactivate(); part->kit[0].Psubenabled=x; if (x==0) subeditbutton->deactivate(); else subeditbutton->activate();} - tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box PLASTIC_UP_BOX down_box DOWN_BOX color 222 selection_color 218 labelfont 1 labelsize 11 + tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 51 labelfont 1 labelsize 11 code1 {o->value(part->kit[0].Psubenabled);} } Fl_Button subeditbutton { label Edit callback {showparameters(0,1);} - xywh {115 280 80 35} box PLASTIC_UP_BOX color 222 selection_color 220 labelfont 1 labelsize 13 align 128 + xywh {115 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 code0 {if (part->kit[0].Psubenabled==0) o->deactivate();} } } Fl_Button {} { label {Kit Edit} callback {instrumentkitlist->show();} - xywh {310 245 80 35} box PLASTIC_UP_BOX color 238 selection_color 220 labelfont 1 align 128 + xywh {310 245 80 35} color 51 selection_color 51 labelfont 1 align 128 } Fl_Button {} { label Effects callback {partfx->show();} - xywh {310 290 80 35} box PLASTIC_UP_BOX color 230 labelfont 1 labelsize 13 + xywh {310 290 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 } } Fl_Group {} { - xywh {0 5 395 215} box ENGRAVED_FRAME + xywh {0 5 395 215} box UP_FRAME } { Fl_Input {} { label {Author and Copyright} diff --git a/src/UI/PresetsUI.fl b/src/UI/PresetsUI.fl @@ -39,7 +39,7 @@ pastewin->hide();delete(pastewin);} {} Function {make_window()} {} { Fl_Window copywin { label {Copy to Clipboard/Preset} - xywh {190 173 265 430} type Double box PLASTIC_THIN_UP_BOX color 238 hide modal + xywh {190 173 265 430} type Double box THIN_UP_BOX color 238 hide modal } { Fl_Browser copybrowse { callback {int val=o->value(); @@ -93,7 +93,7 @@ if (strlen(tmp)>0) { } Fl_Window pastewin { label {Paste from Clipboard/Preset} - xywh {463 173 265 430} type Double box PLASTIC_THIN_UP_BOX color 238 hide modal + xywh {463 173 265 430} type Double box THIN_UP_BOX color 238 hide modal } { Fl_Browser pastebrowse { callback {if (o->value()==0) { diff --git a/src/UI/ResonanceUI.fl b/src/UI/ResonanceUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0107 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -32,7 +32,7 @@ decl {\#include "WidgetPDial.h"} {public decl {\#include "PresetsUI.h"} {public } -class ResonanceGraph {: {public Fl_Box} +class ResonanceGraph {open : {public Fl_Box} } { Function {ResonanceGraph(int x,int y, int w, int h, const char *label=0):Fl_Box(x,y,w,h,label)} {} { code {respar=NULL; @@ -46,7 +46,8 @@ dbvalue=dbvalue_; oldx=-1; khzval=-1;} {} } - Function {draw_freq_line(float freq,int type)} {} { + Function {draw_freq_line(float freq,int type)} {open + } { code {float freqx=respar->getfreqpos(freq); switch(type){ case 0:fl_line_style(FL_SOLID);break; @@ -59,11 +60,12 @@ if ((freqx>0.0)&&(freqx<1.0)) fl_line(x()+(int) (freqx*w()),y(), x()+(int) (freqx*w()),y()+h());} {} } - Function {draw()} {} { + Function {draw()} {open + } { code {int ox=x(),oy=y(),lx=w(),ly=h(),i,ix,iy,oiy; float freqx; -fl_color(FL_BLACK); +fl_color(FL_DARK1); fl_rectf(ox,oy,lx,ly); @@ -106,14 +108,18 @@ for (i=1;i<GY;i++){ //draw the data fl_color(FL_RED); -fl_line_style(FL_SOLID); +fl_line_style(FL_SOLID,2); +fl_begin_line(); oiy=(int)(respar->Prespoints[0]/128.0*ly); for (i=1;i<N_RES_POINTS;i++){ ix=(int)(i*1.0/N_RES_POINTS*lx); - iy=(int)(respar->Prespoints[i]/128.0*ly); - fl_line(ox+ix-1,oy+ly-oiy,ox+ix,oy+ly-iy); + iy=(respar->Prespoints[i]/128.0*ly); + fl_vertex(ox+ix,oy+ly-oiy); oiy=iy; -};} {} +}; +fl_end_line(); +fl_line_style(FL_SOLID,0);} {selected + } } Function {handle(int event)} {return_type int } { @@ -189,7 +195,7 @@ class ResonanceUI {open : PresetsUI_ Function {make_window()} {open } { Fl_Window resonancewindow { - label Resonance selected + label Resonance open xywh {120 70 780 305} type Double hide } { Fl_Value_Output khzvalue { diff --git a/src/UI/SUBnoteUI.fl b/src/UI/SUBnoteUI.fl @@ -1,5 +1,5 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0105 +version 1.0110 header_name {.h} code_name {.cc} decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {} @@ -51,7 +51,7 @@ if (Fl::event_button1()) x=127-(int)o->value(); pars->Phmag[n]=x; if (pars->Phmag[n]==0) o->selection_color(0); else o->selection_color(222);} - tooltip {harmonic's magnitude} xywh {0 15 10 115} type {Vert Knob} box FLAT_BOX selection_color 222 labelcolor 0 maximum 127 step 1 value 127 + tooltip {harmonic's magnitude} xywh {0 15 10 115} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 127 code0 {o->value(127-pars->Phmag[n]);} code1 {if (pars->Phmag[n]==0) o->selection_color(0);} } @@ -92,8 +92,7 @@ end();} {} Function {refresh()} {} { code {mag->value(127-pars->Phmag[n]); if (pars->Phmag[n]==0) mag->selection_color(0); -bw->value(127-pars->Phrelbw[n]);} {selected - } +bw->value(127-pars->Phrelbw[n]);} {} } Function {~SUBnoteharmonic()} {} { code {harmonic->hide(); @@ -104,15 +103,17 @@ hide(); decl {int n;} {} } -class SUBnoteUI {: {public PresetsUI_} +class SUBnoteUI {open : {public PresetsUI_} } { - Function {make_window()} {} { + Function {make_window()} {open + } { Fl_Window SUBparameters { - label {SUBsynth Parameters} - xywh {26 214 735 390} type Double hide + label {SUBsynth Parameters} open + xywh {542 489 735 390} type Double visible } { Fl_Scroll {} { - xywh {5 140 435 245} type HORIZONTAL box THIN_UP_BOX + label scroll open + xywh {5 140 435 245} type HORIZONTAL box FLAT_BOX labeltype NO_LABEL } { Fl_Pack harmonics {open xywh {10 145 425 235} type HORIZONTAL @@ -126,18 +127,18 @@ class SUBnoteUI {: {public PresetsUI_} } Fl_Group {} { label AMPLITUDE - xywh {5 5 215 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {5 5 215 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Value_Slider vol { label Vol callback {pars->PVolume=(int)o->value();} - tooltip Volume xywh {10 25 140 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip Volume xywh {10 25 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PVolume);} } Fl_Value_Slider vsns { label {V.Sns} callback {pars->PAmpVelocityScaleFunction=(int) o->value();} - tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box FLAT_BOX labelsize 11 align 8 maximum 127 step 1 + tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 code0 {o->value(pars->PAmpVelocityScaleFunction);} } Fl_Dial pan { @@ -155,7 +156,7 @@ class SUBnoteUI {: {public PresetsUI_} } {} } Fl_Group {} { - xywh {495 325 235 35} box THIN_UP_FRAME + xywh {495 325 235 35} box UP_FRAME } { Fl_Counter filterstages { label {Filter Stages} @@ -169,23 +170,23 @@ class SUBnoteUI {: {public PresetsUI_} xywh {585 340 65 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11 code0 {o->value(pars->Phmagtype);} } { - menuitem {} { + MenuItem {} { label Linear xywh {20 20 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-40dB} xywh {30 30 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-60dB} xywh {40 40 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-80dB} xywh {50 50 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {-100dB} xywh {60 60 100 20} labelfont 1 labelsize 11 } @@ -196,15 +197,15 @@ class SUBnoteUI {: {public PresetsUI_} xywh {670 340 50 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11 code0 {o->value(pars->Pstart);} } { - menuitem {} { + MenuItem {} { label Zero xywh {30 30 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label RND xywh {40 40 100 20} labelfont 1 labelsize 11 } - menuitem {} { + MenuItem {} { label {Max.} xywh {50 50 100 20} labelfont 1 labelsize 11 } @@ -212,7 +213,7 @@ class SUBnoteUI {: {public PresetsUI_} } Fl_Group freqsettingsui { label FREQUENCY - xywh {440 5 290 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {440 5 290 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Group freqenvelopegroup { label {SUBsynth - Frequency Envelope} open @@ -255,7 +256,7 @@ pars->PCoarseDetune = k+ Fl_Slider detune { callback {pars->PDetune=(int)o->value()+8192; detunevalueoutput->do_callback();} - tooltip {Fine Detune (cents)} xywh {495 25 230 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1 + tooltip {Fine Detune (cents)} xywh {495 25 230 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 code0 {o->value(pars->PDetune-8192);} } Fl_Value_Output detunevalueoutput { @@ -292,8 +293,8 @@ detunevalueoutput->do_callback();} open } Fl_Check_Button stereo { label Stereo - callback {pars->Pstereo=(int) o->value();} - xywh {440 325 55 35} box THIN_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 10 + callback {pars->Pstereo=(int) o->value();} selected + xywh {440 325 55 35} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(pars->Pstereo);} } Fl_Button {} { @@ -311,7 +312,7 @@ SUBparameters->redraw();} } Fl_Group bandwidthsettingsui { label BANDWIDTH - xywh {220 5 220 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 + xywh {220 5 220 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17 } { Fl_Group bandwidthenvelopegroup { label {SUBsynth - BandWidth Envelope} open @@ -333,19 +334,19 @@ bandwidthsettingsui->redraw();} Fl_Value_Slider bandwidth { label {Band Width} callback {pars->Pbandwidth=(int) o->value();} - xywh {225 40 115 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 maximum 127 step 1 + xywh {225 40 115 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 maximum 127 step 1 code0 {o->value(pars->Pbandwidth);} } Fl_Value_Slider bwidthscale { label {B.Width Scale} callback {pars->Pbwscale=(int) o->value()+64;} - tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1 + tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1 code0 {o->value(pars->Pbwscale-64);} } } Fl_Group globalfiltergroup { label FILTER - xywh {440 140 290 185} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 + xywh {440 140 290 185} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 code0 {if (pars->PGlobalFilterEnabled==0) o->deactivate();} } { Fl_Group filterenv { @@ -356,7 +357,7 @@ bandwidthsettingsui->redraw();} } {} Fl_Group filterui { label {SUBsynthl - Filter} open - xywh {445 170 275 75} box FLAT_BOX color 50 align 144 + xywh {445 165 275 75} box FLAT_BOX color 50 align 144 code0 {o->init(pars->GlobalFilter,&pars->PGlobalFilterVelocityScale,&pars->PGlobalFilterVelocityScaleFunction);} class FilterUI } {} diff --git a/src/UI/VirKeyboard.fl b/src/UI/VirKeyboard.fl @@ -21,12 +21,20 @@ decl {\#include "../globals.h"} {public decl {\#include "../Misc/Master.h"} {public } -decl {\#include "../Misc/Util.h"} {selected public +decl {\#include "../Misc/Util.h"} {public } decl {\#include "WidgetPDial.h"} {public } +decl {\#include "common.H"} {public +} + +decl {\#ifdef NTK_GUI + \#include "FL/Fl_Shared_Image.H" + \#endif} {public +} + decl {const int keyspos[12]={0,-1,1,-2,2,3,-4,4,-5,5,-6,6};} {} decl {const int keysoct1qwerty[]={'q','2','w','3','e','r','5','t','6','y','7','u','i','9','o','0','p','[','=',']','\\\\',FL_Enter,0};} {} @@ -67,6 +75,52 @@ rndvelocity=0;} {} Function {draw()} {} { code {int ox=x(),oy=y(),lx=w(),ly=h()-1,i; +\#ifdef NTK_GUI + Fl_Image *white_up = Fl_Shared_Image::get( PIXMAP_PATH "white_key.png" ); + Fl_Image *white_down = Fl_Shared_Image::get( PIXMAP_PATH "white_key_pressed.png" ); + Fl_Image *black_up = Fl_Shared_Image::get( PIXMAP_PATH "black_key.png" ); + Fl_Image *black_down = Fl_Shared_Image::get( PIXMAP_PATH "black_key_pressed.png" ); + + +//On error fetch everything from source directory +if(!(white_up&&white_down&&black_up&&black_down)) { + white_up = Fl_Shared_Image::get(SOURCE_DIR "/../../pixmaps/white_key.png"); + white_down = Fl_Shared_Image::get(SOURCE_DIR "/../../pixmaps/white_key_pressed.png"); + black_up = Fl_Shared_Image::get(SOURCE_DIR "/../../pixmaps/black_key.png"); + black_down = Fl_Shared_Image::get(SOURCE_DIR "/../../pixmaps/black_key_pressed.png"); +} + +Fl_Image *key; + +for (i=0;i<N_OCT*12;i++) { + int noct=i/12; + int kv=keyspos[i%12]; + + if (kv>=0){//white keys + if (pressed[i]==0) + key = white_up; + else + key = white_down; + + key->draw( ox + (kv + 7 * noct ) * white_up->w() + 3, oy ); + } +} + +for (i=0;i<N_OCT*12;i++){ + int noct=i/12; + int kv=keyspos[i%12]; + + if ( kv < 0 ) { + kv=keyspos[(i+1)%12]; + if (pressed[i]==0) + key = black_up; + else + key = black_down; + + key->draw( ox + (kv + 7 * noct ) * white_up->w() - black_up->w() / 2 + 2, oy ); + } +} +\#else if (damage()!=1){ fl_color(250,240,230); fl_rectf(ox,oy,lx,ly); @@ -80,8 +134,8 @@ if (damage()!=1){ if ((ik==1)||(ik==2)||(ik==4)||(ik==5)||(ik==6)) fl_rectf(ox+i*SIZE_WHITE-SIZE_BLACK/2,oy, SIZE_BLACK+1,ly*3/5); - }; -}; + } +} for (i=0;i<N_OCT*12;i++){ @@ -101,8 +155,9 @@ for (i=0;i<N_OCT*12;i++){ else fl_color(FL_BLUE); fl_rectf(ox+(kv+7*noct)*SIZE_WHITE-SIZE_BLACK/2+2,oy+2, SIZE_BLACK-3,ly*3/5-5); - }; -};} {} + } +} +\#endif} {} } Function {handle(int event)} {return_type int } { @@ -237,13 +292,15 @@ pthread_mutex_unlock(&master->mutex);} {} } } -class VirKeyboard {} { - Function {make_window()} {} { +class VirKeyboard {open +} { + Function {make_window()} {open + } { Fl_Window virkeyboardwindow { label {Virtual Keyboard - ZynAddSubFX} callback {relaseallkeys(); -virkeyboardwindow->hide();} - xywh {95 563 650 130} type Double hide +virkeyboardwindow->hide();} open + xywh {100 597 650 130} type Double visible } { Fl_Box virkeys { label Keyboard @@ -270,8 +327,8 @@ virkeys->take_focus();} Fl_Value_Slider {} { label Vel callback {virkeys->midivel=(int) o->value(); -virkeys->take_focus();} - tooltip Velocity xywh {95 105 100 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 5 minimum 1 maximum 127 step 1 +virkeys->take_focus();} selected + tooltip Velocity xywh {95 105 100 15} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum 1 maximum 127 step 1 code0 {o->value(virkeys->midivel);} } Fl_Counter {} { @@ -378,7 +435,7 @@ virkeys->take_focus();} master->setController(virkeys->midich,C_pitchwheel,-(int) o->value()); pthread_mutex_unlock(&master->mutex); virkeys->take_focus();} - tooltip {Pitch Wheel} xywh {625 10 20 95} box PLASTIC_UP_BOX labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 + tooltip {Pitch Wheel} xywh {625 10 20 95} labelsize 8 align 1 when 3 minimum -8192 maximum 8192 step 64 } Fl_Button {} { label R diff --git a/src/UI/WidgetPDial.cpp b/src/UI/WidgetPDial.cpp @@ -81,7 +81,7 @@ void TipWin::redraw() { // Recalc size of window fl_font(labelfont(), labelsize()); - int W=0, H=0; + int W = 0, H = 0; fl_measure(getStr(), W, H, 0); //provide a bit of extra space W += 8; @@ -115,6 +115,9 @@ WidgetPDial::~WidgetPDial() int WidgetPDial::handle(int event) { +#ifdef NTK_GUI + return Fl_Dial::handle( event ); +#else double dragsize, min = minimum(), max = maximum(); int my; @@ -153,30 +156,42 @@ int WidgetPDial::handle(int event) break; } return 0; +#endif } void WidgetPDial::drawgradient(int cx, int cy, int sx, double m1, double m2) { +#ifdef NTK_GUI + return; +#else for(int i = (int)(m1 * sx); i < (int)(m2 * sx); i++) { double tmp = 1.0f - powf(i * 1.0f / sx, 2.0f); pdialcolor(140 + (int) (tmp * 90), 140 + (int)(tmp * 90), 140 + (int) (tmp * 100)); - fl_arc(cx + sx / 2 - i / 2, cy + sx / 2 - i / 2, i, i, 0, 360); + fl_arc(cx + sx / 2 - i / 2, cy + sx / 2 - i / 2, i, i, 0, 360 ); } +#endif } void WidgetPDial::draw() { +#ifdef NTK_GUI + box( FL_NO_BOX ); + + Fl_Dial::draw(); + + return; +#else int cx = x(), cy = y(), sx = w(), sy = h(); //clears the button face pdialcolor(190, 190, 200); fl_pie(cx - 1, cy - 1, sx + 2, sy + 2, 0, 360); - //Draws the button face (gradinet) - drawgradient(cx, cy, sx, 0.5f, 1.0f); + /* //Draws the button face (gradinet) */ + drawgradient(cx, cy, sx, 0.5f, 1.0f); double val = (value() - minimum()) / (maximum() - minimum()); @@ -190,6 +205,8 @@ void WidgetPDial::draw() drawgradient(cx, cy, sx, 0.0f, 0.75f); + + //draws the value double a = -(a2 - a1) * val - a1; @@ -220,6 +237,7 @@ void WidgetPDial::draw() fl_end_polygon(); fl_pop_matrix(); +#endif } void WidgetPDial::pdialcolor(int r, int g, int b) diff --git a/src/UI/common.H b/src/UI/common.H @@ -0,0 +1,29 @@ + +/*******************************************************************************/ +/* Copyright (C) 2012 Jonathan Moore Liles */ +/* */ +/* 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; see the file COPYING. If not,write to the Free Software */ +/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/*******************************************************************************/ + +class Fl_Widget; +extern void set_module_parameters ( Fl_Widget * ); + +#ifdef FLTK_GUI +#define fl_color_add_alpha( x,y ) x +#undef FL_NO_BOX +#undef FL_UP_FRAME +#define FL_NO_BOX FL_FLAT_BOX +#define FL_UP_FRAME FL_UP_BOX +#endif diff --git a/src/globals.h b/src/globals.h @@ -156,12 +156,12 @@ #define ZERO(data, size) {char *data_ = (char *) data; for(int i = 0; \ i < size; \ i++) \ - data_[i] = 0;} + data_[i] = 0; } #define ZERO_float(data, size) {float *data_ = (float *) data; \ for(int i = 0; \ i < size; \ i++) \ - data_[i] = 0.0f;} + data_[i] = 0.0f; } enum ONOFFTYPE { OFF = 0, ON = 1 @@ -169,8 +169,8 @@ enum ONOFFTYPE { enum MidiControllers { C_bankselectmsb = 0, C_pitchwheel = 1000, C_NULL = 1001, - C_expression = 11, C_panning = 10, C_bankselectlsb = 32, - C_filtercutoff = 74, C_filterq = 71, C_bandwidth = 75, C_modwheel = 1, + C_expression = 11, C_panning = 10, C_bankselectlsb = 32, + C_filtercutoff = 74, C_filterq = 71, C_bandwidth = 75, C_modwheel = 1, C_fmamp = 76, C_volume = 7, C_sustain = 64, C_allnotesoff = 123, C_allsoundsoff = 120, C_resetallcontrollers = 121, @@ -201,8 +201,7 @@ enum LegatoMsg { #endif //temporary include for synth->{samplerate/buffersize} members -struct SYNTH_T -{ +struct SYNTH_T { SYNTH_T(void) :samplerate(44100), buffersize(256), oscilsize(1024) { @@ -220,14 +219,14 @@ struct SYNTH_T * If you increase this you'll ecounter big latencies, but if you * decrease this the CPU requirements gets high. */ - int buffersize; + int buffersize; /** * The size of ADnote Oscillator * Decrease this => poor quality * Increase this => CPU requirements gets high (only at start of the note) */ - int oscilsize; + int oscilsize; //Alias for above terms float samplerate_f; @@ -239,9 +238,9 @@ struct SYNTH_T inline void alias(void) { halfsamplerate_f = (samplerate_f = samplerate) / 2.0f; - buffersize_f = buffersize; - bufferbytes = buffersize * sizeof(float); - oscilsize_f = oscilsize; + buffersize_f = buffersize; + bufferbytes = buffersize * sizeof(float); + oscilsize_f = oscilsize; } float numRandom(void) const; //defined in Util.cpp for now }; diff --git a/src/main.cpp b/src/main.cpp @@ -20,6 +20,10 @@ */ +#include <FL/Fl.H> + +#include "UI/common.H" + #include <iostream> #include <cmath> #include <cctype> @@ -31,12 +35,14 @@ #include <getopt.h> +#include "DSP/FFTwrapper.h" #include "Misc/Master.h" #include "Misc/Part.h" #include "Misc/Util.h" #include "Misc/Dump.h" extern Dump dump; + //Nio System #include "Nio/Nio.h" @@ -48,8 +54,12 @@ extern Dump dump; QApplication *app; #elif defined FLTK_GUI - #include "UI/MasterUI.h" +#elif defined NTK_GUI +#include "UI/MasterUI.h" +#include <FL/Fl_Shared_Image.H> +#include <FL/Fl_Tiled_Image.H> +#include <FL/Fl_Dial.H> #endif // FLTK_GUI MasterUI *ui; @@ -58,63 +68,25 @@ MasterUI *ui; using namespace std; -pthread_t thr3, thr4; +pthread_t thr4; Master *master; SYNTH_T *synth; int swaplr = 0; //1 for left-right swapping +int Pexitprogram = 0; //if the UI set this to 1, the program will exit + #if LASH #include "Misc/LASHClient.h" LASHClient *lash = NULL; #endif -int Pexitprogram = 0; //if the UI set this to 1, the program will exit - -/* - * User Interface thread - */ -void *thread3(void *v) -{ -#ifndef DISABLE_GUI - -#ifdef FLTK_GUI - - if(v) - fl_alert("Default IO did not initialize.\nDefaulting to NULL backend."); - ui = new MasterUI(master, &Pexitprogram); - ui->showUI(); - - while(Pexitprogram == 0) { -#if LASH - string filename; - switch(lash->checkevents(filename)) { - case LASHClient::Save: - ui->do_save_master(filename.c_str()); - lash->confirmevent(LASHClient::Save); - break; - case LASHClient::Restore: - ui->do_load_master(filename.c_str()); - lash->confirmevent(LASHClient::Restore); - break; - case LASHClient::Quit: - Pexitprogram = 1; - default: - break; - } -#endif //LASH - Fl::wait(0.1f); - } +#if USE_NSM +#include "UI/NSM.H" -#elif defined QT_GUI - app = new QApplication(0, 0); - ui = new MasterUI(master, 0); - ui->show(); - app->exec(); -#endif //defined QT_GUI +NSM_Client *nsm = 0; +#endif -#endif //DISABLE_GUI - return 0; -} +char *instance_name = 0; void exitprogram(); @@ -122,27 +94,43 @@ void exitprogram(); void sigterm_exit(int /*sig*/) { Pexitprogram = 1; - sleep(1); - exitprogram(); - exit(0); } +#ifndef DISABLE_GUI + +#ifdef NTK_GUI +static Fl_Tiled_Image *module_backdrop; +#endif + +void +set_module_parameters ( Fl_Widget *o ) +{ +#ifdef NTK_GUI + o->box( FL_DOWN_FRAME ); + o->align( o->align() | FL_ALIGN_IMAGE_BACKDROP ); + o->color( FL_BLACK ); + o->image( module_backdrop ); + o->labeltype( FL_SHADOW_LABEL ); +#else + o->box( FL_PLASTIC_UP_BOX ); + o->color( FL_CYAN ); + o->labeltype( FL_EMBOSSED_LABEL ); +#endif +} +#endif + /* * Program initialisation */ -void initprogram(int argc, char **argv) +void initprogram(void) { -#if LASH - lash = new LASHClient(&argc, &argv); -#endif - cerr.precision(1); cerr << std::fixed; cerr << "\nSample Rate = \t\t" << synth->samplerate << endl; cerr << "Sound Buffer Size = \t" << synth->buffersize << " samples" << endl; - cerr << "Internal latency = \t" << synth->buffersize_f * 1000.0f / - synth->samplerate_f << " ms" << endl; + cerr << "Internal latency = \t" << synth->buffersize_f * 1000.0f + / synth->samplerate_f << " ms" << endl; cerr << "ADsynth Oscil.Size = \t" << synth->oscilsize << " samples" << endl; @@ -167,12 +155,18 @@ void exitprogram() #ifndef DISABLE_GUI delete ui; #endif - #if LASH - delete lash; + if(lash) + delete lash; +#endif +#if USE_NSM + if(nsm) + delete nsm; #endif delete [] denormalkillbuf; + FFT_cleanup(); + Master::deleteInstance(); } int main(int argc, char *argv[]) @@ -194,7 +188,9 @@ int main(int argc, char *argv[]) synth->samplerate = config.cfg.SampleRate; synth->buffersize = config.cfg.SoundBufferSize; synth->oscilsize = config.cfg.OscilSize; - swaplr = config.cfg.SwapStereo; + swaplr = config.cfg.SwapStereo; + + Nio::preferedSampleRate(synth->samplerate); synth->alias(); //build aliases @@ -233,7 +229,7 @@ int main(int argc, char *argv[]) "help", 2, NULL, 'h' }, { - "version",2,NULL,'v' + "version", 2, NULL, 'v' }, { "named", 1, NULL, 'N' @@ -286,12 +282,12 @@ int main(int argc, char *argv[]) case 'v': exitwithversion = 1; break; - case 'Y':/* this command a dummy command (has NO effect) - and is used because I need for NSIS installer - (NSIS sometimes forces a command line for a - program, even if I don't need that; eg. when - I want to add a icon to a shortcut. - */ + case 'Y': /* this command a dummy command (has NO effect) + and is used because I need for NSIS installer + (NSIS sometimes forces a command line for a + program, even if I don't need that; eg. when + I want to add a icon to a shortcut. + */ break; case 'U': noui = 1; @@ -324,7 +320,8 @@ int main(int argc, char *argv[]) if(synth->oscilsize < MAX_AD_HARMONICS * 2) synth->oscilsize = MAX_AD_HARMONICS * 2; synth->oscilsize = - (int) powf(2, ceil(logf(synth->oscilsize - 1.0f) / logf(2.0f))); + (int) powf(2, + ceil(logf(synth->oscilsize - 1.0f) / logf(2.0f))); if(tmp != synth->oscilsize) cerr << @@ -396,21 +393,7 @@ int main(int argc, char *argv[]) for(int i = 0; i < synth->buffersize; ++i) denormalkillbuf[i] = (RND - 0.5f) * 1e-16; - initprogram(argc, argv); - -#if 0 //TODO update this code -#ifdef USE_LASH -#ifdef ALSAMIDIIN - ALSAMidiIn *alsamidi = dynamic_cast<ALSAMidiIn *>(Midi); - if(alsamidi) - lash->setalsaid(alsamidi->getalsaid()); -#endif -#ifdef JACKAUDIOOUT - lash->setjackname(JACKgetname()); -#endif -#endif -#endif - + initprogram(); if(!loadfile.empty()) { int tmp = master->loadXML(loadfile.c_str()); @@ -443,11 +426,6 @@ int main(int argc, char *argv[]) //Run the Nio system bool ioGood = Nio::start(); -#ifndef DISABLE_GUI - if(noui == 0) - pthread_create(&thr3, NULL, thread3, (void *)!ioGood); -#endif - if(!execAfterInit.empty()) { cout << "Executing user supplied command: " << execAfterInit << endl; if(system(execAfterInit.c_str()) == -1) @@ -455,9 +433,114 @@ int main(int argc, char *argv[]) } - //TODO look into a conditional variable here, it seems to match usage +#ifndef DISABLE_GUI + +#ifdef NTK_GUI + fl_register_images(); + + Fl_Dial::default_style(Fl_Dial::PIXMAP_DIAL); + + if(Fl_Shared_Image *img = Fl_Shared_Image::get(PIXMAP_PATH "/knob.png")) + Fl_Dial::default_image(img); + else + Fl_Dial::default_image(Fl_Shared_Image::get(SOURCE_DIR "/../pixmaps/knob.png")); + + if(Fl_Shared_Image *img = Fl_Shared_Image::get(PIXMAP_PATH "/window_backdrop.png")) + Fl::scheme_bg(new Fl_Tiled_Image(img)); + else + Fl::scheme_bg(new Fl_Tiled_Image(Fl_Shared_Image::get(SOURCE_DIR "/../pixmaps/window_backdrop.png"))); + + if(Fl_Shared_Image *img = Fl_Shared_Image::get(PIXMAP_PATH "/module_backdrop.png")) + module_backdrop = new Fl_Tiled_Image(img); + else + module_backdrop = new Fl_Tiled_Image(Fl_Shared_Image::get(SOURCE_DIR "/../pixmaps/module_backdrop.png")); + + Fl::background( 50, 50, 50 ); + Fl::background2( 70, 70, 70 ); + Fl::foreground( 255,255,255 ); +#endif + + ui = new MasterUI(master, &Pexitprogram); + + if ( !noui) + { + ui->showUI(); + + if(!ioGood) + fl_alert( + "Default IO did not initialize.\nDefaulting to NULL backend."); + } + +#endif + +#ifndef DISABLE_GUI +#if USE_NSM + char *nsm_url = getenv("NSM_URL"); + + if(nsm_url) { + nsm = new NSM_Client; + + if(!nsm->init(nsm_url)) + nsm->announce("ZynAddSubFX", ":switch:", argv[0]); + else { + delete nsm; + nsm = NULL; + } + } +#endif +#endif + +#if USE_NSM + if(!nsm) +#endif + { +#if LASH + lash = new LASHClient(&argc, &argv); +#ifndef DISABLE_GUI + ui->sm_indicator1->value(1); + ui->sm_indicator2->value(1); + ui->sm_indicator1->tooltip("LASH"); + ui->sm_indicator2->tooltip("LASH"); +#endif +#endif + } + while(Pexitprogram == 0) { +#ifndef DISABLE_GUI +#if USE_NSM + if(nsm) { + nsm->check(); + goto done; + } +#endif +#if LASH + { + string filename; + switch(lash->checkevents(filename)) { + case LASHClient::Save: + ui->do_save_master(filename.c_str()); + lash->confirmevent(LASHClient::Save); + break; + case LASHClient::Restore: + ui->do_load_master(filename.c_str()); + lash->confirmevent(LASHClient::Restore); + break; + case LASHClient::Quit: + Pexitprogram = 1; + default: + break; + } + } +#endif //LASH + +#if USE_NSM +done: +#endif + + Fl::wait(0.02f); +#else usleep(100000); +#endif } exitprogram(); diff --git a/src/zynaddsubfx_icon.svg b/src/zynaddsubfx_icon.svg @@ -1,286 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" -"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - id="svg1" - sodipodi:version="0.32" - inkscape:version="0.39" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:cc="http://web.resource.org/cc/" - xmlns:dc="http://purl.org/dc/elements/1.1/" - width="210mm" - height="297mm" - sodipodi:docbase="/home/nop" - sodipodi:docname="zynaddsubfx.svg"> - <defs - id="defs3"> - <linearGradient - id="linearGradient4809"> - <stop - style="stop-color:#d5d8db;stop-opacity:1.0000000;" - offset="0.0000000" - id="stop4810" /> - <stop - style="stop-color:#6d8ec2;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop4811" /> - </linearGradient> - <linearGradient - id="linearGradient4179"> - <stop - style="stop-color:#bec8c6;stop-opacity:1.0000000;" - offset="0.0000000" - id="stop4180" /> - <stop - style="stop-color:#bbcac9;stop-opacity:1.0000000;" - offset="0.59527779" - id="stop4182" /> - <stop - style="stop-color:#879797;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop4181" /> - </linearGradient> - <linearGradient - id="linearGradient4038"> - <stop - style="stop-color:#4a8a61;stop-opacity:1.0000000;" - offset="0.0000000" - id="stop4039" /> - <stop - style="stop-color:#557c7d;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop4040" /> - </linearGradient> - <linearGradient - id="linearGradient2162"> - <stop - style="stop-color:#549c6d;stop-opacity:1.0000000;" - offset="0.0000000" - id="stop2163" /> - <stop - style="stop-color:#679697;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop2164" /> - </linearGradient> - <linearGradient - id="linearGradient2158"> - <stop - style="stop-color:#dbdbdb;stop-opacity:1.0000000;" - offset="0.0000000" - id="stop2159" /> - <stop - style="stop-color:#a1aec2;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop2160" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2158" - id="radialGradient2165" - cx="0.15540540" - cy="0.21093750" - r="0.97186714" - fx="0.14189187" - fy="0.20312500" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4038" - id="linearGradient4043" - x1="-0.042253520" - y1="0.50000000" - x2="0.92957747" - y2="0.25781250" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient4809" - id="radialGradient4184" - cx="0.25423729" - cy="0.34375000" - r="0.69531035" - fx="0.26271194" - fy="0.33593792" - spreadMethod="pad" - gradientUnits="objectBoundingBox" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="0.15349816" - inkscape:cx="305.25996" - inkscape:cy="588.90466" - inkscape:window-width="812" - inkscape:window-height="582" - inkscape:window-x="100" - inkscape:window-y="50" - showguides="true" - inkscape:guide-bbox="true" /> - <metadata - id="metadata4"> - <rdf:RDF - id="RDF5"> - <cc:Work - rdf:about="" - id="Work6"> - <dc:format - id="format7">image/svg+xml</dc:format> - <dc:type - id="type9" - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <rect - style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:2.1387453pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect2793" - width="497.32657" - height="497.92426" - x="135.99535" - y="56.972706" - rx="10.000000" - ry="10.000001" /> - <rect - style="fill:url(#radialGradient2165);fill-opacity:0.75000000;fill-rule:evenodd;stroke:#c7ffc7;stroke-width:2.6750000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" - id="rect1532" - width="497.32657" - height="497.92426" - x="128.79752" - y="48.335308" - rx="10.000000" - ry="10.000001" /> - <g - id="g4871" - transform="matrix(1.000000,0.000000,0.000000,0.721530,4.071710,-76.99862)"> - <rect - style="fill:url(#linearGradient4043);fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.5086593pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect2794" - width="374.55670" - height="328.96643" - x="144.30453" - y="199.03429" - rx="10.000001" - ry="13.859430" /> - <path - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#fafafa;stroke-width:20.000000;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" - d="M 153.53968,361.37008 C 224.07845,562.90944 263.89796,571.59568 330.99807,367.47765 C 397.67095,164.65924 435.24317,161.86656 507.22152,367.72463" - id="path4175" - sodipodi:nodetypes="czc" /> - <path - style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:7.3750000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" - d="M 145.99255,362.80964 C 515.96124,362.80964 515.36495,364.24921 515.36495,364.24921" - id="path4176" - sodipodi:nodetypes="cc" /> - </g> - <g - id="g4852" - transform="matrix(-1.360555,0.352222,-0.352222,-1.360555,324.1433,630.0333)"> - <path - sodipodi:type="arc" - style="fill:url(#radialGradient4184);fill-opacity:0.75000000;fill-rule:evenodd;stroke:none;stroke-width:1.2507370;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" - id="path4853" - sodipodi:cx="16.555019" - sodipodi:cy="147.59439" - sodipodi:rx="46.785923" - sodipodi:ry="43.906792" - d="M 63.340942 147.59439 A 46.785923 43.906792 0 1 0 -30.230904,147.59439 A 46.785923 43.906792 0 1 0 63.340942 147.59439 z" - transform="matrix(1.045432,0.000000,0.000000,1.113986,-125.3003,-37.14836)" /> - <path - sodipodi:type="arc" - style="fill:none;fill-opacity:0.087719269;fill-rule:evenodd;stroke:#000000;stroke-width:11.857302;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:11.857302 23.714604 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;" - id="path4854" - sodipodi:cx="16.555019" - sodipodi:cy="147.59439" - sodipodi:rx="46.785923" - sodipodi:ry="43.906792" - d="M 63.340942 147.59439 A 46.785923 43.906792 0 1 0 -30.230904,147.59439 A 46.785923 43.906792 0 1 0 63.340942 147.59439 z" - transform="matrix(1.162718,0.507361,-0.579194,1.268918,-39.94742,-66.78193)" /> - <path - style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - d="M -108.49675,123.27211 C -71.611637,112.47038 -68.592698,110.81196 -68.592698,110.81196 L -102.05452,134.07127 L -108.49675,123.27211 z " - id="path4855" - sodipodi:nodetypes="cccc" /> - </g> - <g - id="g4864" - transform="matrix(0.687211,0.000000,0.000000,0.854478,627.1311,-28.81607)"> - <rect - style="fill:#000000;fill-opacity:0.75000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4856" - width="110.64801" - height="545.60913" - x="-136.40228" - y="109.76131" /> - <rect - style="fill:#00bc1a;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4857" - width="39.393082" - height="442.41235" - x="-128.61479" - y="205.44652" /> - <rect - style="fill:#00bc1a;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4858" - width="37.357227" - height="525.88245" - x="-74.664627" - y="120.64261" /> - <rect - style="fill:#000000;fill-opacity:0.17543860;fill-rule:evenodd;stroke:none;stroke-width:0.91707621pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4860" - width="95.883904" - height="12.215130" - x="-128.35823" - y="221.73334" /> - <rect - style="fill:#000000;fill-opacity:0.17543860;fill-rule:evenodd;stroke:none;stroke-width:0.91707621pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4862" - width="95.883904" - height="12.215130" - x="-129.37616" - y="563.75702" /> - <rect - style="fill:#000000;fill-opacity:0.17543860;fill-rule:evenodd;stroke:none;stroke-width:0.91707621pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - id="rect4863" - width="95.883904" - height="12.215130" - x="-127.34029" - y="386.63760" /> - </g> - <g - id="g4875" - transform="matrix(-1.360555,0.352222,-0.352222,-1.360555,130.9140,634.1877)"> - <path - sodipodi:type="arc" - style="fill:url(#radialGradient4184);fill-opacity:0.75000000;fill-rule:evenodd;stroke:none;stroke-width:1.2507370;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;" - id="path4876" - sodipodi:cx="16.555019" - sodipodi:cy="147.59439" - sodipodi:rx="46.785923" - sodipodi:ry="43.906792" - d="M 63.340942 147.59439 A 46.785923 43.906792 0 1 0 -30.230904,147.59439 A 46.785923 43.906792 0 1 0 63.340942 147.59439 z" - transform="matrix(1.045432,0.000000,0.000000,1.113986,-125.3003,-37.14836)" /> - <path - sodipodi:type="arc" - style="fill:none;fill-opacity:0.087719269;fill-rule:evenodd;stroke:#000000;stroke-width:11.857302;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dasharray:11.857302 23.714604 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;" - id="path4877" - sodipodi:cx="16.555019" - sodipodi:cy="147.59439" - sodipodi:rx="46.785923" - sodipodi:ry="43.906792" - d="M 63.340942 147.59439 A 46.785923 43.906792 0 1 0 -30.230904,147.59439 A 46.785923 43.906792 0 1 0 63.340942 147.59439 z" - transform="matrix(1.162718,0.507361,-0.579194,1.268918,-39.94742,-66.78193)" /> - <path - style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;" - d="M -108.49675,123.27211 C -71.611637,112.47038 -68.592698,110.81196 -68.592698,110.81196 L -102.05452,134.07127 L -108.49675,123.27211 z " - id="path4878" - sodipodi:nodetypes="cccc" /> - </g> -</svg> diff --git a/style.sh b/style.sh @@ -1,3 +1,6 @@ #!/bin/sh uncrustify -c style.cfg --no-backup -l CPP `find . | grep -e "\.h$"` uncrustify -c style.cfg --no-backup -l CPP `find . | grep -e "\.cpp$"` +#cover nsm code +uncrustify -c style.cfg --no-backup -l CPP `find . | grep -e "\.H$"` +uncrustify -c style.cfg --no-backup -l CPP `find . | grep -e "\.C$"` diff --git a/zynaddsubfx-alsa.desktop b/zynaddsubfx-alsa.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=ZynAddSubFX - Alsa +Comment=A powerful realtime software synthesizer +Exec=zynaddsubfx -I alsa -O alsa +Icon=zynaddsubfx +Terminal=false +Type=Application +Categories=Application;AudioVideo; diff --git a/zynaddsubfx-jack.desktop b/zynaddsubfx-jack.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=ZynAddSubFX - Jack +Comment=A powerful realtime software synthesizer +Exec=zynaddsubfx -I jack -O jack +Icon=zynaddsubfx +Terminal=false +Type=Application +Categories=Application;AudioVideo; diff --git a/zynaddsubfx_icon.ico b/zynaddsubfx.ico Binary files differ. diff --git a/zynaddsubfx.svg b/zynaddsubfx.svg @@ -0,0 +1,313 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg1" + sodipodi:version="0.32" + inkscape:version="0.48.2 r9819" + width="507.1875" + height="509.21875" + sodipodi:docname="zynaddsubfx_icon.svg" + version="1.1"> + <defs + id="defs3"> + <linearGradient + id="linearGradient4809"> + <stop + style="stop-color:#d5d8db;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop4810" /> + <stop + style="stop-color:#6d8ec2;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop4811" /> + </linearGradient> + <linearGradient + id="linearGradient4179"> + <stop + style="stop-color:#bec8c6;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop4180" /> + <stop + style="stop-color:#bbcac9;stop-opacity:1.0000000;" + offset="0.59527779" + id="stop4182" /> + <stop + style="stop-color:#879797;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop4181" /> + </linearGradient> + <linearGradient + id="linearGradient4038"> + <stop + style="stop-color:#4a8a61;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop4039" /> + <stop + style="stop-color:#557c7d;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop4040" /> + </linearGradient> + <linearGradient + id="linearGradient2162"> + <stop + style="stop-color:#549c6d;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop2163" /> + <stop + style="stop-color:#679697;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop2164" /> + </linearGradient> + <linearGradient + id="linearGradient2158"> + <stop + style="stop-color:#dbdbdb;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop2159" /> + <stop + style="stop-color:#a1aec2;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop2160" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2158" + id="radialGradient2165" + cx="205.28555" + cy="152.50184" + r="486.22545" + fx="198.52472" + fy="148.59325" + gradientTransform="matrix(0.99940285,0,0,1.0005975,-127.46875,-47)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4038" + id="linearGradient4043" + x1="119.48864" + y1="387.75519" + x2="462.45943" + y2="302.28432" + gradientTransform="scale(1.0666754,0.9374923)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4809" + id="radialGradient4184" + cx="-6.2401056" + cy="138.19312" + r="63.0278" + fx="-5.4719041" + fy="137.48498" + spreadMethod="pad" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.0322663,0.96874227)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4809" + id="radialGradient3021" + gradientUnits="userSpaceOnUse" + spreadMethod="pad" + cx="-6.2401056" + cy="138.19312" + fx="-5.4719041" + fy="137.48498" + r="63.0278" + gradientTransform="scale(1.0322663,0.96874227)" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.61399264" + inkscape:cx="305.35982" + inkscape:cy="328.83153" + inkscape:window-width="1278" + inkscape:window-height="760" + inkscape:window-x="0" + inkscape:window-y="19" + showguides="true" + inkscape:guide-bbox="true" + showgrid="false" + inkscape:snap-global="true" + inkscape:snap-nodes="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg1" /> + <metadata + id="metadata4"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <rect + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.13874531pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="rect2793" + width="497.32657" + height="497.92426" + x="8.5265961" + y="9.9727058" + rx="10" + ry="10.000001" /> + <rect + style="fill:url(#radialGradient2165);fill-opacity:0.75;fill-rule:evenodd;stroke:#c7ffc7;stroke-width:2.67499995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" + id="rect1532" + width="497.32657" + height="497.92426" + x="1.3287659" + y="1.3353081" + rx="10" + ry="10.000001" /> + <g + id="g4871" + transform="matrix(1,0,0,0.72153,-123.39704,-123.99862)"> + <rect + style="fill:url(#linearGradient4043);fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.50865927pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="rect2794" + width="374.5567" + height="328.96643" + x="144.30453" + y="199.03429" + rx="10.000001" + ry="13.85943" /> + <path + style="fill:none;stroke:#fafafa;stroke-width:20;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" + d="m 153.53968,361.37008 c 70.53877,201.53936 110.35828,210.2256 177.45839,6.10757 66.67288,-202.81841 104.2451,-205.61109 176.22345,0.24698" + id="path4175" + sodipodi:nodetypes="czc" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:7.375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" + d="m 145.99255,362.80964 c 369.96869,0 369.3724,1.43957 369.3724,1.43957" + id="path4176" + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" /> + </g> + <g + id="g4852" + transform="matrix(-1.360555,0.352222,-0.352222,-1.360555,196.67455,583.0333)"> + <path + sodipodi:type="arc" + style="fill:url(#radialGradient3021);fill-opacity:0.75;fill-rule:evenodd;stroke:none" + id="path4853" + sodipodi:cx="16.555019" + sodipodi:cy="147.59439" + sodipodi:rx="46.785923" + sodipodi:ry="43.906792" + d="m 63.340942,147.59439 a 46.785923,43.906792 0 1 1 -93.571846,0 46.785923,43.906792 0 1 1 93.571846,0 z" + transform="matrix(1.045432,0,0,1.113986,-125.3003,-37.14836)" /> + <path + sodipodi:type="arc" + style="fill:none;stroke:#000000;stroke-width:11.85730171;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:11.857302, 23.714604;stroke-dashoffset:0" + id="path4854" + sodipodi:cx="16.555019" + sodipodi:cy="147.59439" + sodipodi:rx="46.785923" + sodipodi:ry="43.906792" + d="m 63.340942,147.59439 a 46.785923,43.906792 0 1 1 -93.571846,0 46.785923,43.906792 0 1 1 93.571846,0 z" + transform="matrix(1.162718,0.507361,-0.579194,1.268918,-39.94742,-66.78193)" /> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" + d="m -108.49675,123.27211 c 36.885113,-10.80173 39.904052,-12.46015 39.904052,-12.46015 l -33.461822,23.25931 -6.44223,-10.79916 z" + id="path4855" + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" /> + </g> + <g + id="g4864" + transform="matrix(0.687211,0,0,0.854478,499.66235,-75.81607)"> + <rect + style="fill:#000000;fill-opacity:0.75;fill-rule:evenodd;stroke:none" + id="rect4856" + width="110.64801" + height="545.60913" + x="-136.40228" + y="109.76131" /> + <rect + style="fill:#00bc1a;fill-opacity:1;fill-rule:evenodd;stroke:none" + id="rect4857" + width="39.393082" + height="442.41235" + x="-128.61479" + y="205.44652" /> + <rect + style="fill:#00bc1a;fill-opacity:1;fill-rule:evenodd;stroke:none" + id="rect4858" + width="37.357227" + height="525.88245" + x="-74.664627" + y="120.64261" /> + <rect + style="fill:#000000;fill-opacity:0.17543862;fill-rule:evenodd;stroke:none" + id="rect4860" + width="95.883904" + height="12.21513" + x="-128.35823" + y="221.73334" /> + <rect + style="fill:#000000;fill-opacity:0.17543862;fill-rule:evenodd;stroke:none" + id="rect4862" + width="95.883904" + height="12.21513" + x="-129.37616" + y="563.75702" /> + <rect + style="fill:#000000;fill-opacity:0.17543862;fill-rule:evenodd;stroke:none" + id="rect4863" + width="95.883904" + height="12.21513" + x="-127.34029" + y="386.6376" /> + </g> + <g + id="g4875" + transform="matrix(-1.360555,0.352222,-0.352222,-1.360555,3.44525,587.1877)"> + <path + sodipodi:type="arc" + style="fill:url(#radialGradient4184);fill-opacity:0.75;fill-rule:evenodd;stroke:none" + id="path4876" + sodipodi:cx="16.555019" + sodipodi:cy="147.59439" + sodipodi:rx="46.785923" + sodipodi:ry="43.906792" + d="m 63.340942,147.59439 c 0,24.24905 -20.946771,43.90679 -46.785923,43.90679 -25.8391514,0 -46.785923,-19.65774 -46.785923,-43.90679 0,-24.24905 20.9467716,-43.90679 46.785923,-43.90679 25.839152,0 46.785923,19.65774 46.785923,43.90679 z" + transform="matrix(1.045432,0,0,1.113986,-125.3003,-37.14836)" /> + <path + sodipodi:type="arc" + style="fill:none;stroke:#000000;stroke-width:11.85730171;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:11.857302, 23.714604;stroke-dashoffset:0" + id="path4877" + sodipodi:cx="16.555019" + sodipodi:cy="147.59439" + sodipodi:rx="46.785923" + sodipodi:ry="43.906792" + d="m 63.340942,147.59439 c 0,24.24905 -20.946771,43.90679 -46.785923,43.90679 -25.8391514,0 -46.785923,-19.65774 -46.785923,-43.90679 0,-24.24905 20.9467716,-43.90679 46.785923,-43.90679 25.839152,0 46.785923,19.65774 46.785923,43.90679 z" + transform="matrix(1.162718,0.507361,-0.579194,1.268918,-39.94742,-66.78193)" /> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" + d="m -108.49675,123.27211 c 36.885113,-10.80173 39.904052,-12.46015 39.904052,-12.46015 l -33.461822,23.25931 -6.44223,-10.79916 z" + id="path4878" + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" /> + </g> +</svg>