diff --git a/resources/ui/carla_edit.ui b/resources/ui/carla_edit.ui
index ee94f6cf6..6781c6afd 100644
--- a/resources/ui/carla_edit.ui
+++ b/resources/ui/carla_edit.ui
@@ -6,8 +6,8 @@
0
0
- 741
- 585
+ 467
+ 461
@@ -26,8 +26,80 @@
Edit
-
- -
+
+
-
+
+
+ Settings
+
+
+
-
+
+
+ Force stereo (needs restart)
+
+
+
+ -
+
+
+ Fixed-size buffer
+
+
+
+ -
+
+
+ Send Control Changes
+
+
+
+ -
+
+
+ Send Channel Pressure
+
+
+
+ -
+
+
+ Send All Sound/Notes Off
+
+
+
+ -
+
+
+ Map Program changes
+
+
+
+ -
+
+
+ Use Chunks
+
+
+
+ -
+
+
+ Send Pitchbend
+
+
+
+ -
+
+
+ Send Note Aftertouch
+
+
+
+
+
+
+ -
-
@@ -101,550 +173,397 @@ Plugin Name
- -
-
-
-
- 0
- 0
-
-
-
- Information
-
-
-
-
-
-
- false
-
-
- true
-
-
-
- -
-
-
- Type:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- Audio Inputs:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Latency:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- Unique ID:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Audio Outputs:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Label/Product:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- false
-
-
- true
-
-
-
- -
-
-
- Parameters:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Maker:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Name:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
- Copyright:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 200
- 0
-
-
-
- false
-
-
- true
-
-
-
-
-
-
- -
-
+
-
+
- Configuration
+ Setup
-
-
-
-
-
- Fixed-size buffer
-
-
-
- -
-
-
- Force stereo (needs restart)
-
-
-
- -
-
-
- Map Program changes
-
-
-
- -
-
-
- Use Chunks
-
-
-
+
-
-
-
- Send Control Changes
-
-
+
+
+ 0
+
+
-
+
+
+ MIDI Control Channel:
+
+
+
+ -
+
+
+ Qt::CustomContextMenu
+
+
+ Qt::AlignCenter
+
+
+ N
+
+
+ 0
+
+
+ 16
+
+
+ 0
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
-
-
-
- Send Channel Pressure
-
-
-
- -
-
-
- Send Note Aftertouch
-
-
-
- -
-
-
- Send Pitchbend
-
-
-
- -
-
-
- Send All Sound/Notes Off
-
+
+
+
+ 0
+ 0
+
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Program:
+
+
+
+ -
+
+
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ MIDI Program:
+
+
+
+ -
+
+
+
+
-
-
-
- QFrame::StyledPanel
-
-
- QFrame::Raised
-
-
-
-
-
-
-
-
-
-
- 34
- 34
-
-
-
-
- 34
- 34
-
-
-
- Qt::CustomContextMenu
-
-
- Output volume (100%)
-
-
- 1270
-
-
- 1000
-
-
-
- -
-
-
-
- 34
- 34
-
-
-
-
- 34
- 34
-
-
-
- Qt::CustomContextMenu
-
-
- Output dry/wet (100%)
-
-
- 1000
-
-
- 1000
-
-
-
- -
-
-
-
- 26
- 26
-
-
-
-
- 26
- 26
-
-
-
- Qt::CustomContextMenu
-
-
- Balance Left (0%)
-
-
- -1000
-
-
- 1000
-
-
- -1000
-
-
-
- -
-
-
-
- 26
- 26
-
-
-
-
- 26
- 26
-
-
-
- Qt::CustomContextMenu
-
-
- Balance Right (0%)
-
-
- -1000
-
-
- 1000
-
-
- 1000
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 1
- 1
-
-
-
-
- -
-
-
- 0
-
-
- 1
-
-
- Qt::Vertical
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 1
- 1
-
-
-
-
- -
-
-
- MIDI Control Channel:
-
-
-
- -
-
-
- Qt::CustomContextMenu
-
-
- Qt::AlignCenter
-
-
- N
-
-
- 0
-
-
- 16
-
-
- 0
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- 0
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Program:
-
-
-
- -
-
-
-
+
+
+ 0
+
+ -
+
+
+
+ 34
+ 34
+
+
+
+
+ 34
+ 34
+
+
+
+ Qt::CustomContextMenu
+
+
+ Output volume (100%)
+
+
+ 1270
+
+
+ 1000
+
+
+
+ -
+
+
+
+ 34
+ 34
+
+
+
+
+ 34
+ 34
+
+
+
+ Qt::CustomContextMenu
+
+
+ Output dry/wet (100%)
+
+
+ 1000
+
+
+ 1000
+
+
+
+ -
+
+
+ 0
+
+
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 26
+ 26
+
+
+
+
+ 26
+ 26
+
+
+
+ Qt::CustomContextMenu
+
+
+ Balance Left (0%)
+
+
+ -1000
+
+
+ 1000
+
+
+ -1000
+
+
+
+ -
+
+
+
+ 26
+ 26
+
+
+
+
+ 26
+ 26
+
+
+
+ Qt::CustomContextMenu
+
+
+ Balance Right (0%)
+
+
+ -1000
+
+
+ 1000
+
+
+ 1000
+
+
+
+
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+
+ 26
+ 26
+
+
+
+
+ 26
+ 26
+
+
+
+ Qt::CustomContextMenu
+
+
+ Balance Right (0%)
+
+
+ -1000
+
+
+ 1000
+
+
+ 0
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
-
+
+
+ Qt::Vertical
+
+
+
+ 1
+ 1
+
+
+
+
+ -
+
+
+ Use Balance
+
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- MIDI Program:
-
-
-
- -
-
-
-
+
+ -
+
+
+ Use Panning
+
-
-
-
-
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 1
+ 1
+
+
+
+
+
+
+
-
@@ -714,7 +633,16 @@ Plugin Name
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
diff --git a/source/backend/CarlaBackend.hpp b/source/backend/CarlaBackend.hpp
index 8456c3184..642f60740 100644
--- a/source/backend/CarlaBackend.hpp
+++ b/source/backend/CarlaBackend.hpp
@@ -352,47 +352,53 @@ enum OptionsType {
#endif
#ifdef WANT_LV2
+ /*!
+ * Set path to the LV2 External UI bridge executable.\n
+ * Default unset.
+ */
+ OPTION_PATH_BRIDGE_LV2_EXTERNAL = 20,
+
/*!
* Set path to the LV2 Gtk2 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_GTK2 = 20,
+ OPTION_PATH_BRIDGE_LV2_GTK2 = 21,
/*!
* Set path to the LV2 Gtk3 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_GTK3 = 21,
+ OPTION_PATH_BRIDGE_LV2_GTK3 = 22,
/*!
* Set path to the LV2 Qt4 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_QT4 = 22,
+ OPTION_PATH_BRIDGE_LV2_QT4 = 23,
/*!
* Set path to the LV2 Qt5 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_QT5 = 23,
+ OPTION_PATH_BRIDGE_LV2_QT5 = 24,
/*!
* Set path to the LV2 Cocoa UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_COCOA = 24,
+ OPTION_PATH_BRIDGE_LV2_COCOA = 25,
/*!
* Set path to the LV2 Windows UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_WINDOWS = 25,
+ OPTION_PATH_BRIDGE_LV2_WINDOWS = 26,
/*!
* Set path to the LV2 X11 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_LV2_X11 = 26,
+ OPTION_PATH_BRIDGE_LV2_X11 = 27,
#endif
#ifdef WANT_VST
@@ -400,19 +406,19 @@ enum OptionsType {
* Set path to the VST Cocoa UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_VST_COCOA = 27,
+ OPTION_PATH_BRIDGE_VST_COCOA = 28,
/*!
* Set path to the VST HWND UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_VST_HWND = 28,
+ OPTION_PATH_BRIDGE_VST_HWND = 29,
/*!
* Set path to the VST X11 UI bridge executable.\n
* Default unset.
*/
- OPTION_PATH_BRIDGE_VST_X11 = 29
+ OPTION_PATH_BRIDGE_VST_X11 = 30
#endif
};
diff --git a/source/carla_backend.py b/source/carla_backend.py
index 5c7b969ea..e7fcc0188 100644
--- a/source/carla_backend.py
+++ b/source/carla_backend.py
@@ -199,36 +199,37 @@ PATCHBAY_ICON_FILE = 4
PATCHBAY_ICON_PLUGIN = 5
# Options Type
-OPTION_PROCESS_NAME = 0
-OPTION_PROCESS_MODE = 1
-OPTION_TRANSPORT_MODE = 2
-OPTION_FORCE_STEREO = 3
-OPTION_PREFER_PLUGIN_BRIDGES = 4
-OPTION_PREFER_UI_BRIDGES = 5
-OPTION_UIS_ALWAYS_ON_TOP = 6
-OPTION_USE_DSSI_VST_CHUNKS = 7
-OPTION_MAX_PARAMETERS = 8
-OPTION_UI_BRIDGES_TIMEOUT = 9
-OPTION_RTAUDIO_NUMBER_PERIODS = 10
-OPTION_RTAUDIO_BUFFER_SIZE = 11
-OPTION_RTAUDIO_SAMPLE_RATE = 12
-OPTION_RTAUDIO_DEVICE = 13
-OPTION_PATH_RESOURCES = 14
-OPTION_PATH_BRIDGE_NATIVE = 15
-OPTION_PATH_BRIDGE_POSIX32 = 16
-OPTION_PATH_BRIDGE_POSIX64 = 17
-OPTION_PATH_BRIDGE_WIN32 = 18
-OPTION_PATH_BRIDGE_WIN64 = 19
-OPTION_PATH_BRIDGE_LV2_GTK2 = 20
-OPTION_PATH_BRIDGE_LV2_GTK3 = 21
-OPTION_PATH_BRIDGE_LV2_QT4 = 22
-OPTION_PATH_BRIDGE_LV2_QT5 = 23
-OPTION_PATH_BRIDGE_LV2_COCOA = 24
-OPTION_PATH_BRIDGE_LV2_WINDOWS = 25
-OPTION_PATH_BRIDGE_LV2_X11 = 26
-OPTION_PATH_BRIDGE_VST_COCOA = 27
-OPTION_PATH_BRIDGE_VST_HWND = 28
-OPTION_PATH_BRIDGE_VST_X11 = 29
+OPTION_PROCESS_NAME = 0
+OPTION_PROCESS_MODE = 1
+OPTION_TRANSPORT_MODE = 2
+OPTION_FORCE_STEREO = 3
+OPTION_PREFER_PLUGIN_BRIDGES = 4
+OPTION_PREFER_UI_BRIDGES = 5
+OPTION_UIS_ALWAYS_ON_TOP = 6
+OPTION_USE_DSSI_VST_CHUNKS = 7
+OPTION_MAX_PARAMETERS = 8
+OPTION_UI_BRIDGES_TIMEOUT = 9
+OPTION_RTAUDIO_NUMBER_PERIODS = 10
+OPTION_RTAUDIO_BUFFER_SIZE = 11
+OPTION_RTAUDIO_SAMPLE_RATE = 12
+OPTION_RTAUDIO_DEVICE = 13
+OPTION_PATH_RESOURCES = 14
+OPTION_PATH_BRIDGE_NATIVE = 15
+OPTION_PATH_BRIDGE_POSIX32 = 16
+OPTION_PATH_BRIDGE_POSIX64 = 17
+OPTION_PATH_BRIDGE_WIN32 = 18
+OPTION_PATH_BRIDGE_WIN64 = 19
+OPTION_PATH_BRIDGE_LV2_EXTERNAL = 20
+OPTION_PATH_BRIDGE_LV2_GTK2 = 21
+OPTION_PATH_BRIDGE_LV2_GTK3 = 22
+OPTION_PATH_BRIDGE_LV2_QT4 = 23
+OPTION_PATH_BRIDGE_LV2_QT5 = 24
+OPTION_PATH_BRIDGE_LV2_COCOA = 25
+OPTION_PATH_BRIDGE_LV2_WINDOWS = 26
+OPTION_PATH_BRIDGE_LV2_X11 = 27
+OPTION_PATH_BRIDGE_VST_COCOA = 28
+OPTION_PATH_BRIDGE_VST_HWND = 29
+OPTION_PATH_BRIDGE_VST_X11 = 30
# Callback Type
CALLBACK_DEBUG = 0
diff --git a/source/carla_shared.py b/source/carla_shared.py
index b692ab751..88235578e 100644
--- a/source/carla_shared.py
+++ b/source/carla_shared.py
@@ -23,14 +23,11 @@ import os
import sys
from copy import deepcopy
from subprocess import Popen, PIPE
-from PyQt5.QtCore import qCritical, qFatal, qWarning, Qt, QByteArray, QThread, QSettings
+from PyQt5.QtCore import pyqtSignal, pyqtSlot, qCritical, qFatal, qWarning, Qt, QByteArray, QThread, QSettings
from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QIcon, QPainter, QPainterPath
from PyQt5.QtWidgets import QDialog, QFileDialog, QFrame, QInputDialog, QLineEdit, QMenu, QMessageBox
from PyQt5.QtWidgets import QTableWidgetItem, QVBoxLayout, QWidget
-# remove?
-from PyQt5.QtCore import pyqtSlot
-
# ------------------------------------------------------------------------------------------------------------
# Imports (Custom)
@@ -68,7 +65,7 @@ except:
# Platform specific stuff
if MACOS:
- from PyQt4.QtGui import qt_mac_set_menubar_icons
+ from PyQt5.QtGui import qt_mac_set_menubar_icons
qt_mac_set_menubar_icons(False)
elif WINDOWS:
WINDIR = os.getenv("WINDIR")
@@ -418,12 +415,14 @@ carla_bridge_vst_mac = ""
carla_bridge_vst_hwnd = ""
carla_bridge_vst_x11 = ""
+carla_libname = "libcarla_%s" % "control" if Carla.isControl else "standalone"
+
if WINDOWS:
- carla_libname = "libcarla_standalone.dll"
+ carla_libname += ".dll"
elif MACOS:
- carla_libname = "libcarla_standalone.dylib"
+ carla_libname += ".dylib"
else:
- carla_libname = "libcarla_standalone.so"
+ carla_libname += ".so"
CWD = sys.path[0]
@@ -544,9 +543,9 @@ def signalHandler(sig, frame):
return
if sig in (SIGINT, SIGTERM):
- Carla.gui.emit(SIGNAL("SIGTERM()"))
+ Carla.gui.SIGTERM.emit()
elif haveSIGUSR1 and sig == SIGUSR1:
- Carla.gui.emit(SIGNAL("SIGUSR1()"))
+ Carla.gui.SIGUSR1.emit()
def setUpSignals():
signal(SIGINT, signalHandler)
@@ -620,7 +619,7 @@ def findFilenames(filePath, stype):
filenames = []
if stype == "csound":
- extensions = (".csnd",)
+ extensions = (".csd",)
elif stype == "gig":
extensions = (".gig",)
elif stype == "sf2":
@@ -803,6 +802,7 @@ def runCarlaDiscovery(itype, stype, filename, tool, isWine=False):
if findDSSIGUI(pinfo['binary'], pinfo['name'], pinfo['label']):
pinfo['hints'] |= PLUGIN_HAS_GUI
+ # FIXME?
tmp = discoveryProcess
discoveryProcess = None
del discoveryProcess, tmp
@@ -933,22 +933,24 @@ class CarlaAboutW(QDialog):
"http://lv2plug.in/ns/ext/atom"
"http://lv2plug.in/ns/ext/buf-size"
"http://lv2plug.in/ns/ext/data-access"
- #"http://lv2plug.in/ns/ext/dynmanifest"
+ #"http://lv2plug.in/ns/ext/dynmanifest"
"http://lv2plug.in/ns/ext/event"
"http://lv2plug.in/ns/ext/instance-access"
"http://lv2plug.in/ns/ext/log"
"http://lv2plug.in/ns/ext/midi"
+ #"http://lv2plug.in/ns/ext/morph"
"http://lv2plug.in/ns/ext/options"
"http://lv2plug.in/ns/ext/parameters"
- #"http://lv2plug.in/ns/ext/patch"
- #"http://lv2plug.in/ns/ext/port-groups"
- #"http://lv2plug.in/ns/ext/port-props"
+ #"http://lv2plug.in/ns/ext/patch"
+ #"http://lv2plug.in/ns/ext/port-groups"
+ #"http://lv2plug.in/ns/ext/port-props"
"http://lv2plug.in/ns/ext/presets"
+ #"http://lv2plug.in/ns/ext/resize-port"
"http://lv2plug.in/ns/ext/state"
"http://lv2plug.in/ns/ext/time"
"http://lv2plug.in/ns/ext/uri-map"
"http://lv2plug.in/ns/ext/urid"
- #"http://lv2plug.in/ns/ext/worker"
+ #"http://lv2plug.in/ns/ext/worker"
"http://lv2plug.in/ns/extensions/ui"
"http://lv2plug.in/ns/extensions/units"
"http://kxstudio.sf.net/ns/lv2ext/external-ui"
@@ -967,6 +969,10 @@ class CarlaAboutW(QDialog):
# Plugin Parameter
class PluginParameter(QWidget):
+ midiControlChanged = pyqtSignal(int, int)
+ midiChannelChanged = pyqtSignal(int, int)
+ valueChanged = pyqtSignal(int, float)
+
def __init__(self, parent, pInfo, pluginId, tabIndex):
QWidget.__init__(self, parent)
self.ui = ui_carla_parameter.Ui_PluginParameter()
@@ -1042,11 +1048,11 @@ class PluginParameter(QWidget):
# -------------------------------------------------------------
# Set-up connections
- self.connect(self.ui.sb_control, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_controlSpinboxCustomMenu()"))
- self.connect(self.ui.sb_channel, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_channelSpinboxCustomMenu()"))
- self.connect(self.ui.sb_control, SIGNAL("valueChanged(int)"), SLOT("slot_controlSpinboxChanged(int)"))
- self.connect(self.ui.sb_channel, SIGNAL("valueChanged(int)"), SLOT("slot_channelSpinboxChanged(int)"))
- self.connect(self.ui.widget, SIGNAL("valueChanged(double)"), SLOT("slot_widgetValueChanged(double)"))
+ self.ui.sb_control.customContextMenuRequested.connect(self.slot_controlSpinboxCustomMenu)
+ self.ui.sb_channel.customContextMenuRequested.connect(self.slot_channelSpinboxCustomMenu)
+ self.ui.sb_control.valueChanged.connect(self.slot_controlSpinboxChanged)
+ self.ui.sb_channel.valueChanged.connect(self.slot_channelSpinboxChanged)
+ self.ui.widget.valueChanged.connect(self.slot_widgetValueChanged)
# -------------------------------------------------------------
@@ -1126,18 +1132,18 @@ class PluginParameter(QWidget):
@pyqtSlot(int)
def slot_controlSpinboxChanged(self, control):
if self.fMidiControl != control:
- self.emit(SIGNAL("midiControlChanged(int, int)"), self.fParameterId, control)
+ self.midiControlChanged.emit(self.fParameterId, control)
self.fMidiControl = control
@pyqtSlot(int)
def slot_channelSpinboxChanged(self, channel):
if self.fMidiChannel != channel:
- self.emit(SIGNAL("midiChannelChanged(int, int)"), self.fParameterId, channel)
+ self.midiChannelChanged.emit(self.fParameterId, channel)
self.fMidiChannel = channel
@pyqtSlot(float)
def slot_widgetValueChanged(self, value):
- self.emit(SIGNAL("valueChanged(int, double)"), self.fParameterId, value)
+ self.valueChanged.emit(self.fParameterId, value)
def _textCallBack(self):
return cString(Carla.host.get_parameter_text(self.fPluginId, self.fParameterId))
@@ -1204,47 +1210,47 @@ class PluginEdit(QDialog):
self.ui.scrollArea.setEnabled(False)
self.ui.scrollArea.setVisible(False)
- self.reloadAll()
+ #self.reloadAll()
# -------------------------------------------------------------
# Set-up connections
- self.connect(self, SIGNAL("finished(int)"), SLOT("slot_finished()"))
-
- self.connect(self.ui.ch_fixed_buffer, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_force_stereo, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_map_program_changes, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_use_chunks, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_send_control_changes, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_send_channel_pressure, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_send_note_aftertouch, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_send_pitchbend, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
- self.connect(self.ui.ch_send_all_sound_off, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
-
- self.connect(self.ui.dial_drywet, SIGNAL("valueChanged(int)"), SLOT("slot_dryWetChanged(int)"))
- self.connect(self.ui.dial_vol, SIGNAL("valueChanged(int)"), SLOT("slot_volumeChanged(int)"))
- self.connect(self.ui.dial_b_left, SIGNAL("valueChanged(int)"), SLOT("slot_balanceLeftChanged(int)"))
- self.connect(self.ui.dial_b_right, SIGNAL("valueChanged(int)"), SLOT("slot_balanceRightChanged(int)"))
- self.connect(self.ui.sb_ctrl_channel, SIGNAL("valueChanged(int)"), SLOT("slot_ctrlChannelChanged(int)"))
-
- self.connect(self.ui.dial_drywet, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
- self.connect(self.ui.dial_vol, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
- self.connect(self.ui.dial_b_left, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
- self.connect(self.ui.dial_b_right, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
- self.connect(self.ui.sb_ctrl_channel, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_channelCustomMenu()"))
-
- self.connect(self.ui.keyboard, SIGNAL("noteOn(int)"), SLOT("slot_noteOn(int)"))
- self.connect(self.ui.keyboard, SIGNAL("noteOff(int)"), SLOT("slot_noteOff(int)"))
-
- self.connect(self.ui.cb_programs, SIGNAL("currentIndexChanged(int)"), SLOT("slot_programIndexChanged(int)"))
- self.connect(self.ui.cb_midi_programs, SIGNAL("currentIndexChanged(int)"), SLOT("slot_midiProgramIndexChanged(int)"))
-
- if Carla.isLocal:
- self.connect(self.ui.b_save_state, SIGNAL("clicked()"), SLOT("slot_stateSave()"))
- self.connect(self.ui.b_load_state, SIGNAL("clicked()"), SLOT("slot_stateLoad()"))
- else:
- self.ui.b_load_state.setEnabled(False)
- self.ui.b_save_state.setEnabled(False)
+ #self.connect(self, SIGNAL("finished(int)"), SLOT("slot_finished()"))
+
+ #self.connect(self.ui.ch_fixed_buffer, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_force_stereo, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_map_program_changes, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_use_chunks, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_send_control_changes, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_send_channel_pressure, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_send_note_aftertouch, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_send_pitchbend, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+ #self.connect(self.ui.ch_send_all_sound_off, SIGNAL("clicked(bool)"), SLOT("slot_optionChanged(bool)"))
+
+ #self.connect(self.ui.dial_drywet, SIGNAL("valueChanged(int)"), SLOT("slot_dryWetChanged(int)"))
+ #self.connect(self.ui.dial_vol, SIGNAL("valueChanged(int)"), SLOT("slot_volumeChanged(int)"))
+ #self.connect(self.ui.dial_b_left, SIGNAL("valueChanged(int)"), SLOT("slot_balanceLeftChanged(int)"))
+ #self.connect(self.ui.dial_b_right, SIGNAL("valueChanged(int)"), SLOT("slot_balanceRightChanged(int)"))
+ #self.connect(self.ui.sb_ctrl_channel, SIGNAL("valueChanged(int)"), SLOT("slot_ctrlChannelChanged(int)"))
+
+ #self.connect(self.ui.dial_drywet, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
+ #self.connect(self.ui.dial_vol, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
+ #self.connect(self.ui.dial_b_left, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
+ #self.connect(self.ui.dial_b_right, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_knobCustomMenu()"))
+ #self.connect(self.ui.sb_ctrl_channel, SIGNAL("customContextMenuRequested(QPoint)"), SLOT("slot_channelCustomMenu()"))
+
+ #self.connect(self.ui.keyboard, SIGNAL("noteOn(int)"), SLOT("slot_noteOn(int)"))
+ #self.connect(self.ui.keyboard, SIGNAL("noteOff(int)"), SLOT("slot_noteOff(int)"))
+
+ #self.connect(self.ui.cb_programs, SIGNAL("currentIndexChanged(int)"), SLOT("slot_programIndexChanged(int)"))
+ #self.connect(self.ui.cb_midi_programs, SIGNAL("currentIndexChanged(int)"), SLOT("slot_midiProgramIndexChanged(int)"))
+
+ #if Carla.isLocal:
+ #self.connect(self.ui.b_save_state, SIGNAL("clicked()"), SLOT("slot_stateSave()"))
+ #self.connect(self.ui.b_load_state, SIGNAL("clicked()"), SLOT("slot_stateLoad()"))
+ #else:
+ #self.ui.b_load_state.setEnabled(False)
+ #self.ui.b_save_state.setEnabled(False)
# -------------------------------------------------------------
@@ -3416,3 +3422,35 @@ class PluginDatabaseW(QDialog):
def done(self, r):
QDialog.done(self, r)
self.close()
+
+# ------------------------------------------------------------------------------------------------------------
+# TESTING
+
+Carla.isControl = True
+
+pInfo = {
+ 'type': PARAMETER_INPUT,
+ 'hints': PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE,
+ 'name': "Parameter Name",
+ 'unit': "",
+ 'scalePoints': [],
+
+ 'index': 0,
+ 'default': 0.0,
+ 'minimum': 0.0,
+ 'maximum': 1.0,
+ 'step': 0.01,
+ 'stepSmall': 0.01,
+ 'stepLarge': 0.01,
+ 'midiCC': -1,
+ 'midiChannel': 1,
+
+ 'current': 0.0
+}
+
+from PyQt5.QtWidgets import QApplication
+app = QApplication(sys.argv)
+#gui = PluginParameter(None, pInfo, 0, 0)
+gui = PluginEdit(None, 0)
+gui.show()
+app.exec_()
diff --git a/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.cpp
deleted file mode 100644
index b56b8dc83..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.cpp
+++ /dev/null
@@ -1,2201 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/ADnoteUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-#include
-#include
-#include
-#include
-
-void ADvoicelistitem::cb_voicevolume_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PVolume=(int)o->value();
-}
-void ADvoicelistitem::cb_voicevolume(Fl_Value_Slider* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_voicevolume_i(o,v);
-}
-
-void ADvoicelistitem::cb_voiceresonanceenabled_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].Presonance=(int)o->value();
-}
-void ADvoicelistitem::cb_voiceresonanceenabled(Fl_Check_Button* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_voiceresonanceenabled_i(o,v);
-}
-
-void ADvoicelistitem::cb_voicelfofreq_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].FreqLfo->Pintensity=(int)o->value();
-}
-void ADvoicelistitem::cb_voicelfofreq(Fl_Value_Slider* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_voicelfofreq_i(o,v);
-}
-
-void ADvoicelistitem::cb_voicepanning_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].PPanning=(int) o->value();
-}
-void ADvoicelistitem::cb_voicepanning(WidgetPDial* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_voicepanning_i(o,v);
-}
-
-void ADvoicelistitem::cb_detunevalueoutput_i(Fl_Value_Output* o, void*) {
- o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());
-}
-void ADvoicelistitem::cb_detunevalueoutput(Fl_Value_Output* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_detunevalueoutput_i(o,v);
-}
-
-void ADvoicelistitem::cb_voicedetune_i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].PDetune=(int)o->value()+8192;
-detunevalueoutput->do_callback();
-}
-void ADvoicelistitem::cb_voicedetune(Fl_Slider* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_voicedetune_i(o,v);
-}
-
-void ADvoicelistitem::cb_noiselabel_i(Fl_Box* o, void*) {
- if (pars->VoicePar[nvoice].Type==0) {
- o->hide();
- voiceresonanceenabled->activate();
- detunevalueoutput->activate();
- voicedetune->activate();
- voicelfofreq->activate();
- voiceoscil->activate();
-} else {
- o->show();
- voiceresonanceenabled->deactivate();
- detunevalueoutput->deactivate();
- voicedetune->deactivate();
- voicelfofreq->deactivate();
- voiceoscil->deactivate();
-};
-}
-void ADvoicelistitem::cb_noiselabel(Fl_Box* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->parent()->user_data()))->cb_noiselabel_i(o,v);
-}
-
-void ADvoicelistitem::cb_voiceenabled_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].Enabled=(int)o->value();
-if (o->value()==0) voicelistitemgroup->deactivate();
-else voicelistitemgroup->activate();
-o->redraw();
-}
-void ADvoicelistitem::cb_voiceenabled(Fl_Check_Button* o, void* v) {
- ((ADvoicelistitem*)(o->parent()->user_data()))->cb_voiceenabled_i(o,v);
-}
-
-Fl_Group* ADvoicelistitem::make_window() {
- { ADnoteVoiceListItem = new Fl_Group(0, 0, 615, 100);
- ADnoteVoiceListItem->box(FL_UP_FRAME);
- ADnoteVoiceListItem->color(FL_BACKGROUND_COLOR);
- ADnoteVoiceListItem->selection_color(FL_BACKGROUND_COLOR);
- ADnoteVoiceListItem->labeltype(FL_NO_LABEL);
- ADnoteVoiceListItem->labelfont(0);
- ADnoteVoiceListItem->labelsize(14);
- ADnoteVoiceListItem->labelcolor(FL_FOREGROUND_COLOR);
- ADnoteVoiceListItem->user_data((void*)(this));
- ADnoteVoiceListItem->align(Fl_Align(FL_ALIGN_TOP));
- ADnoteVoiceListItem->when(FL_WHEN_RELEASE);
- { Fl_Group* o = voicelistitemgroup = new Fl_Group(50, 0, 570, 25);
- { Fl_Value_Slider* o = voicevolume = new Fl_Value_Slider(90, 5, 115, 20);
- voicevolume->tooltip("Volume");
- voicevolume->type(5);
- voicevolume->box(FL_NO_BOX);
- voicevolume->labelsize(8);
- voicevolume->maximum(127);
- voicevolume->step(1);
- voicevolume->callback((Fl_Callback*)cb_voicevolume);
- voicevolume->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(pars->VoicePar[nvoice].PVolume);
- } // Fl_Value_Slider* voicevolume
- { Fl_Check_Button* o = voiceresonanceenabled = new Fl_Check_Button(245, 7, 15, 17);
- voiceresonanceenabled->tooltip("Resonance On/Off");
- voiceresonanceenabled->down_box(FL_DOWN_BOX);
- voiceresonanceenabled->labeltype(FL_EMBOSSED_LABEL);
- voiceresonanceenabled->labelfont(1);
- voiceresonanceenabled->labelsize(11);
- voiceresonanceenabled->callback((Fl_Callback*)cb_voiceresonanceenabled);
- voiceresonanceenabled->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(pars->VoicePar[nvoice].Presonance);
- } // Fl_Check_Button* voiceresonanceenabled
- { Fl_Value_Slider* o = voicelfofreq = new Fl_Value_Slider(500, 5, 115, 20);
- voicelfofreq->tooltip("Frequency LFO amount");
- voicelfofreq->type(5);
- voicelfofreq->box(FL_NO_BOX);
- voicelfofreq->labelsize(8);
- voicelfofreq->maximum(127);
- voicelfofreq->step(1);
- voicelfofreq->callback((Fl_Callback*)cb_voicelfofreq);
- voicelfofreq->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(pars->VoicePar[nvoice].FreqLfo->Pintensity);
- } // Fl_Value_Slider* voicelfofreq
- { WidgetPDial* o = voicepanning = new WidgetPDial(215, 5, 20, 20);
- voicepanning->tooltip("Panning (leftmost is Random)");
- voicepanning->box(FL_ROUND_UP_BOX);
- voicepanning->color(FL_BACKGROUND_COLOR);
- voicepanning->selection_color(FL_INACTIVE_COLOR);
- voicepanning->labeltype(FL_NORMAL_LABEL);
- voicepanning->labelfont(0);
- voicepanning->labelsize(10);
- voicepanning->labelcolor(FL_FOREGROUND_COLOR);
- voicepanning->maximum(127);
- voicepanning->step(1);
- voicepanning->callback((Fl_Callback*)cb_voicepanning);
- voicepanning->align(Fl_Align(FL_ALIGN_LEFT));
- voicepanning->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].PPanning);
- } // WidgetPDial* voicepanning
- { Fl_Group* o = voiceoscil = new Fl_Group(60, 5, 30, 20);
- voiceoscil->box(FL_THIN_DOWN_BOX);
- voiceoscil->color(FL_GRAY0);
- voiceoscil->selection_color((Fl_Color)71);
- voiceoscil->labelcolor((Fl_Color)179);
- osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- osc->init(pars->VoicePar[nvoice].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);
- if (pars->VoicePar[nvoice].Pextoscil != -1) {osc->init(pars->VoicePar[pars->VoicePar[nvoice].Pextoscil].OscilSmp,master);}
- voiceoscil->end();
- } // Fl_Group* voiceoscil
- { Fl_Value_Output* o = detunevalueoutput = new Fl_Value_Output(265, 5, 45, 20);
- detunevalueoutput->labelsize(10);
- detunevalueoutput->minimum(-5000);
- detunevalueoutput->maximum(5000);
- detunevalueoutput->step(0.01);
- detunevalueoutput->textfont(1);
- detunevalueoutput->textsize(10);
- detunevalueoutput->callback((Fl_Callback*)cb_detunevalueoutput);
- detunevalueoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(getdetune(pars->VoicePar[nvoice].PDetuneType,0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());
- } // Fl_Value_Output* detunevalueoutput
- { Fl_Slider* o = voicedetune = new Fl_Slider(315, 5, 185, 20);
- voicedetune->tooltip("Fine Detune (cents)");
- voicedetune->type(5);
- voicedetune->box(FL_NO_BOX);
- voicedetune->minimum(-8192);
- voicedetune->maximum(8191);
- voicedetune->step(1);
- voicedetune->callback((Fl_Callback*)cb_voicedetune);
- o->value(pars->VoicePar[nvoice].PDetune-8192);
- } // Fl_Slider* voicedetune
- { Fl_Box* o = noiselabel = new Fl_Box(65, 5, 20, 20, "N");
- noiselabel->labelfont(1);
- noiselabel->labelsize(13);
- noiselabel->labelcolor(FL_BACKGROUND2_COLOR);
- noiselabel->callback((Fl_Callback*)cb_noiselabel);
- if (pars->VoicePar[nvoice].Type==0) o->hide();
- } // Fl_Box* noiselabel
- if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();
- voicelistitemgroup->end();
- } // Fl_Group* voicelistitemgroup
- { Fl_Check_Button* o = voiceenabled = new Fl_Check_Button(30, 5, 20, 20, "01");
- voiceenabled->down_box(FL_DOWN_BOX);
- voiceenabled->labeltype(FL_EMBOSSED_LABEL);
- voiceenabled->labelfont(1);
- voiceenabled->labelsize(13);
- voiceenabled->callback((Fl_Callback*)cb_voiceenabled);
- voiceenabled->align(Fl_Align(FL_ALIGN_LEFT));
- char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));
- o->value(pars->VoicePar[nvoice].Enabled);
- } // Fl_Check_Button* voiceenabled
- ADnoteVoiceListItem->end();
- } // Fl_Group* ADnoteVoiceListItem
- return ADnoteVoiceListItem;
-}
-
-ADvoicelistitem::ADvoicelistitem(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- nvoice=0;
- pars=NULL;
-}
-
-void ADvoicelistitem::init(ADnoteParameters *parameters,int nvoice_,Master *master_) {
- pars=parameters;
- nvoice=nvoice_;
- master=master_;
- make_window();
- ADnoteVoiceListItem->show();
- end();
-}
-
-void ADvoicelistitem::refreshlist() {
- voiceenabled->value(pars->VoicePar[nvoice].Enabled);
- voiceresonanceenabled->value(pars->VoicePar[nvoice].Presonance);
- voicevolume->value(pars->VoicePar[nvoice].PVolume);
- voicedetune->value(pars->VoicePar[nvoice].PDetune-8192);
- voicepanning->value(pars->VoicePar[nvoice].PPanning);
- voicelfofreq->value(pars->VoicePar[nvoice].FreqLfo->Pintensity);
- if (pars->VoicePar[nvoice].Pextoscil != -1) {
- osc->init(pars->VoicePar[pars->VoicePar[nvoice].Pextoscil].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);
- } else
- osc->init(pars->VoicePar[nvoice].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);
- if (pars->VoicePar[nvoice].Enabled==0) voicelistitemgroup->deactivate();
- else voicelistitemgroup->activate();
- detunevalueoutput->do_callback();
- noiselabel->do_callback();
- ADnoteVoiceListItem->redraw();
-}
-
-ADvoicelistitem::~ADvoicelistitem() {
- ADnoteVoiceListItem->hide();
- //delete(ADnoteVoiceListItem);
-}
-
-void ADvoiceUI::cb_On_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled=(int)o->value();
-if (o->value()==0) voiceFMfreqenvgroup->deactivate();
-else voiceFMfreqenvgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_On_i(o,v);
-}
-
-void ADvoiceUI::cb_Coarse_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=1024;
-pars->VoicePar[nvoice].PFMCoarseDetune = k+
- (pars->VoicePar[nvoice].PFMCoarseDetune/1024)*1024;
-}
-void ADvoiceUI::cb_Coarse(Fl_Counter* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Coarse_i(o,v);
-}
-
-void ADvoiceUI::cb_Octave_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=16;
-pars->VoicePar[nvoice].PFMCoarseDetune = k*1024+
- pars->VoicePar[nvoice].PFMCoarseDetune%1024;
-}
-void ADvoiceUI::cb_Octave(Fl_Counter* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Octave_i(o,v);
-}
-
-void ADvoiceUI::cb__i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].PFMDetune=(int)o->value()+8192;
-fmdetunevalueoutput->do_callback();
-}
-void ADvoiceUI::cb_(Fl_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb__i(o,v);
-}
-
-void ADvoiceUI::cb_fmdetunevalueoutput_i(Fl_Value_Output* o, void*) {
- o->value(getdetune((pars->VoicePar[nvoice].PFMDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));
-}
-void ADvoiceUI::cb_fmdetunevalueoutput(Fl_Value_Output* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_fmdetunevalueoutput_i(o,v);
-}
-
-void ADvoiceUI::cb_Detune_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].PFMDetuneType=(int) o->value();
-fmdetunevalueoutput->do_callback();
-}
-void ADvoiceUI::cb_Detune(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Detune_i(o,v);
-}
-
-void ADvoiceUI::cb_Vol_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PFMVolume=(int)o->value();
-}
-void ADvoiceUI::cb_Vol(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Vol_i(o,v);
-}
-
-void ADvoiceUI::cb_V_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PFMVelocityScaleFunction=(int) o->value();
-}
-void ADvoiceUI::cb_V(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_V_i(o,v);
-}
-
-void ADvoiceUI::cb_On1_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled=(int)o->value();
-if (o->value()==0) voiceFMampenvgroup->deactivate();
-else voiceFMampenvgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On1(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_On1_i(o,v);
-}
-
-void ADvoiceUI::cb_F_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PFMVolumeDamp=(int) o->value()+64;
-}
-void ADvoiceUI::cb_F(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_F_i(o,v);
-}
-
-void ADvoiceUI::cb_changeFMoscilbutton_i(Fl_Button*, void*) {
- if (oscedit!=NULL) delete(oscedit);
-
-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);
-}
-void ADvoiceUI::cb_changeFMoscilbutton(Fl_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_changeFMoscilbutton_i(o,v);
-}
-
-void ADvoiceUI::cb_Phase_i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].PFMoscilphase=64-(int)o->value();
-oscFM->phase=64-(int) o->value();
-fmoscil->redraw();
-}
-void ADvoiceUI::cb_Phase(Fl_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Phase_i(o,v);
-}
-
-void ADvoiceUI::cb_Use_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].PextFMoscil=(int)o->value()-1;
-if ((int) o->value() != 0) {
- oscFM->init(pars->VoicePar[(int) o->value()-1].FMSmp,master);
- changeFMoscilbutton->labelcolor(FL_BLUE);
-} else {
- oscFM->init(pars->VoicePar[nvoice].FMSmp,master);
- changeFMoscilbutton->labelcolor(FL_BLACK);
-};
-voiceFMparametersgroup->redraw();
-}
-void ADvoiceUI::cb_Use(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Use_i(o,v);
-}
-
-void ADvoiceUI::cb_External_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].PFMVoice=(int)o->value()-1;
-if ((int) o->value() != 0) {
- modoscil->deactivate();
- modfrequency->deactivate();
-} else {
- modoscil->activate();
- modfrequency->activate();
-};
-voiceFMparametersgroup->redraw();
-}
-void ADvoiceUI::cb_External(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_External_i(o,v);
-}
-
-void ADvoiceUI::cb_Type_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].PFMEnabled=(int)o->value();
-if (o->value()==0) voiceFMparametersgroup->deactivate();
-else voiceFMparametersgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_Type(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Type_i(o,v);
-}
-
-Fl_Menu_Item ADvoiceUI::menu_Type[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"MORPH", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"RING", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"PM", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"FM", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"PITCH", 0, 0, 0, 1, FL_NORMAL_LABEL, 1, 14, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ADvoiceUI::cb_On2_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFreqEnvelopeEnabled=(int)o->value();
-if (o->value()==0) voicefreqenvgroup->deactivate();
-else voicefreqenvgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On2(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_On2_i(o,v);
-}
-
-void ADvoiceUI::cb_On3_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFreqLfoEnabled=(int)o->value();
-if (o->value()==0) voicefreqlfogroup->deactivate();
-else voicefreqlfogroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On3(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_On3_i(o,v);
-}
-
-void ADvoiceUI::cb_Octave1_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=16;
-pars->VoicePar[nvoice].PCoarseDetune = k*1024+
- pars->VoicePar[nvoice].PCoarseDetune%1024;
-}
-void ADvoiceUI::cb_Octave1(Fl_Counter* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Octave1_i(o,v);
-}
-
-void ADvoiceUI::cb_Coarse1_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=1024;
-pars->VoicePar[nvoice].PCoarseDetune = k+
- (pars->VoicePar[nvoice].PCoarseDetune/1024)*1024;
-}
-void ADvoiceUI::cb_Coarse1(Fl_Counter* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Coarse1_i(o,v);
-}
-
-void ADvoiceUI::cb_1_i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].PDetune=(int)o->value()+8192;
-detunevalueoutput->do_callback();
-}
-void ADvoiceUI::cb_1(Fl_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_1_i(o,v);
-}
-
-void ADvoiceUI::cb_detunevalueoutput1_i(Fl_Value_Output* o, void*) {
- o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());
-}
-void ADvoiceUI::cb_detunevalueoutput1(Fl_Value_Output* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_detunevalueoutput1_i(o,v);
-}
-
-void ADvoiceUI::cb_440Hz_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-pars->VoicePar[nvoice].Pfixedfreq=x;
-if (x==0) fixedfreqetdial->deactivate();
- else fixedfreqetdial->activate();
-}
-void ADvoiceUI::cb_440Hz(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_440Hz_i(o,v);
-}
-
-void ADvoiceUI::cb_fixedfreqetdial_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].PfixedfreqET=(int) o->value();
-}
-void ADvoiceUI::cb_fixedfreqetdial(WidgetPDial* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_fixedfreqetdial_i(o,v);
-}
-
-void ADvoiceUI::cb_Detune1_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].PDetuneType=(int) o->value();
-detunevalueoutput->do_callback();
-}
-void ADvoiceUI::cb_Detune1(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Detune1_i(o,v);
-}
-
-void ADvoiceUI::cb_changevoiceoscilbutton_i(Fl_Button*, void*) {
- if (oscedit!=NULL) delete(oscedit);
-
-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);
-}
-void ADvoiceUI::cb_changevoiceoscilbutton(Fl_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_changevoiceoscilbutton_i(o,v);
-}
-
-void ADvoiceUI::cb_Phase1_i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].Poscilphase=64-(int)o->value();
-osc->phase=64-(int) o->value();
-voiceoscil->redraw();
-}
-void ADvoiceUI::cb_Phase1(Fl_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Phase1_i(o,v);
-}
-
-void ADvoiceUI::cb_R_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].Presonance=(int) o->value();
-}
-void ADvoiceUI::cb_R(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_R_i(o,v);
-}
-
-void ADvoiceUI::cb_Use1_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].Pextoscil=(int)o->value()-1;
-if ((int) o->value() != 0) {
- osc->init(pars->VoicePar[(int) o->value()-1].OscilSmp,master);
- changevoiceoscilbutton->labelcolor(FL_BLUE);
-} else {
- osc->init(pars->VoicePar[nvoice].OscilSmp,master);
- changevoiceoscilbutton->labelcolor(FL_BLACK);
-};
-
-voiceparametersgroup->redraw();
-voiceonbutton->redraw();
-}
-void ADvoiceUI::cb_Use1(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Use1_i(o,v);
-}
-
-void ADvoiceUI::cb_Stereo_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].Unison_stereo_spread=(int)o->value();
-}
-void ADvoiceUI::cb_Stereo(WidgetPDial* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Stereo_i(o,v);
-}
-
-void ADvoiceUI::cb_Unison_i(Fl_Choice* o, void*) {
- pars->set_unison_size_index(nvoice,(int) o->value());
-}
-void ADvoiceUI::cb_Unison(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Unison_i(o,v);
-}
-
-void ADvoiceUI::cb_Vibratto_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].Unison_vibratto=(int)o->value();
-}
-void ADvoiceUI::cb_Vibratto(WidgetPDial* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Vibratto_i(o,v);
-}
-
-void ADvoiceUI::cb_Invert_i(Fl_Choice* o, void*) {
- pars->VoicePar[nvoice].Unison_invert_phase=(int) o->value();
-}
-void ADvoiceUI::cb_Invert(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Invert_i(o,v);
-}
-
-void ADvoiceUI::cb_Frequency_i(Fl_Slider* o, void*) {
- pars->VoicePar[nvoice].Unison_frequency_spread=(int)o->value();
-unisonspreadoutput->do_callback();
-}
-void ADvoiceUI::cb_Frequency(Fl_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Frequency_i(o,v);
-}
-
-void ADvoiceUI::cb_unisonspreadoutput_i(Fl_Value_Output* o, void*) {
- o->value(pars->getUnisonFrequencySpreadCents(nvoice));
-}
-void ADvoiceUI::cb_unisonspreadoutput(Fl_Value_Output* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_unisonspreadoutput_i(o,v);
-}
-
-void ADvoiceUI::cb_Vib_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].Unison_vibratto_speed=(int)o->value();
-}
-void ADvoiceUI::cb_Vib(WidgetPDial* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Vib_i(o,v);
-}
-
-void ADvoiceUI::cb_Vol1_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PVolume=(int)o->value();
-}
-void ADvoiceUI::cb_Vol1(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Vol1_i(o,v);
-}
-
-void ADvoiceUI::cb_V1_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PAmpVelocityScaleFunction=(int) o->value();
-}
-void ADvoiceUI::cb_V1(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_V1_i(o,v);
-}
-
-void ADvoiceUI::cb_Pan_i(WidgetPDial* o, void*) {
- pars->VoicePar[nvoice].PPanning=(int) o->value();
-}
-void ADvoiceUI::cb_Pan(WidgetPDial* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Pan_i(o,v);
-}
-
-void ADvoiceUI::cb_On4_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PAmpEnvelopeEnabled=(int)o->value();
-if (o->value()==0) voiceampenvgroup->deactivate();
-else voiceampenvgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On4(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_On4_i(o,v);
-}
-
-void ADvoiceUI::cb_On5_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PAmpLfoEnabled=(int)o->value();
-if (o->value()==0) voiceamplfogroup->deactivate();
-else voiceamplfogroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On5(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_On5_i(o,v);
-}
-
-void ADvoiceUI::cb_Minus_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PVolumeminus=(int)o->value();
-}
-void ADvoiceUI::cb_Minus(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Minus_i(o,v);
-}
-
-void ADvoiceUI::cb_On6_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFilterEnvelopeEnabled=(int)o->value();
-if (o->value()==0) voicefilterenvgroup->deactivate();
-else voicefilterenvgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On6(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_On6_i(o,v);
-}
-
-void ADvoiceUI::cb_On7_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFilterLfoEnabled=(int)o->value();
-if (o->value()==0) voicefilterlfogroup->deactivate();
-else voicefilterlfogroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_On7(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_On7_i(o,v);
-}
-
-void ADvoiceUI::cb_2_i(Fl_Choice* o, void*) {
- int x=(int) o->value();
-pars->VoicePar[nvoice].Type=x;
-if (x==0) voicemodegroup->activate();
- else voicemodegroup->deactivate();
-noiselabel->do_callback();
-}
-void ADvoiceUI::cb_2(Fl_Choice* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->user_data()))->cb_2_i(o,v);
-}
-
-Fl_Menu_Item ADvoiceUI::menu_[] = {
- {"Sound", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"NOISE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 1},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ADvoiceUI::cb_bypassfiltercheckbutton_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].Pfilterbypass=(int)o->value();
-}
-void ADvoiceUI::cb_bypassfiltercheckbutton(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->user_data()))->cb_bypassfiltercheckbutton_i(o,v);
-}
-
-void ADvoiceUI::cb_Delay_i(Fl_Value_Slider* o, void*) {
- pars->VoicePar[nvoice].PDelay=(int)o->value();
-}
-void ADvoiceUI::cb_Delay(Fl_Value_Slider* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->parent()->user_data()))->cb_Delay_i(o,v);
-}
-
-void ADvoiceUI::cb_On8_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].PFilterEnabled=(int)o->value();
-if (o->value()==0) voicefiltergroup->deactivate();
-else voicefiltergroup->activate();
-o->redraw();
-bypassfiltercheckbutton->redraw();
-}
-void ADvoiceUI::cb_On8(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->user_data()))->cb_On8_i(o,v);
-}
-
-void ADvoiceUI::cb_noiselabel1_i(Fl_Box* o, void*) {
- if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();
-}
-void ADvoiceUI::cb_noiselabel1(Fl_Box* o, void* v) {
- ((ADvoiceUI*)(o->parent()->parent()->user_data()))->cb_noiselabel1_i(o,v);
-}
-
-void ADvoiceUI::cb_voiceonbutton_i(Fl_Check_Button* o, void*) {
- pars->VoicePar[nvoice].Enabled=(int)o->value();
-if (o->value()==0) voiceparametersgroup->deactivate();
-else voiceparametersgroup->activate();
-o->redraw();
-}
-void ADvoiceUI::cb_voiceonbutton(Fl_Check_Button* o, void* v) {
- ((ADvoiceUI*)(o->parent()->user_data()))->cb_voiceonbutton_i(o,v);
-}
-
-Fl_Group* ADvoiceUI::make_window() {
- { ADnoteVoiceParameters = new Fl_Group(0, 0, 765, 590, "Voice");
- ADnoteVoiceParameters->box(FL_NO_BOX);
- ADnoteVoiceParameters->color(FL_BACKGROUND_COLOR);
- ADnoteVoiceParameters->selection_color(FL_BACKGROUND_COLOR);
- ADnoteVoiceParameters->labeltype(FL_NO_LABEL);
- ADnoteVoiceParameters->labelfont(0);
- ADnoteVoiceParameters->labelsize(14);
- ADnoteVoiceParameters->labelcolor(FL_FOREGROUND_COLOR);
- ADnoteVoiceParameters->user_data((void*)(this));
- ADnoteVoiceParameters->align(Fl_Align(FL_ALIGN_TOP));
- ADnoteVoiceParameters->when(FL_WHEN_RELEASE);
- { Fl_Group* o = voiceparametersgroup = new Fl_Group(0, 0, 765, 595);
- voiceparametersgroup->color((Fl_Color)48);
- { voicemodegroup = new Fl_Group(0, 5, 765, 590);
- voicemodegroup->color((Fl_Color)64);
- { Fl_Group* o = voiceFMparametersgroup = new Fl_Group(530, 5, 230, 580, "MODULATOR");
- voiceFMparametersgroup->box(FL_UP_FRAME);
- voiceFMparametersgroup->color((Fl_Color)48);
- voiceFMparametersgroup->labeltype(FL_EMBOSSED_LABEL);
- voiceFMparametersgroup->labelfont(1);
- voiceFMparametersgroup->labelsize(13);
- voiceFMparametersgroup->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { modfrequency = new Fl_Group(535, 220, 220, 155, "Mod.FREQUENCY");
- modfrequency->box(FL_UP_FRAME);
- modfrequency->labeltype(FL_EMBOSSED_LABEL);
- modfrequency->labelfont(1);
- modfrequency->labelsize(13);
- modfrequency->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = voiceFMfreqenvgroup = new EnvelopeUI(540, 300, 210, 70, "ADSynth Modulator - Frequency Envelope");
- voiceFMfreqenvgroup->box(FL_FLAT_BOX);
- voiceFMfreqenvgroup->color((Fl_Color)51);
- voiceFMfreqenvgroup->selection_color(FL_BACKGROUND_COLOR);
- voiceFMfreqenvgroup->labeltype(FL_NORMAL_LABEL);
- voiceFMfreqenvgroup->labelfont(0);
- voiceFMfreqenvgroup->labelsize(14);
- voiceFMfreqenvgroup->labelcolor(FL_FOREGROUND_COLOR);
- voiceFMfreqenvgroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voiceFMfreqenvgroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FMFreqEnvelope);
- if (pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled==0) o->deactivate();
- voiceFMfreqenvgroup->end();
- } // EnvelopeUI* voiceFMfreqenvgroup
- { Fl_Check_Button* o = new Fl_Check_Button(545, 305, 50, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On);
- o->value(pars->VoicePar[nvoice].PFMFreqEnvelopeEnabled);
- } // Fl_Check_Button* o
- { Fl_Counter* o = new Fl_Counter(685, 280, 60, 15, "Coarse Det.");
- o->tooltip("Coarse Detune");
- o->labelsize(10);
- o->minimum(-64);
- o->maximum(63);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Coarse);
- o->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->VoicePar[nvoice].PFMCoarseDetune%1024;
- if (k>=512) k-=1024;
- o->value(k);
- o->lstep(10);
- } // Fl_Counter* o
- { Fl_Counter* o = new Fl_Counter(625, 280, 45, 15, "Octave");
- o->tooltip("Octave");
- o->type(1);
- o->labelsize(10);
- o->minimum(-8);
- o->maximum(7);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Octave);
- o->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->VoicePar[nvoice].PFMCoarseDetune/1024;
- if (k>=8) k-=16;
- o->value(k);
- } // Fl_Counter* o
- { Fl_Slider* o = new Fl_Slider(590, 245, 155, 15);
- o->tooltip("Fine Detune (cents)");
- o->type(5);
- o->box(FL_NO_BOX);
- o->minimum(-8192);
- o->maximum(8191);
- o->step(1);
- o->callback((Fl_Callback*)cb_);
- o->value(pars->VoicePar[nvoice].PFMDetune-8192);
- } // Fl_Slider* o
- { Fl_Value_Output* o = fmdetunevalueoutput = new Fl_Value_Output(540, 245, 45, 18, "Detune");
- fmdetunevalueoutput->labelsize(8);
- fmdetunevalueoutput->minimum(-5000);
- fmdetunevalueoutput->maximum(5000);
- fmdetunevalueoutput->step(0.01);
- fmdetunevalueoutput->textfont(1);
- fmdetunevalueoutput->textsize(8);
- fmdetunevalueoutput->callback((Fl_Callback*)cb_fmdetunevalueoutput);
- fmdetunevalueoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(getdetune((pars->VoicePar[nvoice].PFMDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PFMDetuneType),0,pars->VoicePar[nvoice].PFMDetune));
- //o->value(getdetune(pars->VoicePar[nvoice].PFMDetuneType,0,pars->VoicePar[nvoice].PFMDetune));
- } // Fl_Value_Output* fmdetunevalueoutput
- { Fl_Choice* o = new Fl_Choice(540, 280, 75, 15, "Detune Type");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Detune);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");
- o->value(pars->VoicePar[nvoice].PFMDetuneType);
- } // Fl_Choice* o
- modfrequency->end();
- } // Fl_Group* modfrequency
- { Fl_Group* o = new Fl_Group(535, 60, 220, 160, "Mod.AMPLITUDE");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { Fl_Value_Slider* o = new Fl_Value_Slider(540, 80, 160, 15, "Vol");
- o->tooltip("Volume");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vol);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->VoicePar[nvoice].PFMVolume);
- } // Fl_Value_Slider* o
- { Fl_Value_Slider* o = new Fl_Value_Slider(540, 100, 160, 15, "V.Sns");
- o->tooltip("Velocity Sensing Function (rightmost to disable)");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_V);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->VoicePar[nvoice].PFMVelocityScaleFunction);
- } // Fl_Value_Slider* o
- { EnvelopeUI* o = voiceFMampenvgroup = new EnvelopeUI(540, 145, 205, 70, "ADSynth Modulator - Amplitude Envelope");
- voiceFMampenvgroup->box(FL_FLAT_BOX);
- voiceFMampenvgroup->color((Fl_Color)51);
- voiceFMampenvgroup->selection_color(FL_BACKGROUND_COLOR);
- voiceFMampenvgroup->labeltype(FL_NORMAL_LABEL);
- voiceFMampenvgroup->labelfont(0);
- voiceFMampenvgroup->labelsize(14);
- voiceFMampenvgroup->labelcolor(FL_FOREGROUND_COLOR);
- voiceFMampenvgroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voiceFMampenvgroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FMAmpEnvelope);
- if (pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled==0) o->deactivate();
- voiceFMampenvgroup->end();
- } // EnvelopeUI* voiceFMampenvgroup
- { Fl_Check_Button* o = new Fl_Check_Button(545, 150, 50, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On1);
- o->value(pars->VoicePar[nvoice].PFMAmpEnvelopeEnabled);
- } // Fl_Check_Button* o
- { Fl_Value_Slider* o = new Fl_Value_Slider(540, 120, 160, 15, "F.Damp");
- o->tooltip("Modulator Damp at Higher frequency");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->minimum(-64);
- o->maximum(63);
- o->step(1);
- o->callback((Fl_Callback*)cb_F);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->VoicePar[nvoice].PFMVolumeDamp-64);
- } // Fl_Value_Slider* o
- o->end();
- } // Fl_Group* o
- { modoscil = new Fl_Group(535, 365, 220, 220);
- { Fl_Group* o = fmoscil = new Fl_Group(535, 440, 220, 140);
- fmoscil->box(FL_THIN_DOWN_BOX);
- fmoscil->color(FL_GRAY0);
- fmoscil->selection_color((Fl_Color)71);
- fmoscil->labelcolor((Fl_Color)179);
- oscFM=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil;
- oscFM->init(pars->VoicePar[nv].FMSmp,0,pars->VoicePar[nvoice].PFMoscilphase,master);
- fmoscil->end();
- } // Fl_Group* fmoscil
- { Fl_Box* o = new Fl_Box(535, 375, 155, 20, "Mod.Oscillator");
- o->labelfont(1);
- o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Button* o = changeFMoscilbutton = new Fl_Button(700, 380, 55, 15, "Change");
- changeFMoscilbutton->box(FL_THIN_UP_BOX);
- changeFMoscilbutton->labelfont(1);
- changeFMoscilbutton->labelsize(11);
- changeFMoscilbutton->callback((Fl_Callback*)cb_changeFMoscilbutton);
- if (pars->VoicePar[nvoice].PextFMoscil>=0) o->labelcolor(FL_BLUE);
- } // Fl_Button* changeFMoscilbutton
- { Fl_Slider* o = new Fl_Slider(645, 415, 105, 15, "Phase");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(10);
- o->minimum(-64);
- o->maximum(63);
- o->step(1);
- o->callback((Fl_Callback*)cb_Phase);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(64-pars->VoicePar[nvoice].PFMoscilphase);
- } // Fl_Slider* o
- { Fl_Choice* o = new Fl_Choice(560, 410, 75, 20, "Use");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Use);
- o->add("Internal");
- char tmp[50]; for (int i=0;iadd(tmp);};
- o->value(pars->VoicePar[nvoice].PextFMoscil+1);
- } // Fl_Choice* o
- modoscil->end();
- } // Fl_Group* modoscil
- { Fl_Choice* o = new Fl_Choice(635, 40, 85, 20, "External Mod.");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_External);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("OFF");
- char tmp[50]; for (int i=0;iadd(tmp);};
- o->value(pars->VoicePar[nvoice].PFMVoice+1);
- if ((int) o->value() != 0) {modoscil->deactivate();modfrequency->deactivate();}
- } // Fl_Choice* o
- if (pars->VoicePar[nvoice].PFMEnabled==0) o->deactivate();
- voiceFMparametersgroup->end();
- } // Fl_Group* voiceFMparametersgroup
- { Fl_Choice* o = new Fl_Choice(535, 40, 80, 20, "Type:");
- o->down_box(FL_BORDER_BOX);
- o->callback((Fl_Callback*)cb_Type);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->menu(menu_Type);
- o->value(pars->VoicePar[nvoice].PFMEnabled);
- } // Fl_Choice* o
- { Fl_Group* o = new Fl_Group(5, 265, 525, 120, "FREQUENCY");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = voicefreqenvgroup = new EnvelopeUI(10, 305, 205, 70, "ADSynth Voice - Frequency Envelope");
- voicefreqenvgroup->box(FL_FLAT_BOX);
- voicefreqenvgroup->color((Fl_Color)51);
- voicefreqenvgroup->selection_color(FL_BACKGROUND_COLOR);
- voicefreqenvgroup->labeltype(FL_NORMAL_LABEL);
- voicefreqenvgroup->labelfont(0);
- voicefreqenvgroup->labelsize(14);
- voicefreqenvgroup->labelcolor(FL_FOREGROUND_COLOR);
- voicefreqenvgroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voicefreqenvgroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FreqEnvelope);
- if (pars->VoicePar[nvoice].PFreqEnvelopeEnabled==0) o->deactivate();
- voicefreqenvgroup->end();
- } // EnvelopeUI* voicefreqenvgroup
- { Fl_Check_Button* o = new Fl_Check_Button(15, 310, 50, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On2);
- o->value(pars->VoicePar[nvoice].PFreqEnvelopeEnabled);
- } // Fl_Check_Button* o
- { LFOUI* o = voicefreqlfogroup = new LFOUI(220, 305, 230, 70, "Frequency LFO ");
- voicefreqlfogroup->box(FL_FLAT_BOX);
- voicefreqlfogroup->color(FL_DARK1);
- voicefreqlfogroup->selection_color(FL_BACKGROUND_COLOR);
- voicefreqlfogroup->labeltype(FL_NORMAL_LABEL);
- voicefreqlfogroup->labelfont(0);
- voicefreqlfogroup->labelsize(14);
- voicefreqlfogroup->labelcolor(FL_FOREGROUND_COLOR);
- voicefreqlfogroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voicefreqlfogroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FreqLfo);
- if (pars->VoicePar[nvoice].PFreqLfoEnabled==0) o->deactivate();
- voicefreqlfogroup->end();
- } // LFOUI* voicefreqlfogroup
- { Fl_Check_Button* o = new Fl_Check_Button(225, 311, 55, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On3);
- o->value(pars->VoicePar[nvoice].PFreqLfoEnabled);
- } // Fl_Check_Button* o
- { Fl_Counter* o = new Fl_Counter(470, 285, 45, 15, "Octave");
- o->tooltip("Octave");
- o->type(1);
- o->labelsize(10);
- o->minimum(-8);
- o->maximum(7);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Octave1);
- o->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->VoicePar[nvoice].PCoarseDetune/1024;
- if (k>=8) k-=16;
- o->value(k);
- } // Fl_Counter* o
- { Fl_Counter* o = new Fl_Counter(455, 355, 60, 20, "Coarse Det.");
- o->tooltip("Coarse Detune");
- o->labelsize(10);
- o->minimum(-64);
- o->maximum(63);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Coarse1);
- o->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->VoicePar[nvoice].PCoarseDetune%1024;
- if (k>=512) k-=1024;
- o->value(k);
- o->lstep(10);
- } // Fl_Counter* o
- { Fl_Slider* o = new Fl_Slider(58, 287, 392, 13);
- o->tooltip("Fine Detune (cents)");
- o->type(5);
- o->box(FL_NO_BOX);
- o->minimum(-8192);
- o->maximum(8191);
- o->step(1);
- o->callback((Fl_Callback*)cb_1);
- o->value(pars->VoicePar[nvoice].PDetune-8192);
- } // Fl_Slider* o
- { Fl_Value_Output* o = detunevalueoutput = new Fl_Value_Output(10, 287, 45, 15, "Detune");
- detunevalueoutput->labelsize(10);
- detunevalueoutput->minimum(-5000);
- detunevalueoutput->maximum(5000);
- detunevalueoutput->step(0.01);
- detunevalueoutput->textfont(1);
- detunevalueoutput->textsize(10);
- detunevalueoutput->callback((Fl_Callback*)cb_detunevalueoutput1);
- detunevalueoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(getdetune((pars->VoicePar[nvoice].PDetuneType==0)?(pars->GlobalPar.PDetuneType) : (pars->VoicePar[nvoice].PDetuneType),0,pars->VoicePar[nvoice].PDetune)*pars->getBandwidthDetuneMultiplier());
- } // Fl_Value_Output* detunevalueoutput
- { Fl_Check_Button* o = new Fl_Check_Button(345, 268, 55, 15, "440Hz");
- o->tooltip("Set the voice base frequency to 440Hz");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_440Hz);
- o->value(pars->VoicePar[nvoice].Pfixedfreq);
- } // Fl_Check_Button* o
- { WidgetPDial* o = fixedfreqetdial = new WidgetPDial(405, 270, 15, 15, "Eq.T.");
- fixedfreqetdial->tooltip("How the frequency varies acording to the keyboard (leftmost for fixed frequen\
-cy)");
- fixedfreqetdial->box(FL_ROUND_UP_BOX);
- fixedfreqetdial->color(FL_BACKGROUND_COLOR);
- fixedfreqetdial->selection_color(FL_INACTIVE_COLOR);
- fixedfreqetdial->labeltype(FL_NORMAL_LABEL);
- fixedfreqetdial->labelfont(0);
- fixedfreqetdial->labelsize(10);
- fixedfreqetdial->labelcolor(FL_FOREGROUND_COLOR);
- fixedfreqetdial->maximum(127);
- fixedfreqetdial->step(1);
- fixedfreqetdial->callback((Fl_Callback*)cb_fixedfreqetdial);
- fixedfreqetdial->align(Fl_Align(FL_ALIGN_RIGHT));
- fixedfreqetdial->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].PfixedfreqET);
- if (pars->VoicePar[nvoice].Pfixedfreq==0) o->deactivate();
- } // WidgetPDial* fixedfreqetdial
- { Fl_Choice* o = new Fl_Choice(455, 320, 70, 15, "Detune Type");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Detune1);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");
- o->value(pars->VoicePar[nvoice].PDetuneType);
- } // Fl_Choice* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = voiceoscil = new Fl_Group(80, 390, 445, 145);
- voiceoscil->box(FL_THIN_DOWN_BOX);
- voiceoscil->color(FL_GRAY0);
- voiceoscil->selection_color((Fl_Color)71);
- voiceoscil->labelcolor((Fl_Color)179);
- osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- int nv=nvoice; if (pars->VoicePar[nvoice].Pextoscil>=0) nv=pars->VoicePar[nvoice].Pextoscil;
- osc->init(pars->VoicePar[nv].OscilSmp,0,pars->VoicePar[nvoice].Poscilphase,master);
- voiceoscil->end();
- } // Fl_Group* voiceoscil
- { Fl_Button* o = changevoiceoscilbutton = new Fl_Button(5, 490, 65, 20, "Change");
- changevoiceoscilbutton->box(FL_THIN_UP_BOX);
- changevoiceoscilbutton->labelfont(1);
- changevoiceoscilbutton->labelsize(11);
- changevoiceoscilbutton->callback((Fl_Callback*)cb_changevoiceoscilbutton);
- if (pars->VoicePar[nvoice].Pextoscil>=0) o->labelcolor(FL_BLUE);
- } // Fl_Button* changevoiceoscilbutton
- { Fl_Box* o = new Fl_Box(5, 390, 75, 35, "Voice Oscillator");
- o->labelfont(1);
- o->labelsize(12);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Box* o
- { Fl_Slider* o = new Fl_Slider(10, 435, 65, 10, "Phase");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(10);
- o->minimum(-64);
- o->maximum(63);
- o->step(1);
- o->callback((Fl_Callback*)cb_Phase1);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(64-pars->VoicePar[nvoice].Poscilphase);
- } // Fl_Slider* o
- { Fl_Check_Button* o = new Fl_Check_Button(210, 5, 35, 35, "R.");
- o->tooltip("Resonance On/Off");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_R);
- o->value(pars->VoicePar[nvoice].Presonance);
- } // Fl_Check_Button* o
- { Fl_Choice* o = new Fl_Choice(5, 470, 65, 15, "Use Oscil.");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Use1);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("Internal");
- char tmp[50]; for (int i=0;iadd(tmp);};
- o->value(pars->VoicePar[nvoice].Pextoscil+1);
- } // Fl_Choice* o
- { Fl_Group* o = new Fl_Group(5, 540, 515, 45);
- o->box(FL_UP_FRAME);
- { WidgetPDial* o = new WidgetPDial(285, 555, 25, 30, "Stereo");
- o->tooltip("Stereo Spread");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Stereo);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].Unison_stereo_spread);
- } // WidgetPDial* o
- { Fl_Choice* o = new Fl_Choice(10, 560, 75, 20, "Unison");
- o->tooltip("Unison size");
- o->down_box(FL_BORDER_BOX);
- o->labelfont(1);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Unison);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- 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);};
- o->value(pars->get_unison_size_index(nvoice));
- } // Fl_Choice* o
- { WidgetPDial* o = new WidgetPDial(340, 555, 25, 30, "Vibratto");
- o->tooltip("Vibratto");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vibratto);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].Unison_vibratto);
- } // WidgetPDial* o
- { Fl_Choice* o = new Fl_Choice(445, 560, 65, 15, "Invert");
- o->tooltip("Phase Invert");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(11);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Invert);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- 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);};
- o->value(pars->VoicePar[nvoice].Unison_invert_phase);
- } // Fl_Choice* o
- { Fl_Slider* o = new Fl_Slider(95, 562, 125, 13, "Frequency Spread");
- o->tooltip("Frequency Spread of the Unison");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(12);
- o->maximum(127);
- o->step(1);
- o->value(64);
- o->callback((Fl_Callback*)cb_Frequency);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->value(pars->VoicePar[nvoice].Unison_frequency_spread);
- } // Fl_Slider* o
- { Fl_Value_Output* o = unisonspreadoutput = new Fl_Value_Output(225, 560, 40, 15, "(cents)");
- unisonspreadoutput->labelsize(10);
- unisonspreadoutput->maximum(1000);
- unisonspreadoutput->step(0.1);
- unisonspreadoutput->textfont(1);
- unisonspreadoutput->textsize(10);
- unisonspreadoutput->callback((Fl_Callback*)cb_unisonspreadoutput);
- unisonspreadoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(pars->getUnisonFrequencySpreadCents(nvoice));
- } // Fl_Value_Output* unisonspreadoutput
- { WidgetPDial* o = new WidgetPDial(390, 555, 25, 30, "Vib.speed");
- o->tooltip("Vibratto Average Speed");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vib);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].Unison_vibratto_speed);
- } // WidgetPDial* o
- o->end();
- } // Fl_Group* o
- voicemodegroup->end();
- } // Fl_Group* voicemodegroup
- { Fl_Group* o = new Fl_Group(5, 40, 240, 220, "AMPLITUDE");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { Fl_Value_Slider* o = new Fl_Value_Slider(10, 60, 160, 15, "Vol");
- o->tooltip("Volume");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vol1);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->VoicePar[nvoice].PVolume);
- } // Fl_Value_Slider* o
- { Fl_Value_Slider* o = new Fl_Value_Slider(10, 80, 160, 15, "V.Sns");
- o->tooltip("Velocity Sensing Function (rightmost to disable)");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_V1);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->VoicePar[nvoice].PAmpVelocityScaleFunction);
- } // Fl_Value_Slider* o
- { EnvelopeUI* o = voiceampenvgroup = new EnvelopeUI(10, 105, 205, 70, "ADSynth Voice - Amplitude Envelope");
- voiceampenvgroup->box(FL_FLAT_BOX);
- voiceampenvgroup->color((Fl_Color)51);
- voiceampenvgroup->selection_color(FL_BACKGROUND_COLOR);
- voiceampenvgroup->labeltype(FL_NORMAL_LABEL);
- voiceampenvgroup->labelfont(0);
- voiceampenvgroup->labelsize(14);
- voiceampenvgroup->labelcolor(FL_FOREGROUND_COLOR);
- voiceampenvgroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voiceampenvgroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].AmpEnvelope);
- if (pars->VoicePar[nvoice].PAmpEnvelopeEnabled==0) o->deactivate();
- voiceampenvgroup->end();
- } // EnvelopeUI* voiceampenvgroup
- { WidgetPDial* o = new WidgetPDial(210, 60, 30, 30, "Pan");
- o->tooltip("Panning (leftmost is Random)");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Pan);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(pars->VoicePar[nvoice].PPanning);
- } // WidgetPDial* o
- { Fl_Check_Button* o = new Fl_Check_Button(15, 110, 50, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On4);
- o->value(pars->VoicePar[nvoice].PAmpEnvelopeEnabled);
- } // Fl_Check_Button* o
- { LFOUI* o = voiceamplfogroup = new LFOUI(10, 180, 230, 75, "Amplitude LFO ");
- voiceamplfogroup->box(FL_FLAT_BOX);
- voiceamplfogroup->color(FL_DARK1);
- voiceamplfogroup->selection_color(FL_BACKGROUND_COLOR);
- voiceamplfogroup->labeltype(FL_NORMAL_LABEL);
- voiceamplfogroup->labelfont(0);
- voiceamplfogroup->labelsize(14);
- voiceamplfogroup->labelcolor(FL_FOREGROUND_COLOR);
- voiceamplfogroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voiceamplfogroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].AmpLfo);
- if (pars->VoicePar[nvoice].PAmpLfoEnabled==0) o->deactivate();
- voiceamplfogroup->end();
- } // LFOUI* voiceamplfogroup
- { Fl_Check_Button* o = new Fl_Check_Button(15, 185, 55, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On5);
- o->value(pars->VoicePar[nvoice].PAmpLfoEnabled);
- } // Fl_Check_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(10, 45, 50, 10, "Minus");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Minus);
- o->value(pars->VoicePar[nvoice].PVolumeminus);
- } // Fl_Check_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = voicefiltergroup = new Fl_Group(245, 5, 285, 260, "FILTER");
- voicefiltergroup->box(FL_UP_FRAME);
- voicefiltergroup->labeltype(FL_EMBOSSED_LABEL);
- voicefiltergroup->labelfont(1);
- voicefiltergroup->labelsize(13);
- voicefiltergroup->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { FilterUI* o = new FilterUI(250, 30, 275, 75, "ADsynth Voice - Filter");
- o->box(FL_FLAT_BOX);
- o->color(FL_LIGHT1);
- o->selection_color(FL_BACKGROUND_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- o->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].VoiceFilter,NULL,NULL);
- o->end();
- } // FilterUI* o
- { EnvelopeUI* o = voicefilterenvgroup = new EnvelopeUI(250, 115, 275, 70, "ADSynth Voice - Filter Envelope");
- voicefilterenvgroup->box(FL_FLAT_BOX);
- voicefilterenvgroup->color((Fl_Color)51);
- voicefilterenvgroup->selection_color(FL_BACKGROUND_COLOR);
- voicefilterenvgroup->labeltype(FL_NORMAL_LABEL);
- voicefilterenvgroup->labelfont(0);
- voicefilterenvgroup->labelsize(14);
- voicefilterenvgroup->labelcolor(FL_FOREGROUND_COLOR);
- voicefilterenvgroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voicefilterenvgroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FilterEnvelope);
- if (pars->VoicePar[nvoice].PFilterEnvelopeEnabled==0) o->deactivate();
- voicefilterenvgroup->end();
- } // EnvelopeUI* voicefilterenvgroup
- { Fl_Check_Button* o = new Fl_Check_Button(255, 119, 55, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On6);
- o->value(pars->VoicePar[nvoice].PFilterEnvelopeEnabled);
- } // Fl_Check_Button* o
- { LFOUI* o = voicefilterlfogroup = new LFOUI(250, 190, 230, 70, "Filter LFO ");
- voicefilterlfogroup->box(FL_FLAT_BOX);
- voicefilterlfogroup->color(FL_DARK1);
- voicefilterlfogroup->selection_color(FL_BACKGROUND_COLOR);
- voicefilterlfogroup->labeltype(FL_NORMAL_LABEL);
- voicefilterlfogroup->labelfont(0);
- voicefilterlfogroup->labelsize(14);
- voicefilterlfogroup->labelcolor(FL_FOREGROUND_COLOR);
- voicefilterlfogroup->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- voicefilterlfogroup->when(FL_WHEN_RELEASE);
- o->init(pars->VoicePar[nvoice].FilterLfo);
- if (pars->VoicePar[nvoice].PFilterLfoEnabled==0) o->deactivate();
- voicefilterlfogroup->end();
- } // LFOUI* voicefilterlfogroup
- { Fl_Check_Button* o = new Fl_Check_Button(255, 196, 55, 10, "On");
- o->tooltip("Forced Relase");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On7);
- o->value(pars->VoicePar[nvoice].PFilterLfoEnabled);
- } // Fl_Check_Button* o
- if (pars->VoicePar[nvoice].PFilterEnabled==0) o->deactivate();
- voicefiltergroup->end();
- } // Fl_Group* voicefiltergroup
- { Fl_Group* o = new Fl_Group(5, 5, 55, 35, "01");
- o->box(FL_THIN_UP_BOX);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(22);
- o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- char tmp[10];snprintf(tmp,10,"%d",nvoice+1);o->label(strdup(tmp));
- o->end();
- } // Fl_Group* o
- { Fl_Choice* o = new Fl_Choice(5, 515, 65, 20);
- o->tooltip("Oscillator Type (sound/noise)");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_2);
- o->menu(menu_);
- o->value(pars->VoicePar[nvoice].Type);
- if (pars->VoicePar[nvoice].Type!=0) voicemodegroup->deactivate();
- } // Fl_Choice* o
- { Fl_Check_Button* o = bypassfiltercheckbutton = new Fl_Check_Button(425, 10, 100, 20, "Bypass Global F.");
- bypassfiltercheckbutton->down_box(FL_DOWN_BOX);
- bypassfiltercheckbutton->labelfont(1);
- bypassfiltercheckbutton->labelsize(10);
- bypassfiltercheckbutton->callback((Fl_Callback*)cb_bypassfiltercheckbutton);
- bypassfiltercheckbutton->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(pars->VoicePar[nvoice].Pfilterbypass);
- } // Fl_Check_Button* bypassfiltercheckbutton
- { Fl_Group* o = new Fl_Group(115, 5, 95, 35);
- o->box(FL_THIN_UP_BOX);
- { Fl_Value_Slider* o = new Fl_Value_Slider(120, 21, 84, 12, "Delay");
- o->tooltip("Volume");
- o->type(5);
- o->box(FL_NO_BOX);
- o->labelsize(11);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Delay);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(pars->VoicePar[nvoice].PDelay);
- } // Fl_Value_Slider* o
- o->end();
- } // Fl_Group* o
- { Fl_Check_Button* o = new Fl_Check_Button(250, 15, 60, 15, "On");
- o->tooltip("Enable Filter");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_On8);
- o->value(pars->VoicePar[nvoice].PFilterEnabled);
- } // Fl_Check_Button* o
- { Fl_Box* o = noiselabel = new Fl_Box(150, 430, 300, 65, "White Noise");
- noiselabel->labelfont(1);
- noiselabel->labelsize(50);
- noiselabel->labelcolor(FL_BACKGROUND2_COLOR);
- noiselabel->callback((Fl_Callback*)cb_noiselabel1);
- if (pars->VoicePar[nvoice].Type==0) o->hide(); else o->show();
- } // Fl_Box* noiselabel
- if (pars->VoicePar[nvoice].Enabled==0) o->deactivate();
- voiceparametersgroup->end();
- } // Fl_Group* voiceparametersgroup
- { Fl_Check_Button* o = voiceonbutton = new Fl_Check_Button(60, 5, 55, 35, "On");
- voiceonbutton->box(FL_THIN_UP_BOX);
- voiceonbutton->down_box(FL_DOWN_BOX);
- voiceonbutton->labelfont(1);
- voiceonbutton->labelsize(13);
- voiceonbutton->callback((Fl_Callback*)cb_voiceonbutton);
- o->value(pars->VoicePar[nvoice].Enabled);
- } // Fl_Check_Button* voiceonbutton
- ADnoteVoiceParameters->end();
- } // Fl_Group* ADnoteVoiceParameters
- return ADnoteVoiceParameters;
-}
-
-ADvoiceUI::ADvoiceUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- nvoice=0;
- pars=NULL;
- oscedit=NULL;
-}
-
-void ADvoiceUI::init(ADnoteParameters *parameters,int nvoice_,Master *master_) {
- pars=parameters;
- nvoice=nvoice_;
- master=master_;
- make_window();
- end();
- ADnoteVoiceParameters->show();
-}
-
-ADvoiceUI::~ADvoiceUI() {
- ADnoteVoiceParameters->hide();
- hide();
- if (oscedit!=NULL) {
- delete(oscedit);
- };
- //delete (ADnoteVoiceParameters);
-}
-
-void ADnoteUI::cb_octave_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=16;
-pars->GlobalPar.PCoarseDetune = k*1024+
- pars->GlobalPar.PCoarseDetune%1024;
-}
-void ADnoteUI::cb_octave(Fl_Counter* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_octave_i(o,v);
-}
-
-void ADnoteUI::cb_coarsedet_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=1024;
-pars->GlobalPar.PCoarseDetune = k+
- (pars->GlobalPar.PCoarseDetune/1024)*1024;
-}
-void ADnoteUI::cb_coarsedet(Fl_Counter* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_coarsedet_i(o,v);
-}
-
-void ADnoteUI::cb_freq_i(Fl_Slider* o, void*) {
- pars->GlobalPar.PDetune=(int)o->value()+8192;
-detunevalueoutput->do_callback();
-}
-void ADnoteUI::cb_freq(Fl_Slider* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_freq_i(o,v);
-}
-
-void ADnoteUI::cb_detunevalueoutput2_i(Fl_Value_Output* o, void*) {
- o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));
-}
-void ADnoteUI::cb_detunevalueoutput2(Fl_Value_Output* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_detunevalueoutput2_i(o,v);
-}
-
-void ADnoteUI::cb_detunetype_i(Fl_Choice* o, void*) {
- pars->GlobalPar.PDetuneType=(int) o->value()+1;
-detunevalueoutput->do_callback();
-}
-void ADnoteUI::cb_detunetype(Fl_Choice* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_detunetype_i(o,v);
-}
-
-void ADnoteUI::cb_relBW_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PBandwidth=(int) o->value();
-
-pars->getBandwidthDetuneMultiplier();
-
-for (int i=0;irefreshlist();
-};
-}
-void ADnoteUI::cb_relBW(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_relBW_i(o,v);
-}
-
-void ADnoteUI::cb_volume_i(Fl_Value_Slider* o, void*) {
- pars->GlobalPar.PVolume=(int)o->value();
-}
-void ADnoteUI::cb_volume(Fl_Value_Slider* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_volume_i(o,v);
-}
-
-void ADnoteUI::cb_vsns_i(Fl_Value_Slider* o, void*) {
- pars->GlobalPar.PAmpVelocityScaleFunction=(int) o->value();
-}
-void ADnoteUI::cb_vsns(Fl_Value_Slider* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_vsns_i(o,v);
-}
-
-void ADnoteUI::cb_pan_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PPanning=(int) o->value();
-}
-void ADnoteUI::cb_pan(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_pan_i(o,v);
-}
-
-void ADnoteUI::cb_pstr_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PPunchStrength=(int) o->value();
-}
-void ADnoteUI::cb_pstr(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_pstr_i(o,v);
-}
-
-void ADnoteUI::cb_pt_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PPunchTime=(int) o->value();
-}
-void ADnoteUI::cb_pt(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_pt_i(o,v);
-}
-
-void ADnoteUI::cb_pstc_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PPunchStretch=(int) o->value();
-}
-void ADnoteUI::cb_pstc(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_pstc_i(o,v);
-}
-
-void ADnoteUI::cb_pvel_i(WidgetPDial* o, void*) {
- pars->GlobalPar.PPunchVelocitySensing=(int) o->value();
-}
-void ADnoteUI::cb_pvel(WidgetPDial* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_pvel_i(o,v);
-}
-
-void ADnoteUI::cb_rndgrp_i(Fl_Check_Button* o, void*) {
- pars->GlobalPar.Hrandgrouping=(int) o->value();
-}
-void ADnoteUI::cb_rndgrp(Fl_Check_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->parent()->user_data()))->cb_rndgrp_i(o,v);
-}
-
-void ADnoteUI::cb_stereo_i(Fl_Check_Button* o, void*) {
- pars->GlobalPar.PStereo=(int) o->value();
-}
-void ADnoteUI::cb_stereo(Fl_Check_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_stereo_i(o,v);
-}
-
-void ADnoteUI::cb_Show_i(Fl_Button*, void*) {
- for (int i=0;irefreshlist();
-}
-ADnoteVoiceList->show();
-}
-void ADnoteUI::cb_Show(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Show_i(o,v);
-}
-
-void ADnoteUI::cb_Show1_i(Fl_Button*, void*) {
- ADnoteVoice->show();
-}
-void ADnoteUI::cb_Show1(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Show1_i(o,v);
-}
-
-void ADnoteUI::cb_Close_i(Fl_Button*, void*) {
- ADnoteGlobalParameters->hide();
-}
-void ADnoteUI::cb_Close(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void ADnoteUI::cb_Resonance_i(Fl_Button*, void*) {
- resui->resonancewindow->redraw();
-resui->resonancewindow->show();
-}
-void ADnoteUI::cb_Resonance(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Resonance_i(o,v);
-}
-
-void ADnoteUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(pars);
-}
-void ADnoteUI::cb_C(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void ADnoteUI::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(pars,this);
-}
-void ADnoteUI::cb_P(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void ADnoteUI::cb_Close1_i(Fl_Button*, void*) {
- ADnoteVoice->hide();
-}
-void ADnoteUI::cb_Close1(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Close1_i(o,v);
-}
-
-void ADnoteUI::cb_currentvoicecounter_i(Fl_Counter* o, void*) {
- nvoice=(int)o->value()-1;
-advoice->hide();
-ADnoteVoice->remove(advoice);
-delete advoice;
-advoice=new ADvoiceUI(0,0,765,585);
-ADnoteVoice->add(advoice);
-advoice->init(pars,nvoice,master);
-advoice->show();
-ADnoteVoice->redraw();
-}
-void ADnoteUI::cb_currentvoicecounter(Fl_Counter* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_currentvoicecounter_i(o,v);
-}
-
-void ADnoteUI::cb_C1_i(Fl_Button*, void*) {
- presetsui->copy(pars,nvoice);
-}
-void ADnoteUI::cb_C1(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_C1_i(o,v);
-}
-
-void ADnoteUI::cb_P1_i(Fl_Button*, void*) {
- presetsui->paste(pars,this,nvoice);
-}
-void ADnoteUI::cb_P1(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_P1_i(o,v);
-}
-
-void ADnoteUI::cb_Hide_i(Fl_Button*, void*) {
- ADnoteVoiceList->hide();
-}
-void ADnoteUI::cb_Hide(Fl_Button* o, void* v) {
- ((ADnoteUI*)(o->parent()->user_data()))->cb_Hide_i(o,v);
-}
-
-Fl_Double_Window* ADnoteUI::make_window() {
- { ADnoteGlobalParameters = new Fl_Double_Window(540, 430, "ADsynth Global Parameters of the Instrument");
- ADnoteGlobalParameters->user_data((void*)(this));
- { Fl_Group* o = new Fl_Group(5, 280, 530, 115, "FREQUENCY");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = freqenv = new EnvelopeUI(10, 320, 205, 70, "ADSynth Global - Frequency Envelope");
- freqenv->box(FL_FLAT_BOX);
- freqenv->color((Fl_Color)51);
- freqenv->selection_color(FL_BACKGROUND_COLOR);
- freqenv->labeltype(FL_NORMAL_LABEL);
- freqenv->labelfont(0);
- freqenv->labelsize(14);
- freqenv->labelcolor(FL_FOREGROUND_COLOR);
- freqenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- freqenv->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.FreqEnvelope);
- freqenv->end();
- } // EnvelopeUI* freqenv
- { Fl_Counter* o = octave = new Fl_Counter(455, 300, 45, 15, "Octave");
- octave->tooltip("Octave");
- octave->type(1);
- octave->labelsize(10);
- octave->minimum(-8);
- octave->maximum(7);
- octave->step(1);
- octave->textfont(1);
- octave->textsize(11);
- octave->callback((Fl_Callback*)cb_octave);
- octave->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->GlobalPar.PCoarseDetune/1024;if (k>=8) k-=16;
- o->value(k);
- } // Fl_Counter* octave
- { Fl_Counter* o = coarsedet = new Fl_Counter(460, 370, 60, 20, "Coarse det.");
- coarsedet->tooltip("Coarse Detune");
- coarsedet->type(1);
- coarsedet->labelsize(10);
- coarsedet->minimum(-64);
- coarsedet->maximum(63);
- coarsedet->step(1);
- coarsedet->textfont(1);
- coarsedet->textsize(11);
- coarsedet->callback((Fl_Callback*)cb_coarsedet);
- coarsedet->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- int k=pars->GlobalPar.PCoarseDetune%1024;if (k>=512) k-=1024;
- o->value(k);
- o->lstep(10);
- } // Fl_Counter* coarsedet
- { LFOUI* o = freqlfo = new LFOUI(220, 320, 230, 70, "Frequency LFO ");
- freqlfo->box(FL_FLAT_BOX);
- freqlfo->color(FL_DARK1);
- freqlfo->selection_color(FL_BACKGROUND_COLOR);
- freqlfo->labeltype(FL_NORMAL_LABEL);
- freqlfo->labelfont(0);
- freqlfo->labelsize(14);
- freqlfo->labelcolor(FL_FOREGROUND_COLOR);
- freqlfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- freqlfo->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.FreqLfo);
- freqlfo->end();
- } // LFOUI* freqlfo
- { Fl_Slider* o = freq = new Fl_Slider(60, 300, 385, 15);
- freq->tooltip("Fine Detune (cents)");
- freq->type(5);
- freq->box(FL_NO_BOX);
- freq->minimum(-8192);
- freq->maximum(8191);
- freq->step(1);
- freq->callback((Fl_Callback*)cb_freq);
- o->value(pars->GlobalPar.PDetune-8192);
- } // Fl_Slider* freq
- { Fl_Value_Output* o = detunevalueoutput = new Fl_Value_Output(12, 300, 45, 15, "Detune");
- detunevalueoutput->labelsize(10);
- detunevalueoutput->minimum(-5000);
- detunevalueoutput->maximum(5000);
- detunevalueoutput->step(0.01);
- detunevalueoutput->textfont(1);
- detunevalueoutput->textsize(10);
- detunevalueoutput->callback((Fl_Callback*)cb_detunevalueoutput2);
- detunevalueoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));
- } // Fl_Value_Output* detunevalueoutput
- { Fl_Choice* o = detunetype = new Fl_Choice(455, 340, 75, 15, "Detune Type");
- detunetype->down_box(FL_BORDER_BOX);
- detunetype->labelsize(10);
- detunetype->textfont(1);
- detunetype->textsize(10);
- detunetype->callback((Fl_Callback*)cb_detunetype);
- detunetype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");
- o->value(pars->GlobalPar.PDetuneType-1);
- } // Fl_Choice* detunetype
- { WidgetPDial* o = new WidgetPDial(505, 295, 25, 25, "relBW");
- o->tooltip("Bandwidth - how the relative fine detune of the voice are changed");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_relBW);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PBandwidth);
- } // WidgetPDial* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 5, 240, 260, "AMPLITUDE");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { Fl_Value_Slider* o = volume = new Fl_Value_Slider(10, 30, 160, 15, "Vol");
- volume->tooltip("Volume");
- volume->type(5);
- volume->box(FL_NO_BOX);
- volume->labelsize(11);
- volume->maximum(127);
- volume->step(1);
- volume->callback((Fl_Callback*)cb_volume);
- volume->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->GlobalPar.PVolume);
- } // Fl_Value_Slider* volume
- { Fl_Value_Slider* o = vsns = new Fl_Value_Slider(10, 50, 160, 15, "V.Sns");
- vsns->tooltip("Velocity Sensing Function (rightmost to disable)");
- vsns->type(5);
- vsns->box(FL_NO_BOX);
- vsns->labelsize(11);
- vsns->maximum(127);
- vsns->step(1);
- vsns->callback((Fl_Callback*)cb_vsns);
- vsns->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->GlobalPar.PAmpVelocityScaleFunction);
- } // Fl_Value_Slider* vsns
- { WidgetPDial* o = pan = new WidgetPDial(210, 25, 30, 30, "Pan");
- pan->tooltip("Panning (leftmost is Random)");
- pan->box(FL_ROUND_UP_BOX);
- pan->color(FL_BACKGROUND_COLOR);
- pan->selection_color(FL_INACTIVE_COLOR);
- pan->labeltype(FL_NORMAL_LABEL);
- pan->labelfont(0);
- pan->labelsize(10);
- pan->labelcolor(FL_FOREGROUND_COLOR);
- pan->maximum(127);
- pan->step(1);
- pan->callback((Fl_Callback*)cb_pan);
- pan->align(Fl_Align(FL_ALIGN_BOTTOM));
- pan->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PPanning);
- } // WidgetPDial* pan
- { WidgetPDial* o = pstr = new WidgetPDial(125, 237, 25, 25, "P.Str.");
- pstr->tooltip("Punch Strength");
- pstr->box(FL_ROUND_UP_BOX);
- pstr->color(FL_BACKGROUND_COLOR);
- pstr->selection_color(FL_INACTIVE_COLOR);
- pstr->labeltype(FL_NORMAL_LABEL);
- pstr->labelfont(0);
- pstr->labelsize(10);
- pstr->labelcolor(FL_FOREGROUND_COLOR);
- pstr->maximum(127);
- pstr->step(1);
- pstr->callback((Fl_Callback*)cb_pstr);
- pstr->align(Fl_Align(FL_ALIGN_TOP));
- pstr->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PPunchStrength);
- } // WidgetPDial* pstr
- { WidgetPDial* o = pt = new WidgetPDial(155, 237, 25, 25, "P.t.");
- pt->tooltip("Punch Time (duration)");
- pt->box(FL_ROUND_UP_BOX);
- pt->color(FL_BACKGROUND_COLOR);
- pt->selection_color(FL_INACTIVE_COLOR);
- pt->labeltype(FL_NORMAL_LABEL);
- pt->labelfont(0);
- pt->labelsize(10);
- pt->labelcolor(FL_FOREGROUND_COLOR);
- pt->maximum(127);
- pt->step(1);
- pt->callback((Fl_Callback*)cb_pt);
- pt->align(Fl_Align(FL_ALIGN_TOP));
- pt->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PPunchTime);
- } // WidgetPDial* pt
- { WidgetPDial* o = pstc = new WidgetPDial(185, 237, 25, 25, "P.Stc.");
- pstc->tooltip("Punch Stretch");
- pstc->box(FL_ROUND_UP_BOX);
- pstc->color(FL_BACKGROUND_COLOR);
- pstc->selection_color(FL_INACTIVE_COLOR);
- pstc->labeltype(FL_NORMAL_LABEL);
- pstc->labelfont(0);
- pstc->labelsize(10);
- pstc->labelcolor(FL_FOREGROUND_COLOR);
- pstc->maximum(127);
- pstc->step(1);
- pstc->callback((Fl_Callback*)cb_pstc);
- pstc->align(Fl_Align(FL_ALIGN_TOP));
- pstc->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PPunchStretch);
- } // WidgetPDial* pstc
- { WidgetPDial* o = pvel = new WidgetPDial(215, 237, 25, 25, "P.Vel.");
- pvel->tooltip("Punch Velocity Sensing");
- pvel->box(FL_ROUND_UP_BOX);
- pvel->color(FL_BACKGROUND_COLOR);
- pvel->selection_color(FL_INACTIVE_COLOR);
- pvel->labeltype(FL_NORMAL_LABEL);
- pvel->labelfont(0);
- pvel->labelsize(10);
- pvel->labelcolor(FL_FOREGROUND_COLOR);
- pvel->maximum(127);
- pvel->step(1);
- pvel->callback((Fl_Callback*)cb_pvel);
- pvel->align(Fl_Align(FL_ALIGN_TOP));
- pvel->when(FL_WHEN_CHANGED);
- o->value(pars->GlobalPar.PPunchVelocitySensing);
- } // WidgetPDial* pvel
- { EnvelopeUI* o = ampenv = new EnvelopeUI(10, 75, 205, 70, "ADSynth Global - Amplitude Envelope");
- ampenv->box(FL_FLAT_BOX);
- ampenv->color((Fl_Color)51);
- ampenv->selection_color(FL_BACKGROUND_COLOR);
- ampenv->labeltype(FL_NORMAL_LABEL);
- ampenv->labelfont(0);
- ampenv->labelsize(14);
- ampenv->labelcolor(FL_FOREGROUND_COLOR);
- ampenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- ampenv->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.AmpEnvelope);
- ampenv->end();
- } // EnvelopeUI* ampenv
- { LFOUI* o = amplfo = new LFOUI(10, 150, 230, 70, "Amplitude LFO ");
- amplfo->box(FL_FLAT_BOX);
- amplfo->color(FL_DARK1);
- amplfo->selection_color(FL_BACKGROUND_COLOR);
- amplfo->labeltype(FL_NORMAL_LABEL);
- amplfo->labelfont(0);
- amplfo->labelsize(14);
- amplfo->labelcolor(FL_FOREGROUND_COLOR);
- amplfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- amplfo->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.AmpLfo);
- amplfo->end();
- } // LFOUI* amplfo
- { Fl_Check_Button* o = rndgrp = new Fl_Check_Button(70, 235, 40, 25, "Rnd Grp");
- rndgrp->tooltip("How the Harmonic Amplitude is applied to voices that use the same oscillator");
- rndgrp->down_box(FL_DOWN_BOX);
- rndgrp->labelsize(10);
- rndgrp->callback((Fl_Callback*)cb_rndgrp);
- rndgrp->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(pars->GlobalPar.Hrandgrouping);
- } // Fl_Check_Button* rndgrp
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(250, 5, 285, 265, "FILTER");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = filterenv = new EnvelopeUI(255, 118, 275, 70, "ADSynth Global - Filter Envelope");
- filterenv->box(FL_FLAT_BOX);
- filterenv->color((Fl_Color)51);
- filterenv->selection_color(FL_BACKGROUND_COLOR);
- filterenv->labeltype(FL_NORMAL_LABEL);
- filterenv->labelfont(0);
- filterenv->labelsize(14);
- filterenv->labelcolor(FL_FOREGROUND_COLOR);
- filterenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterenv->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.FilterEnvelope);
- filterenv->end();
- } // EnvelopeUI* filterenv
- { LFOUI* o = filterlfo = new LFOUI(255, 195, 230, 70, "Filter LFO");
- filterlfo->box(FL_FLAT_BOX);
- filterlfo->color(FL_DARK1);
- filterlfo->selection_color(FL_BACKGROUND_COLOR);
- filterlfo->labeltype(FL_NORMAL_LABEL);
- filterlfo->labelfont(0);
- filterlfo->labelsize(14);
- filterlfo->labelcolor(FL_FOREGROUND_COLOR);
- filterlfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterlfo->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.FilterLfo);
- filterlfo->end();
- } // LFOUI* filterlfo
- { FilterUI* o = filterui = new FilterUI(255, 35, 275, 75, "ADsynth Global - Filter");
- filterui->box(FL_FLAT_BOX);
- filterui->color(FL_LIGHT1);
- filterui->selection_color(FL_BACKGROUND_COLOR);
- filterui->labeltype(FL_NORMAL_LABEL);
- filterui->labelfont(0);
- filterui->labelsize(14);
- filterui->labelcolor(FL_FOREGROUND_COLOR);
- filterui->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterui->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalPar.GlobalFilter,&pars->GlobalPar.PFilterVelocityScale,&pars->GlobalPar.PFilterVelocityScaleFunction);
- filterui->end();
- } // FilterUI* filterui
- o->end();
- } // Fl_Group* o
- { Fl_Check_Button* o = stereo = new Fl_Check_Button(5, 230, 65, 35, "Stereo");
- stereo->down_box(FL_DOWN_BOX);
- stereo->labelsize(11);
- stereo->callback((Fl_Callback*)cb_stereo);
- o->value(pars->GlobalPar.PStereo);
- } // Fl_Check_Button* stereo
- { Fl_Button* o = new Fl_Button(180, 400, 125, 25, "Show Voice List");
- o->labelsize(12);
- o->callback((Fl_Callback*)cb_Show);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(5, 400, 170, 25, "Show Voice Parameters");
- o->labelsize(12);
- o->callback((Fl_Callback*)cb_Show1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(475, 400, 60, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(309, 400, 86, 25, "Resonance");
- o->tooltip("Resonance");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(12);
- o->callback((Fl_Callback*)cb_Resonance);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(405, 405, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(435, 405, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- ADnoteGlobalParameters->end();
- } // Fl_Double_Window* ADnoteGlobalParameters
- { ADnoteVoice = new Fl_Double_Window(765, 620, "ADsynth Voice Parameters");
- ADnoteVoice->user_data((void*)(this));
- { ADvoiceUI* o = advoice = new ADvoiceUI(0, 0, 765, 585);
- advoice->box(FL_NO_BOX);
- advoice->color(FL_BACKGROUND_COLOR);
- advoice->selection_color(FL_BACKGROUND_COLOR);
- advoice->labeltype(FL_NORMAL_LABEL);
- advoice->labelfont(0);
- advoice->labelsize(14);
- advoice->labelcolor(FL_FOREGROUND_COLOR);
- advoice->align(Fl_Align(FL_ALIGN_TOP));
- advoice->when(FL_WHEN_RELEASE);
- o->init(pars,nvoice,master);
- o->show();
- advoice->end();
- } // ADvoiceUI* advoice
- { Fl_Button* o = new Fl_Button(305, 590, 195, 25, "Close Window");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->callback((Fl_Callback*)cb_Close1);
- } // Fl_Button* o
- { Fl_Counter* o = currentvoicecounter = new Fl_Counter(10, 590, 130, 25, "Current Voice");
- currentvoicecounter->type(1);
- currentvoicecounter->labelfont(1);
- currentvoicecounter->minimum(0);
- currentvoicecounter->maximum(2);
- currentvoicecounter->step(1);
- currentvoicecounter->value(1);
- currentvoicecounter->textfont(1);
- currentvoicecounter->textsize(13);
- currentvoicecounter->callback((Fl_Callback*)cb_currentvoicecounter);
- currentvoicecounter->align(Fl_Align(FL_ALIGN_RIGHT));
- o->bounds(1,NUM_VOICES);
- } // Fl_Counter* currentvoicecounter
- { Fl_Button* o = new Fl_Button(705, 595, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(735, 595, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P1);
- } // Fl_Button* o
- ADnoteVoice->end();
- } // Fl_Double_Window* ADnoteVoice
- { ADnoteVoiceList = new Fl_Double_Window(650, 260, "ADsynth Voices list");
- ADnoteVoiceList->user_data((void*)(this));
- { Fl_Text_Display* o = new Fl_Text_Display(10, 15, 30, 10, "No.");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Text_Display* o = new Fl_Text_Display(145, 15, 30, 10, "Vol");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Text_Display* o = new Fl_Text_Display(384, 15, 25, 10, "Detune");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Text_Display* o = new Fl_Text_Display(210, 15, 30, 10, "Pan");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Text_Display* o = new Fl_Text_Display(560, 15, 30, 10, "Vib. Depth");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Text_Display* o = new Fl_Text_Display(245, 15, 25, 10, "R.");
- o->box(FL_NO_BOX);
- o->labelfont(1);
- o->labelsize(11);
- } // Fl_Text_Display* o
- { Fl_Button* o = new Fl_Button(255, 237, 125, 20, "Hide Voice List");
- o->callback((Fl_Callback*)cb_Hide);
- } // Fl_Button* o
- { Fl_Scroll* o = new Fl_Scroll(0, 15, 640, 220);
- o->type(2);
- o->box(FL_THIN_UP_BOX);
- { Fl_Pack* o = new Fl_Pack(0, 20, 620, 210);
- for (int i=0;iinit(pars,i,master);}
- o->end();
- } // Fl_Pack* o
- o->end();
- } // Fl_Scroll* o
- ADnoteVoiceList->end();
- } // Fl_Double_Window* ADnoteVoiceList
- return ADnoteVoiceList;
-}
-
-ADnoteUI::ADnoteUI(ADnoteParameters *parameters,Master *master_) {
- pars=parameters;
- master=master_;
- nvoice=0;
- resui=new ResonanceUI(pars->GlobalPar.Reson);
- make_window();
-}
-
-ADnoteUI::~ADnoteUI() {
- ADnoteVoiceList->hide();
- ADnoteGlobalParameters->hide();
- ADnoteVoice->hide();
- delete(ADnoteVoiceList);
- delete(ADnoteGlobalParameters);
- delete(ADnoteVoice);
- delete(resui);
-}
-
-void ADnoteUI::refresh() {
- volume->value(pars->GlobalPar.PVolume);
- vsns->value(pars->GlobalPar.PAmpVelocityScaleFunction);
- pan->value(pars->GlobalPar.PPanning);
-
- stereo->value(pars->GlobalPar.PStereo);
- rndgrp->value(pars->GlobalPar.Hrandgrouping);
-
- pstr->value(pars->GlobalPar.PPunchStrength);
- pt->value(pars->GlobalPar.PPunchTime);
- pstc->value(pars->GlobalPar.PPunchStretch);
- pvel->value(pars->GlobalPar.PPunchVelocitySensing);
-
- detunevalueoutput->value(getdetune(pars->GlobalPar.PDetuneType,0,pars->GlobalPar.PDetune));
- freq->value(pars->GlobalPar.PDetune-8192);
-
- int k=pars->GlobalPar.PCoarseDetune/1024;if (k>=8) k-=16;
- octave->value(k);
-
- detunetype->value(pars->GlobalPar.PDetuneType-1);
- k=pars->GlobalPar.PCoarseDetune%1024;if (k>=512) k-=1024;
- coarsedet->value(k);
- amplfo->refresh();
- freqlfo->refresh();
- filterlfo->refresh();
-
- ampenv->refresh();
- freqenv->refresh();
- filterenv->refresh();
- filterui->refresh();
-
- for (int i=0;irefreshlist();
-
- resui->refresh();
- currentvoicecounter->do_callback();
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.h b/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.h
deleted file mode 100644
index 78656bd7b..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/ADnoteUI.h
+++ /dev/null
@@ -1,387 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef ADnoteUI_h
-#define ADnoteUI_h
-#include
-#include "../Params/ADnoteParameters.h"
-#include "../Misc/Util.h"
-#include "../Misc/Master.h"
-#include "ResonanceUI.h"
-#include
-#include
-#include "WidgetPDial.h"
-#include "EnvelopeUI.h"
-#include "LFOUI.h"
-#include "FilterUI.h"
-#include "OscilGenUI.h"
-#include "PresetsUI.h"
-#include
-#include
-#include
-#include
-#include
-#include
-
-class ADvoicelistitem : public Fl_Group {
- Fl_Group* make_window();
- Fl_Group *ADnoteVoiceListItem;
- Fl_Group *voicelistitemgroup;
-public:
- Fl_Value_Slider *voicevolume;
-private:
- void cb_voicevolume_i(Fl_Value_Slider*, void*);
- static void cb_voicevolume(Fl_Value_Slider*, void*);
-public:
- Fl_Check_Button *voiceresonanceenabled;
-private:
- void cb_voiceresonanceenabled_i(Fl_Check_Button*, void*);
- static void cb_voiceresonanceenabled(Fl_Check_Button*, void*);
-public:
- Fl_Value_Slider *voicelfofreq;
-private:
- void cb_voicelfofreq_i(Fl_Value_Slider*, void*);
- static void cb_voicelfofreq(Fl_Value_Slider*, void*);
-public:
- WidgetPDial *voicepanning;
-private:
- void cb_voicepanning_i(WidgetPDial*, void*);
- static void cb_voicepanning(WidgetPDial*, void*);
-public:
- Fl_Group *voiceoscil;
- Fl_Value_Output *detunevalueoutput;
-private:
- void cb_detunevalueoutput_i(Fl_Value_Output*, void*);
- static void cb_detunevalueoutput(Fl_Value_Output*, void*);
-public:
- Fl_Slider *voicedetune;
-private:
- void cb_voicedetune_i(Fl_Slider*, void*);
- static void cb_voicedetune(Fl_Slider*, void*);
-public:
- Fl_Box *noiselabel;
-private:
- void cb_noiselabel_i(Fl_Box*, void*);
- static void cb_noiselabel(Fl_Box*, void*);
- Fl_Check_Button *voiceenabled;
- void cb_voiceenabled_i(Fl_Check_Button*, void*);
- static void cb_voiceenabled(Fl_Check_Button*, void*);
-public:
- ADvoicelistitem(int x,int y, int w, int h, const char *label=0);
- void init(ADnoteParameters *parameters,int nvoice_,Master *master_);
- void refreshlist();
- ~ADvoicelistitem();
-private:
- ADnoteParameters *pars;
- int nvoice;
- Oscilloscope *osc;
- Master *master;
-};
-#include
-#include
-#include
-
-class ADvoiceUI : public Fl_Group {
-public:
- Fl_Group* make_window();
- Fl_Group *ADnoteVoiceParameters;
- Fl_Group *voiceparametersgroup;
- Fl_Group *voicemodegroup;
- Fl_Group *voiceFMparametersgroup;
- Fl_Group *modfrequency;
- EnvelopeUI *voiceFMfreqenvgroup;
-private:
- void cb_On_i(Fl_Check_Button*, void*);
- static void cb_On(Fl_Check_Button*, void*);
- void cb_Coarse_i(Fl_Counter*, void*);
- static void cb_Coarse(Fl_Counter*, void*);
- void cb_Octave_i(Fl_Counter*, void*);
- static void cb_Octave(Fl_Counter*, void*);
- void cb__i(Fl_Slider*, void*);
- static void cb_(Fl_Slider*, void*);
-public:
- Fl_Value_Output *fmdetunevalueoutput;
-private:
- void cb_fmdetunevalueoutput_i(Fl_Value_Output*, void*);
- static void cb_fmdetunevalueoutput(Fl_Value_Output*, void*);
- void cb_Detune_i(Fl_Choice*, void*);
- static void cb_Detune(Fl_Choice*, void*);
- void cb_Vol_i(Fl_Value_Slider*, void*);
- static void cb_Vol(Fl_Value_Slider*, void*);
- void cb_V_i(Fl_Value_Slider*, void*);
- static void cb_V(Fl_Value_Slider*, void*);
-public:
- EnvelopeUI *voiceFMampenvgroup;
-private:
- void cb_On1_i(Fl_Check_Button*, void*);
- static void cb_On1(Fl_Check_Button*, void*);
- void cb_F_i(Fl_Value_Slider*, void*);
- static void cb_F(Fl_Value_Slider*, void*);
-public:
- Fl_Group *modoscil;
- Fl_Group *fmoscil;
- Fl_Button *changeFMoscilbutton;
-private:
- void cb_changeFMoscilbutton_i(Fl_Button*, void*);
- static void cb_changeFMoscilbutton(Fl_Button*, void*);
- void cb_Phase_i(Fl_Slider*, void*);
- static void cb_Phase(Fl_Slider*, void*);
- void cb_Use_i(Fl_Choice*, void*);
- static void cb_Use(Fl_Choice*, void*);
- void cb_External_i(Fl_Choice*, void*);
- static void cb_External(Fl_Choice*, void*);
- void cb_Type_i(Fl_Choice*, void*);
- static void cb_Type(Fl_Choice*, void*);
- static Fl_Menu_Item menu_Type[];
-public:
- EnvelopeUI *voicefreqenvgroup;
-private:
- void cb_On2_i(Fl_Check_Button*, void*);
- static void cb_On2(Fl_Check_Button*, void*);
-public:
- LFOUI *voicefreqlfogroup;
-private:
- void cb_On3_i(Fl_Check_Button*, void*);
- static void cb_On3(Fl_Check_Button*, void*);
- void cb_Octave1_i(Fl_Counter*, void*);
- static void cb_Octave1(Fl_Counter*, void*);
- void cb_Coarse1_i(Fl_Counter*, void*);
- static void cb_Coarse1(Fl_Counter*, void*);
- void cb_1_i(Fl_Slider*, void*);
- static void cb_1(Fl_Slider*, void*);
-public:
- Fl_Value_Output *detunevalueoutput;
-private:
- void cb_detunevalueoutput1_i(Fl_Value_Output*, void*);
- static void cb_detunevalueoutput1(Fl_Value_Output*, void*);
- void cb_440Hz_i(Fl_Check_Button*, void*);
- static void cb_440Hz(Fl_Check_Button*, void*);
-public:
- WidgetPDial *fixedfreqetdial;
-private:
- void cb_fixedfreqetdial_i(WidgetPDial*, void*);
- static void cb_fixedfreqetdial(WidgetPDial*, void*);
- void cb_Detune1_i(Fl_Choice*, void*);
- static void cb_Detune1(Fl_Choice*, void*);
-public:
- Fl_Group *voiceoscil;
- Fl_Button *changevoiceoscilbutton;
-private:
- void cb_changevoiceoscilbutton_i(Fl_Button*, void*);
- static void cb_changevoiceoscilbutton(Fl_Button*, void*);
- void cb_Phase1_i(Fl_Slider*, void*);
- static void cb_Phase1(Fl_Slider*, void*);
- void cb_R_i(Fl_Check_Button*, void*);
- static void cb_R(Fl_Check_Button*, void*);
- void cb_Use1_i(Fl_Choice*, void*);
- static void cb_Use1(Fl_Choice*, void*);
- void cb_Stereo_i(WidgetPDial*, void*);
- static void cb_Stereo(WidgetPDial*, void*);
- void cb_Unison_i(Fl_Choice*, void*);
- static void cb_Unison(Fl_Choice*, void*);
- void cb_Vibratto_i(WidgetPDial*, void*);
- static void cb_Vibratto(WidgetPDial*, void*);
- void cb_Invert_i(Fl_Choice*, void*);
- static void cb_Invert(Fl_Choice*, void*);
- void cb_Frequency_i(Fl_Slider*, void*);
- static void cb_Frequency(Fl_Slider*, void*);
-public:
- Fl_Value_Output *unisonspreadoutput;
-private:
- void cb_unisonspreadoutput_i(Fl_Value_Output*, void*);
- static void cb_unisonspreadoutput(Fl_Value_Output*, void*);
- void cb_Vib_i(WidgetPDial*, void*);
- static void cb_Vib(WidgetPDial*, void*);
- void cb_Vol1_i(Fl_Value_Slider*, void*);
- static void cb_Vol1(Fl_Value_Slider*, void*);
- void cb_V1_i(Fl_Value_Slider*, void*);
- static void cb_V1(Fl_Value_Slider*, void*);
-public:
- EnvelopeUI *voiceampenvgroup;
-private:
- void cb_Pan_i(WidgetPDial*, void*);
- static void cb_Pan(WidgetPDial*, void*);
- void cb_On4_i(Fl_Check_Button*, void*);
- static void cb_On4(Fl_Check_Button*, void*);
-public:
- LFOUI *voiceamplfogroup;
-private:
- void cb_On5_i(Fl_Check_Button*, void*);
- static void cb_On5(Fl_Check_Button*, void*);
- void cb_Minus_i(Fl_Check_Button*, void*);
- static void cb_Minus(Fl_Check_Button*, void*);
-public:
- Fl_Group *voicefiltergroup;
- EnvelopeUI *voicefilterenvgroup;
-private:
- void cb_On6_i(Fl_Check_Button*, void*);
- static void cb_On6(Fl_Check_Button*, void*);
-public:
- LFOUI *voicefilterlfogroup;
-private:
- void cb_On7_i(Fl_Check_Button*, void*);
- static void cb_On7(Fl_Check_Button*, void*);
- void cb_2_i(Fl_Choice*, void*);
- static void cb_2(Fl_Choice*, void*);
- static Fl_Menu_Item menu_[];
-public:
- Fl_Check_Button *bypassfiltercheckbutton;
-private:
- void cb_bypassfiltercheckbutton_i(Fl_Check_Button*, void*);
- static void cb_bypassfiltercheckbutton(Fl_Check_Button*, void*);
- void cb_Delay_i(Fl_Value_Slider*, void*);
- static void cb_Delay(Fl_Value_Slider*, void*);
- void cb_On8_i(Fl_Check_Button*, void*);
- static void cb_On8(Fl_Check_Button*, void*);
-public:
- Fl_Box *noiselabel;
-private:
- void cb_noiselabel1_i(Fl_Box*, void*);
- static void cb_noiselabel1(Fl_Box*, void*);
-public:
- Fl_Check_Button *voiceonbutton;
-private:
- void cb_voiceonbutton_i(Fl_Check_Button*, void*);
- static void cb_voiceonbutton(Fl_Check_Button*, void*);
-public:
- ADvoiceUI(int x,int y, int w, int h, const char *label=0);
- void init(ADnoteParameters *parameters,int nvoice_,Master *master_);
- ~ADvoiceUI();
-private:
- int nvoice;
- ADnoteParameters *pars;
- OscilEditor *oscedit;
- Oscilloscope *osc;
- Oscilloscope *oscFM;
- Master *master;
-};
-#include
-#include
-#include
-#include
-
-class ADnoteUI : public PresetsUI_ {
- Fl_Double_Window* make_window();
-public:
- Fl_Double_Window *ADnoteGlobalParameters;
- EnvelopeUI *freqenv;
- Fl_Counter *octave;
-private:
- void cb_octave_i(Fl_Counter*, void*);
- static void cb_octave(Fl_Counter*, void*);
-public:
- Fl_Counter *coarsedet;
-private:
- void cb_coarsedet_i(Fl_Counter*, void*);
- static void cb_coarsedet(Fl_Counter*, void*);
-public:
- LFOUI *freqlfo;
- Fl_Slider *freq;
-private:
- void cb_freq_i(Fl_Slider*, void*);
- static void cb_freq(Fl_Slider*, void*);
-public:
- Fl_Value_Output *detunevalueoutput;
-private:
- void cb_detunevalueoutput2_i(Fl_Value_Output*, void*);
- static void cb_detunevalueoutput2(Fl_Value_Output*, void*);
-public:
- Fl_Choice *detunetype;
-private:
- void cb_detunetype_i(Fl_Choice*, void*);
- static void cb_detunetype(Fl_Choice*, void*);
- void cb_relBW_i(WidgetPDial*, void*);
- static void cb_relBW(WidgetPDial*, void*);
-public:
- Fl_Value_Slider *volume;
-private:
- void cb_volume_i(Fl_Value_Slider*, void*);
- static void cb_volume(Fl_Value_Slider*, void*);
-public:
- Fl_Value_Slider *vsns;
-private:
- void cb_vsns_i(Fl_Value_Slider*, void*);
- static void cb_vsns(Fl_Value_Slider*, void*);
-public:
- WidgetPDial *pan;
-private:
- void cb_pan_i(WidgetPDial*, void*);
- static void cb_pan(WidgetPDial*, void*);
-public:
- WidgetPDial *pstr;
-private:
- void cb_pstr_i(WidgetPDial*, void*);
- static void cb_pstr(WidgetPDial*, void*);
-public:
- WidgetPDial *pt;
-private:
- void cb_pt_i(WidgetPDial*, void*);
- static void cb_pt(WidgetPDial*, void*);
-public:
- WidgetPDial *pstc;
-private:
- void cb_pstc_i(WidgetPDial*, void*);
- static void cb_pstc(WidgetPDial*, void*);
-public:
- WidgetPDial *pvel;
-private:
- void cb_pvel_i(WidgetPDial*, void*);
- static void cb_pvel(WidgetPDial*, void*);
-public:
- EnvelopeUI *ampenv;
- LFOUI *amplfo;
- Fl_Check_Button *rndgrp;
-private:
- void cb_rndgrp_i(Fl_Check_Button*, void*);
- static void cb_rndgrp(Fl_Check_Button*, void*);
-public:
- EnvelopeUI *filterenv;
- LFOUI *filterlfo;
- FilterUI *filterui;
- Fl_Check_Button *stereo;
-private:
- void cb_stereo_i(Fl_Check_Button*, void*);
- static void cb_stereo(Fl_Check_Button*, void*);
- void cb_Show_i(Fl_Button*, void*);
- static void cb_Show(Fl_Button*, void*);
- void cb_Show1_i(Fl_Button*, void*);
- static void cb_Show1(Fl_Button*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
- void cb_Resonance_i(Fl_Button*, void*);
- static void cb_Resonance(Fl_Button*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- Fl_Double_Window *ADnoteVoice;
- ADvoiceUI *advoice;
-private:
- void cb_Close1_i(Fl_Button*, void*);
- static void cb_Close1(Fl_Button*, void*);
-public:
- Fl_Counter *currentvoicecounter;
-private:
- void cb_currentvoicecounter_i(Fl_Counter*, void*);
- static void cb_currentvoicecounter(Fl_Counter*, void*);
- void cb_C1_i(Fl_Button*, void*);
- static void cb_C1(Fl_Button*, void*);
- void cb_P1_i(Fl_Button*, void*);
- static void cb_P1(Fl_Button*, void*);
-public:
- Fl_Double_Window *ADnoteVoiceList;
-private:
- void cb_Hide_i(Fl_Button*, void*);
- static void cb_Hide(Fl_Button*, void*);
-public:
- ADnoteUI(ADnoteParameters *parameters,Master *master_);
- ~ADnoteUI();
- void refresh();
-private:
- ADnoteParameters *pars;
- ResonanceUI *resui;
- Master *master;
- int nvoice;
- ADvoicelistitem *voicelistitem[NUM_VOICES];
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/BankUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/BankUI.cpp
deleted file mode 100644
index 89696a974..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/BankUI.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/BankUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-void BankProcess_::process() {
- ;
-}
-
-BankSlot::BankSlot(int x,int y, int w, int h, const char *label):Fl_Button(x,y,w,h,label) {
- what=NULL;
- whatslot=NULL;
- nslot=0;
- nselected=NULL;
-}
-
-int BankSlot::handle(int event) {
- if (what==NULL) return(0);
- if (Fl::event_inside(this)){
- *what=0;*whatslot=nslot;
- if ((event==FL_RELEASE)&&(Fl::event_button()==1))*what=1;
- if ((event==FL_RELEASE)&&(Fl::event_button()==3))*what=2;
- if (event==FL_PUSH) highlight=1;
- }else highlight=0;
-
- int tmp=Fl_Button::handle(event);
- if ((*what!=0) && Fl::event_inside(this)) (bp->*fnc)();
- return(tmp);
-}
-
-void BankSlot::init(int nslot_, int *what_, int *whatslot_,void (BankProcess_:: *fnc_)(void),BankProcess_ *bp_,Bank *bank_,int *nselected_) {
- nslot=nslot_;
- what=what_;
- whatslot=whatslot_;
- fnc=fnc_;
- bp=bp_;
- bank=bank_;
- nselected=nselected_;
- box(FL_THIN_UP_BOX);
- labelfont(0);
- labelsize(13);
- align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
-
- highlight=0;
- refresh();
-}
-
-void BankSlot::refresh() {
- if (bank->emptyslot(nslot))
- color(46);
- else if (bank->isPADsynth_used(nslot))
- color(26);
- else
- color(51);
-
-
- if (*nselected==nslot)
- color(6);
-
-
- copy_label(bank->getnamenumbered(nslot).c_str());
-}
-
-void BankUI::cb_Close_i(Fl_Button*, void*) {
- bankuiwindow->hide();
-}
-void BankUI::cb_Close(Fl_Button* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void BankUI::cb_writebutton_i(Fl_Light_Button* o, void*) {
- if (o->value()>0.5) mode=2;
-removeselection();
-}
-void BankUI::cb_writebutton(Fl_Light_Button* o, void* v) {
- ((BankUI*)(o->parent()->parent()->user_data()))->cb_writebutton_i(o,v);
-}
-
-void BankUI::cb_readbutton_i(Fl_Light_Button* o, void*) {
- if (o->value()>0.5) mode=1;
-removeselection();
-}
-void BankUI::cb_readbutton(Fl_Light_Button* o, void* v) {
- ((BankUI*)(o->parent()->parent()->user_data()))->cb_readbutton_i(o,v);
-}
-
-void BankUI::cb_clearbutton_i(Fl_Light_Button* o, void*) {
- if (o->value()>0.5) mode=3;
-removeselection();
-}
-void BankUI::cb_clearbutton(Fl_Light_Button* o, void* v) {
- ((BankUI*)(o->parent()->parent()->user_data()))->cb_clearbutton_i(o,v);
-}
-
-void BankUI::cb_swapbutton_i(Fl_Light_Button* o, void*) {
- if (o->value()>0.5) mode=4;
-removeselection();
-}
-void BankUI::cb_swapbutton(Fl_Light_Button* o, void* v) {
- ((BankUI*)(o->parent()->parent()->user_data()))->cb_swapbutton_i(o,v);
-}
-
-void BankUI::cb_New_i(Fl_Button*, void*) {
- const char *dirname;
-
-dirname=fl_input("New empty Bank:");
-if (dirname==NULL) return;
-
-
-int result=bank->newbank(dirname);
-
-if (result!=0) fl_alert("Error: Could not make a new bank (directory)..");
-
-refreshmainwindow();
-}
-void BankUI::cb_New(Fl_Button* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_New_i(o,v);
-}
-
-void BankUI::cb_auto_i(Fl_Check_Button* o, void*) {
- config.cfg.BankUIAutoClose=(int) o->value();
-}
-void BankUI::cb_auto(Fl_Check_Button* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_auto_i(o,v);
-}
-
-void BankUI::cb_banklist_i(Fl_Choice* o, void*) {
- int n=o->value();
-std::string dirname=bank->banks[n].dir;
-if (dirname.empty()) return;
-
-if (bank->loadbank(dirname)==2)
- fl_alert("Error: Could not load the bank from the directory\n%s.",dirname.c_str());
-for (int i=0;irefresh();
-refreshmainwindow();
-}
-void BankUI::cb_banklist(Fl_Choice* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_banklist_i(o,v);
-}
-
-void BankUI::cb_Refresh_i(Fl_Button*, void*) {
- rescan_for_banks();
-banklist->value(0);
-}
-void BankUI::cb_Refresh(Fl_Button* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_Refresh_i(o,v);
-}
-
-void BankUI::cb_Show_i(Fl_Check_Button* o, void*) {
- config.cfg.CheckPADsynth=(int) o->value();
-refreshmainwindow();
-}
-void BankUI::cb_Show(Fl_Check_Button* o, void* v) {
- ((BankUI*)(o->parent()->user_data()))->cb_Show_i(o,v);
-}
-
-Fl_Double_Window* BankUI::make_window() {
- { Fl_Double_Window* o = bankuiwindow = new Fl_Double_Window(785, 575, "Bank");
- bankuiwindow->user_data((void*)(this));
- { Fl_Button* o = new Fl_Button(705, 546, 70, 24, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(5, 34, 772, 491);
- o->box(FL_ENGRAVED_FRAME);
- { Fl_Pack* o = new Fl_Pack(10, 39, 150, 481);
- o->box(FL_BORDER_FRAME);
- o->box(FL_NO_BOX);
- 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);};
- o->end();
- } // Fl_Pack* o
- { Fl_Pack* o = new Fl_Pack(163, 39, 150, 481);
- o->box(FL_BORDER_FRAME);
- o->box(FL_NO_BOX);
- 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);};
- o->end();
- } // Fl_Pack* o
- { Fl_Pack* o = new Fl_Pack(316, 39, 150, 481);
- o->box(FL_BORDER_FRAME);
- o->box(FL_NO_BOX);
- 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);};
- o->end();
- } // Fl_Pack* o
- { Fl_Pack* o = new Fl_Pack(469, 39, 150, 481);
- o->box(FL_BORDER_FRAME);
- o->box(FL_NO_BOX);
- 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);};
- o->end();
- } // Fl_Pack* o
- { Fl_Pack* o = new Fl_Pack(622, 39, 150, 481);
- o->box(FL_BORDER_FRAME);
- o->box(FL_NO_BOX);
- 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);};
- o->end();
- } // Fl_Pack* o
- o->end();
- } // Fl_Group* o
- { modeselect = new Fl_Group(5, 528, 425, 42);
- modeselect->box(FL_ENGRAVED_BOX);
- { Fl_Light_Button* o = writebutton = new Fl_Light_Button(116, 534, 99, 30, "WRITE");
- writebutton->type(102);
- writebutton->down_box(FL_THIN_DOWN_BOX);
- writebutton->selection_color((Fl_Color)1);
- writebutton->labeltype(FL_ENGRAVED_LABEL);
- writebutton->labelfont(1);
- writebutton->labelsize(13);
- writebutton->callback((Fl_Callback*)cb_writebutton);
- if (bank->locked()) o->deactivate();
- } // Fl_Light_Button* writebutton
- { Fl_Light_Button* o = readbutton = new Fl_Light_Button(11, 534, 99, 30, "READ");
- readbutton->type(102);
- readbutton->down_box(FL_THIN_DOWN_BOX);
- readbutton->selection_color((Fl_Color)101);
- readbutton->labeltype(FL_ENGRAVED_LABEL);
- readbutton->labelfont(1);
- readbutton->labelsize(13);
- readbutton->callback((Fl_Callback*)cb_readbutton);
- o->value(1);
- } // Fl_Light_Button* readbutton
- { Fl_Light_Button* o = clearbutton = new Fl_Light_Button(221, 534, 99, 30, "CLEAR");
- clearbutton->type(102);
- clearbutton->down_box(FL_THIN_DOWN_BOX);
- clearbutton->selection_color(FL_FOREGROUND_COLOR);
- clearbutton->labeltype(FL_ENGRAVED_LABEL);
- clearbutton->labelfont(1);
- clearbutton->labelsize(13);
- clearbutton->callback((Fl_Callback*)cb_clearbutton);
- if (bank->locked()) o->deactivate();
- } // Fl_Light_Button* clearbutton
- { Fl_Light_Button* o = swapbutton = new Fl_Light_Button(325, 534, 99, 30, "SWAP");
- swapbutton->type(102);
- swapbutton->down_box(FL_THIN_DOWN_BOX);
- swapbutton->selection_color((Fl_Color)227);
- swapbutton->labeltype(FL_ENGRAVED_LABEL);
- swapbutton->labelfont(1);
- swapbutton->labelsize(13);
- swapbutton->callback((Fl_Callback*)cb_swapbutton);
- if (bank->locked()) o->deactivate();
- } // Fl_Light_Button* swapbutton
- modeselect->end();
- } // Fl_Group* modeselect
- { Fl_Button* o = new Fl_Button(685, 5, 93, 25, "New Bank...");
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_New);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(705, 529, 60, 15, "auto close");
- o->tooltip("automatically close the bank window if the instrument is loaded");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_auto);
- o->value(config.cfg.BankUIAutoClose);
- } // Fl_Check_Button* o
- { banklist = new Fl_Choice(5, 8, 220, 20);
- banklist->down_box(FL_BORDER_BOX);
- banklist->labelfont(1);
- banklist->textfont(1);
- banklist->textsize(11);
- banklist->callback((Fl_Callback*)cb_banklist);
- banklist->align(Fl_Align(FL_ALIGN_CENTER));
- } // Fl_Choice* banklist
- { Fl_Button* o = new Fl_Button(230, 8, 105, 20, "Refresh bank list");
- o->tooltip("Refresh the bank list (rescan)");
- o->box(FL_THIN_UP_BOX);
- o->color(FL_LIGHT1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Refresh);
- } // Fl_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(435, 530, 150, 15, "Show PADsynth status");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Show);
- o->value(config.cfg.CheckPADsynth);
- } // Fl_Check_Button* o
- o->label(bank->bankfiletitle.c_str());
- 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.");
- bankuiwindow->end();
- } // Fl_Double_Window* bankuiwindow
- return bankuiwindow;
-}
-
-BankUI::BankUI(Master *master_,int *npart_) {
- fnc=&BankProcess_::process;
- master=master_;
- npart=npart_;
- bank=&master_->bank;
- what=0;
- nselected=-1;
- make_window();
- mode=1;
-}
-
-BankUI::~BankUI() {
- bankuiwindow->hide();
- delete(bankuiwindow);
-}
-
-void BankUI::show() {
- bankuiwindow->show();
- simplesetmode(config.cfg.UserInterfaceMode==2);
-}
-
-void BankUI::hide() {
- bankuiwindow->hide();
-}
-
-void BankUI::init(Fl_Valuator *cbwig_) {
- cbwig=cbwig_;
- rescan_for_banks();
-}
-
-void BankUI::process() {
- int slot=this->slot;
-
- if ((what==2)&&(bank->emptyslot(slot)==0)&&(mode!=4)) {//Rename slot
- const char *tmp=fl_input("Slot (instrument) name:",bank->getname(slot).c_str());
- if (tmp!=NULL) bank->setname(slot,tmp,-1);
- bs[slot]->refresh();
- };
-
- if ((what==1)&&(mode==1)&&(!bank->emptyslot(slot))){//Reads from slot
- pthread_mutex_lock(&master->part[*npart]->load_mutex);
- bank->loadfromslot(slot,master->part[*npart]);
- 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();
-
- if (config.cfg.BankUIAutoClose!=0)
- bankuiwindow->hide();
-
- };
-
- 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->part[*npart]->load_mutex);
- bank->savetoslot(slot,master->part[*npart]);
- pthread_mutex_unlock(&master->part[*npart]->load_mutex);
-
- bs[slot]->refresh();
- mode=1;readbutton->value(1);writebutton->value(0);
- nooverwriteslot:;
- };
-
-
-
- if ((what==1)&&(mode==3)&&(!bank->emptyslot(slot))){//Clears the slot
- if (fl_choice("Clear the slot no. %d ?","No","Yes",NULL,slot+1)){
- bank->clearslot(slot);
- bs[slot]->refresh();
- };
- };
-
- if (mode==4){//swap
- bool done=false;
- if ((what==1)&&(nselected>=0)){
- bank->swapslot(nselected,slot);
- int ns=nselected;
- nselected=-1;
- bs[slot]->refresh();
- bs[ns]->refresh();
- done=true;
- };
- if (((nselected<0)||(what==2))&&(!done)){
- int ns=nselected;
- nselected=slot;
- if (ns>0) bs[ns]->refresh();
- bs[slot]->refresh();
- };
- };
- if (mode!=4) refreshmainwindow();
-}
-
-void BankUI::refreshmainwindow() {
- bankuiwindow->label(bank->bankfiletitle.c_str());
- mode=1;readbutton->value(1);writebutton->value(0);clearbutton->value(0);swapbutton->value(0);
- nselected=-1;
- if (bank->locked()){
- writebutton->deactivate();
- clearbutton->deactivate();
- swapbutton->deactivate();
- } else {
- writebutton->activate();
- clearbutton->activate();
- swapbutton->activate();
- };
- for (int i=0;irefresh();
-}
-
-void BankUI::removeselection() {
- if (nselected>=0) {
- int ns=nselected;
- nselected=-1;
- bs[ns]->refresh();
- };
-}
-
-void BankUI::rescan_for_banks() {
- banklist->clear();
- bank->rescanforbanks();
-
- for (unsigned int i=0;ibanks.size();i++) {
- banklist->add(bank->banks[i].name.c_str());
- }
- if (banklist->size() == 0)
- banklist->add(" ");
-}
-
-void BankUI::simplesetmode(bool beginnerui) {
- readbutton->value(1);
- mode=1;
- removeselection();
- if (beginnerui) modeselect->hide();
- else modeselect->show();
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/BankUI.h b/source/modules/carla_native/zynaddsubfx/UI/BankUI.h
deleted file mode 100644
index 7126b4647..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/BankUI.h
+++ /dev/null
@@ -1,103 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef BankUI_h
-#define BankUI_h
-#include
-#include
-#include
-#include
-#include
-#include
-#include "../Misc/Master.h"
-#include "../Misc/Part.h"
-#include "../Misc/Bank.h"
-#include "../Misc/Config.h"
-#include "../Misc/Util.h"
-
-class BankProcess_ {
-public:
- virtual void process();
- Bank *bank;
-};
-
-class BankSlot : public Fl_Button,BankProcess_ {
-public:
- BankSlot(int x,int y, int w, int h, const char *label=0);
- int handle(int event);
- void init(int nslot_, int *what_, int *whatslot_,void (BankProcess_:: *fnc_)(void),BankProcess_ *bp_,Bank *bank_,int *nselected_);
- void refresh();
-private:
- int *what,*whatslot,nslot,highlight, *nselected;
- void (BankProcess_:: *fnc)(void);
- BankProcess_ *bp;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class BankUI : public BankProcess_ {
-public:
- Fl_Double_Window* make_window();
- Fl_Double_Window *bankuiwindow;
-private:
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
-public:
- Fl_Group *modeselect;
- Fl_Light_Button *writebutton;
-private:
- void cb_writebutton_i(Fl_Light_Button*, void*);
- static void cb_writebutton(Fl_Light_Button*, void*);
-public:
- Fl_Light_Button *readbutton;
-private:
- void cb_readbutton_i(Fl_Light_Button*, void*);
- static void cb_readbutton(Fl_Light_Button*, void*);
-public:
- Fl_Light_Button *clearbutton;
-private:
- void cb_clearbutton_i(Fl_Light_Button*, void*);
- static void cb_clearbutton(Fl_Light_Button*, void*);
-public:
- Fl_Light_Button *swapbutton;
-private:
- void cb_swapbutton_i(Fl_Light_Button*, void*);
- static void cb_swapbutton(Fl_Light_Button*, void*);
- void cb_New_i(Fl_Button*, void*);
- static void cb_New(Fl_Button*, void*);
- void cb_auto_i(Fl_Check_Button*, void*);
- static void cb_auto(Fl_Check_Button*, void*);
-public:
- Fl_Choice *banklist;
-private:
- void cb_banklist_i(Fl_Choice*, void*);
- static void cb_banklist(Fl_Choice*, void*);
- void cb_Refresh_i(Fl_Button*, void*);
- static void cb_Refresh(Fl_Button*, void*);
- void cb_Show_i(Fl_Check_Button*, void*);
- static void cb_Show(Fl_Check_Button*, void*);
-public:
- BankUI(Master *master_,int *npart_);
- virtual ~BankUI();
- void show();
- void hide();
- void init(Fl_Valuator *cbwig_);
- void process();
- void refreshmainwindow();
- void removeselection();
- void rescan_for_banks();
- void simplesetmode(bool beginnerui);
-private:
- BankSlot *bs[BANK_SIZE];
- int slot,what; //"what"=what button is pressed
- int mode,*npart,nselected;
- Master *master;
- void (BankProcess_::* fnc)(void);
-public:
- Fl_Valuator *cbwig;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.cpp
deleted file mode 100644
index 9b0bc3428..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.cpp
+++ /dev/null
@@ -1,573 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/ConfigUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-void ConfigUI::cb_configwindow_i(Fl_Double_Window* o, void*) {
- writebankcfg();
-o->hide();
-}
-void ConfigUI::cb_configwindow(Fl_Double_Window* o, void* v) {
- ((ConfigUI*)(o->user_data()))->cb_configwindow_i(o,v);
-}
-
-void ConfigUI::cb__i(Fl_Choice* o, void*) {
- if ((int)o->value()==0) samplerateinput->activate();
- else samplerateinput->deactivate();
-
-int samplerates[8]={44100,16000,22050,32000,44100,48000,88200,96000};
-config.cfg.SampleRate=samplerates[(int)o->value()];
-
-setsamplerateinput();
-}
-void ConfigUI::cb_(Fl_Choice* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb__i(o,v);
-}
-
-Fl_Menu_Item ConfigUI::menu_[] = {
- {"Custom", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"16000Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"22050Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"32000Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"44100Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"48000Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"88200Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"96000Hz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ConfigUI::cb_samplerateinput_i(Fl_Int_Input* o, void*) {
- char *tmp;
-config.cfg.SampleRate=strtoul(o->value(),&tmp,10);
-}
-void ConfigUI::cb_samplerateinput(Fl_Int_Input* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_samplerateinput_i(o,v);
-}
-
-void ConfigUI::cb_Buffer_i(Fl_Int_Input* o, void*) {
- char *tmp;
-config.cfg.SoundBufferSize=strtoul(o->value(),&tmp,10);
-}
-void ConfigUI::cb_Buffer(Fl_Int_Input* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Buffer_i(o,v);
-}
-
-void ConfigUI::cb_Swap_i(Fl_Light_Button* o, void*) {
- config.cfg.SwapStereo=(int) o->value();
-}
-void ConfigUI::cb_Swap(Fl_Light_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Swap_i(o,v);
-}
-
-void ConfigUI::cb_OscilSize_i(Fl_Choice* o, void*) {
- config.cfg.OscilSize=128<value();
-}
-void ConfigUI::cb_OscilSize(Fl_Choice* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_OscilSize_i(o,v);
-}
-
-Fl_Menu_Item ConfigUI::menu_OscilSize[] = {
- {"128", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"256", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"512", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"1024", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"2048", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"4096", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"8192", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"16384", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ConfigUI::cb_Dump_i(Fl_File_Input* o, void*) {
- config.cfg.DumpFile = o->value();
-}
-void ConfigUI::cb_Dump(Fl_File_Input* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Dump_i(o,v);
-}
-
-void ConfigUI::cb_Dump1_i(Fl_Check_Button* o, void*) {
- config.cfg.DumpNotesToFile=(int) o->value();
-dump.startnow();//this has effect only if this option was disabled;
-}
-void ConfigUI::cb_Dump1(Fl_Check_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Dump1_i(o,v);
-}
-
-void ConfigUI::cb_Append_i(Fl_Check_Button* o, void*) {
- config.cfg.DumpAppend=(int) o->value();
-}
-void ConfigUI::cb_Append(Fl_Check_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Append_i(o,v);
-}
-
-void ConfigUI::cb_OSS_i(Fl_File_Input* o, void*) {
- snprintf(config.cfg.LinuxOSSSeqInDev,config.maxstringsize,"%s",o->value());
-}
-void ConfigUI::cb_OSS(Fl_File_Input* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_OSS_i(o,v);
-}
-
-void ConfigUI::cb_OSS1_i(Fl_File_Input* o, void*) {
- snprintf(config.cfg.LinuxOSSWaveOutDev,config.maxstringsize,"%s",o->value());
-}
-void ConfigUI::cb_OSS1(Fl_File_Input* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_OSS1_i(o,v);
-}
-
-void ConfigUI::cb_Midi_i(Fl_Counter* o, void*) {
- config.cfg.WindowsMidiInId=(int) o->value();
-midiinputnamebox->label(config.winmididevices[config.cfg.WindowsMidiInId].name);
-}
-void ConfigUI::cb_Midi(Fl_Counter* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_Midi_i(o,v);
-}
-
-void ConfigUI::cb_XML_i(Fl_Counter* o, void*) {
- config.cfg.GzipCompression=(int) o->value();
-}
-void ConfigUI::cb_XML(Fl_Counter* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_XML_i(o,v);
-}
-
-void ConfigUI::cb_PADsynth_i(Fl_Choice* o, void*) {
- config.cfg.Interpolation=(int) o->value();
-}
-void ConfigUI::cb_PADsynth(Fl_Choice* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_PADsynth_i(o,v);
-}
-
-Fl_Menu_Item ConfigUI::menu_PADsynth[] = {
- {"Linear(fast)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cubic(slow)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ConfigUI::cb_Virtual_i(Fl_Choice* o, void*) {
- config.cfg.VirKeybLayout=(int) o->value();;
-}
-void ConfigUI::cb_Virtual(Fl_Choice* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Virtual_i(o,v);
-}
-
-Fl_Menu_Item ConfigUI::menu_Virtual[] = {
- {" ", 0, 0, 0, 1, FL_NORMAL_LABEL, 1, 11, 0},
- {"QWERTY", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Dvorak", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"QWERTZ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"AZERTY", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void ConfigUI::cb_Ignore_i(Fl_Check_Button* o, void*) {
- config.cfg.IgnoreProgramChange=(int) o->value();
-}
-void ConfigUI::cb_Ignore(Fl_Check_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Ignore_i(o,v);
-}
-
-void ConfigUI::cb_rootsbrowse_i(Fl_Browser* o, void*) {
- activatebutton_rootdir(o->value()!=0);
-}
-void ConfigUI::cb_rootsbrowse(Fl_Browser* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_rootsbrowse_i(o,v);
-}
-
-void ConfigUI::cb_Add_i(Fl_Button*, void*) {
- const char *dirname;
-dirname=fl_dir_chooser("Add a root directory for banks:",NULL,0);
-if (dirname==NULL) return;
-
-rootsbrowse->add(dirname);
-}
-void ConfigUI::cb_Add(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Add_i(o,v);
-}
-
-void ConfigUI::cb_removerootdirbutton_i(Fl_Button*, void*) {
- if (rootsbrowse->value()!=0) {
- rootsbrowse->remove(rootsbrowse->value());
-};
-activatebutton_rootdir(false);
-}
-void ConfigUI::cb_removerootdirbutton(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_removerootdirbutton_i(o,v);
-}
-
-void ConfigUI::cb_makedefaultrootdirbutton_i(Fl_Button*, void*) {
- int n=rootsbrowse->value();
-
-if (n!=0) {
- rootsbrowse->move(1,n);
- rootsbrowse->value(1);
- rootsbrowse->redraw();
-};
-activatebutton_rootdir(true);
-}
-void ConfigUI::cb_makedefaultrootdirbutton(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_makedefaultrootdirbutton_i(o,v);
-}
-
-void ConfigUI::cb_presetbrowse_i(Fl_Browser* o, void*) {
- activatebutton_presetdir(o->value()!=0);
-}
-void ConfigUI::cb_presetbrowse(Fl_Browser* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_presetbrowse_i(o,v);
-}
-
-void ConfigUI::cb_Add1_i(Fl_Button*, void*) {
- const char *dirname;
-dirname=fl_dir_chooser("Add a preset directory :",NULL,0);
-if (dirname==NULL) return;
-
-presetbrowse->add(dirname);
-}
-void ConfigUI::cb_Add1(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_Add1_i(o,v);
-}
-
-void ConfigUI::cb_removepresetbutton_i(Fl_Button*, void*) {
- if (presetbrowse->value()!=0) {
- presetbrowse->remove(presetbrowse->value());
-};
-activatebutton_presetdir(false);
-}
-void ConfigUI::cb_removepresetbutton(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_removepresetbutton_i(o,v);
-}
-
-void ConfigUI::cb_makedefaultpresetbutton_i(Fl_Button*, void*) {
- int n=presetbrowse->value();
-
-if (n!=0) {
- presetbrowse->move(1,n);
- presetbrowse->value(1);
- presetbrowse->redraw();
-};
-activatebutton_presetdir(true);
-}
-void ConfigUI::cb_makedefaultpresetbutton(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->parent()->parent()->user_data()))->cb_makedefaultpresetbutton_i(o,v);
-}
-
-void ConfigUI::cb_Close_i(Fl_Button*, void*) {
- configwindow->hide();
-writebankcfg();
-writepresetcfg();
-}
-void ConfigUI::cb_Close(Fl_Button* o, void* v) {
- ((ConfigUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-Fl_Double_Window* ConfigUI::make_window() {
- { configwindow = new Fl_Double_Window(510, 370, "ZynAddSubFX Settings");
- configwindow->callback((Fl_Callback*)cb_configwindow, (void*)(this));
- { Fl_Tabs* o = new Fl_Tabs(5, 5, 500, 330);
- { Fl_Group* o = new Fl_Group(5, 25, 500, 310, "Main settings");
- { Fl_Group* o = new Fl_Group(15, 45, 165, 30, "Sample Rate");
- o->box(FL_ENGRAVED_FRAME);
- { Fl_Choice* o = new Fl_Choice(20, 50, 85, 20);
- o->down_box(FL_BORDER_BOX);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_);
- o->menu(menu_);
- o->value(getsamplerateorder());
- } // Fl_Choice* o
- { Fl_Int_Input* o = samplerateinput = new Fl_Int_Input(115, 50, 60, 20);
- samplerateinput->type(2);
- samplerateinput->textfont(1);
- samplerateinput->callback((Fl_Callback*)cb_samplerateinput);
- setsamplerateinput();
- if (getsamplerateorder()!=0) o->deactivate();
- } // Fl_Int_Input* samplerateinput
- o->end();
- } // Fl_Group* o
- { Fl_Int_Input* o = new Fl_Int_Input(190, 45, 60, 20, "Buffer Size");
- o->tooltip("Internal Sound Buffer Size (samples)");
- o->type(2);
- o->labelsize(11);
- o->textfont(1);
- o->callback((Fl_Callback*)cb_Buffer);
- o->align(Fl_Align(129));
- char *tmpbuf=new char[100];o->cut(0,o->maximum_size());
- snprintf(tmpbuf,100,"%d",config.cfg.SoundBufferSize);o->insert(tmpbuf);
- delete []tmpbuf;
- } // Fl_Int_Input* o
- { Fl_Light_Button* o = new Fl_Light_Button(20, 80, 85, 20, "Swap Stereo ");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Swap);
- o->value(config.cfg.SwapStereo);
- } // Fl_Light_Button* o
- { Fl_Choice* o = new Fl_Choice(175, 80, 75, 20, "OscilSize");
- o->tooltip("ADSynth Oscillator Size (samples)");
- o->down_box(FL_BORDER_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_OscilSize);
- o->menu(menu_OscilSize);
- o->value( (int) (log(config.cfg.OscilSize/128.0-1.0)/log(2)) +1);
- } // Fl_Choice* o
- { Fl_Box* o = new Fl_Box(10, 300, 235, 30, "Most settings has effect only after ZynAddSubFX is restarted.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(10, 280, 240, 15, "Read the Readme.txt for other settings");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Box* o
- { Fl_Group* o = new Fl_Group(15, 125, 230, 85);
- o->box(FL_ENGRAVED_BOX);
- { Fl_File_Input* o = new Fl_File_Input(20, 170, 220, 35, "Dump File");
- o->callback((Fl_Callback*)cb_Dump);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->insert(config.cfg.DumpFile.c_str());
- } // Fl_File_Input* o
- { Fl_Check_Button* o = new Fl_Check_Button(20, 130, 100, 20, "Dump notes");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_Dump1);
- o->value(config.cfg.DumpNotesToFile);
- } // Fl_Check_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(160, 130, 80, 20, "Append");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_Append);
- o->value(config.cfg.DumpAppend);
- } // Fl_Check_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(255, 45, 245, 260);
- o->box(FL_ENGRAVED_FRAME);
- { Fl_Box* o = new Fl_Box(260, 50, 235, 45, "Note: Not all the following settings are used (this depends on the operating \
-system, etc..)");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Box* o
- { Fl_Group* o = new Fl_Group(260, 110, 235, 115, "Linux");
- o->box(FL_ENGRAVED_BOX);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- { Fl_File_Input* o = new Fl_File_Input(265, 180, 225, 35, "OSS Sequencer Device (/dev/...)");
- o->callback((Fl_Callback*)cb_OSS);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->insert(config.cfg.LinuxOSSSeqInDev);
- } // Fl_File_Input* o
- { Fl_File_Input* o = new Fl_File_Input(265, 130, 225, 35, "OSS Wave Out Device (/dev/...)");
- o->callback((Fl_Callback*)cb_OSS1);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->insert(config.cfg.LinuxOSSWaveOutDev);
- } // Fl_File_Input* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(260, 250, 235, 50, "Windows");
- o->box(FL_ENGRAVED_BOX);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- { Fl_Counter* o = new Fl_Counter(270, 270, 65, 20, "Midi In Dev");
- o->type(1);
- o->labelsize(11);
- o->minimum(0);
- o->maximum(100);
- o->step(1);
- o->callback((Fl_Callback*)cb_Midi);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->maximum(config.winmidimax-1);
- o->value(config.cfg.WindowsMidiInId);
- } // Fl_Counter* o
- { Fl_Box* o = midiinputnamebox = new Fl_Box(340, 260, 150, 35, "Midi input device name");
- midiinputnamebox->labelfont(1);
- midiinputnamebox->labelsize(11);
- midiinputnamebox->align(Fl_Align(196|FL_ALIGN_INSIDE));
- o->label(config.winmididevices[config.cfg.WindowsMidiInId].name);
- } // Fl_Box* midiinputnamebox
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Group* o
- { Fl_Counter* o = new Fl_Counter(20, 215, 65, 15, "XML compression level");
- o->tooltip("gzip compression level (0 - uncompressed)");
- o->type(1);
- o->labelsize(11);
- o->minimum(0);
- o->maximum(9);
- o->step(1);
- o->callback((Fl_Callback*)cb_XML);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(config.cfg.GzipCompression);
- } // Fl_Counter* o
- { Fl_Choice* o = new Fl_Choice(175, 105, 75, 15, "PADsynth Interpolation");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_PADsynth);
- o->menu(menu_PADsynth);
- o->value(config.cfg.Interpolation);
- } // Fl_Choice* o
- { Fl_Choice* o = new Fl_Choice(155, 235, 85, 20, "Virtual Keyboard Layout");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(12);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Virtual);
- o->menu(menu_Virtual);
- o->value(config.cfg.VirKeybLayout);
- } // Fl_Choice* o
- { Fl_Check_Button* o = new Fl_Check_Button(10, 255, 230, 20, "Ignore MIDI Program Change");
- o->down_box(FL_DOWN_BOX);
- o->callback((Fl_Callback*)cb_Ignore);
- o->value(config.cfg.IgnoreProgramChange);
- } // Fl_Check_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 25, 500, 285, "Bank root dirs");
- o->hide();
- { rootsbrowse = new Fl_Browser(15, 35, 485, 220);
- rootsbrowse->type(2);
- rootsbrowse->callback((Fl_Callback*)cb_rootsbrowse);
- } // Fl_Browser* rootsbrowse
- { Fl_Button* o = new Fl_Button(15, 265, 80, 35, "Add root directory...");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Add);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- { Fl_Button* o = removerootdirbutton = new Fl_Button(105, 265, 80, 35, "Remove root dir...");
- removerootdirbutton->box(FL_THIN_UP_BOX);
- removerootdirbutton->callback((Fl_Callback*)cb_removerootdirbutton);
- removerootdirbutton->align(Fl_Align(FL_ALIGN_WRAP));
- o->deactivate();
- } // Fl_Button* removerootdirbutton
- { Fl_Button* o = makedefaultrootdirbutton = new Fl_Button(190, 265, 80, 35, "Make default");
- makedefaultrootdirbutton->box(FL_THIN_UP_BOX);
- makedefaultrootdirbutton->callback((Fl_Callback*)cb_makedefaultrootdirbutton);
- makedefaultrootdirbutton->align(Fl_Align(FL_ALIGN_WRAP));
- o->deactivate();
- } // Fl_Button* makedefaultrootdirbutton
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 25, 500, 285, "Presets dirs");
- o->hide();
- { presetbrowse = new Fl_Browser(15, 35, 485, 220);
- presetbrowse->type(2);
- presetbrowse->callback((Fl_Callback*)cb_presetbrowse);
- } // Fl_Browser* presetbrowse
- { Fl_Button* o = new Fl_Button(15, 265, 80, 35, "Add preset directory...");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Add1);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- { Fl_Button* o = removepresetbutton = new Fl_Button(105, 265, 80, 35, "Remove preset dir...");
- removepresetbutton->box(FL_THIN_UP_BOX);
- removepresetbutton->callback((Fl_Callback*)cb_removepresetbutton);
- removepresetbutton->align(Fl_Align(FL_ALIGN_WRAP));
- o->deactivate();
- } // Fl_Button* removepresetbutton
- { Fl_Button* o = makedefaultpresetbutton = new Fl_Button(190, 265, 80, 35, "Make default");
- makedefaultpresetbutton->box(FL_THIN_UP_BOX);
- makedefaultpresetbutton->callback((Fl_Callback*)cb_makedefaultpresetbutton);
- makedefaultpresetbutton->align(Fl_Align(FL_ALIGN_WRAP));
- o->deactivate();
- } // Fl_Button* makedefaultpresetbutton
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Tabs* o
- { Fl_Button* o = new Fl_Button(200, 345, 105, 20, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- configwindow->end();
- } // Fl_Double_Window* configwindow
- return configwindow;
-}
-
-ConfigUI::ConfigUI() {
- make_window();
- readbankcfg();
- readpresetcfg();
-}
-
-void ConfigUI::activatebutton_rootdir(bool active) {
- if (active) {
- removerootdirbutton->activate();
- makedefaultrootdirbutton->activate();
- }else{
- removerootdirbutton->deactivate();
- makedefaultrootdirbutton->deactivate();
- };
-}
-
-void ConfigUI::activatebutton_presetdir(bool active) {
- if (active) {
- removepresetbutton->activate();
- makedefaultpresetbutton->activate();
- }else{
- removepresetbutton->deactivate();
- makedefaultpresetbutton->deactivate();
- };
-}
-
-void ConfigUI::readbankcfg() {
- rootsbrowse->clear();
-
- for (int i=0;iadd(config.cfg.bankRootDirList[i].c_str());
- };
-}
-
-void ConfigUI::writebankcfg() {
- config.clearbankrootdirlist();
-
- for (int n=0;nsize();n++){
- config.cfg.bankRootDirList[n] = rootsbrowse->text(n+1);
- };
-}
-
-void ConfigUI::readpresetcfg() {
- presetbrowse->clear();
-
- for(int i=0;iadd(config.cfg.presetsDirList[i].c_str());
- };
-}
-
-void ConfigUI::writepresetcfg() {
- config.clearpresetsdirlist();
-
- for (int n=0;nsize();n++)
- config.cfg.presetsDirList[n] = presetbrowse->text(n+1);
-}
-
-int ConfigUI::getsamplerateorder() {
- int smpr=config.cfg.SampleRate;
- int order=0;
- switch(smpr){
- case 16000:order=1;break;
- case 22050:order=2;break;
- case 32000:order=3;break;
- case 44100:order=4;break;
- case 48000:order=5;break;
- case 88200:order=6;break;
- case 96000:order=7;break;
- default:order=0;break;
- };
- return(order);
-}
-
-void ConfigUI::setsamplerateinput() {
- char *tmpbuf=new char[100];
- samplerateinput->cut(0,samplerateinput->maximum_size());
- snprintf(tmpbuf,100,"%d",config.cfg.SampleRate);
- samplerateinput->insert(tmpbuf);
- delete []tmpbuf;
-}
-
-void ConfigUI::show() {
- configwindow->show();
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.h b/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.h
deleted file mode 100644
index 11dd01a0f..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/ConfigUI.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef ConfigUI_h
-#define ConfigUI_h
-#include
-#include
-#include
-#include
-#include
-#include "../globals.h"
-#include "../Misc/Util.h"
-#include "../Misc/Dump.h"
-extern Dump dump;
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class ConfigUI {
-public:
- Fl_Double_Window* make_window();
- Fl_Double_Window *configwindow;
-private:
- void cb_configwindow_i(Fl_Double_Window*, void*);
- static void cb_configwindow(Fl_Double_Window*, void*);
- void cb__i(Fl_Choice*, void*);
- static void cb_(Fl_Choice*, void*);
- static Fl_Menu_Item menu_[];
-public:
- Fl_Int_Input *samplerateinput;
-private:
- void cb_samplerateinput_i(Fl_Int_Input*, void*);
- static void cb_samplerateinput(Fl_Int_Input*, void*);
- void cb_Buffer_i(Fl_Int_Input*, void*);
- static void cb_Buffer(Fl_Int_Input*, void*);
- void cb_Swap_i(Fl_Light_Button*, void*);
- static void cb_Swap(Fl_Light_Button*, void*);
- void cb_OscilSize_i(Fl_Choice*, void*);
- static void cb_OscilSize(Fl_Choice*, void*);
- static Fl_Menu_Item menu_OscilSize[];
- void cb_Dump_i(Fl_File_Input*, void*);
- static void cb_Dump(Fl_File_Input*, void*);
- void cb_Dump1_i(Fl_Check_Button*, void*);
- static void cb_Dump1(Fl_Check_Button*, void*);
- void cb_Append_i(Fl_Check_Button*, void*);
- static void cb_Append(Fl_Check_Button*, void*);
- void cb_OSS_i(Fl_File_Input*, void*);
- static void cb_OSS(Fl_File_Input*, void*);
- void cb_OSS1_i(Fl_File_Input*, void*);
- static void cb_OSS1(Fl_File_Input*, void*);
- void cb_Midi_i(Fl_Counter*, void*);
- static void cb_Midi(Fl_Counter*, void*);
-public:
- Fl_Box *midiinputnamebox;
-private:
- void cb_XML_i(Fl_Counter*, void*);
- static void cb_XML(Fl_Counter*, void*);
- void cb_PADsynth_i(Fl_Choice*, void*);
- static void cb_PADsynth(Fl_Choice*, void*);
- static Fl_Menu_Item menu_PADsynth[];
- void cb_Virtual_i(Fl_Choice*, void*);
- static void cb_Virtual(Fl_Choice*, void*);
- static Fl_Menu_Item menu_Virtual[];
- void cb_Ignore_i(Fl_Check_Button*, void*);
- static void cb_Ignore(Fl_Check_Button*, void*);
-public:
- Fl_Browser *rootsbrowse;
-private:
- void cb_rootsbrowse_i(Fl_Browser*, void*);
- static void cb_rootsbrowse(Fl_Browser*, void*);
- void cb_Add_i(Fl_Button*, void*);
- static void cb_Add(Fl_Button*, void*);
-public:
- Fl_Button *removerootdirbutton;
-private:
- void cb_removerootdirbutton_i(Fl_Button*, void*);
- static void cb_removerootdirbutton(Fl_Button*, void*);
-public:
- Fl_Button *makedefaultrootdirbutton;
-private:
- void cb_makedefaultrootdirbutton_i(Fl_Button*, void*);
- static void cb_makedefaultrootdirbutton(Fl_Button*, void*);
-public:
- Fl_Browser *presetbrowse;
-private:
- void cb_presetbrowse_i(Fl_Browser*, void*);
- static void cb_presetbrowse(Fl_Browser*, void*);
- void cb_Add1_i(Fl_Button*, void*);
- static void cb_Add1(Fl_Button*, void*);
-public:
- Fl_Button *removepresetbutton;
-private:
- void cb_removepresetbutton_i(Fl_Button*, void*);
- static void cb_removepresetbutton(Fl_Button*, void*);
-public:
- Fl_Button *makedefaultpresetbutton;
-private:
- void cb_makedefaultpresetbutton_i(Fl_Button*, void*);
- static void cb_makedefaultpresetbutton(Fl_Button*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
-public:
- ConfigUI();
- void activatebutton_rootdir(bool active);
- void activatebutton_presetdir(bool active);
- void readbankcfg();
- void writebankcfg();
- void readpresetcfg();
- void writepresetcfg();
- int getsamplerateorder();
- void setsamplerateinput();
- void show();
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/EffUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/EffUI.cpp
deleted file mode 100644
index ecf6cfd55..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/EffUI.cpp
+++ /dev/null
@@ -1,3993 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/EffUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-EQGraph::EQGraph(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- eff=NULL;
- maxdB=30;
-}
-
-void EQGraph::init(EffectMgr *eff_) {
- eff=eff_;
- oldx=-1;
- khzval=-1;
-}
-
-void EQGraph::draw_freq_line(float freq,int type) {
- fl_color(FL_GRAY);
- float freqx=getfreqpos(freq);
- switch(type){
- case 0:if (active_r()) fl_color(FL_WHITE);
- else fl_color(205,205,205);
- fl_line_style(FL_SOLID);
- break;
- case 1:fl_line_style(FL_DOT);break;
- case 2:fl_line_style(FL_DASH);break;
- };
-
-
- if ((freqx>0.0)&&(freqx<1.0))
- fl_line(x()+(int) (freqx*w()),y(),
- x()+(int) (freqx*w()),y()+h());
-}
-
-void EQGraph::draw() {
- int ox=x(),oy=y(),lx=w(),ly=h(),i;
- double iy,oiy;
- float freqx;
-
- 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_lighter( FL_GRAY));
-
- fl_line_style(FL_SOLID);
- fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2);
-
- freqx=getfreqpos(1000.0);
- if ((freqx>0.0)&&(freqx<1.0))
- fl_line(ox+(int) (freqx*lx),oy,
- ox+(int) (freqx*lx),oy+ly);
-
- for (i=1;i<10;i++){
- if(i==1){
- draw_freq_line(i*100.0,0);
- draw_freq_line(i*1000.0,0);
- }else
- if (i==5){
- draw_freq_line(i*10.0,2);
- draw_freq_line(i*100.0,2);
- draw_freq_line(i*1000.0,2);
- }else{
- draw_freq_line(i*10.0,1);
- draw_freq_line(i*100.0,1);
- draw_freq_line(i*1000.0,1);
- };
- };
-
- draw_freq_line(10000.0,0);
- draw_freq_line(20000.0,1);
-
-
- fl_line_style(FL_DOT);
- int GY=6;if (lysynth->samplerate/2) break;
- iy=getresponse(ly,frq);
- if ((oiy>=0) && (oiy=0) && (iygetEQfreqresponse(freq);
- int idbresp=(int) ((dbresp/maxdB+1.0)*maxy/2.0);
-
-
- //fprintf(stderr,"%.5f\n",(dbresp/maxdB+1.0)*maxy/2.0);
-
-
- return(idbresp);
-}
-
-float EQGraph::getfreqx(float x) {
- if (x>1.0) x=1.0;
- return(20.0*pow((float)1000.0,x));
-}
-
-float EQGraph::getfreqpos(float freq) {
- if (freq<0.00001) freq=0.00001;
- return(log(freq/20.0)/log(1000.0));
-}
-
-void EffUI::cb_revp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-
-refresh(eff);
-}
-void EffUI::cb_revp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_revp[] = {
- {"Cathedral 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cathedral 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cathedral 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hall 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hall 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Room 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Room 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Basement", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Tunnel", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echoed 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echoed 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Very Long 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Very Long 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_revp10_i(Fl_Choice* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-if (eff->geteffectpar(10)==2) revp12->activate();
- else revp12->deactivate();
-}
-void EffUI::cb_revp10(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp10_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_revp10[] = {
- {"Random", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Freeverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Bandwidth", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_revp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_revp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp0_i(o,v);
-}
-
-void EffUI::cb_revp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_revp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp1_i(o,v);
-}
-
-void EffUI::cb_revp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_revp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp2_i(o,v);
-}
-
-void EffUI::cb_revp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_revp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp3_i(o,v);
-}
-
-void EffUI::cb_revp4_i(WidgetPDial* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_revp4(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp4_i(o,v);
-}
-
-void EffUI::cb_revp12_i(WidgetPDial* o, void*) {
- eff->seteffectpar(12,(int) o->value());
-}
-void EffUI::cb_revp12(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp12_i(o,v);
-}
-
-void EffUI::cb_revp6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_revp6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp6_i(o,v);
-}
-
-void EffUI::cb_revp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_revp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp7_i(o,v);
-}
-
-void EffUI::cb_revp8_i(WidgetPDial* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_revp8(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp8_i(o,v);
-}
-
-void EffUI::cb_revp9_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_revp9(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp9_i(o,v);
-}
-
-void EffUI::cb_revp11_i(WidgetPDial* o, void*) {
- int x=64;
-if (Fl::event_button1()) x=(int)o->value();
- else o->value(x);
-eff->seteffectpar(11,x);
-}
-void EffUI::cb_revp11(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_revp11_i(o,v);
-}
-
-void EffUI::cb_echop_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_echop(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_echop[] = {
- {"Echo 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Simple Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Canyon", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Feedback Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_echop0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_echop0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop0_i(o,v);
-}
-
-void EffUI::cb_echop1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_echop1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop1_i(o,v);
-}
-
-void EffUI::cb_echop2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_echop2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop2_i(o,v);
-}
-
-void EffUI::cb_echop3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_echop3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop3_i(o,v);
-}
-
-void EffUI::cb_echop4_i(WidgetPDial* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_echop4(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop4_i(o,v);
-}
-
-void EffUI::cb_echop5_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_echop5(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop5_i(o,v);
-}
-
-void EffUI::cb_echop6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_echop6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_echop6_i(o,v);
-}
-
-void EffUI::cb_chorusp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_chorusp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_chorusp[] = {
- {"Chorus 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Celeste 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Celeste 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_chorusp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_chorusp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp0_i(o,v);
-}
-
-void EffUI::cb_chorusp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_chorusp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp1_i(o,v);
-}
-
-void EffUI::cb_chorusp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_chorusp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp2_i(o,v);
-}
-
-void EffUI::cb_chorusp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_chorusp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp3_i(o,v);
-}
-
-void EffUI::cb_chorusp5_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_chorusp5(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp5_i(o,v);
-}
-
-void EffUI::cb_chorusp6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_chorusp6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp6_i(o,v);
-}
-
-void EffUI::cb_chorusp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_chorusp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp7_i(o,v);
-}
-
-void EffUI::cb_chorusp8_i(WidgetPDial* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_chorusp8(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp8_i(o,v);
-}
-
-void EffUI::cb_chorusp9_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_chorusp9(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp9_i(o,v);
-}
-
-void EffUI::cb_Flange_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-}
-void EffUI::cb_Flange(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_Flange_i(o,v);
-}
-
-void EffUI::cb_chorusp11_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(11,(int) o->value());
-}
-void EffUI::cb_chorusp11(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp11_i(o,v);
-}
-
-void EffUI::cb_chorusp4_i(Fl_Choice* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_chorusp4(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_chorusp4_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_chorusp4[] = {
- {"SINE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"TRI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_phaserp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_phaserp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_phaserp[] = {
- {"Phaser 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"APhaser 6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_phaserp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_phaserp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp0_i(o,v);
-}
-
-void EffUI::cb_phaserp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_phaserp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp1_i(o,v);
-}
-
-void EffUI::cb_phaserp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_phaserp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp2_i(o,v);
-}
-
-void EffUI::cb_phaserp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_phaserp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp3_i(o,v);
-}
-
-void EffUI::cb_phaserp4_i(Fl_Choice* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_phaserp4(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp4_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_phaserp4[] = {
- {"SIN", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"TRI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_phaserp5_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_phaserp5(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp5_i(o,v);
-}
-
-void EffUI::cb_phaserp6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_phaserp6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp6_i(o,v);
-}
-
-void EffUI::cb_phaserp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_phaserp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp7_i(o,v);
-}
-
-void EffUI::cb_phaserp8_i(Fl_Counter* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_phaserp8(Fl_Counter* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp8_i(o,v);
-}
-
-void EffUI::cb_phaserp9_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_phaserp9(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp9_i(o,v);
-}
-
-void EffUI::cb_phaserp10_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-}
-void EffUI::cb_phaserp10(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp10_i(o,v);
-}
-
-void EffUI::cb_phaserp11_i(WidgetPDial* o, void*) {
- eff->seteffectpar(11,(int) o->value());
-}
-void EffUI::cb_phaserp11(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp11_i(o,v);
-}
-
-void EffUI::cb_phaserp12_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(12,(int) o->value());
-}
-void EffUI::cb_phaserp12(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp12_i(o,v);
-}
-
-void EffUI::cb_phaserp13_i(WidgetPDial* o, void*) {
- eff->seteffectpar(13,(int) o->value());
-}
-void EffUI::cb_phaserp13(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp13_i(o,v);
-}
-
-void EffUI::cb_phaserp14_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(14,(int) o->value());
-}
-void EffUI::cb_phaserp14(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_phaserp14_i(o,v);
-}
-
-void EffUI::cb_awp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_awp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_awp[] = {
- {"Alienwah 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_awp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_awp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp0_i(o,v);
-}
-
-void EffUI::cb_awp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_awp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp1_i(o,v);
-}
-
-void EffUI::cb_awp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_awp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp2_i(o,v);
-}
-
-void EffUI::cb_awp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_awp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp3_i(o,v);
-}
-
-void EffUI::cb_awp5_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_awp5(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp5_i(o,v);
-}
-
-void EffUI::cb_awp6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_awp6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp6_i(o,v);
-}
-
-void EffUI::cb_awp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_awp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp7_i(o,v);
-}
-
-void EffUI::cb_awp9_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_awp9(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp9_i(o,v);
-}
-
-void EffUI::cb_awp4_i(Fl_Choice* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_awp4(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp4_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_awp4[] = {
- {"SINE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"TRI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_awp10_i(WidgetPDial* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-}
-void EffUI::cb_awp10(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp10_i(o,v);
-}
-
-void EffUI::cb_awp8_i(Fl_Counter* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_awp8(Fl_Counter* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_awp8_i(o,v);
-}
-
-void EffUI::cb_distp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_distp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_distp[] = {
- {"Overdrive 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Overdrive 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"A. Exciter 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"A. Exciter 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Guitar Amp", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Quantisize", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_distp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_distp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp0_i(o,v);
-}
-
-void EffUI::cb_distp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_distp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp1_i(o,v);
-}
-
-void EffUI::cb_distp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_distp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp2_i(o,v);
-}
-
-void EffUI::cb_distp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_distp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp3_i(o,v);
-}
-
-void EffUI::cb_distp4_i(WidgetPDial* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_distp4(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp4_i(o,v);
-}
-
-void EffUI::cb_distp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_distp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp7_i(o,v);
-}
-
-void EffUI::cb_distp8_i(WidgetPDial* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_distp8(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp8_i(o,v);
-}
-
-void EffUI::cb_distp5_i(Fl_Choice* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_distp5(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp5_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_distp5[] = {
- {"Atan", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Qnts", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Zigzg", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtL", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ILmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Clip", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sgm", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_distp6_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_distp6(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp6_i(o,v);
-}
-
-void EffUI::cb_distp9_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_distp9(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp9_i(o,v);
-}
-
-void EffUI::cb_distp10_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-}
-void EffUI::cb_distp10(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_distp10_i(o,v);
-}
-
-void EffUI::cb_eqp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-eqgraph->redraw();
-}
-void EffUI::cb_eqp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_eqp0_i(o,v);
-}
-
-void EffUI::cb_bandcounter_i(Fl_Counter* o, void*) {
- eqband=(int) o->value();
-int npb=eqband*5+10;
-
-int type=eff->geteffectpar(npb);
-typechoice->value(type);
-
-if (type>6) gaindial->activate();
- else gaindial->deactivate();
-
-if (type==0) bandgroup->deactivate();
-else bandgroup->activate();
-
-int freq=eff->geteffectpar(npb+1);
-freqdial->value(freq);
-
-int gain=eff->geteffectpar(npb+2);
-gaindial->value(gain);
-
-int q=eff->geteffectpar(npb+3);
-qdial->value(q);
-
-int dbl=eff->geteffectpar(npb+4);
-stagescounter->value(dbl);
-}
-void EffUI::cb_bandcounter(Fl_Counter* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_bandcounter_i(o,v);
-}
-
-void EffUI::cb_freqdial_i(WidgetPDial* o, void*) {
- int np=eqband*5+11;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void EffUI::cb_freqdial(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_freqdial_i(o,v);
-}
-
-void EffUI::cb_gaindial_i(WidgetPDial* o, void*) {
- int np=eqband*5+12;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void EffUI::cb_gaindial(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_gaindial_i(o,v);
-}
-
-void EffUI::cb_qdial_i(WidgetPDial* o, void*) {
- int np=eqband*5+13;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void EffUI::cb_qdial(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_qdial_i(o,v);
-}
-
-void EffUI::cb_stagescounter_i(Fl_Counter* o, void*) {
- int np=eqband*5+14;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void EffUI::cb_stagescounter(Fl_Counter* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_stagescounter_i(o,v);
-}
-
-void EffUI::cb_typechoice_i(Fl_Choice* o, void*) {
- int np=eqband*5+10;
-eff->seteffectpar(np,(int) o->value());
-bandcounter->do_callback();
-eqgraph->redraw();
-}
-void EffUI::cb_typechoice(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_typechoice_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_typechoice[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lp1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hp1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Bp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"N2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pk", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LSh", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HSh", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_dfp_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void EffUI::cb_dfp(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_dfp[] = {
- {"WahWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AutoWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sweep", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"VocalMorph1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"VocalMorph2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_dfp0_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void EffUI::cb_dfp0(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp0_i(o,v);
-}
-
-void EffUI::cb_dfp1_i(WidgetPDial* o, void*) {
- eff->seteffectpar(1,(int) o->value());
-}
-void EffUI::cb_dfp1(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp1_i(o,v);
-}
-
-void EffUI::cb_dfp2_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void EffUI::cb_dfp2(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp2_i(o,v);
-}
-
-void EffUI::cb_dfp3_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void EffUI::cb_dfp3(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp3_i(o,v);
-}
-
-void EffUI::cb_dfp5_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void EffUI::cb_dfp5(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp5_i(o,v);
-}
-
-void EffUI::cb_dfp6_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void EffUI::cb_dfp6(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp6_i(o,v);
-}
-
-void EffUI::cb_dfp4_i(Fl_Choice* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void EffUI::cb_dfp4(Fl_Choice* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_dfp4_i(o,v);
-}
-
-Fl_Menu_Item EffUI::menu_dfp4[] = {
- {"SINE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"TRI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void EffUI::cb_Filter_i(Fl_Button*, void*) {
- filterwindow->show();
-}
-void EffUI::cb_Filter(Fl_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_Filter_i(o,v);
-}
-
-void EffUI::cb_dfp7_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void EffUI::cb_dfp7(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_dfp7_i(o,v);
-}
-
-void EffUI::cb_dfp9_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void EffUI::cb_dfp9(WidgetPDial* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_dfp9_i(o,v);
-}
-
-void EffUI::cb_dfp8_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void EffUI::cb_dfp8(Fl_Check_Button* o, void* v) {
- ((EffUI*)(o->parent()->parent()->user_data()))->cb_dfp8_i(o,v);
-}
-
-void EffUI::cb_Close_i(Fl_Button*, void*) {
- filterwindow->hide();
-}
-void EffUI::cb_Close(Fl_Button* o, void* v) {
- ((EffUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-EffUI::EffUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- eff=NULL;
- filterwindow=NULL;
-}
-
-EffUI::~EffUI() {
- effnullwindow->hide();//delete (effnullwindow);
- effreverbwindow->hide();//delete (effreverbwindow);
- effechowindow->hide();//delete (effechowindow);
- effchoruswindow->hide();//delete (effchoruswindow);
- effphaserwindow->hide();//delete (effphaserwindow);
- effalienwahwindow->hide();//delete (effalienwahwindow);
- effdistorsionwindow->hide();//delete (effdistorsionwindow);
- effeqwindow->hide();//delete (effeqwindow);
- effdynamicfilterwindow->hide();//delete (effdynamicfilterwindow);
-
- if (filterwindow!=NULL){
- filterwindow->hide();
- delete(filterwindow);
- };
-}
-
-Fl_Group* EffUI::make_null_window() {
- { Fl_Group* o = effnullwindow = new Fl_Group(0, 0, 380, 100, "No Effect");
- effnullwindow->box(FL_UP_BOX);
- effnullwindow->color((Fl_Color)221);
- effnullwindow->selection_color(FL_BACKGROUND_COLOR);
- effnullwindow->labeltype(FL_NO_LABEL);
- effnullwindow->labelfont(1);
- effnullwindow->labelsize(19);
- effnullwindow->labelcolor(FL_FOREGROUND_COLOR);
- effnullwindow->user_data((void*)(this));
- effnullwindow->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- effnullwindow->when(FL_WHEN_RELEASE);
- set_module_parameters(o);
- effnullwindow->end();
- } // Fl_Group* effnullwindow
- return effnullwindow;
-}
-
-Fl_Group* EffUI::make_reverb_window() {
- { Fl_Group* o = effreverbwindow = new Fl_Group(0, 0, 380, 100, "Reverb");
- effreverbwindow->box(FL_UP_BOX);
- effreverbwindow->color((Fl_Color)221);
- effreverbwindow->selection_color(FL_BACKGROUND_COLOR);
- effreverbwindow->labeltype(FL_NO_LABEL);
- effreverbwindow->labelfont(1);
- effreverbwindow->labelsize(19);
- effreverbwindow->labelcolor(FL_FOREGROUND_COLOR);
- effreverbwindow->user_data((void*)(this));
- effreverbwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effreverbwindow->when(FL_WHEN_RELEASE);
- { revp = new Fl_Choice(10, 15, 90, 15, "Preset");
- revp->down_box(FL_BORDER_BOX);
- revp->color((Fl_Color)14);
- revp->selection_color(FL_BACKGROUND2_COLOR);
- revp->labelfont(1);
- revp->labelsize(10);
- revp->textfont(1);
- revp->textsize(10);
- revp->callback((Fl_Callback*)cb_revp);
- revp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- revp->menu(menu_revp);
- } // Fl_Choice* revp
- { revp10 = new Fl_Choice(110, 15, 85, 15, "Type");
- revp10->down_box(FL_BORDER_BOX);
- revp10->color((Fl_Color)14);
- revp10->selection_color(FL_BACKGROUND2_COLOR);
- revp10->labelfont(1);
- revp10->labelsize(10);
- revp10->textfont(1);
- revp10->textsize(10);
- revp10->callback((Fl_Callback*)cb_revp10);
- revp10->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- revp10->menu(menu_revp10);
- } // Fl_Choice* revp10
- { revp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- revp0->tooltip("Effect Volume");
- revp0->box(FL_ROUND_UP_BOX);
- revp0->color(FL_BACKGROUND_COLOR);
- revp0->selection_color(FL_INACTIVE_COLOR);
- revp0->labeltype(FL_NORMAL_LABEL);
- revp0->labelfont(1);
- revp0->labelsize(11);
- revp0->labelcolor(FL_FOREGROUND_COLOR);
- revp0->maximum(127);
- revp0->callback((Fl_Callback*)cb_revp0);
- revp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp0
- { revp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- revp1->box(FL_ROUND_UP_BOX);
- revp1->color(FL_BACKGROUND_COLOR);
- revp1->selection_color(FL_INACTIVE_COLOR);
- revp1->labeltype(FL_NORMAL_LABEL);
- revp1->labelfont(1);
- revp1->labelsize(11);
- revp1->labelcolor(FL_FOREGROUND_COLOR);
- revp1->maximum(127);
- revp1->callback((Fl_Callback*)cb_revp1);
- revp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp1
- { revp2 = new WidgetPDial(80, 40, 30, 30, "Time");
- revp2->tooltip("Duration of Effect");
- revp2->box(FL_ROUND_UP_BOX);
- revp2->color(FL_BACKGROUND_COLOR);
- revp2->selection_color(FL_INACTIVE_COLOR);
- revp2->labeltype(FL_NORMAL_LABEL);
- revp2->labelfont(1);
- revp2->labelsize(11);
- revp2->labelcolor(FL_FOREGROUND_COLOR);
- revp2->maximum(127);
- revp2->callback((Fl_Callback*)cb_revp2);
- revp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp2
- { revp3 = new WidgetPDial(120, 40, 30, 30, "I.del");
- revp3->tooltip("Initial Delay");
- revp3->box(FL_ROUND_UP_BOX);
- revp3->color(FL_BACKGROUND_COLOR);
- revp3->selection_color(FL_INACTIVE_COLOR);
- revp3->labeltype(FL_NORMAL_LABEL);
- revp3->labelfont(1);
- revp3->labelsize(11);
- revp3->labelcolor(FL_FOREGROUND_COLOR);
- revp3->maximum(127);
- revp3->callback((Fl_Callback*)cb_revp3);
- revp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* revp3
- { revp4 = new WidgetPDial(155, 40, 30, 30, "I.delfb");
- revp4->tooltip("Initial Delay Feedback");
- revp4->box(FL_ROUND_UP_BOX);
- revp4->color(FL_BACKGROUND_COLOR);
- revp4->selection_color(FL_INACTIVE_COLOR);
- revp4->labeltype(FL_NORMAL_LABEL);
- revp4->labelfont(1);
- revp4->labelsize(11);
- revp4->labelcolor(FL_FOREGROUND_COLOR);
- revp4->maximum(127);
- revp4->callback((Fl_Callback*)cb_revp4);
- revp4->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp4->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp4
- { WidgetPDial* o = revp12 = new WidgetPDial(200, 40, 30, 30, "bw");
- revp12->box(FL_ROUND_UP_BOX);
- revp12->color(FL_BACKGROUND_COLOR);
- revp12->selection_color(FL_INACTIVE_COLOR);
- revp12->labeltype(FL_NORMAL_LABEL);
- revp12->labelfont(1);
- revp12->labelsize(11);
- revp12->labelcolor(FL_FOREGROUND_COLOR);
- revp12->maximum(127);
- revp12->callback((Fl_Callback*)cb_revp12);
- revp12->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp12->when(FL_WHEN_RELEASE);
- revp12->deactivate();
- if (eff->geteffectpar(10)==2) o->activate();
- } // WidgetPDial* revp12
- { revp6 = new WidgetPDial(235, 40, 30, 30, "E/R");
- revp6->box(FL_ROUND_UP_BOX);
- revp6->color(FL_BACKGROUND_COLOR);
- revp6->selection_color(FL_INACTIVE_COLOR);
- revp6->labeltype(FL_NORMAL_LABEL);
- revp6->labelfont(1);
- revp6->labelsize(11);
- revp6->labelcolor(FL_FOREGROUND_COLOR);
- revp6->maximum(127);
- revp6->callback((Fl_Callback*)cb_revp6);
- revp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp6->when(FL_WHEN_CHANGED);
- revp6->deactivate();
- } // WidgetPDial* revp6
- { revp7 = new WidgetPDial(270, 40, 30, 30, "LPF");
- revp7->tooltip("Low Pass Filter");
- revp7->box(FL_ROUND_UP_BOX);
- revp7->color(FL_BACKGROUND_COLOR);
- revp7->selection_color(FL_INACTIVE_COLOR);
- revp7->labeltype(FL_NORMAL_LABEL);
- revp7->labelfont(1);
- revp7->labelsize(11);
- revp7->labelcolor(FL_FOREGROUND_COLOR);
- revp7->maximum(127);
- revp7->callback((Fl_Callback*)cb_revp7);
- revp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp7
- { revp8 = new WidgetPDial(305, 40, 30, 30, "HPF");
- revp8->tooltip("High Pass Filter");
- revp8->box(FL_ROUND_UP_BOX);
- revp8->color(FL_BACKGROUND_COLOR);
- revp8->selection_color(FL_INACTIVE_COLOR);
- revp8->labeltype(FL_NORMAL_LABEL);
- revp8->labelfont(1);
- revp8->labelsize(11);
- revp8->labelcolor(FL_FOREGROUND_COLOR);
- revp8->maximum(127);
- revp8->callback((Fl_Callback*)cb_revp8);
- revp8->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp8->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp8
- { revp9 = new WidgetPDial(340, 40, 30, 30, "Damp");
- revp9->tooltip("Dampening");
- revp9->box(FL_ROUND_UP_BOX);
- revp9->color(FL_BACKGROUND_COLOR);
- revp9->selection_color(FL_INACTIVE_COLOR);
- revp9->labeltype(FL_NORMAL_LABEL);
- revp9->labelfont(1);
- revp9->labelsize(11);
- revp9->labelcolor(FL_FOREGROUND_COLOR);
- revp9->minimum(64);
- revp9->maximum(127);
- revp9->step(1);
- revp9->callback((Fl_Callback*)cb_revp9);
- revp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp9
- { revp11 = new WidgetPDial(200, 10, 25, 25, "R.S.");
- revp11->tooltip("RoomSize");
- revp11->box(FL_ROUND_UP_BOX);
- revp11->color(FL_BACKGROUND_COLOR);
- revp11->selection_color(FL_INACTIVE_COLOR);
- revp11->labeltype(FL_NORMAL_LABEL);
- revp11->labelfont(1);
- revp11->labelsize(8);
- revp11->labelcolor(FL_FOREGROUND_COLOR);
- revp11->minimum(1);
- revp11->maximum(127);
- revp11->step(1);
- revp11->callback((Fl_Callback*)cb_revp11);
- revp11->align(Fl_Align(FL_ALIGN_RIGHT));
- revp11->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp11
- set_module_parameters(o);
- effreverbwindow->end();
- } // Fl_Group* effreverbwindow
- return effreverbwindow;
-}
-
-Fl_Group* EffUI::make_echo_window() {
- { Fl_Group* o = effechowindow = new Fl_Group(0, 0, 380, 100, "Echo");
- effechowindow->box(FL_UP_BOX);
- effechowindow->color((Fl_Color)221);
- effechowindow->selection_color(FL_BACKGROUND_COLOR);
- effechowindow->labeltype(FL_NO_LABEL);
- effechowindow->labelfont(1);
- effechowindow->labelsize(19);
- effechowindow->labelcolor(FL_FOREGROUND_COLOR);
- effechowindow->user_data((void*)(this));
- effechowindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effechowindow->when(FL_WHEN_RELEASE);
- { echop = new Fl_Choice(11, 15, 95, 15, "Preset");
- echop->down_box(FL_BORDER_BOX);
- echop->color((Fl_Color)14);
- echop->selection_color(FL_BACKGROUND2_COLOR);
- echop->labelfont(1);
- echop->labelsize(10);
- echop->textfont(1);
- echop->textsize(10);
- echop->callback((Fl_Callback*)cb_echop);
- echop->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- echop->menu(menu_echop);
- } // Fl_Choice* echop
- { echop0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- echop0->tooltip("Effect Volume");
- echop0->box(FL_ROUND_UP_BOX);
- echop0->color(FL_BACKGROUND_COLOR);
- echop0->selection_color(FL_INACTIVE_COLOR);
- echop0->labeltype(FL_NORMAL_LABEL);
- echop0->labelfont(1);
- echop0->labelsize(11);
- echop0->labelcolor(FL_FOREGROUND_COLOR);
- echop0->maximum(127);
- echop0->callback((Fl_Callback*)cb_echop0);
- echop0->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop0
- { echop1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- echop1->box(FL_ROUND_UP_BOX);
- echop1->color(FL_BACKGROUND_COLOR);
- echop1->selection_color(FL_INACTIVE_COLOR);
- echop1->labeltype(FL_NORMAL_LABEL);
- echop1->labelfont(1);
- echop1->labelsize(11);
- echop1->labelcolor(FL_FOREGROUND_COLOR);
- echop1->maximum(127);
- echop1->callback((Fl_Callback*)cb_echop1);
- echop1->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop1
- { echop2 = new WidgetPDial(80, 40, 30, 30, "Delay");
- echop2->box(FL_ROUND_UP_BOX);
- echop2->color(FL_BACKGROUND_COLOR);
- echop2->selection_color(FL_INACTIVE_COLOR);
- echop2->labeltype(FL_NORMAL_LABEL);
- echop2->labelfont(1);
- echop2->labelsize(11);
- echop2->labelcolor(FL_FOREGROUND_COLOR);
- echop2->maximum(127);
- echop2->callback((Fl_Callback*)cb_echop2);
- echop2->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop2->when(FL_WHEN_RELEASE);
- } // WidgetPDial* echop2
- { echop3 = new WidgetPDial(120, 40, 30, 30, "LRdl.");
- echop3->tooltip("Delay Between L/R");
- echop3->box(FL_ROUND_UP_BOX);
- echop3->color(FL_BACKGROUND_COLOR);
- echop3->selection_color(FL_INACTIVE_COLOR);
- echop3->labeltype(FL_NORMAL_LABEL);
- echop3->labelfont(1);
- echop3->labelsize(11);
- echop3->labelcolor(FL_FOREGROUND_COLOR);
- echop3->maximum(127);
- echop3->callback((Fl_Callback*)cb_echop3);
- echop3->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* echop3
- { echop4 = new WidgetPDial(155, 40, 30, 30, "LRc.");
- echop4->tooltip("L/R Crossover");
- echop4->box(FL_ROUND_UP_BOX);
- echop4->color(FL_BACKGROUND_COLOR);
- echop4->selection_color(FL_INACTIVE_COLOR);
- echop4->labeltype(FL_NORMAL_LABEL);
- echop4->labelfont(1);
- echop4->labelsize(11);
- echop4->labelcolor(FL_FOREGROUND_COLOR);
- echop4->maximum(127);
- echop4->callback((Fl_Callback*)cb_echop4);
- echop4->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop4->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop4
- { echop5 = new WidgetPDial(195, 40, 30, 30, "Fb.");
- echop5->tooltip("Feedback");
- echop5->box(FL_ROUND_UP_BOX);
- echop5->color(FL_BACKGROUND_COLOR);
- echop5->selection_color(FL_INACTIVE_COLOR);
- echop5->labeltype(FL_NORMAL_LABEL);
- echop5->labelfont(1);
- echop5->labelsize(11);
- echop5->labelcolor(FL_FOREGROUND_COLOR);
- echop5->maximum(127);
- echop5->callback((Fl_Callback*)cb_echop5);
- echop5->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop5
- { echop6 = new WidgetPDial(235, 40, 30, 30, "Damp");
- echop6->tooltip("Dampening");
- echop6->box(FL_ROUND_UP_BOX);
- echop6->color(FL_BACKGROUND_COLOR);
- echop6->selection_color(FL_INACTIVE_COLOR);
- echop6->labeltype(FL_NORMAL_LABEL);
- echop6->labelfont(1);
- echop6->labelsize(11);
- echop6->labelcolor(FL_FOREGROUND_COLOR);
- echop6->maximum(127);
- echop6->callback((Fl_Callback*)cb_echop6);
- echop6->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop6
- set_module_parameters(o);
- effechowindow->end();
- } // Fl_Group* effechowindow
- return effechowindow;
-}
-
-Fl_Group* EffUI::make_chorus_window() {
- { Fl_Group* o = effchoruswindow = new Fl_Group(0, 0, 380, 100, "Chorus");
- effchoruswindow->box(FL_UP_BOX);
- effchoruswindow->color((Fl_Color)221);
- effchoruswindow->selection_color(FL_BACKGROUND_COLOR);
- effchoruswindow->labeltype(FL_NO_LABEL);
- effchoruswindow->labelfont(1);
- effchoruswindow->labelsize(19);
- effchoruswindow->labelcolor(FL_FOREGROUND_COLOR);
- effchoruswindow->user_data((void*)(this));
- effchoruswindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effchoruswindow->when(FL_WHEN_RELEASE);
- { chorusp = new Fl_Choice(10, 15, 90, 15, "Preset");
- chorusp->down_box(FL_BORDER_BOX);
- chorusp->color((Fl_Color)14);
- chorusp->selection_color(FL_BACKGROUND2_COLOR);
- chorusp->labelfont(1);
- chorusp->labelsize(10);
- chorusp->textfont(1);
- chorusp->textsize(10);
- chorusp->callback((Fl_Callback*)cb_chorusp);
- chorusp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- chorusp->menu(menu_chorusp);
- } // Fl_Choice* chorusp
- { chorusp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- chorusp0->box(FL_ROUND_UP_BOX);
- chorusp0->color(FL_BACKGROUND_COLOR);
- chorusp0->selection_color(FL_INACTIVE_COLOR);
- chorusp0->labeltype(FL_NORMAL_LABEL);
- chorusp0->labelfont(1);
- chorusp0->labelsize(11);
- chorusp0->labelcolor(FL_FOREGROUND_COLOR);
- chorusp0->maximum(127);
- chorusp0->callback((Fl_Callback*)cb_chorusp0);
- chorusp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp0
- { chorusp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- chorusp1->box(FL_ROUND_UP_BOX);
- chorusp1->color(FL_BACKGROUND_COLOR);
- chorusp1->selection_color(FL_INACTIVE_COLOR);
- chorusp1->labeltype(FL_NORMAL_LABEL);
- chorusp1->labelfont(1);
- chorusp1->labelsize(11);
- chorusp1->labelcolor(FL_FOREGROUND_COLOR);
- chorusp1->maximum(127);
- chorusp1->callback((Fl_Callback*)cb_chorusp1);
- chorusp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp1
- { chorusp2 = new WidgetPDial(85, 40, 30, 30, "Freq");
- chorusp2->tooltip("LFO Frequency");
- chorusp2->box(FL_ROUND_UP_BOX);
- chorusp2->color(FL_BACKGROUND_COLOR);
- chorusp2->selection_color(FL_INACTIVE_COLOR);
- chorusp2->labeltype(FL_NORMAL_LABEL);
- chorusp2->labelfont(1);
- chorusp2->labelsize(11);
- chorusp2->labelcolor(FL_FOREGROUND_COLOR);
- chorusp2->maximum(127);
- chorusp2->callback((Fl_Callback*)cb_chorusp2);
- chorusp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp2
- { chorusp3 = new WidgetPDial(120, 40, 30, 30, "Rnd");
- chorusp3->tooltip("LFO Randomness");
- chorusp3->box(FL_ROUND_UP_BOX);
- chorusp3->color(FL_BACKGROUND_COLOR);
- chorusp3->selection_color(FL_INACTIVE_COLOR);
- chorusp3->labeltype(FL_NORMAL_LABEL);
- chorusp3->labelfont(1);
- chorusp3->labelsize(11);
- chorusp3->labelcolor(FL_FOREGROUND_COLOR);
- chorusp3->maximum(127);
- chorusp3->callback((Fl_Callback*)cb_chorusp3);
- chorusp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* chorusp3
- { chorusp5 = new WidgetPDial(200, 40, 30, 30, "St.df");
- chorusp5->tooltip("L/R Phase Shift");
- chorusp5->box(FL_ROUND_UP_BOX);
- chorusp5->color(FL_BACKGROUND_COLOR);
- chorusp5->selection_color(FL_INACTIVE_COLOR);
- chorusp5->labeltype(FL_NORMAL_LABEL);
- chorusp5->labelfont(1);
- chorusp5->labelsize(11);
- chorusp5->labelcolor(FL_FOREGROUND_COLOR);
- chorusp5->maximum(127);
- chorusp5->callback((Fl_Callback*)cb_chorusp5);
- chorusp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp5
- { chorusp6 = new WidgetPDial(235, 40, 30, 30, "Dpth");
- chorusp6->tooltip("LFO Depth");
- chorusp6->box(FL_ROUND_UP_BOX);
- chorusp6->color(FL_BACKGROUND_COLOR);
- chorusp6->selection_color(FL_INACTIVE_COLOR);
- chorusp6->labeltype(FL_NORMAL_LABEL);
- chorusp6->labelfont(1);
- chorusp6->labelsize(11);
- chorusp6->labelcolor(FL_FOREGROUND_COLOR);
- chorusp6->maximum(127);
- chorusp6->callback((Fl_Callback*)cb_chorusp6);
- chorusp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp6
- { chorusp7 = new WidgetPDial(270, 40, 30, 30, "Delay");
- chorusp7->box(FL_ROUND_UP_BOX);
- chorusp7->color(FL_BACKGROUND_COLOR);
- chorusp7->selection_color(FL_INACTIVE_COLOR);
- chorusp7->labeltype(FL_NORMAL_LABEL);
- chorusp7->labelfont(1);
- chorusp7->labelsize(11);
- chorusp7->labelcolor(FL_FOREGROUND_COLOR);
- chorusp7->maximum(127);
- chorusp7->callback((Fl_Callback*)cb_chorusp7);
- chorusp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp7
- { chorusp8 = new WidgetPDial(305, 40, 30, 30, "Fb");
- chorusp8->tooltip("Feedback");
- chorusp8->box(FL_ROUND_UP_BOX);
- chorusp8->color(FL_BACKGROUND_COLOR);
- chorusp8->selection_color(FL_INACTIVE_COLOR);
- chorusp8->labeltype(FL_NORMAL_LABEL);
- chorusp8->labelfont(1);
- chorusp8->labelsize(11);
- chorusp8->labelcolor(FL_FOREGROUND_COLOR);
- chorusp8->maximum(127);
- chorusp8->callback((Fl_Callback*)cb_chorusp8);
- chorusp8->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp8->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp8
- { chorusp9 = new WidgetPDial(340, 40, 30, 30, "L/R");
- chorusp9->tooltip("Channel Routing");
- chorusp9->box(FL_ROUND_UP_BOX);
- chorusp9->color(FL_BACKGROUND_COLOR);
- chorusp9->selection_color(FL_INACTIVE_COLOR);
- chorusp9->labeltype(FL_NORMAL_LABEL);
- chorusp9->labelfont(1);
- chorusp9->labelsize(11);
- chorusp9->labelcolor(FL_FOREGROUND_COLOR);
- chorusp9->maximum(127);
- chorusp9->callback((Fl_Callback*)cb_chorusp9);
- chorusp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp9
- { Fl_Check_Button* o = new Fl_Check_Button(120, 10, 55, 20, "Flange");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->color((Fl_Color)230);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Flange);
- o->hide();
- o->deactivate();
- o->value(eff->geteffectpar(10));
- } // Fl_Check_Button* o
- { chorusp11 = new Fl_Check_Button(185, 10, 70, 20, "Substract");
- chorusp11->tooltip("inverts the output");
- chorusp11->box(FL_THIN_UP_BOX);
- chorusp11->down_box(FL_DOWN_BOX);
- chorusp11->color((Fl_Color)51);
- chorusp11->labelsize(10);
- chorusp11->callback((Fl_Callback*)cb_chorusp11);
- } // Fl_Check_Button* chorusp11
- { chorusp4 = new Fl_Choice(155, 50, 40, 15, "LFO type");
- chorusp4->tooltip("LFO function");
- chorusp4->down_box(FL_BORDER_BOX);
- chorusp4->labelfont(1);
- chorusp4->labelsize(10);
- chorusp4->textsize(8);
- chorusp4->callback((Fl_Callback*)cb_chorusp4);
- chorusp4->align(Fl_Align(130));
- chorusp4->menu(menu_chorusp4);
- } // Fl_Choice* chorusp4
- set_module_parameters(o);
- effchoruswindow->end();
- } // Fl_Group* effchoruswindow
- return effchoruswindow;
-}
-
-Fl_Group* EffUI::make_phaser_window() {
- { Fl_Group* o = effphaserwindow = new Fl_Group(0, 0, 380, 95, "Phaser");
- effphaserwindow->box(FL_UP_BOX);
- effphaserwindow->color((Fl_Color)221);
- effphaserwindow->selection_color(FL_BACKGROUND_COLOR);
- effphaserwindow->labeltype(FL_NO_LABEL);
- effphaserwindow->labelfont(1);
- effphaserwindow->labelsize(19);
- effphaserwindow->labelcolor(FL_FOREGROUND_COLOR);
- effphaserwindow->user_data((void*)(this));
- effphaserwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effphaserwindow->when(FL_WHEN_RELEASE);
- { phaserp = new Fl_Choice(10, 15, 100, 15, "Preset");
- phaserp->down_box(FL_BORDER_BOX);
- phaserp->color((Fl_Color)14);
- phaserp->selection_color(FL_BACKGROUND2_COLOR);
- phaserp->labelfont(1);
- phaserp->labelsize(10);
- phaserp->textfont(1);
- phaserp->textsize(10);
- phaserp->callback((Fl_Callback*)cb_phaserp);
- phaserp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- phaserp->menu(menu_phaserp);
- } // Fl_Choice* phaserp
- { phaserp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- phaserp0->tooltip("Effect Volume");
- phaserp0->box(FL_ROUND_UP_BOX);
- phaserp0->color(FL_BACKGROUND_COLOR);
- phaserp0->selection_color(FL_INACTIVE_COLOR);
- phaserp0->labeltype(FL_NORMAL_LABEL);
- phaserp0->labelfont(1);
- phaserp0->labelsize(11);
- phaserp0->labelcolor(FL_FOREGROUND_COLOR);
- phaserp0->maximum(127);
- phaserp0->callback((Fl_Callback*)cb_phaserp0);
- phaserp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp0
- { phaserp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- phaserp1->box(FL_ROUND_UP_BOX);
- phaserp1->color(FL_BACKGROUND_COLOR);
- phaserp1->selection_color(FL_INACTIVE_COLOR);
- phaserp1->labeltype(FL_NORMAL_LABEL);
- phaserp1->labelfont(1);
- phaserp1->labelsize(11);
- phaserp1->labelcolor(FL_FOREGROUND_COLOR);
- phaserp1->maximum(127);
- phaserp1->callback((Fl_Callback*)cb_phaserp1);
- phaserp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp1
- { phaserp2 = new WidgetPDial(85, 45, 25, 25, "Freq");
- phaserp2->tooltip("LFO frequency");
- phaserp2->box(FL_ROUND_UP_BOX);
- phaserp2->color(FL_BACKGROUND_COLOR);
- phaserp2->selection_color(FL_INACTIVE_COLOR);
- phaserp2->labeltype(FL_NORMAL_LABEL);
- phaserp2->labelfont(1);
- phaserp2->labelsize(11);
- phaserp2->labelcolor(FL_FOREGROUND_COLOR);
- phaserp2->maximum(127);
- phaserp2->callback((Fl_Callback*)cb_phaserp2);
- phaserp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp2
- { phaserp3 = new WidgetPDial(120, 45, 25, 25, "Rnd");
- phaserp3->tooltip("LFO randomness");
- phaserp3->box(FL_ROUND_UP_BOX);
- phaserp3->color(FL_BACKGROUND_COLOR);
- phaserp3->selection_color(FL_INACTIVE_COLOR);
- phaserp3->labeltype(FL_NORMAL_LABEL);
- phaserp3->labelfont(1);
- phaserp3->labelsize(11);
- phaserp3->labelcolor(FL_FOREGROUND_COLOR);
- phaserp3->maximum(127);
- phaserp3->callback((Fl_Callback*)cb_phaserp3);
- phaserp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* phaserp3
- { phaserp4 = new Fl_Choice(245, 55, 40, 15, "LFO");
- phaserp4->tooltip("LFO function");
- phaserp4->down_box(FL_BORDER_BOX);
- phaserp4->labelfont(1);
- phaserp4->labelsize(10);
- phaserp4->textsize(8);
- phaserp4->callback((Fl_Callback*)cb_phaserp4);
- phaserp4->align(Fl_Align(130));
- phaserp4->menu(menu_phaserp4);
- } // Fl_Choice* phaserp4
- { phaserp5 = new WidgetPDial(155, 45, 25, 25, "St.df");
- phaserp5->tooltip("Left/Right Channel Phase Shift");
- phaserp5->box(FL_ROUND_UP_BOX);
- phaserp5->color(FL_BACKGROUND_COLOR);
- phaserp5->selection_color(FL_INACTIVE_COLOR);
- phaserp5->labeltype(FL_NORMAL_LABEL);
- phaserp5->labelfont(1);
- phaserp5->labelsize(11);
- phaserp5->labelcolor(FL_FOREGROUND_COLOR);
- phaserp5->maximum(127);
- phaserp5->callback((Fl_Callback*)cb_phaserp5);
- phaserp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp5
- { phaserp6 = new WidgetPDial(120, 5, 25, 25, "Dpth");
- phaserp6->tooltip("LFO Depth");
- phaserp6->box(FL_ROUND_UP_BOX);
- phaserp6->color(FL_BACKGROUND_COLOR);
- phaserp6->selection_color(FL_INACTIVE_COLOR);
- phaserp6->labeltype(FL_NORMAL_LABEL);
- phaserp6->labelfont(1);
- phaserp6->labelsize(10);
- phaserp6->labelcolor(FL_FOREGROUND_COLOR);
- phaserp6->maximum(127);
- phaserp6->callback((Fl_Callback*)cb_phaserp6);
- phaserp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp6
- { phaserp7 = new WidgetPDial(185, 45, 25, 25, "Fb");
- phaserp7->tooltip("Feedback");
- phaserp7->box(FL_ROUND_UP_BOX);
- phaserp7->color(FL_BACKGROUND_COLOR);
- phaserp7->selection_color(FL_INACTIVE_COLOR);
- phaserp7->labeltype(FL_NORMAL_LABEL);
- phaserp7->labelfont(1);
- phaserp7->labelsize(11);
- phaserp7->labelcolor(FL_FOREGROUND_COLOR);
- phaserp7->maximum(127);
- phaserp7->callback((Fl_Callback*)cb_phaserp7);
- phaserp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp7
- { Fl_Counter* o = phaserp8 = new Fl_Counter(290, 55, 35, 15, "Stages");
- phaserp8->type(1);
- phaserp8->labelfont(1);
- phaserp8->labelsize(11);
- phaserp8->minimum(0);
- phaserp8->maximum(127);
- phaserp8->step(1);
- phaserp8->callback((Fl_Callback*)cb_phaserp8);
- o->range(1,MAX_PHASER_STAGES);
- } // Fl_Counter* phaserp8
- { phaserp9 = new WidgetPDial(215, 45, 25, 25, "L/R");
- phaserp9->tooltip("Channel Routing");
- phaserp9->box(FL_ROUND_UP_BOX);
- phaserp9->color(FL_BACKGROUND_COLOR);
- phaserp9->selection_color(FL_INACTIVE_COLOR);
- phaserp9->labeltype(FL_NORMAL_LABEL);
- phaserp9->labelfont(1);
- phaserp9->labelsize(11);
- phaserp9->labelcolor(FL_FOREGROUND_COLOR);
- phaserp9->maximum(127);
- phaserp9->callback((Fl_Callback*)cb_phaserp9);
- phaserp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp9
- { phaserp10 = new Fl_Check_Button(200, 10, 74, 20, "Substract");
- phaserp10->tooltip("inverts output");
- phaserp10->box(FL_THIN_UP_BOX);
- phaserp10->down_box(FL_DOWN_BOX);
- phaserp10->color((Fl_Color)51);
- phaserp10->labelfont(1);
- phaserp10->labelsize(10);
- phaserp10->callback((Fl_Callback*)cb_phaserp10);
- } // Fl_Check_Button* phaserp10
- { phaserp11 = new WidgetPDial(155, 5, 25, 25, "Phase");
- phaserp11->box(FL_ROUND_UP_BOX);
- phaserp11->color(FL_BACKGROUND_COLOR);
- phaserp11->selection_color(FL_INACTIVE_COLOR);
- phaserp11->labeltype(FL_NORMAL_LABEL);
- phaserp11->labelfont(1);
- phaserp11->labelsize(10);
- phaserp11->labelcolor(FL_FOREGROUND_COLOR);
- phaserp11->maximum(127);
- phaserp11->callback((Fl_Callback*)cb_phaserp11);
- phaserp11->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp11->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp11
- { phaserp12 = new Fl_Check_Button(245, 35, 55, 15, "hyp.");
- phaserp12->tooltip("hyper");
- phaserp12->down_box(FL_DOWN_BOX);
- phaserp12->callback((Fl_Callback*)cb_phaserp12);
- } // Fl_Check_Button* phaserp12
- { phaserp13 = new WidgetPDial(340, 50, 25, 25, "dist");
- phaserp13->tooltip("Distortion");
- phaserp13->box(FL_ROUND_UP_BOX);
- phaserp13->color(FL_BACKGROUND_COLOR);
- phaserp13->selection_color(FL_INACTIVE_COLOR);
- phaserp13->labeltype(FL_NORMAL_LABEL);
- phaserp13->labelfont(1);
- phaserp13->labelsize(11);
- phaserp13->labelcolor(FL_FOREGROUND_COLOR);
- phaserp13->maximum(127);
- phaserp13->callback((Fl_Callback*)cb_phaserp13);
- phaserp13->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp13->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp13
- { phaserp14 = new Fl_Check_Button(305, 35, 70, 15, "Analog");
- phaserp14->down_box(FL_DOWN_BOX);
- phaserp14->callback((Fl_Callback*)cb_phaserp14);
- } // Fl_Check_Button* phaserp14
- set_module_parameters(o);
- effphaserwindow->end();
- } // Fl_Group* effphaserwindow
- return effphaserwindow;
-}
-
-Fl_Group* EffUI::make_alienwah_window() {
- { Fl_Group* o = effalienwahwindow = new Fl_Group(0, 0, 380, 100, "AlienWah");
- effalienwahwindow->box(FL_UP_BOX);
- effalienwahwindow->color((Fl_Color)221);
- effalienwahwindow->selection_color(FL_BACKGROUND_COLOR);
- effalienwahwindow->labeltype(FL_NO_LABEL);
- effalienwahwindow->labelfont(1);
- effalienwahwindow->labelsize(19);
- effalienwahwindow->labelcolor(FL_FOREGROUND_COLOR);
- effalienwahwindow->user_data((void*)(this));
- effalienwahwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effalienwahwindow->when(FL_WHEN_RELEASE);
- { awp = new Fl_Choice(10, 15, 90, 15, "Preset");
- awp->down_box(FL_BORDER_BOX);
- awp->color((Fl_Color)14);
- awp->selection_color(FL_BACKGROUND2_COLOR);
- awp->labelfont(1);
- awp->labelsize(10);
- awp->textfont(1);
- awp->textsize(10);
- awp->callback((Fl_Callback*)cb_awp);
- awp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- awp->menu(menu_awp);
- } // Fl_Choice* awp
- { awp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- awp0->tooltip("Effect Volume");
- awp0->box(FL_ROUND_UP_BOX);
- awp0->color(FL_BACKGROUND_COLOR);
- awp0->selection_color(FL_INACTIVE_COLOR);
- awp0->labeltype(FL_NORMAL_LABEL);
- awp0->labelfont(1);
- awp0->labelsize(11);
- awp0->labelcolor(FL_FOREGROUND_COLOR);
- awp0->maximum(127);
- awp0->callback((Fl_Callback*)cb_awp0);
- awp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp0
- { awp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- awp1->box(FL_ROUND_UP_BOX);
- awp1->color(FL_BACKGROUND_COLOR);
- awp1->selection_color(FL_INACTIVE_COLOR);
- awp1->labeltype(FL_NORMAL_LABEL);
- awp1->labelfont(1);
- awp1->labelsize(11);
- awp1->labelcolor(FL_FOREGROUND_COLOR);
- awp1->maximum(127);
- awp1->callback((Fl_Callback*)cb_awp1);
- awp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp1
- { awp2 = new WidgetPDial(85, 40, 30, 30, "Freq");
- awp2->tooltip("LFO Frequency");
- awp2->box(FL_ROUND_UP_BOX);
- awp2->color(FL_BACKGROUND_COLOR);
- awp2->selection_color(FL_INACTIVE_COLOR);
- awp2->labeltype(FL_NORMAL_LABEL);
- awp2->labelfont(1);
- awp2->labelsize(11);
- awp2->labelcolor(FL_FOREGROUND_COLOR);
- awp2->maximum(127);
- awp2->callback((Fl_Callback*)cb_awp2);
- awp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp2
- { awp3 = new WidgetPDial(120, 40, 30, 30, "Rnd");
- awp3->tooltip("LFO Randomness");
- awp3->box(FL_ROUND_UP_BOX);
- awp3->color(FL_BACKGROUND_COLOR);
- awp3->selection_color(FL_INACTIVE_COLOR);
- awp3->labeltype(FL_NORMAL_LABEL);
- awp3->labelfont(1);
- awp3->labelsize(11);
- awp3->labelcolor(FL_FOREGROUND_COLOR);
- awp3->maximum(127);
- awp3->callback((Fl_Callback*)cb_awp3);
- awp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* awp3
- { awp5 = new WidgetPDial(200, 40, 30, 30, "St.df");
- awp5->tooltip("Left/Right Channel Phase Shift");
- awp5->box(FL_ROUND_UP_BOX);
- awp5->color(FL_BACKGROUND_COLOR);
- awp5->selection_color(FL_INACTIVE_COLOR);
- awp5->labeltype(FL_NORMAL_LABEL);
- awp5->labelfont(1);
- awp5->labelsize(11);
- awp5->labelcolor(FL_FOREGROUND_COLOR);
- awp5->maximum(127);
- awp5->callback((Fl_Callback*)cb_awp5);
- awp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp5
- { awp6 = new WidgetPDial(235, 40, 30, 30, "Dpth");
- awp6->tooltip("Depth");
- awp6->box(FL_ROUND_UP_BOX);
- awp6->color(FL_BACKGROUND_COLOR);
- awp6->selection_color(FL_INACTIVE_COLOR);
- awp6->labeltype(FL_NORMAL_LABEL);
- awp6->labelfont(1);
- awp6->labelsize(11);
- awp6->labelcolor(FL_FOREGROUND_COLOR);
- awp6->maximum(127);
- awp6->callback((Fl_Callback*)cb_awp6);
- awp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp6
- { awp7 = new WidgetPDial(270, 40, 30, 30, "Fb");
- awp7->tooltip("Feedback");
- awp7->box(FL_ROUND_UP_BOX);
- awp7->color(FL_BACKGROUND_COLOR);
- awp7->selection_color(FL_INACTIVE_COLOR);
- awp7->labeltype(FL_NORMAL_LABEL);
- awp7->labelfont(1);
- awp7->labelsize(11);
- awp7->labelcolor(FL_FOREGROUND_COLOR);
- awp7->maximum(127);
- awp7->callback((Fl_Callback*)cb_awp7);
- awp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp7
- { awp9 = new WidgetPDial(345, 40, 30, 30, "L/R");
- awp9->box(FL_ROUND_UP_BOX);
- awp9->color(FL_BACKGROUND_COLOR);
- awp9->selection_color(FL_INACTIVE_COLOR);
- awp9->labeltype(FL_NORMAL_LABEL);
- awp9->labelfont(1);
- awp9->labelsize(11);
- awp9->labelcolor(FL_FOREGROUND_COLOR);
- awp9->maximum(127);
- awp9->callback((Fl_Callback*)cb_awp9);
- awp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp9
- { awp4 = new Fl_Choice(155, 50, 40, 15, "LFO type");
- awp4->tooltip("LFO function");
- awp4->down_box(FL_BORDER_BOX);
- awp4->labelfont(1);
- awp4->labelsize(10);
- awp4->textsize(8);
- awp4->callback((Fl_Callback*)cb_awp4);
- awp4->align(Fl_Align(130));
- awp4->menu(menu_awp4);
- } // Fl_Choice* awp4
- { awp10 = new WidgetPDial(160, 5, 30, 30, "Phase");
- awp10->box(FL_ROUND_UP_BOX);
- awp10->color(FL_BACKGROUND_COLOR);
- awp10->selection_color(FL_INACTIVE_COLOR);
- awp10->labeltype(FL_NORMAL_LABEL);
- awp10->labelfont(1);
- awp10->labelsize(11);
- awp10->labelcolor(FL_FOREGROUND_COLOR);
- awp10->maximum(127);
- awp10->callback((Fl_Callback*)cb_awp10);
- awp10->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp10->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp10
- { Fl_Counter* o = awp8 = new Fl_Counter(305, 55, 35, 15, "Delay");
- awp8->type(1);
- awp8->labelfont(1);
- awp8->labelsize(11);
- awp8->minimum(0);
- awp8->maximum(127);
- awp8->step(1);
- awp8->callback((Fl_Callback*)cb_awp8);
- o->range(1,MAX_ALIENWAH_DELAY);
- } // Fl_Counter* awp8
- set_module_parameters(o);
- effalienwahwindow->end();
- } // Fl_Group* effalienwahwindow
- return effalienwahwindow;
-}
-
-Fl_Group* EffUI::make_distorsion_window() {
- { Fl_Group* o = effdistorsionwindow = new Fl_Group(0, 0, 380, 100, "Distortion");
- effdistorsionwindow->box(FL_UP_BOX);
- effdistorsionwindow->color((Fl_Color)221);
- effdistorsionwindow->selection_color(FL_BACKGROUND_COLOR);
- effdistorsionwindow->labeltype(FL_NO_LABEL);
- effdistorsionwindow->labelfont(1);
- effdistorsionwindow->labelsize(19);
- effdistorsionwindow->labelcolor(FL_FOREGROUND_COLOR);
- effdistorsionwindow->user_data((void*)(this));
- effdistorsionwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effdistorsionwindow->when(FL_WHEN_RELEASE);
- { distp = new Fl_Choice(11, 15, 95, 15, "Preset");
- distp->down_box(FL_BORDER_BOX);
- distp->color((Fl_Color)14);
- distp->selection_color(FL_BACKGROUND2_COLOR);
- distp->labelfont(1);
- distp->labelsize(10);
- distp->textfont(1);
- distp->textsize(10);
- distp->callback((Fl_Callback*)cb_distp);
- distp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- distp->menu(menu_distp);
- } // Fl_Choice* distp
- { distp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- distp0->tooltip("Effect Volume");
- distp0->box(FL_ROUND_UP_BOX);
- distp0->color(FL_BACKGROUND_COLOR);
- distp0->selection_color(FL_INACTIVE_COLOR);
- distp0->labeltype(FL_NORMAL_LABEL);
- distp0->labelfont(1);
- distp0->labelsize(11);
- distp0->labelcolor(FL_FOREGROUND_COLOR);
- distp0->maximum(127);
- distp0->callback((Fl_Callback*)cb_distp0);
- distp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp0
- { distp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- distp1->box(FL_ROUND_UP_BOX);
- distp1->color(FL_BACKGROUND_COLOR);
- distp1->selection_color(FL_INACTIVE_COLOR);
- distp1->labeltype(FL_NORMAL_LABEL);
- distp1->labelfont(1);
- distp1->labelsize(11);
- distp1->labelcolor(FL_FOREGROUND_COLOR);
- distp1->maximum(127);
- distp1->callback((Fl_Callback*)cb_distp1);
- distp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp1
- { distp2 = new WidgetPDial(80, 40, 30, 30, "LRc.");
- distp2->tooltip("L/R Mix");
- distp2->box(FL_ROUND_UP_BOX);
- distp2->color(FL_BACKGROUND_COLOR);
- distp2->selection_color(FL_INACTIVE_COLOR);
- distp2->labeltype(FL_NORMAL_LABEL);
- distp2->labelfont(1);
- distp2->labelsize(11);
- distp2->labelcolor(FL_FOREGROUND_COLOR);
- distp2->maximum(127);
- distp2->callback((Fl_Callback*)cb_distp2);
- distp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp2->when(FL_WHEN_RELEASE);
- } // WidgetPDial* distp2
- { distp3 = new WidgetPDial(120, 40, 30, 30, "Drive");
- distp3->tooltip("Input Amplification");
- distp3->box(FL_ROUND_UP_BOX);
- distp3->color(FL_BACKGROUND_COLOR);
- distp3->selection_color(FL_INACTIVE_COLOR);
- distp3->labeltype(FL_NORMAL_LABEL);
- distp3->labelfont(1);
- distp3->labelsize(11);
- distp3->labelcolor(FL_FOREGROUND_COLOR);
- distp3->maximum(127);
- distp3->callback((Fl_Callback*)cb_distp3);
- distp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* distp3
- { distp4 = new WidgetPDial(155, 40, 30, 30, "Level");
- distp4->tooltip("Output Amplification");
- distp4->box(FL_ROUND_UP_BOX);
- distp4->color(FL_BACKGROUND_COLOR);
- distp4->selection_color(FL_INACTIVE_COLOR);
- distp4->labeltype(FL_NORMAL_LABEL);
- distp4->labelfont(1);
- distp4->labelsize(11);
- distp4->labelcolor(FL_FOREGROUND_COLOR);
- distp4->maximum(127);
- distp4->callback((Fl_Callback*)cb_distp4);
- distp4->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp4->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp4
- { distp7 = new WidgetPDial(285, 40, 30, 30, "LPF");
- distp7->tooltip("Low Pass Filter");
- distp7->box(FL_ROUND_UP_BOX);
- distp7->color(FL_BACKGROUND_COLOR);
- distp7->selection_color(FL_INACTIVE_COLOR);
- distp7->labeltype(FL_NORMAL_LABEL);
- distp7->labelfont(1);
- distp7->labelsize(11);
- distp7->labelcolor(FL_FOREGROUND_COLOR);
- distp7->maximum(127);
- distp7->callback((Fl_Callback*)cb_distp7);
- distp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp7
- { distp8 = new WidgetPDial(320, 40, 30, 30, "HPF");
- distp8->tooltip("High Pass Filter");
- distp8->box(FL_ROUND_UP_BOX);
- distp8->color(FL_BACKGROUND_COLOR);
- distp8->selection_color(FL_INACTIVE_COLOR);
- distp8->labeltype(FL_NORMAL_LABEL);
- distp8->labelfont(1);
- distp8->labelsize(11);
- distp8->labelcolor(FL_FOREGROUND_COLOR);
- distp8->maximum(127);
- distp8->callback((Fl_Callback*)cb_distp8);
- distp8->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp8->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp8
- { distp5 = new Fl_Choice(190, 50, 60, 20, "Type");
- distp5->down_box(FL_BORDER_BOX);
- distp5->labelfont(1);
- distp5->labelsize(11);
- distp5->textsize(10);
- distp5->callback((Fl_Callback*)cb_distp5);
- distp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp5->menu(menu_distp5);
- } // Fl_Choice* distp5
- { distp6 = new Fl_Check_Button(260, 55, 15, 15, "Neg.");
- distp6->down_box(FL_DOWN_BOX);
- distp6->labelfont(1);
- distp6->labelsize(11);
- distp6->callback((Fl_Callback*)cb_distp6);
- distp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- } // Fl_Check_Button* distp6
- { distp9 = new Fl_Check_Button(355, 60, 15, 15, "St.");
- distp9->tooltip("Stereo");
- distp9->down_box(FL_DOWN_BOX);
- distp9->labelfont(1);
- distp9->labelsize(11);
- distp9->callback((Fl_Callback*)cb_distp9);
- distp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- } // Fl_Check_Button* distp9
- { distp10 = new Fl_Check_Button(355, 44, 15, 15, "PF");
- distp10->tooltip("Applies the filters(before or after) the distorsion");
- distp10->down_box(FL_DOWN_BOX);
- distp10->labelfont(1);
- distp10->labelsize(11);
- distp10->callback((Fl_Callback*)cb_distp10);
- distp10->align(Fl_Align(FL_ALIGN_TOP));
- } // Fl_Check_Button* distp10
- set_module_parameters(o);
- effdistorsionwindow->end();
- } // Fl_Group* effdistorsionwindow
- return effdistorsionwindow;
-}
-
-Fl_Group* EffUI::make_eq_window() {
- { Fl_Group* o = effeqwindow = new Fl_Group(0, 0, 380, 100, "EQ");
- effeqwindow->box(FL_UP_BOX);
- effeqwindow->color((Fl_Color)221);
- effeqwindow->selection_color(FL_BACKGROUND_COLOR);
- effeqwindow->labeltype(FL_NO_LABEL);
- effeqwindow->labelfont(1);
- effeqwindow->labelsize(19);
- effeqwindow->labelcolor(FL_FOREGROUND_COLOR);
- effeqwindow->user_data((void*)(this));
- effeqwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effeqwindow->when(FL_WHEN_RELEASE);
- { eqp0 = new WidgetPDial(10, 35, 30, 30, "Gain");
- eqp0->box(FL_ROUND_UP_BOX);
- eqp0->color(FL_BACKGROUND_COLOR);
- eqp0->selection_color(FL_INACTIVE_COLOR);
- eqp0->labeltype(FL_NORMAL_LABEL);
- eqp0->labelfont(1);
- eqp0->labelsize(11);
- eqp0->labelcolor(FL_FOREGROUND_COLOR);
- eqp0->maximum(127);
- eqp0->callback((Fl_Callback*)cb_eqp0);
- eqp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- eqp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* eqp0
- { Fl_Counter* o = bandcounter = new Fl_Counter(240, 20, 45, 15, "B.");
- bandcounter->tooltip("Band no.");
- bandcounter->type(1);
- bandcounter->labelfont(1);
- bandcounter->labelsize(11);
- bandcounter->minimum(0);
- bandcounter->maximum(1);
- bandcounter->step(1);
- bandcounter->textfont(1);
- bandcounter->textsize(11);
- bandcounter->callback((Fl_Callback*)cb_bandcounter);
- bandcounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(0,MAX_EQ_BANDS-1);
- } // Fl_Counter* bandcounter
- { Fl_Group* o = bandgroup = new Fl_Group(245, 40, 130, 50);
- bandgroup->box(FL_ENGRAVED_FRAME);
- { freqdial = new WidgetPDial(250, 50, 25, 25, "Freq");
- freqdial->box(FL_ROUND_UP_BOX);
- freqdial->color(FL_BACKGROUND_COLOR);
- freqdial->selection_color(FL_INACTIVE_COLOR);
- freqdial->labeltype(FL_NORMAL_LABEL);
- freqdial->labelfont(1);
- freqdial->labelsize(10);
- freqdial->labelcolor(FL_FOREGROUND_COLOR);
- freqdial->maximum(127);
- freqdial->callback((Fl_Callback*)cb_freqdial);
- freqdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- freqdial->when(3);
- } // WidgetPDial* freqdial
- { gaindial = new WidgetPDial(280, 50, 25, 25, "Gain");
- gaindial->box(FL_ROUND_UP_BOX);
- gaindial->color(FL_BACKGROUND_COLOR);
- gaindial->selection_color(FL_INACTIVE_COLOR);
- gaindial->labeltype(FL_NORMAL_LABEL);
- gaindial->labelfont(1);
- gaindial->labelsize(10);
- gaindial->labelcolor(FL_FOREGROUND_COLOR);
- gaindial->maximum(127);
- gaindial->step(1);
- gaindial->callback((Fl_Callback*)cb_gaindial);
- gaindial->align(Fl_Align(FL_ALIGN_BOTTOM));
- gaindial->when(3);
- } // WidgetPDial* gaindial
- { qdial = new WidgetPDial(310, 50, 25, 25, "Q");
- qdial->tooltip("Resonance/Bandwidth");
- qdial->box(FL_ROUND_UP_BOX);
- qdial->color(FL_BACKGROUND_COLOR);
- qdial->selection_color(FL_INACTIVE_COLOR);
- qdial->labeltype(FL_NORMAL_LABEL);
- qdial->labelfont(1);
- qdial->labelsize(10);
- qdial->labelcolor(FL_FOREGROUND_COLOR);
- qdial->maximum(127);
- qdial->callback((Fl_Callback*)cb_qdial);
- qdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- qdial->when(3);
- } // WidgetPDial* qdial
- { Fl_Counter* o = stagescounter = new Fl_Counter(340, 60, 30, 15, "St.");
- stagescounter->tooltip("Additional filter stages");
- stagescounter->type(1);
- stagescounter->labelfont(1);
- stagescounter->labelsize(10);
- stagescounter->minimum(1);
- stagescounter->maximum(127);
- stagescounter->step(1);
- stagescounter->textfont(1);
- stagescounter->textsize(11);
- stagescounter->callback((Fl_Callback*)cb_stagescounter);
- o->bounds(0,MAX_FILTER_STAGES-1);
- } // Fl_Counter* stagescounter
- if (eff->geteffectpar(10)==0) o->deactivate();
- bandgroup->end();
- } // Fl_Group* bandgroup
- { typechoice = new Fl_Choice(290, 20, 40, 15, "T.");
- typechoice->tooltip("Type");
- typechoice->down_box(FL_BORDER_BOX);
- typechoice->labelfont(1);
- typechoice->labelsize(10);
- typechoice->textsize(10);
- typechoice->callback((Fl_Callback*)cb_typechoice);
- typechoice->align(Fl_Align(FL_ALIGN_TOP));
- typechoice->when(FL_WHEN_RELEASE_ALWAYS);
- typechoice->menu(menu_typechoice);
- } // Fl_Choice* typechoice
- { EQGraph* o = eqgraph = new EQGraph(45, 10, 190, 75);
- eqgraph->box(FL_BORDER_BOX);
- eqgraph->color(FL_LIGHT1);
- eqgraph->selection_color(FL_BACKGROUND_COLOR);
- eqgraph->labeltype(FL_NORMAL_LABEL);
- eqgraph->labelfont(0);
- eqgraph->labelsize(14);
- eqgraph->labelcolor(FL_FOREGROUND_COLOR);
- eqgraph->align(Fl_Align(FL_ALIGN_CENTER));
- eqgraph->when(FL_WHEN_RELEASE);
- o->init(eff);
- } // EQGraph* eqgraph
- set_module_parameters(o);
- effeqwindow->end();
- } // Fl_Group* effeqwindow
- return effeqwindow;
-}
-
-Fl_Group* EffUI::make_dynamicfilter_window() {
- { Fl_Group* o = effdynamicfilterwindow = new Fl_Group(0, 0, 380, 100, "DynFilter");
- effdynamicfilterwindow->box(FL_UP_BOX);
- effdynamicfilterwindow->color((Fl_Color)221);
- effdynamicfilterwindow->selection_color(FL_BACKGROUND_COLOR);
- effdynamicfilterwindow->labeltype(FL_NO_LABEL);
- effdynamicfilterwindow->labelfont(1);
- effdynamicfilterwindow->labelsize(19);
- effdynamicfilterwindow->labelcolor(FL_FOREGROUND_COLOR);
- effdynamicfilterwindow->user_data((void*)(this));
- effdynamicfilterwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effdynamicfilterwindow->when(FL_WHEN_RELEASE);
- { dfp = new Fl_Choice(10, 15, 90, 15, "Preset");
- dfp->down_box(FL_BORDER_BOX);
- dfp->color((Fl_Color)14);
- dfp->selection_color(FL_BACKGROUND2_COLOR);
- dfp->labelfont(1);
- dfp->labelsize(10);
- dfp->textfont(1);
- dfp->textsize(10);
- dfp->callback((Fl_Callback*)cb_dfp);
- dfp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- dfp->menu(menu_dfp);
- } // Fl_Choice* dfp
- { dfp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- dfp0->tooltip("Effect Volume");
- dfp0->box(FL_ROUND_UP_BOX);
- dfp0->color(FL_BACKGROUND_COLOR);
- dfp0->selection_color(FL_INACTIVE_COLOR);
- dfp0->labeltype(FL_NORMAL_LABEL);
- dfp0->labelfont(1);
- dfp0->labelsize(11);
- dfp0->labelcolor(FL_FOREGROUND_COLOR);
- dfp0->maximum(127);
- dfp0->callback((Fl_Callback*)cb_dfp0);
- dfp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp0
- { dfp1 = new WidgetPDial(45, 40, 30, 30, "Pan");
- dfp1->box(FL_ROUND_UP_BOX);
- dfp1->color(FL_BACKGROUND_COLOR);
- dfp1->selection_color(FL_INACTIVE_COLOR);
- dfp1->labeltype(FL_NORMAL_LABEL);
- dfp1->labelfont(1);
- dfp1->labelsize(11);
- dfp1->labelcolor(FL_FOREGROUND_COLOR);
- dfp1->maximum(127);
- dfp1->callback((Fl_Callback*)cb_dfp1);
- dfp1->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp1
- { dfp2 = new WidgetPDial(85, 40, 30, 30, "Freq");
- dfp2->tooltip("LFO Frequency");
- dfp2->box(FL_ROUND_UP_BOX);
- dfp2->color(FL_BACKGROUND_COLOR);
- dfp2->selection_color(FL_INACTIVE_COLOR);
- dfp2->labeltype(FL_NORMAL_LABEL);
- dfp2->labelfont(1);
- dfp2->labelsize(11);
- dfp2->labelcolor(FL_FOREGROUND_COLOR);
- dfp2->maximum(127);
- dfp2->callback((Fl_Callback*)cb_dfp2);
- dfp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp2
- { dfp3 = new WidgetPDial(120, 40, 30, 30, "Rnd");
- dfp3->tooltip("LFO Randomness");
- dfp3->box(FL_ROUND_UP_BOX);
- dfp3->color(FL_BACKGROUND_COLOR);
- dfp3->selection_color(FL_INACTIVE_COLOR);
- dfp3->labeltype(FL_NORMAL_LABEL);
- dfp3->labelfont(1);
- dfp3->labelsize(11);
- dfp3->labelcolor(FL_FOREGROUND_COLOR);
- dfp3->maximum(127);
- dfp3->callback((Fl_Callback*)cb_dfp3);
- dfp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* dfp3
- { dfp5 = new WidgetPDial(200, 40, 30, 30, "St.df");
- dfp5->tooltip("Left/Right Channel Phase Shift");
- dfp5->box(FL_ROUND_UP_BOX);
- dfp5->color(FL_BACKGROUND_COLOR);
- dfp5->selection_color(FL_INACTIVE_COLOR);
- dfp5->labeltype(FL_NORMAL_LABEL);
- dfp5->labelfont(1);
- dfp5->labelsize(11);
- dfp5->labelcolor(FL_FOREGROUND_COLOR);
- dfp5->maximum(127);
- dfp5->callback((Fl_Callback*)cb_dfp5);
- dfp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp5
- { dfp6 = new WidgetPDial(235, 40, 30, 30, "LfoD");
- dfp6->tooltip("LFO Depth");
- dfp6->box(FL_ROUND_UP_BOX);
- dfp6->color(FL_BACKGROUND_COLOR);
- dfp6->selection_color(FL_INACTIVE_COLOR);
- dfp6->labeltype(FL_NORMAL_LABEL);
- dfp6->labelfont(1);
- dfp6->labelsize(11);
- dfp6->labelcolor(FL_FOREGROUND_COLOR);
- dfp6->maximum(127);
- dfp6->callback((Fl_Callback*)cb_dfp6);
- dfp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp6
- { dfp4 = new Fl_Choice(155, 50, 40, 15, "LFO type");
- dfp4->tooltip("LFO function");
- dfp4->down_box(FL_BORDER_BOX);
- dfp4->labelfont(1);
- dfp4->labelsize(10);
- dfp4->textsize(8);
- dfp4->callback((Fl_Callback*)cb_dfp4);
- dfp4->align(Fl_Align(130));
- dfp4->menu(menu_dfp4);
- } // Fl_Choice* dfp4
- { Fl_Button* o = new Fl_Button(115, 10, 55, 25, "Filter");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Filter);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(270, 40, 105, 45);
- o->box(FL_UP_FRAME);
- o->color((Fl_Color)51);
- { dfp7 = new WidgetPDial(275, 45, 25, 25, "A.S.");
- dfp7->tooltip("Filter vs Amplitude");
- dfp7->box(FL_ROUND_UP_BOX);
- dfp7->color(FL_BACKGROUND_COLOR);
- dfp7->selection_color(FL_INACTIVE_COLOR);
- dfp7->labeltype(FL_NORMAL_LABEL);
- dfp7->labelfont(1);
- dfp7->labelsize(11);
- dfp7->labelcolor(FL_FOREGROUND_COLOR);
- dfp7->maximum(127);
- dfp7->callback((Fl_Callback*)cb_dfp7);
- dfp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp7
- { dfp9 = new WidgetPDial(305, 45, 25, 25, "A.M");
- dfp9->tooltip("rate that amplitude changes the filter");
- dfp9->box(FL_ROUND_UP_BOX);
- dfp9->color(FL_BACKGROUND_COLOR);
- dfp9->selection_color(FL_INACTIVE_COLOR);
- dfp9->labeltype(FL_NORMAL_LABEL);
- dfp9->labelfont(1);
- dfp9->labelsize(11);
- dfp9->labelcolor(FL_FOREGROUND_COLOR);
- dfp9->maximum(127);
- dfp9->callback((Fl_Callback*)cb_dfp9);
- dfp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp9
- { dfp8 = new Fl_Check_Button(345, 55, 15, 15, "A.Inv.");
- dfp8->tooltip("enable for filter frequency to lower with higher input amplitude");
- dfp8->down_box(FL_DOWN_BOX);
- dfp8->labelfont(1);
- dfp8->labelsize(11);
- dfp8->callback((Fl_Callback*)cb_dfp8);
- dfp8->align(Fl_Align(FL_ALIGN_BOTTOM));
- } // Fl_Check_Button* dfp8
- o->end();
- } // Fl_Group* o
- set_module_parameters(o);
- effdynamicfilterwindow->end();
- } // Fl_Group* effdynamicfilterwindow
- return effdynamicfilterwindow;
-}
-
-Fl_Double_Window* EffUI::make_filter_window() {
- { Fl_Double_Window* o = filterwindow = new Fl_Double_Window(290, 110, "Filter Parameters for DynFilter Eff.");
- filterwindow->user_data((void*)(this));
- { FilterUI* o = new FilterUI(5, 5, 275, 75, "DynFilter effect - Filter");
- o->box(FL_FLAT_BOX);
- o->color(FL_LIGHT1);
- o->selection_color(FL_BACKGROUND_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- o->when(FL_WHEN_RELEASE);
- o->init(eff->filterpars,NULL,NULL);
- o->use_for_dynamic_filter();
- o->end();
- } // FilterUI* o
- { Fl_Button* o = new Fl_Button(105, 85, 70, 20, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- set_module_parameters(o);
- filterwindow->end();
- } // Fl_Double_Window* filterwindow
- return filterwindow;
-}
-
-void EffUI::init(EffectMgr *eff_) {
- eff=eff_;
-
- make_null_window();
- make_reverb_window();
- make_echo_window();
- make_chorus_window();
- make_phaser_window();
- make_alienwah_window();
- make_distorsion_window();
- make_eq_window();
- make_dynamicfilter_window();
-
- int px=this->parent()->x();
- int py=this->parent()->y();
-
- effnullwindow->position(px,py);
- effreverbwindow->position(px,py);
- effechowindow->position(px,py);
- effchoruswindow->position(px,py);
- effphaserwindow->position(px,py);
- effalienwahwindow->position(px,py);
- effdistorsionwindow->position(px,py);
- effeqwindow->position(px,py);
- effdynamicfilterwindow->position(px,py);
-
- refresh(eff);
-}
-
-void EffUI::refresh(EffectMgr *eff_) {
- eff=eff_;
- this->hide();
-
- effnullwindow->hide();
- effreverbwindow->hide();
- effechowindow->hide();
- effchoruswindow->hide();
- effphaserwindow->hide();
- effalienwahwindow->hide();
- effdistorsionwindow->hide();
- effeqwindow->hide();
- effdynamicfilterwindow->hide();
-
- eqband=0;
-
- if (filterwindow!=NULL){
- filterwindow->hide();
- delete(filterwindow);
- filterwindow=NULL;
- };
-
- switch(eff->geteffect()){
- case 1:
- revp->value(eff->getpreset());
- revp0->value(eff->geteffectpar(0));if (eff->insertion!=0) revp0->label("D/W");
- revp1->value(eff->geteffectpar(1));
- revp2->value(eff->geteffectpar(2));
- revp3->value(eff->geteffectpar(3));
- revp4->value(eff->geteffectpar(4));
- //revp5->value(eff->geteffectpar(5));
- revp6->value(eff->geteffectpar(6));
- revp7->value(eff->geteffectpar(7));
- revp8->value(eff->geteffectpar(8));
- revp9->value(eff->geteffectpar(9));
- revp10->value(eff->geteffectpar(10));
- revp11->value(eff->geteffectpar(11));
- revp12->value(eff->geteffectpar(12));
-
- effreverbwindow->show();
- break;
- case 2:
- echop->value(eff->getpreset());
- echop0->value(eff->geteffectpar(0));if (eff->insertion!=0) echop0->label("D/W");
- echop1->value(eff->geteffectpar(1));
- echop2->value(eff->geteffectpar(2));
- echop3->value(eff->geteffectpar(3));
- echop4->value(eff->geteffectpar(4));
- echop5->value(eff->geteffectpar(5));
- echop6->value(eff->geteffectpar(6));
- effechowindow->show();
- break;
- case 3:
- chorusp->value(eff->getpreset());
- chorusp0->value(eff->geteffectpar(0));if (eff->insertion!=0) chorusp0->label("D/W");
- chorusp1->value(eff->geteffectpar(1));
- chorusp2->value(eff->geteffectpar(2));
- chorusp3->value(eff->geteffectpar(3));
- chorusp4->value(eff->geteffectpar(4));
- chorusp5->value(eff->geteffectpar(5));
- chorusp6->value(eff->geteffectpar(6));
- chorusp7->value(eff->geteffectpar(7));
- chorusp8->value(eff->geteffectpar(8));
- chorusp9->value(eff->geteffectpar(9));
- chorusp11->value(eff->geteffectpar(11));
- effchoruswindow->show();
- break;
- case 4:
- phaserp->value(eff->getpreset());
- phaserp0->value(eff->geteffectpar(0));if (eff->insertion!=0) phaserp0->label("D/W");
- phaserp1->value(eff->geteffectpar(1));
- phaserp2->value(eff->geteffectpar(2));
- phaserp3->value(eff->geteffectpar(3));
- phaserp4->value(eff->geteffectpar(4));
- phaserp5->value(eff->geteffectpar(5));
- phaserp6->value(eff->geteffectpar(6));
- phaserp7->value(eff->geteffectpar(7));
- phaserp8->value(eff->geteffectpar(8));
- phaserp9->value(eff->geteffectpar(9));
- phaserp10->value(eff->geteffectpar(10));
- phaserp11->value(eff->geteffectpar(11));
- phaserp12->value(eff->geteffectpar(12));
- phaserp13->value(eff->geteffectpar(13));
- phaserp14->value(eff->geteffectpar(14));
- effphaserwindow->show();
- break;
- case 5:
- awp->value(eff->getpreset());
- awp0->value(eff->geteffectpar(0));if (eff->insertion!=0) awp0->label("D/W");
- awp1->value(eff->geteffectpar(1));
- awp2->value(eff->geteffectpar(2));
- awp3->value(eff->geteffectpar(3));
- awp4->value(eff->geteffectpar(4));
- awp5->value(eff->geteffectpar(5));
- awp6->value(eff->geteffectpar(6));
- awp7->value(eff->geteffectpar(7));
- awp8->value(eff->geteffectpar(8));
- awp9->value(eff->geteffectpar(9));
- awp10->value(eff->geteffectpar(10));
-
- effalienwahwindow->show();
- break;
- case 6:
- distp->value(eff->getpreset());
- distp0->value(eff->geteffectpar(0));if (eff->insertion!=0) distp0->label("D/W");
- distp1->value(eff->geteffectpar(1));
- distp2->value(eff->geteffectpar(2));
- distp3->value(eff->geteffectpar(3));
- distp4->value(eff->geteffectpar(4));
- distp5->value(eff->geteffectpar(5));
- distp6->value(eff->geteffectpar(6));
- distp7->value(eff->geteffectpar(7));
- distp8->value(eff->geteffectpar(8));
- distp9->value(eff->geteffectpar(9));
- distp10->value(eff->geteffectpar(10));
- effdistorsionwindow->show();
- break;
- case 7:eqband=0;
- eqp0->value(eff->geteffectpar(0));
- bandcounter->value(eqband);
- bandcounter->do_callback();
- typechoice->value(eff->geteffectpar(10));
- eqgraph->redraw();
- freqdial->value(eff->geteffectpar(11));
- gaindial->value(eff->geteffectpar(12));
- if (eff->geteffectpar(10)<6) gaindial->deactivate();
- qdial->value(eff->geteffectpar(13));
- stagescounter->value(eff->geteffectpar(14));
- eqgraph->init(eff);
- effeqwindow->show();
- break;
- case 8:make_filter_window();
- dfp->value(eff->getpreset());
- dfp0->value(eff->geteffectpar(0));if (eff->insertion!=0) dfp0->label("D/W");
- dfp1->value(eff->geteffectpar(1));
- dfp2->value(eff->geteffectpar(2));
- dfp3->value(eff->geteffectpar(3));
- dfp4->value(eff->geteffectpar(4));
- dfp5->value(eff->geteffectpar(5));
- dfp6->value(eff->geteffectpar(6));
- dfp7->value(eff->geteffectpar(7));
- dfp8->value(eff->geteffectpar(8));
- dfp9->value(eff->geteffectpar(9));
-
-
- effdynamicfilterwindow->show();
- break;
- default:effnullwindow->show();
- break;
- };
-
- this->show();
-}
-
-void EffUI::refresh() {
- refresh(eff);
-}
-
-void SimpleEffUI::cb_revp5_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-
-refresh(eff);
-}
-void SimpleEffUI::cb_revp5(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_revp5_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_revp1[] = {
- {"Cathedral 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cathedral 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cathedral 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hall 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hall 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Room 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Room 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Basement", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Tunnel", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echoed 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echoed 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Very Long 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Very Long 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_revp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_revp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_revp01_i(o,v);
-}
-
-void SimpleEffUI::cb_revp21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_revp21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_revp21_i(o,v);
-}
-
-void SimpleEffUI::cb_revp31_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void SimpleEffUI::cb_revp31(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_revp31_i(o,v);
-}
-
-void SimpleEffUI::cb_revp91_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void SimpleEffUI::cb_revp91(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_revp91_i(o,v);
-}
-
-void SimpleEffUI::cb_echop7_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_echop7(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_echop7_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_echop1[] = {
- {"Echo 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Simple Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Canyon", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Panning Echo 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Feedback Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_echop01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_echop01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_echop01_i(o,v);
-}
-
-void SimpleEffUI::cb_echop21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_echop21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_echop21_i(o,v);
-}
-
-void SimpleEffUI::cb_echop51_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void SimpleEffUI::cb_echop51(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_echop51_i(o,v);
-}
-
-void SimpleEffUI::cb_choruspa_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_choruspa(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_choruspa_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_chorusp1[] = {
- {"Chorus 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Celeste 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Celeste 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flange 5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_chorusp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_chorusp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_chorusp01_i(o,v);
-}
-
-void SimpleEffUI::cb_chorusp21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_chorusp21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_chorusp21_i(o,v);
-}
-
-void SimpleEffUI::cb_chorusp61_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void SimpleEffUI::cb_chorusp61(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_chorusp61_i(o,v);
-}
-
-void SimpleEffUI::cb_chorusp71_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void SimpleEffUI::cb_chorusp71(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_chorusp71_i(o,v);
-}
-
-void SimpleEffUI::cb_chorusp81_i(WidgetPDial* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void SimpleEffUI::cb_chorusp81(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_chorusp81_i(o,v);
-}
-
-void SimpleEffUI::cb_Flange1_i(Fl_Check_Button* o, void*) {
- eff->seteffectpar(10,(int) o->value());
-}
-void SimpleEffUI::cb_Flange1(Fl_Check_Button* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_Flange1_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserpa_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_phaserpa(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserpa_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_phaserp1[] = {
- {"Phaser 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser 6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_phaserp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp01_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserp21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp21_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserp51_i(WidgetPDial* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp51(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp51_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserp61_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp61(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp61_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserp71_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp71(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp71_i(o,v);
-}
-
-void SimpleEffUI::cb_phaserp81_i(Fl_Counter* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void SimpleEffUI::cb_phaserp81(Fl_Counter* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_phaserp81_i(o,v);
-}
-
-void SimpleEffUI::cb_awpa_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_awpa(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_awpa_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_awp1[] = {
- {"Alienwah 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Alienwah 4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_awp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_awp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_awp01_i(o,v);
-}
-
-void SimpleEffUI::cb_awp21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_awp21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_awp21_i(o,v);
-}
-
-void SimpleEffUI::cb_awp61_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void SimpleEffUI::cb_awp61(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_awp61_i(o,v);
-}
-
-void SimpleEffUI::cb_awp81_i(Fl_Counter* o, void*) {
- eff->seteffectpar(8,(int) o->value());
-}
-void SimpleEffUI::cb_awp81(Fl_Counter* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_awp81_i(o,v);
-}
-
-void SimpleEffUI::cb_distpa_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_distpa(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distpa_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_distp1[] = {
- {"Overdrive 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Overdrive 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"A. Exciter 1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"A. Exciter 2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Guitar Amp", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Quantisize", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_distp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_distp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distp01_i(o,v);
-}
-
-void SimpleEffUI::cb_distp31_i(WidgetPDial* o, void*) {
- eff->seteffectpar(3,(int) o->value());
-}
-void SimpleEffUI::cb_distp31(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distp31_i(o,v);
-}
-
-void SimpleEffUI::cb_distp41_i(WidgetPDial* o, void*) {
- eff->seteffectpar(4,(int) o->value());
-}
-void SimpleEffUI::cb_distp41(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distp41_i(o,v);
-}
-
-void SimpleEffUI::cb_distp71_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void SimpleEffUI::cb_distp71(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distp71_i(o,v);
-}
-
-void SimpleEffUI::cb_distp51_i(Fl_Choice* o, void*) {
- eff->seteffectpar(5,(int) o->value());
-}
-void SimpleEffUI::cb_distp51(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_distp51_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_distp51[] = {
- {"Atan", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Qnts", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Zigzg", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtL", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ILmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Clip", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sgm", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_bandcounter1_i(Fl_Counter* o, void*) {
- eqband=(int) o->value();
-int npb=eqband*5+10;
-
-int type=eff->geteffectpar(npb);
-typechoice->value(type);
-
-if (type>6) gaindial->activate();
- else gaindial->deactivate();
-
-if (type==0) bandgroup->deactivate();
-else bandgroup->activate();
-
-int freq=eff->geteffectpar(npb+1);
-freqdial->value(freq);
-
-int gain=eff->geteffectpar(npb+2);
-gaindial->value(gain);
-
-int q=eff->geteffectpar(npb+3);
-qdial->value(q);
-
-int dbl=eff->geteffectpar(npb+4);
-stagescounter->value(dbl);
-}
-void SimpleEffUI::cb_bandcounter1(Fl_Counter* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_bandcounter1_i(o,v);
-}
-
-void SimpleEffUI::cb_freqdial1_i(WidgetPDial* o, void*) {
- int np=eqband*5+11;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void SimpleEffUI::cb_freqdial1(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_freqdial1_i(o,v);
-}
-
-void SimpleEffUI::cb_gaindial1_i(WidgetPDial* o, void*) {
- int np=eqband*5+12;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void SimpleEffUI::cb_gaindial1(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_gaindial1_i(o,v);
-}
-
-void SimpleEffUI::cb_qdial1_i(WidgetPDial* o, void*) {
- int np=eqband*5+13;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void SimpleEffUI::cb_qdial1(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_qdial1_i(o,v);
-}
-
-void SimpleEffUI::cb_stagescounter1_i(Fl_Counter* o, void*) {
- int np=eqband*5+14;
-eff->seteffectpar(np,(int) o->value());
-eqgraph->redraw();
-}
-void SimpleEffUI::cb_stagescounter1(Fl_Counter* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_stagescounter1_i(o,v);
-}
-
-void SimpleEffUI::cb_typechoice1_i(Fl_Choice* o, void*) {
- int np=eqband*5+10;
-eff->seteffectpar(np,(int) o->value());
-bandcounter->do_callback();
-eqgraph->redraw();
-}
-void SimpleEffUI::cb_typechoice1(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_typechoice1_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_typechoice1[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lp1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hp1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Hp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Bp2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"N2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pk", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LSh", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HSh", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_dfpa_i(Fl_Choice* o, void*) {
- eff->changepreset((int)o->value());
-refresh(eff);
-}
-void SimpleEffUI::cb_dfpa(Fl_Choice* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_dfpa_i(o,v);
-}
-
-Fl_Menu_Item SimpleEffUI::menu_dfp1[] = {
- {"WahWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AutoWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sweep", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"VocalMorph1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"VocalMorph2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void SimpleEffUI::cb_dfp01_i(WidgetPDial* o, void*) {
- eff->seteffectpar(0,(int) o->value());
-}
-void SimpleEffUI::cb_dfp01(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_dfp01_i(o,v);
-}
-
-void SimpleEffUI::cb_dfp21_i(WidgetPDial* o, void*) {
- eff->seteffectpar(2,(int) o->value());
-}
-void SimpleEffUI::cb_dfp21(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_dfp21_i(o,v);
-}
-
-void SimpleEffUI::cb_dfp61_i(WidgetPDial* o, void*) {
- eff->seteffectpar(6,(int) o->value());
-}
-void SimpleEffUI::cb_dfp61(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->user_data()))->cb_dfp61_i(o,v);
-}
-
-void SimpleEffUI::cb_dfp71_i(WidgetPDial* o, void*) {
- eff->seteffectpar(7,(int) o->value());
-}
-void SimpleEffUI::cb_dfp71(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_dfp71_i(o,v);
-}
-
-void SimpleEffUI::cb_dfp91_i(WidgetPDial* o, void*) {
- eff->seteffectpar(9,(int) o->value());
-}
-void SimpleEffUI::cb_dfp91(WidgetPDial* o, void* v) {
- ((SimpleEffUI*)(o->parent()->parent()->user_data()))->cb_dfp91_i(o,v);
-}
-
-SimpleEffUI::SimpleEffUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- eff=NULL;
-}
-
-SimpleEffUI::~SimpleEffUI() {
- effnullwindow->hide();//delete (effnullwindow);
- effreverbwindow->hide();//delete (effreverbwindow);
- effechowindow->hide();//delete (effechowindow);
- effchoruswindow->hide();//delete (effchoruswindow);
- effphaserwindow->hide();//delete (effphaserwindow);
- effalienwahwindow->hide();//delete (effalienwahwindow);
- effdistorsionwindow->hide();//delete (effdistorsionwindow);
- effeqwindow->hide();//delete (effeqwindow);
- effdynamicfilterwindow->hide();//delete (effdynamicfilterwindow);
-}
-
-Fl_Group* SimpleEffUI::make_null_window() {
- { Fl_Group* o = effnullwindow = new Fl_Group(0, 0, 230, 95, "No Effect");
- effnullwindow->box(FL_UP_BOX);
- effnullwindow->color((Fl_Color)221);
- effnullwindow->selection_color(FL_BACKGROUND_COLOR);
- effnullwindow->labeltype(FL_NO_LABEL);
- effnullwindow->labelfont(1);
- effnullwindow->labelsize(19);
- effnullwindow->labelcolor(FL_FOREGROUND_COLOR);
- effnullwindow->user_data((void*)(this));
- effnullwindow->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- effnullwindow->when(FL_WHEN_RELEASE);
- set_module_parameters(o);
- effnullwindow->end();
- } // Fl_Group* effnullwindow
- return effnullwindow;
-}
-
-Fl_Group* SimpleEffUI::make_reverb_window() {
- { Fl_Group* o = effreverbwindow = new Fl_Group(0, 0, 230, 100, "Reverb");
- effreverbwindow->box(FL_UP_BOX);
- effreverbwindow->color((Fl_Color)51);
- effreverbwindow->selection_color(FL_BACKGROUND_COLOR);
- effreverbwindow->labeltype(FL_NO_LABEL);
- effreverbwindow->labelfont(1);
- effreverbwindow->labelsize(19);
- effreverbwindow->labelcolor(FL_FOREGROUND_COLOR);
- effreverbwindow->user_data((void*)(this));
- effreverbwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effreverbwindow->when(FL_WHEN_RELEASE);
- { revp = new Fl_Choice(10, 15, 90, 15, "Preset");
- revp->down_box(FL_BORDER_BOX);
- revp->color(FL_DARK1);
- revp->selection_color(FL_BACKGROUND2_COLOR);
- revp->labelfont(1);
- revp->labelsize(10);
- revp->textfont(1);
- revp->textsize(10);
- revp->callback((Fl_Callback*)cb_revp5);
- revp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- revp->menu(menu_revp1);
- } // Fl_Choice* revp
- { revp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- revp0->tooltip("Effect Volume");
- revp0->box(FL_ROUND_UP_BOX);
- revp0->color(FL_BACKGROUND_COLOR);
- revp0->selection_color(FL_INACTIVE_COLOR);
- revp0->labeltype(FL_NORMAL_LABEL);
- revp0->labelfont(1);
- revp0->labelsize(11);
- revp0->labelcolor(FL_FOREGROUND_COLOR);
- revp0->maximum(127);
- revp0->callback((Fl_Callback*)cb_revp01);
- revp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp0
- { revp2 = new WidgetPDial(45, 40, 30, 30, "Time");
- revp2->tooltip("Duration of Reverb");
- revp2->box(FL_ROUND_UP_BOX);
- revp2->color(FL_BACKGROUND_COLOR);
- revp2->selection_color(FL_INACTIVE_COLOR);
- revp2->labeltype(FL_NORMAL_LABEL);
- revp2->labelfont(1);
- revp2->labelsize(11);
- revp2->labelcolor(FL_FOREGROUND_COLOR);
- revp2->maximum(127);
- revp2->callback((Fl_Callback*)cb_revp21);
- revp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp2
- { revp3 = new WidgetPDial(85, 40, 30, 30, "I.del");
- revp3->tooltip("Initial Delay");
- revp3->box(FL_ROUND_UP_BOX);
- revp3->color(FL_BACKGROUND_COLOR);
- revp3->selection_color(FL_INACTIVE_COLOR);
- revp3->labeltype(FL_NORMAL_LABEL);
- revp3->labelfont(1);
- revp3->labelsize(11);
- revp3->labelcolor(FL_FOREGROUND_COLOR);
- revp3->maximum(127);
- revp3->callback((Fl_Callback*)cb_revp31);
- revp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* revp3
- { revp9 = new WidgetPDial(120, 40, 30, 30, "Damp");
- revp9->tooltip("Dampening");
- revp9->box(FL_ROUND_UP_BOX);
- revp9->color(FL_BACKGROUND_COLOR);
- revp9->selection_color(FL_INACTIVE_COLOR);
- revp9->labeltype(FL_NORMAL_LABEL);
- revp9->labelfont(1);
- revp9->labelsize(11);
- revp9->labelcolor(FL_FOREGROUND_COLOR);
- revp9->minimum(64);
- revp9->maximum(127);
- revp9->step(1);
- revp9->callback((Fl_Callback*)cb_revp91);
- revp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- revp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* revp9
- set_module_parameters(o);
- effreverbwindow->end();
- } // Fl_Group* effreverbwindow
- return effreverbwindow;
-}
-
-Fl_Group* SimpleEffUI::make_echo_window() {
- { Fl_Group* o = effechowindow = new Fl_Group(0, 0, 230, 100, "Echo");
- effechowindow->box(FL_UP_BOX);
- effechowindow->color((Fl_Color)51);
- effechowindow->selection_color(FL_BACKGROUND_COLOR);
- effechowindow->labeltype(FL_NO_LABEL);
- effechowindow->labelfont(1);
- effechowindow->labelsize(19);
- effechowindow->labelcolor(FL_FOREGROUND_COLOR);
- effechowindow->user_data((void*)(this));
- effechowindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effechowindow->when(FL_WHEN_RELEASE);
- { echop = new Fl_Choice(11, 15, 95, 15, "Preset");
- echop->down_box(FL_BORDER_BOX);
- echop->color(FL_DARK1);
- echop->selection_color(FL_BACKGROUND2_COLOR);
- echop->labelfont(1);
- echop->labelsize(10);
- echop->textfont(1);
- echop->textsize(10);
- echop->callback((Fl_Callback*)cb_echop7);
- echop->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- echop->menu(menu_echop1);
- } // Fl_Choice* echop
- { echop0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- echop0->tooltip("Effect Volume");
- echop0->box(FL_ROUND_UP_BOX);
- echop0->color(FL_BACKGROUND_COLOR);
- echop0->selection_color(FL_INACTIVE_COLOR);
- echop0->labeltype(FL_NORMAL_LABEL);
- echop0->labelfont(1);
- echop0->labelsize(11);
- echop0->labelcolor(FL_FOREGROUND_COLOR);
- echop0->maximum(127);
- echop0->callback((Fl_Callback*)cb_echop01);
- echop0->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop0
- { echop2 = new WidgetPDial(45, 40, 30, 30, "Delay");
- echop2->box(FL_ROUND_UP_BOX);
- echop2->color(FL_BACKGROUND_COLOR);
- echop2->selection_color(FL_INACTIVE_COLOR);
- echop2->labeltype(FL_NORMAL_LABEL);
- echop2->labelfont(1);
- echop2->labelsize(11);
- echop2->labelcolor(FL_FOREGROUND_COLOR);
- echop2->maximum(127);
- echop2->callback((Fl_Callback*)cb_echop21);
- echop2->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop2->when(FL_WHEN_RELEASE);
- } // WidgetPDial* echop2
- { echop5 = new WidgetPDial(80, 40, 30, 30, "Fb.");
- echop5->tooltip("Feedback");
- echop5->box(FL_ROUND_UP_BOX);
- echop5->color(FL_BACKGROUND_COLOR);
- echop5->selection_color(FL_INACTIVE_COLOR);
- echop5->labeltype(FL_NORMAL_LABEL);
- echop5->labelfont(1);
- echop5->labelsize(11);
- echop5->labelcolor(FL_FOREGROUND_COLOR);
- echop5->maximum(127);
- echop5->callback((Fl_Callback*)cb_echop51);
- echop5->align(Fl_Align(FL_ALIGN_BOTTOM));
- echop5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* echop5
- set_module_parameters(o);
- effechowindow->end();
- } // Fl_Group* effechowindow
- return effechowindow;
-}
-
-Fl_Group* SimpleEffUI::make_chorus_window() {
- { Fl_Group* o = effchoruswindow = new Fl_Group(0, 0, 230, 100, "Chorus");
- effchoruswindow->box(FL_UP_BOX);
- effchoruswindow->color((Fl_Color)51);
- effchoruswindow->selection_color(FL_BACKGROUND_COLOR);
- effchoruswindow->labeltype(FL_NO_LABEL);
- effchoruswindow->labelfont(1);
- effchoruswindow->labelsize(19);
- effchoruswindow->labelcolor(FL_FOREGROUND_COLOR);
- effchoruswindow->user_data((void*)(this));
- effchoruswindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effchoruswindow->when(FL_WHEN_RELEASE);
- { chorusp = new Fl_Choice(10, 15, 90, 15, "Preset");
- chorusp->down_box(FL_BORDER_BOX);
- chorusp->color(FL_DARK1);
- chorusp->selection_color(FL_BACKGROUND2_COLOR);
- chorusp->labelfont(1);
- chorusp->labelsize(10);
- chorusp->textfont(1);
- chorusp->textsize(10);
- chorusp->callback((Fl_Callback*)cb_choruspa);
- chorusp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- chorusp->menu(menu_chorusp1);
- } // Fl_Choice* chorusp
- { chorusp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- chorusp0->tooltip("Effect Volume");
- chorusp0->box(FL_ROUND_UP_BOX);
- chorusp0->color(FL_BACKGROUND_COLOR);
- chorusp0->selection_color(FL_INACTIVE_COLOR);
- chorusp0->labeltype(FL_NORMAL_LABEL);
- chorusp0->labelfont(1);
- chorusp0->labelsize(11);
- chorusp0->labelcolor(FL_FOREGROUND_COLOR);
- chorusp0->maximum(127);
- chorusp0->callback((Fl_Callback*)cb_chorusp01);
- chorusp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp0
- { chorusp2 = new WidgetPDial(45, 40, 30, 30, "Freq");
- chorusp2->tooltip("LFO Frequency");
- chorusp2->box(FL_ROUND_UP_BOX);
- chorusp2->color(FL_BACKGROUND_COLOR);
- chorusp2->selection_color(FL_INACTIVE_COLOR);
- chorusp2->labeltype(FL_NORMAL_LABEL);
- chorusp2->labelfont(1);
- chorusp2->labelsize(11);
- chorusp2->labelcolor(FL_FOREGROUND_COLOR);
- chorusp2->maximum(127);
- chorusp2->callback((Fl_Callback*)cb_chorusp21);
- chorusp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp2
- { chorusp6 = new WidgetPDial(80, 40, 30, 30, "Dpth");
- chorusp6->tooltip("Depth");
- chorusp6->box(FL_ROUND_UP_BOX);
- chorusp6->color(FL_BACKGROUND_COLOR);
- chorusp6->selection_color(FL_INACTIVE_COLOR);
- chorusp6->labeltype(FL_NORMAL_LABEL);
- chorusp6->labelfont(1);
- chorusp6->labelsize(11);
- chorusp6->labelcolor(FL_FOREGROUND_COLOR);
- chorusp6->maximum(127);
- chorusp6->callback((Fl_Callback*)cb_chorusp61);
- chorusp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp6
- { chorusp7 = new WidgetPDial(115, 40, 30, 30, "Delay");
- chorusp7->box(FL_ROUND_UP_BOX);
- chorusp7->color(FL_BACKGROUND_COLOR);
- chorusp7->selection_color(FL_INACTIVE_COLOR);
- chorusp7->labeltype(FL_NORMAL_LABEL);
- chorusp7->labelfont(1);
- chorusp7->labelsize(11);
- chorusp7->labelcolor(FL_FOREGROUND_COLOR);
- chorusp7->maximum(127);
- chorusp7->callback((Fl_Callback*)cb_chorusp71);
- chorusp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp7
- { chorusp8 = new WidgetPDial(150, 40, 30, 30, "Fb");
- chorusp8->tooltip("Feedback");
- chorusp8->box(FL_ROUND_UP_BOX);
- chorusp8->color(FL_BACKGROUND_COLOR);
- chorusp8->selection_color(FL_INACTIVE_COLOR);
- chorusp8->labeltype(FL_NORMAL_LABEL);
- chorusp8->labelfont(1);
- chorusp8->labelsize(11);
- chorusp8->labelcolor(FL_FOREGROUND_COLOR);
- chorusp8->maximum(127);
- chorusp8->callback((Fl_Callback*)cb_chorusp81);
- chorusp8->align(Fl_Align(FL_ALIGN_BOTTOM));
- chorusp8->when(FL_WHEN_CHANGED);
- } // WidgetPDial* chorusp8
- { Fl_Check_Button* o = new Fl_Check_Button(120, 10, 55, 20, "Flange");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->color((Fl_Color)230);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Flange1);
- o->hide();
- o->deactivate();
- o->value(eff->geteffectpar(10));
- } // Fl_Check_Button* o
- set_module_parameters(o);
- effchoruswindow->end();
- } // Fl_Group* effchoruswindow
- return effchoruswindow;
-}
-
-Fl_Group* SimpleEffUI::make_phaser_window() {
- { Fl_Group* o = effphaserwindow = new Fl_Group(0, 0, 230, 100, "Phaser");
- effphaserwindow->box(FL_UP_BOX);
- effphaserwindow->color((Fl_Color)51);
- effphaserwindow->selection_color(FL_BACKGROUND_COLOR);
- effphaserwindow->labeltype(FL_NO_LABEL);
- effphaserwindow->labelfont(1);
- effphaserwindow->labelsize(19);
- effphaserwindow->labelcolor(FL_FOREGROUND_COLOR);
- effphaserwindow->user_data((void*)(this));
- effphaserwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effphaserwindow->when(FL_WHEN_RELEASE);
- { phaserp = new Fl_Choice(10, 15, 90, 15, "Preset");
- phaserp->down_box(FL_BORDER_BOX);
- phaserp->color(FL_DARK1);
- phaserp->selection_color(FL_FOREGROUND_COLOR);
- phaserp->labelfont(1);
- phaserp->labelsize(10);
- phaserp->labelcolor((Fl_Color)55);
- phaserp->textfont(1);
- phaserp->textsize(10);
- phaserp->textcolor(FL_BACKGROUND2_COLOR);
- phaserp->callback((Fl_Callback*)cb_phaserpa);
- phaserp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- phaserp->menu(menu_phaserp1);
- } // Fl_Choice* phaserp
- { phaserp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- phaserp0->tooltip("Effect Volume");
- phaserp0->box(FL_ROUND_UP_BOX);
- phaserp0->color(FL_BACKGROUND_COLOR);
- phaserp0->selection_color(FL_INACTIVE_COLOR);
- phaserp0->labeltype(FL_NORMAL_LABEL);
- phaserp0->labelfont(1);
- phaserp0->labelsize(11);
- phaserp0->labelcolor(FL_FOREGROUND_COLOR);
- phaserp0->maximum(127);
- phaserp0->callback((Fl_Callback*)cb_phaserp01);
- phaserp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp0
- { phaserp2 = new WidgetPDial(45, 40, 30, 30, "Freq");
- phaserp2->tooltip("LFO frequency");
- phaserp2->box(FL_ROUND_UP_BOX);
- phaserp2->color(FL_BACKGROUND_COLOR);
- phaserp2->selection_color(FL_INACTIVE_COLOR);
- phaserp2->labeltype(FL_NORMAL_LABEL);
- phaserp2->labelfont(1);
- phaserp2->labelsize(11);
- phaserp2->labelcolor(FL_FOREGROUND_COLOR);
- phaserp2->maximum(127);
- phaserp2->callback((Fl_Callback*)cb_phaserp21);
- phaserp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp2
- { phaserp5 = new WidgetPDial(80, 40, 30, 30, "St.df");
- phaserp5->tooltip("Left/Right Channel Phase Shift");
- phaserp5->box(FL_ROUND_UP_BOX);
- phaserp5->color(FL_BACKGROUND_COLOR);
- phaserp5->selection_color(FL_INACTIVE_COLOR);
- phaserp5->labeltype(FL_NORMAL_LABEL);
- phaserp5->labelfont(1);
- phaserp5->labelsize(11);
- phaserp5->labelcolor(FL_FOREGROUND_COLOR);
- phaserp5->maximum(127);
- phaserp5->callback((Fl_Callback*)cb_phaserp51);
- phaserp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp5->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp5
- { phaserp6 = new WidgetPDial(115, 40, 30, 30, "Dpth");
- phaserp6->tooltip("Depth");
- phaserp6->box(FL_ROUND_UP_BOX);
- phaserp6->color(FL_BACKGROUND_COLOR);
- phaserp6->selection_color(FL_INACTIVE_COLOR);
- phaserp6->labeltype(FL_NORMAL_LABEL);
- phaserp6->labelfont(1);
- phaserp6->labelsize(11);
- phaserp6->labelcolor(FL_FOREGROUND_COLOR);
- phaserp6->maximum(127);
- phaserp6->callback((Fl_Callback*)cb_phaserp61);
- phaserp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp6
- { phaserp7 = new WidgetPDial(150, 40, 30, 30, "Fb");
- phaserp7->tooltip("Feedback");
- phaserp7->box(FL_ROUND_UP_BOX);
- phaserp7->color(FL_BACKGROUND_COLOR);
- phaserp7->selection_color(FL_INACTIVE_COLOR);
- phaserp7->labeltype(FL_NORMAL_LABEL);
- phaserp7->labelfont(1);
- phaserp7->labelsize(11);
- phaserp7->labelcolor(FL_FOREGROUND_COLOR);
- phaserp7->maximum(127);
- phaserp7->callback((Fl_Callback*)cb_phaserp71);
- phaserp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- phaserp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* phaserp7
- { Fl_Counter* o = phaserp8 = new Fl_Counter(185, 55, 35, 15, "Stages");
- phaserp8->type(1);
- phaserp8->labelfont(1);
- phaserp8->labelsize(11);
- phaserp8->minimum(0);
- phaserp8->maximum(127);
- phaserp8->step(1);
- phaserp8->callback((Fl_Callback*)cb_phaserp81);
- o->range(1,MAX_PHASER_STAGES);
- } // Fl_Counter* phaserp8
- set_module_parameters(o);
- effphaserwindow->end();
- } // Fl_Group* effphaserwindow
- return effphaserwindow;
-}
-
-Fl_Group* SimpleEffUI::make_alienwah_window() {
- { Fl_Group* o = effalienwahwindow = new Fl_Group(0, 0, 230, 100, "AlienWah");
- effalienwahwindow->box(FL_UP_BOX);
- effalienwahwindow->color((Fl_Color)51);
- effalienwahwindow->selection_color(FL_BACKGROUND_COLOR);
- effalienwahwindow->labeltype(FL_NO_LABEL);
- effalienwahwindow->labelfont(1);
- effalienwahwindow->labelsize(19);
- effalienwahwindow->labelcolor(FL_FOREGROUND_COLOR);
- effalienwahwindow->user_data((void*)(this));
- effalienwahwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effalienwahwindow->when(FL_WHEN_RELEASE);
- { awp = new Fl_Choice(10, 15, 90, 15, "Preset");
- awp->down_box(FL_BORDER_BOX);
- awp->color(FL_DARK1);
- awp->selection_color(FL_BACKGROUND2_COLOR);
- awp->labelfont(1);
- awp->labelsize(10);
- awp->textfont(1);
- awp->textsize(10);
- awp->callback((Fl_Callback*)cb_awpa);
- awp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- awp->menu(menu_awp1);
- } // Fl_Choice* awp
- { awp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- awp0->tooltip("Effect Volume");
- awp0->box(FL_ROUND_UP_BOX);
- awp0->color(FL_BACKGROUND_COLOR);
- awp0->selection_color(FL_INACTIVE_COLOR);
- awp0->labeltype(FL_NORMAL_LABEL);
- awp0->labelfont(1);
- awp0->labelsize(11);
- awp0->labelcolor(FL_FOREGROUND_COLOR);
- awp0->maximum(127);
- awp0->callback((Fl_Callback*)cb_awp01);
- awp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp0
- { awp2 = new WidgetPDial(45, 40, 30, 30, "Freq");
- awp2->tooltip("LFO frequency");
- awp2->box(FL_ROUND_UP_BOX);
- awp2->color(FL_BACKGROUND_COLOR);
- awp2->selection_color(FL_INACTIVE_COLOR);
- awp2->labeltype(FL_NORMAL_LABEL);
- awp2->labelfont(1);
- awp2->labelsize(11);
- awp2->labelcolor(FL_FOREGROUND_COLOR);
- awp2->maximum(127);
- awp2->callback((Fl_Callback*)cb_awp21);
- awp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp2
- { awp6 = new WidgetPDial(85, 40, 30, 30, "Dpth");
- awp6->tooltip("Depth");
- awp6->box(FL_ROUND_UP_BOX);
- awp6->color(FL_BACKGROUND_COLOR);
- awp6->selection_color(FL_INACTIVE_COLOR);
- awp6->labeltype(FL_NORMAL_LABEL);
- awp6->labelfont(1);
- awp6->labelsize(11);
- awp6->labelcolor(FL_FOREGROUND_COLOR);
- awp6->maximum(127);
- awp6->callback((Fl_Callback*)cb_awp61);
- awp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- awp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* awp6
- { Fl_Counter* o = awp8 = new Fl_Counter(125, 55, 35, 15, "Delay");
- awp8->type(1);
- awp8->labelfont(1);
- awp8->labelsize(11);
- awp8->minimum(0);
- awp8->maximum(127);
- awp8->step(1);
- awp8->callback((Fl_Callback*)cb_awp81);
- o->range(1,MAX_ALIENWAH_DELAY);
- } // Fl_Counter* awp8
- set_module_parameters(o);
- effalienwahwindow->end();
- } // Fl_Group* effalienwahwindow
- return effalienwahwindow;
-}
-
-Fl_Group* SimpleEffUI::make_distorsion_window() {
- { Fl_Group* o = effdistorsionwindow = new Fl_Group(0, 0, 230, 100, "Distortion");
- effdistorsionwindow->box(FL_UP_BOX);
- effdistorsionwindow->color((Fl_Color)51);
- effdistorsionwindow->selection_color(FL_BACKGROUND_COLOR);
- effdistorsionwindow->labeltype(FL_NO_LABEL);
- effdistorsionwindow->labelfont(1);
- effdistorsionwindow->labelsize(19);
- effdistorsionwindow->labelcolor(FL_FOREGROUND_COLOR);
- effdistorsionwindow->user_data((void*)(this));
- effdistorsionwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effdistorsionwindow->when(FL_WHEN_RELEASE);
- { distp = new Fl_Choice(11, 15, 95, 15, "Preset");
- distp->down_box(FL_BORDER_BOX);
- distp->color(FL_DARK1);
- distp->selection_color(FL_BACKGROUND2_COLOR);
- distp->labelfont(1);
- distp->labelsize(10);
- distp->textfont(1);
- distp->textsize(10);
- distp->callback((Fl_Callback*)cb_distpa);
- distp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- distp->menu(menu_distp1);
- } // Fl_Choice* distp
- { distp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- distp0->tooltip("Effect Volume");
- distp0->box(FL_ROUND_UP_BOX);
- distp0->color(FL_BACKGROUND_COLOR);
- distp0->selection_color(FL_INACTIVE_COLOR);
- distp0->labeltype(FL_NORMAL_LABEL);
- distp0->labelfont(1);
- distp0->labelsize(11);
- distp0->labelcolor(FL_FOREGROUND_COLOR);
- distp0->maximum(127);
- distp0->callback((Fl_Callback*)cb_distp01);
- distp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp0
- { distp3 = new WidgetPDial(45, 40, 30, 30, "Drive");
- distp3->tooltip("Input amplification");
- distp3->box(FL_ROUND_UP_BOX);
- distp3->color(FL_BACKGROUND_COLOR);
- distp3->selection_color(FL_INACTIVE_COLOR);
- distp3->labeltype(FL_NORMAL_LABEL);
- distp3->labelfont(1);
- distp3->labelsize(11);
- distp3->labelcolor(FL_FOREGROUND_COLOR);
- distp3->maximum(127);
- distp3->callback((Fl_Callback*)cb_distp31);
- distp3->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp3->when(FL_WHEN_RELEASE);
- } // WidgetPDial* distp3
- { distp4 = new WidgetPDial(80, 40, 30, 30, "Level");
- distp4->tooltip("Output Amplification");
- distp4->box(FL_ROUND_UP_BOX);
- distp4->color(FL_BACKGROUND_COLOR);
- distp4->selection_color(FL_INACTIVE_COLOR);
- distp4->labeltype(FL_NORMAL_LABEL);
- distp4->labelfont(1);
- distp4->labelsize(11);
- distp4->labelcolor(FL_FOREGROUND_COLOR);
- distp4->maximum(127);
- distp4->callback((Fl_Callback*)cb_distp41);
- distp4->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp4->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp4
- { distp7 = new WidgetPDial(190, 40, 30, 30, "LPF");
- distp7->tooltip("Low Pass Filter");
- distp7->box(FL_ROUND_UP_BOX);
- distp7->color(FL_BACKGROUND_COLOR);
- distp7->selection_color(FL_INACTIVE_COLOR);
- distp7->labeltype(FL_NORMAL_LABEL);
- distp7->labelfont(1);
- distp7->labelsize(11);
- distp7->labelcolor(FL_FOREGROUND_COLOR);
- distp7->maximum(127);
- distp7->callback((Fl_Callback*)cb_distp71);
- distp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* distp7
- { distp5 = new Fl_Choice(120, 50, 60, 20, "Type");
- distp5->down_box(FL_BORDER_BOX);
- distp5->labelfont(1);
- distp5->labelsize(11);
- distp5->textsize(10);
- distp5->callback((Fl_Callback*)cb_distp51);
- distp5->align(Fl_Align(FL_ALIGN_BOTTOM));
- distp5->menu(menu_distp51);
- } // Fl_Choice* distp5
- set_module_parameters(o);
- effdistorsionwindow->end();
- } // Fl_Group* effdistorsionwindow
- return effdistorsionwindow;
-}
-
-Fl_Group* SimpleEffUI::make_eq_window() {
- { Fl_Group* o = effeqwindow = new Fl_Group(0, 0, 230, 100, "EQ");
- effeqwindow->box(FL_UP_BOX);
- effeqwindow->color((Fl_Color)51);
- effeqwindow->selection_color(FL_BACKGROUND_COLOR);
- effeqwindow->labeltype(FL_NO_LABEL);
- effeqwindow->labelfont(1);
- effeqwindow->labelsize(19);
- effeqwindow->labelcolor(FL_FOREGROUND_COLOR);
- effeqwindow->user_data((void*)(this));
- effeqwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effeqwindow->when(FL_WHEN_RELEASE);
- { Fl_Counter* o = bandcounter = new Fl_Counter(85, 15, 45, 15, "Band");
- bandcounter->tooltip("Band no.");
- bandcounter->type(1);
- bandcounter->labelfont(1);
- bandcounter->labelsize(11);
- bandcounter->minimum(0);
- bandcounter->maximum(1);
- bandcounter->step(1);
- bandcounter->textfont(1);
- bandcounter->textsize(11);
- bandcounter->callback((Fl_Callback*)cb_bandcounter1);
- bandcounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(0,MAX_EQ_BANDS-1);
- } // Fl_Counter* bandcounter
- { Fl_Group* o = bandgroup = new Fl_Group(5, 5, 75, 85);
- bandgroup->box(FL_UP_FRAME);
- { freqdial = new WidgetPDial(10, 10, 25, 25, "Freq");
- freqdial->box(FL_ROUND_UP_BOX);
- freqdial->color(FL_BACKGROUND_COLOR);
- freqdial->selection_color(FL_INACTIVE_COLOR);
- freqdial->labeltype(FL_NORMAL_LABEL);
- freqdial->labelfont(1);
- freqdial->labelsize(10);
- freqdial->labelcolor(FL_FOREGROUND_COLOR);
- freqdial->maximum(127);
- freqdial->callback((Fl_Callback*)cb_freqdial1);
- freqdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- freqdial->when(3);
- } // WidgetPDial* freqdial
- { gaindial = new WidgetPDial(45, 10, 25, 25, "Gain");
- gaindial->box(FL_ROUND_UP_BOX);
- gaindial->color(FL_BACKGROUND_COLOR);
- gaindial->selection_color(FL_INACTIVE_COLOR);
- gaindial->labeltype(FL_NORMAL_LABEL);
- gaindial->labelfont(1);
- gaindial->labelsize(10);
- gaindial->labelcolor(FL_FOREGROUND_COLOR);
- gaindial->maximum(127);
- gaindial->step(1);
- gaindial->callback((Fl_Callback*)cb_gaindial1);
- gaindial->align(Fl_Align(FL_ALIGN_BOTTOM));
- gaindial->when(3);
- } // WidgetPDial* gaindial
- { qdial = new WidgetPDial(10, 50, 25, 25, "Q");
- qdial->tooltip("Bandwidth/Resonance");
- qdial->box(FL_ROUND_UP_BOX);
- qdial->color(FL_BACKGROUND_COLOR);
- qdial->selection_color(FL_INACTIVE_COLOR);
- qdial->labeltype(FL_NORMAL_LABEL);
- qdial->labelfont(1);
- qdial->labelsize(10);
- qdial->labelcolor(FL_FOREGROUND_COLOR);
- qdial->maximum(127);
- qdial->callback((Fl_Callback*)cb_qdial1);
- qdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- qdial->when(3);
- } // WidgetPDial* qdial
- { Fl_Counter* o = stagescounter = new Fl_Counter(40, 55, 30, 15, "Stages");
- stagescounter->tooltip("Additional filter stages");
- stagescounter->type(1);
- stagescounter->labelfont(1);
- stagescounter->labelsize(10);
- stagescounter->minimum(1);
- stagescounter->maximum(127);
- stagescounter->step(1);
- stagescounter->textfont(1);
- stagescounter->textsize(11);
- stagescounter->callback((Fl_Callback*)cb_stagescounter1);
- o->bounds(0,MAX_FILTER_STAGES-1);
- } // Fl_Counter* stagescounter
- if (eff->geteffectpar(10)==0) o->deactivate();
- bandgroup->end();
- } // Fl_Group* bandgroup
- { typechoice = new Fl_Choice(135, 15, 40, 15, "Type");
- typechoice->tooltip("Type");
- typechoice->down_box(FL_BORDER_BOX);
- typechoice->labelfont(1);
- typechoice->labelsize(10);
- typechoice->textsize(10);
- typechoice->callback((Fl_Callback*)cb_typechoice1);
- typechoice->align(Fl_Align(FL_ALIGN_TOP));
- typechoice->when(FL_WHEN_RELEASE_ALWAYS);
- typechoice->menu(menu_typechoice1);
- } // Fl_Choice* typechoice
- { EQGraph* o = eqgraph = new EQGraph(85, 35, 140, 55);
- eqgraph->box(FL_BORDER_BOX);
- eqgraph->color(FL_LIGHT1);
- eqgraph->selection_color(FL_BACKGROUND_COLOR);
- eqgraph->labeltype(FL_NORMAL_LABEL);
- eqgraph->labelfont(0);
- eqgraph->labelsize(14);
- eqgraph->labelcolor(FL_FOREGROUND_COLOR);
- eqgraph->align(Fl_Align(FL_ALIGN_CENTER));
- eqgraph->when(FL_WHEN_RELEASE);
- o->init(eff);
- } // EQGraph* eqgraph
- set_module_parameters(o);
- effeqwindow->end();
- } // Fl_Group* effeqwindow
- return effeqwindow;
-}
-
-Fl_Group* SimpleEffUI::make_dynamicfilter_window() {
- { Fl_Group* o = effdynamicfilterwindow = new Fl_Group(0, 0, 230, 100, "DynFilter");
- effdynamicfilterwindow->box(FL_UP_BOX);
- effdynamicfilterwindow->color((Fl_Color)51);
- effdynamicfilterwindow->selection_color(FL_BACKGROUND_COLOR);
- effdynamicfilterwindow->labeltype(FL_NO_LABEL);
- effdynamicfilterwindow->labelfont(1);
- effdynamicfilterwindow->labelsize(19);
- effdynamicfilterwindow->labelcolor(FL_FOREGROUND_COLOR);
- effdynamicfilterwindow->user_data((void*)(this));
- effdynamicfilterwindow->align(Fl_Align(FL_ALIGN_TOP_RIGHT|FL_ALIGN_INSIDE));
- effdynamicfilterwindow->when(FL_WHEN_RELEASE);
- { dfp = new Fl_Choice(10, 15, 90, 15, "Preset");
- dfp->down_box(FL_BORDER_BOX);
- dfp->color(FL_DARK1);
- dfp->selection_color(FL_BACKGROUND2_COLOR);
- dfp->labelfont(1);
- dfp->labelsize(10);
- dfp->textfont(1);
- dfp->textsize(10);
- dfp->callback((Fl_Callback*)cb_dfpa);
- dfp->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- dfp->menu(menu_dfp1);
- } // Fl_Choice* dfp
- { dfp0 = new WidgetPDial(10, 40, 30, 30, "Vol");
- dfp0->tooltip("Effect Volume");
- dfp0->box(FL_ROUND_UP_BOX);
- dfp0->color(FL_BACKGROUND_COLOR);
- dfp0->selection_color(FL_INACTIVE_COLOR);
- dfp0->labeltype(FL_NORMAL_LABEL);
- dfp0->labelfont(1);
- dfp0->labelsize(11);
- dfp0->labelcolor(FL_FOREGROUND_COLOR);
- dfp0->maximum(127);
- dfp0->callback((Fl_Callback*)cb_dfp01);
- dfp0->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp0->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp0
- { dfp2 = new WidgetPDial(45, 40, 30, 30, "Freq");
- dfp2->tooltip("LFO frequency");
- dfp2->box(FL_ROUND_UP_BOX);
- dfp2->color(FL_BACKGROUND_COLOR);
- dfp2->selection_color(FL_INACTIVE_COLOR);
- dfp2->labeltype(FL_NORMAL_LABEL);
- dfp2->labelfont(1);
- dfp2->labelsize(11);
- dfp2->labelcolor(FL_FOREGROUND_COLOR);
- dfp2->maximum(127);
- dfp2->callback((Fl_Callback*)cb_dfp21);
- dfp2->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp2
- { dfp6 = new WidgetPDial(80, 40, 30, 30, "LfoD");
- dfp6->tooltip("LFO depth");
- dfp6->box(FL_ROUND_UP_BOX);
- dfp6->color(FL_BACKGROUND_COLOR);
- dfp6->selection_color(FL_INACTIVE_COLOR);
- dfp6->labeltype(FL_NORMAL_LABEL);
- dfp6->labelfont(1);
- dfp6->labelsize(11);
- dfp6->labelcolor(FL_FOREGROUND_COLOR);
- dfp6->maximum(127);
- dfp6->callback((Fl_Callback*)cb_dfp61);
- dfp6->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp6->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp6
- { Fl_Group* o = new Fl_Group(115, 40, 65, 45);
- o->box(FL_UP_FRAME);
- { dfp7 = new WidgetPDial(120, 45, 25, 25, "A.S.");
- dfp7->tooltip("how filter varies with amplitude");
- dfp7->box(FL_ROUND_UP_BOX);
- dfp7->color(FL_BACKGROUND_COLOR);
- dfp7->selection_color(FL_INACTIVE_COLOR);
- dfp7->labeltype(FL_NORMAL_LABEL);
- dfp7->labelfont(1);
- dfp7->labelsize(11);
- dfp7->labelcolor(FL_FOREGROUND_COLOR);
- dfp7->maximum(127);
- dfp7->callback((Fl_Callback*)cb_dfp71);
- dfp7->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp7->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp7
- { dfp9 = new WidgetPDial(150, 45, 25, 25, "A.M");
- dfp9->tooltip("how quickly the filter varies with amplitude");
- dfp9->box(FL_ROUND_UP_BOX);
- dfp9->color(FL_BACKGROUND_COLOR);
- dfp9->selection_color(FL_INACTIVE_COLOR);
- dfp9->labeltype(FL_NORMAL_LABEL);
- dfp9->labelfont(1);
- dfp9->labelsize(11);
- dfp9->labelcolor(FL_FOREGROUND_COLOR);
- dfp9->maximum(127);
- dfp9->callback((Fl_Callback*)cb_dfp91);
- dfp9->align(Fl_Align(FL_ALIGN_BOTTOM));
- dfp9->when(FL_WHEN_CHANGED);
- } // WidgetPDial* dfp9
- o->end();
- } // Fl_Group* o
- set_module_parameters(o);
- effdynamicfilterwindow->end();
- } // Fl_Group* effdynamicfilterwindow
- return effdynamicfilterwindow;
-}
-
-void SimpleEffUI::init(EffectMgr *eff_) {
- eff=eff_;
-
- make_null_window();
- make_reverb_window();
- make_echo_window();
- make_chorus_window();
- make_phaser_window();
- make_alienwah_window();
- make_distorsion_window();
- make_eq_window();
- make_dynamicfilter_window();
-
- int px=this->parent()->x();
- int py=this->parent()->y();
-
- effnullwindow->position(px,py);
- effreverbwindow->position(px,py);
- effechowindow->position(px,py);
- effchoruswindow->position(px,py);
- effphaserwindow->position(px,py);
- effalienwahwindow->position(px,py);
- effdistorsionwindow->position(px,py);
- effeqwindow->position(px,py);
- effdynamicfilterwindow->position(px,py);
-
- refresh(eff);
-}
-
-void SimpleEffUI::refresh(EffectMgr *eff_) {
- eff=eff_;
- this->hide();
-
- effnullwindow->hide();
- effreverbwindow->hide();
- effechowindow->hide();
- effchoruswindow->hide();
- effphaserwindow->hide();
- effalienwahwindow->hide();
- effdistorsionwindow->hide();
- effeqwindow->hide();
- effdynamicfilterwindow->hide();
-
- eqband=0;
-
-
- switch(eff->geteffect()){
- case 1:
- revp->value(eff->getpreset());
- revp0->value(eff->geteffectpar(0));if (eff->insertion!=0) revp0->label("D/W");
- revp2->value(eff->geteffectpar(2));
- revp3->value(eff->geteffectpar(3));
- revp9->value(eff->geteffectpar(9));
- effreverbwindow->show();
- break;
- case 2:
- echop->value(eff->getpreset());
- echop0->value(eff->geteffectpar(0));if (eff->insertion!=0) echop0->label("D/W");
- echop2->value(eff->geteffectpar(2));
- echop5->value(eff->geteffectpar(5));
- effechowindow->show();
- break;
- case 3:
- chorusp->value(eff->getpreset());
- chorusp0->value(eff->geteffectpar(0));if (eff->insertion!=0) chorusp0->label("D/W");
- chorusp2->value(eff->geteffectpar(2));
- chorusp6->value(eff->geteffectpar(6));
- chorusp7->value(eff->geteffectpar(7));
- chorusp8->value(eff->geteffectpar(8));
- effchoruswindow->show();
- break;
- case 4:
- phaserp->value(eff->getpreset());
- phaserp0->value(eff->geteffectpar(0));if (eff->insertion!=0) phaserp0->label("D/W");
- phaserp2->value(eff->geteffectpar(2));
- phaserp5->value(eff->geteffectpar(5));
- phaserp6->value(eff->geteffectpar(6));
- phaserp7->value(eff->geteffectpar(7));
- phaserp8->value(eff->geteffectpar(8));
- effphaserwindow->show();
- break;
- case 5:
- awp->value(eff->getpreset());
- awp0->value(eff->geteffectpar(0));if (eff->insertion!=0) awp0->label("D/W");
- awp2->value(eff->geteffectpar(2));
- awp6->value(eff->geteffectpar(6));
- awp8->value(eff->geteffectpar(8));
- effalienwahwindow->show();
- break;
- case 6:
- distp->value(eff->getpreset());
- distp0->value(eff->geteffectpar(0));if (eff->insertion!=0) distp0->label("D/W");
- distp3->value(eff->geteffectpar(3));
- distp4->value(eff->geteffectpar(4));
- distp5->value(eff->geteffectpar(5));
- distp7->value(eff->geteffectpar(7));
- effdistorsionwindow->show();
- break;
- case 7:
- bandcounter->value(eqband);
- bandcounter->do_callback();
- typechoice->value(eff->geteffectpar(10));
- eqgraph->redraw();
- freqdial->value(eff->geteffectpar(11));
- gaindial->value(eff->geteffectpar(12));
- if (eff->geteffectpar(10)<6) gaindial->deactivate();
- qdial->value(eff->geteffectpar(13));
- stagescounter->value(eff->geteffectpar(14));
- eqgraph->init(eff);
- effeqwindow->show();
- break;
- case 8:
- dfp->value(eff->getpreset());
- dfp0->value(eff->geteffectpar(0));if (eff->insertion!=0) dfp0->label("D/W");
- dfp2->value(eff->geteffectpar(2));
- dfp6->value(eff->geteffectpar(6));
- dfp7->value(eff->geteffectpar(7));
- dfp9->value(eff->geteffectpar(9));
-
-
- effdynamicfilterwindow->show();
- break;
- default:effnullwindow->show();
- break;
- };
-
- this->show();
-}
-
-void SimpleEffUI::refresh() {
- refresh(eff);
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/EffUI.h b/source/modules/carla_native/zynaddsubfx/UI/EffUI.h
deleted file mode 100644
index 3e262a4bf..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/EffUI.h
+++ /dev/null
@@ -1,820 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef EffUI_h
-#define EffUI_h
-#include
-#include
-#include
-#include
-#include "../globals.h"
-#include "WidgetPDial.h"
-#include "EnvelopeUI.h"
-#include "FilterUI.h"
-#include "../Misc/Util.h"
-#include "../Effects/EffectMgr.h"
-#include "PresetsUI.h"
-#include "common.H"
-
-class EQGraph : public Fl_Box {
-public:
- EQGraph(int x,int y, int w, int h, const char *label=0);
- void init(EffectMgr *eff_);
- void draw_freq_line(float freq,int type);
- void draw();
- double getresponse(int maxy,float freq);
- float getfreqx(float x);
- float getfreqpos(float freq);
-private:
- int oldx,oldy;
-public:
- float khzval;
-private:
- EffectMgr *eff;
- int maxdB;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-
-class EffUI : public Fl_Group,public PresetsUI_ {
-public:
- EffUI(int x,int y, int w, int h, const char *label=0);
- ~EffUI();
- Fl_Group* make_null_window();
- Fl_Group *effnullwindow;
- Fl_Group* make_reverb_window();
- Fl_Group *effreverbwindow;
- Fl_Choice *revp;
-private:
- void cb_revp_i(Fl_Choice*, void*);
- static void cb_revp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_revp[];
-public:
- Fl_Choice *revp10;
-private:
- void cb_revp10_i(Fl_Choice*, void*);
- static void cb_revp10(Fl_Choice*, void*);
- static Fl_Menu_Item menu_revp10[];
-public:
- WidgetPDial *revp0;
-private:
- void cb_revp0_i(WidgetPDial*, void*);
- static void cb_revp0(WidgetPDial*, void*);
-public:
- WidgetPDial *revp1;
-private:
- void cb_revp1_i(WidgetPDial*, void*);
- static void cb_revp1(WidgetPDial*, void*);
-public:
- WidgetPDial *revp2;
-private:
- void cb_revp2_i(WidgetPDial*, void*);
- static void cb_revp2(WidgetPDial*, void*);
-public:
- WidgetPDial *revp3;
-private:
- void cb_revp3_i(WidgetPDial*, void*);
- static void cb_revp3(WidgetPDial*, void*);
-public:
- WidgetPDial *revp4;
-private:
- void cb_revp4_i(WidgetPDial*, void*);
- static void cb_revp4(WidgetPDial*, void*);
-public:
- WidgetPDial *revp12;
-private:
- void cb_revp12_i(WidgetPDial*, void*);
- static void cb_revp12(WidgetPDial*, void*);
-public:
- WidgetPDial *revp6;
-private:
- void cb_revp6_i(WidgetPDial*, void*);
- static void cb_revp6(WidgetPDial*, void*);
-public:
- WidgetPDial *revp7;
-private:
- void cb_revp7_i(WidgetPDial*, void*);
- static void cb_revp7(WidgetPDial*, void*);
-public:
- WidgetPDial *revp8;
-private:
- void cb_revp8_i(WidgetPDial*, void*);
- static void cb_revp8(WidgetPDial*, void*);
-public:
- WidgetPDial *revp9;
-private:
- void cb_revp9_i(WidgetPDial*, void*);
- static void cb_revp9(WidgetPDial*, void*);
-public:
- WidgetPDial *revp11;
-private:
- void cb_revp11_i(WidgetPDial*, void*);
- static void cb_revp11(WidgetPDial*, void*);
-public:
- Fl_Group* make_echo_window();
- Fl_Group *effechowindow;
- Fl_Choice *echop;
-private:
- void cb_echop_i(Fl_Choice*, void*);
- static void cb_echop(Fl_Choice*, void*);
- static Fl_Menu_Item menu_echop[];
-public:
- WidgetPDial *echop0;
-private:
- void cb_echop0_i(WidgetPDial*, void*);
- static void cb_echop0(WidgetPDial*, void*);
-public:
- WidgetPDial *echop1;
-private:
- void cb_echop1_i(WidgetPDial*, void*);
- static void cb_echop1(WidgetPDial*, void*);
-public:
- WidgetPDial *echop2;
-private:
- void cb_echop2_i(WidgetPDial*, void*);
- static void cb_echop2(WidgetPDial*, void*);
-public:
- WidgetPDial *echop3;
-private:
- void cb_echop3_i(WidgetPDial*, void*);
- static void cb_echop3(WidgetPDial*, void*);
-public:
- WidgetPDial *echop4;
-private:
- void cb_echop4_i(WidgetPDial*, void*);
- static void cb_echop4(WidgetPDial*, void*);
-public:
- WidgetPDial *echop5;
-private:
- void cb_echop5_i(WidgetPDial*, void*);
- static void cb_echop5(WidgetPDial*, void*);
-public:
- WidgetPDial *echop6;
-private:
- void cb_echop6_i(WidgetPDial*, void*);
- static void cb_echop6(WidgetPDial*, void*);
-public:
- Fl_Group* make_chorus_window();
- Fl_Group *effchoruswindow;
- Fl_Choice *chorusp;
-private:
- void cb_chorusp_i(Fl_Choice*, void*);
- static void cb_chorusp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_chorusp[];
-public:
- WidgetPDial *chorusp0;
-private:
- void cb_chorusp0_i(WidgetPDial*, void*);
- static void cb_chorusp0(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp1;
-private:
- void cb_chorusp1_i(WidgetPDial*, void*);
- static void cb_chorusp1(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp2;
-private:
- void cb_chorusp2_i(WidgetPDial*, void*);
- static void cb_chorusp2(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp3;
-private:
- void cb_chorusp3_i(WidgetPDial*, void*);
- static void cb_chorusp3(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp5;
-private:
- void cb_chorusp5_i(WidgetPDial*, void*);
- static void cb_chorusp5(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp6;
-private:
- void cb_chorusp6_i(WidgetPDial*, void*);
- static void cb_chorusp6(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp7;
-private:
- void cb_chorusp7_i(WidgetPDial*, void*);
- static void cb_chorusp7(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp8;
-private:
- void cb_chorusp8_i(WidgetPDial*, void*);
- static void cb_chorusp8(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp9;
-private:
- void cb_chorusp9_i(WidgetPDial*, void*);
- static void cb_chorusp9(WidgetPDial*, void*);
- void cb_Flange_i(Fl_Check_Button*, void*);
- static void cb_Flange(Fl_Check_Button*, void*);
-public:
- Fl_Check_Button *chorusp11;
-private:
- void cb_chorusp11_i(Fl_Check_Button*, void*);
- static void cb_chorusp11(Fl_Check_Button*, void*);
-public:
- Fl_Choice *chorusp4;
-private:
- void cb_chorusp4_i(Fl_Choice*, void*);
- static void cb_chorusp4(Fl_Choice*, void*);
- static Fl_Menu_Item menu_chorusp4[];
-public:
- Fl_Group* make_phaser_window();
- Fl_Group *effphaserwindow;
- Fl_Choice *phaserp;
-private:
- void cb_phaserp_i(Fl_Choice*, void*);
- static void cb_phaserp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_phaserp[];
-public:
- WidgetPDial *phaserp0;
-private:
- void cb_phaserp0_i(WidgetPDial*, void*);
- static void cb_phaserp0(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp1;
-private:
- void cb_phaserp1_i(WidgetPDial*, void*);
- static void cb_phaserp1(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp2;
-private:
- void cb_phaserp2_i(WidgetPDial*, void*);
- static void cb_phaserp2(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp3;
-private:
- void cb_phaserp3_i(WidgetPDial*, void*);
- static void cb_phaserp3(WidgetPDial*, void*);
-public:
- Fl_Choice *phaserp4;
-private:
- void cb_phaserp4_i(Fl_Choice*, void*);
- static void cb_phaserp4(Fl_Choice*, void*);
- static Fl_Menu_Item menu_phaserp4[];
-public:
- WidgetPDial *phaserp5;
-private:
- void cb_phaserp5_i(WidgetPDial*, void*);
- static void cb_phaserp5(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp6;
-private:
- void cb_phaserp6_i(WidgetPDial*, void*);
- static void cb_phaserp6(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp7;
-private:
- void cb_phaserp7_i(WidgetPDial*, void*);
- static void cb_phaserp7(WidgetPDial*, void*);
-public:
- Fl_Counter *phaserp8;
-private:
- void cb_phaserp8_i(Fl_Counter*, void*);
- static void cb_phaserp8(Fl_Counter*, void*);
-public:
- WidgetPDial *phaserp9;
-private:
- void cb_phaserp9_i(WidgetPDial*, void*);
- static void cb_phaserp9(WidgetPDial*, void*);
-public:
- Fl_Check_Button *phaserp10;
-private:
- void cb_phaserp10_i(Fl_Check_Button*, void*);
- static void cb_phaserp10(Fl_Check_Button*, void*);
-public:
- WidgetPDial *phaserp11;
-private:
- void cb_phaserp11_i(WidgetPDial*, void*);
- static void cb_phaserp11(WidgetPDial*, void*);
-public:
- Fl_Check_Button *phaserp12;
-private:
- void cb_phaserp12_i(Fl_Check_Button*, void*);
- static void cb_phaserp12(Fl_Check_Button*, void*);
-public:
- WidgetPDial *phaserp13;
-private:
- void cb_phaserp13_i(WidgetPDial*, void*);
- static void cb_phaserp13(WidgetPDial*, void*);
-public:
- Fl_Check_Button *phaserp14;
-private:
- void cb_phaserp14_i(Fl_Check_Button*, void*);
- static void cb_phaserp14(Fl_Check_Button*, void*);
-public:
- Fl_Group* make_alienwah_window();
- Fl_Group *effalienwahwindow;
- Fl_Choice *awp;
-private:
- void cb_awp_i(Fl_Choice*, void*);
- static void cb_awp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_awp[];
-public:
- WidgetPDial *awp0;
-private:
- void cb_awp0_i(WidgetPDial*, void*);
- static void cb_awp0(WidgetPDial*, void*);
-public:
- WidgetPDial *awp1;
-private:
- void cb_awp1_i(WidgetPDial*, void*);
- static void cb_awp1(WidgetPDial*, void*);
-public:
- WidgetPDial *awp2;
-private:
- void cb_awp2_i(WidgetPDial*, void*);
- static void cb_awp2(WidgetPDial*, void*);
-public:
- WidgetPDial *awp3;
-private:
- void cb_awp3_i(WidgetPDial*, void*);
- static void cb_awp3(WidgetPDial*, void*);
-public:
- WidgetPDial *awp5;
-private:
- void cb_awp5_i(WidgetPDial*, void*);
- static void cb_awp5(WidgetPDial*, void*);
-public:
- WidgetPDial *awp6;
-private:
- void cb_awp6_i(WidgetPDial*, void*);
- static void cb_awp6(WidgetPDial*, void*);
-public:
- WidgetPDial *awp7;
-private:
- void cb_awp7_i(WidgetPDial*, void*);
- static void cb_awp7(WidgetPDial*, void*);
-public:
- WidgetPDial *awp9;
-private:
- void cb_awp9_i(WidgetPDial*, void*);
- static void cb_awp9(WidgetPDial*, void*);
-public:
- Fl_Choice *awp4;
-private:
- void cb_awp4_i(Fl_Choice*, void*);
- static void cb_awp4(Fl_Choice*, void*);
- static Fl_Menu_Item menu_awp4[];
-public:
- WidgetPDial *awp10;
-private:
- void cb_awp10_i(WidgetPDial*, void*);
- static void cb_awp10(WidgetPDial*, void*);
-public:
- Fl_Counter *awp8;
-private:
- void cb_awp8_i(Fl_Counter*, void*);
- static void cb_awp8(Fl_Counter*, void*);
-public:
- Fl_Group* make_distorsion_window();
- Fl_Group *effdistorsionwindow;
- Fl_Choice *distp;
-private:
- void cb_distp_i(Fl_Choice*, void*);
- static void cb_distp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_distp[];
-public:
- WidgetPDial *distp0;
-private:
- void cb_distp0_i(WidgetPDial*, void*);
- static void cb_distp0(WidgetPDial*, void*);
-public:
- WidgetPDial *distp1;
-private:
- void cb_distp1_i(WidgetPDial*, void*);
- static void cb_distp1(WidgetPDial*, void*);
-public:
- WidgetPDial *distp2;
-private:
- void cb_distp2_i(WidgetPDial*, void*);
- static void cb_distp2(WidgetPDial*, void*);
-public:
- WidgetPDial *distp3;
-private:
- void cb_distp3_i(WidgetPDial*, void*);
- static void cb_distp3(WidgetPDial*, void*);
-public:
- WidgetPDial *distp4;
-private:
- void cb_distp4_i(WidgetPDial*, void*);
- static void cb_distp4(WidgetPDial*, void*);
-public:
- WidgetPDial *distp7;
-private:
- void cb_distp7_i(WidgetPDial*, void*);
- static void cb_distp7(WidgetPDial*, void*);
-public:
- WidgetPDial *distp8;
-private:
- void cb_distp8_i(WidgetPDial*, void*);
- static void cb_distp8(WidgetPDial*, void*);
-public:
- Fl_Choice *distp5;
-private:
- void cb_distp5_i(Fl_Choice*, void*);
- static void cb_distp5(Fl_Choice*, void*);
- static Fl_Menu_Item menu_distp5[];
-public:
- Fl_Check_Button *distp6;
-private:
- void cb_distp6_i(Fl_Check_Button*, void*);
- static void cb_distp6(Fl_Check_Button*, void*);
-public:
- Fl_Check_Button *distp9;
-private:
- void cb_distp9_i(Fl_Check_Button*, void*);
- static void cb_distp9(Fl_Check_Button*, void*);
-public:
- Fl_Check_Button *distp10;
-private:
- void cb_distp10_i(Fl_Check_Button*, void*);
- static void cb_distp10(Fl_Check_Button*, void*);
-public:
- Fl_Group* make_eq_window();
- Fl_Group *effeqwindow;
- WidgetPDial *eqp0;
-private:
- void cb_eqp0_i(WidgetPDial*, void*);
- static void cb_eqp0(WidgetPDial*, void*);
-public:
- Fl_Counter *bandcounter;
-private:
- void cb_bandcounter_i(Fl_Counter*, void*);
- static void cb_bandcounter(Fl_Counter*, void*);
-public:
- Fl_Group *bandgroup;
- WidgetPDial *freqdial;
-private:
- void cb_freqdial_i(WidgetPDial*, void*);
- static void cb_freqdial(WidgetPDial*, void*);
-public:
- WidgetPDial *gaindial;
-private:
- void cb_gaindial_i(WidgetPDial*, void*);
- static void cb_gaindial(WidgetPDial*, void*);
-public:
- WidgetPDial *qdial;
-private:
- void cb_qdial_i(WidgetPDial*, void*);
- static void cb_qdial(WidgetPDial*, void*);
-public:
- Fl_Counter *stagescounter;
-private:
- void cb_stagescounter_i(Fl_Counter*, void*);
- static void cb_stagescounter(Fl_Counter*, void*);
-public:
- Fl_Choice *typechoice;
-private:
- void cb_typechoice_i(Fl_Choice*, void*);
- static void cb_typechoice(Fl_Choice*, void*);
- static Fl_Menu_Item menu_typechoice[];
-public:
- EQGraph *eqgraph;
- Fl_Group* make_dynamicfilter_window();
- Fl_Group *effdynamicfilterwindow;
- Fl_Choice *dfp;
-private:
- void cb_dfp_i(Fl_Choice*, void*);
- static void cb_dfp(Fl_Choice*, void*);
- static Fl_Menu_Item menu_dfp[];
-public:
- WidgetPDial *dfp0;
-private:
- void cb_dfp0_i(WidgetPDial*, void*);
- static void cb_dfp0(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp1;
-private:
- void cb_dfp1_i(WidgetPDial*, void*);
- static void cb_dfp1(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp2;
-private:
- void cb_dfp2_i(WidgetPDial*, void*);
- static void cb_dfp2(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp3;
-private:
- void cb_dfp3_i(WidgetPDial*, void*);
- static void cb_dfp3(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp5;
-private:
- void cb_dfp5_i(WidgetPDial*, void*);
- static void cb_dfp5(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp6;
-private:
- void cb_dfp6_i(WidgetPDial*, void*);
- static void cb_dfp6(WidgetPDial*, void*);
-public:
- Fl_Choice *dfp4;
-private:
- void cb_dfp4_i(Fl_Choice*, void*);
- static void cb_dfp4(Fl_Choice*, void*);
- static Fl_Menu_Item menu_dfp4[];
- void cb_Filter_i(Fl_Button*, void*);
- static void cb_Filter(Fl_Button*, void*);
-public:
- WidgetPDial *dfp7;
-private:
- void cb_dfp7_i(WidgetPDial*, void*);
- static void cb_dfp7(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp9;
-private:
- void cb_dfp9_i(WidgetPDial*, void*);
- static void cb_dfp9(WidgetPDial*, void*);
-public:
- Fl_Check_Button *dfp8;
-private:
- void cb_dfp8_i(Fl_Check_Button*, void*);
- static void cb_dfp8(Fl_Check_Button*, void*);
-public:
- Fl_Double_Window* make_filter_window();
- Fl_Double_Window *filterwindow;
-private:
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
-public:
- void init(EffectMgr *eff_);
- void refresh(EffectMgr *eff_);
- void refresh();
-private:
- EffectMgr *eff;
- int eqband;
-};
-
-class SimpleEffUI : public Fl_Group,public PresetsUI_ {
-public:
- SimpleEffUI(int x,int y, int w, int h, const char *label=0);
- ~SimpleEffUI();
- Fl_Group* make_null_window();
- Fl_Group *effnullwindow;
- Fl_Group* make_reverb_window();
- Fl_Group *effreverbwindow;
- Fl_Choice *revp;
-private:
- void cb_revp5_i(Fl_Choice*, void*);
- static void cb_revp5(Fl_Choice*, void*);
- static Fl_Menu_Item menu_revp1[];
-public:
- WidgetPDial *revp0;
-private:
- void cb_revp01_i(WidgetPDial*, void*);
- static void cb_revp01(WidgetPDial*, void*);
-public:
- WidgetPDial *revp2;
-private:
- void cb_revp21_i(WidgetPDial*, void*);
- static void cb_revp21(WidgetPDial*, void*);
-public:
- WidgetPDial *revp3;
-private:
- void cb_revp31_i(WidgetPDial*, void*);
- static void cb_revp31(WidgetPDial*, void*);
-public:
- WidgetPDial *revp9;
-private:
- void cb_revp91_i(WidgetPDial*, void*);
- static void cb_revp91(WidgetPDial*, void*);
-public:
- Fl_Group* make_echo_window();
- Fl_Group *effechowindow;
- Fl_Choice *echop;
-private:
- void cb_echop7_i(Fl_Choice*, void*);
- static void cb_echop7(Fl_Choice*, void*);
- static Fl_Menu_Item menu_echop1[];
-public:
- WidgetPDial *echop0;
-private:
- void cb_echop01_i(WidgetPDial*, void*);
- static void cb_echop01(WidgetPDial*, void*);
-public:
- WidgetPDial *echop2;
-private:
- void cb_echop21_i(WidgetPDial*, void*);
- static void cb_echop21(WidgetPDial*, void*);
-public:
- WidgetPDial *echop5;
-private:
- void cb_echop51_i(WidgetPDial*, void*);
- static void cb_echop51(WidgetPDial*, void*);
-public:
- Fl_Group* make_chorus_window();
- Fl_Group *effchoruswindow;
- Fl_Choice *chorusp;
-private:
- void cb_choruspa_i(Fl_Choice*, void*);
- static void cb_choruspa(Fl_Choice*, void*);
- static Fl_Menu_Item menu_chorusp1[];
-public:
- WidgetPDial *chorusp0;
-private:
- void cb_chorusp01_i(WidgetPDial*, void*);
- static void cb_chorusp01(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp2;
-private:
- void cb_chorusp21_i(WidgetPDial*, void*);
- static void cb_chorusp21(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp6;
-private:
- void cb_chorusp61_i(WidgetPDial*, void*);
- static void cb_chorusp61(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp7;
-private:
- void cb_chorusp71_i(WidgetPDial*, void*);
- static void cb_chorusp71(WidgetPDial*, void*);
-public:
- WidgetPDial *chorusp8;
-private:
- void cb_chorusp81_i(WidgetPDial*, void*);
- static void cb_chorusp81(WidgetPDial*, void*);
- void cb_Flange1_i(Fl_Check_Button*, void*);
- static void cb_Flange1(Fl_Check_Button*, void*);
-public:
- Fl_Group* make_phaser_window();
- Fl_Group *effphaserwindow;
- Fl_Choice *phaserp;
-private:
- void cb_phaserpa_i(Fl_Choice*, void*);
- static void cb_phaserpa(Fl_Choice*, void*);
- static Fl_Menu_Item menu_phaserp1[];
-public:
- WidgetPDial *phaserp0;
-private:
- void cb_phaserp01_i(WidgetPDial*, void*);
- static void cb_phaserp01(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp2;
-private:
- void cb_phaserp21_i(WidgetPDial*, void*);
- static void cb_phaserp21(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp5;
-private:
- void cb_phaserp51_i(WidgetPDial*, void*);
- static void cb_phaserp51(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp6;
-private:
- void cb_phaserp61_i(WidgetPDial*, void*);
- static void cb_phaserp61(WidgetPDial*, void*);
-public:
- WidgetPDial *phaserp7;
-private:
- void cb_phaserp71_i(WidgetPDial*, void*);
- static void cb_phaserp71(WidgetPDial*, void*);
-public:
- Fl_Counter *phaserp8;
-private:
- void cb_phaserp81_i(Fl_Counter*, void*);
- static void cb_phaserp81(Fl_Counter*, void*);
-public:
- Fl_Group* make_alienwah_window();
- Fl_Group *effalienwahwindow;
- Fl_Choice *awp;
-private:
- void cb_awpa_i(Fl_Choice*, void*);
- static void cb_awpa(Fl_Choice*, void*);
- static Fl_Menu_Item menu_awp1[];
-public:
- WidgetPDial *awp0;
-private:
- void cb_awp01_i(WidgetPDial*, void*);
- static void cb_awp01(WidgetPDial*, void*);
-public:
- WidgetPDial *awp2;
-private:
- void cb_awp21_i(WidgetPDial*, void*);
- static void cb_awp21(WidgetPDial*, void*);
-public:
- WidgetPDial *awp6;
-private:
- void cb_awp61_i(WidgetPDial*, void*);
- static void cb_awp61(WidgetPDial*, void*);
-public:
- Fl_Counter *awp8;
-private:
- void cb_awp81_i(Fl_Counter*, void*);
- static void cb_awp81(Fl_Counter*, void*);
-public:
- Fl_Group* make_distorsion_window();
- Fl_Group *effdistorsionwindow;
- Fl_Choice *distp;
-private:
- void cb_distpa_i(Fl_Choice*, void*);
- static void cb_distpa(Fl_Choice*, void*);
- static Fl_Menu_Item menu_distp1[];
-public:
- WidgetPDial *distp0;
-private:
- void cb_distp01_i(WidgetPDial*, void*);
- static void cb_distp01(WidgetPDial*, void*);
-public:
- WidgetPDial *distp3;
-private:
- void cb_distp31_i(WidgetPDial*, void*);
- static void cb_distp31(WidgetPDial*, void*);
-public:
- WidgetPDial *distp4;
-private:
- void cb_distp41_i(WidgetPDial*, void*);
- static void cb_distp41(WidgetPDial*, void*);
-public:
- WidgetPDial *distp7;
-private:
- void cb_distp71_i(WidgetPDial*, void*);
- static void cb_distp71(WidgetPDial*, void*);
-public:
- Fl_Choice *distp5;
-private:
- void cb_distp51_i(Fl_Choice*, void*);
- static void cb_distp51(Fl_Choice*, void*);
- static Fl_Menu_Item menu_distp51[];
-public:
- Fl_Group* make_eq_window();
- Fl_Group *effeqwindow;
- Fl_Counter *bandcounter;
-private:
- void cb_bandcounter1_i(Fl_Counter*, void*);
- static void cb_bandcounter1(Fl_Counter*, void*);
-public:
- Fl_Group *bandgroup;
- WidgetPDial *freqdial;
-private:
- void cb_freqdial1_i(WidgetPDial*, void*);
- static void cb_freqdial1(WidgetPDial*, void*);
-public:
- WidgetPDial *gaindial;
-private:
- void cb_gaindial1_i(WidgetPDial*, void*);
- static void cb_gaindial1(WidgetPDial*, void*);
-public:
- WidgetPDial *qdial;
-private:
- void cb_qdial1_i(WidgetPDial*, void*);
- static void cb_qdial1(WidgetPDial*, void*);
-public:
- Fl_Counter *stagescounter;
-private:
- void cb_stagescounter1_i(Fl_Counter*, void*);
- static void cb_stagescounter1(Fl_Counter*, void*);
-public:
- Fl_Choice *typechoice;
-private:
- void cb_typechoice1_i(Fl_Choice*, void*);
- static void cb_typechoice1(Fl_Choice*, void*);
- static Fl_Menu_Item menu_typechoice1[];
-public:
- EQGraph *eqgraph;
- Fl_Group* make_dynamicfilter_window();
- Fl_Group *effdynamicfilterwindow;
- Fl_Choice *dfp;
-private:
- void cb_dfpa_i(Fl_Choice*, void*);
- static void cb_dfpa(Fl_Choice*, void*);
- static Fl_Menu_Item menu_dfp1[];
-public:
- WidgetPDial *dfp0;
-private:
- void cb_dfp01_i(WidgetPDial*, void*);
- static void cb_dfp01(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp2;
-private:
- void cb_dfp21_i(WidgetPDial*, void*);
- static void cb_dfp21(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp6;
-private:
- void cb_dfp61_i(WidgetPDial*, void*);
- static void cb_dfp61(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp7;
-private:
- void cb_dfp71_i(WidgetPDial*, void*);
- static void cb_dfp71(WidgetPDial*, void*);
-public:
- WidgetPDial *dfp9;
-private:
- void cb_dfp91_i(WidgetPDial*, void*);
- static void cb_dfp91(WidgetPDial*, void*);
-public:
- void init(EffectMgr *eff_);
- void refresh(EffectMgr *eff_);
- void refresh();
-private:
- EffectMgr *eff;
- int eqband;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.cpp
deleted file mode 100644
index 9acd538a6..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.cpp
+++ /dev/null
@@ -1,1529 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/EnvelopeUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-EnvelopeFreeEdit::EnvelopeFreeEdit(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- env=NULL;
- pair=NULL;
-}
-
-void EnvelopeFreeEdit::init(EnvelopeParams *env_) {
- env=env_;
- oldx=-1;
- currentpoint=-1;
- cpx=0;
- lastpoint=-1;
-}
-
-void EnvelopeFreeEdit::setpair(Fl_Box *pair_) {
- pair=pair_;
-}
-
-int EnvelopeFreeEdit::getpointx(int n) {
- int lx=w()-10;
- int npoints=env->Penvpoints;
-
- float sum=0;
- for (int i=1;igetdt(i)+1;
-
- float sumbefore=0;//the sum of all points before the computed point
- for (int i=1;i<=n;i++) sumbefore+=env->getdt(i)+1;
-
- return((int) (sumbefore/(float) sum*lx));
-}
-
-int EnvelopeFreeEdit::getpointy(int n) {
- int ly=h()-10;
-
- return((int) ((1.0-env->Penvval[n]/127.0)*ly));
-}
-
-int EnvelopeFreeEdit::getnearest(int x,int y) {
- x-=5;y-=5;
-
- int nearestpoint=0;
- int nearestval=1000000;//a big value
- for (int i=0;iPenvpoints;i++){
- int distance=abs(x-getpointx(i))+abs(y-getpointy(i));
- if (distancePfreemode==0) env->converttofree();
- int npoints=env->Penvpoints;
-
- if (active_r()) fl_color(FL_BLACK);
- else fl_color(90,90,90);
- if (!active_r()) currentpoint=-1;
-
- fl_rectf(ox,oy,lx,ly);
-
- ox+=5;oy+=5;lx-=10;ly-=10;
-
- //draw the lines
- fl_color(FL_GRAY);
-
- fl_line_style(FL_SOLID);
- fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2);
-
- //draws the evelope points and lines
- Fl_Color alb=FL_WHITE;
- if (!active_r()) alb=fl_rgb_color(180,180,180);
- fl_color(alb);
- int oldxx=0,xx=0,oldyy=0,yy=getpointy(0);
- fl_rectf(ox-3,oy+yy-3,6,6);
- for (int i=1;i=0){
- fl_color(FL_CYAN);
- fl_rectf(ox+getpointx(lastpoint)-5,oy+getpointy(lastpoint)-5,10,10);
- };
-
- //draw the sustain position
- if (env->Penvsustain>0){
- fl_color(FL_YELLOW);
- xx=getpointx(env->Penvsustain);
- fl_line(ox+xx,oy+0,ox+xx,oy+ly);
- };
-
- //Show the envelope duration and the current line duration
- fl_font(FL_HELVETICA|FL_BOLD,10);
- float time=0.0;
- if (currentpoint<=0){
- fl_color(alb);
- for (int i=1;igetdt(i);
- } else {
- fl_color(255,0,0);
- time=env->getdt(currentpoint);
- };
- char tmpstr[20];
- if (time<1000.0) snprintf((char *)&tmpstr,20,"%.1fms",time);
- else snprintf((char *)&tmpstr,20,"%.2fs",time/1000.0);
- fl_draw(tmpstr,ox+lx-20,oy+ly-10,20,10,FL_ALIGN_RIGHT,NULL,0);
-}
-
-int EnvelopeFreeEdit::handle(int event) {
- int x_=Fl::event_x()-x();
- int y_=Fl::event_y()-y();
-
- if (event==FL_PUSH) {
- currentpoint=getnearest(x_,y_);
- cpx=x_;
- cpdt=env->Penvdt[currentpoint];
- lastpoint=currentpoint;
- redraw();
- if (pair!=NULL) pair->redraw();
- };
-
- if (event==FL_RELEASE){
- currentpoint=-1;
- redraw();
- if (pair!=NULL) pair->redraw();
- };
-
- if ((event==FL_DRAG)&&(currentpoint>=0)){
- int ny=127-(int) (y_*127.0/h());
- if (ny<0) ny=0;if (ny>127) ny=127;
- env->Penvval[currentpoint]=ny;
-
- int dx=(int)((x_-cpx)*0.1);
- int newdt=cpdt+dx;
- if (newdt<0) newdt=0;if (newdt>127) newdt=127;
- if (currentpoint!=0) env->Penvdt[currentpoint]=newdt;
- else env->Penvdt[currentpoint]=0;
-
- redraw();
- if (pair!=NULL) pair->redraw();
- };
-
-
- return(1);
-}
-
-void EnvelopeUI::cb_addpoint_i(Fl_Button*, void*) {
- int curpoint=freeedit->lastpoint;
-if (curpoint<0) return;
-//if (curpoint>=env->Penvpoints-1) return;
-if (env->Penvpoints>=MAX_ENVELOPE_POINTS) return;
-
-for (int i=env->Penvpoints;i>=curpoint+1;i--){
- env->Penvdt[i]=env->Penvdt[i-1];
- env->Penvval[i]=env->Penvval[i-1];
-};
-
-if (curpoint==0) {
- env->Penvdt[1]=64;
-};
-
-env->Penvpoints++;
-if (curpoint<=env->Penvsustain) env->Penvsustain++;
-
-freeedit->lastpoint+=1;
-freeedit->redraw();
-envfree->redraw();
-
-sustaincounter->value(env->Penvsustain);
-sustaincounter->maximum(env->Penvpoints-2);
-}
-void EnvelopeUI::cb_addpoint(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_addpoint_i(o,v);
-}
-
-void EnvelopeUI::cb_deletepoint_i(Fl_Button*, void*) {
- int curpoint=freeedit->lastpoint;
-if (curpoint<1) return;
-if (curpoint>=env->Penvpoints-1) return;
-if (env->Penvpoints<=3) return;
-
-for (int i=curpoint+1;iPenvpoints;i++){
- env->Penvdt[i-1]=env->Penvdt[i];
- env->Penvval[i-1]=env->Penvval[i];
-};
-
-env->Penvpoints--;
-
-if (curpoint<=env->Penvsustain) env->Penvsustain--;
-
-
-freeedit->lastpoint-=1;
-freeedit->redraw();
-envfree->redraw();
-
-sustaincounter->value(env->Penvsustain);
-sustaincounter->maximum(env->Penvpoints-2);
-}
-void EnvelopeUI::cb_deletepoint(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_deletepoint_i(o,v);
-}
-
-void EnvelopeUI::cb_freemodebutton_i(Fl_Light_Button*, void*) {
- reinit();
-
-freeedit->lastpoint=-1;
-freeedit->redraw();
-}
-void EnvelopeUI::cb_freemodebutton(Fl_Light_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_freemodebutton_i(o,v);
-}
-
-void EnvelopeUI::cb_forcedreleasecheck_i(Fl_Check_Button* o, void*) {
- env->Pforcedrelease=(int)o->value();
-}
-void EnvelopeUI::cb_forcedreleasecheck(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_forcedreleasecheck_i(o,v);
-}
-
-void EnvelopeUI::cb_envstretchdial_i(WidgetPDial* o, void*) {
- env->Penvstretch=(int)o->value();
-}
-void EnvelopeUI::cb_envstretchdial(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_envstretchdial_i(o,v);
-}
-
-void EnvelopeUI::cb_Close_i(Fl_Button*, void*) {
- freemodeeditwindow->hide();
-}
-void EnvelopeUI::cb_Close(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void EnvelopeUI::cb_linearenvelopecheck_i(Fl_Check_Button* o, void*) {
- env->Plinearenvelope=(int)o->value();
-}
-void EnvelopeUI::cb_linearenvelopecheck(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_linearenvelopecheck_i(o,v);
-}
-
-void EnvelopeUI::cb_sustaincounter_i(Fl_Counter* o, void*) {
- env->Penvsustain=(int) o->value();
-freeedit->redraw();
-envfree->redraw();
-}
-void EnvelopeUI::cb_sustaincounter(Fl_Counter* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_sustaincounter_i(o,v);
-}
-
-void EnvelopeUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void EnvelopeUI::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void EnvelopeUI::cb_e1adt_i(WidgetPDial* o, void*) {
- env->PA_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e1adt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1adt_i(o,v);
-}
-
-void EnvelopeUI::cb_e1ddt_i(WidgetPDial* o, void*) {
- env->PD_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e1ddt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1ddt_i(o,v);
-}
-
-void EnvelopeUI::cb_e1rdt_i(WidgetPDial* o, void*) {
- env->PR_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e1rdt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1rdt_i(o,v);
-}
-
-void EnvelopeUI::cb_e1sval_i(WidgetPDial* o, void*) {
- env->PS_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e1sval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1sval_i(o,v);
-}
-
-void EnvelopeUI::cb_e1forcedrelease_i(Fl_Check_Button* o, void*) {
- env->Pforcedrelease=(int)o->value();
-}
-void EnvelopeUI::cb_e1forcedrelease(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1forcedrelease_i(o,v);
-}
-
-void EnvelopeUI::cb_e1envstretch_i(WidgetPDial* o, void*) {
- env->Penvstretch=(int)o->value();
-}
-void EnvelopeUI::cb_e1envstretch(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1envstretch_i(o,v);
-}
-
-void EnvelopeUI::cb_E_i(Fl_Button*, void*) {
- freemodeeditwindow->show();
-}
-void EnvelopeUI::cb_E(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_E_i(o,v);
-}
-
-void EnvelopeUI::cb_e1linearenvelope_i(Fl_Check_Button* o, void*) {
- env->Plinearenvelope=(int)o->value();
-}
-void EnvelopeUI::cb_e1linearenvelope(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e1linearenvelope_i(o,v);
-}
-
-void EnvelopeUI::cb_C1_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C1(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_C1_i(o,v);
-}
-
-void EnvelopeUI::cb_P1_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P1(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_P1_i(o,v);
-}
-
-void EnvelopeUI::cb_e2aval_i(WidgetPDial* o, void*) {
- env->PA_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e2aval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2aval_i(o,v);
-}
-
-void EnvelopeUI::cb_e2adt_i(WidgetPDial* o, void*) {
- env->PA_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e2adt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2adt_i(o,v);
-}
-
-void EnvelopeUI::cb_e2rval_i(WidgetPDial* o, void*) {
- env->PR_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e2rval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2rval_i(o,v);
-}
-
-void EnvelopeUI::cb_e2rdt_i(WidgetPDial* o, void*) {
- env->PR_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e2rdt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2rdt_i(o,v);
-}
-
-void EnvelopeUI::cb_e2envstretch_i(WidgetPDial* o, void*) {
- env->Penvstretch=(int)o->value();
-}
-void EnvelopeUI::cb_e2envstretch(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2envstretch_i(o,v);
-}
-
-void EnvelopeUI::cb_e2forcedrelease_i(Fl_Check_Button* o, void*) {
- env->Pforcedrelease=(int)o->value();
-}
-void EnvelopeUI::cb_e2forcedrelease(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e2forcedrelease_i(o,v);
-}
-
-void EnvelopeUI::cb_C2_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C2(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_C2_i(o,v);
-}
-
-void EnvelopeUI::cb_P2_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P2(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_P2_i(o,v);
-}
-
-void EnvelopeUI::cb_E1_i(Fl_Button*, void*) {
- freemodeeditwindow->show();
-}
-void EnvelopeUI::cb_E1(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_E1_i(o,v);
-}
-
-void EnvelopeUI::cb_e3aval_i(WidgetPDial* o, void*) {
- env->PA_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3aval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3aval_i(o,v);
-}
-
-void EnvelopeUI::cb_e3adt_i(WidgetPDial* o, void*) {
- env->PA_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3adt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3adt_i(o,v);
-}
-
-void EnvelopeUI::cb_e3dval_i(WidgetPDial* o, void*) {
- env->PD_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3dval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3dval_i(o,v);
-}
-
-void EnvelopeUI::cb_e3ddt_i(WidgetPDial* o, void*) {
- env->PD_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3ddt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3ddt_i(o,v);
-}
-
-void EnvelopeUI::cb_e3rdt_i(WidgetPDial* o, void*) {
- env->PR_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3rdt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3rdt_i(o,v);
-}
-
-void EnvelopeUI::cb_e3rval_i(WidgetPDial* o, void*) {
- env->PR_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e3rval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3rval_i(o,v);
-}
-
-void EnvelopeUI::cb_e3envstretch_i(WidgetPDial* o, void*) {
- env->Penvstretch=(int)o->value();
-}
-void EnvelopeUI::cb_e3envstretch(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3envstretch_i(o,v);
-}
-
-void EnvelopeUI::cb_e3forcedrelease_i(Fl_Check_Button* o, void*) {
- env->Pforcedrelease=(int)o->value();
-}
-void EnvelopeUI::cb_e3forcedrelease(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e3forcedrelease_i(o,v);
-}
-
-void EnvelopeUI::cb_E2_i(Fl_Button*, void*) {
- freemodeeditwindow->show();
-}
-void EnvelopeUI::cb_E2(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_E2_i(o,v);
-}
-
-void EnvelopeUI::cb_C3_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C3(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_C3_i(o,v);
-}
-
-void EnvelopeUI::cb_P3_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P3(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_P3_i(o,v);
-}
-
-void EnvelopeUI::cb_e4aval_i(WidgetPDial* o, void*) {
- env->PA_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e4aval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4aval_i(o,v);
-}
-
-void EnvelopeUI::cb_e4adt_i(WidgetPDial* o, void*) {
- env->PA_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e4adt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4adt_i(o,v);
-}
-
-void EnvelopeUI::cb_e4rval_i(WidgetPDial* o, void*) {
- env->PR_val=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e4rval(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4rval_i(o,v);
-}
-
-void EnvelopeUI::cb_e4rdt_i(WidgetPDial* o, void*) {
- env->PR_dt=(int)o->value();
-freeedit->redraw();
-}
-void EnvelopeUI::cb_e4rdt(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4rdt_i(o,v);
-}
-
-void EnvelopeUI::cb_e4envstretch_i(WidgetPDial* o, void*) {
- env->Penvstretch=(int)o->value();
-}
-void EnvelopeUI::cb_e4envstretch(WidgetPDial* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4envstretch_i(o,v);
-}
-
-void EnvelopeUI::cb_e4forcedrelease_i(Fl_Check_Button* o, void*) {
- env->Pforcedrelease=(int)o->value();
-}
-void EnvelopeUI::cb_e4forcedrelease(Fl_Check_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_e4forcedrelease_i(o,v);
-}
-
-void EnvelopeUI::cb_C4_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C4(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_C4_i(o,v);
-}
-
-void EnvelopeUI::cb_P4_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P4(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_P4_i(o,v);
-}
-
-void EnvelopeUI::cb_E3_i(Fl_Button*, void*) {
- freemodeeditwindow->show();
-}
-void EnvelopeUI::cb_E3(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->user_data()))->cb_E3_i(o,v);
-}
-
-void EnvelopeUI::cb_freeeditsmall_i(EnvelopeFreeEdit*, void*) {
- envfree->redraw();
-}
-void EnvelopeUI::cb_freeeditsmall(EnvelopeFreeEdit* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_freeeditsmall_i(o,v);
-}
-
-void EnvelopeUI::cb_E4_i(Fl_Button*, void*) {
- freemodeeditwindow->show();
-}
-void EnvelopeUI::cb_E4(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_E4_i(o,v);
-}
-
-void EnvelopeUI::cb_C5_i(Fl_Button*, void*) {
- presetsui->copy(env);
-}
-void EnvelopeUI::cb_C5(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_C5_i(o,v);
-}
-
-void EnvelopeUI::cb_P5_i(Fl_Button*, void*) {
- presetsui->paste(env,this);
-}
-void EnvelopeUI::cb_P5(Fl_Button* o, void* v) {
- ((EnvelopeUI*)(o->parent()->parent()->user_data()))->cb_P5_i(o,v);
-}
-
-EnvelopeUI::EnvelopeUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- env=NULL;
- freemodeeditwindow=NULL;
- envADSR=NULL;
- envASR=NULL;
- envADSRfilter=NULL;
- envASRbw=NULL;
- envfree=NULL;
-}
-
-EnvelopeUI::~EnvelopeUI() {
- envwindow->hide();
- hide();
- freemodeeditwindow->hide();
- delete (freemodeeditwindow);
-}
-
-Fl_Double_Window* EnvelopeUI::make_freemode_edit_window() {
- { freemodeeditwindow = new Fl_Double_Window(575, 180, "Envelope");
- freemodeeditwindow->user_data((void*)(this));
- { EnvelopeFreeEdit* o = freeedit = new EnvelopeFreeEdit(5, 5, 565, 145, "Envelope");
- freeedit->box(FL_FLAT_BOX);
- freeedit->color(FL_FOREGROUND_COLOR);
- freeedit->selection_color(FL_BACKGROUND_COLOR);
- freeedit->labeltype(FL_NORMAL_LABEL);
- freeedit->labelfont(0);
- freeedit->labelsize(14);
- freeedit->labelcolor(FL_FOREGROUND_COLOR);
- freeedit->align(Fl_Align(FL_ALIGN_CENTER));
- freeedit->when(FL_WHEN_RELEASE);
- o->init(env);
- } // EnvelopeFreeEdit* freeedit
- { Fl_Button* o = addpoint = new Fl_Button(115, 155, 80, 20, "Add point");
- addpoint->box(FL_THIN_UP_BOX);
- addpoint->labelsize(11);
- addpoint->callback((Fl_Callback*)cb_addpoint);
- if (env->Pfreemode==0) o->hide();
- } // Fl_Button* addpoint
- { Fl_Button* o = deletepoint = new Fl_Button(200, 155, 80, 20, "Delete point");
- deletepoint->box(FL_THIN_UP_BOX);
- deletepoint->labelsize(11);
- deletepoint->callback((Fl_Callback*)cb_deletepoint);
- if (env->Pfreemode==0) o->hide();
- } // Fl_Button* deletepoint
- { freemodebutton = new Fl_Light_Button(10, 155, 95, 20, "FreeMode");
- freemodebutton->tooltip("Enable or disable the freemode");
- freemodebutton->labelsize(11);
- freemodebutton->callback((Fl_Callback*)cb_freemodebutton);
- } // Fl_Light_Button* freemodebutton
- { Fl_Check_Button* o = forcedreleasecheck = new Fl_Check_Button(410, 165, 40, 15, "frcR");
- forcedreleasecheck->tooltip("Forced Relase");
- forcedreleasecheck->down_box(FL_DOWN_BOX);
- forcedreleasecheck->labelsize(10);
- forcedreleasecheck->callback((Fl_Callback*)cb_forcedreleasecheck);
- o->value(env->Pforcedrelease);
- if (env->Pfreemode==0) o->hide();
- } // Fl_Check_Button* forcedreleasecheck
- { WidgetPDial* o = envstretchdial = new WidgetPDial(380, 155, 25, 25, "Str.");
- envstretchdial->tooltip("Envelope stretch (on lower notes make the envelope longer)");
- envstretchdial->box(FL_ROUND_UP_BOX);
- envstretchdial->color(FL_BACKGROUND_COLOR);
- envstretchdial->selection_color(FL_INACTIVE_COLOR);
- envstretchdial->labeltype(FL_NORMAL_LABEL);
- envstretchdial->labelfont(0);
- envstretchdial->labelsize(10);
- envstretchdial->labelcolor(FL_FOREGROUND_COLOR);
- envstretchdial->maximum(127);
- envstretchdial->step(1);
- envstretchdial->callback((Fl_Callback*)cb_envstretchdial);
- envstretchdial->align(Fl_Align(FL_ALIGN_LEFT));
- envstretchdial->when(FL_WHEN_CHANGED);
- o->value(env->Penvstretch);
- if (env->Pfreemode==0) o->hide();
- } // WidgetPDial* envstretchdial
- { Fl_Button* o = new Fl_Button(510, 155, 60, 20, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Check_Button* o = linearenvelopecheck = new Fl_Check_Button(410, 151, 30, 15, "L");
- linearenvelopecheck->tooltip("Linear Envelope");
- linearenvelopecheck->down_box(FL_DOWN_BOX);
- linearenvelopecheck->labelsize(10);
- linearenvelopecheck->callback((Fl_Callback*)cb_linearenvelopecheck);
- o->value(env->Plinearenvelope);
- if ((env->Pfreemode==0)||(env->Envmode>2)) o->hide();
- } // Fl_Check_Button* linearenvelopecheck
- { Fl_Counter* o = sustaincounter = new Fl_Counter(315, 155, 40, 15, "Sust");
- sustaincounter->tooltip("Sustain (0 is disabled)");
- sustaincounter->type(1);
- sustaincounter->labelsize(11);
- sustaincounter->minimum(0);
- sustaincounter->maximum(127);
- sustaincounter->step(1);
- sustaincounter->callback((Fl_Callback*)cb_sustaincounter);
- sustaincounter->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(env->Penvsustain);
- if (env->Pfreemode==0) o->hide();
- o->maximum(env->Penvpoints-2);
- } // Fl_Counter* sustaincounter
- { Fl_Button* o = new Fl_Button(465, 160, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(482, 160, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- freemodeeditwindow->end();
- } // Fl_Double_Window* freemodeeditwindow
- return freemodeeditwindow;
-}
-
-Fl_Group* EnvelopeUI::make_ADSR_window() {
- { envADSR = new Fl_Group(0, 0, 205, 70);
- envADSR->box(FL_FLAT_BOX);
- envADSR->color(FL_LIGHT1);
- envADSR->selection_color(FL_BACKGROUND_COLOR);
- envADSR->labeltype(FL_NO_LABEL);
- envADSR->labelfont(1);
- envADSR->labelsize(14);
- envADSR->labelcolor(FL_FOREGROUND_COLOR);
- envADSR->user_data((void*)(this));
- envADSR->align(Fl_Align(FL_ALIGN_TOP));
- envADSR->when(FL_WHEN_RELEASE);
- { Fl_Group* o = new Fl_Group(0, 0, 205, 70, "Amplitude Envelope");
- o->box(FL_UP_BOX);
- o->color(FL_CYAN);
- o->labeltype(FL_ENGRAVED_LABEL);
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { WidgetPDial* o = e1adt = new WidgetPDial(5, 20, 30, 30, "A.dt");
- e1adt->tooltip("Attack time");
- e1adt->box(FL_ROUND_UP_BOX);
- e1adt->color(FL_BACKGROUND_COLOR);
- e1adt->selection_color(FL_INACTIVE_COLOR);
- e1adt->labeltype(FL_NORMAL_LABEL);
- e1adt->labelfont(0);
- e1adt->labelsize(10);
- e1adt->labelcolor(FL_FOREGROUND_COLOR);
- e1adt->maximum(127);
- e1adt->step(1);
- e1adt->callback((Fl_Callback*)cb_e1adt);
- e1adt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e1adt->when(FL_WHEN_CHANGED);
- o->value(env->PA_dt);
- } // WidgetPDial* e1adt
- { WidgetPDial* o = e1ddt = new WidgetPDial(40, 20, 30, 30, "D.dt");
- e1ddt->tooltip("Decay time");
- e1ddt->box(FL_ROUND_UP_BOX);
- e1ddt->color(FL_BACKGROUND_COLOR);
- e1ddt->selection_color(FL_INACTIVE_COLOR);
- e1ddt->labeltype(FL_NORMAL_LABEL);
- e1ddt->labelfont(0);
- e1ddt->labelsize(10);
- e1ddt->labelcolor(FL_FOREGROUND_COLOR);
- e1ddt->maximum(127);
- e1ddt->step(1);
- e1ddt->callback((Fl_Callback*)cb_e1ddt);
- e1ddt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e1ddt->when(FL_WHEN_CHANGED);
- o->value(env->PD_dt);
- } // WidgetPDial* e1ddt
- { WidgetPDial* o = e1rdt = new WidgetPDial(110, 20, 30, 30, "R.dt");
- e1rdt->tooltip("Release time");
- e1rdt->box(FL_ROUND_UP_BOX);
- e1rdt->color(FL_BACKGROUND_COLOR);
- e1rdt->selection_color(FL_INACTIVE_COLOR);
- e1rdt->labeltype(FL_NORMAL_LABEL);
- e1rdt->labelfont(0);
- e1rdt->labelsize(10);
- e1rdt->labelcolor(FL_FOREGROUND_COLOR);
- e1rdt->maximum(127);
- e1rdt->step(1);
- e1rdt->callback((Fl_Callback*)cb_e1rdt);
- e1rdt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e1rdt->when(FL_WHEN_CHANGED);
- o->value(env->PR_dt);
- } // WidgetPDial* e1rdt
- { WidgetPDial* o = e1sval = new WidgetPDial(75, 20, 30, 30, "S.val");
- e1sval->tooltip("Sustain value");
- e1sval->box(FL_ROUND_UP_BOX);
- e1sval->color(FL_BACKGROUND_COLOR);
- e1sval->selection_color(FL_INACTIVE_COLOR);
- e1sval->labeltype(FL_NORMAL_LABEL);
- e1sval->labelfont(0);
- e1sval->labelsize(10);
- e1sval->labelcolor(FL_FOREGROUND_COLOR);
- e1sval->maximum(127);
- e1sval->step(1);
- e1sval->callback((Fl_Callback*)cb_e1sval);
- e1sval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e1sval->when(FL_WHEN_CHANGED);
- o->value(env->PS_val);
- } // WidgetPDial* e1sval
- { Fl_Check_Button* o = e1forcedrelease = new Fl_Check_Button(180, 35, 20, 15, "frcR");
- e1forcedrelease->tooltip("Forced Relase");
- e1forcedrelease->down_box(FL_DOWN_BOX);
- e1forcedrelease->labelsize(10);
- e1forcedrelease->callback((Fl_Callback*)cb_e1forcedrelease);
- e1forcedrelease->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->value(env->Pforcedrelease);
- } // Fl_Check_Button* e1forcedrelease
- { WidgetPDial* o = e1envstretch = new WidgetPDial(145, 25, 25, 25, "Stretch");
- e1envstretch->tooltip("Envelope stretch (on lower notes makes the envelope longer)");
- e1envstretch->box(FL_ROUND_UP_BOX);
- e1envstretch->color(FL_BACKGROUND_COLOR);
- e1envstretch->selection_color(FL_INACTIVE_COLOR);
- e1envstretch->labeltype(FL_NORMAL_LABEL);
- e1envstretch->labelfont(0);
- e1envstretch->labelsize(10);
- e1envstretch->labelcolor(FL_FOREGROUND_COLOR);
- e1envstretch->maximum(127);
- e1envstretch->step(1);
- e1envstretch->callback((Fl_Callback*)cb_e1envstretch);
- e1envstretch->align(Fl_Align(FL_ALIGN_BOTTOM));
- e1envstretch->when(FL_WHEN_CHANGED);
- o->value(env->Penvstretch);
- } // WidgetPDial* e1envstretch
- { Fl_Button* o = new Fl_Button(185, 5, 15, 15, "E");
- o->tooltip("Envelope window");
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_E);
- } // Fl_Button* o
- { Fl_Check_Button* o = e1linearenvelope = new Fl_Check_Button(180, 20, 15, 15, "L");
- e1linearenvelope->tooltip("The evelope is linear");
- e1linearenvelope->down_box(FL_DOWN_BOX);
- e1linearenvelope->labelsize(10);
- e1linearenvelope->callback((Fl_Callback*)cb_e1linearenvelope);
- e1linearenvelope->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(env->Plinearenvelope);
- } // Fl_Check_Button* e1linearenvelope
- { Fl_Button* o = new Fl_Button(150, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(167, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P1);
- } // Fl_Button* o
- set_module_parameters(o);
- o->end();
- } // Fl_Group* o
- envADSR->end();
- } // Fl_Group* envADSR
- return envADSR;
-}
-
-Fl_Group* EnvelopeUI::make_ASR_window() {
- { envASR = new Fl_Group(0, 0, 210, 70);
- envASR->box(FL_FLAT_BOX);
- envASR->color(FL_BACKGROUND_COLOR);
- envASR->selection_color(FL_BACKGROUND_COLOR);
- envASR->labeltype(FL_NO_LABEL);
- envASR->labelfont(0);
- envASR->labelsize(14);
- envASR->labelcolor(FL_FOREGROUND_COLOR);
- envASR->user_data((void*)(this));
- envASR->align(Fl_Align(FL_ALIGN_TOP));
- envASR->when(FL_WHEN_RELEASE);
- { Fl_Group* o = new Fl_Group(0, 0, 210, 70, "Frequency Envelope");
- o->box(FL_UP_BOX);
- o->color(FL_CYAN);
- o->labeltype(FL_ENGRAVED_LABEL);
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { WidgetPDial* o = e2aval = new WidgetPDial(5, 20, 30, 30, "A.val");
- e2aval->tooltip("Starting value");
- e2aval->box(FL_ROUND_UP_BOX);
- e2aval->color(FL_BACKGROUND_COLOR);
- e2aval->selection_color(FL_INACTIVE_COLOR);
- e2aval->labeltype(FL_NORMAL_LABEL);
- e2aval->labelfont(0);
- e2aval->labelsize(10);
- e2aval->labelcolor(FL_FOREGROUND_COLOR);
- e2aval->maximum(127);
- e2aval->step(1);
- e2aval->callback((Fl_Callback*)cb_e2aval);
- e2aval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e2aval->when(FL_WHEN_CHANGED);
- o->value(env->PA_val);
- } // WidgetPDial* e2aval
- { WidgetPDial* o = e2adt = new WidgetPDial(40, 20, 30, 30, "A.dt");
- e2adt->tooltip("Attack time");
- e2adt->box(FL_ROUND_UP_BOX);
- e2adt->color(FL_BACKGROUND_COLOR);
- e2adt->selection_color(FL_INACTIVE_COLOR);
- e2adt->labeltype(FL_NORMAL_LABEL);
- e2adt->labelfont(0);
- e2adt->labelsize(10);
- e2adt->labelcolor(FL_FOREGROUND_COLOR);
- e2adt->maximum(127);
- e2adt->step(1);
- e2adt->callback((Fl_Callback*)cb_e2adt);
- e2adt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e2adt->when(FL_WHEN_CHANGED);
- o->value(env->PA_dt);
- } // WidgetPDial* e2adt
- { WidgetPDial* o = e2rval = new WidgetPDial(110, 20, 30, 30, "R.val");
- e2rval->tooltip("Release value");
- e2rval->box(FL_ROUND_UP_BOX);
- e2rval->color(FL_BACKGROUND_COLOR);
- e2rval->selection_color(FL_INACTIVE_COLOR);
- e2rval->labeltype(FL_NORMAL_LABEL);
- e2rval->labelfont(0);
- e2rval->labelsize(10);
- e2rval->labelcolor(FL_FOREGROUND_COLOR);
- e2rval->maximum(127);
- e2rval->step(1);
- e2rval->callback((Fl_Callback*)cb_e2rval);
- e2rval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e2rval->when(FL_WHEN_CHANGED);
- o->value(env->PR_val);
- } // WidgetPDial* e2rval
- { WidgetPDial* o = e2rdt = new WidgetPDial(75, 20, 30, 30, "R.dt");
- e2rdt->tooltip("Release time");
- e2rdt->box(FL_ROUND_UP_BOX);
- e2rdt->color(FL_BACKGROUND_COLOR);
- e2rdt->selection_color(FL_INACTIVE_COLOR);
- e2rdt->labeltype(FL_NORMAL_LABEL);
- e2rdt->labelfont(0);
- e2rdt->labelsize(10);
- e2rdt->labelcolor(FL_FOREGROUND_COLOR);
- e2rdt->maximum(127);
- e2rdt->step(1);
- e2rdt->callback((Fl_Callback*)cb_e2rdt);
- e2rdt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e2rdt->when(FL_WHEN_CHANGED);
- o->value(env->PR_dt);
- } // WidgetPDial* e2rdt
- { WidgetPDial* o = e2envstretch = new WidgetPDial(145, 25, 25, 25, "Stretch");
- e2envstretch->tooltip("Envelope stretch (on lower notes makes the envelope longer)");
- e2envstretch->box(FL_ROUND_UP_BOX);
- e2envstretch->color(FL_BACKGROUND_COLOR);
- e2envstretch->selection_color(FL_INACTIVE_COLOR);
- e2envstretch->labeltype(FL_NORMAL_LABEL);
- e2envstretch->labelfont(0);
- e2envstretch->labelsize(10);
- e2envstretch->labelcolor(FL_FOREGROUND_COLOR);
- e2envstretch->maximum(127);
- e2envstretch->step(1);
- e2envstretch->callback((Fl_Callback*)cb_e2envstretch);
- e2envstretch->align(Fl_Align(FL_ALIGN_BOTTOM));
- e2envstretch->when(FL_WHEN_CHANGED);
- o->value(env->Penvstretch);
- } // WidgetPDial* e2envstretch
- { Fl_Check_Button* o = e2forcedrelease = new Fl_Check_Button(180, 25, 15, 25, "frcR");
- e2forcedrelease->tooltip("Forced release");
- e2forcedrelease->down_box(FL_DOWN_BOX);
- e2forcedrelease->labelsize(10);
- e2forcedrelease->callback((Fl_Callback*)cb_e2forcedrelease);
- e2forcedrelease->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->value(env->Pforcedrelease);
- } // Fl_Check_Button* e2forcedrelease
- { Fl_Button* o = new Fl_Button(155, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C2);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(172, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P2);
- } // Fl_Button* o
- set_module_parameters(o);
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(190, 5, 15, 15, "E");
- o->tooltip("Envelope window");
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_E1);
- } // Fl_Button* o
- envASR->end();
- } // Fl_Group* envASR
- return envASR;
-}
-
-Fl_Group* EnvelopeUI::make_ADSRfilter_window() {
- { envADSRfilter = new Fl_Group(0, 0, 275, 70);
- envADSRfilter->box(FL_FLAT_BOX);
- envADSRfilter->color(FL_LIGHT1);
- envADSRfilter->selection_color(FL_BACKGROUND_COLOR);
- envADSRfilter->labeltype(FL_NO_LABEL);
- envADSRfilter->labelfont(1);
- envADSRfilter->labelsize(14);
- envADSRfilter->labelcolor(FL_FOREGROUND_COLOR);
- envADSRfilter->user_data((void*)(this));
- envADSRfilter->align(Fl_Align(FL_ALIGN_TOP));
- envADSRfilter->when(FL_WHEN_RELEASE);
- { Fl_Group* o = new Fl_Group(0, 0, 275, 70, "Filter Envelope");
- o->box(FL_UP_BOX);
- o->color(FL_CYAN);
- o->labeltype(FL_ENGRAVED_LABEL);
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { WidgetPDial* o = e3aval = new WidgetPDial(5, 20, 30, 30, "A.val");
- e3aval->tooltip("Starting value");
- e3aval->box(FL_ROUND_UP_BOX);
- e3aval->color(FL_BACKGROUND_COLOR);
- e3aval->selection_color(FL_INACTIVE_COLOR);
- e3aval->labeltype(FL_NORMAL_LABEL);
- e3aval->labelfont(0);
- e3aval->labelsize(10);
- e3aval->labelcolor(FL_FOREGROUND_COLOR);
- e3aval->maximum(127);
- e3aval->step(1);
- e3aval->callback((Fl_Callback*)cb_e3aval);
- e3aval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3aval->when(FL_WHEN_CHANGED);
- o->value(env->PA_val);
- } // WidgetPDial* e3aval
- { WidgetPDial* o = e3adt = new WidgetPDial(40, 20, 30, 30, "A.dt");
- e3adt->tooltip("Attack time");
- e3adt->box(FL_ROUND_UP_BOX);
- e3adt->color(FL_BACKGROUND_COLOR);
- e3adt->selection_color(FL_INACTIVE_COLOR);
- e3adt->labeltype(FL_NORMAL_LABEL);
- e3adt->labelfont(0);
- e3adt->labelsize(10);
- e3adt->labelcolor(FL_FOREGROUND_COLOR);
- e3adt->maximum(127);
- e3adt->step(1);
- e3adt->callback((Fl_Callback*)cb_e3adt);
- e3adt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3adt->when(FL_WHEN_CHANGED);
- o->value(env->PA_dt);
- } // WidgetPDial* e3adt
- { WidgetPDial* o = e3dval = new WidgetPDial(75, 20, 30, 30, "D.val");
- e3dval->tooltip("decay value");
- e3dval->box(FL_ROUND_UP_BOX);
- e3dval->color(FL_BACKGROUND_COLOR);
- e3dval->selection_color(FL_INACTIVE_COLOR);
- e3dval->labeltype(FL_NORMAL_LABEL);
- e3dval->labelfont(0);
- e3dval->labelsize(10);
- e3dval->labelcolor(FL_FOREGROUND_COLOR);
- e3dval->maximum(127);
- e3dval->step(1);
- e3dval->callback((Fl_Callback*)cb_e3dval);
- e3dval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3dval->when(FL_WHEN_CHANGED);
- o->value(env->PD_val);
- } // WidgetPDial* e3dval
- { WidgetPDial* o = e3ddt = new WidgetPDial(110, 20, 30, 30, "D.dt");
- e3ddt->tooltip("decay time");
- e3ddt->box(FL_ROUND_UP_BOX);
- e3ddt->color(FL_BACKGROUND_COLOR);
- e3ddt->selection_color(FL_INACTIVE_COLOR);
- e3ddt->labeltype(FL_NORMAL_LABEL);
- e3ddt->labelfont(0);
- e3ddt->labelsize(10);
- e3ddt->labelcolor(FL_FOREGROUND_COLOR);
- e3ddt->maximum(127);
- e3ddt->step(1);
- e3ddt->callback((Fl_Callback*)cb_e3ddt);
- e3ddt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3ddt->when(FL_WHEN_CHANGED);
- o->value(env->PD_dt);
- } // WidgetPDial* e3ddt
- { WidgetPDial* o = e3rdt = new WidgetPDial(145, 20, 30, 30, "R.dt");
- e3rdt->tooltip("Release time");
- e3rdt->box(FL_ROUND_UP_BOX);
- e3rdt->color(FL_BACKGROUND_COLOR);
- e3rdt->selection_color(FL_INACTIVE_COLOR);
- e3rdt->labeltype(FL_NORMAL_LABEL);
- e3rdt->labelfont(0);
- e3rdt->labelsize(10);
- e3rdt->labelcolor(FL_FOREGROUND_COLOR);
- e3rdt->maximum(127);
- e3rdt->step(1);
- e3rdt->callback((Fl_Callback*)cb_e3rdt);
- e3rdt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3rdt->when(FL_WHEN_CHANGED);
- o->value(env->PR_dt);
- } // WidgetPDial* e3rdt
- { WidgetPDial* o = e3rval = new WidgetPDial(180, 20, 30, 30, "R.val");
- e3rval->tooltip("Release value");
- e3rval->box(FL_ROUND_UP_BOX);
- e3rval->color(FL_BACKGROUND_COLOR);
- e3rval->selection_color(FL_INACTIVE_COLOR);
- e3rval->labeltype(FL_NORMAL_LABEL);
- e3rval->labelfont(0);
- e3rval->labelsize(10);
- e3rval->labelcolor(FL_FOREGROUND_COLOR);
- e3rval->maximum(127);
- e3rval->step(1);
- e3rval->callback((Fl_Callback*)cb_e3rval);
- e3rval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3rval->when(FL_WHEN_CHANGED);
- o->value(env->PR_val);
- } // WidgetPDial* e3rval
- { WidgetPDial* o = e3envstretch = new WidgetPDial(215, 25, 25, 25, "Stretch");
- e3envstretch->tooltip("Envelope stretch (on lower notes makes the envelope longer)");
- e3envstretch->box(FL_ROUND_UP_BOX);
- e3envstretch->color(FL_BACKGROUND_COLOR);
- e3envstretch->selection_color(FL_INACTIVE_COLOR);
- e3envstretch->labeltype(FL_NORMAL_LABEL);
- e3envstretch->labelfont(0);
- e3envstretch->labelsize(10);
- e3envstretch->labelcolor(FL_FOREGROUND_COLOR);
- e3envstretch->maximum(127);
- e3envstretch->step(1);
- e3envstretch->callback((Fl_Callback*)cb_e3envstretch);
- e3envstretch->align(Fl_Align(FL_ALIGN_BOTTOM));
- e3envstretch->when(FL_WHEN_CHANGED);
- o->value(env->Penvstretch);
- } // WidgetPDial* e3envstretch
- { Fl_Check_Button* o = e3forcedrelease = new Fl_Check_Button(250, 30, 15, 20, "frcR");
- e3forcedrelease->tooltip("Forced Relase");
- e3forcedrelease->down_box(FL_DOWN_BOX);
- e3forcedrelease->labelsize(10);
- e3forcedrelease->callback((Fl_Callback*)cb_e3forcedrelease);
- e3forcedrelease->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->value(env->Pforcedrelease);
- } // Fl_Check_Button* e3forcedrelease
- { Fl_Button* o = new Fl_Button(255, 5, 15, 15, "E");
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_E2);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(220, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C3);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(237, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P3);
- } // Fl_Button* o
- set_module_parameters(o);
- o->end();
- } // Fl_Group* o
- envADSRfilter->end();
- } // Fl_Group* envADSRfilter
- return envADSRfilter;
-}
-
-Fl_Group* EnvelopeUI::make_ASRbw_window() {
- { Fl_Group* o = envASRbw = new Fl_Group(0, 0, 210, 70);
- envASRbw->box(FL_FLAT_BOX);
- envASRbw->color(FL_BACKGROUND_COLOR);
- envASRbw->selection_color(FL_BACKGROUND_COLOR);
- envASRbw->labeltype(FL_NO_LABEL);
- envASRbw->labelfont(0);
- envASRbw->labelsize(14);
- envASRbw->labelcolor(FL_FOREGROUND_COLOR);
- envASRbw->user_data((void*)(this));
- envASRbw->align(Fl_Align(FL_ALIGN_TOP));
- envASRbw->when(FL_WHEN_RELEASE);
- { Fl_Group* o = new Fl_Group(0, 0, 210, 70, "BandWidth Envelope");
- o->box(FL_UP_BOX);
- o->color(FL_CYAN);
- o->labeltype(FL_ENGRAVED_LABEL);
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { WidgetPDial* o = e4aval = new WidgetPDial(5, 20, 30, 30, "A.val");
- e4aval->tooltip("Starting value");
- e4aval->box(FL_ROUND_UP_BOX);
- e4aval->color(FL_BACKGROUND_COLOR);
- e4aval->selection_color(FL_INACTIVE_COLOR);
- e4aval->labeltype(FL_NORMAL_LABEL);
- e4aval->labelfont(0);
- e4aval->labelsize(10);
- e4aval->labelcolor(FL_FOREGROUND_COLOR);
- e4aval->maximum(127);
- e4aval->step(1);
- e4aval->callback((Fl_Callback*)cb_e4aval);
- e4aval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e4aval->when(FL_WHEN_CHANGED);
- o->value(env->PA_val);
- } // WidgetPDial* e4aval
- { WidgetPDial* o = e4adt = new WidgetPDial(40, 20, 30, 30, "A.dt");
- e4adt->tooltip("Attack time");
- e4adt->box(FL_ROUND_UP_BOX);
- e4adt->color(FL_BACKGROUND_COLOR);
- e4adt->selection_color(FL_INACTIVE_COLOR);
- e4adt->labeltype(FL_NORMAL_LABEL);
- e4adt->labelfont(0);
- e4adt->labelsize(10);
- e4adt->labelcolor(FL_FOREGROUND_COLOR);
- e4adt->maximum(127);
- e4adt->step(1);
- e4adt->callback((Fl_Callback*)cb_e4adt);
- e4adt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e4adt->when(FL_WHEN_CHANGED);
- o->value(env->PA_dt);
- } // WidgetPDial* e4adt
- { WidgetPDial* o = e4rval = new WidgetPDial(110, 20, 30, 30, "R.val");
- e4rval->tooltip("Release value");
- e4rval->box(FL_ROUND_UP_BOX);
- e4rval->color(FL_BACKGROUND_COLOR);
- e4rval->selection_color(FL_INACTIVE_COLOR);
- e4rval->labeltype(FL_NORMAL_LABEL);
- e4rval->labelfont(0);
- e4rval->labelsize(10);
- e4rval->labelcolor(FL_FOREGROUND_COLOR);
- e4rval->maximum(127);
- e4rval->step(1);
- e4rval->callback((Fl_Callback*)cb_e4rval);
- e4rval->align(Fl_Align(FL_ALIGN_BOTTOM));
- e4rval->when(FL_WHEN_CHANGED);
- o->value(env->PR_val);
- } // WidgetPDial* e4rval
- { WidgetPDial* o = e4rdt = new WidgetPDial(75, 20, 30, 30, "R.dt");
- e4rdt->tooltip("Release time");
- e4rdt->box(FL_ROUND_UP_BOX);
- e4rdt->color(FL_BACKGROUND_COLOR);
- e4rdt->selection_color(FL_INACTIVE_COLOR);
- e4rdt->labeltype(FL_NORMAL_LABEL);
- e4rdt->labelfont(0);
- e4rdt->labelsize(10);
- e4rdt->labelcolor(FL_FOREGROUND_COLOR);
- e4rdt->maximum(127);
- e4rdt->step(1);
- e4rdt->callback((Fl_Callback*)cb_e4rdt);
- e4rdt->align(Fl_Align(FL_ALIGN_BOTTOM));
- e4rdt->when(FL_WHEN_CHANGED);
- o->value(env->PR_dt);
- } // WidgetPDial* e4rdt
- { WidgetPDial* o = e4envstretch = new WidgetPDial(145, 25, 25, 25, "Stretch");
- e4envstretch->tooltip("Envelope stretch (on lower notes makes the envelope longer)");
- e4envstretch->box(FL_ROUND_UP_BOX);
- e4envstretch->color(FL_BACKGROUND_COLOR);
- e4envstretch->selection_color(FL_INACTIVE_COLOR);
- e4envstretch->labeltype(FL_NORMAL_LABEL);
- e4envstretch->labelfont(0);
- e4envstretch->labelsize(10);
- e4envstretch->labelcolor(FL_FOREGROUND_COLOR);
- e4envstretch->maximum(127);
- e4envstretch->step(1);
- e4envstretch->callback((Fl_Callback*)cb_e4envstretch);
- e4envstretch->align(Fl_Align(FL_ALIGN_BOTTOM));
- e4envstretch->when(FL_WHEN_CHANGED);
- o->value(env->Penvstretch);
- } // WidgetPDial* e4envstretch
- { Fl_Check_Button* o = e4forcedrelease = new Fl_Check_Button(180, 25, 15, 25, "frcR");
- e4forcedrelease->tooltip("Forced release");
- e4forcedrelease->down_box(FL_DOWN_BOX);
- e4forcedrelease->labelsize(10);
- e4forcedrelease->callback((Fl_Callback*)cb_e4forcedrelease);
- e4forcedrelease->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->value(env->Pforcedrelease);
- } // Fl_Check_Button* e4forcedrelease
- { Fl_Button* o = new Fl_Button(155, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C4);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(172, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P4);
- } // Fl_Button* o
- set_module_parameters(o);
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(190, 5, 15, 15, "E");
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_E3);
- } // Fl_Button* o
- set_module_parameters(o);
- envASRbw->end();
- } // Fl_Group* envASRbw
- return envASRbw;
-}
-
-Fl_Group* EnvelopeUI::make_free_window() {
- { Fl_Group* o = envfree = new Fl_Group(0, 0, 205, 70);
- envfree->box(FL_FLAT_BOX);
- envfree->color(FL_LIGHT1);
- envfree->selection_color(FL_BACKGROUND_COLOR);
- envfree->labeltype(FL_NO_LABEL);
- envfree->labelfont(1);
- envfree->labelsize(14);
- envfree->labelcolor(FL_FOREGROUND_COLOR);
- envfree->user_data((void*)(this));
- envfree->align(Fl_Align(FL_ALIGN_TOP));
- envfree->when(FL_WHEN_RELEASE);
- { Fl_Group* o = envfreegroup = new Fl_Group(0, 0, 205, 70, "Amplitude Envelope");
- envfreegroup->box(FL_UP_BOX);
- envfreegroup->color(FL_CYAN);
- envfreegroup->labeltype(FL_ENGRAVED_LABEL);
- envfreegroup->labelsize(10);
- envfreegroup->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeFreeEdit* o = freeeditsmall = new EnvelopeFreeEdit(5, 20, 195, 45, "Envelope");
- freeeditsmall->box(FL_FLAT_BOX);
- freeeditsmall->color(FL_FOREGROUND_COLOR);
- freeeditsmall->selection_color(FL_BACKGROUND_COLOR);
- freeeditsmall->labeltype(FL_NORMAL_LABEL);
- freeeditsmall->labelfont(0);
- freeeditsmall->labelsize(14);
- freeeditsmall->labelcolor(FL_FOREGROUND_COLOR);
- freeeditsmall->callback((Fl_Callback*)cb_freeeditsmall);
- freeeditsmall->align(Fl_Align(FL_ALIGN_CENTER));
- freeeditsmall->when(FL_WHEN_RELEASE);
- Fl_Group::current()->resizable(freeeditsmall);
- o->init(env);
- } // EnvelopeFreeEdit* freeeditsmall
- { Fl_Button* o = new Fl_Button(185, 5, 15, 15, "E");
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_E4);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(150, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C5);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(167, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P5);
- } // Fl_Button* o
- set_module_parameters(o);
- envfreegroup->end();
- Fl_Group::current()->resizable(envfreegroup);
- } // Fl_Group* envfreegroup
- set_module_parameters(o);
- envfree->end();
- } // Fl_Group* envfree
- return envfree;
-}
-
-void EnvelopeUI::init(EnvelopeParams *env_) {
- env=env_;
- make_ADSR_window();
- make_ASR_window();
- make_ADSRfilter_window();
- make_ASRbw_window();
- make_free_window();
-
- make_freemode_edit_window();
-
- envwindow=NULL;
- if (env->Envmode==3) envfreegroup->label("Frequency Envelope");
- if (env->Envmode==4) envfreegroup->label("Filter Envelope");
- if (env->Envmode==5) envfreegroup->label("Bandwidth Envelope");
-
- freemodeeditwindow->label(this->label());
-
-
- freeeditsmall->setpair(freeedit);
- freeedit->setpair(freeeditsmall);
-
-
- refresh();
-}
-
-void EnvelopeUI::reinit() {
- if (env->Pfreemode!=0){
- int answer=fl_choice("Disable the free mode of the Envelope?","No","Yes",NULL);
- if (env->Pfreemode!=0) freemodebutton->value(1);
- else freemodebutton->value(0);
- if (answer==0) return;
- };
-
- if (env->Pfreemode==0) env->Pfreemode=1;
- else env->Pfreemode=0;
-
- hide();
- int winx=freemodeeditwindow->x();
- int winy=freemodeeditwindow->y();
-
- freemodeeditwindow->hide();
-
- envwindow->hide();
- Fl_Group *par=envwindow->parent();
- par->hide();
-
-
- refresh();
- envwindow->show();
- par->redraw();
-
- par->show();
- show();
- freemodeeditwindow->position(winx,winy);
- freemodeeditwindow->show();
-
- if (env->Pfreemode!=0) {
- freemodebutton->value(1);
- addpoint->show();
- deletepoint->show();
- forcedreleasecheck->show();
- }else{
- freemodebutton->value(0);
- addpoint->hide();
- deletepoint->hide();
- forcedreleasecheck->hide();
- };
-}
-
-void EnvelopeUI::refresh() {
- freemodebutton->value(env->Pfreemode);
-
- sustaincounter->value(env->Penvsustain);
- if (env->Pfreemode==0) sustaincounter->hide();
- else sustaincounter->show();
- sustaincounter->maximum(env->Penvpoints-2);
-
- envstretchdial->value(env->Penvstretch);
- if (env->Pfreemode==0) envstretchdial->hide();
- else envstretchdial->show();
-
- linearenvelopecheck->value(env->Plinearenvelope);
- if ((env->Pfreemode==0)||(env->Envmode>2)) linearenvelopecheck->hide();
- else linearenvelopecheck->show();
-
- forcedreleasecheck->value(env->Pforcedrelease);
- if (env->Pfreemode==0) forcedreleasecheck->hide();
-
- freeedit->redraw();
-
-
- if (env->Pfreemode==0){
- switch(env->Envmode){
- case(1):
- case(2):
- e1adt->value(env->PA_dt);
- e1ddt->value(env->PD_dt);
- e1sval->value(env->PS_val);
- e1rdt->value(env->PR_dt);
- e1envstretch->value(env->Penvstretch);
- e1linearenvelope->value(env->Plinearenvelope);
- e1forcedrelease->value(env->Pforcedrelease);
- break;
- case(3):
- e2aval->value(env->PA_val);
- e2adt->value(env->PA_dt);
- e2rdt->value(env->PR_dt);
- e2rval->value(env->PR_val);
- e2envstretch->value(env->Penvstretch);
- e2forcedrelease->value(env->Pforcedrelease);
- break;
- case(4):
- e3aval->value(env->PA_val);
- e3adt->value(env->PA_dt);
- e3dval->value(env->PD_val);
- e3ddt->value(env->PD_dt);
- e3rdt->value(env->PR_dt);
- e3rval->value(env->PR_val);
- e3envstretch->value(env->Penvstretch);
- e3forcedrelease->value(env->Pforcedrelease);
- break;
- case(5):
- e4aval->value(env->PA_val);
- e4adt->value(env->PA_dt);
- e4rdt->value(env->PR_dt);
- e4rval->value(env->PR_val);
- e4envstretch->value(env->Penvstretch);
- e4forcedrelease->value(env->Pforcedrelease);
- break;
- default:
- break;
- };
- }else{
- envfree->redraw();
- };
-
-
- envADSR->hide();
- envASR->hide();
- envADSRfilter->hide();
- envASRbw->hide();
- envfree->hide();
-
- if (env->Pfreemode==0){
- switch(env->Envmode){
- case(1):
- case(2):
- envwindow=envADSR;
- break;
- case(3):
- envwindow=envASR;
- break;
- case(4):
- envwindow=envADSRfilter;
- break;
- case(5):
- envwindow=envASRbw;
- break;
- default:
- break;
- };
- }else{
- envwindow=envfree;
- };
-
- envwindow->resize(this->x(),this->y(),this->w(),this->h());
-
- envwindow->show();
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.h b/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.h
deleted file mode 100644
index 3e7829b18..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/EnvelopeUI.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef EnvelopeUI_h
-#define EnvelopeUI_h
-#include
-#include "WidgetPDial.h"
-#include
-#include
-#include "../globals.h"
-#include
-#include "../Params/EnvelopeParams.h"
-#include
-#include
-#include
-#include "PresetsUI.h"
-#include "common.H"
-
-class EnvelopeFreeEdit : public Fl_Box {
-public:
- EnvelopeFreeEdit(int x,int y, int w, int h, const char *label=0);
- void init(EnvelopeParams *env_);
- void setpair(Fl_Box *pair_);
- int getpointx(int n);
- int getpointy(int n);
- int getnearest(int x,int y);
-private:
- void draw();
-public:
- int handle(int event);
-private:
- Fl_Box *pair;
- EnvelopeParams *env;
- int oldx,oldy;
- int currentpoint,cpx,cpdt;
-public:
- int lastpoint;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-
-class EnvelopeUI : public Fl_Group,PresetsUI_ {
-public:
- EnvelopeUI(int x,int y, int w, int h, const char *label=0);
- ~EnvelopeUI();
- Fl_Double_Window* make_freemode_edit_window();
- Fl_Double_Window *freemodeeditwindow;
- EnvelopeFreeEdit *freeedit;
- Fl_Button *addpoint;
-private:
- void cb_addpoint_i(Fl_Button*, void*);
- static void cb_addpoint(Fl_Button*, void*);
-public:
- Fl_Button *deletepoint;
-private:
- void cb_deletepoint_i(Fl_Button*, void*);
- static void cb_deletepoint(Fl_Button*, void*);
-public:
- Fl_Light_Button *freemodebutton;
-private:
- void cb_freemodebutton_i(Fl_Light_Button*, void*);
- static void cb_freemodebutton(Fl_Light_Button*, void*);
-public:
- Fl_Check_Button *forcedreleasecheck;
-private:
- void cb_forcedreleasecheck_i(Fl_Check_Button*, void*);
- static void cb_forcedreleasecheck(Fl_Check_Button*, void*);
-public:
- WidgetPDial *envstretchdial;
-private:
- void cb_envstretchdial_i(WidgetPDial*, void*);
- static void cb_envstretchdial(WidgetPDial*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
-public:
- Fl_Check_Button *linearenvelopecheck;
-private:
- void cb_linearenvelopecheck_i(Fl_Check_Button*, void*);
- static void cb_linearenvelopecheck(Fl_Check_Button*, void*);
-public:
- Fl_Counter *sustaincounter;
-private:
- void cb_sustaincounter_i(Fl_Counter*, void*);
- static void cb_sustaincounter(Fl_Counter*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- Fl_Group* make_ADSR_window();
- Fl_Group *envADSR;
- WidgetPDial *e1adt;
-private:
- void cb_e1adt_i(WidgetPDial*, void*);
- static void cb_e1adt(WidgetPDial*, void*);
-public:
- WidgetPDial *e1ddt;
-private:
- void cb_e1ddt_i(WidgetPDial*, void*);
- static void cb_e1ddt(WidgetPDial*, void*);
-public:
- WidgetPDial *e1rdt;
-private:
- void cb_e1rdt_i(WidgetPDial*, void*);
- static void cb_e1rdt(WidgetPDial*, void*);
-public:
- WidgetPDial *e1sval;
-private:
- void cb_e1sval_i(WidgetPDial*, void*);
- static void cb_e1sval(WidgetPDial*, void*);
-public:
- Fl_Check_Button *e1forcedrelease;
-private:
- void cb_e1forcedrelease_i(Fl_Check_Button*, void*);
- static void cb_e1forcedrelease(Fl_Check_Button*, void*);
-public:
- WidgetPDial *e1envstretch;
-private:
- void cb_e1envstretch_i(WidgetPDial*, void*);
- static void cb_e1envstretch(WidgetPDial*, void*);
- void cb_E_i(Fl_Button*, void*);
- static void cb_E(Fl_Button*, void*);
-public:
- Fl_Check_Button *e1linearenvelope;
-private:
- void cb_e1linearenvelope_i(Fl_Check_Button*, void*);
- static void cb_e1linearenvelope(Fl_Check_Button*, void*);
- void cb_C1_i(Fl_Button*, void*);
- static void cb_C1(Fl_Button*, void*);
- void cb_P1_i(Fl_Button*, void*);
- static void cb_P1(Fl_Button*, void*);
-public:
- Fl_Group* make_ASR_window();
- Fl_Group *envASR;
- WidgetPDial *e2aval;
-private:
- void cb_e2aval_i(WidgetPDial*, void*);
- static void cb_e2aval(WidgetPDial*, void*);
-public:
- WidgetPDial *e2adt;
-private:
- void cb_e2adt_i(WidgetPDial*, void*);
- static void cb_e2adt(WidgetPDial*, void*);
-public:
- WidgetPDial *e2rval;
-private:
- void cb_e2rval_i(WidgetPDial*, void*);
- static void cb_e2rval(WidgetPDial*, void*);
-public:
- WidgetPDial *e2rdt;
-private:
- void cb_e2rdt_i(WidgetPDial*, void*);
- static void cb_e2rdt(WidgetPDial*, void*);
-public:
- WidgetPDial *e2envstretch;
-private:
- void cb_e2envstretch_i(WidgetPDial*, void*);
- static void cb_e2envstretch(WidgetPDial*, void*);
-public:
- Fl_Check_Button *e2forcedrelease;
-private:
- void cb_e2forcedrelease_i(Fl_Check_Button*, void*);
- static void cb_e2forcedrelease(Fl_Check_Button*, void*);
- void cb_C2_i(Fl_Button*, void*);
- static void cb_C2(Fl_Button*, void*);
- void cb_P2_i(Fl_Button*, void*);
- static void cb_P2(Fl_Button*, void*);
- void cb_E1_i(Fl_Button*, void*);
- static void cb_E1(Fl_Button*, void*);
-public:
- Fl_Group* make_ADSRfilter_window();
- Fl_Group *envADSRfilter;
- WidgetPDial *e3aval;
-private:
- void cb_e3aval_i(WidgetPDial*, void*);
- static void cb_e3aval(WidgetPDial*, void*);
-public:
- WidgetPDial *e3adt;
-private:
- void cb_e3adt_i(WidgetPDial*, void*);
- static void cb_e3adt(WidgetPDial*, void*);
-public:
- WidgetPDial *e3dval;
-private:
- void cb_e3dval_i(WidgetPDial*, void*);
- static void cb_e3dval(WidgetPDial*, void*);
-public:
- WidgetPDial *e3ddt;
-private:
- void cb_e3ddt_i(WidgetPDial*, void*);
- static void cb_e3ddt(WidgetPDial*, void*);
-public:
- WidgetPDial *e3rdt;
-private:
- void cb_e3rdt_i(WidgetPDial*, void*);
- static void cb_e3rdt(WidgetPDial*, void*);
-public:
- WidgetPDial *e3rval;
-private:
- void cb_e3rval_i(WidgetPDial*, void*);
- static void cb_e3rval(WidgetPDial*, void*);
-public:
- WidgetPDial *e3envstretch;
-private:
- void cb_e3envstretch_i(WidgetPDial*, void*);
- static void cb_e3envstretch(WidgetPDial*, void*);
-public:
- Fl_Check_Button *e3forcedrelease;
-private:
- void cb_e3forcedrelease_i(Fl_Check_Button*, void*);
- static void cb_e3forcedrelease(Fl_Check_Button*, void*);
- void cb_E2_i(Fl_Button*, void*);
- static void cb_E2(Fl_Button*, void*);
- void cb_C3_i(Fl_Button*, void*);
- static void cb_C3(Fl_Button*, void*);
- void cb_P3_i(Fl_Button*, void*);
- static void cb_P3(Fl_Button*, void*);
-public:
- Fl_Group* make_ASRbw_window();
- Fl_Group *envASRbw;
- WidgetPDial *e4aval;
-private:
- void cb_e4aval_i(WidgetPDial*, void*);
- static void cb_e4aval(WidgetPDial*, void*);
-public:
- WidgetPDial *e4adt;
-private:
- void cb_e4adt_i(WidgetPDial*, void*);
- static void cb_e4adt(WidgetPDial*, void*);
-public:
- WidgetPDial *e4rval;
-private:
- void cb_e4rval_i(WidgetPDial*, void*);
- static void cb_e4rval(WidgetPDial*, void*);
-public:
- WidgetPDial *e4rdt;
-private:
- void cb_e4rdt_i(WidgetPDial*, void*);
- static void cb_e4rdt(WidgetPDial*, void*);
-public:
- WidgetPDial *e4envstretch;
-private:
- void cb_e4envstretch_i(WidgetPDial*, void*);
- static void cb_e4envstretch(WidgetPDial*, void*);
-public:
- Fl_Check_Button *e4forcedrelease;
-private:
- void cb_e4forcedrelease_i(Fl_Check_Button*, void*);
- static void cb_e4forcedrelease(Fl_Check_Button*, void*);
- void cb_C4_i(Fl_Button*, void*);
- static void cb_C4(Fl_Button*, void*);
- void cb_P4_i(Fl_Button*, void*);
- static void cb_P4(Fl_Button*, void*);
- void cb_E3_i(Fl_Button*, void*);
- static void cb_E3(Fl_Button*, void*);
-public:
- Fl_Group* make_free_window();
- Fl_Group *envfree;
- Fl_Group *envfreegroup;
- EnvelopeFreeEdit *freeeditsmall;
-private:
- void cb_freeeditsmall_i(EnvelopeFreeEdit*, void*);
- static void cb_freeeditsmall(EnvelopeFreeEdit*, void*);
- void cb_E4_i(Fl_Button*, void*);
- static void cb_E4(Fl_Button*, void*);
- void cb_C5_i(Fl_Button*, void*);
- static void cb_C5(Fl_Button*, void*);
- void cb_P5_i(Fl_Button*, void*);
- static void cb_P5(Fl_Button*, void*);
-public:
- void init(EnvelopeParams *env_);
- void reinit();
- void refresh();
-private:
- EnvelopeParams *env;
- Fl_Group *envwindow;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/FilterUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/FilterUI.cpp
deleted file mode 100644
index 77f6c6213..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/FilterUI.cpp
+++ /dev/null
@@ -1,994 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/FilterUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-#include
-#include
-#include
-
-FormantFilterGraph::FormantFilterGraph(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- pars=NULL;
- nvowel=NULL;
- nformant=NULL;
- graphpoints=NULL;
-}
-
-void FormantFilterGraph::init(FilterParams *pars_,int *nvowel_,int *nformant_) {
- pars=pars_;
- nvowel=nvowel_;
- nformant=nformant_;
- oldx=-1;
- graphpoints=new float [w()];
-}
-
-void FormantFilterGraph::draw_freq_line(float freq,int type) {
- float freqx=pars->getfreqpos(freq);
- switch(type){
- case 0:fl_line_style(FL_SOLID);break;
- case 1:fl_line_style(FL_DOT);break;
- case 2:fl_line_style(FL_DASH);break;
- };
-
-
- if ((freqx>0.0)&&(freqx<1.0))
- fl_line(x()+(int) (freqx*w()),y(),
- x()+(int) (freqx*w()),y()+h());
-}
-
-void FormantFilterGraph::draw() {
- int maxdB=30;
- int ox=x(),oy=y(),lx=w(),ly=h(),i,oiy;
- float freqx;
-
- fl_color(FL_BLACK);
- fl_rectf(ox,oy,lx,ly);
-
-
- //draw the lines
- fl_color(FL_GRAY);
-
- fl_line_style(FL_SOLID);
- //fl_line(ox+2,oy+ly/2,ox+lx-2,oy+ly/2);
-
- freqx=pars->getfreqpos(1000.0);
- if ((freqx>0.0)&&(freqx<1.0))
- fl_line(ox+(int) (freqx*lx),oy,
- ox+(int) (freqx*lx),oy+ly);
-
- for (i=1;i<10;i++){
- if(i==1){
- draw_freq_line(i*100.0,0);
- draw_freq_line(i*1000.0,0);
- }else
- if (i==5){
- draw_freq_line(i*100.0,2);
- draw_freq_line(i*1000.0,2);
- }else{
- draw_freq_line(i*100.0,1);
- draw_freq_line(i*1000.0,1);
- };
- };
-
- draw_freq_line(10000.0,0);
- draw_freq_line(20000.0,1);
-
- fl_line_style(FL_DOT);
- int GY=10;if (lyPnumformants){
- draw_freq_line(pars->getformantfreq(pars->Pvowels[*nvowel].formants[*nformant].freq),2);
-
- //show some information (like current formant frequency,amplitude)
- char tmpstr[20];
-
- snprintf(tmpstr,20,"%.2f kHz",pars->getformantfreq(pars->Pvowels[*nvowel].formants[*nformant].freq)*0.001);
- fl_draw(tmpstr,ox+1,oy+1,40,12,FL_ALIGN_LEFT,NULL,0);
-
- snprintf(tmpstr,20,"%d dB",(int)( rap2dB(1e-9 + pars->getformantamp(pars->Pvowels[*nvowel].formants[*nformant].amp)) + pars->getgain() ));
- fl_draw(tmpstr,ox+1,oy+15,40,12,FL_ALIGN_LEFT,NULL,0);
-
- };
-
- //draw the data
-
- fl_color(FL_RED);
- 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=0)&&(oiy>=0)&&(iyPtype=(int)o->value();
-pars->changed=true;
-}
-void FilterUI::cb_analogfiltertypechoice(Fl_Choice* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_analogfiltertypechoice_i(o,v);
-}
-
-Fl_Menu_Item FilterUI::menu_analogfiltertypechoice[] = {
- {"LPF1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HPF1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LPF2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HPF2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"BPF2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"NF2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"PkF2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LSh2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HSh2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void FilterUI::cb_svfiltertypechoice_i(Fl_Choice* o, void*) {
- pars->Ptype=(int)o->value();
-pars->changed=true;
-}
-void FilterUI::cb_svfiltertypechoice(Fl_Choice* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_svfiltertypechoice_i(o,v);
-}
-
-Fl_Menu_Item FilterUI::menu_svfiltertypechoice[] = {
- {"1LPF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"1HPF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"1BPF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"1NF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void FilterUI::cb_filtertype_i(Fl_Choice* o, void*) {
- switchcategory((int)o->value());
-pars->changed=true;
-}
-void FilterUI::cb_filtertype(Fl_Choice* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_filtertype_i(o,v);
-}
-
-Fl_Menu_Item FilterUI::menu_filtertype[] = {
- {"Analog", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Formant", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"StVarF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void FilterUI::cb_cfreqdial_i(WidgetPDial* o, void*) {
- pars->Pfreq=(int)o->value();
-}
-void FilterUI::cb_cfreqdial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_cfreqdial_i(o,v);
-}
-
-void FilterUI::cb_qdial_i(WidgetPDial* o, void*) {
- pars->Pq=(int)o->value();
-formantfiltergraph->redraw();
-}
-void FilterUI::cb_qdial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_qdial_i(o,v);
-}
-
-void FilterUI::cb_freqtrdial_i(WidgetPDial* o, void*) {
- pars->Pfreqtrack=(int) o->value();
-}
-void FilterUI::cb_freqtrdial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_freqtrdial_i(o,v);
-}
-
-void FilterUI::cb_vsnsadial_i(WidgetPDial* o, void*) {
- if (velsnsamp!=NULL) *velsnsamp=(int)o->value();
-}
-void FilterUI::cb_vsnsadial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_vsnsadial_i(o,v);
-}
-
-void FilterUI::cb_vsnsdial_i(WidgetPDial* o, void*) {
- if (velsns!=NULL) *velsns=(int)o->value();
-}
-void FilterUI::cb_vsnsdial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_vsnsdial_i(o,v);
-}
-
-void FilterUI::cb_gaindial_i(WidgetPDial* o, void*) {
- pars->Pgain=(int)o->value();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_gaindial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_gaindial_i(o,v);
-}
-
-void FilterUI::cb_stcounter_i(Fl_Choice* o, void*) {
- pars->Pstages=(int)o->value();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_stcounter(Fl_Choice* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_stcounter_i(o,v);
-}
-
-void FilterUI::cb_editbutton_i(Fl_Button*, void*) {
- formantparswindow->show();
-}
-void FilterUI::cb_editbutton(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_editbutton_i(o,v);
-}
-
-void FilterUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(pars);
-}
-void FilterUI::cb_C(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void FilterUI::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(pars,this);
-}
-void FilterUI::cb_P(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void FilterUI::cb_Formant_i(Fl_Counter* o, void*) {
- nformant=(int) o->value();
-update_formant_window();
-formantfiltergraph->redraw();
-}
-void FilterUI::cb_Formant(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_Formant_i(o,v);
-}
-
-void FilterUI::cb_Vowel_i(Fl_Counter* o, void*) {
- nvowel=(int) o->value();
-update_formant_window();
-formantfiltergraph->redraw();
-}
-void FilterUI::cb_Vowel(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_Vowel_i(o,v);
-}
-
-void FilterUI::cb_formant_freq_dial_i(WidgetPDial* o, void*) {
- pars->Pvowels[nvowel].formants[nformant].freq=(int) o->value();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_formant_freq_dial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->parent()->user_data()))->cb_formant_freq_dial_i(o,v);
-}
-
-void FilterUI::cb_formant_q_dial_i(WidgetPDial* o, void*) {
- pars->Pvowels[nvowel].formants[nformant].q=(int) o->value();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_formant_q_dial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->parent()->user_data()))->cb_formant_q_dial_i(o,v);
-}
-
-void FilterUI::cb_formant_amp_dial_i(WidgetPDial* o, void*) {
- pars->Pvowels[nvowel].formants[nformant].amp=(int) o->value();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_formant_amp_dial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->parent()->user_data()))->cb_formant_amp_dial_i(o,v);
-}
-
-void FilterUI::cb_Seq_i(Fl_Counter* o, void*) {
- pars->Psequencesize=(int) o->value();
-update_formant_window();
-pars->changed=true;
-}
-void FilterUI::cb_Seq(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_Seq_i(o,v);
-}
-
-void FilterUI::cb_S_i(Fl_Counter* o, void*) {
- nseqpos=(int) o->value();
-update_formant_window();
-pars->changed=true;
-}
-void FilterUI::cb_S(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_S_i(o,v);
-}
-
-void FilterUI::cb_vowel_counter_i(Fl_Counter* o, void*) {
- pars->Psequence[nseqpos].nvowel=(int) o->value();
-pars->changed=true;
-}
-void FilterUI::cb_vowel_counter(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_vowel_counter_i(o,v);
-}
-
-void FilterUI::cb_Neg_i(Fl_Check_Button* o, void*) {
- pars->Psequencereversed=(int) o->value();
-pars->changed=true;
-}
-void FilterUI::cb_Neg(Fl_Check_Button* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_Neg_i(o,v);
-}
-
-void FilterUI::cb_strchdial_i(WidgetPDial* o, void*) {
- pars->Psequencestretch=(int) o->value();
-pars->changed=true;
-}
-void FilterUI::cb_strchdial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->parent()->user_data()))->cb_strchdial_i(o,v);
-}
-
-void FilterUI::cb_Num_i(Fl_Counter* o, void*) {
- pars->Pnumformants=(int) o->value();
-update_formant_window();
-pars->changed=true;
-formantfiltergraph->redraw();
-}
-void FilterUI::cb_Num(Fl_Counter* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_Num_i(o,v);
-}
-
-void FilterUI::cb_frsldial_i(WidgetPDial* o, void*) {
- pars->Pformantslowness=(int) o->value();
-pars->changed=true;
-}
-void FilterUI::cb_frsldial(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_frsldial_i(o,v);
-}
-
-void FilterUI::cb_centerfreqvo_i(Fl_Value_Output* o, void*) {
- o->value(pars->getcenterfreq()/1000.0);
-}
-void FilterUI::cb_centerfreqvo(Fl_Value_Output* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_centerfreqvo_i(o,v);
-}
-
-void FilterUI::cb_octavesfreqvo_i(Fl_Value_Output* o, void*) {
- o->value(pars->getoctavesfreq());
-}
-void FilterUI::cb_octavesfreqvo(Fl_Value_Output* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_octavesfreqvo_i(o,v);
-}
-
-void FilterUI::cb_cfknob_i(Fl_Slider* o, void*) {
- pars->Pcenterfreq=(int)o->value();
-centerfreqvo->do_callback();
-formantfiltergraph->redraw();
-pars->changed=true;
-}
-void FilterUI::cb_cfknob(Fl_Slider* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_cfknob_i(o,v);
-}
-
-void FilterUI::cb_octknob_i(Fl_Slider* o, void*) {
- pars->Poctavesfreq=(int)o->value();
-octavesfreqvo->do_callback();
-formantfiltergraph->redraw();
-}
-void FilterUI::cb_octknob(Fl_Slider* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_octknob_i(o,v);
-}
-
-void FilterUI::cb_wvknob_i(WidgetPDial* o, void*) {
- pars->Pvowelclearness=(int) o->value();
-pars->changed=true;
-}
-void FilterUI::cb_wvknob(WidgetPDial* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_wvknob_i(o,v);
-}
-
-void FilterUI::cb_Close_i(Fl_Button*, void*) {
- formantparswindow->hide();
-}
-void FilterUI::cb_Close(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void FilterUI::cb_C1_i(Fl_Button*, void*) {
- presetsui->copy(pars,nvowel);
-}
-void FilterUI::cb_C1(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_C1_i(o,v);
-}
-
-void FilterUI::cb_P1_i(Fl_Button*, void*) {
- presetsui->paste(pars,this,nvowel);
-}
-void FilterUI::cb_P1(Fl_Button* o, void* v) {
- ((FilterUI*)(o->parent()->user_data()))->cb_P1_i(o,v);
-}
-
-FilterUI::FilterUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- pars=NULL;
- velsnsamp=NULL;
- velsns=NULL;
- nvowel=0;nformant=0;nseqpos=0;
-}
-
-FilterUI::~FilterUI() {
- filterui->hide();
- formantparswindow->hide();
- hide();
- //delete (filterui);
- delete (formantparswindow);
-}
-
-Fl_Group* FilterUI::make_window() {
- { filterui = new Fl_Group(0, 0, 275, 70);
- filterui->box(FL_FLAT_BOX);
- filterui->color(FL_LIGHT1);
- filterui->selection_color(FL_BACKGROUND_COLOR);
- filterui->labeltype(FL_NO_LABEL);
- filterui->labelfont(1);
- filterui->labelsize(14);
- filterui->labelcolor(FL_FOREGROUND_COLOR);
- filterui->user_data((void*)(this));
- filterui->align(Fl_Align(FL_ALIGN_TOP));
- filterui->when(FL_WHEN_RELEASE);
- { Fl_Group* o = filterparamswindow = new Fl_Group(0, 0, 275, 75, "Filter Parameters");
- filterparamswindow->box(FL_UP_FRAME);
- filterparamswindow->color((Fl_Color)183);
- filterparamswindow->labeltype(FL_ENGRAVED_LABEL);
- filterparamswindow->labelsize(10);
- filterparamswindow->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { Fl_Choice* o = analogfiltertypechoice = new Fl_Choice(10, 50, 50, 15, "FilterType");
- analogfiltertypechoice->tooltip("The Filter type");
- analogfiltertypechoice->down_box(FL_BORDER_BOX);
- analogfiltertypechoice->labelsize(10);
- analogfiltertypechoice->textsize(10);
- analogfiltertypechoice->callback((Fl_Callback*)cb_analogfiltertypechoice);
- analogfiltertypechoice->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- analogfiltertypechoice->menu(menu_analogfiltertypechoice);
- o->value(pars->Ptype);
- } // Fl_Choice* analogfiltertypechoice
- { Fl_Choice* o = svfiltertypechoice = new Fl_Choice(10, 50, 50, 15, "FilterType");
- svfiltertypechoice->tooltip("The Filter type");
- svfiltertypechoice->down_box(FL_BORDER_BOX);
- svfiltertypechoice->labelsize(10);
- svfiltertypechoice->textsize(10);
- svfiltertypechoice->callback((Fl_Callback*)cb_svfiltertypechoice);
- svfiltertypechoice->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- svfiltertypechoice->menu(menu_svfiltertypechoice);
- o->value(pars->Ptype);
- } // Fl_Choice* svfiltertypechoice
- { Fl_Choice* o = filtertype = new Fl_Choice(10, 20, 60, 15, "Category");
- filtertype->tooltip("The Category of the Filter (Analog/Formantic/etc.)");
- filtertype->down_box(FL_BORDER_BOX);
- filtertype->labelsize(10);
- filtertype->textsize(10);
- filtertype->callback((Fl_Callback*)cb_filtertype);
- filtertype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- filtertype->menu(menu_filtertype);
- o->value(pars->Pcategory);
- } // Fl_Choice* filtertype
- { WidgetPDial* o = cfreqdial = new WidgetPDial(75, 25, 30, 30, "C.Freq");
- cfreqdial->tooltip("Center Frequency of the Filter or the base position in the vowel\'s sequence");
- cfreqdial->box(FL_ROUND_UP_BOX);
- cfreqdial->color(FL_BACKGROUND_COLOR);
- cfreqdial->selection_color(FL_INACTIVE_COLOR);
- cfreqdial->labeltype(FL_NORMAL_LABEL);
- cfreqdial->labelfont(0);
- cfreqdial->labelsize(10);
- cfreqdial->labelcolor(FL_FOREGROUND_COLOR);
- cfreqdial->maximum(127);
- cfreqdial->step(1);
- cfreqdial->callback((Fl_Callback*)cb_cfreqdial);
- cfreqdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- cfreqdial->when(FL_WHEN_CHANGED);
- o->value(pars->Pfreq);
- } // WidgetPDial* cfreqdial
- { WidgetPDial* o = qdial = new WidgetPDial(110, 25, 30, 30, "Q");
- qdial->tooltip("Filter resonance or bandwidth");
- qdial->box(FL_ROUND_UP_BOX);
- qdial->color(FL_BACKGROUND_COLOR);
- qdial->selection_color(FL_INACTIVE_COLOR);
- qdial->labeltype(FL_NORMAL_LABEL);
- qdial->labelfont(0);
- qdial->labelsize(10);
- qdial->labelcolor(FL_FOREGROUND_COLOR);
- qdial->maximum(127);
- qdial->step(1);
- qdial->callback((Fl_Callback*)cb_qdial);
- qdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- qdial->when(FL_WHEN_CHANGED);
- o->value(pars->Pq);
- } // WidgetPDial* qdial
- { WidgetPDial* o = freqtrdial = new WidgetPDial(215, 25, 30, 30, "freq.tr.");
- freqtrdial->tooltip("Filter frequency tracking (left is negative, middle is 0, and right is positi\
-ve)");
- freqtrdial->box(FL_ROUND_UP_BOX);
- freqtrdial->color(FL_BACKGROUND_COLOR);
- freqtrdial->selection_color(FL_INACTIVE_COLOR);
- freqtrdial->labeltype(FL_NORMAL_LABEL);
- freqtrdial->labelfont(0);
- freqtrdial->labelsize(10);
- freqtrdial->labelcolor(FL_FOREGROUND_COLOR);
- freqtrdial->maximum(127);
- freqtrdial->step(1);
- freqtrdial->callback((Fl_Callback*)cb_freqtrdial);
- freqtrdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- freqtrdial->when(FL_WHEN_CHANGED);
- o->value(pars->Pfreqtrack);
- } // WidgetPDial* freqtrdial
- { vsnsadial = new WidgetPDial(145, 25, 30, 30, "V.SnsA.");
- vsnsadial->tooltip("Velocity sensing amount of the Filter");
- vsnsadial->box(FL_ROUND_UP_BOX);
- vsnsadial->color(FL_BACKGROUND_COLOR);
- vsnsadial->selection_color(FL_INACTIVE_COLOR);
- vsnsadial->labeltype(FL_NORMAL_LABEL);
- vsnsadial->labelfont(0);
- vsnsadial->labelsize(10);
- vsnsadial->labelcolor(FL_FOREGROUND_COLOR);
- vsnsadial->maximum(127);
- vsnsadial->step(1);
- vsnsadial->callback((Fl_Callback*)cb_vsnsadial);
- vsnsadial->align(Fl_Align(FL_ALIGN_BOTTOM));
- vsnsadial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* vsnsadial
- { vsnsdial = new WidgetPDial(180, 25, 30, 30, "V.Sns.");
- vsnsdial->tooltip("Velocity Sensing Function of the Filter");
- vsnsdial->box(FL_ROUND_UP_BOX);
- vsnsdial->color(FL_BACKGROUND_COLOR);
- vsnsdial->selection_color(FL_INACTIVE_COLOR);
- vsnsdial->labeltype(FL_NORMAL_LABEL);
- vsnsdial->labelfont(0);
- vsnsdial->labelsize(10);
- vsnsdial->labelcolor(FL_FOREGROUND_COLOR);
- vsnsdial->maximum(127);
- vsnsdial->step(1);
- vsnsdial->callback((Fl_Callback*)cb_vsnsdial);
- vsnsdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- vsnsdial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* vsnsdial
- { WidgetPDial* o = gaindial = new WidgetPDial(250, 35, 20, 20, "gain");
- gaindial->tooltip("Filter output gain/damp");
- gaindial->box(FL_ROUND_UP_BOX);
- gaindial->color(FL_BACKGROUND_COLOR);
- gaindial->selection_color(FL_INACTIVE_COLOR);
- gaindial->labeltype(FL_NORMAL_LABEL);
- gaindial->labelfont(0);
- gaindial->labelsize(10);
- gaindial->labelcolor(FL_FOREGROUND_COLOR);
- gaindial->maximum(127);
- gaindial->step(1);
- gaindial->callback((Fl_Callback*)cb_gaindial);
- gaindial->align(Fl_Align(FL_ALIGN_BOTTOM));
- gaindial->when(FL_WHEN_CHANGED);
- o->value(pars->Pgain);
- } // WidgetPDial* gaindial
- { Fl_Choice* o = stcounter = new Fl_Choice(235, 5, 35, 15, "St");
- stcounter->tooltip("Filter stages (in order to increase dB/oct. value and the order of the filter\
-)");
- stcounter->down_box(FL_BORDER_BOX);
- stcounter->labelsize(10);
- stcounter->textfont(1);
- stcounter->textsize(10);
- stcounter->callback((Fl_Callback*)cb_stcounter);
- for (int i=0;iadd(tmp);};
- o->value(pars->Pstages);
- } // Fl_Choice* stcounter
- set_module_parameters( o );
- filterparamswindow->end();
- } // Fl_Group* filterparamswindow
- { editbutton = new Fl_Button(15, 40, 50, 25, "Edit");
- editbutton->labelfont(1);
- editbutton->labelsize(11);
- editbutton->callback((Fl_Callback*)cb_editbutton);
- } // Fl_Button* editbutton
- { Fl_Button* o = new Fl_Button(186, 5, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(203, 5, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- filterui->end();
- } // Fl_Group* filterui
- return filterui;
-}
-
-Fl_Double_Window* FilterUI::make_formant_window() {
- { formantparswindow = new Fl_Double_Window(700, 205, "Formant Filter Parameters");
- formantparswindow->user_data((void*)(this));
- { Fl_Group* o = new Fl_Group(485, 47, 105, 113);
- o->box(FL_THIN_UP_BOX);
- { Fl_Counter* o = new Fl_Counter(545, 80, 40, 15, "Formant ");
- o->type(1);
- o->labelfont(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Formant);
- o->align(Fl_Align(FL_ALIGN_LEFT));
- o->bounds(0,FF_MAX_FORMANTS-1);
- o->value(nformant);
- } // Fl_Counter* o
- { Fl_Counter* o = new Fl_Counter(545, 55, 40, 20, "Vowel no.");
- o->type(1);
- o->labelfont(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Vowel);
- o->align(Fl_Align(FL_ALIGN_LEFT));
- o->bounds(0,FF_MAX_VOWELS-1);
- o->value(nvowel);
- } // Fl_Counter* o
- { formantparsgroup = new Fl_Group(490, 105, 95, 50);
- formantparsgroup->box(FL_ENGRAVED_FRAME);
- { formant_freq_dial = new WidgetPDial(495, 115, 25, 25, "freq");
- formant_freq_dial->tooltip("Formant frequency");
- formant_freq_dial->box(FL_ROUND_UP_BOX);
- formant_freq_dial->color(FL_BACKGROUND_COLOR);
- formant_freq_dial->selection_color(FL_INACTIVE_COLOR);
- formant_freq_dial->labeltype(FL_NORMAL_LABEL);
- formant_freq_dial->labelfont(0);
- formant_freq_dial->labelsize(10);
- formant_freq_dial->labelcolor(FL_FOREGROUND_COLOR);
- formant_freq_dial->maximum(127);
- formant_freq_dial->step(1);
- formant_freq_dial->callback((Fl_Callback*)cb_formant_freq_dial);
- formant_freq_dial->align(Fl_Align(FL_ALIGN_BOTTOM));
- formant_freq_dial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* formant_freq_dial
- { formant_q_dial = new WidgetPDial(525, 115, 24, 25, "Q");
- formant_q_dial->tooltip("Formant\'s Q");
- formant_q_dial->box(FL_ROUND_UP_BOX);
- formant_q_dial->color(FL_BACKGROUND_COLOR);
- formant_q_dial->selection_color(FL_INACTIVE_COLOR);
- formant_q_dial->labeltype(FL_NORMAL_LABEL);
- formant_q_dial->labelfont(0);
- formant_q_dial->labelsize(10);
- formant_q_dial->labelcolor(FL_FOREGROUND_COLOR);
- formant_q_dial->maximum(127);
- formant_q_dial->step(1);
- formant_q_dial->callback((Fl_Callback*)cb_formant_q_dial);
- formant_q_dial->align(Fl_Align(FL_ALIGN_BOTTOM));
- formant_q_dial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* formant_q_dial
- { formant_amp_dial = new WidgetPDial(555, 115, 24, 25, "amp");
- formant_amp_dial->tooltip("Formant amplitude");
- formant_amp_dial->box(FL_ROUND_UP_BOX);
- formant_amp_dial->color(FL_BACKGROUND_COLOR);
- formant_amp_dial->selection_color(FL_INACTIVE_COLOR);
- formant_amp_dial->labeltype(FL_NORMAL_LABEL);
- formant_amp_dial->labelfont(0);
- formant_amp_dial->labelsize(10);
- formant_amp_dial->labelcolor(FL_FOREGROUND_COLOR);
- formant_amp_dial->maximum(127);
- formant_amp_dial->step(1);
- formant_amp_dial->callback((Fl_Callback*)cb_formant_amp_dial);
- formant_amp_dial->align(Fl_Align(FL_ALIGN_BOTTOM));
- formant_amp_dial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* formant_amp_dial
- formantparsgroup->end();
- } // Fl_Group* formantparsgroup
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(590, 47, 100, 113);
- o->box(FL_THIN_UP_BOX);
- { Fl_Counter* o = new Fl_Counter(595, 62, 55, 20, "Seq.Size");
- o->type(1);
- o->labelfont(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Seq);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->bounds(1,FF_MAX_SEQUENCE-1);
- o->value(pars->Psequencesize);
- } // Fl_Counter* o
- { Fl_Counter* o = new Fl_Counter(595, 97, 40, 15, "S.Pos.");
- o->tooltip("Current position from the sequence");
- o->type(1);
- o->labelfont(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_S);
- o->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
- o->bounds(0,FF_MAX_SEQUENCE-2);
- o->value(nseqpos);
- } // Fl_Counter* o
- { Fl_Counter* o = vowel_counter = new Fl_Counter(640, 97, 40, 15, "Vowel");
- vowel_counter->type(1);
- vowel_counter->labelsize(10);
- vowel_counter->minimum(0);
- vowel_counter->maximum(127);
- vowel_counter->step(1);
- vowel_counter->textsize(10);
- vowel_counter->callback((Fl_Callback*)cb_vowel_counter);
- vowel_counter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(0,FF_MAX_VOWELS-1);
- } // Fl_Counter* vowel_counter
- { Fl_Check_Button* o = new Fl_Check_Button(625, 132, 60, 20, "Neg.Input");
- o->tooltip("Negate the input from LFO/envelopes/etc.");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Neg);
- o->value(pars->Psequencereversed);
- } // Fl_Check_Button* o
- { WidgetPDial* o = strchdial = new WidgetPDial(595, 130, 25, 25, "Strch");
- strchdial->tooltip("Sequence Stretch");
- strchdial->box(FL_ROUND_UP_BOX);
- strchdial->color(FL_BACKGROUND_COLOR);
- strchdial->selection_color(FL_INACTIVE_COLOR);
- strchdial->labeltype(FL_NORMAL_LABEL);
- strchdial->labelfont(0);
- strchdial->labelsize(10);
- strchdial->labelcolor(FL_FOREGROUND_COLOR);
- strchdial->maximum(127);
- strchdial->step(1);
- strchdial->callback((Fl_Callback*)cb_strchdial);
- strchdial->align(Fl_Align(FL_ALIGN_TOP));
- strchdial->when(FL_WHEN_CHANGED);
- o->value(pars->Psequencestretch);
- } // WidgetPDial* strchdial
- o->end();
- } // Fl_Group* o
- { Fl_Counter* o = new Fl_Counter(485, 15, 65, 20, "Num.Formants");
- o->type(1);
- o->labelfont(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Num);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->bounds(1,FF_MAX_FORMANTS);
- o->value(pars->Pnumformants);
- } // Fl_Counter* o
- { WidgetPDial* o = frsldial = new WidgetPDial(565, 15, 25, 25, "Fr.Sl.");
- frsldial->tooltip("Formant\'s Slowness (Morphing)");
- frsldial->box(FL_ROUND_UP_BOX);
- frsldial->color(FL_BACKGROUND_COLOR);
- frsldial->selection_color(FL_INACTIVE_COLOR);
- frsldial->labeltype(FL_NORMAL_LABEL);
- frsldial->labelfont(1);
- frsldial->labelsize(10);
- frsldial->labelcolor(FL_FOREGROUND_COLOR);
- frsldial->maximum(127);
- frsldial->step(1);
- frsldial->callback((Fl_Callback*)cb_frsldial);
- frsldial->align(Fl_Align(FL_ALIGN_TOP));
- frsldial->when(FL_WHEN_CHANGED);
- o->value(pars->Pformantslowness);
- } // WidgetPDial* frsldial
- { Fl_Value_Output* o = centerfreqvo = new Fl_Value_Output(515, 164, 33, 18, "C.f.");
- centerfreqvo->tooltip("Center Frequency (kHz)");
- centerfreqvo->minimum(1);
- centerfreqvo->maximum(10);
- centerfreqvo->step(0.01);
- centerfreqvo->value(1);
- centerfreqvo->textfont(1);
- centerfreqvo->callback((Fl_Callback*)cb_centerfreqvo);
- centerfreqvo->when(3);
- o->value(pars->getcenterfreq()/1000.0);
- } // Fl_Value_Output* centerfreqvo
- { Fl_Value_Output* o = octavesfreqvo = new Fl_Value_Output(515, 182, 33, 18, "Oct.");
- octavesfreqvo->tooltip("No. of octaves");
- octavesfreqvo->minimum(1);
- octavesfreqvo->maximum(127);
- octavesfreqvo->step(1);
- octavesfreqvo->value(5);
- octavesfreqvo->textfont(1);
- octavesfreqvo->callback((Fl_Callback*)cb_octavesfreqvo);
- octavesfreqvo->when(3);
- o->value(pars->getoctavesfreq());
- } // Fl_Value_Output* octavesfreqvo
- { Fl_Slider* o = cfknob = new Fl_Slider(551, 167, 84, 15);
- cfknob->type(5);
- cfknob->box(FL_FLAT_BOX);
- cfknob->maximum(127);
- cfknob->callback((Fl_Callback*)cb_cfknob);
- o->value(pars->Pcenterfreq);
- } // Fl_Slider* cfknob
- { Fl_Slider* o = octknob = new Fl_Slider(551, 185, 84, 15);
- octknob->type(5);
- octknob->box(FL_FLAT_BOX);
- octknob->maximum(127);
- octknob->callback((Fl_Callback*)cb_octknob);
- o->value(pars->Poctavesfreq);
- } // Fl_Slider* octknob
- { FormantFilterGraph* o = formantfiltergraph = new FormantFilterGraph(5, 5, 475, 195);
- formantfiltergraph->box(FL_BORDER_BOX);
- formantfiltergraph->color(FL_BACKGROUND_COLOR);
- formantfiltergraph->selection_color(FL_BACKGROUND_COLOR);
- formantfiltergraph->labeltype(FL_NORMAL_LABEL);
- formantfiltergraph->labelfont(0);
- formantfiltergraph->labelsize(14);
- formantfiltergraph->labelcolor(FL_FOREGROUND_COLOR);
- formantfiltergraph->align(Fl_Align(FL_ALIGN_CENTER));
- formantfiltergraph->when(FL_WHEN_RELEASE);
- o->init(pars,&nvowel,&nformant);
- } // FormantFilterGraph* formantfiltergraph
- { WidgetPDial* o = wvknob = new WidgetPDial(600, 15, 25, 25, "Vw.Cl.");
- wvknob->tooltip("Vowel \"clearness\" (how the mixed vowels are avoided)");
- wvknob->box(FL_ROUND_UP_BOX);
- wvknob->color(FL_BACKGROUND_COLOR);
- wvknob->selection_color(FL_INACTIVE_COLOR);
- wvknob->labeltype(FL_NORMAL_LABEL);
- wvknob->labelfont(1);
- wvknob->labelsize(10);
- wvknob->labelcolor(FL_FOREGROUND_COLOR);
- wvknob->maximum(127);
- wvknob->step(1);
- wvknob->callback((Fl_Callback*)cb_wvknob);
- wvknob->align(Fl_Align(FL_ALIGN_TOP));
- wvknob->when(FL_WHEN_CHANGED);
- o->value(pars->Pvowelclearness);
- } // WidgetPDial* wvknob
- { Fl_Button* o = new Fl_Button(645, 180, 50, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(635, 25, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(665, 25, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P1);
- } // Fl_Button* o
- { new Fl_Box(635, 10, 55, 15, "Vowel");
- } // Fl_Box* o
- formantparswindow->end();
- } // Fl_Double_Window* formantparswindow
- return formantparswindow;
-}
-
-void FilterUI::update_formant_window() {
- 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);
- if (nformantPnumformants) formantparsgroup->activate();
- else formantparsgroup->deactivate();
-
- if (nseqposPsequencesize) vowel_counter->activate();
- else vowel_counter->deactivate();
-
-
- vowel_counter->value(pars->Psequence[nseqpos].nvowel);
-}
-
-void FilterUI::refresh() {
- update_formant_window();
- formantfiltergraph->redraw();
-
- if (pars->Pcategory==0) svfiltertypechoice->value(pars->Ptype);
- if (pars->Pcategory==2) analogfiltertypechoice->value(pars->Ptype);
-
- filtertype->value(pars->Pcategory);
-
- cfreqdial->value(pars->Pfreq);
- qdial->value(pars->Pq);
-
- freqtrdial->value(pars->Pfreqtrack);
- gaindial->value(pars->Pgain);
-
- stcounter->value(pars->Pstages);
-
- int categ=pars->Pcategory;
- if ((categ==0)||(categ==2)) {
- if (categ==0) {
- analogfiltertypechoice->show();
- svfiltertypechoice->hide();
- } else {
- svfiltertypechoice->show();
- analogfiltertypechoice->hide();
- };
- editbutton->hide();
- formantparswindow->hide();
- cfreqdial->label("C.freq");
- } else {
- analogfiltertypechoice->hide();
- svfiltertypechoice->hide();
- editbutton->show();
- cfreqdial->label("BS.pos");
- };
-
- filterparamswindow->redraw();
-}
-
-void FilterUI::init(FilterParams *filterpars_,unsigned char *velsnsamp_,unsigned char *velsns_) {
- pars=filterpars_;
- velsnsamp=velsnsamp_;
- velsns=velsns_;
-
- make_window();
- end();
- make_formant_window();
-
-
- filterui->resize(this->x(),this->y(),this->w(),this->h());
-
-
- if (velsnsamp==NULL){
- vsnsadial->deactivate();
- vsnsadial->value(127);
- } else vsnsadial->value(*velsnsamp);
-
- if (velsns==NULL){
- vsnsdial->deactivate();
- vsnsdial->value(127);
- } else vsnsdial->value(*velsns);
-
- switchcategory(pars->Pcategory);
-
-
- formantparswindow->label(this->label());
-
- update_formant_window();
-}
-
-void FilterUI::switchcategory(int newcat) {
- if (pars->Pcategory!=newcat){
- pars->Pgain=64;
- gaindial->value(64);
- analogfiltertypechoice->value(0);
- analogfiltertypechoice->do_callback();
- svfiltertypechoice->value(0);
- svfiltertypechoice->do_callback();
- };
- pars->Pcategory=newcat;
-
- refresh();
-}
-
-void FilterUI::use_for_dynamic_filter() {
- freqtrdial->deactivate();
- gaindial->when(0);
-
- cfknob->when(FL_WHEN_RELEASE);
- octknob->when(FL_WHEN_RELEASE);
-
- frsldial->when(0);
- wvknob->when(0);
- formant_freq_dial->when(0);
- formant_q_dial->when(0);
- formant_amp_dial->when(0);
- strchdial->when(0);
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/FilterUI.h b/source/modules/carla_native/zynaddsubfx/UI/FilterUI.h
deleted file mode 100644
index 8349e8905..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/FilterUI.h
+++ /dev/null
@@ -1,197 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef FilterUI_h
-#define FilterUI_h
-#include
-#include "WidgetPDial.h"
-#include "../globals.h"
-#include
-#include "../Params/FilterParams.h"
-#include
-#include
-#include
-#include "PresetsUI.h"
-#include "common.H"
-
-class FormantFilterGraph : public Fl_Box {
-public:
- FormantFilterGraph(int x,int y, int w, int h, const char *label=0);
- void init(FilterParams *pars_,int *nvowel_,int *nformant_);
- void draw_freq_line(float freq,int type);
- void draw();
- ~FormantFilterGraph();
-private:
- FilterParams *pars;
- int oldx,oldy;
- int *nvowel,*nformant;
- float *graphpoints;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class FilterUI : public Fl_Group,PresetsUI_ {
-public:
- FilterUI(int x,int y, int w, int h, const char *label=0);
- ~FilterUI();
- Fl_Group* make_window();
- Fl_Group *filterui;
- Fl_Group *filterparamswindow;
- Fl_Choice *analogfiltertypechoice;
-private:
- void cb_analogfiltertypechoice_i(Fl_Choice*, void*);
- static void cb_analogfiltertypechoice(Fl_Choice*, void*);
- static Fl_Menu_Item menu_analogfiltertypechoice[];
-public:
- Fl_Choice *svfiltertypechoice;
-private:
- void cb_svfiltertypechoice_i(Fl_Choice*, void*);
- static void cb_svfiltertypechoice(Fl_Choice*, void*);
- static Fl_Menu_Item menu_svfiltertypechoice[];
-public:
- Fl_Choice *filtertype;
-private:
- void cb_filtertype_i(Fl_Choice*, void*);
- static void cb_filtertype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_filtertype[];
-public:
- WidgetPDial *cfreqdial;
-private:
- void cb_cfreqdial_i(WidgetPDial*, void*);
- static void cb_cfreqdial(WidgetPDial*, void*);
-public:
- WidgetPDial *qdial;
-private:
- void cb_qdial_i(WidgetPDial*, void*);
- static void cb_qdial(WidgetPDial*, void*);
-public:
- WidgetPDial *freqtrdial;
-private:
- void cb_freqtrdial_i(WidgetPDial*, void*);
- static void cb_freqtrdial(WidgetPDial*, void*);
-public:
- WidgetPDial *vsnsadial;
-private:
- void cb_vsnsadial_i(WidgetPDial*, void*);
- static void cb_vsnsadial(WidgetPDial*, void*);
-public:
- WidgetPDial *vsnsdial;
-private:
- void cb_vsnsdial_i(WidgetPDial*, void*);
- static void cb_vsnsdial(WidgetPDial*, void*);
-public:
- WidgetPDial *gaindial;
-private:
- void cb_gaindial_i(WidgetPDial*, void*);
- static void cb_gaindial(WidgetPDial*, void*);
-public:
- Fl_Choice *stcounter;
-private:
- void cb_stcounter_i(Fl_Choice*, void*);
- static void cb_stcounter(Fl_Choice*, void*);
-public:
- Fl_Button *editbutton;
-private:
- void cb_editbutton_i(Fl_Button*, void*);
- static void cb_editbutton(Fl_Button*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- Fl_Double_Window* make_formant_window();
- Fl_Double_Window *formantparswindow;
-private:
- void cb_Formant_i(Fl_Counter*, void*);
- static void cb_Formant(Fl_Counter*, void*);
- void cb_Vowel_i(Fl_Counter*, void*);
- static void cb_Vowel(Fl_Counter*, void*);
-public:
- Fl_Group *formantparsgroup;
- WidgetPDial *formant_freq_dial;
-private:
- void cb_formant_freq_dial_i(WidgetPDial*, void*);
- static void cb_formant_freq_dial(WidgetPDial*, void*);
-public:
- WidgetPDial *formant_q_dial;
-private:
- void cb_formant_q_dial_i(WidgetPDial*, void*);
- static void cb_formant_q_dial(WidgetPDial*, void*);
-public:
- WidgetPDial *formant_amp_dial;
-private:
- void cb_formant_amp_dial_i(WidgetPDial*, void*);
- static void cb_formant_amp_dial(WidgetPDial*, void*);
- void cb_Seq_i(Fl_Counter*, void*);
- static void cb_Seq(Fl_Counter*, void*);
- void cb_S_i(Fl_Counter*, void*);
- static void cb_S(Fl_Counter*, void*);
-public:
- Fl_Counter *vowel_counter;
-private:
- void cb_vowel_counter_i(Fl_Counter*, void*);
- static void cb_vowel_counter(Fl_Counter*, void*);
- void cb_Neg_i(Fl_Check_Button*, void*);
- static void cb_Neg(Fl_Check_Button*, void*);
-public:
- WidgetPDial *strchdial;
-private:
- void cb_strchdial_i(WidgetPDial*, void*);
- static void cb_strchdial(WidgetPDial*, void*);
- void cb_Num_i(Fl_Counter*, void*);
- static void cb_Num(Fl_Counter*, void*);
-public:
- WidgetPDial *frsldial;
-private:
- void cb_frsldial_i(WidgetPDial*, void*);
- static void cb_frsldial(WidgetPDial*, void*);
-public:
- Fl_Value_Output *centerfreqvo;
-private:
- void cb_centerfreqvo_i(Fl_Value_Output*, void*);
- static void cb_centerfreqvo(Fl_Value_Output*, void*);
-public:
- Fl_Value_Output *octavesfreqvo;
-private:
- void cb_octavesfreqvo_i(Fl_Value_Output*, void*);
- static void cb_octavesfreqvo(Fl_Value_Output*, void*);
-public:
- Fl_Slider *cfknob;
-private:
- void cb_cfknob_i(Fl_Slider*, void*);
- static void cb_cfknob(Fl_Slider*, void*);
-public:
- Fl_Slider *octknob;
-private:
- void cb_octknob_i(Fl_Slider*, void*);
- static void cb_octknob(Fl_Slider*, void*);
-public:
- FormantFilterGraph *formantfiltergraph;
- WidgetPDial *wvknob;
-private:
- void cb_wvknob_i(WidgetPDial*, void*);
- static void cb_wvknob(WidgetPDial*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
- void cb_C1_i(Fl_Button*, void*);
- static void cb_C1(Fl_Button*, void*);
- void cb_P1_i(Fl_Button*, void*);
- static void cb_P1(Fl_Button*, void*);
-public:
- void update_formant_window();
- void refresh();
- void init(FilterParams *filterpars_,unsigned char *velsnsamp_,unsigned char *velsns_);
- void switchcategory(int newcat);
- void use_for_dynamic_filter();
-private:
- FilterParams *pars;
- unsigned char *velsnsamp,*velsns;
- int nvowel,nformant,nseqpos;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/LFOUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/LFOUI.cpp
deleted file mode 100644
index 5a86757f3..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/LFOUI.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/LFOUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-void LFOUI::cb_freq_i(WidgetPDial* o, void*) {
- pars->Pfreq=o->value();
-}
-void LFOUI::cb_freq(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_freq_i(o,v);
-}
-
-void LFOUI::cb_intensity_i(WidgetPDial* o, void*) {
- pars->Pintensity=(int)o->value();
-}
-void LFOUI::cb_intensity(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_intensity_i(o,v);
-}
-
-void LFOUI::cb_delay_i(WidgetPDial* o, void*) {
- pars->Pdelay=(int)o->value();
-}
-void LFOUI::cb_delay(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_delay_i(o,v);
-}
-
-void LFOUI::cb_startphase_i(WidgetPDial* o, void*) {
- pars->Pstartphase=(int)o->value();
-}
-void LFOUI::cb_startphase(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_startphase_i(o,v);
-}
-
-void LFOUI::cb_randomness_i(WidgetPDial* o, void*) {
- pars->Prandomness=(int)o->value();
-}
-void LFOUI::cb_randomness(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_randomness_i(o,v);
-}
-
-void LFOUI::cb_LFOtype_i(Fl_Choice* o, void*) {
- pars->PLFOtype=(int)o->value();
-}
-void LFOUI::cb_LFOtype(Fl_Choice* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_LFOtype_i(o,v);
-}
-
-Fl_Menu_Item LFOUI::menu_LFOtype[] = {
- {"SINE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"TRI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"SQR", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"R.up", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"R.dn", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"E1dn", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"E2dn", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void LFOUI::cb_continous_i(Fl_Check_Button* o, void*) {
- pars->Pcontinous=(int)o->value();
-}
-void LFOUI::cb_continous(Fl_Check_Button* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_continous_i(o,v);
-}
-
-void LFOUI::cb_freqrand_i(WidgetPDial* o, void*) {
- pars->Pfreqrand=(int)o->value();
-}
-void LFOUI::cb_freqrand(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_freqrand_i(o,v);
-}
-
-void LFOUI::cb_stretch_i(WidgetPDial* o, void*) {
- pars->Pstretch=(int)o->value();
-}
-void LFOUI::cb_stretch(WidgetPDial* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_stretch_i(o,v);
-}
-
-void LFOUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(pars);
-}
-void LFOUI::cb_C(Fl_Button* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void LFOUI::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(pars,this);
-}
-void LFOUI::cb_P(Fl_Button* o, void* v) {
- ((LFOUI*)(o->parent()->parent()->user_data()))->cb_P_i(o,v);
-}
-
-LFOUI::LFOUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- pars=NULL;
-}
-
-LFOUI::~LFOUI() {
- lfoui->hide();
- hide();
- //delete (lfoui);
-}
-
-Fl_Group* LFOUI::make_window() {
- { lfoui = new Fl_Group(0, 0, 230, 70);
- lfoui->box(FL_FLAT_BOX);
- lfoui->color(FL_LIGHT1);
- lfoui->selection_color(FL_BACKGROUND_COLOR);
- lfoui->labeltype(FL_NO_LABEL);
- lfoui->labelfont(1);
- lfoui->labelsize(14);
- lfoui->labelcolor(FL_FOREGROUND_COLOR);
- lfoui->user_data((void*)(this));
- lfoui->align(Fl_Align(FL_ALIGN_TOP));
- lfoui->when(FL_WHEN_RELEASE);
- { Fl_Group* o = lfoparamswindow = new Fl_Group(0, 0, 230, 70, "LFO");
- lfoparamswindow->box(FL_UP_BOX);
- lfoparamswindow->color(FL_CYAN);
- lfoparamswindow->labeltype(FL_ENGRAVED_LABEL);
- lfoparamswindow->labelsize(10);
- lfoparamswindow->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { freq = new WidgetPDial(5, 20, 30, 30, "Freq.");
- freq->tooltip("LFO Frequency");
- freq->box(FL_ROUND_UP_BOX);
- freq->color(FL_BACKGROUND_COLOR);
- freq->selection_color(FL_INACTIVE_COLOR);
- freq->labeltype(FL_NORMAL_LABEL);
- freq->labelfont(0);
- freq->labelsize(10);
- freq->labelcolor(FL_FOREGROUND_COLOR);
- freq->step(1e-05);
- freq->callback((Fl_Callback*)cb_freq);
- freq->align(Fl_Align(FL_ALIGN_BOTTOM));
- freq->when(FL_WHEN_CHANGED);
- } // WidgetPDial* freq
- { intensity = new WidgetPDial(40, 20, 30, 30, "Depth");
- intensity->tooltip("LFO Amount");
- intensity->box(FL_ROUND_UP_BOX);
- intensity->color(FL_BACKGROUND_COLOR);
- intensity->selection_color(FL_INACTIVE_COLOR);
- intensity->labeltype(FL_NORMAL_LABEL);
- intensity->labelfont(0);
- intensity->labelsize(10);
- intensity->labelcolor(FL_FOREGROUND_COLOR);
- intensity->maximum(127);
- intensity->step(1);
- intensity->callback((Fl_Callback*)cb_intensity);
- intensity->align(Fl_Align(FL_ALIGN_BOTTOM));
- intensity->when(FL_WHEN_CHANGED);
- } // WidgetPDial* intensity
- { delay = new WidgetPDial(110, 20, 30, 30, "Delay");
- delay->tooltip("LFO delay");
- delay->box(FL_ROUND_UP_BOX);
- delay->color(FL_BACKGROUND_COLOR);
- delay->selection_color(FL_INACTIVE_COLOR);
- delay->labeltype(FL_NORMAL_LABEL);
- delay->labelfont(0);
- delay->labelsize(10);
- delay->labelcolor(FL_FOREGROUND_COLOR);
- delay->maximum(127);
- delay->step(1);
- delay->callback((Fl_Callback*)cb_delay);
- delay->align(Fl_Align(FL_ALIGN_BOTTOM));
- delay->when(FL_WHEN_CHANGED);
- } // WidgetPDial* delay
- { startphase = new WidgetPDial(75, 20, 30, 30, "Start");
- startphase->tooltip("LFO Startphase (leftmost is Random)");
- startphase->box(FL_ROUND_UP_BOX);
- startphase->color(FL_BACKGROUND_COLOR);
- startphase->selection_color(FL_INACTIVE_COLOR);
- startphase->labeltype(FL_NORMAL_LABEL);
- startphase->labelfont(0);
- startphase->labelsize(10);
- startphase->labelcolor(FL_FOREGROUND_COLOR);
- startphase->maximum(127);
- startphase->step(1);
- startphase->callback((Fl_Callback*)cb_startphase);
- startphase->align(Fl_Align(FL_ALIGN_BOTTOM));
- startphase->when(FL_WHEN_CHANGED);
- } // WidgetPDial* startphase
- { randomness = new WidgetPDial(180, 7, 20, 20, "A.R.");
- randomness->tooltip("LFO Amplitude Randomness");
- randomness->box(FL_ROUND_UP_BOX);
- randomness->color(FL_BACKGROUND_COLOR);
- randomness->selection_color(FL_INACTIVE_COLOR);
- randomness->labeltype(FL_NORMAL_LABEL);
- randomness->labelfont(0);
- randomness->labelsize(10);
- randomness->labelcolor(FL_FOREGROUND_COLOR);
- randomness->maximum(127);
- randomness->step(1);
- randomness->callback((Fl_Callback*)cb_randomness);
- randomness->align(Fl_Align(FL_ALIGN_BOTTOM));
- randomness->when(FL_WHEN_CHANGED);
- } // WidgetPDial* randomness
- { LFOtype = new Fl_Choice(180, 40, 45, 15, "Type");
- LFOtype->tooltip("LFO function");
- LFOtype->down_box(FL_BORDER_BOX);
- LFOtype->labelsize(10);
- LFOtype->textsize(8);
- LFOtype->callback((Fl_Callback*)cb_LFOtype);
- LFOtype->align(Fl_Align(FL_ALIGN_BOTTOM));
- LFOtype->menu(menu_LFOtype);
- } // Fl_Choice* LFOtype
- { continous = new Fl_Check_Button(165, 35, 15, 15, "C.");
- continous->tooltip("Continous LFO");
- continous->down_box(FL_DOWN_BOX);
- continous->labelsize(10);
- continous->callback((Fl_Callback*)cb_continous);
- continous->align(Fl_Align(FL_ALIGN_BOTTOM));
- } // Fl_Check_Button* continous
- { freqrand = new WidgetPDial(205, 7, 20, 20, "F.R.");
- freqrand->tooltip("LFO Frequency Randomness");
- freqrand->box(FL_ROUND_UP_BOX);
- freqrand->color(FL_BACKGROUND_COLOR);
- freqrand->selection_color(FL_INACTIVE_COLOR);
- freqrand->labeltype(FL_NORMAL_LABEL);
- freqrand->labelfont(0);
- freqrand->labelsize(10);
- freqrand->labelcolor(FL_FOREGROUND_COLOR);
- freqrand->maximum(127);
- freqrand->step(1);
- freqrand->callback((Fl_Callback*)cb_freqrand);
- freqrand->align(Fl_Align(FL_ALIGN_BOTTOM));
- freqrand->when(FL_WHEN_CHANGED);
- } // WidgetPDial* freqrand
- { stretch = new WidgetPDial(144, 30, 20, 20, "Str.");
- stretch->tooltip("LFO stretch");
- stretch->box(FL_ROUND_UP_BOX);
- stretch->color(FL_BACKGROUND_COLOR);
- stretch->selection_color(FL_INACTIVE_COLOR);
- stretch->labeltype(FL_NORMAL_LABEL);
- stretch->labelfont(0);
- stretch->labelsize(10);
- stretch->labelcolor(FL_FOREGROUND_COLOR);
- stretch->maximum(127);
- stretch->step(1);
- stretch->callback((Fl_Callback*)cb_stretch);
- stretch->align(Fl_Align(FL_ALIGN_BOTTOM));
- stretch->when(FL_WHEN_CHANGED);
- } // WidgetPDial* stretch
- { Fl_Button* o = new Fl_Button(145, 10, 15, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(162, 10, 15, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- set_module_parameters(o);
- lfoparamswindow->end();
- } // Fl_Group* lfoparamswindow
- lfoui->end();
- } // Fl_Group* lfoui
- return lfoui;
-}
-
-void LFOUI::refresh() {
- freq->value(pars->Pfreq);
- intensity->value(pars->Pintensity);
- startphase->value(pars->Pstartphase);
- delay->value(pars->Pdelay);
- continous->value(pars->Pcontinous);
- stretch->value(pars->Pstretch);
- randomness->value(pars->Prandomness);
- freqrand->value(pars->Pfreqrand);
- LFOtype->value(pars->PLFOtype);
-}
-
-void LFOUI::init(LFOParams *lfopars_) {
- pars=lfopars_;
-
- make_window();
- end();
-
- refresh();
-
- lfoui->resize(this->x(),this->y(),this->w(),this->h());
-
- lfoparamswindow->label(this->label());
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/LFOUI.h b/source/modules/carla_native/zynaddsubfx/UI/LFOUI.h
deleted file mode 100644
index 91e9bf756..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/LFOUI.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef LFOUI_h
-#define LFOUI_h
-#include
-#include "WidgetPDial.h"
-#include
-#include
-#include "../globals.h"
-#include
-#include "../Params/LFOParams.h"
-#include
-#include
-#include
-#include "PresetsUI.h"
-#include "common.H"
-#include
-#include
-#include
-#include
-
-class LFOUI : public Fl_Group, PresetsUI_ {
-public:
- LFOUI(int x,int y, int w, int h, const char *label=0);
- ~LFOUI();
- Fl_Group* make_window();
- Fl_Group *lfoui;
- Fl_Group *lfoparamswindow;
- WidgetPDial *freq;
-private:
- void cb_freq_i(WidgetPDial*, void*);
- static void cb_freq(WidgetPDial*, void*);
-public:
- WidgetPDial *intensity;
-private:
- void cb_intensity_i(WidgetPDial*, void*);
- static void cb_intensity(WidgetPDial*, void*);
-public:
- WidgetPDial *delay;
-private:
- void cb_delay_i(WidgetPDial*, void*);
- static void cb_delay(WidgetPDial*, void*);
-public:
- WidgetPDial *startphase;
-private:
- void cb_startphase_i(WidgetPDial*, void*);
- static void cb_startphase(WidgetPDial*, void*);
-public:
- WidgetPDial *randomness;
-private:
- void cb_randomness_i(WidgetPDial*, void*);
- static void cb_randomness(WidgetPDial*, void*);
-public:
- Fl_Choice *LFOtype;
-private:
- void cb_LFOtype_i(Fl_Choice*, void*);
- static void cb_LFOtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_LFOtype[];
-public:
- Fl_Check_Button *continous;
-private:
- void cb_continous_i(Fl_Check_Button*, void*);
- static void cb_continous(Fl_Check_Button*, void*);
-public:
- WidgetPDial *freqrand;
-private:
- void cb_freqrand_i(WidgetPDial*, void*);
- static void cb_freqrand(WidgetPDial*, void*);
-public:
- WidgetPDial *stretch;
-private:
- void cb_stretch_i(WidgetPDial*, void*);
- static void cb_stretch(WidgetPDial*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- void refresh();
- void init(LFOParams *lfopars_);
-private:
- LFOParams *pars;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/MasterUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/MasterUI.cpp
deleted file mode 100644
index 21e5c0b85..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/MasterUI.cpp
+++ /dev/null
@@ -1,2558 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/MasterUI.h"
-//Copyright (c) 2002-2009 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-VUMeter::VUMeter(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- master=NULL;
- npart=-1;
-}
-
-void VUMeter::init(Master *master_,int part_) {
- //the "part_" parameters sets the part (if it is >=0), else it sets the master
- master=master_;
- label(NULL);
- npart=part_;
- olddbl=0.0;
- olddbr=0.0;
- oldrmsdbl=0.0;
- oldrmsdbr=0.0;
-}
-
-void VUMeter::draw_master() {
- #define MIN_DB (-48)
-
- int ox=x(); int oy=y(); int lx=w(); int ly=h();
-
- vuData data = master->getVuData();
-
- //pthread_mutex_lock(&master->mutex);
- float dbl=rap2dB(data.outpeakl);
- float dbr=rap2dB(data.outpeakr);
- float rmsdbl=rap2dB(data.rmspeakl);
- float rmsdbr=rap2dB(data.rmspeakr);
- float maxdbl=rap2dB(data.maxoutpeakl);
- float maxdbr=rap2dB(data.maxoutpeakr);
- int clipped=data.clipped;
- //pthread_mutex_unlock(&master->mutex);
-
- dbl=(MIN_DB-dbl)/MIN_DB;
- if (dbl<0.0) dbl=0.0;
- else if (dbl>1.0)dbl=1.0;
-
- dbr=(MIN_DB-dbr)/MIN_DB;
- if (dbr<0.0) dbr=0.0;
- else if (dbr>1.0) dbr=1.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;
-
- #define VULENX (lx-35)
- #define VULENY (ly/2-3)
-
- dbl*=VULENX;dbr*=VULENX;
-
- int idbl=(int) dbl;
- int idbr=(int) dbr;
-
- //compute RMS - start
- rmsdbl=(MIN_DB-rmsdbl)/MIN_DB;
- if (rmsdbl<0.0) rmsdbl=0.0;
- else if (rmsdbl>1.0) rmsdbl=1.0;
-
- rmsdbr=(MIN_DB-rmsdbr)/MIN_DB;
- if (rmsdbr<0.0) rmsdbr=0.0;
- else if (rmsdbr>1.0) rmsdbr=1.0;
-
- rmsdbl=rmsdbl*0.4+oldrmsdbl*0.6;
- rmsdbr=rmsdbr*0.4+oldrmsdbr*0.6;
-
- oldrmsdbl=rmsdbl;
- oldrmsdbr=rmsdbr;
-
-
- rmsdbl*=VULENX;rmsdbr*=VULENX;
-
- int irmsdbl=(int) rmsdbl;
- int irmsdbr=(int) rmsdbr;
- //compute RMS - end
-
-
-
- //draw the vu-meter lines
- //db
- fl_rectf(ox,oy,idbr,VULENY,0,200,255);
- fl_rectf(ox,oy+ly/2,idbl,VULENY,0,200,255);
- //black
- fl_rectf(ox+idbr,oy,VULENX-idbr,VULENY,0,0,0);
- fl_rectf(ox+idbl,oy+ly/2,VULENX-idbl,VULENY,0,0,0);
-
- //draw the scales
- float tmp=VULENX*1.0/MIN_DB;
- for (int i=1;i<1-MIN_DB;i++){
- int tx=VULENX+(int) (tmp*i);
- fl_rectf(ox+tx,oy,1,VULENY+ly/2,0,160,200);
- if (i%5==0) fl_rectf(ox+tx,oy,1,VULENY+ly/2,0,230,240);
- if (i%10==0) fl_rectf(ox+tx-1,oy,2,VULENY+ly/2,0,225,255);
- };
-
- //rms
- if (irmsdbr>2) fl_rectf(ox+irmsdbr-1,oy,3,VULENY,255,255,0);
- if (irmsdbl>2) fl_rectf(ox+irmsdbl-1,oy+ly/2,3,VULENY,255,255,0);
-
-
- //draw the red box if clipping has occured
- if (clipped==0) fl_rectf(ox+VULENX+2,oy+1,lx-VULENX-3,ly-4,0,0,10);
- else fl_rectf(ox+VULENX+2,oy+1,lx-VULENX-3,ly-4,250,10,10);
-
- //draw the maxdB
- fl_font(FL_HELVETICA|FL_BOLD,10);
- fl_color(255,255,255);
- char tmpstr[10];
- if ((maxdbl>MIN_DB-20)){
- snprintf((char *)&tmpstr,10,"%ddB",(int)maxdbr);
- fl_draw(tmpstr,ox+VULENX+1,oy+1,lx-VULENX-1,VULENY,FL_ALIGN_RIGHT,NULL,0);
- };
- if ((maxdbr>MIN_DB-20)){
- snprintf((char *)&tmpstr,10,"%ddB",(int)maxdbl);
- fl_draw(tmpstr,ox+VULENX+1,oy+ly/2+1,lx-VULENX-1,VULENY,FL_ALIGN_RIGHT,NULL,0);
- };
-}
-
-void VUMeter::draw_part() {
- #define MIN_DB (-48)
- int ox=x(); int oy=y(); int lx=w(); int ly=h();
-
- if (!active_r()){
- pthread_mutex_lock(&master->vumutex);
- int fakedb=master->fakepeakpart[npart];
- pthread_mutex_unlock(&master->vumutex);
- fl_rectf(ox,oy,lx,ly,140,140,140);
- if (fakedb>0){
- fakedb=(int)(fakedb/255.0*ly)+4;
- fl_rectf(ox+2,oy+ly-fakedb,lx-4,fakedb,0,0,0);
- };
-
- return;
- };
-
- //draw the vu lines
- pthread_mutex_lock(&master->vumutex);
- float db=rap2dB(master->vuoutpeakpart[npart]);
- pthread_mutex_unlock(&master->vumutex);
-
- db=(MIN_DB-db)/MIN_DB;
- if (db<0.0) db=0.0;
- else if (db>1.0) db=1.0;
-
- db*=ly-2;
-
- int idb=(int) db;
-
- fl_rectf(ox,oy+ly-idb,lx,idb,0,200,255);
- fl_rectf(ox,oy,lx,ly-idb,0,0,0);
-
-
- //draw the scales
- float tmp=ly*1.0/MIN_DB;
- for (int i=1;i<1-MIN_DB;i++){
- int ty=ly+(int) (tmp*i);
- if (i%5==0) fl_rectf(ox,oy+ly-ty,lx,1,0,160,200);
- if (i%10==0) fl_rectf(ox,oy+ly-ty,lx,1,0,230,240);
- };
-}
-
-void VUMeter::draw() {
- if (npart>=0) draw_part();
- else draw_master();
-}
-
-void VUMeter::tickdraw(VUMeter *o) {
- o->damage(FL_DAMAGE_USER1);
-}
-
-void VUMeter::tick(void *v) {
- tickdraw((VUMeter *) v);
- Fl::repeat_timeout(1.0/18.0,tick,v);//18 fps
-}
-
-int VUMeter::handle(int event) {
- switch(event){
- case FL_SHOW:
- Fl::add_timeout(1.0/18.0,tick,this);
- break;
- case FL_HIDE:
- Fl::remove_timeout(tick,this);
- break;
- case FL_PUSH:
- if (npart>=0) break;
- pthread_mutex_lock(&master->mutex);
- master->vuresetpeaks();
- pthread_mutex_unlock(&master->mutex);
- break;
- };
- return(1);
-}
-
-SysEffSend::SysEffSend(int x,int y, int w, int h, const char *label):WidgetPDial(x,y,w,h,label) {
- master=NULL;
- neff1=0;
- neff2=0;
-}
-
-void SysEffSend::init(Master *master_,int neff1_,int neff2_) {
- neff1=neff1_;
- neff2=neff2_;
- master=master_;
- minimum(0);
- maximum(127);
- step(1);
- labelfont(1);
- labelsize(10);
- align(FL_ALIGN_TOP);
-
- value(master->Psysefxsend[neff1][neff2]);
- char tmp[20];snprintf(tmp,20,"%d->%d",neff1+1,neff2+1);
- this->copy_label(tmp);
-}
-
-SysEffSend::~SysEffSend() {
- hide();
-}
-
-int SysEffSend::handle(int event) {
- if ((event==FL_PUSH) || (event==FL_DRAG)){
- master->setPsysefxsend(neff1,neff2,(int) value());
- };
-
- return(WidgetPDial::handle(event));
-}
-
-void Panellistitem::cb_partname_i(Fl_Button*, void*) {
- if ((int)bankui->cbwig->value()!=(npart+1)){
- bankui->cbwig->value(npart+1);
- bankui->cbwig->do_callback();
-};
-bankui->show();
-}
-void Panellistitem::cb_partname(Fl_Button* o, void* v) {
- ((Panellistitem*)(o->parent()->parent()->user_data()))->cb_partname_i(o,v);
-}
-
-void Panellistitem::cb_partvolume_i(Fl_Slider* o, void*) {
- master->part[npart]->setPvolume((int) o->value());
-}
-void Panellistitem::cb_partvolume(Fl_Slider* o, void* v) {
- ((Panellistitem*)(o->parent()->parent()->user_data()))->cb_partvolume_i(o,v);
-}
-
-void Panellistitem::cb_partpanning_i(WidgetPDial* o, void*) {
- master->part[npart]->setPpanning((int) o->value());
-}
-void Panellistitem::cb_partpanning(WidgetPDial* o, void* v) {
- ((Panellistitem*)(o->parent()->parent()->user_data()))->cb_partpanning_i(o,v);
-}
-
-void Panellistitem::cb_edit_i(Fl_Button*, void*) {
- if ((int)bankui->cbwig->value()!=(npart+1)){
- bankui->cbwig->value(npart+1);
- bankui->cbwig->do_callback();
-};
-}
-void Panellistitem::cb_edit(Fl_Button* o, void* v) {
- ((Panellistitem*)(o->parent()->parent()->user_data()))->cb_edit_i(o,v);
-}
-
-void Panellistitem::cb_partrcv_i(Fl_Choice* o, void*) {
- master->part[npart]->Prcvchn=(int) o->value();
-}
-void Panellistitem::cb_partrcv(Fl_Choice* o, void* v) {
- ((Panellistitem*)(o->parent()->parent()->user_data()))->cb_partrcv_i(o,v);
-}
-
-void Panellistitem::cb_partenabled_i(Fl_Check_Button* o, void*) {
- pthread_mutex_lock(&master->mutex);
- master->partonoff(npart,(int) o->value());
-pthread_mutex_unlock(&master->mutex);
-
-if ((int) o->value()==0) panellistitemgroup->deactivate();
- else {
- panellistitemgroup->activate();
- if ((int)bankui->cbwig->value()!=(npart+1)){
- bankui->cbwig->value(npart+1);
- bankui->cbwig->do_callback();
- };
-};
-
-o->redraw();
-}
-void Panellistitem::cb_partenabled(Fl_Check_Button* o, void* v) {
- ((Panellistitem*)(o->parent()->user_data()))->cb_partenabled_i(o,v);
-}
-
-Fl_Group* Panellistitem::make_window() {
- { panellistitem = new Fl_Group(0, 0, 100, 260);
- panellistitem->box(FL_NO_BOX);
- panellistitem->color(FL_BACKGROUND_COLOR);
- panellistitem->selection_color(FL_BACKGROUND_COLOR);
- panellistitem->labeltype(FL_NO_LABEL);
- panellistitem->labelfont(0);
- panellistitem->labelsize(14);
- panellistitem->labelcolor(FL_FOREGROUND_COLOR);
- panellistitem->user_data((void*)(this));
- panellistitem->align(Fl_Align(FL_ALIGN_TOP));
- panellistitem->when(FL_WHEN_RELEASE);
- { Fl_Group* o = panellistitemgroup = new Fl_Group(0, 20, 70, 240);
- panellistitemgroup->box(FL_UP_FRAME);
- { Fl_Group* o = new Fl_Group(45, 65, 15, 110);
- o->box(FL_ENGRAVED_FRAME);
- { VUMeter* o = new VUMeter(45, 65, 15, 110, "V U");
- o->box(FL_FLAT_BOX);
- o->color(FL_FOREGROUND_COLOR);
- o->selection_color((Fl_Color)75);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor((Fl_Color)55);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- o->when(FL_WHEN_RELEASE);
- o->init(master,npart);
- } // VUMeter* o
- o->end();
- } // Fl_Group* o
- { partname = new Fl_Button(5, 27, 60, 30, " ");
- partname->box(FL_THIN_DOWN_BOX);
- partname->down_box(FL_FLAT_BOX);
- partname->labelfont(1);
- partname->labelsize(10);
- partname->callback((Fl_Callback*)cb_partname);
- partname->align(Fl_Align(192|FL_ALIGN_INSIDE));
- } // Fl_Button* partname
- { Fl_Slider* o = partvolume = new Fl_Slider(10, 65, 30, 110);
- partvolume->type(4);
- partvolume->box(FL_NO_BOX);
- partvolume->minimum(127);
- partvolume->maximum(0);
- partvolume->step(1);
- partvolume->value(127);
- partvolume->callback((Fl_Callback*)cb_partvolume);
- o->value(master->part[npart]->Pvolume);
- } // Fl_Slider* partvolume
- { WidgetPDial* o = partpanning = new WidgetPDial(20, 180, 30, 30);
- partpanning->box(FL_NO_BOX);
- partpanning->color(FL_BACKGROUND_COLOR);
- partpanning->selection_color(FL_INACTIVE_COLOR);
- partpanning->labeltype(FL_NORMAL_LABEL);
- partpanning->labelfont(0);
- partpanning->labelsize(14);
- partpanning->labelcolor(FL_FOREGROUND_COLOR);
- partpanning->maximum(127);
- partpanning->step(1);
- partpanning->callback((Fl_Callback*)cb_partpanning);
- partpanning->align(Fl_Align(FL_ALIGN_BOTTOM));
- partpanning->when(FL_WHEN_CHANGED);
- o->value(master->part[npart]->Ppanning);
- } // WidgetPDial* partpanning
- { Fl_Button* o = new Fl_Button(15, 235, 40, 20, "edit");
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_edit);
- } // Fl_Button* o
- { Fl_Choice* o = partrcv = new Fl_Choice(10, 213, 50, 15);
- partrcv->tooltip("receive from Midi channel");
- partrcv->down_box(FL_BORDER_BOX);
- partrcv->labelsize(10);
- partrcv->textfont(1);
- partrcv->textsize(10);
- partrcv->callback((Fl_Callback*)cb_partrcv);
- partrcv->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- char nrstr[10]; for(int i=0;iadd(nrstr); else o->add("Dr10");};
- o->value(master->part[npart]->Prcvchn);
- } // Fl_Choice* partrcv
- if (master->part[npart]->Penabled==0) o->deactivate();
- set_module_parameters( o );
- panellistitemgroup->end();
- } // Fl_Group* panellistitemgroup
- { Fl_Check_Button* o = partenabled = new Fl_Check_Button(5, 0, 45, 20, "01");
- partenabled->down_box(FL_DOWN_BOX);
- partenabled->labeltype(FL_EMBOSSED_LABEL);
- partenabled->labelfont(1);
- partenabled->labelsize(13);
- partenabled->callback((Fl_Callback*)cb_partenabled);
- partenabled->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
- char tmp[10];snprintf(tmp,10,"%d",npart+1);o->copy_label(tmp);
- o->value(master->part[npart]->Penabled);
- } // Fl_Check_Button* partenabled
- panellistitem->end();
- } // Fl_Group* panellistitem
- return panellistitem;
-}
-
-Panellistitem::Panellistitem(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- npart=0;
- master=NULL;
- bankui=NULL;
-}
-
-void Panellistitem::init(Master *master_, int npart_,BankUI *bankui_) {
- npart=npart_;
- master=master_;
- bankui=bankui_;
-
- make_window();
- panellistitem->show();
- end();
-}
-
-void Panellistitem::refresh() {
- partenabled->value(master->part[npart]->Penabled);
- if (master->part[npart]->Penabled!=0) panellistitemgroup->activate();
- else panellistitemgroup->deactivate();
-
- partvolume->value(master->part[npart]->Pvolume);
- partpanning->value(master->part[npart]->Ppanning);
- partrcv->value(master->part[npart]->Prcvchn);
-
- partname->label((char *)master->part[npart]->Pname);
-
- if ((int)bankui->cbwig->value()!=(npart+1))
- panellistitemgroup->color(fl_rgb_color(160,160,160));
- else
- panellistitemgroup->color(fl_rgb_color(50,190,240));
-
- panellistitemgroup->redraw();
-}
-
-Panellistitem::~Panellistitem() {
- panellistitem->hide();
- //delete(panellistitem);
-}
-
-void MasterUI::cb_masterwindow_i(Fl_Double_Window*, void*) {
- if ((
-#ifdef PLUGINVERSION
-1
-#elif USE_NSM
-(nsm && nsm->is_active())
-#else
-0
-#endif
- || fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))) {
- config.save();
- *exitprogram=1;
-};
-}
-void MasterUI::cb_masterwindow(Fl_Double_Window* o, void* v) {
- ((MasterUI*)(o->user_data()))->cb_masterwindow_i(o,v);
-}
-
-void MasterUI::cb_New_i(Fl_Menu_*, void*) {
- do_new_master();
-}
-void MasterUI::cb_New(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_New_i(o,v);
-}
-
-void MasterUI::cb_Open_i(Fl_Menu_*, void*) {
- #if USE_NSM
- if ( nsm && nsm->is_active() )
- {
- do_load_master();
- do_save_master( nsm->project_filename );
- }
- else
-#endif
- {
- do_load_master();
- };
-}
-void MasterUI::cb_Open(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Open_i(o,v);
-}
-
-void MasterUI::cb_Save_i(Fl_Menu_*, void*) {
- #if USE_NSM
- if ( nsm && nsm->is_active() )
- {
- do_save_master( nsm->project_filename );
- }
- else
-#endif
- {
- do_save_master();
- };
-}
-void MasterUI::cb_Save(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Save_i(o,v);
-}
-
-void MasterUI::cb_Load_i(Fl_Menu_*, void*) {
- char *filename;
-filename=fl_file_chooser("Open:","({*.xsz})",NULL,0);
-if (filename==NULL) return;
-
-pthread_mutex_lock(&master->mutex);
- //clear all parameters
- master->microtonal.defaults();
-
- //load the data
- int result=master->microtonal.loadXML(filename);
-pthread_mutex_unlock(&master->mutex);
-
-
- delete microtonalui;
- microtonalui=new MicrotonalUI(&master->microtonal);
-
-if (result==-10) fl_alert("Error: Could not load the file\nbecause it is not a scale file.");
- else if (result<0) fl_alert("Error: Could not load the file.");
-}
-void MasterUI::cb_Load(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Load_i(o,v);
-}
-
-void MasterUI::cb_Save1_i(Fl_Menu_*, void*) {
- char *filename;
-int result=0;
-
-filename=fl_file_chooser("Save:","({*.xsz})",NULL,0);
-if (filename==NULL) return;
-filename=fl_filename_setext(filename,".xsz");
-
-result=fileexists(filename);
-if (result) {
- result=0;
- if (!fl_choice("The file exists. \nOverwrite it?","No","Yes",NULL)) return;
-
-};
-
-
-pthread_mutex_lock(&master->mutex);
-result=master->microtonal.saveXML(filename);
-pthread_mutex_unlock(&master->mutex);
-
-if (result<0) fl_alert("Error: Could not save the file.");
-
-
-updatepanel();
-}
-void MasterUI::cb_Save1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Save1_i(o,v);
-}
-
-void MasterUI::cb_Show_i(Fl_Menu_*, void*) {
- microtonalui->show();
-}
-void MasterUI::cb_Show(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Show_i(o,v);
-}
-
-void MasterUI::cb_Settings_i(Fl_Menu_*, void*) {
- configui->show();
-}
-void MasterUI::cb_Settings(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Settings_i(o,v);
-}
-
-void MasterUI::cb_N_i(Fl_Menu_*, void*) {
- nioui.refresh();
-nioui.show();
-}
-void MasterUI::cb_N(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_N_i(o,v);
-}
-
-void MasterUI::cb_Copyright_i(Fl_Menu_*, void*) {
- aboutwindow->show();
-}
-void MasterUI::cb_Copyright(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Copyright_i(o,v);
-}
-
-void MasterUI::cb_E_i(Fl_Menu_*, void*) {
- masterwindow->do_callback();
-}
-void MasterUI::cb_E(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_E_i(o,v);
-}
-
-void MasterUI::cb_Clear_i(Fl_Menu_*, void*) {
- if (fl_choice("Clear instrument's parameters ?","No","Yes",NULL)){
-// int npart=(int)npartcounter->value()-1;
- pthread_mutex_lock(&master->mutex);
- master->part[npart]->defaultsinstrument();
- pthread_mutex_unlock(&master->mutex);
-
- npartcounter->do_callback();
-};
-
-updatepanel();
-}
-void MasterUI::cb_Clear(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Clear_i(o,v);
-}
-
-void MasterUI::cb_Open1_i(Fl_Menu_*, void*) {
- const char *filename;
-filename=fl_file_chooser("Load:","({*.xiz})",NULL,0);
-if (filename==NULL) return;
-
-
-pthread_mutex_lock(&master->mutex);
-// int npart=(int)npartcounter->value()-1;
-
- //clear all instrument parameters, first
- master->part[npart]->defaultsinstrument();
-
- //load the instr. parameters
- int result=master->part[npart]->loadXMLinstrument(filename);
-
-pthread_mutex_unlock(&master->mutex);
-master->part[npart]->applyparameters();
-
-npartcounter->do_callback();
-updatepanel();
-
-if (result==-10) fl_alert("Error: Could not load the file\nbecause it is not an instrument file.");
- else if (result<0) fl_alert("Error: Could not load the file.");
-}
-void MasterUI::cb_Open1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Open1_i(o,v);
-}
-
-void MasterUI::cb_Save2_i(Fl_Menu_*, void*) {
- char *filename;
-
-filename=fl_file_chooser("Save:","({*.xiz})",NULL,0);
-if (filename==NULL) return;
-filename=fl_filename_setext(filename,".xiz");
-
-int result=fileexists(filename);
-if (result) {
- result=0;
- if (!fl_choice("The file exists. \nOverwrite it?","No","Yes",NULL)) return;
-
-};
-
-
-pthread_mutex_lock(&master->mutex);
-result=master->part[npart]->saveXML(filename);
-pthread_mutex_unlock(&master->mutex);
-
-if (result<0) fl_alert("Error: Could not save the file.");
-
-updatepanel();
-}
-void MasterUI::cb_Save2(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Save2_i(o,v);
-}
-
-void MasterUI::cb_Show1_i(Fl_Menu_*, void*) {
- bankui->show();
-}
-void MasterUI::cb_Show1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Show1_i(o,v);
-}
-
-void MasterUI::cb_Virtual_i(Fl_Menu_*, void*) {
- virkeyboard->show();
-}
-void MasterUI::cb_Virtual(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Virtual_i(o,v);
-}
-
-void MasterUI::cb_Choose_i(Fl_Menu_*, void*) {
- char *filename;
-recordbutton->deactivate();
-pausebutton->deactivate();
-pauselabel->deactivate();
-stopbutton->deactivate();
-filename=fl_file_chooser("Record to audio file:","(*.wav)",NULL,0);
-if (filename==NULL) return;
-fl_filename_setext(filename,".wav");
-
-int result=master->HDDRecorder.preparefile(filename,0);
-if (result==1) {
- result=0;
- if (fl_choice("The file exists. \nOverwrite it?","No","Yes",NULL))
- master->HDDRecorder.preparefile(filename,1);
-};
-if (result==0) recordbutton->activate();
-
-if (result!=0) fl_alert("Error: Could not save the file.");
-}
-void MasterUI::cb_Choose(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Choose_i(o,v);
-}
-
-void MasterUI::cb_Switch_i(Fl_Menu_*, void*) {
- if (fl_choice("Switch the User Interface to Beginner mode ?","No","Yes",NULL)){
- masterwindow->hide();
- refresh_master_ui();
- simplemasterwindow->show();
- config.cfg.UserInterfaceMode=2;
-};
-}
-void MasterUI::cb_Switch(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Switch_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_mastermenu[] = {
- {"&File", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"&New (erase all)...", 0, (Fl_Callback*)MasterUI::cb_New, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Open Parameters...", 0, (Fl_Callback*)MasterUI::cb_Open, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Save All Parameters...", 0, (Fl_Callback*)MasterUI::cb_Save, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Load Scale Settings...", 0, (Fl_Callback*)MasterUI::cb_Load, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"Save Sc&ale Settings ..", 0, (Fl_Callback*)MasterUI::cb_Save1, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"Show Scale Settings...", 0, (Fl_Callback*)MasterUI::cb_Show, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Settings...", 0, (Fl_Callback*)MasterUI::cb_Settings, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"N&io Settings", 0, (Fl_Callback*)MasterUI::cb_N, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Copyright...", 0, (Fl_Callback*)MasterUI::cb_Copyright, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"E&xit", 0, (Fl_Callback*)MasterUI::cb_E, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {"&Instrument", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Clear Instrument...", 0, (Fl_Callback*)MasterUI::cb_Clear, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Open Instrument...", 0, (Fl_Callback*)MasterUI::cb_Open1, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Save Instrument ...", 0, (Fl_Callback*)MasterUI::cb_Save2, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"Show Instrument &Bank...", 0, (Fl_Callback*)MasterUI::cb_Show1, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Virtual Keyboard...", 0, (Fl_Callback*)MasterUI::cb_Virtual, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {"&Record", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Choose WAV file...", 0, (Fl_Callback*)MasterUI::cb_Choose, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {"Misc", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"Switch User Interface Mode", 0, (Fl_Callback*)MasterUI::cb_Switch, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {0,0,0,0,0,0,0,0,0}
-};
-Fl_Menu_Item* MasterUI::recordmenu = MasterUI::menu_mastermenu + 19;
-
-void MasterUI::cb_mastervolumedial_i(WidgetPDial* o, void*) {
- master->setPvolume((int) o->value());
-}
-void MasterUI::cb_mastervolumedial(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_mastervolumedial_i(o,v);
-}
-
-void MasterUI::cb_masterkeyshiftcounter_i(Fl_Counter* o, void*) {
- master->setPkeyshift((int) o->value()+64);
-}
-void MasterUI::cb_masterkeyshiftcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_masterkeyshiftcounter_i(o,v);
-}
-
-void MasterUI::cb_Panic_i(Fl_Button*, void*) {
- virkeyboard->relaseallkeys();
-pthread_mutex_lock(&master->mutex);
-master->shutup=1;
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_Panic(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Panic_i(o,v);
-}
-
-void MasterUI::cb_syseffnocounter_i(Fl_Counter* o, void*) {
- nsyseff=(int) o->value()-1;
-sysefftype->value(master->sysefx[nsyseff]->geteffect());
-syseffectui->refresh(master->sysefx[nsyseff]);
-}
-void MasterUI::cb_syseffnocounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_syseffnocounter_i(o,v);
-}
-
-void MasterUI::cb_sysefftype_i(Fl_Choice* o, void*) {
- pthread_mutex_lock(&master->mutex);
-master->sysefx[nsyseff]->changeeffect((int) o->value());
-pthread_mutex_unlock(&master->mutex);
-syseffectui->refresh(master->sysefx[nsyseff]);
-}
-void MasterUI::cb_sysefftype(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_sysefftype_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_sysefftype[] = {
- {"No Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Reverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AlienWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Distortion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"EQ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DynFilter", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void MasterUI::cb_Send_i(Fl_Button*, void*) {
- syseffsendwindow->show();
-}
-void MasterUI::cb_Send(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_Send_i(o,v);
-}
-
-void MasterUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(master->sysefx[nsyseff]);
-}
-void MasterUI::cb_C(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void MasterUI::cb_P_i(Fl_Button*, void*) {
- pthread_mutex_lock(&master->mutex);
-presetsui->paste(master->sysefx[nsyseff],syseffectui);
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_P(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void MasterUI::cb_inseffnocounter_i(Fl_Counter* o, void*) {
- ninseff=(int) o->value()-1;
-insefftype->value(master->insefx[ninseff]->geteffect());
-inseffpart->value(master->Pinsparts[ninseff]+2);
-inseffectui->refresh(master->insefx[ninseff]);
-
-if (master->Pinsparts[ninseff]!=-1) {
- insefftype->activate();
- inseffectui->activate();
- inseffectuigroup->activate();
-} else {
- insefftype->deactivate();
- inseffectui->deactivate();
- inseffectuigroup->deactivate();
-};
-}
-void MasterUI::cb_inseffnocounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_inseffnocounter_i(o,v);
-}
-
-void MasterUI::cb_insefftype_i(Fl_Choice* o, void*) {
- pthread_mutex_lock(&master->mutex);
-master->insefx[ninseff]->changeeffect((int) o->value());
-pthread_mutex_unlock(&master->mutex);
-inseffectui->refresh(master->insefx[ninseff]);
-inseffectui->show();
-}
-void MasterUI::cb_insefftype(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_insefftype_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_insefftype[] = {
- {"No Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Reverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AlienWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Distortion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"EQ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DynFilter", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void MasterUI::cb_inseffpart_i(Fl_Choice* o, void*) {
- master->Pinsparts[ninseff]=(int) o->value()-2;
-if ((int) o->value()==1){
- inseffectuigroup->deactivate();
- insefftype->deactivate();
- inseffectui->deactivate();
-} else {
- inseffectuigroup->activate();
- insefftype->activate();
- inseffectui->activate();
-};
-master->insefx[ninseff]->cleanup();
-}
-void MasterUI::cb_inseffpart(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_inseffpart_i(o,v);
-}
-
-void MasterUI::cb_C1_i(Fl_Button*, void*) {
- presetsui->copy(master->insefx[ninseff]);
-}
-void MasterUI::cb_C1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_C1_i(o,v);
-}
-
-void MasterUI::cb_P1_i(Fl_Button*, void*) {
- pthread_mutex_lock(&master->mutex);
-presetsui->paste(master->insefx[ninseff],inseffectui);
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_P1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->user_data()))->cb_P1_i(o,v);
-}
-
-void MasterUI::cb_Scales_i(Fl_Button*, void*) {
- microtonalui->show();
-}
-void MasterUI::cb_Scales(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Scales_i(o,v);
-}
-
-void MasterUI::cb_recordbutton_i(Fl_Button* o, void*) {
- o->deactivate();
-recordmenu->deactivate();
-recordmenu->label("&Record(*)");
-stopbutton->activate();
-pausebutton->activate();
-pauselabel->activate();
-master->HDDRecorder.start();
-master->vuresetpeaks();
-mastermenu->redraw();
-}
-void MasterUI::cb_recordbutton(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_recordbutton_i(o,v);
-}
-
-void MasterUI::cb_stopbutton_i(Fl_Button* o, void*) {
- o->deactivate();
-master->HDDRecorder.stop();
-recordbutton->deactivate();
-pausebutton->deactivate();
-pauselabel->deactivate();
-recordmenu->activate();
-recordmenu->label("&Record");
-mastermenu->redraw();
-}
-void MasterUI::cb_stopbutton(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_stopbutton_i(o,v);
-}
-
-void MasterUI::cb_pausebutton_i(Fl_Button* o, void*) {
- o->deactivate();
-master->HDDRecorder.pause();
-recordbutton->activate();
-mastermenu->redraw();
-}
-void MasterUI::cb_pausebutton(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_pausebutton_i(o,v);
-}
-
-void MasterUI::cb_nrpnbutton_i(Fl_Check_Button* o, void*) {
- master->ctl.NRPN.receive=(int) o->value();
-}
-void MasterUI::cb_nrpnbutton(Fl_Check_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_nrpnbutton_i(o,v);
-}
-
-void MasterUI::cb_npartcounter_i(Fl_Counter* o, void*) {
- int nval=(int) o->value()-1;
-partuigroup->remove(partui);
-delete partui;
-partui=new PartUI(0,0,765,525);
-partuigroup->add(partui);
-partui->init(master->part[nval],master,nval,bankui);
-partui->redraw();
-o->redraw();
-npart=nval;
-
-updatepanel();
-simplenpartcounter->value(nval+1);
-simplenpartcounter->do_callback();
-}
-void MasterUI::cb_npartcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_npartcounter_i(o,v);
-}
-
-void MasterUI::cb_vK_i(Fl_Button*, void*) {
- virkeyboard->show();
-}
-void MasterUI::cb_vK(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_vK_i(o,v);
-}
-
-void MasterUI::cb_Reset_i(Fl_Button*, void*) {
- globalfinedetuneslider->value(64.0);
-globalfinedetuneslider->do_callback();
-}
-void MasterUI::cb_Reset(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_Reset_i(o,v);
-}
-
-void MasterUI::cb_globalfinedetuneslider_i(WidgetPDial* o, void*) {
- master->microtonal.Pglobalfinedetune=(int) o->value();
-}
-void MasterUI::cb_globalfinedetuneslider(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_globalfinedetuneslider_i(o,v);
-}
-
-void MasterUI::cb_Panel_i(Fl_Button*, void*) {
- updatepanel();
-panelwindow->show();
-}
-void MasterUI::cb_Panel(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Panel_i(o,v);
-}
-
-void MasterUI::cb_Close_i(Fl_Button*, void*) {
- aboutwindow->hide();
-}
-void MasterUI::cb_Close(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void MasterUI::cb_Close1_i(Fl_Button*, void*) {
- syseffsendwindow->hide();
-}
-void MasterUI::cb_Close1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Close1_i(o,v);
-}
-
-void MasterUI::cb_Close2_i(Fl_Button*, void*) {
- panelwindow->hide();
-updatepanel();
-}
-void MasterUI::cb_Close2(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Close2_i(o,v);
-}
-
-void MasterUI::cb_Refresh_i(Fl_Button*, void*) {
- updatepanel();
-}
-void MasterUI::cb_Refresh(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Refresh_i(o,v);
-}
-
-void MasterUI::cb_simplemasterwindow_i(Fl_Double_Window*, void*) {
- #ifndef PLUGINVERSION
-if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))
-#endif
-{
- config.save();
- *exitprogram=1;
-};
-}
-void MasterUI::cb_simplemasterwindow(Fl_Double_Window* o, void* v) {
- ((MasterUI*)(o->user_data()))->cb_simplemasterwindow_i(o,v);
-}
-
-void MasterUI::cb_New1_i(Fl_Menu_*, void*) {
- do_new_master();
-}
-void MasterUI::cb_New1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_New1_i(o,v);
-}
-
-void MasterUI::cb_Open2_i(Fl_Menu_*, void*) {
- do_load_master();
-}
-void MasterUI::cb_Open2(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Open2_i(o,v);
-}
-
-void MasterUI::cb_Save3_i(Fl_Menu_*, void*) {
- #if USE_NSM
- if ( nsm && nsm->is_active() )
- {
- do_save_master( nsm->project_filename );
- }
- else
-#endif
- {
- do_save_master();
- };
-}
-void MasterUI::cb_Save3(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Save3_i(o,v);
-}
-
-void MasterUI::cb_Settings1_i(Fl_Menu_*, void*) {
- configui->show();
-}
-void MasterUI::cb_Settings1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Settings1_i(o,v);
-}
-
-void MasterUI::cb_Copyright1_i(Fl_Menu_*, void*) {
- aboutwindow->show();
-}
-void MasterUI::cb_Copyright1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Copyright1_i(o,v);
-}
-
-void MasterUI::cb_E1_i(Fl_Menu_*, void*) {
- masterwindow->do_callback();
-}
-void MasterUI::cb_E1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_E1_i(o,v);
-}
-
-void MasterUI::cb_Open3_i(Fl_Menu_*, void*) {
- const char *filename;
-filename=fl_file_chooser("Load:","({*.xiz})",NULL,0);
-if (filename==NULL) return;
-
-
-pthread_mutex_lock(&master->mutex);
-// int npart=(int)npartcounter->value()-1;
-
- //clear all instrument parameters, first
- master->part[npart]->defaultsinstrument();
-
- //load the instr. parameters
- int result=master->part[npart]->loadXMLinstrument(filename);
-
-pthread_mutex_unlock(&master->mutex);
-master->part[npart]->applyparameters();
-
-simplenpartcounter->do_callback();
-
-if (result==-10) fl_alert("Error: Could not load the file\nbecause it is not an instrument file.");
- else if (result<0) fl_alert("Error: Could not load the file.");
-}
-void MasterUI::cb_Open3(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Open3_i(o,v);
-}
-
-void MasterUI::cb_Show2_i(Fl_Menu_*, void*) {
- bankui->show();
-}
-void MasterUI::cb_Show2(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Show2_i(o,v);
-}
-
-void MasterUI::cb_Switch1_i(Fl_Menu_*, void*) {
- if (fl_choice("Switch the User Interface to Advanced mode ?","No","Yes",NULL)){
- simplemasterwindow->hide();
- refresh_master_ui();
- masterwindow->show();
- config.cfg.UserInterfaceMode=1;
-};
-}
-void MasterUI::cb_Switch1(Fl_Menu_* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Switch1_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_simplemastermenu[] = {
- {"&File", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"&New (erase all)...", 0, (Fl_Callback*)MasterUI::cb_New1, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Open Parameters...", 0, (Fl_Callback*)MasterUI::cb_Open2, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Save All Parameters...", 0, (Fl_Callback*)MasterUI::cb_Save3, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Settings...", 0, (Fl_Callback*)MasterUI::cb_Settings1, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Copyright...", 0, (Fl_Callback*)MasterUI::cb_Copyright1, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {"E&xit", 0, (Fl_Callback*)MasterUI::cb_E1, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {"&Instrument", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"&Open Instrument...", 0, (Fl_Callback*)MasterUI::cb_Open3, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {"Show Instrument &Bank...", 0, (Fl_Callback*)MasterUI::cb_Show2, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {"Misc", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
- {"Switch User Interface Mode", 0, (Fl_Callback*)MasterUI::cb_Switch1, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
- {0,0,0,0,0,0,0,0,0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void MasterUI::cb_partname1_i(Fl_Button*, void*) {
- if ((int)bankui->cbwig->value()!=(npart+1)){
- bankui->cbwig->value(npart+1);
- bankui->cbwig->do_callback();
-};
-bankui->show();
-}
-void MasterUI::cb_partname1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_partname1_i(o,v);
-}
-
-void MasterUI::cb_partpanning1_i(Fl_Slider* o, void*) {
- master->part[npart]->setPpanning((int) o->value());
-}
-void MasterUI::cb_partpanning1(Fl_Slider* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_partpanning1_i(o,v);
-}
-
-void MasterUI::cb_partrcv1_i(Fl_Choice* o, void*) {
- virkeys->relaseallkeys(0);
-master->part[npart]->Prcvchn=(int) o->value();
-virkeys->midich=(int) o->value();
-}
-void MasterUI::cb_partrcv1(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_partrcv1_i(o,v);
-}
-
-void MasterUI::cb_partvolume1_i(WidgetPDial* o, void*) {
- master->part[npart]->setPvolume((int) o->value());
-}
-void MasterUI::cb_partvolume1(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_partvolume1_i(o,v);
-}
-
-void MasterUI::cb_simplepartportamento_i(Fl_Check_Button* o, void*) {
- master->part[npart]->ctl.portamento.portamento=(int) o->value();
-}
-void MasterUI::cb_simplepartportamento(Fl_Check_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_simplepartportamento_i(o,v);
-}
-
-void MasterUI::cb_simpleminkcounter_i(Fl_Counter* o, void*) {
- 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);
-}
-void MasterUI::cb_simpleminkcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_simpleminkcounter_i(o,v);
-}
-
-void MasterUI::cb_simplemaxkcounter_i(Fl_Counter* o, void*) {
- master->part[npart]->Pmaxkey=(int) o->value();
-
-if (master->part[npart]->Pminkey>master->part[npart]->Pmaxkey) o->textcolor(FL_RED);
- else o->textcolor(FL_BLACK);
-}
-void MasterUI::cb_simplemaxkcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_simplemaxkcounter_i(o,v);
-}
-
-void MasterUI::cb_m_i(Fl_Button*, void*) {
- if (master->part[npart]->lastnote>=0) simpleminkcounter->value(master->part[npart]->lastnote);
-simpleminkcounter->do_callback();
-simplemaxkcounter->do_callback();
-}
-void MasterUI::cb_m(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_m_i(o,v);
-}
-
-void MasterUI::cb_M_i(Fl_Button*, void*) {
- if (master->part[npart]->lastnote>=0) simplemaxkcounter->value(master->part[npart]->lastnote);
-simplemaxkcounter->do_callback();
-simpleminkcounter->do_callback();
-}
-void MasterUI::cb_M(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_M_i(o,v);
-}
-
-void MasterUI::cb_R_i(Fl_Button*, void*) {
- simpleminkcounter->value(0);
-simpleminkcounter->do_callback();
-simplemaxkcounter->value(127);
-simplemaxkcounter->do_callback();
-}
-void MasterUI::cb_R(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_R_i(o,v);
-}
-
-void MasterUI::cb_simplepartkeyshiftcounter_i(Fl_Counter* o, void*) {
- master->part[npart]->Pkeyshift=(int) o->value()+64;
-}
-void MasterUI::cb_simplepartkeyshiftcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_simplepartkeyshiftcounter_i(o,v);
-}
-
-void MasterUI::cb_simplesyseffsend_i(WidgetPDial* o, void*) {
- master->setPsysefxvol(npart,nsyseff,(int) o->value());
-}
-void MasterUI::cb_simplesyseffsend(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->user_data()))->cb_simplesyseffsend_i(o,v);
-}
-
-void MasterUI::cb_partenabled1_i(Fl_Check_Button* o, void*) {
- pthread_mutex_lock(&master->mutex);
- master->partonoff(npart,(int) o->value());
-pthread_mutex_unlock(&master->mutex);
-
-if ((int) o->value()==0) simplelistitemgroup->deactivate();
- else {
- simplelistitemgroup->activate();
- if ((int)bankui->cbwig->value()!=(npart+1)){
- bankui->cbwig->value(npart+1);
- bankui->cbwig->do_callback();
- };
-};
-
-o->redraw();
-}
-void MasterUI::cb_partenabled1(Fl_Check_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_partenabled1_i(o,v);
-}
-
-void MasterUI::cb_simplesyseffnocounter_i(Fl_Counter* o, void*) {
- nsyseff=(int) o->value()-1;
-simplesysefftype->value(master->sysefx[nsyseff]->geteffect());
-simplesyseffectui->refresh(master->sysefx[nsyseff]);
-simplerefresh();
-}
-void MasterUI::cb_simplesyseffnocounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_simplesyseffnocounter_i(o,v);
-}
-
-void MasterUI::cb_simplesysefftype_i(Fl_Choice* o, void*) {
- pthread_mutex_lock(&master->mutex);
-master->sysefx[nsyseff]->changeeffect((int) o->value());
-pthread_mutex_unlock(&master->mutex);
-simplesyseffectui->refresh(master->sysefx[nsyseff]);
-}
-void MasterUI::cb_simplesysefftype(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_simplesysefftype_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_simplesysefftype[] = {
- {"No Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Reverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AlienWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Distortion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"EQ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DynFilter", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void MasterUI::cb_Send1_i(Fl_Button*, void*) {
- syseffsendwindow->show();
-}
-void MasterUI::cb_Send1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_Send1_i(o,v);
-}
-
-void MasterUI::cb_P2_i(Fl_Button*, void*) {
- pthread_mutex_lock(&master->mutex);
-presetsui->paste(master->sysefx[nsyseff],simplesyseffectui);
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_P2(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_P2_i(o,v);
-}
-
-void MasterUI::cb_simpleinseffnocounter_i(Fl_Counter* o, void*) {
- ninseff=(int) o->value()-1;
-simpleinsefftype->value(master->insefx[ninseff]->geteffect());
-simpleinseffpart->value(master->Pinsparts[ninseff]+2);
-simpleinseffectui->refresh(master->insefx[ninseff]);
-
-if (master->Pinsparts[ninseff]!=-1) {
- simpleinsefftype->activate();
- simpleinseffectui->activate();
- simpleinseffectuigroup->activate();
-} else {
- simpleinsefftype->deactivate();
- simpleinseffectui->deactivate();
- simpleinseffectuigroup->deactivate();
-};
-}
-void MasterUI::cb_simpleinseffnocounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_simpleinseffnocounter_i(o,v);
-}
-
-void MasterUI::cb_simpleinsefftype_i(Fl_Choice* o, void*) {
- pthread_mutex_lock(&master->mutex);
-master->insefx[ninseff]->changeeffect((int) o->value());
-pthread_mutex_unlock(&master->mutex);
-simpleinseffectui->refresh(master->insefx[ninseff]);
-simpleinseffectui->show();
-}
-void MasterUI::cb_simpleinsefftype(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_simpleinsefftype_i(o,v);
-}
-
-Fl_Menu_Item MasterUI::menu_simpleinsefftype[] = {
- {"No Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Reverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AlienWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Distortion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"EQ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DynFilter", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void MasterUI::cb_simpleinseffpart_i(Fl_Choice* o, void*) {
- master->Pinsparts[ninseff]=(int) o->value()-2;
-if ((int) o->value()==1){
- simpleinseffectuigroup->deactivate();
- simpleinsefftype->deactivate();
- simpleinseffectui->deactivate();
-} else {
- simpleinseffectuigroup->activate();
- simpleinsefftype->activate();
- simpleinseffectui->activate();
-};
-master->insefx[ninseff]->cleanup();
-}
-void MasterUI::cb_simpleinseffpart(Fl_Choice* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_simpleinseffpart_i(o,v);
-}
-
-void MasterUI::cb_P3_i(Fl_Button*, void*) {
- pthread_mutex_lock(&master->mutex);
-presetsui->paste(master->insefx[ninseff],simpleinseffectui);
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_P3(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_P3_i(o,v);
-}
-
-void MasterUI::cb_simplemastervolumedial_i(WidgetPDial* o, void*) {
- master->setPvolume((int) o->value());
-}
-void MasterUI::cb_simplemastervolumedial(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_simplemastervolumedial_i(o,v);
-}
-
-void MasterUI::cb_simplemasterkeyshiftcounter_i(Fl_Counter* o, void*) {
- master->setPkeyshift((int) o->value()+64);
-}
-void MasterUI::cb_simplemasterkeyshiftcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_simplemasterkeyshiftcounter_i(o,v);
-}
-
-void MasterUI::cb_Stop_i(Fl_Button*, void*) {
- virkeyboard->relaseallkeys();
-pthread_mutex_lock(&master->mutex);
-master->shutup=1;
-pthread_mutex_unlock(&master->mutex);
-}
-void MasterUI::cb_Stop(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Stop_i(o,v);
-}
-
-void MasterUI::cb_Reset1_i(Fl_Button*, void*) {
- simpleglobalfinedetuneslider->value(64.0);
-simpleglobalfinedetuneslider->do_callback();
-}
-void MasterUI::cb_Reset1(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Reset1_i(o,v);
-}
-
-void MasterUI::cb_simpleglobalfinedetuneslider_i(WidgetPDial* o, void*) {
- master->microtonal.Pglobalfinedetune=(int) o->value();
-}
-void MasterUI::cb_simpleglobalfinedetuneslider(WidgetPDial* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_simpleglobalfinedetuneslider_i(o,v);
-}
-
-void MasterUI::cb_simplenpartcounter_i(Fl_Counter* o, void*) {
- virkeys->relaseallkeys(0);
-npartcounter->value(o->value());
-npart=(int) o->value()-1;
-
-simplerefresh();
-virkeys->midich=master->part[npart]->Prcvchn;
-}
-void MasterUI::cb_simplenpartcounter(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_simplenpartcounter_i(o,v);
-}
-
-void MasterUI::cb_Keyb_i(Fl_Counter* o, void*) {
- virkeys->relaseallkeys(0);
-virkeys->midioct=(int) o->value();
-virkeys->take_focus();
-}
-void MasterUI::cb_Keyb(Fl_Counter* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Keyb_i(o,v);
-}
-
-void MasterUI::cb_selectuiwindow_i(Fl_Double_Window*, void*) {
- *exitprogram=1;
-}
-void MasterUI::cb_selectuiwindow(Fl_Double_Window* o, void* v) {
- ((MasterUI*)(o->user_data()))->cb_selectuiwindow_i(o,v);
-}
-
-void MasterUI::cb_Advanced_i(Fl_Button*, void*) {
- config.cfg.UserInterfaceMode=1;
-masterwindow->show();
-selectuiwindow->hide();
-}
-void MasterUI::cb_Advanced(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Advanced_i(o,v);
-}
-
-void MasterUI::cb_Beginner_i(Fl_Button*, void*) {
- simplemasterwindow->show();
-selectuiwindow->hide();
-config.cfg.UserInterfaceMode=2;
-}
-void MasterUI::cb_Beginner(Fl_Button* o, void* v) {
- ((MasterUI*)(o->parent()->user_data()))->cb_Beginner_i(o,v);
-}
-
-Fl_Double_Window* MasterUI::make_window() {
- { masterwindow = new Fl_Double_Window(390, 525, "zynaddsubfx");
- masterwindow->callback((Fl_Callback*)cb_masterwindow, (void*)(this));
- { mastermenu = new Fl_Menu_Bar(-5, 0, 690, 25);
- mastermenu->menu(menu_mastermenu);
- } // Fl_Menu_Bar* mastermenu
- { WidgetPDial* o = mastervolumedial = new WidgetPDial(15, 32, 55, 55, "Master Volume");
- mastervolumedial->tooltip("Master Volume");
- mastervolumedial->box(FL_ROUND_UP_BOX);
- mastervolumedial->color(FL_BACKGROUND_COLOR);
- mastervolumedial->selection_color(FL_INACTIVE_COLOR);
- mastervolumedial->labeltype(FL_NORMAL_LABEL);
- mastervolumedial->labelfont(0);
- mastervolumedial->labelsize(9);
- mastervolumedial->labelcolor(FL_FOREGROUND_COLOR);
- mastervolumedial->maximum(127);
- mastervolumedial->step(1);
- mastervolumedial->callback((Fl_Callback*)cb_mastervolumedial);
- mastervolumedial->align(Fl_Align(130));
- mastervolumedial->when(FL_WHEN_CHANGED);
- o->value(master->Pvolume);
- } // WidgetPDial* mastervolumedial
- { Fl_Counter* o = masterkeyshiftcounter = new Fl_Counter(150, 97, 120, 23, "Master KeyShift");
- masterkeyshiftcounter->type(1);
- masterkeyshiftcounter->labelsize(9);
- masterkeyshiftcounter->minimum(-64);
- masterkeyshiftcounter->maximum(64);
- masterkeyshiftcounter->step(1);
- masterkeyshiftcounter->callback((Fl_Callback*)cb_masterkeyshiftcounter);
- o->lstep(12);
- o->value(master->Pkeyshift-64);
- } // Fl_Counter* masterkeyshiftcounter
- { Fl_Button* o = new Fl_Button(280, 29, 105, 53, "Panic!");
- o->color((Fl_Color)90);
- o->labelfont(1);
- o->callback((Fl_Callback*)cb_Panic);
- } // Fl_Button* o
- { partuigroup = new Fl_Group(0, 310, 390, 205);
- { PartUI* o = partui = new PartUI(0, 310, 383, 175);
- partui->box(FL_NO_BOX);
- partui->color(FL_BACKGROUND_COLOR);
- partui->selection_color(FL_BACKGROUND_COLOR);
- partui->labeltype(FL_NORMAL_LABEL);
- partui->labelfont(0);
- partui->labelsize(14);
- partui->labelcolor(FL_FOREGROUND_COLOR);
- partui->align(Fl_Align(FL_ALIGN_TOP));
- partui->when(FL_WHEN_RELEASE);
- o->init(master->part[0],master,0,bankui);
- o->show();
- partui->end();
- } // PartUI* partui
- partuigroup->end();
- } // Fl_Group* partuigroup
- { Fl_Tabs* o = new Fl_Tabs(0, 145, 390, 165);
- o->box(FL_UP_FRAME);
- { Fl_Group* o = new Fl_Group(0, 162, 390, 145, "System Effects");
- o->labelsize(15);
- o->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
- { Fl_Counter* o = syseffnocounter = new Fl_Counter(5, 181, 80, 22, "Sys.Effect No.");
- syseffnocounter->type(1);
- syseffnocounter->labelfont(1);
- syseffnocounter->labelsize(10);
- syseffnocounter->minimum(0);
- syseffnocounter->maximum(127);
- syseffnocounter->step(1);
- syseffnocounter->value(1);
- syseffnocounter->textfont(1);
- syseffnocounter->callback((Fl_Callback*)cb_syseffnocounter);
- syseffnocounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(1,NUM_SYS_EFX);
- o->value(nsyseff+1);
- } // Fl_Counter* syseffnocounter
- { Fl_Choice* o = sysefftype = new Fl_Choice(285, 176, 100, 22, "EffType");
- sysefftype->down_box(FL_BORDER_BOX);
- sysefftype->labelsize(10);
- sysefftype->callback((Fl_Callback*)cb_sysefftype);
- sysefftype->menu(menu_sysefftype);
- o->value(master->sysefx[nsyseff]->geteffect());
- } // Fl_Choice* sysefftype
- { syseffectuigroup = new Fl_Group(5, 203, 380, 95);
- syseffectuigroup->color((Fl_Color)48);
- { EffUI* o = syseffectui = new EffUI(5, 203, 380, 95);
- syseffectui->box(FL_NO_BOX);
- syseffectui->color(FL_BACKGROUND_COLOR);
- syseffectui->selection_color(FL_BACKGROUND_COLOR);
- syseffectui->labeltype(FL_NORMAL_LABEL);
- syseffectui->labelfont(0);
- syseffectui->labelsize(14);
- syseffectui->labelcolor(FL_FOREGROUND_COLOR);
- syseffectui->align(Fl_Align(FL_ALIGN_TOP));
- syseffectui->when(FL_WHEN_RELEASE);
- o->init(master->sysefx[nsyseff]);
- syseffectui->end();
- } // EffUI* syseffectui
- syseffectuigroup->end();
- } // Fl_Group* syseffectuigroup
- { Fl_Button* o = new Fl_Button(90, 181, 85, 22, "Send to...");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Send);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(180, 187, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(210, 187, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(0, 165, 390, 145, "Insertion Effects");
- o->labelsize(15);
- o->align(Fl_Align(FL_ALIGN_TOP_RIGHT));
- o->hide();
- { Fl_Counter* o = inseffnocounter = new Fl_Counter(5, 183, 80, 22, "Ins.Effect No.");
- inseffnocounter->type(1);
- inseffnocounter->labelfont(1);
- inseffnocounter->labelsize(10);
- inseffnocounter->minimum(0);
- inseffnocounter->maximum(127);
- inseffnocounter->step(1);
- inseffnocounter->value(1);
- inseffnocounter->textfont(1);
- inseffnocounter->callback((Fl_Callback*)cb_inseffnocounter);
- inseffnocounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(1,NUM_INS_EFX);
- o->value(ninseff+1);
- } // Fl_Counter* inseffnocounter
- { Fl_Choice* o = insefftype = new Fl_Choice(285, 173, 100, 22, "EffType");
- insefftype->down_box(FL_BORDER_BOX);
- insefftype->labelsize(10);
- insefftype->callback((Fl_Callback*)cb_insefftype);
- insefftype->menu(menu_insefftype);
- o->value(master->insefx[ninseff]->geteffect());
- if (master->Pinsparts[ninseff]== -1) o->deactivate();
- } // Fl_Choice* insefftype
- { inseffectuigroup = new Fl_Group(5, 205, 380, 95);
- inseffectuigroup->box(FL_FLAT_BOX);
- inseffectuigroup->color((Fl_Color)48);
- { EffUI* o = inseffectui = new EffUI(5, 205, 380, 90);
- inseffectui->box(FL_UP_FRAME);
- inseffectui->color(FL_BACKGROUND_COLOR);
- inseffectui->selection_color(FL_BACKGROUND_COLOR);
- inseffectui->labeltype(FL_NORMAL_LABEL);
- inseffectui->labelfont(0);
- inseffectui->labelsize(14);
- inseffectui->labelcolor(FL_FOREGROUND_COLOR);
- inseffectui->align(Fl_Align(FL_ALIGN_TOP));
- inseffectui->when(FL_WHEN_RELEASE);
- o->init(master->insefx[ninseff]);
- if (master->Pinsparts[ninseff]== -1) o->deactivate();
- inseffectui->end();
- } // EffUI* inseffectui
- inseffectuigroup->end();
- } // Fl_Group* inseffectuigroup
- { Fl_Choice* o = inseffpart = new Fl_Choice(95, 183, 80, 22, "Insert To.");
- inseffpart->down_box(FL_BORDER_BOX);
- inseffpart->labelfont(1);
- inseffpart->labelsize(10);
- inseffpart->textsize(10);
- inseffpart->callback((Fl_Callback*)cb_inseffpart);
- inseffpart->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("Master Out");o->add("Off");
- char tmp[50]; for (int i=0;iadd(tmp);};
- o->value(master->Pinsparts[ninseff]+2);
- } // Fl_Choice* inseffpart
- { Fl_Button* o = new Fl_Button(180, 185, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(210, 185, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P1);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Tabs* o
- { Fl_Button* o = new Fl_Button(320, 87, 65, 23, "Scales");
- o->color((Fl_Color)51);
- o->labelfont(1);
- o->callback((Fl_Callback*)cb_Scales);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(150, 40, 117, 45);
- o->box(FL_UP_FRAME);
- { recordbutton = new Fl_Button(159, 46, 21, 21, "Rec.");
- recordbutton->tooltip("Start Recording");
- recordbutton->box(FL_ROUND_UP_BOX);
- recordbutton->color(FL_RED);
- recordbutton->labelfont(1);
- recordbutton->labelsize(10);
- recordbutton->callback((Fl_Callback*)cb_recordbutton);
- recordbutton->align(Fl_Align(FL_ALIGN_BOTTOM));
- recordbutton->deactivate();
- } // Fl_Button* recordbutton
- { stopbutton = new Fl_Button(237, 46, 21, 21, "Stop");
- stopbutton->tooltip("Stop Recording and close the audio file");
- stopbutton->box(FL_THIN_UP_BOX);
- stopbutton->color((Fl_Color)4);
- stopbutton->labelfont(1);
- stopbutton->labelsize(10);
- stopbutton->callback((Fl_Callback*)cb_stopbutton);
- stopbutton->align(Fl_Align(FL_ALIGN_BOTTOM));
- stopbutton->deactivate();
- } // Fl_Button* stopbutton
- { pausebutton = new Fl_Button(198, 46, 21, 21, "@||");
- pausebutton->tooltip("Pause Recording");
- pausebutton->box(FL_THIN_UP_BOX);
- pausebutton->color((Fl_Color)4);
- pausebutton->selection_color((Fl_Color)4);
- pausebutton->labelfont(1);
- pausebutton->labelcolor((Fl_Color)3);
- pausebutton->callback((Fl_Callback*)cb_pausebutton);
- pausebutton->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- pausebutton->deactivate();
- } // Fl_Button* pausebutton
- { pauselabel = new Fl_Box(192, 66, 30, 15, "Pause");
- pauselabel->labelfont(1);
- pauselabel->labelsize(10);
- pauselabel->deactivate();
- } // Fl_Box* pauselabel
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(1, 490, 389, 55);
- { VUMeter* o = new VUMeter(5, 490, 380, 30, "VU-Meter");
- o->box(FL_FLAT_BOX);
- o->color((Fl_Color)48);
- o->selection_color((Fl_Color)75);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->align(Fl_Align(FL_ALIGN_CENTER));
- o->when(FL_WHEN_RELEASE);
- o->init(master,-1);
- } // VUMeter* o
- o->end();
- } // Fl_Group* o
- { Fl_Check_Button* o = nrpnbutton = new Fl_Check_Button(10, 115, 60, 25, "NRPN");
- nrpnbutton->tooltip("Receive NRPNs");
- nrpnbutton->down_box(FL_DOWN_BOX);
- nrpnbutton->labelsize(12);
- nrpnbutton->callback((Fl_Callback*)cb_nrpnbutton);
- o->value(master->ctl.NRPN.receive);
- } // Fl_Check_Button* nrpnbutton
- { Fl_Counter* o = npartcounter = new Fl_Counter(5, 312, 50, 18);
- npartcounter->tooltip("The part number");
- npartcounter->type(1);
- npartcounter->labelfont(1);
- npartcounter->minimum(0);
- npartcounter->maximum(127);
- npartcounter->step(1);
- npartcounter->value(1);
- npartcounter->textfont(1);
- npartcounter->callback((Fl_Callback*)cb_npartcounter);
- o->bounds(1,NUM_MIDI_PARTS);
- bankui->init(o);
- } // Fl_Counter* npartcounter
- { Fl_Button* o = new Fl_Button(280, 87, 40, 23, "vK");
- o->tooltip("Virtual Keyboard");
- o->color((Fl_Color)51);
- o->labelfont(1);
- o->callback((Fl_Callback*)cb_vK);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(85, 32, 55, 110);
- o->box(FL_UP_FRAME);
- { Fl_Button* o = new Fl_Button(90, 37, 45, 23, "Reset");
- o->tooltip("Master fine detune reset");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Reset);
- } // Fl_Button* o
- { WidgetPDial* o = globalfinedetuneslider = new WidgetPDial(90, 68, 45, 45, "Fine Detune");
- globalfinedetuneslider->tooltip("global fine detune");
- globalfinedetuneslider->box(FL_ROUND_UP_BOX);
- globalfinedetuneslider->color(FL_BACKGROUND_COLOR);
- globalfinedetuneslider->selection_color(FL_INACTIVE_COLOR);
- globalfinedetuneslider->labeltype(FL_NORMAL_LABEL);
- globalfinedetuneslider->labelfont(0);
- globalfinedetuneslider->labelsize(9);
- globalfinedetuneslider->labelcolor(FL_FOREGROUND_COLOR);
- globalfinedetuneslider->maximum(127);
- globalfinedetuneslider->step(1);
- globalfinedetuneslider->value(64);
- globalfinedetuneslider->callback((Fl_Callback*)cb_globalfinedetuneslider);
- globalfinedetuneslider->align(Fl_Align(130));
- globalfinedetuneslider->when(FL_WHEN_CHANGED);
- o->value(master->microtonal.Pglobalfinedetune);
- } // WidgetPDial* globalfinedetuneslider
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(280, 112, 105, 23, "Panel Window");
- o->tooltip("Panel Window");
- o->color((Fl_Color)51);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Panel);
- } // Fl_Button* o
- { sm_indicator1 = new Fl_Button(350, 5, 35, 15, "SM");
- sm_indicator1->box(FL_ROUNDED_BOX);
- sm_indicator1->down_box(FL_ROUNDED_BOX);
- sm_indicator1->color(FL_DARK2);
- sm_indicator1->selection_color((Fl_Color)93);
- sm_indicator1->labelfont(3);
- sm_indicator1->labelcolor(FL_DARK3);
- sm_indicator1->deactivate();
- } // Fl_Button* sm_indicator1
- masterwindow->xclass("zynaddsubfx");
- masterwindow->end();
- } // Fl_Double_Window* masterwindow
- { aboutwindow = new Fl_Double_Window(365, 280, "Copyright...");
- aboutwindow->user_data((void*)(this));
- { Fl_Box* o = new Fl_Box(15, 35, 335, 55, "Copyright (c) 2002-2009 Nasca O. PAUL and others. Please read AUTHORS.txt");
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelsize(15);
- o->align(Fl_Align(192|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(15, 90, 335, 145, "This is free software; you may redistribute it and/or modify it under the ter\
-ms of the \nversion 2 (or any later version) of the GNU General Public License\
- as published by the Free Software Fundation.\n This program comes with\n ABS\
-OLUTELY NO WARRANTY. \n See the version 2 (or any later version) of the \nGNU \
-General Public License for details.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Button* o = new Fl_Button(80, 245, 190, 25, "Close this window");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Box* o = new Fl_Box(15, 5, 335, 30, "ZynAddSubFX");
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(20);
- o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- aboutwindow->end();
- } // Fl_Double_Window* aboutwindow
- { syseffsendwindow = new Fl_Double_Window(120, 250, "System Effects Send");
- syseffsendwindow->user_data((void*)(this));
- { Fl_Scroll* o = new Fl_Scroll(0, 45, 120, 170);
- o->box(FL_FLAT_BOX);
- for (int neff1=0;neff1x()+(neff2-1)*35,o->y()+15+neff1*50,30,30);syseffsend[neff1][neff2]->label("aaa");syseffsend[neff1][neff2]->init(master,neff1,neff2);};
- o->end();
- Fl_Group::current()->resizable(o);
- } // Fl_Scroll* o
- { Fl_Button* o = new Fl_Button(25, 220, 80, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close1);
- } // Fl_Button* o
- { Fl_Box* o = new Fl_Box(5, 5, 110, 35, "Send system effect\'s output to other system effects");
- o->labelsize(10);
- o->align(Fl_Align(192));
- } // Fl_Box* o
- syseffsendwindow->end();
- } // Fl_Double_Window* syseffsendwindow
- { panelwindow = new Fl_Double_Window(630, 635, "ZynAddSubFX Panel");
- panelwindow->user_data((void*)(this));
- { Fl_Scroll* o = new Fl_Scroll(0, 5, 570, 310);
- o->type(1);
- o->box(FL_THIN_UP_BOX);
- { Fl_Pack* o = new Fl_Pack(5, 10, 560, 285);
- o->type(1);
- for (int i=0;iinit(master,i,bankui);}
- o->end();
- } // Fl_Pack* o
- o->end();
- } // Fl_Scroll* o
- { Fl_Scroll* o = new Fl_Scroll(0, 320, 570, 310);
- o->type(1);
- o->box(FL_THIN_UP_BOX);
- { Fl_Pack* o = new Fl_Pack(5, 325, 560, 285);
- o->type(1);
- for (int i=NUM_MIDI_PARTS/2;iinit(master,i,bankui);}
- o->end();
- } // Fl_Pack* o
- o->end();
- } // Fl_Scroll* o
- { Fl_Button* o = new Fl_Button(575, 605, 50, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(13);
- o->callback((Fl_Callback*)cb_Close2);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(575, 570, 55, 25, "Refresh");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(13);
- o->callback((Fl_Callback*)cb_Refresh);
- } // Fl_Button* o
- panelwindow->end();
- } // Fl_Double_Window* panelwindow
- { simplemasterwindow = new Fl_Double_Window(600, 335, "ZynAddSubFX");
- simplemasterwindow->callback((Fl_Callback*)cb_simplemasterwindow, (void*)(this));
- { simplemastermenu = new Fl_Menu_Bar(0, 0, 690, 25);
- simplemastermenu->menu(menu_simplemastermenu);
- } // Fl_Menu_Bar* simplemastermenu
- { Fl_Group* o = simplelistitemgroup = new Fl_Group(125, 65, 215, 145);
- simplelistitemgroup->box(FL_UP_FRAME);
- { partname = new Fl_Button(130, 72, 205, 18);
- partname->box(FL_THIN_DOWN_BOX);
- partname->down_box(FL_FLAT_BOX);
- partname->color(FL_LIGHT1);
- partname->labelfont(1);
- partname->labelsize(11);
- partname->callback((Fl_Callback*)cb_partname1);
- partname->align(Fl_Align(192|FL_ALIGN_INSIDE));
- } // Fl_Button* partname
- { Fl_Slider* o = partpanning = new Fl_Slider(185, 95, 145, 15, "Pan");
- partpanning->type(5);
- partpanning->box(FL_NO_BOX);
- partpanning->labelsize(11);
- partpanning->maximum(127);
- partpanning->step(1);
- partpanning->value(64);
- partpanning->callback((Fl_Callback*)cb_partpanning1);
- o->value(master->part[npart]->Ppanning);
- } // Fl_Slider* partpanning
- { Fl_Choice* o = partrcv = new Fl_Choice(140, 157, 65, 18, "Midi Channel Receive");
- partrcv->tooltip("receive from Midi channel");
- partrcv->down_box(FL_BORDER_BOX);
- partrcv->labelsize(10);
- partrcv->textfont(1);
- partrcv->callback((Fl_Callback*)cb_partrcv1);
- partrcv->align(Fl_Align(130));
- char nrstr[10]; for(int i=0;iadd(nrstr); else o->add("Dr10");};
- o->value(master->part[npart]->Prcvchn);
- } // Fl_Choice* partrcv
- { WidgetPDial* o = partvolume = new WidgetPDial(135, 95, 45, 40);
- partvolume->box(FL_NO_BOX);
- partvolume->color(FL_BACKGROUND_COLOR);
- partvolume->selection_color(FL_INACTIVE_COLOR);
- partvolume->labeltype(FL_NORMAL_LABEL);
- partvolume->labelfont(0);
- partvolume->labelsize(9);
- partvolume->labelcolor(FL_FOREGROUND_COLOR);
- partvolume->maximum(127);
- partvolume->step(1);
- partvolume->callback((Fl_Callback*)cb_partvolume1);
- partvolume->align(Fl_Align(FL_ALIGN_BOTTOM));
- partvolume->when(FL_WHEN_CHANGED);
- o->value(master->part[npart]->Pvolume);
- } // WidgetPDial* partvolume
- { Fl_Box* o = new Fl_Box(130, 130, 55, 20, "Volume");
- o->labelsize(10);
- } // Fl_Box* o
- { Fl_Check_Button* o = simplepartportamento = new Fl_Check_Button(193, 127, 79, 23, "Portamento");
- simplepartportamento->tooltip("Enable/Disable the portamento");
- simplepartportamento->down_box(FL_DOWN_BOX);
- simplepartportamento->labelsize(9);
- simplepartportamento->callback((Fl_Callback*)cb_simplepartportamento);
- o->value(master->part[npart]->ctl.portamento.portamento);
- } // Fl_Check_Button* simplepartportamento
- { Fl_Counter* o = simpleminkcounter = new Fl_Counter(210, 158, 40, 15, "Min.key");
- simpleminkcounter->tooltip("Minimum key (that the part receives NoteOn messages)");
- simpleminkcounter->type(1);
- simpleminkcounter->labelsize(10);
- simpleminkcounter->minimum(0);
- simpleminkcounter->maximum(127);
- simpleminkcounter->step(1);
- simpleminkcounter->textsize(10);
- simpleminkcounter->callback((Fl_Callback*)cb_simpleminkcounter);
- o->value(master->part[npart]->Pminkey);
- } // Fl_Counter* simpleminkcounter
- { Fl_Counter* o = simplemaxkcounter = new Fl_Counter(255, 158, 40, 15, "Max.key");
- simplemaxkcounter->tooltip("Maximum key (that the part receives NoteOn messages)");
- simplemaxkcounter->type(1);
- simplemaxkcounter->labelsize(10);
- simplemaxkcounter->minimum(0);
- simplemaxkcounter->maximum(127);
- simplemaxkcounter->step(1);
- simplemaxkcounter->textsize(10);
- simplemaxkcounter->callback((Fl_Callback*)cb_simplemaxkcounter);
- o->value(master->part[npart]->Pmaxkey);
- } // Fl_Counter* simplemaxkcounter
- { Fl_Button* o = new Fl_Button(230, 188, 15, 12, "m");
- o->tooltip("set the minimum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_m);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(260, 188, 15, 12, "M");
- o->tooltip("set the maximum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_M);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(245, 188, 15, 12, "R");
- o->tooltip("reset the minimum key to 0 and maximum key to 127");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_R);
- } // Fl_Button* o
- { Fl_Counter* o = simplepartkeyshiftcounter = new Fl_Counter(280, 120, 50, 20, "KeyShift");
- simplepartkeyshiftcounter->type(1);
- simplepartkeyshiftcounter->labelsize(11);
- simplepartkeyshiftcounter->minimum(-64);
- simplepartkeyshiftcounter->maximum(64);
- simplepartkeyshiftcounter->step(1);
- simplepartkeyshiftcounter->callback((Fl_Callback*)cb_simplepartkeyshiftcounter);
- o->lstep(12);
- o->value(master->part[npart]->Pkeyshift-64);
- } // Fl_Counter* simplepartkeyshiftcounter
- { simplesyseffsend = new WidgetPDial(300, 160, 30, 30);
- simplesyseffsend->box(FL_NO_BOX);
- simplesyseffsend->color(FL_BACKGROUND_COLOR);
- simplesyseffsend->selection_color(FL_INACTIVE_COLOR);
- simplesyseffsend->labeltype(FL_NORMAL_LABEL);
- simplesyseffsend->labelfont(0);
- simplesyseffsend->labelsize(14);
- simplesyseffsend->labelcolor(FL_FOREGROUND_COLOR);
- simplesyseffsend->maximum(127);
- simplesyseffsend->step(1);
- simplesyseffsend->callback((Fl_Callback*)cb_simplesyseffsend);
- simplesyseffsend->align(Fl_Align(FL_ALIGN_BOTTOM));
- simplesyseffsend->when(FL_WHEN_CHANGED);
- } // WidgetPDial* simplesyseffsend
- { Fl_Box* o = new Fl_Box(295, 190, 40, 15, "Effect");
- o->labelsize(10);
- } // Fl_Box* o
- if (master->part[npart]->Penabled==0) o->deactivate();
- simplelistitemgroup->end();
- } // Fl_Group* simplelistitemgroup
- { Fl_Check_Button* o = partenabled = new Fl_Check_Button(250, 40, 85, 20, "Enabled");
- partenabled->down_box(FL_DOWN_BOX);
- partenabled->labeltype(FL_EMBOSSED_LABEL);
- partenabled->labelfont(1);
- partenabled->labelsize(13);
- partenabled->callback((Fl_Callback*)cb_partenabled1);
- partenabled->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
- //char tmp[10];snprintf(tmp,10,"%d",npart+1);o->copy_label(tmp);
- o->value(master->part[npart]->Penabled);
- } // Fl_Check_Button* partenabled
- { VirKeys* o = virkeys = new VirKeys(5, 215, 590, 80, "Keyboard");
- virkeys->box(FL_BORDER_BOX);
- virkeys->color((Fl_Color)17);
- virkeys->selection_color(FL_BACKGROUND_COLOR);
- virkeys->labeltype(FL_NORMAL_LABEL);
- virkeys->labelfont(0);
- virkeys->labelsize(14);
- virkeys->labelcolor(FL_FOREGROUND_COLOR);
- virkeys->align(Fl_Align(FL_ALIGN_CENTER));
- virkeys->when(FL_WHEN_RELEASE);
- o->init(master);
- } // VirKeys* virkeys
- { Fl_Group* o = new Fl_Group(340, 30, 255, 185);
- { Fl_Tabs* o = new Fl_Tabs(345, 35, 245, 175);
- o->box(FL_UP_FRAME);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- { Fl_Group* o = new Fl_Group(345, 55, 245, 155, "System Effects");
- o->box(FL_UP_FRAME);
- o->labelfont(1);
- o->labelsize(12);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- { Fl_Counter* o = simplesyseffnocounter = new Fl_Counter(350, 75, 80, 20, "Sys.Effect No.");
- simplesyseffnocounter->type(1);
- simplesyseffnocounter->labelfont(1);
- simplesyseffnocounter->labelsize(10);
- simplesyseffnocounter->minimum(0);
- simplesyseffnocounter->maximum(127);
- simplesyseffnocounter->step(1);
- simplesyseffnocounter->value(1);
- simplesyseffnocounter->textfont(1);
- simplesyseffnocounter->callback((Fl_Callback*)cb_simplesyseffnocounter);
- simplesyseffnocounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(1,NUM_SYS_EFX);
- o->value(nsyseff+1);
- } // Fl_Counter* simplesyseffnocounter
- { Fl_Choice* o = simplesysefftype = new Fl_Choice(515, 80, 70, 15, "EffType");
- simplesysefftype->down_box(FL_BORDER_BOX);
- simplesysefftype->labelsize(10);
- simplesysefftype->callback((Fl_Callback*)cb_simplesysefftype);
- simplesysefftype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- simplesysefftype->menu(menu_simplesysefftype);
- o->value(master->sysefx[nsyseff]->geteffect());
- } // Fl_Choice* simplesysefftype
- { simplesyseffectuigroup = new Fl_Group(350, 95, 235, 95);
- simplesyseffectuigroup->color((Fl_Color)48);
- { SimpleEffUI* o = simplesyseffectui = new SimpleEffUI(350, 95, 234, 95);
- simplesyseffectui->box(FL_NO_BOX);
- simplesyseffectui->color(FL_BACKGROUND_COLOR);
- simplesyseffectui->selection_color(FL_BACKGROUND_COLOR);
- simplesyseffectui->labeltype(FL_NORMAL_LABEL);
- simplesyseffectui->labelfont(0);
- simplesyseffectui->labelsize(14);
- simplesyseffectui->labelcolor(FL_FOREGROUND_COLOR);
- simplesyseffectui->align(Fl_Align(FL_ALIGN_TOP));
- simplesyseffectui->when(FL_WHEN_RELEASE);
- o->init(master->sysefx[nsyseff]);
- simplesyseffectui->end();
- } // SimpleEffUI* simplesyseffectui
- simplesyseffectuigroup->end();
- } // Fl_Group* simplesyseffectuigroup
- { Fl_Button* o = new Fl_Button(435, 75, 75, 20, "Send to...");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Send1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(560, 65, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P2);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(345, 55, 245, 155, "Insertion Effects");
- o->box(FL_UP_FRAME);
- o->labelfont(1);
- o->labelsize(12);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- o->hide();
- { Fl_Counter* o = simpleinseffnocounter = new Fl_Counter(350, 75, 80, 20, "Ins.Effect No.");
- simpleinseffnocounter->type(1);
- simpleinseffnocounter->labelfont(1);
- simpleinseffnocounter->labelsize(10);
- simpleinseffnocounter->minimum(0);
- simpleinseffnocounter->maximum(127);
- simpleinseffnocounter->step(1);
- simpleinseffnocounter->value(1);
- simpleinseffnocounter->textfont(1);
- simpleinseffnocounter->callback((Fl_Callback*)cb_simpleinseffnocounter);
- simpleinseffnocounter->align(Fl_Align(FL_ALIGN_TOP));
- o->bounds(1,NUM_INS_EFX);
- o->value(ninseff+1);
- } // Fl_Counter* simpleinseffnocounter
- { Fl_Choice* o = simpleinsefftype = new Fl_Choice(515, 80, 70, 15, "EffType");
- simpleinsefftype->down_box(FL_BORDER_BOX);
- simpleinsefftype->labelsize(10);
- simpleinsefftype->callback((Fl_Callback*)cb_simpleinsefftype);
- simpleinsefftype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- simpleinsefftype->menu(menu_simpleinsefftype);
- o->value(master->insefx[ninseff]->geteffect());
- if (master->Pinsparts[ninseff]== -1) o->deactivate();
- } // Fl_Choice* simpleinsefftype
- { simpleinseffectuigroup = new Fl_Group(350, 95, 234, 95);
- simpleinseffectuigroup->box(FL_FLAT_BOX);
- simpleinseffectuigroup->color((Fl_Color)48);
- { SimpleEffUI* o = simpleinseffectui = new SimpleEffUI(350, 95, 234, 95);
- simpleinseffectui->box(FL_NO_BOX);
- simpleinseffectui->color(FL_BACKGROUND_COLOR);
- simpleinseffectui->selection_color(FL_BACKGROUND_COLOR);
- simpleinseffectui->labeltype(FL_NORMAL_LABEL);
- simpleinseffectui->labelfont(0);
- simpleinseffectui->labelsize(14);
- simpleinseffectui->labelcolor(FL_FOREGROUND_COLOR);
- simpleinseffectui->align(Fl_Align(FL_ALIGN_TOP));
- simpleinseffectui->when(FL_WHEN_RELEASE);
- o->init(master->insefx[ninseff]);
- if (master->Pinsparts[ninseff]== -1) o->deactivate();
- simpleinseffectui->end();
- } // SimpleEffUI* simpleinseffectui
- simpleinseffectuigroup->end();
- } // Fl_Group* simpleinseffectuigroup
- { Fl_Choice* o = simpleinseffpart = new Fl_Choice(435, 75, 80, 20, "Insert To.");
- simpleinseffpart->down_box(FL_BORDER_BOX);
- simpleinseffpart->labelfont(1);
- simpleinseffpart->labelsize(10);
- simpleinseffpart->textsize(10);
- simpleinseffpart->callback((Fl_Callback*)cb_simpleinseffpart);
- simpleinseffpart->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("Master Out");o->add("Off");
- char tmp[50]; for (int i=0;iadd(tmp);};
- o->value(master->Pinsparts[ninseff]+2);
- } // Fl_Choice* simpleinseffpart
- { Fl_Button* o = new Fl_Button(560, 65, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P3);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Tabs* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 300, 590, 30);
- o->box(FL_ENGRAVED_FRAME);
- { VUMeter* o = new VUMeter(5, 300, 590, 30, "VU-Meter");
- o->box(FL_FLAT_BOX);
- o->color((Fl_Color)41);
- o->selection_color((Fl_Color)75);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(14);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->align(Fl_Align(FL_ALIGN_CENTER));
- o->when(FL_WHEN_RELEASE);
- o->init(master,-1);
- } // VUMeter* o
- o->end();
- } // Fl_Group* o
- { WidgetPDial* o = simplemastervolumedial = new WidgetPDial(10, 35, 40, 40, "Master Volume");
- simplemastervolumedial->tooltip("Master Volume");
- simplemastervolumedial->box(FL_ROUND_UP_BOX);
- simplemastervolumedial->color(FL_BACKGROUND_COLOR);
- simplemastervolumedial->selection_color(FL_INACTIVE_COLOR);
- simplemastervolumedial->labeltype(FL_NORMAL_LABEL);
- simplemastervolumedial->labelfont(1);
- simplemastervolumedial->labelsize(11);
- simplemastervolumedial->labelcolor(FL_FOREGROUND_COLOR);
- simplemastervolumedial->maximum(127);
- simplemastervolumedial->step(1);
- simplemastervolumedial->callback((Fl_Callback*)cb_simplemastervolumedial);
- simplemastervolumedial->align(Fl_Align(130));
- simplemastervolumedial->when(FL_WHEN_CHANGED);
- o->value(master->Pvolume);
- } // WidgetPDial* simplemastervolumedial
- { Fl_Counter* o = simplemasterkeyshiftcounter = new Fl_Counter(15, 110, 90, 20, "Master KeyShift");
- simplemasterkeyshiftcounter->labelsize(11);
- simplemasterkeyshiftcounter->minimum(-64);
- simplemasterkeyshiftcounter->maximum(64);
- simplemasterkeyshiftcounter->step(1);
- simplemasterkeyshiftcounter->callback((Fl_Callback*)cb_simplemasterkeyshiftcounter);
- o->lstep(12);
- o->value(master->Pkeyshift-64);
- } // Fl_Counter* simplemasterkeyshiftcounter
- { Fl_Button* o = new Fl_Button(5, 149, 115, 31, "Stop ALL sounds!");
- o->color((Fl_Color)90);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Stop);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(70, 30, 50, 17, "Reset");
- o->tooltip("Master fine detune reset");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Reset1);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- { WidgetPDial* o = simpleglobalfinedetuneslider = new WidgetPDial(80, 50, 30, 30, "Fine Detune");
- simpleglobalfinedetuneslider->tooltip("global fine detune");
- simpleglobalfinedetuneslider->box(FL_ROUND_UP_BOX);
- simpleglobalfinedetuneslider->color(FL_BACKGROUND_COLOR);
- simpleglobalfinedetuneslider->selection_color(FL_INACTIVE_COLOR);
- simpleglobalfinedetuneslider->labeltype(FL_NORMAL_LABEL);
- simpleglobalfinedetuneslider->labelfont(0);
- simpleglobalfinedetuneslider->labelsize(11);
- simpleglobalfinedetuneslider->labelcolor(FL_FOREGROUND_COLOR);
- simpleglobalfinedetuneslider->maximum(127);
- simpleglobalfinedetuneslider->step(1);
- simpleglobalfinedetuneslider->value(64);
- simpleglobalfinedetuneslider->callback((Fl_Callback*)cb_simpleglobalfinedetuneslider);
- simpleglobalfinedetuneslider->align(Fl_Align(130));
- simpleglobalfinedetuneslider->when(FL_WHEN_CHANGED);
- o->value(master->microtonal.Pglobalfinedetune);
- } // WidgetPDial* simpleglobalfinedetuneslider
- { Fl_Counter* o = simplenpartcounter = new Fl_Counter(170, 40, 70, 20, "Part");
- simplenpartcounter->tooltip("The part number");
- simplenpartcounter->type(1);
- simplenpartcounter->labelfont(1);
- simplenpartcounter->minimum(0);
- simplenpartcounter->maximum(127);
- simplenpartcounter->step(1);
- simplenpartcounter->value(1);
- simplenpartcounter->textfont(1);
- simplenpartcounter->callback((Fl_Callback*)cb_simplenpartcounter);
- simplenpartcounter->align(Fl_Align(FL_ALIGN_LEFT));
- o->bounds(1,NUM_MIDI_PARTS);
- } // Fl_Counter* simplenpartcounter
- { Fl_Counter* o = new Fl_Counter(5, 190, 55, 20, "Keyb.Oct.");
- o->tooltip("Midi Octave");
- o->type(1);
- o->labelsize(11);
- o->minimum(0);
- o->maximum(5);
- o->step(1);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Keyb);
- o->align(Fl_Align(FL_ALIGN_RIGHT));
- o->when(FL_WHEN_RELEASE_ALWAYS);
- o->value(virkeys->midioct);
- } // Fl_Counter* o
- { sm_indicator2 = new Fl_Button(560, 5, 35, 15, "SM");
- sm_indicator2->box(FL_ROUNDED_BOX);
- sm_indicator2->down_box(FL_ROUNDED_BOX);
- sm_indicator2->color(FL_DARK2);
- sm_indicator2->selection_color((Fl_Color)93);
- sm_indicator2->labelfont(3);
- sm_indicator2->labelcolor(FL_DARK3);
- sm_indicator2->deactivate();
- } // Fl_Button* sm_indicator2
- simplemasterwindow->end();
- } // Fl_Double_Window* simplemasterwindow
- { selectuiwindow = new Fl_Double_Window(430, 250, "User Interface mode");
- selectuiwindow->callback((Fl_Callback*)cb_selectuiwindow, (void*)(this));
- { Fl_Box* o = new Fl_Box(5, 5, 425, 40, "Welcome to ZynAddSubFX");
- o->labeltype(FL_SHADOW_LABEL);
- o->labelfont(1);
- o->labelsize(26);
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(10, 50, 265, 25, "Please choose the interface mode:");
- o->labelfont(1);
- o->labelsize(13);
- } // Fl_Box* o
- { Fl_Button* o = new Fl_Button(10, 165, 100, 35, "Advanced");
- o->color((Fl_Color)229);
- o->labelfont(1);
- o->labelsize(16);
- o->callback((Fl_Callback*)cb_Advanced);
- } // Fl_Button* o
- { Fl_Box* o = new Fl_Box(110, 165, 310, 35, ".. if you have used ZynAddSubFX before, or you like to have full controll to \
-all parameters.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Button* o = new Fl_Button(10, 80, 100, 65, "Beginner");
- o->color((Fl_Color)238);
- o->labelfont(1);
- o->labelsize(16);
- o->callback((Fl_Callback*)cb_Beginner);
- } // Fl_Button* o
- { Fl_Box* o = new Fl_Box(110, 75, 320, 75, "..if you are a beginner, you prefer using presets or you prefer to use simple\
-r user interfaces. Most functionality of ZynAddSubFX will be hidden in this mo\
-de to make simple the learning/using it.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(30, 215, 360, 25, "You can switch the interface modes anytime you want.");
- o->box(FL_BORDER_BOX);
- o->color((Fl_Color)51);
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- selectuiwindow->set_non_modal();
- selectuiwindow->end();
- } // Fl_Double_Window* selectuiwindow
- return selectuiwindow;
-}
-
-void MasterUI::updatesendwindow() {
- for (int neff1=0;neff1value(master->Psysefxsend[neff1][neff2]);
-}
-
-void MasterUI::updatepanel() {
- for (int npart=0;npartrefresh();
- };
-}
-
-void MasterUI::setfilelabel(const char *filename) {
- if (filename!=NULL) snprintf(&masterwindowlabel[0],100,"%s - ZynAddSubFX",fl_filename_name(filename));
- else snprintf(&masterwindowlabel[0],100,"%s","ZynAddSubFX");
- masterwindowlabel[99]='\0';
- masterwindow->label(&masterwindowlabel[0]);
- simplemasterwindow->label(&masterwindowlabel[0]);
-}
-
-MasterUI::MasterUI(Master *master_,int *exitprogram_) {
- master=master_;
- exitprogram=exitprogram_;
- ninseff=0;
- nsyseff=0;
- npart=0;
-
- for (int i=0;imicrotonal);
- virkeyboard=new VirKeyboard(master);
- bankui=new BankUI(master,&npart);
- configui=new ConfigUI();
-
- make_window();
- presetsui=new PresetsUI();
- setfilelabel(NULL);
- swapefftype=0;
- simplerefresh();
-}
-
-MasterUI::~MasterUI() {
- masterwindow->hide();
- delete masterwindow;
- simplemasterwindow->hide();
- delete simplemasterwindow;
- aboutwindow->hide();
- delete aboutwindow;
- syseffsendwindow->hide();
- delete syseffsendwindow;
-
- delete virkeyboard;
- delete microtonalui;
- delete bankui;
- delete configui;
-
- delete presetsui;
- delete panelwindow;
- delete selectuiwindow;
-}
-
-void MasterUI::showUI() {
- switch (config.cfg.UserInterfaceMode){
- case 0:selectuiwindow->show();
- break;
- case 1:masterwindow->show();
- break;
- case 2:simplemasterwindow->show();
- break;
- };
-}
-
-void MasterUI::simplerefresh() {
- partenabled->value(master->part[npart]->Penabled);
- if (master->part[npart]->Penabled!=0) simplelistitemgroup->activate();
- else simplelistitemgroup->deactivate();
-
- partvolume->value(master->part[npart]->Pvolume);
- partpanning->value(master->part[npart]->Ppanning);
- partrcv->value(master->part[npart]->Prcvchn);
-
- if (master->part[npart]->Pname[0]!=0) partname->label((char *)master->part[npart]->Pname);
- else partname->label("Click here to load a instrument");
-
- simplelistitemgroup->redraw();
- simplepartportamento->value(master->part[npart]->ctl.portamento.portamento);
- simpleminkcounter->value(master->part[npart]->Pminkey);
- simplemaxkcounter->value(master->part[npart]->Pmaxkey);
-
- simplepartkeyshiftcounter->value(master->part[npart]->Pkeyshift-64);
- simplesyseffsend->value(master->Psysefxvol[nsyseff][npart]);
-}
-
-void MasterUI::do_new_master_unconditional() {
- delete microtonalui;
-
- pthread_mutex_lock(&master->mutex);
- master->defaults();
- pthread_mutex_unlock(&master->mutex);
-
- npartcounter->value(1);
- refresh_master_ui();
- updatepanel();
-}
-
-void MasterUI::do_new_master() {
- if (fl_choice("Clear *ALL* the parameters ?","No","Yes",NULL)){
- do_new_master_unconditional();
- }
-}
-
-int MasterUI::do_load_master_unconditional(const char *filename, const char *display_name) {
- 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;
-}
-
-void MasterUI::do_load_master(const char* file ) {
- const char *filename;
- if (file == NULL) {
- filename=fl_file_chooser("Open:","({*.xmz})",NULL,0);
- if (filename==NULL) return;
- }
- else {
- filename = file;
- }
-
- 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.");
-}
-
-void MasterUI::do_save_master(const char* file ) {
- const char *filename;
- char *tmp;
- int result=0;
- if (file == NULL) {
- tmp=fl_file_chooser("Save:","({*.xmz})",NULL,0);
- if (tmp==NULL) return;
- tmp=fl_filename_setext(tmp,".xmz");
- filename=tmp;
- result=fileexists(tmp);
- if (result) {
- result=0;
- if (!fl_choice("The file exists. Overwrite it?","No","Yes",NULL)) return;
-
- }
- }
- else {
- filename = file;
- }
-
-
- pthread_mutex_lock(&master->mutex);
- result=master->saveXML(filename);
- pthread_mutex_unlock(&master->mutex);
-
- if (result<0) fl_alert("Error: Could not save the file.");
- else
- {
- #if USE_NSM
- if ( nsm && nsm->is_active() )
- setfilelabel( nsm->display_name );
- else
- #endif
- setfilelabel(filename);
- }
- updatepanel();
-}
-
-void MasterUI::refresh_master_ui() {
- ninseff=0;
- nsyseff=0;
- npart=0;
-
- //the Master UI
- npartcounter->do_callback();
- syseffnocounter->do_callback();
- inseffnocounter->do_callback();
- masterkeyshiftcounter->value(master->Pkeyshift-64);
- mastervolumedial->value(master->Pvolume);
- globalfinedetuneslider->value(master->microtonal.Pglobalfinedetune);
- microtonalui=new MicrotonalUI(&master->microtonal);
- nrpnbutton->value(master->ctl.NRPN.receive);
- updatesendwindow();
- updatepanel();
-
- //the simle MasterUI
- simplenpartcounter->value(1);
- simplesyseffnocounter->value(1);
- simpleinseffnocounter->value(1);
- simplenpartcounter->do_callback();
- simplesyseffnocounter->do_callback();
- simpleinseffnocounter->do_callback();
- simplemasterkeyshiftcounter->value(master->Pkeyshift-64);
- simplemastervolumedial->value(master->Pvolume);
- simpleglobalfinedetuneslider->value(master->microtonal.Pglobalfinedetune);
- virkeys->midich=master->part[npart]->Prcvchn;
-
- simplerefresh();
- bankui->hide();
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/MasterUI.h b/source/modules/carla_native/zynaddsubfx/UI/MasterUI.h
deleted file mode 100644
index 6ef4377f3..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/MasterUI.h
+++ /dev/null
@@ -1,460 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef MasterUI_h
-#define MasterUI_h
-#include
-#include
-#include
-#include
-#include "WidgetPDial.h"
-#include "ADnoteUI.h"
-#include "SUBnoteUI.h"
-#include "EffUI.h"
-#include "VirKeyboard.h"
-#include "ConfigUI.h"
-#include "BankUI.h"
-#include "PartUI.h"
-#include "MicrotonalUI.h"
-#include "PresetsUI.h"
-#include "NioUI.h"
-#include "../Misc/Master.h"
-#include "../Misc/Part.h"
-#include "../Misc/Util.h"
-#include "common.H"
-#if USE_NSM
-#include "NSM.H"
-extern NSM_Client *nsm;
-#endif
-#include "../globals.h"
-
-class VUMeter : public Fl_Box {
-public:
- VUMeter(int x,int y, int w, int h, const char *label=0);
- void init(Master *master_,int part_);
- void draw_master();
- void draw_part();
- void draw();
- static void tickdraw(VUMeter *o);
- static void tick(void *v);
- int handle(int event);
-private:
- Master *master;
- int npart;
- float olddbl,olddbr;
- float oldrmsdbl,oldrmsdbr;
-};
-
-class SysEffSend : public WidgetPDial {
-public:
- SysEffSend(int x,int y, int w, int h, const char *label=0);
- void init(Master *master_,int neff1_,int neff2_);
- ~SysEffSend();
- int handle(int event);
-private:
- Master *master;
- int neff1;
- int neff2;
-};
-#include
-#include
-#include
-#include
-#include
-
-class Panellistitem : public Fl_Group {
- Fl_Group* make_window();
- Fl_Group *panellistitem;
- Fl_Group *panellistitemgroup;
-public:
- Fl_Button *partname;
-private:
- void cb_partname_i(Fl_Button*, void*);
- static void cb_partname(Fl_Button*, void*);
-public:
- Fl_Slider *partvolume;
-private:
- void cb_partvolume_i(Fl_Slider*, void*);
- static void cb_partvolume(Fl_Slider*, void*);
-public:
- WidgetPDial *partpanning;
-private:
- void cb_partpanning_i(WidgetPDial*, void*);
- static void cb_partpanning(WidgetPDial*, void*);
- void cb_edit_i(Fl_Button*, void*);
- static void cb_edit(Fl_Button*, void*);
-public:
- Fl_Choice *partrcv;
-private:
- void cb_partrcv_i(Fl_Choice*, void*);
- static void cb_partrcv(Fl_Choice*, void*);
- Fl_Check_Button *partenabled;
- void cb_partenabled_i(Fl_Check_Button*, void*);
- static void cb_partenabled(Fl_Check_Button*, void*);
-public:
- Panellistitem(int x,int y, int w, int h, const char *label=0);
- void init(Master *master_, int npart_,BankUI *bankui_);
- void refresh();
- ~Panellistitem();
-private:
- int npart;
- Master *master;
- BankUI *bankui;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class MasterUI {
-public:
- Fl_Double_Window* make_window();
- Fl_Double_Window *masterwindow;
-private:
- void cb_masterwindow_i(Fl_Double_Window*, void*);
- static void cb_masterwindow(Fl_Double_Window*, void*);
-public:
- Fl_Menu_Bar *mastermenu;
- static Fl_Menu_Item menu_mastermenu[];
-private:
- void cb_New_i(Fl_Menu_*, void*);
- static void cb_New(Fl_Menu_*, void*);
- void cb_Open_i(Fl_Menu_*, void*);
- static void cb_Open(Fl_Menu_*, void*);
- void cb_Save_i(Fl_Menu_*, void*);
- static void cb_Save(Fl_Menu_*, void*);
- void cb_Load_i(Fl_Menu_*, void*);
- static void cb_Load(Fl_Menu_*, void*);
- void cb_Save1_i(Fl_Menu_*, void*);
- static void cb_Save1(Fl_Menu_*, void*);
- void cb_Show_i(Fl_Menu_*, void*);
- static void cb_Show(Fl_Menu_*, void*);
- void cb_Settings_i(Fl_Menu_*, void*);
- static void cb_Settings(Fl_Menu_*, void*);
- void cb_N_i(Fl_Menu_*, void*);
- static void cb_N(Fl_Menu_*, void*);
- void cb_Copyright_i(Fl_Menu_*, void*);
- static void cb_Copyright(Fl_Menu_*, void*);
- void cb_E_i(Fl_Menu_*, void*);
- static void cb_E(Fl_Menu_*, void*);
- void cb_Clear_i(Fl_Menu_*, void*);
- static void cb_Clear(Fl_Menu_*, void*);
- void cb_Open1_i(Fl_Menu_*, void*);
- static void cb_Open1(Fl_Menu_*, void*);
- void cb_Save2_i(Fl_Menu_*, void*);
- static void cb_Save2(Fl_Menu_*, void*);
- void cb_Show1_i(Fl_Menu_*, void*);
- static void cb_Show1(Fl_Menu_*, void*);
- void cb_Virtual_i(Fl_Menu_*, void*);
- static void cb_Virtual(Fl_Menu_*, void*);
-public:
- static Fl_Menu_Item *recordmenu;
-private:
- void cb_Choose_i(Fl_Menu_*, void*);
- static void cb_Choose(Fl_Menu_*, void*);
- void cb_Switch_i(Fl_Menu_*, void*);
- static void cb_Switch(Fl_Menu_*, void*);
-public:
- WidgetPDial *mastervolumedial;
-private:
- void cb_mastervolumedial_i(WidgetPDial*, void*);
- static void cb_mastervolumedial(WidgetPDial*, void*);
-public:
- Fl_Counter *masterkeyshiftcounter;
-private:
- void cb_masterkeyshiftcounter_i(Fl_Counter*, void*);
- static void cb_masterkeyshiftcounter(Fl_Counter*, void*);
- void cb_Panic_i(Fl_Button*, void*);
- static void cb_Panic(Fl_Button*, void*);
-public:
- Fl_Group *partuigroup;
- PartUI *partui;
- Fl_Counter *syseffnocounter;
-private:
- void cb_syseffnocounter_i(Fl_Counter*, void*);
- static void cb_syseffnocounter(Fl_Counter*, void*);
-public:
- Fl_Choice *sysefftype;
-private:
- void cb_sysefftype_i(Fl_Choice*, void*);
- static void cb_sysefftype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_sysefftype[];
-public:
- Fl_Group *syseffectuigroup;
- EffUI *syseffectui;
-private:
- void cb_Send_i(Fl_Button*, void*);
- static void cb_Send(Fl_Button*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- Fl_Counter *inseffnocounter;
-private:
- void cb_inseffnocounter_i(Fl_Counter*, void*);
- static void cb_inseffnocounter(Fl_Counter*, void*);
-public:
- Fl_Choice *insefftype;
-private:
- void cb_insefftype_i(Fl_Choice*, void*);
- static void cb_insefftype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_insefftype[];
-public:
- Fl_Group *inseffectuigroup;
- EffUI *inseffectui;
- Fl_Choice *inseffpart;
-private:
- void cb_inseffpart_i(Fl_Choice*, void*);
- static void cb_inseffpart(Fl_Choice*, void*);
- void cb_C1_i(Fl_Button*, void*);
- static void cb_C1(Fl_Button*, void*);
- void cb_P1_i(Fl_Button*, void*);
- static void cb_P1(Fl_Button*, void*);
- void cb_Scales_i(Fl_Button*, void*);
- static void cb_Scales(Fl_Button*, void*);
-public:
- Fl_Button *recordbutton;
-private:
- void cb_recordbutton_i(Fl_Button*, void*);
- static void cb_recordbutton(Fl_Button*, void*);
-public:
- Fl_Button *stopbutton;
-private:
- void cb_stopbutton_i(Fl_Button*, void*);
- static void cb_stopbutton(Fl_Button*, void*);
-public:
- Fl_Button *pausebutton;
-private:
- void cb_pausebutton_i(Fl_Button*, void*);
- static void cb_pausebutton(Fl_Button*, void*);
-public:
- Fl_Box *pauselabel;
- Fl_Check_Button *nrpnbutton;
-private:
- void cb_nrpnbutton_i(Fl_Check_Button*, void*);
- static void cb_nrpnbutton(Fl_Check_Button*, void*);
-public:
- Fl_Counter *npartcounter;
-private:
- void cb_npartcounter_i(Fl_Counter*, void*);
- static void cb_npartcounter(Fl_Counter*, void*);
- void cb_vK_i(Fl_Button*, void*);
- static void cb_vK(Fl_Button*, void*);
- void cb_Reset_i(Fl_Button*, void*);
- static void cb_Reset(Fl_Button*, void*);
-public:
- WidgetPDial *globalfinedetuneslider;
-private:
- void cb_globalfinedetuneslider_i(WidgetPDial*, void*);
- static void cb_globalfinedetuneslider(WidgetPDial*, void*);
- void cb_Panel_i(Fl_Button*, void*);
- static void cb_Panel(Fl_Button*, void*);
-public:
- Fl_Button *sm_indicator1;
- Fl_Double_Window *aboutwindow;
-private:
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
-public:
- Fl_Double_Window *syseffsendwindow;
-private:
- void cb_Close1_i(Fl_Button*, void*);
- static void cb_Close1(Fl_Button*, void*);
-public:
- Fl_Double_Window *panelwindow;
-private:
- void cb_Close2_i(Fl_Button*, void*);
- static void cb_Close2(Fl_Button*, void*);
- void cb_Refresh_i(Fl_Button*, void*);
- static void cb_Refresh(Fl_Button*, void*);
-public:
- Fl_Double_Window *simplemasterwindow;
-private:
- void cb_simplemasterwindow_i(Fl_Double_Window*, void*);
- static void cb_simplemasterwindow(Fl_Double_Window*, void*);
-public:
- Fl_Menu_Bar *simplemastermenu;
- static Fl_Menu_Item menu_simplemastermenu[];
-private:
- void cb_New1_i(Fl_Menu_*, void*);
- static void cb_New1(Fl_Menu_*, void*);
- void cb_Open2_i(Fl_Menu_*, void*);
- static void cb_Open2(Fl_Menu_*, void*);
- void cb_Save3_i(Fl_Menu_*, void*);
- static void cb_Save3(Fl_Menu_*, void*);
- void cb_Settings1_i(Fl_Menu_*, void*);
- static void cb_Settings1(Fl_Menu_*, void*);
- void cb_Copyright1_i(Fl_Menu_*, void*);
- static void cb_Copyright1(Fl_Menu_*, void*);
- void cb_E1_i(Fl_Menu_*, void*);
- static void cb_E1(Fl_Menu_*, void*);
- void cb_Open3_i(Fl_Menu_*, void*);
- static void cb_Open3(Fl_Menu_*, void*);
- void cb_Show2_i(Fl_Menu_*, void*);
- static void cb_Show2(Fl_Menu_*, void*);
- void cb_Switch1_i(Fl_Menu_*, void*);
- static void cb_Switch1(Fl_Menu_*, void*);
- Fl_Group *simplelistitemgroup;
-public:
- Fl_Button *partname;
-private:
- void cb_partname1_i(Fl_Button*, void*);
- static void cb_partname1(Fl_Button*, void*);
-public:
- Fl_Slider *partpanning;
-private:
- void cb_partpanning1_i(Fl_Slider*, void*);
- static void cb_partpanning1(Fl_Slider*, void*);
-public:
- Fl_Choice *partrcv;
-private:
- void cb_partrcv1_i(Fl_Choice*, void*);
- static void cb_partrcv1(Fl_Choice*, void*);
-public:
- WidgetPDial *partvolume;
-private:
- void cb_partvolume1_i(WidgetPDial*, void*);
- static void cb_partvolume1(WidgetPDial*, void*);
-public:
- Fl_Check_Button *simplepartportamento;
-private:
- void cb_simplepartportamento_i(Fl_Check_Button*, void*);
- static void cb_simplepartportamento(Fl_Check_Button*, void*);
-public:
- Fl_Counter *simpleminkcounter;
-private:
- void cb_simpleminkcounter_i(Fl_Counter*, void*);
- static void cb_simpleminkcounter(Fl_Counter*, void*);
-public:
- Fl_Counter *simplemaxkcounter;
-private:
- void cb_simplemaxkcounter_i(Fl_Counter*, void*);
- static void cb_simplemaxkcounter(Fl_Counter*, void*);
- void cb_m_i(Fl_Button*, void*);
- static void cb_m(Fl_Button*, void*);
- void cb_M_i(Fl_Button*, void*);
- static void cb_M(Fl_Button*, void*);
- void cb_R_i(Fl_Button*, void*);
- static void cb_R(Fl_Button*, void*);
-public:
- Fl_Counter *simplepartkeyshiftcounter;
-private:
- void cb_simplepartkeyshiftcounter_i(Fl_Counter*, void*);
- static void cb_simplepartkeyshiftcounter(Fl_Counter*, void*);
-public:
- WidgetPDial *simplesyseffsend;
-private:
- void cb_simplesyseffsend_i(WidgetPDial*, void*);
- static void cb_simplesyseffsend(WidgetPDial*, void*);
- Fl_Check_Button *partenabled;
- void cb_partenabled1_i(Fl_Check_Button*, void*);
- static void cb_partenabled1(Fl_Check_Button*, void*);
-public:
- VirKeys *virkeys;
- Fl_Counter *simplesyseffnocounter;
-private:
- void cb_simplesyseffnocounter_i(Fl_Counter*, void*);
- static void cb_simplesyseffnocounter(Fl_Counter*, void*);
-public:
- Fl_Choice *simplesysefftype;
-private:
- void cb_simplesysefftype_i(Fl_Choice*, void*);
- static void cb_simplesysefftype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_simplesysefftype[];
-public:
- Fl_Group *simplesyseffectuigroup;
- SimpleEffUI *simplesyseffectui;
-private:
- void cb_Send1_i(Fl_Button*, void*);
- static void cb_Send1(Fl_Button*, void*);
- void cb_P2_i(Fl_Button*, void*);
- static void cb_P2(Fl_Button*, void*);
-public:
- Fl_Counter *simpleinseffnocounter;
-private:
- void cb_simpleinseffnocounter_i(Fl_Counter*, void*);
- static void cb_simpleinseffnocounter(Fl_Counter*, void*);
-public:
- Fl_Choice *simpleinsefftype;
-private:
- void cb_simpleinsefftype_i(Fl_Choice*, void*);
- static void cb_simpleinsefftype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_simpleinsefftype[];
-public:
- Fl_Group *simpleinseffectuigroup;
- SimpleEffUI *simpleinseffectui;
- Fl_Choice *simpleinseffpart;
-private:
- void cb_simpleinseffpart_i(Fl_Choice*, void*);
- static void cb_simpleinseffpart(Fl_Choice*, void*);
- void cb_P3_i(Fl_Button*, void*);
- static void cb_P3(Fl_Button*, void*);
-public:
- WidgetPDial *simplemastervolumedial;
-private:
- void cb_simplemastervolumedial_i(WidgetPDial*, void*);
- static void cb_simplemastervolumedial(WidgetPDial*, void*);
-public:
- Fl_Counter *simplemasterkeyshiftcounter;
-private:
- void cb_simplemasterkeyshiftcounter_i(Fl_Counter*, void*);
- static void cb_simplemasterkeyshiftcounter(Fl_Counter*, void*);
- void cb_Stop_i(Fl_Button*, void*);
- static void cb_Stop(Fl_Button*, void*);
- void cb_Reset1_i(Fl_Button*, void*);
- static void cb_Reset1(Fl_Button*, void*);
-public:
- WidgetPDial *simpleglobalfinedetuneslider;
-private:
- void cb_simpleglobalfinedetuneslider_i(WidgetPDial*, void*);
- static void cb_simpleglobalfinedetuneslider(WidgetPDial*, void*);
-public:
- Fl_Counter *simplenpartcounter;
-private:
- void cb_simplenpartcounter_i(Fl_Counter*, void*);
- static void cb_simplenpartcounter(Fl_Counter*, void*);
- void cb_Keyb_i(Fl_Counter*, void*);
- static void cb_Keyb(Fl_Counter*, void*);
-public:
- Fl_Button *sm_indicator2;
- Fl_Double_Window *selectuiwindow;
-private:
- void cb_selectuiwindow_i(Fl_Double_Window*, void*);
- static void cb_selectuiwindow(Fl_Double_Window*, void*);
- void cb_Advanced_i(Fl_Button*, void*);
- static void cb_Advanced(Fl_Button*, void*);
- void cb_Beginner_i(Fl_Button*, void*);
- static void cb_Beginner(Fl_Button*, void*);
-public:
- void updatesendwindow();
- void updatepanel();
- void setfilelabel(const char *filename);
- MasterUI(Master *master_,int *exitprogram_);
- ~MasterUI();
- void showUI();
- void simplerefresh();
- void do_new_master_unconditional();
- void do_new_master();
- int do_load_master_unconditional(const char *filename, const char *display_name);
- void do_load_master(const char* file = NULL);
- void do_save_master(const char* file = NULL);
- void refresh_master_ui();
-private:
- Master *master;
- MicrotonalUI *microtonalui;
- BankUI *bankui;
- int ninseff,npart;
- int nsyseff;
- int *exitprogram;
- SysEffSend *syseffsend[NUM_SYS_EFX][NUM_SYS_EFX];
- VirKeyboard *virkeyboard;
- ConfigUI *configui;
- int swapefftype;
- char masterwindowlabel[100];
- Panellistitem *panellistitem[NUM_MIDI_PARTS];
- NioUI nioui;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.cpp
deleted file mode 100644
index 87c2db710..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.cpp
+++ /dev/null
@@ -1,463 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/MicrotonalUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-void MicrotonalUI::cb_Invert_i(Fl_Check_Button* o, void*) {
- microtonal->Pinvertupdown=(int) o->value();
-if (microtonal->Pinvertupdown==0) centerinvertcounter->deactivate();
- else centerinvertcounter->activate();
-}
-void MicrotonalUI::cb_Invert(Fl_Check_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_Invert_i(o,v);
-}
-
-void MicrotonalUI::cb_centerinvertcounter_i(Fl_Counter* o, void*) {
- microtonal->Pinvertupdowncenter=(int) o->value();
-}
-void MicrotonalUI::cb_centerinvertcounter(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_centerinvertcounter_i(o,v);
-}
-
-void MicrotonalUI::cb_applybutton_i(Fl_Button*, void*) {
- apply();
-}
-void MicrotonalUI::cb_applybutton(Fl_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_applybutton_i(o,v);
-}
-
-void MicrotonalUI::cb_octavesizeoutput_i(Fl_Value_Output* o, void*) {
- o->value(microtonal->getoctavesize());
-}
-void MicrotonalUI::cb_octavesizeoutput(Fl_Value_Output* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_octavesizeoutput_i(o,v);
-}
-
-void MicrotonalUI::cb_nameinput_i(Fl_Input* o, void*) {
- snprintf((char *)microtonal->Pname,MICROTONAL_MAX_NAME_LEN,"%s",o->value());
-}
-void MicrotonalUI::cb_nameinput(Fl_Input* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_nameinput_i(o,v);
-}
-
-void MicrotonalUI::cb_commentinput_i(Fl_Input* o, void*) {
- snprintf((char *)microtonal->Pcomment,MICROTONAL_MAX_NAME_LEN,"%s",o->value());
-}
-void MicrotonalUI::cb_commentinput(Fl_Input* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_commentinput_i(o,v);
-}
-
-void MicrotonalUI::cb_Shift_i(Fl_Counter* o, void*) {
- microtonal->Pscaleshift=(int) o->value()+64;
-}
-void MicrotonalUI::cb_Shift(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_Shift_i(o,v);
-}
-
-void MicrotonalUI::cb_Import_i(Fl_Button*, void*) {
- const char *filename;
-filename=fl_file_chooser("Open:","(*.scl)",NULL,0);
-if (filename==NULL) return;
-int result=microtonal->loadscl(filename);
-if (result==0) {
- updateTuningsInput();
- nameinput->cut(0,nameinput->maximum_size());
- nameinput->insert((char *)microtonal->Pname);
- nameinput->position(0);
- commentinput->cut(0,commentinput->maximum_size());
- commentinput->insert((char *)microtonal->Pname);
- commentinput->position(0);
- tuningsinput->position(0);
- octavesizeoutput->do_callback();
- } else {
- fl_alert("Error: Could not load the file.");
- };
-}
-void MicrotonalUI::cb_Import(Fl_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_Import_i(o,v);
-}
-
-void MicrotonalUI::cb_firstnotecounter_i(Fl_Counter* o, void*) {
- microtonal->Pfirstkey=(int) o->value();
-}
-void MicrotonalUI::cb_firstnotecounter(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->parent()->user_data()))->cb_firstnotecounter_i(o,v);
-}
-
-void MicrotonalUI::cb_lastnotecounter_i(Fl_Counter* o, void*) {
- microtonal->Plastkey=(int) o->value();
-}
-void MicrotonalUI::cb_lastnotecounter(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->parent()->user_data()))->cb_lastnotecounter_i(o,v);
-}
-
-void MicrotonalUI::cb_middlenotecounter_i(Fl_Counter* o, void*) {
- microtonal->Pmiddlenote=(int) o->value();
-}
-void MicrotonalUI::cb_middlenotecounter(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->parent()->user_data()))->cb_middlenotecounter_i(o,v);
-}
-
-void MicrotonalUI::cb_mapsizeoutput_i(Fl_Value_Output* o, void*) {
- o->value(microtonal->Pmapsize);
-}
-void MicrotonalUI::cb_mapsizeoutput(Fl_Value_Output* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->parent()->user_data()))->cb_mapsizeoutput_i(o,v);
-}
-
-void MicrotonalUI::cb_mappingenabledbutton_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-microtonal->Pmappingenabled=x;
-if (x==0) keymappinggroup->deactivate();
- else keymappinggroup->activate();
-o->show();
-}
-void MicrotonalUI::cb_mappingenabledbutton(Fl_Check_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_mappingenabledbutton_i(o,v);
-}
-
-void MicrotonalUI::cb_Import1_i(Fl_Button*, void*) {
- const char *filename;
-filename=fl_file_chooser("Open:","(*.kbm)",NULL,0);
-if (filename==NULL) return;
-int result=microtonal->loadkbm(filename);
-if (result==0) {
- updateMappingInput();
- mappinginput->position(0);
- mapsizeoutput->do_callback();
- firstnotecounter->value(microtonal->Pfirstkey);
- lastnotecounter->value(microtonal->Plastkey);
- middlenotecounter->value(microtonal->Pmiddlenote);
- mapsizeoutput->do_callback();
- mappingenabledbutton->value(microtonal->Pmappingenabled);
- mappingenabledbutton->do_callback();
- afreqinput->value(microtonal->PAfreq);
- anotecounter->value(microtonal->PAnote);
- anotecounter->do_callback();
- } else {
- fl_alert("Error: Could not load the file.");
- };
-}
-void MicrotonalUI::cb_Import1(Fl_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_Import1_i(o,v);
-}
-
-void MicrotonalUI::cb_anotecounter_i(Fl_Counter* o, void*) {
- microtonal->PAnote=(int) o->value();
-if (microtonal->getnotefreq(microtonal->PAnote,0)<0.0) o->textcolor(FL_RED);
- else o->textcolor(FL_BLACK);
-
-o->redraw();
-}
-void MicrotonalUI::cb_anotecounter(Fl_Counter* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_anotecounter_i(o,v);
-}
-
-void MicrotonalUI::cb_afreqinput_i(Fl_Value_Input* o, void*) {
- microtonal->PAfreq=o->value();
-}
-void MicrotonalUI::cb_afreqinput(Fl_Value_Input* o, void* v) {
- ((MicrotonalUI*)(o->parent()->parent()->user_data()))->cb_afreqinput_i(o,v);
-}
-
-void MicrotonalUI::cb_Close_i(Fl_Button*, void*) {
- microtonaluiwindow->hide();
-}
-void MicrotonalUI::cb_Close(Fl_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void MicrotonalUI::cb_Enable_i(Fl_Check_Button* o, void*) {
- microtonal->Penabled=(int) o->value();
-if (microtonal->Penabled==0) microtonalgroup->deactivate();
- else microtonalgroup->activate();
-}
-void MicrotonalUI::cb_Enable(Fl_Check_Button* o, void* v) {
- ((MicrotonalUI*)(o->parent()->user_data()))->cb_Enable_i(o,v);
-}
-
-Fl_Double_Window* MicrotonalUI::make_window() {
- { microtonaluiwindow = new Fl_Double_Window(405, 450, "Scales");
- microtonaluiwindow->user_data((void*)(this));
- { Fl_Group* o = new Fl_Group(249, 2, 155, 45);
- o->tooltip("Center where the note\'s freqs. are turned upside-down");
- o->box(FL_ENGRAVED_FRAME);
- { Fl_Check_Button* o = new Fl_Check_Button(254, 13, 55, 30, "Invert keys");
- o->tooltip("Turn upside-down the note frequencies");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Invert);
- o->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(microtonal->Pinvertupdown);
- } // Fl_Check_Button* o
- { Fl_Counter* o = centerinvertcounter = new Fl_Counter(319, 13, 80, 20, "Center");
- centerinvertcounter->labelfont(1);
- centerinvertcounter->labelsize(11);
- centerinvertcounter->minimum(0);
- centerinvertcounter->maximum(127);
- centerinvertcounter->step(1);
- centerinvertcounter->textfont(1);
- centerinvertcounter->callback((Fl_Callback*)cb_centerinvertcounter);
- centerinvertcounter->align(Fl_Align(130));
- o->lstep(microtonal->getoctavesize());
- o->value(microtonal->Pinvertupdowncenter);
- if (microtonal->Pinvertupdown==0) o->deactivate();
- } // Fl_Counter* centerinvertcounter
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = microtonalgroup = new Fl_Group(3, 49, 402, 398);
- microtonalgroup->box(FL_ENGRAVED_FRAME);
- { applybutton = new Fl_Button(8, 413, 107, 28, "Retune");
- applybutton->tooltip("Retune the synth accorging to the inputs from \"Tunnings\" and \"Keyboard Map\
-pings\"");
- applybutton->box(FL_THIN_UP_BOX);
- applybutton->labeltype(FL_EMBOSSED_LABEL);
- applybutton->labelfont(1);
- applybutton->labelsize(13);
- applybutton->callback((Fl_Callback*)cb_applybutton);
- } // Fl_Button* applybutton
- { Fl_Value_Output* o = octavesizeoutput = new Fl_Value_Output(150, 423, 35, 17, "nts./oct.");
- octavesizeoutput->tooltip("Notes/Octave");
- octavesizeoutput->labelsize(10);
- octavesizeoutput->maximum(500);
- octavesizeoutput->step(1);
- octavesizeoutput->value(12);
- octavesizeoutput->textfont(1);
- octavesizeoutput->callback((Fl_Callback*)cb_octavesizeoutput);
- octavesizeoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(microtonal->getoctavesize());
- } // Fl_Value_Output* octavesizeoutput
- { Fl_Input* o = nameinput = new Fl_Input(8, 64, 285, 25, "Name:");
- nameinput->labelfont(1);
- nameinput->labelsize(11);
- nameinput->callback((Fl_Callback*)cb_nameinput);
- nameinput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->insert((char *)microtonal->Pname);
- } // Fl_Input* nameinput
- { tuningsinput = new Fl_Input(8, 144, 182, 264, "Tunings:");
- tuningsinput->type(4);
- tuningsinput->labelfont(1);
- tuningsinput->labelsize(11);
- tuningsinput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- tuningsinput->when(FL_WHEN_NEVER);
- updateTuningsInput();
- } // Fl_Input* tuningsinput
- { Fl_Input* o = commentinput = new Fl_Input(8, 104, 391, 25, "Comment:");
- commentinput->labelfont(1);
- commentinput->labelsize(11);
- commentinput->callback((Fl_Callback*)cb_commentinput);
- commentinput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->insert((char *)microtonal->Pcomment);
- } // Fl_Input* commentinput
- { Fl_Counter* o = new Fl_Counter(313, 69, 70, 20, "Shift");
- o->type(1);
- o->labelsize(11);
- o->minimum(-63);
- o->maximum(64);
- o->step(1);
- o->textfont(1);
- o->callback((Fl_Callback*)cb_Shift);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->value(microtonal->Pscaleshift-64);
- } // Fl_Counter* o
- { Fl_Button* o = new Fl_Button(243, 411, 84, 15, "Import .SCL file");
- o->tooltip("Inport Scala .scl file (tunnings)");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Import);
- } // Fl_Button* o
- { keymappinggroup = new Fl_Group(193, 144, 206, 264, "Keyboard Mapping");
- keymappinggroup->box(FL_ENGRAVED_BOX);
- keymappinggroup->labelfont(1);
- keymappinggroup->labelsize(11);
- { mappinginput = new Fl_Input(250, 147, 146, 258);
- mappinginput->type(4);
- mappinginput->labelfont(1);
- mappinginput->labelsize(11);
- mappinginput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- mappinginput->when(FL_WHEN_NEVER);
- updateMappingInput();
- } // Fl_Input* mappinginput
- { Fl_Counter* o = firstnotecounter = new Fl_Counter(199, 195, 42, 18, "First note");
- firstnotecounter->tooltip("First MIDI note number");
- firstnotecounter->type(1);
- firstnotecounter->labelsize(10);
- firstnotecounter->minimum(0);
- firstnotecounter->maximum(127);
- firstnotecounter->step(1);
- firstnotecounter->textfont(1);
- firstnotecounter->textsize(11);
- firstnotecounter->callback((Fl_Callback*)cb_firstnotecounter);
- firstnotecounter->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(microtonal->Pfirstkey);
- } // Fl_Counter* firstnotecounter
- { Fl_Counter* o = lastnotecounter = new Fl_Counter(199, 225, 42, 18, "Last note");
- lastnotecounter->tooltip("Last MIDI note number");
- lastnotecounter->type(1);
- lastnotecounter->labelsize(10);
- lastnotecounter->minimum(0);
- lastnotecounter->maximum(127);
- lastnotecounter->step(1);
- lastnotecounter->value(127);
- lastnotecounter->textfont(1);
- lastnotecounter->textsize(11);
- lastnotecounter->callback((Fl_Callback*)cb_lastnotecounter);
- lastnotecounter->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(microtonal->Plastkey);
- } // Fl_Counter* lastnotecounter
- { Fl_Counter* o = middlenotecounter = new Fl_Counter(199, 267, 42, 18, "Midle note");
- middlenotecounter->tooltip("Midle note (where scale degree 0 is mapped to)");
- middlenotecounter->type(1);
- middlenotecounter->labelsize(10);
- middlenotecounter->minimum(0);
- middlenotecounter->maximum(127);
- middlenotecounter->step(1);
- middlenotecounter->value(60);
- middlenotecounter->textfont(1);
- middlenotecounter->textsize(11);
- middlenotecounter->callback((Fl_Callback*)cb_middlenotecounter);
- middlenotecounter->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(microtonal->Pmiddlenote);
- } // Fl_Counter* middlenotecounter
- { Fl_Value_Output* o = mapsizeoutput = new Fl_Value_Output(201, 382, 44, 20, "Map Size");
- mapsizeoutput->labelsize(10);
- mapsizeoutput->maximum(500);
- mapsizeoutput->step(1);
- mapsizeoutput->value(12);
- mapsizeoutput->textfont(1);
- mapsizeoutput->callback((Fl_Callback*)cb_mapsizeoutput);
- mapsizeoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(microtonal->Pmapsize);
- } // Fl_Value_Output* mapsizeoutput
- keymappinggroup->end();
- } // Fl_Group* keymappinggroup
- { Fl_Check_Button* o = mappingenabledbutton = new Fl_Check_Button(198, 150, 48, 21, "ON");
- mappingenabledbutton->tooltip("Enable the Mapping (otherwise the mapping is linear)");
- mappingenabledbutton->box(FL_FLAT_BOX);
- mappingenabledbutton->down_box(FL_DOWN_BOX);
- mappingenabledbutton->labelfont(1);
- mappingenabledbutton->callback((Fl_Callback*)cb_mappingenabledbutton);
- o->value(microtonal->Pmappingenabled);
- if (microtonal->Pmappingenabled==0) keymappinggroup->deactivate();
- } // Fl_Check_Button* mappingenabledbutton
- { Fl_Button* o = new Fl_Button(243, 428, 84, 16, "Import .kbm file");
- o->tooltip("Inport Scala .kbm file (keyboard mapping)");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Import1);
- } // Fl_Button* o
- if (microtonal->Penabled==0) o->deactivate();
- microtonalgroup->end();
- } // Fl_Group* microtonalgroup
- { Fl_Group* o = new Fl_Group(108, 2, 140, 45);
- o->box(FL_ENGRAVED_FRAME);
- { Fl_Counter* o = anotecounter = new Fl_Counter(173, 17, 65, 20, "\"A\" Note");
- anotecounter->tooltip("The \"A\" note (the reference note for which freq. (\"A\" freq) is given)");
- anotecounter->labelfont(1);
- anotecounter->labelsize(10);
- anotecounter->minimum(0);
- anotecounter->maximum(127);
- anotecounter->step(1);
- anotecounter->value(69);
- anotecounter->textfont(1);
- anotecounter->textsize(10);
- anotecounter->callback((Fl_Callback*)cb_anotecounter);
- anotecounter->align(Fl_Align(129));
- o->lstep(12);
- o->value(microtonal->PAnote);
- } // Fl_Counter* anotecounter
- { Fl_Value_Input* o = afreqinput = new Fl_Value_Input(118, 17, 45, 20, "\"A\" Freq.");
- afreqinput->tooltip("The freq. of \"A\" note (default=440.0)");
- afreqinput->labelfont(1);
- afreqinput->labelsize(10);
- afreqinput->minimum(1);
- afreqinput->maximum(20000);
- afreqinput->step(0.001);
- afreqinput->value(440);
- afreqinput->textfont(1);
- afreqinput->textsize(10);
- afreqinput->callback((Fl_Callback*)cb_afreqinput);
- afreqinput->align(Fl_Align(FL_ALIGN_TOP));
- o->value(microtonal->PAfreq);
- } // Fl_Value_Input* afreqinput
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(333, 413, 67, 28, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(3, 3, 102, 45, "Enable Microtonal");
- o->box(FL_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Enable);
- o->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(microtonal->Penabled);
- } // Fl_Check_Button* o
- microtonaluiwindow->end();
- } // Fl_Double_Window* microtonaluiwindow
- return microtonaluiwindow;
-}
-
-void MicrotonalUI::updateTuningsInput() {
- char *tmpbuf=new char[100];
-
- tuningsinput->cut(0,tuningsinput->maximum_size());
-
- for (int i=0;igetoctavesize();i++){
- if (i!=0) tuningsinput->insert("\n");
- microtonal->tuningtoline(i,tmpbuf,100);
- tuningsinput->insert(tmpbuf);
- };
-
- delete []tmpbuf;
-}
-
-void MicrotonalUI::updateMappingInput() {
- char *tmpbuf=new char[100];
-
- mappinginput->cut(0,tuningsinput->maximum_size());
-
- for (int i=0;iPmapsize;i++){
- if (i!=0) mappinginput->insert("\n");
- if ((microtonal->Pmapping[i])==-1)
- snprintf(tmpbuf,100,"x");
- else snprintf(tmpbuf,100,"%d",microtonal->Pmapping[i]);
- mappinginput->insert(tmpbuf);
- };
-
- delete []tmpbuf;
-}
-
-MicrotonalUI::MicrotonalUI(Microtonal *microtonal_) {
- microtonal=microtonal_;
-
- make_window();
-}
-
-MicrotonalUI::~MicrotonalUI() {
- microtonaluiwindow->hide();
- delete(microtonaluiwindow);
-}
-
-void MicrotonalUI::show() {
- microtonaluiwindow->show();
-}
-
-void MicrotonalUI::apply() {
- int err=microtonal->texttotunings(tuningsinput->value());
- if (err>=0) fl_alert("Parse Error: The input may contain only numbers (like 232.59)\n or divisions (like 121/64).");
- if (err==-2) fl_alert("Parse Error: The input is empty.");
- octavesizeoutput->do_callback();
-
- microtonal->texttomapping(mappinginput->value());
- mapsizeoutput->do_callback();
- anotecounter->do_callback();
-
- //applybutton->color(FL_GRAY);
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.h b/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.h
deleted file mode 100644
index 3668b41e5..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/MicrotonalUI.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef MicrotonalUI_h
-#define MicrotonalUI_h
-#include
-#include
-#include
-#include
-#include
-#include
-#include "../Misc/Microtonal.h"
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class MicrotonalUI {
-public:
- Fl_Double_Window* make_window();
- Fl_Double_Window *microtonaluiwindow;
-private:
- void cb_Invert_i(Fl_Check_Button*, void*);
- static void cb_Invert(Fl_Check_Button*, void*);
-public:
- Fl_Counter *centerinvertcounter;
-private:
- void cb_centerinvertcounter_i(Fl_Counter*, void*);
- static void cb_centerinvertcounter(Fl_Counter*, void*);
-public:
- Fl_Group *microtonalgroup;
- Fl_Button *applybutton;
-private:
- void cb_applybutton_i(Fl_Button*, void*);
- static void cb_applybutton(Fl_Button*, void*);
-public:
- Fl_Value_Output *octavesizeoutput;
-private:
- void cb_octavesizeoutput_i(Fl_Value_Output*, void*);
- static void cb_octavesizeoutput(Fl_Value_Output*, void*);
-public:
- Fl_Input *nameinput;
-private:
- void cb_nameinput_i(Fl_Input*, void*);
- static void cb_nameinput(Fl_Input*, void*);
-public:
- Fl_Input *tuningsinput;
- Fl_Input *commentinput;
-private:
- void cb_commentinput_i(Fl_Input*, void*);
- static void cb_commentinput(Fl_Input*, void*);
- void cb_Shift_i(Fl_Counter*, void*);
- static void cb_Shift(Fl_Counter*, void*);
- void cb_Import_i(Fl_Button*, void*);
- static void cb_Import(Fl_Button*, void*);
-public:
- Fl_Group *keymappinggroup;
- Fl_Input *mappinginput;
- Fl_Counter *firstnotecounter;
-private:
- void cb_firstnotecounter_i(Fl_Counter*, void*);
- static void cb_firstnotecounter(Fl_Counter*, void*);
-public:
- Fl_Counter *lastnotecounter;
-private:
- void cb_lastnotecounter_i(Fl_Counter*, void*);
- static void cb_lastnotecounter(Fl_Counter*, void*);
-public:
- Fl_Counter *middlenotecounter;
-private:
- void cb_middlenotecounter_i(Fl_Counter*, void*);
- static void cb_middlenotecounter(Fl_Counter*, void*);
-public:
- Fl_Value_Output *mapsizeoutput;
-private:
- void cb_mapsizeoutput_i(Fl_Value_Output*, void*);
- static void cb_mapsizeoutput(Fl_Value_Output*, void*);
-public:
- Fl_Check_Button *mappingenabledbutton;
-private:
- void cb_mappingenabledbutton_i(Fl_Check_Button*, void*);
- static void cb_mappingenabledbutton(Fl_Check_Button*, void*);
- void cb_Import1_i(Fl_Button*, void*);
- static void cb_Import1(Fl_Button*, void*);
-public:
- Fl_Counter *anotecounter;
-private:
- void cb_anotecounter_i(Fl_Counter*, void*);
- static void cb_anotecounter(Fl_Counter*, void*);
-public:
- Fl_Value_Input *afreqinput;
-private:
- void cb_afreqinput_i(Fl_Value_Input*, void*);
- static void cb_afreqinput(Fl_Value_Input*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
- void cb_Enable_i(Fl_Check_Button*, void*);
- static void cb_Enable(Fl_Check_Button*, void*);
-public:
- void updateTuningsInput();
- void updateMappingInput();
- MicrotonalUI(Microtonal *microtonal_);
- ~MicrotonalUI();
- void show();
- void apply();
-private:
- Microtonal *microtonal;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.cpp
deleted file mode 100644
index 6fc3885b3..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.cpp
+++ /dev/null
@@ -1,1412 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/OscilGenUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-#include
-#include
-#include
-#include
-
-OscilSpectrum::OscilSpectrum(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- oscil=NULL;
-}
-
-void OscilSpectrum::init(OscilGen *oscil_,int oscbase_,Master *master_) {
- oscil=oscil_;
- oscbase=oscbase_;
- master=master_;
-}
-
-void OscilSpectrum::draw() {
- int ox=x(),oy=y(),lx=w(),ly=h(),i;
- const int maxdb=60;//must be multiple of 10
- int GX=2;
- int n=lx/GX-1;
- if (n>synth->oscilsize/2) n=synth->oscilsize/2;
-
- float x;
- float* spc=new float[n];
- for (i=0;imutex);
- if (oscbase==0) oscil->getspectrum(n,spc,0);
- else oscil->getspectrum(n,spc,1);
- pthread_mutex_unlock(&master->mutex);
-
- //normalize
- float max=0;
- for (i=0;iactive_r()) fl_color(this->parent()->selection_color());
- else fl_color(this->parent()->color());
- fl_line_style(FL_DOT);
-
- for (i=1;iactive_r()) fl_color(this->parent()->labelcolor());
- else fl_color(this->parent()->color());
- fl_line_style(0);
-
- //draws the spectrum
- for (i=0;idB2rap(-maxdb)) x=rap2dB(x)/maxdb+1;
- else x=0;
-
- int val=(int) ((ly-2)*x);
- if (val>0) fl_line(ox+tmp,oy+ly-2-val,ox+tmp,oy+ly-2);
- }
- delete [] spc;
-}
-
-PSlider::PSlider(int x,int y, int w, int h, const char *label):Fl_Slider(x,y,w,h,label) {
- ;
-}
-
-int PSlider::handle(int event) {
- int X=x(),Y=y(),W=w(),H=h();
-
- if ((!Fl::event_buttons())|| (event==0)||(Fl::event_shift()==0)) return(Fl_Slider::handle(event));
-
- if (!Fl::event_inside(X,Y,W,H)) {
- if (event==FL_DRAG){
- Fl_Slider::handle(FL_RELEASE);
- Fl_Slider::handle(FL_LEAVE);
- deactivate();
- activate();
- return(1);
- }else{
- return(Fl_Slider::handle(event));
- };
- } else {
- //Fl_Slider::handle(FL_FOCUS);
- Fl_Slider::handle(FL_PUSH);
- };
-
- return(1);
-}
-
-Oscilloscope::Oscilloscope(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- oscil=NULL;
- phase=64;
- oscbase=0;
- box(FL_FLAT_BOX);
-}
-
-void Oscilloscope::init(OscilGen *oscil_,Master *master_) {
- oscil=oscil_;
- master=master_;
-}
-
-void Oscilloscope::init(OscilGen *oscil_,int oscbase_,Master *master_) {
- oscil=oscil_;
- oscbase=oscbase_;
- master=master_;
-}
-
-void Oscilloscope::init(OscilGen *oscil_,int oscbase_,int phase_,Master *master_) {
- oscil=oscil_;
- oscbase=oscbase_;
- phase=phase_;
- master=master_;
-}
-
-void Oscilloscope::draw() {
- int ox=x(),oy=y(),lx=w(),ly=h()-1,i;
- float smps[synth->oscilsize];
- pthread_mutex_lock(&master->mutex);
- if (oscbase==0) oscil->get(smps,-1.0);
- else oscil->getcurrentbasefunction(smps);
- pthread_mutex_unlock(&master->mutex);
-
- if (damage()!=1){
- fl_color( fl_color_average( FL_BLACK, FL_BACKGROUND_COLOR, 0.5 ));
- fl_rectf(ox,oy,lx,ly);
- };
-
- //normalize
- float max=0;
- for (i=0;ioscilsize;i++)
- if (maxactive_r()) fl_color(this->parent()->labelcolor());
- else fl_color(this->parent()->color());
- int GX=16;if (lxactive_r()) fl_color(this->parent()->selection_color());
- else fl_color(this->parent()->labelcolor());
-
- fl_color( fl_color_add_alpha( fl_color(), 127 ) );
-
- int lw=2;
- //if ((lx<135)||(ly<135)) lw=1;
- fl_line_style(FL_SOLID,lw);
- fl_begin_line();
- double ph=((phase-64.0)/128.0*synth->oscilsize+synth->oscilsize);
- for (i=1;ioscilsize*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);
-}
-
-void Oscilharmonic::cb_mag_i(PSlider* o, void*) {
- int x=64;
-if (Fl::event_button3()) o->value(x);
- else x=127-(int)o->value();
-if (x==64) o->selection_color(0);
- else o->selection_color(222);
-
-pthread_mutex_lock(&master->mutex);
- oscil->Phmag[n]=x;
- if (x==64) {
- oscil->Phphase[n]=64;
- phase->value(64);
- };
- oscil->prepare();
-pthread_mutex_unlock(&master->mutex);
-
-display->redraw();
-oldosc->redraw();
-if (cbwidget!=NULL) {
- cbwidget->do_callback();
- applybutton->color(FL_RED);
- applybutton->redraw();
-};
-}
-void Oscilharmonic::cb_mag(PSlider* o, void* v) {
- ((Oscilharmonic*)(o->parent()->user_data()))->cb_mag_i(o,v);
-}
-
-void Oscilharmonic::cb_phase_i(PSlider* o, void*) {
- int x=64;
-if (Fl::event_button3()) o->value(x);
- else x=(int)o->value();
-
-pthread_mutex_lock(&master->mutex);
- oscil->Phphase[n]=x;
- oscil->prepare();
-pthread_mutex_unlock(&master->mutex);
-
-display->redraw();
-oldosc->redraw();
-if (cbwidget!=NULL) {
- cbwidget->do_callback();
- applybutton->color(FL_RED);
- applybutton->redraw();
-};
-}
-void Oscilharmonic::cb_phase(PSlider* o, void* v) {
- ((Oscilharmonic*)(o->parent()->user_data()))->cb_phase_i(o,v);
-}
-
-Fl_Group* Oscilharmonic::make_window() {
- { harmonic = new Fl_Group(0, 0, 100, 225);
- harmonic->box(FL_NO_BOX);
- harmonic->color(FL_BACKGROUND_COLOR);
- harmonic->selection_color(FL_BACKGROUND_COLOR);
- harmonic->labeltype(FL_NO_LABEL);
- harmonic->labelfont(0);
- harmonic->labelsize(14);
- harmonic->labelcolor(FL_FOREGROUND_COLOR);
- harmonic->user_data((void*)(this));
- harmonic->align(Fl_Align(FL_ALIGN_TOP));
- harmonic->when(FL_WHEN_RELEASE);
- { PSlider* o = mag = new PSlider(0, 15, 15, 115);
- mag->type(4);
- mag->box(FL_NO_BOX);
- mag->color(FL_BACKGROUND_COLOR);
- mag->selection_color((Fl_Color)222);
- mag->labeltype(FL_NORMAL_LABEL);
- mag->labelfont(0);
- mag->labelsize(14);
- mag->labelcolor(FL_FOREGROUND_COLOR);
- mag->maximum(127);
- mag->step(1);
- mag->value(64);
- mag->callback((Fl_Callback*)cb_mag);
- mag->align(Fl_Align(FL_ALIGN_BOTTOM));
- mag->when(FL_WHEN_CHANGED);
- o->value(127-oscil->Phmag[n]);
- if (oscil->Phmag[n]==64) o->selection_color(0);
- } // PSlider* mag
- { PSlider* o = phase = new PSlider(0, 135, 15, 75);
- phase->type(4);
- phase->box(FL_NO_BOX);
- phase->color(FL_BACKGROUND_COLOR);
- phase->selection_color((Fl_Color)222);
- phase->labeltype(FL_NORMAL_LABEL);
- phase->labelfont(0);
- phase->labelsize(14);
- phase->labelcolor(FL_FOREGROUND_COLOR);
- phase->maximum(127);
- phase->step(1);
- phase->value(64);
- phase->callback((Fl_Callback*)cb_phase);
- phase->align(Fl_Align(FL_ALIGN_BOTTOM));
- phase->when(FL_WHEN_CHANGED);
- o->value(oscil->Phphase[n]);
- } // PSlider* phase
- { Fl_Box* o = new Fl_Box(15, 70, 5, 5);
- o->box(FL_FLAT_BOX);
- o->color(FL_DARK2);
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(15, 170, 5, 5);
- o->box(FL_FLAT_BOX);
- o->color(FL_DARK2);
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(0, 210, 20, 15, "01");
- o->labelfont(1);
- o->labelsize(9);
- o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
- char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(0, 0, 20, 15, "01");
- o->labelfont(1);
- o->labelsize(9);
- o->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
- char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));
- } // Fl_Box* o
- harmonic->end();
- } // Fl_Group* harmonic
- return harmonic;
-}
-
-Oscilharmonic::Oscilharmonic(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- n=0;
- oscil=NULL;
- display=NULL;
- applybutton=NULL;
- cbwidget=NULL;
-}
-
-void Oscilharmonic::init(OscilGen *oscil_,int n_,Fl_Group *display_,Fl_Widget *oldosc_,Fl_Widget *cbwidget_,Fl_Widget *applybutton_, Master *master_) {
- oscil=oscil_;
- n=n_;
- display=display_;
- master=master_;
- oldosc=oldosc_;
- cbwidget=cbwidget_;
- applybutton=applybutton_;
- make_window();
- end();
- harmonic->show();
-}
-
-void Oscilharmonic::refresh() {
- mag->value(127-oscil->Phmag[n]);
- phase->value(oscil->Phphase[n]);
-
- if (oscil->Phmag[n]==64) mag->selection_color(0);
- else mag->selection_color(222);
-}
-
-Oscilharmonic::~Oscilharmonic() {
- harmonic->hide();
- //delete(harmonic);
-}
-
-void OscilEditor::cb_applybutton_i(Fl_Button*, void*) {
- applybutton->color(FL_GRAY);
-applybutton->redraw();
-if (cbapplywidget!=NULL) {
- cbapplywidget->do_callback();
- cbapplywidget->color(FL_GRAY);
- cbapplywidget->redraw();
-};
-}
-void OscilEditor::cb_applybutton(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_applybutton_i(o,v);
-}
-
-void OscilEditor::cb_rndslider_i(Fl_Value_Slider* o, void*) {
- oscil->Prand=(int)o->value()+64;
-oscildisplaygroup->redraw();
-oldosc->redraw();
-}
-void OscilEditor::cb_rndslider(Fl_Value_Slider* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_rndslider_i(o,v);
-}
-
-void OscilEditor::cb_hrndtype_i(Fl_Choice* o, void*) {
- oscil->Pamprandtype=(int) o->value();
-}
-void OscilEditor::cb_hrndtype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_hrndtype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_hrndtype[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sin", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_hrnddial_i(WidgetPDial* o, void*) {
- oscil->Pamprandpower=(int) o->value();
-}
-void OscilEditor::cb_hrnddial(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_hrnddial_i(o,v);
-}
-
-void OscilEditor::cb_bfslider_i(WidgetPDial* o, void*) {
- oscil->Pbasefuncpar=(int)o->value()+64;
-basefuncdisplaygroup->redraw();
-bfparval->value(oscil->Pbasefuncpar-64);
-
-redrawoscil();
-}
-void OscilEditor::cb_bfslider(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_bfslider_i(o,v);
-}
-
-void OscilEditor::cb_bftype_i(Fl_Choice* o, void*) {
- oscil->Pcurrentbasefunc=(int) o->value();
-
-basefuncdisplaygroup->redraw();
-redrawoscil();
-
-if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodulation->deactivate();
- else basefuncmodulation->activate();
-}
-void OscilEditor::cb_bftype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_bftype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_bftype[] = {
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Triangle", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Pulse", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Saw", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Power", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Gauss", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Diode", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"AbsSine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"PulseSine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"StrchSine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Chirp", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"AbsStrSine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Chebyshev", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Sqr", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Spike", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Circle", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_bfmodtype_i(Fl_Choice* o, void*) {
- oscil->Pbasefuncmodulation=(int) o->value();
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_bfmodtype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_bfmodtype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_bfmodtype[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Rev", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_bfmodpar1_i(WidgetPDial* o, void*) {
- oscil->Pbasefuncmodulationpar1=(int)o->value();
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_bfmodpar1(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_bfmodpar1_i(o,v);
-}
-
-void OscilEditor::cb_bfmodpar2_i(WidgetPDial* o, void*) {
- oscil->Pbasefuncmodulationpar2=(int)o->value();
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_bfmodpar2(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_bfmodpar2_i(o,v);
-}
-
-void OscilEditor::cb_bfmodpar3_i(WidgetPDial* o, void*) {
- oscil->Pbasefuncmodulationpar3=(int)o->value();
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_bfmodpar3(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->parent()->user_data()))->cb_bfmodpar3_i(o,v);
-}
-
-void OscilEditor::cb_magtype_i(Fl_Choice* o, void*) {
- oscil->Phmagtype=(int) o->value();
-basefuncdisplaygroup->redraw();
-
-redrawoscil();
-}
-void OscilEditor::cb_magtype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_magtype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_magtype[] = {
- {"Linear", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"-40dB", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"-60dB", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"-80dB", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"-100dB", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_Use_i(Fl_Button*, void*) {
- oscil->useasbase();
-if (autoclearbutton->value()){
- for (int i=0;imag->value(64);
- oscil->Phmag[i]=64;
- h[i]->phase->value(64);
- oscil->Phphase[i]=64;
- };
- oscil->Phmag[0]=127;
-
- oscil->Pharmonicshift=0;
- harmonicshiftcounter->value(0);
-
- h[0]->mag->value(0);
- wshbutton->value(0);
- wshbutton->do_callback();
- fltbutton->value(0);
- fltbutton->do_callback();
- sabutton->value(0);
- sabutton->do_callback();
-};
-
-pthread_mutex_lock(&master->mutex);
- for (int i=0;iPhmag[i]==64) h[i]->mag->selection_color(0);
- else h[i]->mag->selection_color(222);
- };
- oscil->prepare();
-pthread_mutex_unlock(&master->mutex);
-
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_Use(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_Use_i(o,v);
-}
-
-void OscilEditor::cb_Close_i(Fl_Button*, void*) {
- osceditUI->hide();
-}
-void OscilEditor::cb_Close(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void OscilEditor::cb_Clear_i(Fl_Button*, void*) {
- if (!fl_choice("Clear the harmonics settings?","No","Yes",NULL)) return;
-
-for (int i=0;imag->value(64);
- oscil->Phmag[i]=64;
- h[i]->phase->value(64);
- oscil->Phphase[i]=64;
-};
-oscil->Phmag[0]=127;
-h[0]->mag->value(0);
-
-for (int i=0;iPhmag[i]==64) h[i]->mag->selection_color(0);
- else h[i]->mag->selection_color(222);
-};
-
-//harmonics->redraw();
-
-pthread_mutex_lock(&master->mutex);
- oscil->prepare();
-pthread_mutex_unlock(&master->mutex);
-
-redrawoscil();
-}
-void OscilEditor::cb_Clear(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_Clear_i(o,v);
-}
-
-void OscilEditor::cb_wshbutton_i(Fl_Choice* o, void*) {
- oscil->Pwaveshapingfunction=(int) o->value();
-basefuncdisplaygroup->redraw();
-redrawoscil();
-}
-void OscilEditor::cb_wshbutton(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_wshbutton_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_wshbutton[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Atan", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Qnts", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Zigzg", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LmtL", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ILmt", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Clip", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Asym2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sgm", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_wshpar_i(WidgetPDial* o, void*) {
- oscil->Pwaveshaping=(int)o->value()+64;
-wsparval->value(oscil->Pwaveshaping-64);
-redrawoscil();
-}
-void OscilEditor::cb_wshpar(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_wshpar_i(o,v);
-}
-
-void OscilEditor::cb_fltbutton_i(Fl_Choice* o, void*) {
- oscil->Pfiltertype=(int) o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_fltbutton(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_fltbutton_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_fltbutton[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LP1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HP1a", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HP1b", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"BP1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"BS1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LP2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"HP2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"BP2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"BS2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Cos", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sin", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"LSh", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"S", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_filtervalue1_i(WidgetPDial* o, void*) {
- oscil->Pfilterpar1=(int)o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_filtervalue1(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_filtervalue1_i(o,v);
-}
-
-void OscilEditor::cb_filterpref_i(Fl_Check_Button* o, void*) {
- oscil->Pfilterbeforews=(int)o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_filterpref(Fl_Check_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_filterpref_i(o,v);
-}
-
-void OscilEditor::cb_filtervalue2_i(WidgetPDial* o, void*) {
- oscil->Pfilterpar2=(int)o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_filtervalue2(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_filtervalue2_i(o,v);
-}
-
-void OscilEditor::cb_sabutton_i(Fl_Choice* o, void*) {
- oscil->Psatype=(int) o->value();
-redrawoscil();
-}
-void OscilEditor::cb_sabutton(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_sabutton_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_sabutton[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ThrsD", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ThrsU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_sadjpar_i(WidgetPDial* o, void*) {
- oscil->Psapar=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_sadjpar(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_sadjpar_i(o,v);
-}
-
-void OscilEditor::cb_harmonicshiftcounter_i(Fl_Counter* o, void*) {
- oscil->Pharmonicshift=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_harmonicshiftcounter(Fl_Counter* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_harmonicshiftcounter_i(o,v);
-}
-
-void OscilEditor::cb_harmonicshiftpre_i(Fl_Check_Button* o, void*) {
- oscil->Pharmonicshiftfirst=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_harmonicshiftpre(Fl_Check_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_harmonicshiftpre_i(o,v);
-}
-
-void OscilEditor::cb_R_i(Fl_Button*, void*) {
- oscil->Pharmonicshift=0;
-harmonicshiftcounter->value(0);
-redrawoscil();
-}
-void OscilEditor::cb_R(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_R_i(o,v);
-}
-
-void OscilEditor::cb_adhrtype_i(Fl_Choice* o, void*) {
- oscil->Padaptiveharmonics=(int) o->value();
-redrawoscil();
-}
-void OscilEditor::cb_adhrtype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_adhrtype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_adhrtype[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"ON", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Square", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"2xSub", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"2xAdd", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"3xSub", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"3xAdd", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"4xSub", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"4xAdd", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_adhrpow_i(WidgetPDial* o, void*) {
- oscil->Padaptiveharmonicspower=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_adhrpow(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_adhrpow_i(o,v);
-}
-
-void OscilEditor::cb_adhrbf_i(WidgetPDial* o, void*) {
- oscil->Padaptiveharmonicsbasefreq=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_adhrbf(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_adhrbf_i(o,v);
-}
-
-void OscilEditor::cb_adhrpar_i(Fl_Slider* o, void*) {
- oscil->Padaptiveharmonicspar=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_adhrpar(Fl_Slider* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_adhrpar_i(o,v);
-}
-
-void OscilEditor::cb_modtype_i(Fl_Choice* o, void*) {
- oscil->Pmodulation=(int) o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_modtype(Fl_Choice* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_modtype_i(o,v);
-}
-
-Fl_Menu_Item OscilEditor::menu_modtype[] = {
- {"None", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Rev", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Pow", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void OscilEditor::cb_modpar1_i(WidgetPDial* o, void*) {
- oscil->Pmodulationpar1=(int)o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_modpar1(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_modpar1_i(o,v);
-}
-
-void OscilEditor::cb_modpar2_i(WidgetPDial* o, void*) {
- oscil->Pmodulationpar2=(int)o->value();
-
-redrawoscil();
-}
-void OscilEditor::cb_modpar2(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_modpar2_i(o,v);
-}
-
-void OscilEditor::cb_modpar3_i(WidgetPDial* o, void*) {
- oscil->Pmodulationpar3=(int)o->value();
-redrawoscil();
-}
-void OscilEditor::cb_modpar3(WidgetPDial* o, void* v) {
- ((OscilEditor*)(o->parent()->parent()->user_data()))->cb_modpar3_i(o,v);
-}
-
-void OscilEditor::cb_Sine_i(Fl_Button*, void*) {
- if (!fl_choice("Convert to SINE?","No","Yes",NULL)) return;
-
-pthread_mutex_lock(&master->mutex);
- oscil->convert2sine();
-pthread_mutex_unlock(&master->mutex);
-
-redrawoscil();
-refresh();
-}
-void OscilEditor::cb_Sine(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_Sine_i(o,v);
-}
-
-void OscilEditor::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(oscil);
-}
-void OscilEditor::cb_C(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void OscilEditor::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(oscil,this);
-}
-void OscilEditor::cb_P(Fl_Button* o, void* v) {
- ((OscilEditor*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-Fl_Double_Window* OscilEditor::make_window() {
- { Fl_Double_Window* o = osceditUI = new Fl_Double_Window(735, 595, "ADsynth Oscillator Editor");
- osceditUI->user_data((void*)(this));
- { Fl_Button* o = applybutton = new Fl_Button(300, 280, 60, 20, "Apply");
- applybutton->box(FL_THIN_UP_BOX);
- applybutton->labelfont(1);
- applybutton->callback((Fl_Callback*)cb_applybutton);
- if (!oscil->ADvsPAD) o->hide();
- } // Fl_Button* applybutton
- { oscildisplaygroup = new Fl_Group(5, 5, 360, 300);
- oscildisplaygroup->box(FL_UP_FRAME);
- { Fl_Group* o = new Fl_Group(10, 85, 350, 190);
- o->box(FL_THIN_DOWN_BOX);
- o->color(FL_GRAY0);
- o->selection_color((Fl_Color)71);
- o->labelcolor((Fl_Color)179);
- Oscilloscope *osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- osc->init(oscil,master);
- o->end();
- } // Fl_Group* o
- { Fl_Box* o = new Fl_Box(120, 10, 110, 20, "Oscillator");
- o->labelfont(1);
- } // Fl_Box* o
- { Fl_Value_Slider* o = rndslider = new Fl_Value_Slider(140, 285, 100, 10, "rnd");
- rndslider->tooltip("Oscilator Phase Randomness: smaller than 0 is \"group\", larger than 0 is for\
- each harmonic");
- rndslider->type(5);
- rndslider->box(FL_NO_BOX);
- rndslider->labelsize(10);
- rndslider->minimum(-64);
- rndslider->maximum(63);
- rndslider->step(1);
- rndslider->callback((Fl_Callback*)cb_rndslider);
- rndslider->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- if (oscil->ADvsPAD) o->hide();
- } // Fl_Value_Slider* rndslider
- { Fl_Group* o = new Fl_Group(10, 30, 350, 50);
- o->box(FL_THIN_DOWN_BOX);
- o->color(FL_GRAY0);
- o->selection_color((Fl_Color)218);
- o->labelcolor(FL_GREEN);
- OscilSpectrum *spc=new OscilSpectrum(o->x(),o->y(),o->w(),o->h(),"");
- spc->init(oscil,0,master);
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(246, 277, 115, 25);
- o->box(FL_UP_FRAME);
- { hrndtype = new Fl_Choice(281, 282, 50, 15, "H.rnd");
- hrndtype->tooltip("Harmonic Amplitude Randomness");
- hrndtype->down_box(FL_BORDER_BOX);
- hrndtype->labelsize(10);
- hrndtype->textsize(10);
- hrndtype->callback((Fl_Callback*)cb_hrndtype);
- hrndtype->menu(menu_hrndtype);
- } // Fl_Choice* hrndtype
- { hrnddial = new WidgetPDial(338, 280, 18, 18);
- hrnddial->tooltip("Oscillator\'s spectrum adjust parameter");
- hrnddial->box(FL_NO_BOX);
- hrnddial->color(FL_BACKGROUND_COLOR);
- hrnddial->selection_color(FL_INACTIVE_COLOR);
- hrnddial->labeltype(FL_NORMAL_LABEL);
- hrnddial->labelfont(0);
- hrnddial->labelsize(14);
- hrnddial->labelcolor(FL_FOREGROUND_COLOR);
- hrnddial->maximum(127);
- hrnddial->step(1);
- hrnddial->callback((Fl_Callback*)cb_hrnddial);
- hrnddial->align(Fl_Align(FL_ALIGN_BOTTOM));
- hrnddial->when(FL_WHEN_CHANGED);
- } // WidgetPDial* hrnddial
- if (oscil->ADvsPAD) o->hide();
- o->end();
- } // Fl_Group* o
- oscildisplaygroup->end();
- } // Fl_Group* oscildisplaygroup
- { basefuncdisplaygroup = new Fl_Group(365, 5, 360, 300);
- basefuncdisplaygroup->box(FL_UP_FRAME);
- { Fl_Group* o = new Fl_Group(370, 85, 350, 190);
- o->box(FL_THIN_DOWN_BOX);
- o->color(FL_GRAY0);
- o->selection_color((Fl_Color)71);
- o->labelcolor((Fl_Color)179);
- Oscilloscope *osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- osc->init(oscil,1,master);
- o->end();
- } // Fl_Group* o
- { bfslider = new WidgetPDial(520, 280, 20, 20);
- bfslider->tooltip("Base Function Parameter");
- bfslider->box(FL_NO_BOX);
- bfslider->color(FL_BACKGROUND_COLOR);
- bfslider->selection_color(FL_INACTIVE_COLOR);
- bfslider->labeltype(FL_NORMAL_LABEL);
- bfslider->labelfont(0);
- bfslider->labelsize(14);
- bfslider->labelcolor(FL_FOREGROUND_COLOR);
- bfslider->minimum(-64);
- bfslider->maximum(63);
- bfslider->step(1);
- bfslider->callback((Fl_Callback*)cb_bfslider);
- bfslider->align(Fl_Align(FL_ALIGN_BOTTOM));
- bfslider->when(FL_WHEN_CHANGED);
- } // WidgetPDial* bfslider
- { bftype = new Fl_Choice(370, 285, 90, 15, "Base.F..");
- bftype->down_box(FL_BORDER_BOX);
- bftype->labelsize(10);
- bftype->textsize(11);
- bftype->callback((Fl_Callback*)cb_bftype);
- bftype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- bftype->menu(menu_bftype);
- } // Fl_Choice* bftype
- { Fl_Box* o = new Fl_Box(480, 10, 110, 20, "Base Func.");
- o->labelfont(1);
- } // Fl_Box* o
- { Fl_Group* o = new Fl_Group(370, 30, 350, 50);
- o->box(FL_THIN_DOWN_BOX);
- o->color(FL_GRAY0);
- o->selection_color((Fl_Color)218);
- o->labelcolor(FL_GREEN);
- OscilSpectrum *spc=new OscilSpectrum (o->x(),o->y(),o->w(),o->h(),"");
- spc->init(oscil,1,master);
- o->end();
- } // Fl_Group* o
- { bfparval = new Fl_Value_Output(490, 285, 25, 15, "Par.");
- bfparval->labelsize(12);
- bfparval->minimum(-63);
- bfparval->maximum(63);
- bfparval->step(1);
- } // Fl_Value_Output* bfparval
- { basefuncmodulation = new Fl_Group(550, 276, 169, 25);
- basefuncmodulation->box(FL_UP_FRAME);
- { bfmodtype = new Fl_Choice(599, 281, 50, 15, "B.F.Mod.");
- bfmodtype->tooltip("Base function modulation");
- bfmodtype->down_box(FL_BORDER_BOX);
- bfmodtype->labelsize(10);
- bfmodtype->textsize(10);
- bfmodtype->callback((Fl_Callback*)cb_bfmodtype);
- bfmodtype->menu(menu_bfmodtype);
- } // Fl_Choice* bfmodtype
- { bfmodpar1 = new WidgetPDial(659, 281, 15, 15);
- bfmodpar1->tooltip("Oscillator\'s modulation parameter 1");
- bfmodpar1->box(FL_NO_BOX);
- bfmodpar1->color(FL_BACKGROUND_COLOR);
- bfmodpar1->selection_color(FL_INACTIVE_COLOR);
- bfmodpar1->labeltype(FL_NORMAL_LABEL);
- bfmodpar1->labelfont(0);
- bfmodpar1->labelsize(14);
- bfmodpar1->labelcolor(FL_FOREGROUND_COLOR);
- bfmodpar1->maximum(127);
- bfmodpar1->step(1);
- bfmodpar1->callback((Fl_Callback*)cb_bfmodpar1);
- bfmodpar1->align(Fl_Align(FL_ALIGN_BOTTOM));
- bfmodpar1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* bfmodpar1
- { bfmodpar2 = new WidgetPDial(679, 281, 15, 15);
- bfmodpar2->tooltip("Oscillator\'s modulation parameter 2");
- bfmodpar2->box(FL_NO_BOX);
- bfmodpar2->color(FL_BACKGROUND_COLOR);
- bfmodpar2->selection_color(FL_INACTIVE_COLOR);
- bfmodpar2->labeltype(FL_NORMAL_LABEL);
- bfmodpar2->labelfont(0);
- bfmodpar2->labelsize(14);
- bfmodpar2->labelcolor(FL_FOREGROUND_COLOR);
- bfmodpar2->maximum(127);
- bfmodpar2->step(1);
- bfmodpar2->callback((Fl_Callback*)cb_bfmodpar2);
- bfmodpar2->align(Fl_Align(FL_ALIGN_BOTTOM));
- bfmodpar2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* bfmodpar2
- { bfmodpar3 = new WidgetPDial(699, 281, 15, 15);
- bfmodpar3->tooltip("Oscillator\'s modulation parameter 3");
- bfmodpar3->box(FL_NO_BOX);
- bfmodpar3->color(FL_BACKGROUND_COLOR);
- bfmodpar3->selection_color(FL_INACTIVE_COLOR);
- bfmodpar3->labeltype(FL_NORMAL_LABEL);
- bfmodpar3->labelfont(0);
- bfmodpar3->labelsize(14);
- bfmodpar3->labelcolor(FL_FOREGROUND_COLOR);
- bfmodpar3->maximum(127);
- bfmodpar3->step(1);
- bfmodpar3->callback((Fl_Callback*)cb_bfmodpar3);
- bfmodpar3->align(Fl_Align(FL_ALIGN_BOTTOM));
- bfmodpar3->when(FL_WHEN_CHANGED);
- } // WidgetPDial* bfmodpar3
- if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodulation->deactivate();
- basefuncmodulation->end();
- } // Fl_Group* basefuncmodulation
- basefuncdisplaygroup->end();
- } // Fl_Group* basefuncdisplaygroup
- { magtype = new Fl_Choice(70, 280, 65, 20, "Mag.Type");
- magtype->down_box(FL_BORDER_BOX);
- magtype->labelsize(11);
- magtype->textsize(11);
- magtype->callback((Fl_Callback*)cb_magtype);
- magtype->menu(menu_magtype);
- } // Fl_Choice* magtype
- { Fl_Button* o = new Fl_Button(5, 313, 85, 20, "Use as base");
- o->tooltip("Use this Oscillator as base function");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Use);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(668, 565, 62, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(670, 505, 55, 15, "Clear");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Clear);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(135, 308, 150, 30);
- o->box(FL_UP_FRAME);
- { wshbutton = new Fl_Choice(165, 313, 55, 20, "Wsh.");
- wshbutton->tooltip("Waveshaping function");
- wshbutton->down_box(FL_BORDER_BOX);
- wshbutton->labelsize(10);
- wshbutton->textsize(10);
- wshbutton->callback((Fl_Callback*)cb_wshbutton);
- wshbutton->menu(menu_wshbutton);
- } // Fl_Choice* wshbutton
- { wshpar = new WidgetPDial(260, 313, 20, 20);
- wshpar->tooltip("Waveshaping Parameter");
- wshpar->box(FL_NO_BOX);
- wshpar->color(FL_BACKGROUND_COLOR);
- wshpar->selection_color(FL_INACTIVE_COLOR);
- wshpar->labeltype(FL_NORMAL_LABEL);
- wshpar->labelfont(0);
- wshpar->labelsize(14);
- wshpar->labelcolor(FL_FOREGROUND_COLOR);
- wshpar->minimum(-64);
- wshpar->maximum(63);
- wshpar->step(1);
- wshpar->callback((Fl_Callback*)cb_wshpar);
- wshpar->align(Fl_Align(FL_ALIGN_BOTTOM));
- wshpar->when(FL_WHEN_CHANGED);
- } // WidgetPDial* wshpar
- { wsparval = new Fl_Value_Output(228, 316, 25, 15);
- wsparval->labelsize(12);
- wsparval->minimum(-63);
- wsparval->maximum(63);
- wsparval->step(1);
- } // Fl_Value_Output* wsparval
- o->end();
- } // Fl_Group* o
- { autoclearbutton = new Fl_Light_Button(95, 313, 35, 20, "Clr.");
- autoclearbutton->tooltip("Auto clear when using the oscillator as base function");
- autoclearbutton->box(FL_THIN_UP_BOX);
- autoclearbutton->value(1);
- autoclearbutton->labelfont(1);
- autoclearbutton->labelsize(10);
- } // Fl_Light_Button* autoclearbutton
- { Fl_Group* o = new Fl_Group(285, 308, 155, 30);
- o->box(FL_UP_FRAME);
- { fltbutton = new Fl_Choice(315, 313, 50, 20, "Filter");
- fltbutton->tooltip("Oscillator\'s filter type");
- fltbutton->down_box(FL_BORDER_BOX);
- fltbutton->labelsize(10);
- fltbutton->textsize(10);
- fltbutton->callback((Fl_Callback*)cb_fltbutton);
- fltbutton->menu(menu_fltbutton);
- } // Fl_Choice* fltbutton
- { filtervalue1 = new WidgetPDial(367, 313, 20, 20);
- filtervalue1->tooltip("Oscillator\'s filter parameter1");
- filtervalue1->box(FL_NO_BOX);
- filtervalue1->color(FL_BACKGROUND_COLOR);
- filtervalue1->selection_color(FL_INACTIVE_COLOR);
- filtervalue1->labeltype(FL_NORMAL_LABEL);
- filtervalue1->labelfont(0);
- filtervalue1->labelsize(14);
- filtervalue1->labelcolor(FL_FOREGROUND_COLOR);
- filtervalue1->maximum(127);
- filtervalue1->step(1);
- filtervalue1->callback((Fl_Callback*)cb_filtervalue1);
- filtervalue1->align(Fl_Align(FL_ALIGN_BOTTOM));
- filtervalue1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* filtervalue1
- { filterpref = new Fl_Check_Button(415, 313, 20, 20, "p");
- filterpref->tooltip("Apply the filter before the waveshaping");
- filterpref->down_box(FL_DOWN_BOX);
- filterpref->labelsize(10);
- filterpref->callback((Fl_Callback*)cb_filterpref);
- filterpref->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
- } // Fl_Check_Button* filterpref
- { filtervalue2 = new WidgetPDial(392, 313, 20, 20);
- filtervalue2->tooltip("Oscillator\'s filter parameter2");
- filtervalue2->box(FL_NO_BOX);
- filtervalue2->color(FL_BACKGROUND_COLOR);
- filtervalue2->selection_color(FL_INACTIVE_COLOR);
- filtervalue2->labeltype(FL_NORMAL_LABEL);
- filtervalue2->labelfont(0);
- filtervalue2->labelsize(14);
- filtervalue2->labelcolor(FL_FOREGROUND_COLOR);
- filtervalue2->maximum(127);
- filtervalue2->step(1);
- filtervalue2->callback((Fl_Callback*)cb_filtervalue2);
- filtervalue2->align(Fl_Align(FL_ALIGN_BOTTOM));
- filtervalue2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* filtervalue2
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(590, 308, 135, 30);
- o->box(FL_UP_FRAME);
- { sabutton = new Fl_Choice(630, 313, 60, 20, "Sp.adj.");
- sabutton->tooltip("Oscillator\'s spectrum adjust");
- sabutton->down_box(FL_BORDER_BOX);
- sabutton->labelsize(10);
- sabutton->textsize(10);
- sabutton->callback((Fl_Callback*)cb_sabutton);
- sabutton->menu(menu_sabutton);
- } // Fl_Choice* sabutton
- { sadjpar = new WidgetPDial(695, 313, 20, 20);
- sadjpar->tooltip("Oscillator\'s spectrum adjust parameter");
- sadjpar->box(FL_NO_BOX);
- sadjpar->color(FL_BACKGROUND_COLOR);
- sadjpar->selection_color(FL_INACTIVE_COLOR);
- sadjpar->labeltype(FL_NORMAL_LABEL);
- sadjpar->labelfont(0);
- sadjpar->labelsize(14);
- sadjpar->labelcolor(FL_FOREGROUND_COLOR);
- sadjpar->maximum(127);
- sadjpar->step(1);
- sadjpar->callback((Fl_Callback*)cb_sadjpar);
- sadjpar->align(Fl_Align(FL_ALIGN_BOTTOM));
- sadjpar->when(FL_WHEN_CHANGED);
- } // WidgetPDial* sadjpar
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(665, 340, 65, 65);
- o->box(FL_UP_FRAME);
- { harmonicshiftcounter = new Fl_Counter(670, 365, 55, 15, "Harmonic Shift");
- harmonicshiftcounter->type(1);
- harmonicshiftcounter->labelsize(10);
- harmonicshiftcounter->minimum(-64);
- harmonicshiftcounter->maximum(64);
- harmonicshiftcounter->step(1);
- harmonicshiftcounter->textfont(1);
- harmonicshiftcounter->textsize(10);
- harmonicshiftcounter->callback((Fl_Callback*)cb_harmonicshiftcounter);
- harmonicshiftcounter->align(Fl_Align(129));
- } // Fl_Counter* harmonicshiftcounter
- { harmonicshiftpre = new Fl_Check_Button(690, 385, 34, 15, "preH");
- harmonicshiftpre->tooltip("Apply the harmonic shift before the waveshaping and filtering");
- harmonicshiftpre->down_box(FL_DOWN_BOX);
- harmonicshiftpre->labelsize(10);
- harmonicshiftpre->callback((Fl_Callback*)cb_harmonicshiftpre);
- harmonicshiftpre->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
- } // Fl_Check_Button* harmonicshiftpre
- { Fl_Button* o = new Fl_Button(670, 385, 20, 15, "R");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_R);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(665, 410, 65, 90);
- o->box(FL_UP_FRAME);
- { adhrtype = new Fl_Choice(670, 425, 55, 15, "Adpt.Harm.");
- adhrtype->tooltip("The type of the addaptive harmonics");
- adhrtype->down_box(FL_BORDER_BOX);
- adhrtype->labelsize(10);
- adhrtype->textsize(10);
- adhrtype->callback((Fl_Callback*)cb_adhrtype);
- adhrtype->align(Fl_Align(129));
- adhrtype->when(FL_WHEN_RELEASE_ALWAYS);
- adhrtype->menu(menu_adhrtype);
- } // Fl_Choice* adhrtype
- { adhrpow = new WidgetPDial(700, 460, 25, 25, "pow");
- adhrpow->tooltip("Adaptive harmonics power");
- adhrpow->box(FL_NO_BOX);
- adhrpow->color(FL_BACKGROUND_COLOR);
- adhrpow->selection_color(FL_INACTIVE_COLOR);
- adhrpow->labeltype(FL_NORMAL_LABEL);
- adhrpow->labelfont(0);
- adhrpow->labelsize(10);
- adhrpow->labelcolor(FL_FOREGROUND_COLOR);
- adhrpow->maximum(200);
- adhrpow->step(1);
- adhrpow->callback((Fl_Callback*)cb_adhrpow);
- adhrpow->align(Fl_Align(FL_ALIGN_BOTTOM));
- adhrpow->when(FL_WHEN_CHANGED);
- } // WidgetPDial* adhrpow
- { adhrbf = new WidgetPDial(670, 460, 25, 25, "baseF");
- adhrbf->tooltip("Adaptive harmonics base frequency");
- adhrbf->box(FL_NO_BOX);
- adhrbf->color(FL_BACKGROUND_COLOR);
- adhrbf->selection_color(FL_INACTIVE_COLOR);
- adhrbf->labeltype(FL_NORMAL_LABEL);
- adhrbf->labelfont(0);
- adhrbf->labelsize(10);
- adhrbf->labelcolor(FL_FOREGROUND_COLOR);
- adhrbf->maximum(255);
- adhrbf->step(1);
- adhrbf->callback((Fl_Callback*)cb_adhrbf);
- adhrbf->align(Fl_Align(FL_ALIGN_BOTTOM));
- adhrbf->when(FL_WHEN_CHANGED);
- } // WidgetPDial* adhrbf
- { adhrpar = new Fl_Slider(670, 445, 55, 10);
- adhrpar->type(5);
- adhrpar->box(FL_NO_BOX);
- adhrpar->maximum(100);
- adhrpar->step(1);
- adhrpar->value(50);
- adhrpar->callback((Fl_Callback*)cb_adhrpar);
- } // Fl_Slider* adhrpar
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(440, 308, 150, 30);
- o->box(FL_UP_FRAME);
- { modtype = new Fl_Choice(470, 315, 50, 15, "Mod.");
- modtype->tooltip("modulation");
- modtype->down_box(FL_BORDER_BOX);
- modtype->labelsize(10);
- modtype->textsize(10);
- modtype->callback((Fl_Callback*)cb_modtype);
- modtype->menu(menu_modtype);
- } // Fl_Choice* modtype
- { modpar1 = new WidgetPDial(530, 315, 15, 15);
- modpar1->tooltip("Oscillator\'s modulation parameter 1");
- modpar1->box(FL_NO_BOX);
- modpar1->color(FL_BACKGROUND_COLOR);
- modpar1->selection_color(FL_INACTIVE_COLOR);
- modpar1->labeltype(FL_NORMAL_LABEL);
- modpar1->labelfont(0);
- modpar1->labelsize(14);
- modpar1->labelcolor(FL_FOREGROUND_COLOR);
- modpar1->maximum(127);
- modpar1->step(1);
- modpar1->callback((Fl_Callback*)cb_modpar1);
- modpar1->align(Fl_Align(FL_ALIGN_BOTTOM));
- modpar1->when(FL_WHEN_CHANGED);
- } // WidgetPDial* modpar1
- { modpar2 = new WidgetPDial(550, 315, 15, 15);
- modpar2->tooltip("Oscillator\'s modulation parameter 2");
- modpar2->box(FL_NO_BOX);
- modpar2->color(FL_BACKGROUND_COLOR);
- modpar2->selection_color(FL_INACTIVE_COLOR);
- modpar2->labeltype(FL_NORMAL_LABEL);
- modpar2->labelfont(0);
- modpar2->labelsize(14);
- modpar2->labelcolor(FL_FOREGROUND_COLOR);
- modpar2->maximum(127);
- modpar2->step(1);
- modpar2->callback((Fl_Callback*)cb_modpar2);
- modpar2->align(Fl_Align(FL_ALIGN_BOTTOM));
- modpar2->when(FL_WHEN_CHANGED);
- } // WidgetPDial* modpar2
- { modpar3 = new WidgetPDial(570, 315, 15, 15);
- modpar3->tooltip("Oscillator\'s modulation parameter 3");
- modpar3->box(FL_NO_BOX);
- modpar3->color(FL_BACKGROUND_COLOR);
- modpar3->selection_color(FL_INACTIVE_COLOR);
- modpar3->labeltype(FL_NORMAL_LABEL);
- modpar3->labelfont(0);
- modpar3->labelsize(14);
- modpar3->labelcolor(FL_FOREGROUND_COLOR);
- modpar3->maximum(127);
- modpar3->step(1);
- modpar3->callback((Fl_Callback*)cb_modpar3);
- modpar3->align(Fl_Align(FL_ALIGN_BOTTOM));
- modpar3->when(FL_WHEN_CHANGED);
- } // WidgetPDial* modpar3
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(670, 525, 55, 15, "Sine");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Sine);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(670, 545, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(700, 545, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- { _this_has_to_be_the_last = new Fl_Scroll(5, 340, 660, 250);
- _this_has_to_be_the_last->type(1);
- _this_has_to_be_the_last->box(FL_FLAT_BOX);
- { Fl_Pack* o = harmonics = new Fl_Pack(10, 345, 650, 225);
- harmonics->type(1);
- for (int i=0;ih(),"");h[i]->init(oscil,i,oscildisplaygroup,oldosc,cbwidget,applybutton,master);}
- harmonics->end();
- } // Fl_Pack* harmonics
- _this_has_to_be_the_last->end();
- } // Fl_Scroll* _this_has_to_be_the_last
- if (oscil->ADvsPAD) o->label("PADsynth Harmonic Content Editor");
- osceditUI->end();
- } // Fl_Double_Window* osceditUI
- return osceditUI;
-}
-
-OscilEditor::OscilEditor(OscilGen *oscil_,Fl_Widget *oldosc_,Fl_Widget *cbwidget_,Fl_Widget *cbapplywidget_,Master *master_) {
- oscil=oscil_;
- oldosc=oldosc_;
- cbwidget=cbwidget_;
- cbapplywidget=cbapplywidget_;
- master=master_;
-
- make_window();
-
- refresh();
- osceditUI->show();
-}
-
-OscilEditor::~OscilEditor() {
- osceditUI->hide();
- //for (int i=0;ivalue(oscil->Phmagtype);
- rndslider->value(oscil->Prand-64);
-
- hrndtype->value(oscil->Pamprandtype);
- hrnddial->value(oscil->Pamprandpower);
-
- bftype->value(oscil->Pcurrentbasefunc);
- bfparval->value(oscil->Pbasefuncpar-64);
- bfslider->value(oscil->Pbasefuncpar-64);
-
- bfmodtype->value(oscil->Pbasefuncmodulation);
- bfmodpar1->value(oscil->Pbasefuncmodulationpar1);
- bfmodpar2->value(oscil->Pbasefuncmodulationpar2);
- bfmodpar3->value(oscil->Pbasefuncmodulationpar3);
-
- wshbutton->value(oscil->Pwaveshapingfunction);
- wsparval->value(oscil->Pwaveshaping-64);
- wshpar->value(oscil->Pwaveshaping-64);
-
- fltbutton->value(oscil->Pfiltertype);
- filtervalue1->value(oscil->Pfilterpar1);
- filtervalue2->value(oscil->Pfilterpar2);
- filterpref->value(oscil->Pfilterbeforews);
-
- modtype->value(oscil->Pmodulation);
- modpar1->value(oscil->Pmodulationpar1);
- modpar2->value(oscil->Pmodulationpar2);
- modpar3->value(oscil->Pmodulationpar3);
-
- sabutton->value(oscil->Psatype);
- sadjpar->value(oscil->Psapar);
-
- harmonicshiftcounter->value(oscil->Pharmonicshift);
- harmonicshiftpre->value(oscil->Pharmonicshiftfirst);
-
- adhrtype->value(oscil->Padaptiveharmonics);
- adhrbf->value(oscil->Padaptiveharmonicsbasefreq);
- adhrpow->value(oscil->Padaptiveharmonicspower);
- adhrtype->value(oscil->Padaptiveharmonicspar);
-
- for (int i=0;irefresh();
-
- pthread_mutex_lock(&master->mutex);
- oscil->prepare();
- pthread_mutex_unlock(&master->mutex);
-
- basefuncdisplaygroup->redraw();
- redrawoscil();
-}
-
-void OscilEditor::redrawoscil() {
- oscildisplaygroup->redraw();
- oldosc->redraw();
- if (cbwidget!=NULL) {
- cbwidget->do_callback();
- applybutton->color(FL_RED);
- applybutton->redraw();
- };
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.h b/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.h
deleted file mode 100644
index 99a00b60d..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/OscilGenUI.h
+++ /dev/null
@@ -1,282 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef OscilGenUI_h
-#define OscilGenUI_h
-#include
-#include "../Synth/OscilGen.h"
-#include "../Misc/Util.h"
-#include "../Misc/Master.h"
-#include "ResonanceUI.h"
-#include
-#include
-#include
-#include "WidgetPDial.h"
-#include "EnvelopeUI.h"
-#include "LFOUI.h"
-#include "FilterUI.h"
-#include "PresetsUI.h"
-#include
-
-class OscilSpectrum : public Fl_Box {
-public:
- OscilSpectrum(int x,int y, int w, int h, const char *label=0);
- void init(OscilGen *oscil_,int oscbase_,Master *master_);
- void draw();
-private:
- OscilGen *oscil;
- int oscbase;
- Master *master;
-};
-
-class PSlider : public Fl_Slider {
-public:
- PSlider(int x,int y, int w, int h, const char *label=0);
- int handle(int event);
-};
-
-class Oscilloscope : public Fl_Box {
-public:
- Oscilloscope(int x,int y, int w, int h, const char *label=0);
- void init(OscilGen *oscil_,Master *master_);
- void init(OscilGen *oscil_,int oscbase_,Master *master_);
- void init(OscilGen *oscil_,int oscbase_,int phase_,Master *master_);
- void draw();
-private:
- OscilGen *oscil;
- int oscbase;
-public:
- int phase;
-private:
- Master *master;
-};
-#include
-
-class Oscilharmonic : public Fl_Group {
- Fl_Group* make_window();
- Fl_Group *harmonic;
-public:
- PSlider *mag;
-private:
- void cb_mag_i(PSlider*, void*);
- static void cb_mag(PSlider*, void*);
-public:
- PSlider *phase;
-private:
- void cb_phase_i(PSlider*, void*);
- static void cb_phase(PSlider*, void*);
-public:
- Oscilharmonic(int x,int y, int w, int h, const char *label=0);
- void init(OscilGen *oscil_,int n_,Fl_Group *display_,Fl_Widget *oldosc_,Fl_Widget *cbwidget_,Fl_Widget *applybutton_, Master *master_);
- void refresh();
- ~Oscilharmonic();
-private:
- OscilGen *oscil;
- Fl_Group *display;
- int n;
- Fl_Widget *oldosc,*cbwidget,*applybutton;
- Master *master;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class OscilEditor : public PresetsUI_ {
-public:
- Fl_Double_Window* make_window();
- Fl_Double_Window *osceditUI;
- Fl_Button *applybutton;
-private:
- void cb_applybutton_i(Fl_Button*, void*);
- static void cb_applybutton(Fl_Button*, void*);
-public:
- Fl_Group *oscildisplaygroup;
- Fl_Value_Slider *rndslider;
-private:
- void cb_rndslider_i(Fl_Value_Slider*, void*);
- static void cb_rndslider(Fl_Value_Slider*, void*);
-public:
- Fl_Choice *hrndtype;
-private:
- void cb_hrndtype_i(Fl_Choice*, void*);
- static void cb_hrndtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hrndtype[];
-public:
- WidgetPDial *hrnddial;
-private:
- void cb_hrnddial_i(WidgetPDial*, void*);
- static void cb_hrnddial(WidgetPDial*, void*);
-public:
- Fl_Group *basefuncdisplaygroup;
- WidgetPDial *bfslider;
-private:
- void cb_bfslider_i(WidgetPDial*, void*);
- static void cb_bfslider(WidgetPDial*, void*);
-public:
- Fl_Choice *bftype;
-private:
- void cb_bftype_i(Fl_Choice*, void*);
- static void cb_bftype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_bftype[];
-public:
- Fl_Value_Output *bfparval;
- Fl_Group *basefuncmodulation;
- Fl_Choice *bfmodtype;
-private:
- void cb_bfmodtype_i(Fl_Choice*, void*);
- static void cb_bfmodtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_bfmodtype[];
-public:
- WidgetPDial *bfmodpar1;
-private:
- void cb_bfmodpar1_i(WidgetPDial*, void*);
- static void cb_bfmodpar1(WidgetPDial*, void*);
-public:
- WidgetPDial *bfmodpar2;
-private:
- void cb_bfmodpar2_i(WidgetPDial*, void*);
- static void cb_bfmodpar2(WidgetPDial*, void*);
-public:
- WidgetPDial *bfmodpar3;
-private:
- void cb_bfmodpar3_i(WidgetPDial*, void*);
- static void cb_bfmodpar3(WidgetPDial*, void*);
-public:
- Fl_Choice *magtype;
-private:
- void cb_magtype_i(Fl_Choice*, void*);
- static void cb_magtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_magtype[];
- void cb_Use_i(Fl_Button*, void*);
- static void cb_Use(Fl_Button*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
- void cb_Clear_i(Fl_Button*, void*);
- static void cb_Clear(Fl_Button*, void*);
-public:
- Fl_Choice *wshbutton;
-private:
- void cb_wshbutton_i(Fl_Choice*, void*);
- static void cb_wshbutton(Fl_Choice*, void*);
- static Fl_Menu_Item menu_wshbutton[];
-public:
- WidgetPDial *wshpar;
-private:
- void cb_wshpar_i(WidgetPDial*, void*);
- static void cb_wshpar(WidgetPDial*, void*);
-public:
- Fl_Value_Output *wsparval;
- Fl_Light_Button *autoclearbutton;
- Fl_Choice *fltbutton;
-private:
- void cb_fltbutton_i(Fl_Choice*, void*);
- static void cb_fltbutton(Fl_Choice*, void*);
- static Fl_Menu_Item menu_fltbutton[];
-public:
- WidgetPDial *filtervalue1;
-private:
- void cb_filtervalue1_i(WidgetPDial*, void*);
- static void cb_filtervalue1(WidgetPDial*, void*);
-public:
- Fl_Check_Button *filterpref;
-private:
- void cb_filterpref_i(Fl_Check_Button*, void*);
- static void cb_filterpref(Fl_Check_Button*, void*);
-public:
- WidgetPDial *filtervalue2;
-private:
- void cb_filtervalue2_i(WidgetPDial*, void*);
- static void cb_filtervalue2(WidgetPDial*, void*);
-public:
- Fl_Choice *sabutton;
-private:
- void cb_sabutton_i(Fl_Choice*, void*);
- static void cb_sabutton(Fl_Choice*, void*);
- static Fl_Menu_Item menu_sabutton[];
-public:
- WidgetPDial *sadjpar;
-private:
- void cb_sadjpar_i(WidgetPDial*, void*);
- static void cb_sadjpar(WidgetPDial*, void*);
-public:
- Fl_Counter *harmonicshiftcounter;
-private:
- void cb_harmonicshiftcounter_i(Fl_Counter*, void*);
- static void cb_harmonicshiftcounter(Fl_Counter*, void*);
-public:
- Fl_Check_Button *harmonicshiftpre;
-private:
- void cb_harmonicshiftpre_i(Fl_Check_Button*, void*);
- static void cb_harmonicshiftpre(Fl_Check_Button*, void*);
- void cb_R_i(Fl_Button*, void*);
- static void cb_R(Fl_Button*, void*);
-public:
- Fl_Choice *adhrtype;
-private:
- void cb_adhrtype_i(Fl_Choice*, void*);
- static void cb_adhrtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_adhrtype[];
-public:
- WidgetPDial *adhrpow;
-private:
- void cb_adhrpow_i(WidgetPDial*, void*);
- static void cb_adhrpow(WidgetPDial*, void*);
-public:
- WidgetPDial *adhrbf;
-private:
- void cb_adhrbf_i(WidgetPDial*, void*);
- static void cb_adhrbf(WidgetPDial*, void*);
-public:
- Fl_Slider *adhrpar;
-private:
- void cb_adhrpar_i(Fl_Slider*, void*);
- static void cb_adhrpar(Fl_Slider*, void*);
-public:
- Fl_Choice *modtype;
-private:
- void cb_modtype_i(Fl_Choice*, void*);
- static void cb_modtype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_modtype[];
-public:
- WidgetPDial *modpar1;
-private:
- void cb_modpar1_i(WidgetPDial*, void*);
- static void cb_modpar1(WidgetPDial*, void*);
-public:
- WidgetPDial *modpar2;
-private:
- void cb_modpar2_i(WidgetPDial*, void*);
- static void cb_modpar2(WidgetPDial*, void*);
-public:
- WidgetPDial *modpar3;
-private:
- void cb_modpar3_i(WidgetPDial*, void*);
- static void cb_modpar3(WidgetPDial*, void*);
- void cb_Sine_i(Fl_Button*, void*);
- static void cb_Sine(Fl_Button*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
-public:
- Fl_Scroll *_this_has_to_be_the_last;
- Fl_Pack *harmonics;
- OscilEditor(OscilGen *oscil_,Fl_Widget *oldosc_,Fl_Widget *cbwidget_,Fl_Widget *cbapplywidget_,Master *master_);
- ~OscilEditor();
- void refresh();
- void redrawoscil();
-private:
- OscilGen *oscil;
- Fl_Widget *oldosc,*cbwidget,*cbapplywidget;
- Oscilharmonic *h[MAX_AD_HARMONICS];
- Master *master;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.cpp
deleted file mode 100644
index 5bf635209..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.cpp
+++ /dev/null
@@ -1,1518 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/PADnoteUI.h"
-#include
-#include
-#include
-#include
-
-PADnoteHarmonicProfile::PADnoteHarmonicProfile(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- pars=NULL;
-}
-
-void PADnoteHarmonicProfile::init(PADnoteParameters *pars,Master *master_) {
- master=master_;
- this->pars=pars;
-}
-
-void PADnoteHarmonicProfile::draw() {
- int ox=x(),oy=y(),lx=w(),ly=h();
- if (!visible()) return;
- float smps[lx];
-
- float realbw=pars->getprofile(smps,lx);
- bool active=active_r();
-
- //draw the equivalent bandwidth
- if (active) fl_color(220,220,220);
- else fl_color(160,165,165);
- fl_line_style(FL_DASH);
- int rbw=(int)(realbw*(lx-1.0)/2.0);
- 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(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 );
- };
- for (int i=1;i<5;i++){
- int ky=(int)(ly/5.0*i);
- fl_line(ox,oy+ly-ky,ox+lx,oy+ly-ky-1);
- };
-
-
- fl_color(120,120,120);
- fl_line_style(FL_DASH);
- fl_line(ox+lx/2,oy,ox+lx/2,oy+ly);
-
- //draw the graph
- fl_line_style(FL_SOLID);
- if (active) fl_color(180,210,240);
- else fl_color(150,150,155);
-
- fl_color( fl_color_add_alpha( fl_color(), 127 ) );
-
- fl_begin_polygon();
- fl_vertex( ox, oy + h() );
- for (int i=0;i0)
- // {
- // 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);
- if (active) fl_color(0,100,220);
- else fl_color(150,160,170);
- fl_line(ox+lx/2-rbw,oy,ox+lx/2-rbw,oy+ly-1);
- fl_line(ox+lx/2+rbw,oy,ox+lx/2+rbw,oy+ly-1);
-
- fl_line_style(0);
-}
-
-PADnoteOvertonePosition::PADnoteOvertonePosition(int x,int y, int w, int h, const char *label):Fl_Box(x,y,w,h,label) {
- pars=NULL;
-}
-
-void PADnoteOvertonePosition::init(PADnoteParameters *pars,Master *master_) {
- master=master_;
- this->pars=pars;
-}
-
-void PADnoteOvertonePosition::draw() {
- if (!visible()) return;
- const int maxdb=60;
-
- int ox=x(),oy=y(),lx=w(),ly=h();
- const int maxharmonic=64;
-
-
- for (int i=1;ioscilsize/2;
- float spc[n];
- for (int i=0;imutex);
- pars->oscilgen->getspectrum(n,spc,0);
- pthread_mutex_unlock(&master->mutex);
-
-
- //normalize
- float max=0;
- for (int i=0;igetNhr(i);
- int kx=(int)(lx/(float)maxharmonic*nhr);
- if ((kx<0)||(kx>lx)) continue;
-
- spectrum[kx]=spc[i-1]/max+1e-9;
-
- };
-
- fl_color(180,0,0);
- fl_line_style(0);
-
- if (pars->Pmode==2){
- int old=0;
- for (int i=1;i1e-10)||(i==(lx-1))){
- int delta=i-old;
- float val1=spectrum[old];
- float val2=spectrum[i];
-
- float idelta=1.0/delta;
- for (int j=0;jdB2rap(-maxdb)) x=rap2dB(x)/maxdb+1;
- else continue;
- int yy=(int)(x*ly);
- fl_line(ox+i,oy+ly-1-yy,ox+i,oy+ly-1);
-
- };
-}
-
-void PADnoteUI::cb__i(Fl_Tabs* o, void*) {
- if (o->value()!=harmonicstructuregroup) applybutton->hide();
- else applybutton->show();
-}
-void PADnoteUI::cb_(Fl_Tabs* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb__i(o,v);
-}
-
-void PADnoteUI::cb_hpbasepar1_i(WidgetPDial* o, void*) {
- pars->Php.base.par1=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpbasepar1(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpbasepar1_i(o,v);
-}
-
-void PADnoteUI::cb_hpbasetype_i(Fl_Choice* o, void*) {
- pars->Php.base.type=o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpbasetype(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpbasetype_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_hpbasetype[] = {
- {"Gauss", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Square", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DoubleExp", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_hpfreqmult_i(WidgetPDial* o, void*) {
- pars->Php.freqmult=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpfreqmult(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpfreqmult_i(o,v);
-}
-
-void PADnoteUI::cb_hpmpar1_i(WidgetPDial* o, void*) {
- pars->Php.modulator.par1=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpmpar1(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpmpar1_i(o,v);
-}
-
-void PADnoteUI::cb_hpmfreq_i(WidgetPDial* o, void*) {
- pars->Php.modulator.freq=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpmfreq(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpmfreq_i(o,v);
-}
-
-void PADnoteUI::cb_hpamptype_i(Fl_Choice* o, void*) {
- pars->Php.amp.type=o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpamptype(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_hpamptype_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_hpamptype[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Gauss", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Flat", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_hpampmode_i(Fl_Choice* o, void*) {
- pars->Php.amp.mode=o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpampmode(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_hpampmode_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_hpampmode[] = {
- {"Sum", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Mult", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Div1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Div2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_hpamppar1_i(WidgetPDial* o, void*) {
- pars->Php.amp.par1=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpamppar1(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_hpamppar1_i(o,v);
-}
-
-void PADnoteUI::cb_hpamppar2_i(WidgetPDial* o, void*) {
- pars->Php.amp.par2=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpamppar2(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->parent()->user_data()))->cb_hpamppar2_i(o,v);
-}
-
-void PADnoteUI::cb_hpautoscale_i(Fl_Check_Button* o, void*) {
- pars->Php.autoscale=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpautoscale(Fl_Check_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpautoscale_i(o,v);
-}
-
-void PADnoteUI::cb_hponehalf_i(Fl_Choice* o, void*) {
- pars->Php.onehalf=o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hponehalf(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hponehalf_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_hponehalf[] = {
- {"Full", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Upper Half", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Lower Half", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_hpwidth_i(WidgetPDial* o, void*) {
- pars->Php.width=(int) o->value();
-hprofile->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hpwidth(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hpwidth_i(o,v);
-}
-
-void PADnoteUI::cb_Change_i(Fl_Button*, void*) {
- if (oscui!=NULL) delete (oscui);
-oscui=new OscilEditor(pars->oscilgen,osc,cbwidget,applybutton,master);
-}
-void PADnoteUI::cb_Change(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_Change_i(o,v);
-}
-
-void PADnoteUI::cb_cbwidget_i(Fl_Box*, void*) {
- overtonepos->redraw();
-applybutton->color(FL_RED);
-applybutton->redraw();
-}
-void PADnoteUI::cb_cbwidget(Fl_Box* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_cbwidget_i(o,v);
-}
-
-void PADnoteUI::cb_Resonance_i(Fl_Button*, void*) {
- resui->resonancewindow->redraw();
-resui->resonancewindow->show();
-resui->setcbwidget(cbwidget,applybutton);
-}
-void PADnoteUI::cb_Resonance(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_Resonance_i(o,v);
-}
-
-void PADnoteUI::cb_bwdial_i(WidgetPDial* o, void*) {
- bwcents->value(pars->setPbandwidth((int) o->value()));
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_bwdial(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_bwdial_i(o,v);
-}
-
-void PADnoteUI::cb_hrpostype_i(Fl_Choice* o, void*) {
- pars->Phrpos.type=o->value();
-overtonepos->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hrpostype(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hrpostype_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_hrpostype[] = {
- {"Harmonic", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"ShiftU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"ShiftL", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"PowerU", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"PowerL", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Sine", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Power", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_hrpospar1_i(WidgetPDial* o, void*) {
- pars->Phrpos.par1=(int) o->value();
-overtonepos->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hrpospar1(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hrpospar1_i(o,v);
-}
-
-void PADnoteUI::cb_hrpospar2_i(WidgetPDial* o, void*) {
- pars->Phrpos.par2=(int) o->value();
-overtonepos->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hrpospar2(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hrpospar2_i(o,v);
-}
-
-void PADnoteUI::cb_hrpospar3_i(WidgetPDial* o, void*) {
- pars->Phrpos.par3=(int) o->value();
-overtonepos->redraw();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_hrpospar3(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hrpospar3_i(o,v);
-}
-
-void PADnoteUI::cb_bwscale_i(Fl_Choice* o, void*) {
- pars->Pbwscale=(int) o->value();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_bwscale(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_bwscale_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_bwscale[] = {
- {"Normal", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"EqualHz", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Quater", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Half", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"75%", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"150%", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Double", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Inv.Half", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_qsamplesize_i(Fl_Choice* o, void*) {
- pars->Pquality.samplesize=(int) o->value();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_qsamplesize(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_qsamplesize_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_qsamplesize[] = {
- {"16k (Tiny)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"32k", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"64k (Small)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"128k", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"256k (Normal)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"512k", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"1M (Big)", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_qsmpoct_i(Fl_Choice* o, void*) {
- pars->Pquality.smpoct=(int) o->value();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_qsmpoct(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_qsmpoct_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_qsmpoct[] = {
- {"0.5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"12", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_qoct_i(Fl_Choice* o, void*) {
- pars->Pquality.oct=(int) o->value();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_qoct(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_qoct_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_qoct[] = {
- {"1", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"7", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"8", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_qbasenote_i(Fl_Choice* o, void*) {
- pars->Pquality.basenote=(int) o->value();
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_qbasenote(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_qbasenote_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_qbasenote[] = {
- {"C-2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"G-2", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"C-3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"G-3", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"C-4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"G-4", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"C-5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"G-5", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {"G-6", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 14, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_spectrummode_i(Fl_Choice* o, void*) {
- pars->Pmode=(int) o->value();
-
-if (pars->Pmode==0){
- bwprofilegroup->activate();
- bwdial->activate();
- bwcents->activate();
- hprofile->activate();
- hprofile->color(54);
- bwscale->activate();
-} else {
- bwprofilegroup->deactivate();
- bwdial->deactivate();
- bwcents->deactivate();
- hprofile->deactivate();
- hprofile->color(48);
- bwscale->deactivate();
-};
-
-cbwidget->do_callback();
-}
-void PADnoteUI::cb_spectrummode(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->user_data()))->cb_spectrummode_i(o,v);
-}
-
-Fl_Menu_Item PADnoteUI::menu_spectrummode[] = {
- {"Bandwidth", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Discrete", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Continous", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PADnoteUI::cb_octave_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=16;
-pars->PCoarseDetune = k*1024+
- pars->PCoarseDetune%1024;
-}
-void PADnoteUI::cb_octave(Fl_Counter* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_octave_i(o,v);
-}
-
-void PADnoteUI::cb_coarsedet_i(Fl_Counter* o, void*) {
- int k=(int) o->value();
-if (k<0) k+=1024;
-pars->PCoarseDetune = k+
- (pars->PCoarseDetune/1024)*1024;
-}
-void PADnoteUI::cb_coarsedet(Fl_Counter* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_coarsedet_i(o,v);
-}
-
-void PADnoteUI::cb_detune_i(Fl_Slider* o, void*) {
- pars->PDetune=(int)o->value()+8192;
-detunevalueoutput->do_callback();
-}
-void PADnoteUI::cb_detune(Fl_Slider* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_detune_i(o,v);
-}
-
-void PADnoteUI::cb_detunevalueoutput_i(Fl_Value_Output* o, void*) {
- o->value(getdetune(pars->PDetuneType,0,pars->PDetune));
-}
-void PADnoteUI::cb_detunevalueoutput(Fl_Value_Output* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_detunevalueoutput_i(o,v);
-}
-
-void PADnoteUI::cb_detunetype_i(Fl_Choice* o, void*) {
- pars->PDetuneType=(int) o->value()+1;
-detunevalueoutput->do_callback();
-}
-void PADnoteUI::cb_detunetype(Fl_Choice* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_detunetype_i(o,v);
-}
-
-void PADnoteUI::cb_hz440_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-pars->Pfixedfreq=x;
-if (x==0) fixedfreqetdial->deactivate();
- else fixedfreqetdial->activate();
-}
-void PADnoteUI::cb_hz440(Fl_Check_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_hz440_i(o,v);
-}
-
-void PADnoteUI::cb_fixedfreqetdial_i(WidgetPDial* o, void*) {
- pars->PfixedfreqET=(int) o->value();
-}
-void PADnoteUI::cb_fixedfreqetdial(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_fixedfreqetdial_i(o,v);
-}
-
-void PADnoteUI::cb_volume_i(Fl_Value_Slider* o, void*) {
- pars->PVolume=(int)o->value();
-}
-void PADnoteUI::cb_volume(Fl_Value_Slider* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_volume_i(o,v);
-}
-
-void PADnoteUI::cb_vsns_i(Fl_Value_Slider* o, void*) {
- pars->PAmpVelocityScaleFunction=(int) o->value();
-}
-void PADnoteUI::cb_vsns(Fl_Value_Slider* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_vsns_i(o,v);
-}
-
-void PADnoteUI::cb_pan_i(WidgetPDial* o, void*) {
- pars->PPanning=(int) o->value();
-}
-void PADnoteUI::cb_pan(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_pan_i(o,v);
-}
-
-void PADnoteUI::cb_pstr_i(WidgetPDial* o, void*) {
- pars->PPunchStrength=(int) o->value();
-}
-void PADnoteUI::cb_pstr(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_pstr_i(o,v);
-}
-
-void PADnoteUI::cb_pt_i(WidgetPDial* o, void*) {
- pars->PPunchTime=(int) o->value();
-}
-void PADnoteUI::cb_pt(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_pt_i(o,v);
-}
-
-void PADnoteUI::cb_pstc_i(WidgetPDial* o, void*) {
- pars->PPunchStretch=(int) o->value();
-}
-void PADnoteUI::cb_pstc(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_pstc_i(o,v);
-}
-
-void PADnoteUI::cb_pvel_i(WidgetPDial* o, void*) {
- pars->PPunchVelocitySensing=(int) o->value();
-}
-void PADnoteUI::cb_pvel(WidgetPDial* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_pvel_i(o,v);
-}
-
-void PADnoteUI::cb_stereo_i(Fl_Check_Button* o, void*) {
- pars->PStereo=(int) o->value();
-hprofile->redraw();
-}
-void PADnoteUI::cb_stereo(Fl_Check_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->parent()->parent()->parent()->user_data()))->cb_stereo_i(o,v);
-}
-
-void PADnoteUI::cb_applybutton_i(Fl_Button* o, void*) {
- pars->applyparameters(true);
-o->color(FL_GRAY);
-if (oscui!=NULL) {
- oscui->applybutton->color(FL_GRAY);
- oscui->applybutton->redraw();
-};
-if (resui!=NULL) {
- resui->applybutton->color(FL_GRAY);
- resui->applybutton->redraw();
-};
-}
-void PADnoteUI::cb_applybutton(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb_applybutton_i(o,v);
-}
-
-void PADnoteUI::cb_Close_i(Fl_Button*, void*) {
- padnotewindow->hide();
-}
-void PADnoteUI::cb_Close(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void PADnoteUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(pars);
-}
-void PADnoteUI::cb_C(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void PADnoteUI::cb_P_i(Fl_Button*, void*) {
- presetsui->paste(pars,this);
-}
-void PADnoteUI::cb_P(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void PADnoteUI::cb_export_i(Fl_Button*, void*) {
- char *filename;
-filename=fl_file_chooser("Export samples:","(*.wav)",NULL,0);
-if (filename==NULL) return;
-fl_filename_setext(filename,"");
-
-
-
-pars->export2wav(filename);
-}
-void PADnoteUI::cb_export(Fl_Button* o, void* v) {
- ((PADnoteUI*)(o->parent()->user_data()))->cb_export_i(o,v);
-}
-
-PADnoteUI::PADnoteUI(PADnoteParameters *parameters,Master *master_) {
- pars=parameters;
- master=master_;
- oscui=NULL;
- resui=new ResonanceUI(pars->resonance);
- make_window();
-}
-
-Fl_Double_Window* PADnoteUI::make_window() {
- { padnotewindow = new Fl_Double_Window(535, 435, "PAD synth Parameters");
- padnotewindow->user_data((void*)(this));
- { Fl_Tabs* o = new Fl_Tabs(0, 0, 535, 395);
- o->box(FL_UP_FRAME);
- o->callback((Fl_Callback*)cb_);
- { harmonicstructuregroup = new Fl_Group(0, 20, 535, 375, "Harmonic Structure");
- harmonicstructuregroup->box(FL_UP_FRAME);
- { Fl_Group* o = bwprofilegroup = new Fl_Group(5, 30, 90, 260);
- bwprofilegroup->box(FL_UP_FRAME);
- { WidgetPDial* o = hpbasepar1 = new WidgetPDial(20, 75, 25, 25, "Width");
- hpbasepar1->box(FL_ROUND_UP_BOX);
- hpbasepar1->color(FL_BACKGROUND_COLOR);
- hpbasepar1->selection_color(FL_INACTIVE_COLOR);
- hpbasepar1->labeltype(FL_NORMAL_LABEL);
- hpbasepar1->labelfont(0);
- hpbasepar1->labelsize(10);
- hpbasepar1->labelcolor(FL_FOREGROUND_COLOR);
- hpbasepar1->maximum(127);
- hpbasepar1->step(1);
- hpbasepar1->callback((Fl_Callback*)cb_hpbasepar1);
- hpbasepar1->align(Fl_Align(FL_ALIGN_TOP));
- hpbasepar1->when(FL_WHEN_CHANGED);
- o->value(pars->Php.base.par1);
- } // WidgetPDial* hpbasepar1
- { Fl_Choice* o = hpbasetype = new Fl_Choice(15, 45, 75, 15, "Base Type");
- hpbasetype->down_box(FL_BORDER_BOX);
- hpbasetype->labelsize(10);
- hpbasetype->textsize(10);
- hpbasetype->callback((Fl_Callback*)cb_hpbasetype);
- hpbasetype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- hpbasetype->menu(menu_hpbasetype);
- o->value(pars->Php.base.type);
- } // Fl_Choice* hpbasetype
- { WidgetPDial* o = hpfreqmult = new WidgetPDial(55, 75, 25, 25, "FreqMlt");
- hpfreqmult->box(FL_ROUND_UP_BOX);
- hpfreqmult->color(FL_BACKGROUND_COLOR);
- hpfreqmult->selection_color(FL_INACTIVE_COLOR);
- hpfreqmult->labeltype(FL_NORMAL_LABEL);
- hpfreqmult->labelfont(0);
- hpfreqmult->labelsize(10);
- hpfreqmult->labelcolor(FL_FOREGROUND_COLOR);
- hpfreqmult->maximum(127);
- hpfreqmult->step(1);
- hpfreqmult->callback((Fl_Callback*)cb_hpfreqmult);
- hpfreqmult->align(Fl_Align(FL_ALIGN_TOP));
- hpfreqmult->when(FL_WHEN_CHANGED);
- o->value(pars->Php.freqmult);
- } // WidgetPDial* hpfreqmult
- { WidgetPDial* o = hpmpar1 = new WidgetPDial(15, 115, 20, 20, "Str");
- hpmpar1->box(FL_ROUND_UP_BOX);
- hpmpar1->color(FL_BACKGROUND_COLOR);
- hpmpar1->selection_color(FL_INACTIVE_COLOR);
- hpmpar1->labeltype(FL_NORMAL_LABEL);
- hpmpar1->labelfont(0);
- hpmpar1->labelsize(10);
- hpmpar1->labelcolor(FL_FOREGROUND_COLOR);
- hpmpar1->maximum(127);
- hpmpar1->step(1);
- hpmpar1->callback((Fl_Callback*)cb_hpmpar1);
- hpmpar1->align(Fl_Align(FL_ALIGN_TOP));
- hpmpar1->when(FL_WHEN_CHANGED);
- o->value(pars->Php.modulator.par1);
- } // WidgetPDial* hpmpar1
- { WidgetPDial* o = hpmfreq = new WidgetPDial(40, 115, 20, 20, "SFreq");
- hpmfreq->box(FL_ROUND_UP_BOX);
- hpmfreq->color(FL_BACKGROUND_COLOR);
- hpmfreq->selection_color(FL_INACTIVE_COLOR);
- hpmfreq->labeltype(FL_NORMAL_LABEL);
- hpmfreq->labelfont(0);
- hpmfreq->labelsize(10);
- hpmfreq->labelcolor(FL_FOREGROUND_COLOR);
- hpmfreq->maximum(127);
- hpmfreq->step(1);
- hpmfreq->callback((Fl_Callback*)cb_hpmfreq);
- hpmfreq->align(Fl_Align(FL_ALIGN_TOP));
- hpmfreq->when(FL_WHEN_CHANGED);
- o->value(pars->Php.modulator.freq);
- } // WidgetPDial* hpmfreq
- { Fl_Group* o = new Fl_Group(10, 160, 80, 105);
- o->box(FL_BORDER_BOX);
- { Fl_Choice* o = hpamptype = new Fl_Choice(15, 175, 70, 15, "AmpMultiplier");
- hpamptype->down_box(FL_BORDER_BOX);
- hpamptype->labelsize(10);
- hpamptype->textsize(10);
- hpamptype->callback((Fl_Callback*)cb_hpamptype);
- hpamptype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- hpamptype->menu(menu_hpamptype);
- o->value(pars->Php.amp.type);
- } // Fl_Choice* hpamptype
- { Fl_Choice* o = hpampmode = new Fl_Choice(15, 205, 70, 15, "AmpMode");
- hpampmode->down_box(FL_BORDER_BOX);
- hpampmode->labelsize(10);
- hpampmode->textsize(10);
- hpampmode->callback((Fl_Callback*)cb_hpampmode);
- hpampmode->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- hpampmode->menu(menu_hpampmode);
- o->value(pars->Php.amp.mode);
- } // Fl_Choice* hpampmode
- { WidgetPDial* o = hpamppar1 = new WidgetPDial(15, 235, 25, 25, "Par1");
- hpamppar1->box(FL_ROUND_UP_BOX);
- hpamppar1->color(FL_BACKGROUND_COLOR);
- hpamppar1->selection_color(FL_INACTIVE_COLOR);
- hpamppar1->labeltype(FL_NORMAL_LABEL);
- hpamppar1->labelfont(0);
- hpamppar1->labelsize(10);
- hpamppar1->labelcolor(FL_FOREGROUND_COLOR);
- hpamppar1->maximum(127);
- hpamppar1->step(1);
- hpamppar1->callback((Fl_Callback*)cb_hpamppar1);
- hpamppar1->align(Fl_Align(FL_ALIGN_TOP));
- hpamppar1->when(FL_WHEN_CHANGED);
- o->value(pars->Php.amp.par1);
- } // WidgetPDial* hpamppar1
- { WidgetPDial* o = hpamppar2 = new WidgetPDial(55, 235, 25, 25, "Par2");
- hpamppar2->box(FL_ROUND_UP_BOX);
- hpamppar2->color(FL_BACKGROUND_COLOR);
- hpamppar2->selection_color(FL_INACTIVE_COLOR);
- hpamppar2->labeltype(FL_NORMAL_LABEL);
- hpamppar2->labelfont(0);
- hpamppar2->labelsize(10);
- hpamppar2->labelcolor(FL_FOREGROUND_COLOR);
- hpamppar2->maximum(127);
- hpamppar2->step(1);
- hpamppar2->callback((Fl_Callback*)cb_hpamppar2);
- hpamppar2->align(Fl_Align(FL_ALIGN_TOP));
- hpamppar2->when(FL_WHEN_CHANGED);
- o->value(pars->Php.amp.par2);
- } // WidgetPDial* hpamppar2
- o->end();
- } // Fl_Group* o
- { Fl_Check_Button* o = hpautoscale = new Fl_Check_Button(10, 270, 60, 15, "autoscale");
- hpautoscale->down_box(FL_DOWN_BOX);
- hpautoscale->labelsize(10);
- hpautoscale->callback((Fl_Callback*)cb_hpautoscale);
- o->value(pars->Php.autoscale);
- } // Fl_Check_Button* hpautoscale
- { Fl_Choice* o = hponehalf = new Fl_Choice(10, 143, 80, 15);
- hponehalf->down_box(FL_BORDER_BOX);
- hponehalf->labelsize(10);
- hponehalf->textsize(10);
- hponehalf->callback((Fl_Callback*)cb_hponehalf);
- hponehalf->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- hponehalf->menu(menu_hponehalf);
- o->value(pars->Php.onehalf);
- } // Fl_Choice* hponehalf
- { WidgetPDial* o = hpwidth = new WidgetPDial(65, 115, 20, 20, "Size");
- hpwidth->box(FL_ROUND_UP_BOX);
- hpwidth->color(FL_BACKGROUND_COLOR);
- hpwidth->selection_color(FL_INACTIVE_COLOR);
- hpwidth->labeltype(FL_NORMAL_LABEL);
- hpwidth->labelfont(0);
- hpwidth->labelsize(10);
- hpwidth->labelcolor(FL_FOREGROUND_COLOR);
- hpwidth->maximum(127);
- hpwidth->step(1);
- hpwidth->callback((Fl_Callback*)cb_hpwidth);
- hpwidth->align(Fl_Align(FL_ALIGN_TOP));
- hpwidth->when(FL_WHEN_CHANGED);
- o->value(pars->Php.width);
- } // WidgetPDial* hpwidth
- if (pars->Pmode!=0) o->deactivate();
- bwprofilegroup->end();
- } // Fl_Group* bwprofilegroup
- { Fl_Group* o = new Fl_Group(100, 155, 270, 135);
- o->box(FL_THIN_DOWN_BOX);
- o->color(FL_GRAY0);
- o->selection_color((Fl_Color)71);
- o->labelcolor((Fl_Color)179);
- o->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- osc=new Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");
- osc->init(pars->oscilgen,master);
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(375, 270, 60, 20, "Change");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Change);
- } // Fl_Button* o
- { cbwidget = new Fl_Box(125, 135, 205, 20, "Harmonic Content");
- cbwidget->callback((Fl_Callback*)cb_cbwidget);
- cbwidget->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- } // Fl_Box* cbwidget
- { Fl_Button* o = new Fl_Button(375, 225, 80, 20, "Resonance");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Resonance);
- } // Fl_Button* o
- { WidgetPDial* o = bwdial = new WidgetPDial(15, 295, 35, 35, "BandWidth");
- bwdial->box(FL_ROUND_UP_BOX);
- bwdial->color(FL_BACKGROUND_COLOR);
- bwdial->selection_color(FL_INACTIVE_COLOR);
- bwdial->labeltype(FL_NORMAL_LABEL);
- bwdial->labelfont(0);
- bwdial->labelsize(10);
- bwdial->labelcolor(FL_FOREGROUND_COLOR);
- bwdial->maximum(1000);
- bwdial->step(1);
- bwdial->callback((Fl_Callback*)cb_bwdial);
- bwdial->align(Fl_Align(FL_ALIGN_BOTTOM));
- bwdial->when(FL_WHEN_CHANGED);
- o->value(pars->Pbandwidth);
- if (pars->Pmode!=0) o->deactivate();
- } // WidgetPDial* bwdial
- { Fl_Value_Output* o = bwcents = new Fl_Value_Output(55, 305, 55, 15, "cents");
- bwcents->labelsize(10);
- bwcents->maximum(10000);
- bwcents->step(0.1);
- bwcents->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->value(pars->setPbandwidth(pars->Pbandwidth));
- if (pars->Pmode!=0) o->deactivate();
- } // Fl_Value_Output* bwcents
- { Fl_Group* o = new Fl_Group(315, 295, 215, 45);
- o->box(FL_UP_FRAME);
- { Fl_Choice* o = hrpostype = new Fl_Choice(325, 310, 80, 20, "OvertonesPosition");
- hrpostype->down_box(FL_BORDER_BOX);
- hrpostype->labelsize(10);
- hrpostype->textsize(11);
- hrpostype->callback((Fl_Callback*)cb_hrpostype);
- hrpostype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- hrpostype->menu(menu_hrpostype);
- o->value(pars->Phrpos.type);
- } // Fl_Choice* hrpostype
- { WidgetPDial* o = hrpospar1 = new WidgetPDial(425, 310, 25, 25, "Par1");
- hrpospar1->box(FL_ROUND_UP_BOX);
- hrpospar1->color(FL_BACKGROUND_COLOR);
- hrpospar1->selection_color(FL_INACTIVE_COLOR);
- hrpospar1->labeltype(FL_NORMAL_LABEL);
- hrpospar1->labelfont(0);
- hrpospar1->labelsize(10);
- hrpospar1->labelcolor(FL_FOREGROUND_COLOR);
- hrpospar1->maximum(255);
- hrpospar1->step(1);
- hrpospar1->callback((Fl_Callback*)cb_hrpospar1);
- hrpospar1->align(Fl_Align(FL_ALIGN_TOP));
- hrpospar1->when(FL_WHEN_CHANGED);
- o->value(pars->Phrpos.par1);
- } // WidgetPDial* hrpospar1
- { WidgetPDial* o = hrpospar2 = new WidgetPDial(460, 310, 25, 25, "Par2");
- hrpospar2->box(FL_ROUND_UP_BOX);
- hrpospar2->color(FL_BACKGROUND_COLOR);
- hrpospar2->selection_color(FL_INACTIVE_COLOR);
- hrpospar2->labeltype(FL_NORMAL_LABEL);
- hrpospar2->labelfont(0);
- hrpospar2->labelsize(10);
- hrpospar2->labelcolor(FL_FOREGROUND_COLOR);
- hrpospar2->maximum(255);
- hrpospar2->step(1);
- hrpospar2->callback((Fl_Callback*)cb_hrpospar2);
- hrpospar2->align(Fl_Align(FL_ALIGN_TOP));
- hrpospar2->when(FL_WHEN_CHANGED);
- o->value(pars->Phrpos.par2);
- } // WidgetPDial* hrpospar2
- { WidgetPDial* o = hrpospar3 = new WidgetPDial(495, 310, 25, 25, "ForceH");
- hrpospar3->box(FL_ROUND_UP_BOX);
- hrpospar3->color(FL_BACKGROUND_COLOR);
- hrpospar3->selection_color(FL_INACTIVE_COLOR);
- hrpospar3->labeltype(FL_NORMAL_LABEL);
- hrpospar3->labelfont(0);
- hrpospar3->labelsize(10);
- hrpospar3->labelcolor(FL_FOREGROUND_COLOR);
- hrpospar3->maximum(255);
- hrpospar3->step(1);
- hrpospar3->callback((Fl_Callback*)cb_hrpospar3);
- hrpospar3->align(Fl_Align(FL_ALIGN_TOP));
- hrpospar3->when(FL_WHEN_CHANGED);
- o->value(pars->Phrpos.par3);
- } // WidgetPDial* hrpospar3
- o->end();
- } // Fl_Group* o
- { Fl_Choice* o = bwscale = new Fl_Choice(120, 305, 80, 20, "Bandwidth Scale");
- bwscale->down_box(FL_BORDER_BOX);
- bwscale->labelsize(10);
- bwscale->textsize(11);
- bwscale->callback((Fl_Callback*)cb_bwscale);
- bwscale->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- bwscale->menu(menu_bwscale);
- o->value(pars->Pbwscale);
- if (pars->Pmode!=0) o->deactivate();
- } // Fl_Choice* bwscale
- { Fl_Group* o = overtonepos = new Fl_Group(5, 345, 525, 45);
- overtonepos->box(FL_FLAT_BOX);
- overtonepos->color((Fl_Color)51);
- overtonepos->selection_color((Fl_Color)218);
- overtonepos->labelcolor(FL_GREEN);
- PADnoteOvertonePosition *opui=new PADnoteOvertonePosition(o->x(),o->y(),o->w(),o->h(),"");
- opui->init(pars,master);
- overtonepos->end();
- } // Fl_Group* overtonepos
- { Fl_Choice* o = qsamplesize = new Fl_Choice(375, 190, 115, 20, "Sample Size");
- qsamplesize->down_box(FL_BORDER_BOX);
- qsamplesize->labelsize(10);
- qsamplesize->textsize(11);
- qsamplesize->callback((Fl_Callback*)cb_qsamplesize);
- qsamplesize->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- qsamplesize->menu(menu_qsamplesize);
- o->value(pars->Pquality.samplesize);
- } // Fl_Choice* qsamplesize
- { Fl_Choice* o = qsmpoct = new Fl_Choice(430, 155, 45, 20, "smp/oct");
- qsmpoct->down_box(FL_BORDER_BOX);
- qsmpoct->labelsize(11);
- qsmpoct->textsize(11);
- qsmpoct->callback((Fl_Callback*)cb_qsmpoct);
- qsmpoct->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- qsmpoct->menu(menu_qsmpoct);
- o->value(pars->Pquality.smpoct);
- } // Fl_Choice* qsmpoct
- { Fl_Choice* o = qoct = new Fl_Choice(480, 155, 45, 20, "no.oct");
- qoct->down_box(FL_BORDER_BOX);
- qoct->labelsize(11);
- qoct->textsize(11);
- qoct->callback((Fl_Callback*)cb_qoct);
- qoct->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- qoct->menu(menu_qoct);
- o->value(pars->Pquality.oct);
- } // Fl_Choice* qoct
- { Fl_Choice* o = qbasenote = new Fl_Choice(375, 155, 50, 20, "base");
- qbasenote->down_box(FL_BORDER_BOX);
- qbasenote->labelsize(11);
- qbasenote->textsize(11);
- qbasenote->callback((Fl_Callback*)cb_qbasenote);
- qbasenote->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- qbasenote->menu(menu_qbasenote);
- o->value(pars->Pquality.basenote);
- } // Fl_Choice* qbasenote
- { Fl_Group* o = hprofile = new Fl_Group(100, 45, 430, 90);
- hprofile->box(FL_FLAT_BOX);
- hprofile->color((Fl_Color)51);
- hprofile->selection_color((Fl_Color)218);
- hprofile->labelcolor(FL_GREEN);
- PADnoteHarmonicProfile *hpui=new PADnoteHarmonicProfile(o->x(),o->y(),o->w(),o->h(),"");
- hpui->init(pars,master);
- if (pars->Pmode!=0) { o->deactivate(); o->color(48);};
- hprofile->end();
- } // Fl_Group* hprofile
- { new Fl_Box(160, 25, 315, 20, "Profile of One Harmonic (Frequency Distribution)");
- } // Fl_Box* o
- { Fl_Choice* o = spectrummode = new Fl_Choice(220, 305, 90, 20, "Spectrum Mode");
- spectrummode->down_box(FL_BORDER_BOX);
- spectrummode->labelfont(1);
- spectrummode->labelsize(10);
- spectrummode->textsize(11);
- spectrummode->callback((Fl_Callback*)cb_spectrummode);
- spectrummode->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- spectrummode->menu(menu_spectrummode);
- o->value(pars->Pmode);
- } // Fl_Choice* spectrummode
- harmonicstructuregroup->end();
- } // Fl_Group* harmonicstructuregroup
- { Fl_Group* o = new Fl_Group(0, 20, 535, 375, "Envelopes&LFOs");
- o->box(FL_UP_FRAME);
- o->hide();
- { Fl_Group* o = new Fl_Group(5, 275, 525, 115, "FREQUENCY");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = freqenv = new EnvelopeUI(10, 315, 205, 70, "PADSynth - Frequency Envelope");
- freqenv->box(FL_FLAT_BOX);
- freqenv->color((Fl_Color)51);
- freqenv->selection_color(FL_BACKGROUND_COLOR);
- freqenv->labeltype(FL_NORMAL_LABEL);
- freqenv->labelfont(0);
- freqenv->labelsize(14);
- freqenv->labelcolor(FL_FOREGROUND_COLOR);
- freqenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- freqenv->when(FL_WHEN_RELEASE);
- o->init(pars->FreqEnvelope);
- freqenv->end();
- } // EnvelopeUI* freqenv
- { Fl_Counter* o = octave = new Fl_Counter(470, 295, 45, 15, "Octave");
- octave->tooltip("Octave");
- octave->type(1);
- octave->labelsize(10);
- octave->minimum(-8);
- octave->maximum(7);
- octave->step(1);
- octave->textfont(1);
- octave->textsize(11);
- octave->callback((Fl_Callback*)cb_octave);
- octave->align(Fl_Align(FL_ALIGN_TOP));
- int k=pars->PCoarseDetune/1024;
- if (k>=8) k-=16;
- o->value(k);
- } // Fl_Counter* octave
- { Fl_Counter* o = coarsedet = new Fl_Counter(455, 365, 70, 20, "Coarse det.");
- coarsedet->tooltip("Coarse Detune");
- coarsedet->type(1);
- coarsedet->labelsize(10);
- coarsedet->minimum(-64);
- coarsedet->maximum(63);
- coarsedet->step(1);
- coarsedet->textfont(1);
- coarsedet->textsize(11);
- coarsedet->callback((Fl_Callback*)cb_coarsedet);
- coarsedet->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- int k=pars->PCoarseDetune%1024;
- if (k>=512) k-=1024;
- o->value(k);
- o->lstep(10);
- } // Fl_Counter* coarsedet
- { LFOUI* o = freqlfo = new LFOUI(215, 315, 230, 70, "Frequency LFO ");
- freqlfo->box(FL_FLAT_BOX);
- freqlfo->color(FL_DARK1);
- freqlfo->selection_color(FL_BACKGROUND_COLOR);
- freqlfo->labeltype(FL_NORMAL_LABEL);
- freqlfo->labelfont(0);
- freqlfo->labelsize(14);
- freqlfo->labelcolor(FL_FOREGROUND_COLOR);
- freqlfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- freqlfo->when(FL_WHEN_RELEASE);
- o->init(pars->FreqLfo);
- freqlfo->end();
- } // LFOUI* freqlfo
- { Fl_Slider* o = detune = new Fl_Slider(60, 295, 295, 15);
- detune->tooltip("Fine Detune (cents)");
- detune->type(5);
- detune->box(FL_NO_BOX);
- detune->minimum(-8192);
- detune->maximum(8191);
- detune->step(1);
- detune->callback((Fl_Callback*)cb_detune);
- o->value(pars->PDetune-8192);
- } // Fl_Slider* detune
- { Fl_Value_Output* o = detunevalueoutput = new Fl_Value_Output(12, 295, 45, 15, "Detune");
- detunevalueoutput->labelsize(10);
- detunevalueoutput->minimum(-5000);
- detunevalueoutput->maximum(5000);
- detunevalueoutput->step(0.01);
- detunevalueoutput->textfont(1);
- detunevalueoutput->textsize(10);
- detunevalueoutput->callback((Fl_Callback*)cb_detunevalueoutput);
- detunevalueoutput->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->value(getdetune(pars->PDetuneType,0,pars->PDetune));
- } // Fl_Value_Output* detunevalueoutput
- { Fl_Choice* o = detunetype = new Fl_Choice(450, 330, 75, 20, "Detune Type");
- detunetype->down_box(FL_BORDER_BOX);
- detunetype->labelsize(10);
- detunetype->textfont(1);
- detunetype->textsize(10);
- detunetype->callback((Fl_Callback*)cb_detunetype);
- detunetype->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");
- o->value(pars->PDetuneType-1);
- } // Fl_Choice* detunetype
- { Fl_Check_Button* o = hz440 = new Fl_Check_Button(365, 295, 50, 15, "440Hz");
- hz440->tooltip("set the base frequency to 440Hz");
- hz440->down_box(FL_DOWN_BOX);
- hz440->labelfont(1);
- hz440->labelsize(10);
- hz440->callback((Fl_Callback*)cb_hz440);
- o->value(pars->Pfixedfreq);
- } // Fl_Check_Button* hz440
- { WidgetPDial* o = fixedfreqetdial = new WidgetPDial(420, 295, 15, 15, "Eq.T.");
- fixedfreqetdial->tooltip("How the frequency varies acording to the keyboard (leftmost for fixed frequen\
-cy)");
- fixedfreqetdial->box(FL_ROUND_UP_BOX);
- fixedfreqetdial->color(FL_BACKGROUND_COLOR);
- fixedfreqetdial->selection_color(FL_INACTIVE_COLOR);
- fixedfreqetdial->labeltype(FL_NORMAL_LABEL);
- fixedfreqetdial->labelfont(0);
- fixedfreqetdial->labelsize(10);
- fixedfreqetdial->labelcolor(FL_FOREGROUND_COLOR);
- fixedfreqetdial->maximum(127);
- fixedfreqetdial->step(1);
- fixedfreqetdial->callback((Fl_Callback*)cb_fixedfreqetdial);
- fixedfreqetdial->align(Fl_Align(FL_ALIGN_RIGHT));
- fixedfreqetdial->when(FL_WHEN_CHANGED);
- o->value(pars->PfixedfreqET);
- if (pars->Pfixedfreq==0) o->deactivate();
- } // WidgetPDial* fixedfreqetdial
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 25, 240, 250, "AMPLITUDE");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { Fl_Value_Slider* o = volume = new Fl_Value_Slider(10, 50, 160, 15, "Vol");
- volume->tooltip("Volume");
- volume->type(5);
- volume->box(FL_NO_BOX);
- volume->labelsize(11);
- volume->maximum(127);
- volume->step(1);
- volume->callback((Fl_Callback*)cb_volume);
- volume->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->PVolume);
- } // Fl_Value_Slider* volume
- { Fl_Value_Slider* o = vsns = new Fl_Value_Slider(10, 70, 160, 15, "V.Sns");
- vsns->tooltip("Velocity Sensing Function (rightmost to disable)");
- vsns->type(5);
- vsns->box(FL_NO_BOX);
- vsns->labelsize(11);
- vsns->maximum(127);
- vsns->step(1);
- vsns->callback((Fl_Callback*)cb_vsns);
- vsns->align(Fl_Align(FL_ALIGN_RIGHT));
- o->value(pars->PAmpVelocityScaleFunction);
- } // Fl_Value_Slider* vsns
- { WidgetPDial* o = pan = new WidgetPDial(210, 45, 30, 30, "Pan");
- pan->tooltip("Panning (leftmost is Random)");
- pan->box(FL_ROUND_UP_BOX);
- pan->color(FL_BACKGROUND_COLOR);
- pan->selection_color(FL_INACTIVE_COLOR);
- pan->labeltype(FL_NORMAL_LABEL);
- pan->labelfont(0);
- pan->labelsize(10);
- pan->labelcolor(FL_FOREGROUND_COLOR);
- pan->maximum(127);
- pan->step(1);
- pan->callback((Fl_Callback*)cb_pan);
- pan->align(Fl_Align(FL_ALIGN_BOTTOM));
- pan->when(FL_WHEN_CHANGED);
- o->value(pars->PPanning);
- } // WidgetPDial* pan
- { WidgetPDial* o = pstr = new WidgetPDial(125, 247, 25, 25, "P.Str.");
- pstr->tooltip("Punch Strength");
- pstr->box(FL_ROUND_UP_BOX);
- pstr->color(FL_BACKGROUND_COLOR);
- pstr->selection_color(FL_INACTIVE_COLOR);
- pstr->labeltype(FL_NORMAL_LABEL);
- pstr->labelfont(0);
- pstr->labelsize(10);
- pstr->labelcolor(FL_FOREGROUND_COLOR);
- pstr->maximum(127);
- pstr->step(1);
- pstr->callback((Fl_Callback*)cb_pstr);
- pstr->align(Fl_Align(FL_ALIGN_TOP));
- pstr->when(FL_WHEN_CHANGED);
- o->value(pars->PPunchStrength);
- } // WidgetPDial* pstr
- { WidgetPDial* o = pt = new WidgetPDial(155, 247, 25, 25, "P.t.");
- pt->tooltip("Punch Time (duration)");
- pt->box(FL_ROUND_UP_BOX);
- pt->color(FL_BACKGROUND_COLOR);
- pt->selection_color(FL_INACTIVE_COLOR);
- pt->labeltype(FL_NORMAL_LABEL);
- pt->labelfont(0);
- pt->labelsize(10);
- pt->labelcolor(FL_FOREGROUND_COLOR);
- pt->maximum(127);
- pt->step(1);
- pt->callback((Fl_Callback*)cb_pt);
- pt->align(Fl_Align(FL_ALIGN_TOP));
- pt->when(FL_WHEN_CHANGED);
- o->value(pars->PPunchTime);
- } // WidgetPDial* pt
- { WidgetPDial* o = pstc = new WidgetPDial(185, 247, 25, 25, "P.Stc.");
- pstc->tooltip("Punch Stretch");
- pstc->box(FL_ROUND_UP_BOX);
- pstc->color(FL_BACKGROUND_COLOR);
- pstc->selection_color(FL_INACTIVE_COLOR);
- pstc->labeltype(FL_NORMAL_LABEL);
- pstc->labelfont(0);
- pstc->labelsize(10);
- pstc->labelcolor(FL_FOREGROUND_COLOR);
- pstc->maximum(127);
- pstc->step(1);
- pstc->callback((Fl_Callback*)cb_pstc);
- pstc->align(Fl_Align(FL_ALIGN_TOP));
- pstc->when(FL_WHEN_CHANGED);
- o->value(pars->PPunchStretch);
- } // WidgetPDial* pstc
- { WidgetPDial* o = pvel = new WidgetPDial(215, 247, 25, 25, "P.Vel.");
- pvel->tooltip("Punch Velocity Sensing");
- pvel->box(FL_ROUND_UP_BOX);
- pvel->color(FL_BACKGROUND_COLOR);
- pvel->selection_color(FL_INACTIVE_COLOR);
- pvel->labeltype(FL_NORMAL_LABEL);
- pvel->labelfont(0);
- pvel->labelsize(10);
- pvel->labelcolor(FL_FOREGROUND_COLOR);
- pvel->maximum(127);
- pvel->step(1);
- pvel->callback((Fl_Callback*)cb_pvel);
- pvel->align(Fl_Align(FL_ALIGN_TOP));
- pvel->when(FL_WHEN_CHANGED);
- o->value(pars->PPunchVelocitySensing);
- } // WidgetPDial* pvel
- { EnvelopeUI* o = ampenv = new EnvelopeUI(10, 95, 205, 70, "PADSynth - Amplitude Envelope");
- ampenv->box(FL_FLAT_BOX);
- ampenv->color((Fl_Color)51);
- ampenv->selection_color(FL_BACKGROUND_COLOR);
- ampenv->labeltype(FL_NORMAL_LABEL);
- ampenv->labelfont(0);
- ampenv->labelsize(14);
- ampenv->labelcolor(FL_FOREGROUND_COLOR);
- ampenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- ampenv->when(FL_WHEN_RELEASE);
- o->init(pars->AmpEnvelope);
- ampenv->end();
- } // EnvelopeUI* ampenv
- { LFOUI* o = amplfo = new LFOUI(10, 165, 230, 70, "Amplitude LFO ");
- amplfo->box(FL_FLAT_BOX);
- amplfo->color(FL_DARK1);
- amplfo->selection_color(FL_BACKGROUND_COLOR);
- amplfo->labeltype(FL_NORMAL_LABEL);
- amplfo->labelfont(0);
- amplfo->labelsize(14);
- amplfo->labelcolor(FL_FOREGROUND_COLOR);
- amplfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- amplfo->when(FL_WHEN_RELEASE);
- o->init(pars->AmpLfo);
- amplfo->end();
- } // LFOUI* amplfo
- { Fl_Check_Button* o = stereo = new Fl_Check_Button(15, 245, 70, 25, "Stereo");
- stereo->down_box(FL_DOWN_BOX);
- stereo->callback((Fl_Callback*)cb_stereo);
- o->value(pars->PStereo);
- } // Fl_Check_Button* stereo
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(245, 25, 285, 250, "FILTER");
- o->box(FL_UP_FRAME);
- o->labeltype(FL_EMBOSSED_LABEL);
- o->labelfont(1);
- o->labelsize(13);
- o->align(Fl_Align(FL_ALIGN_TOP|FL_ALIGN_INSIDE));
- { EnvelopeUI* o = filterenv = new EnvelopeUI(250, 130, 275, 70, "PADSynth - Filter Envelope");
- filterenv->box(FL_FLAT_BOX);
- filterenv->color((Fl_Color)51);
- filterenv->selection_color(FL_BACKGROUND_COLOR);
- filterenv->labeltype(FL_NORMAL_LABEL);
- filterenv->labelfont(0);
- filterenv->labelsize(14);
- filterenv->labelcolor(FL_FOREGROUND_COLOR);
- filterenv->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterenv->when(FL_WHEN_RELEASE);
- o->init(pars->FilterEnvelope);
- filterenv->end();
- } // EnvelopeUI* filterenv
- { LFOUI* o = filterlfo = new LFOUI(250, 200, 230, 70, "Filter LFO ");
- filterlfo->box(FL_FLAT_BOX);
- filterlfo->color(FL_DARK1);
- filterlfo->selection_color(FL_BACKGROUND_COLOR);
- filterlfo->labeltype(FL_NORMAL_LABEL);
- filterlfo->labelfont(0);
- filterlfo->labelsize(14);
- filterlfo->labelcolor(FL_FOREGROUND_COLOR);
- filterlfo->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterlfo->when(FL_WHEN_RELEASE);
- o->init(pars->FilterLfo);
- filterlfo->end();
- } // LFOUI* filterlfo
- { FilterUI* o = filterui = new FilterUI(250, 55, 275, 75, "PADsynth - Filter");
- filterui->box(FL_FLAT_BOX);
- filterui->color(FL_LIGHT1);
- filterui->selection_color(FL_BACKGROUND_COLOR);
- filterui->labeltype(FL_NORMAL_LABEL);
- filterui->labelfont(0);
- filterui->labelsize(14);
- filterui->labelcolor(FL_FOREGROUND_COLOR);
- filterui->align(Fl_Align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE));
- filterui->when(FL_WHEN_RELEASE);
- o->init(pars->GlobalFilter,&pars->PFilterVelocityScale,&pars->PFilterVelocityScaleFunction);
- filterui->end();
- } // FilterUI* filterui
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Group* o
- o->end();
- } // Fl_Tabs* o
- { Fl_Button* o = applybutton = new Fl_Button(300, 400, 135, 30, "Apply Changes");
- applybutton->box(FL_THIN_UP_BOX);
- applybutton->callback((Fl_Callback*)cb_applybutton);
- o->color(FL_RED);
- } // Fl_Button* applybutton
- { Fl_Button* o = new Fl_Button(440, 400, 90, 30, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(65, 400, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(95, 400, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(5, 400, 55, 30, "export");
- o->tooltip("export samples as wav file");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)51);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_export);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- padnotewindow->end();
- } // Fl_Double_Window* padnotewindow
- return padnotewindow;
-}
-
-void PADnoteUI::refresh() {
- volume->value(pars->PVolume);
- vsns->value(pars->PAmpVelocityScaleFunction);
- pan->value(pars->PPanning);
-
- stereo->value(pars->PStereo);
-
-
- pstr->value(pars->PPunchStrength);
- pt->value(pars->PPunchTime);
- pstc->value(pars->PPunchStretch);
- pvel->value(pars->PPunchVelocitySensing);
-
- detunevalueoutput->value(getdetune(pars->PDetuneType,0,pars->PDetune));
- detune->value(pars->PDetune-8192);
-
- int k=pars->PCoarseDetune/1024;if (k>=8) k-=16;
- octave->value(k);
-
- detunetype->value(pars->PDetuneType-1);
- k=pars->PCoarseDetune%1024;if (k>=512) k-=1024;
- coarsedet->value(k);
-
- hz440->value(pars->Pfixedfreq);
- fixedfreqetdial->value(pars->PfixedfreqET);
-
- amplfo->refresh();
- freqlfo->refresh();
- filterlfo->refresh();
-
- ampenv->refresh();
- freqenv->refresh();
- filterenv->refresh();
- filterui->refresh();
-
-
- /* harmonic structure parametrs */
-
- resui->refresh();
- if (oscui!=NULL) oscui->refresh();
-
- hpbasetype->value(pars->Php.base.type);
- hpbasepar1->value(pars->Php.base.par1);
- hpfreqmult->value(pars->Php.freqmult);
-
- hpmpar1->value(pars->Php.modulator.par1);
- hpmfreq->value(pars->Php.modulator.freq);
- hpwidth->value(pars->Php.width);
-
- hponehalf->value(pars->Php.onehalf);
- hpamptype->value(pars->Php.amp.type);
- hpampmode->value(pars->Php.amp.mode);
- hpamppar1->value(pars->Php.amp.par1);
- hpamppar2->value(pars->Php.amp.par2);
- hpautoscale->value(pars->Php.autoscale);
-
- bwdial->value(pars->Pbandwidth);
- if (pars->Pmode==0){
- bwprofilegroup->activate();
- bwdial->activate();
- bwcents->activate();
- hprofile->activate();
- hprofile->color(54);
- bwscale->activate();
- } else {
- bwprofilegroup->deactivate();
- bwdial->deactivate();
- bwcents->deactivate();
- hprofile->deactivate();
- hprofile->color(48);
- bwscale->activate();
- };
-
- spectrummode->value(pars->Pmode);
-
- qbasenote->value(pars->Pquality.basenote);
- qsmpoct->value(pars->Pquality.smpoct);
- qoct->value(pars->Pquality.oct);
- qsamplesize->value(pars->Pquality.samplesize);
-
- hrpostype->value(pars->Phrpos.type);
- hrpospar1->value(pars->Phrpos.par1);
- hrpospar2->value(pars->Phrpos.par2);
- hrpospar3->value(pars->Phrpos.par3);
-
- hprofile->redraw();
- overtonepos->redraw();
-
- osc->redraw();
- pars->applyparameters(true);
- applybutton->color(FL_GRAY);
- applybutton->parent()->redraw();
-}
-
-PADnoteUI::~PADnoteUI() {
- delete(oscui);
- delete(resui);
-
- padnotewindow->hide();
- delete(padnotewindow);
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.h b/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.h
deleted file mode 100644
index e21f494de..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/PADnoteUI.h
+++ /dev/null
@@ -1,305 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef PADnoteUI_h
-#define PADnoteUI_h
-#include
-#include "../Params/PADnoteParameters.h"
-#include "../Misc/Util.h"
-#include "../Misc/Master.h"
-#include "ResonanceUI.h"
-#include
-#include
-#include
-#include "WidgetPDial.h"
-#include "EnvelopeUI.h"
-#include "LFOUI.h"
-#include "FilterUI.h"
-#include "OscilGenUI.h"
-#include "PresetsUI.h"
-
-class PADnoteHarmonicProfile : public Fl_Box {
-public:
- PADnoteHarmonicProfile(int x,int y, int w, int h, const char *label=0);
- void init(PADnoteParameters *pars,Master *master_);
- void draw();
-private:
- Master *master;
-public:
- PADnoteParameters *pars;
-};
-
-class PADnoteOvertonePosition : public Fl_Box {
-public:
- PADnoteOvertonePosition(int x,int y, int w, int h, const char *label=0);
- void init(PADnoteParameters *pars,Master *master_);
- void draw();
-private:
- Master *master;
-public:
- PADnoteParameters *pars;
-};
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class PADnoteUI : public PresetsUI_ {
-public:
- PADnoteUI(PADnoteParameters *parameters,Master *master_);
- Fl_Double_Window* make_window();
- Fl_Double_Window *padnotewindow;
-private:
- void cb__i(Fl_Tabs*, void*);
- static void cb_(Fl_Tabs*, void*);
-public:
- Fl_Group *harmonicstructuregroup;
- Fl_Group *bwprofilegroup;
- WidgetPDial *hpbasepar1;
-private:
- void cb_hpbasepar1_i(WidgetPDial*, void*);
- static void cb_hpbasepar1(WidgetPDial*, void*);
-public:
- Fl_Choice *hpbasetype;
-private:
- void cb_hpbasetype_i(Fl_Choice*, void*);
- static void cb_hpbasetype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hpbasetype[];
-public:
- WidgetPDial *hpfreqmult;
-private:
- void cb_hpfreqmult_i(WidgetPDial*, void*);
- static void cb_hpfreqmult(WidgetPDial*, void*);
-public:
- WidgetPDial *hpmpar1;
-private:
- void cb_hpmpar1_i(WidgetPDial*, void*);
- static void cb_hpmpar1(WidgetPDial*, void*);
-public:
- WidgetPDial *hpmfreq;
-private:
- void cb_hpmfreq_i(WidgetPDial*, void*);
- static void cb_hpmfreq(WidgetPDial*, void*);
-public:
- Fl_Choice *hpamptype;
-private:
- void cb_hpamptype_i(Fl_Choice*, void*);
- static void cb_hpamptype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hpamptype[];
-public:
- Fl_Choice *hpampmode;
-private:
- void cb_hpampmode_i(Fl_Choice*, void*);
- static void cb_hpampmode(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hpampmode[];
-public:
- WidgetPDial *hpamppar1;
-private:
- void cb_hpamppar1_i(WidgetPDial*, void*);
- static void cb_hpamppar1(WidgetPDial*, void*);
-public:
- WidgetPDial *hpamppar2;
-private:
- void cb_hpamppar2_i(WidgetPDial*, void*);
- static void cb_hpamppar2(WidgetPDial*, void*);
-public:
- Fl_Check_Button *hpautoscale;
-private:
- void cb_hpautoscale_i(Fl_Check_Button*, void*);
- static void cb_hpautoscale(Fl_Check_Button*, void*);
-public:
- Fl_Choice *hponehalf;
-private:
- void cb_hponehalf_i(Fl_Choice*, void*);
- static void cb_hponehalf(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hponehalf[];
-public:
- WidgetPDial *hpwidth;
-private:
- void cb_hpwidth_i(WidgetPDial*, void*);
- static void cb_hpwidth(WidgetPDial*, void*);
- void cb_Change_i(Fl_Button*, void*);
- static void cb_Change(Fl_Button*, void*);
-public:
- Fl_Box *cbwidget;
-private:
- void cb_cbwidget_i(Fl_Box*, void*);
- static void cb_cbwidget(Fl_Box*, void*);
- void cb_Resonance_i(Fl_Button*, void*);
- static void cb_Resonance(Fl_Button*, void*);
-public:
- WidgetPDial *bwdial;
-private:
- void cb_bwdial_i(WidgetPDial*, void*);
- static void cb_bwdial(WidgetPDial*, void*);
-public:
- Fl_Value_Output *bwcents;
- Fl_Choice *hrpostype;
-private:
- void cb_hrpostype_i(Fl_Choice*, void*);
- static void cb_hrpostype(Fl_Choice*, void*);
- static Fl_Menu_Item menu_hrpostype[];
-public:
- WidgetPDial *hrpospar1;
-private:
- void cb_hrpospar1_i(WidgetPDial*, void*);
- static void cb_hrpospar1(WidgetPDial*, void*);
-public:
- WidgetPDial *hrpospar2;
-private:
- void cb_hrpospar2_i(WidgetPDial*, void*);
- static void cb_hrpospar2(WidgetPDial*, void*);
-public:
- WidgetPDial *hrpospar3;
-private:
- void cb_hrpospar3_i(WidgetPDial*, void*);
- static void cb_hrpospar3(WidgetPDial*, void*);
-public:
- Fl_Choice *bwscale;
-private:
- void cb_bwscale_i(Fl_Choice*, void*);
- static void cb_bwscale(Fl_Choice*, void*);
- static Fl_Menu_Item menu_bwscale[];
-public:
- Fl_Group *overtonepos;
- Fl_Choice *qsamplesize;
-private:
- void cb_qsamplesize_i(Fl_Choice*, void*);
- static void cb_qsamplesize(Fl_Choice*, void*);
- static Fl_Menu_Item menu_qsamplesize[];
-public:
- Fl_Choice *qsmpoct;
-private:
- void cb_qsmpoct_i(Fl_Choice*, void*);
- static void cb_qsmpoct(Fl_Choice*, void*);
- static Fl_Menu_Item menu_qsmpoct[];
-public:
- Fl_Choice *qoct;
-private:
- void cb_qoct_i(Fl_Choice*, void*);
- static void cb_qoct(Fl_Choice*, void*);
- static Fl_Menu_Item menu_qoct[];
-public:
- Fl_Choice *qbasenote;
-private:
- void cb_qbasenote_i(Fl_Choice*, void*);
- static void cb_qbasenote(Fl_Choice*, void*);
- static Fl_Menu_Item menu_qbasenote[];
-public:
- Fl_Group *hprofile;
- Fl_Choice *spectrummode;
-private:
- void cb_spectrummode_i(Fl_Choice*, void*);
- static void cb_spectrummode(Fl_Choice*, void*);
- static Fl_Menu_Item menu_spectrummode[];
-public:
- EnvelopeUI *freqenv;
- Fl_Counter *octave;
-private:
- void cb_octave_i(Fl_Counter*, void*);
- static void cb_octave(Fl_Counter*, void*);
-public:
- Fl_Counter *coarsedet;
-private:
- void cb_coarsedet_i(Fl_Counter*, void*);
- static void cb_coarsedet(Fl_Counter*, void*);
-public:
- LFOUI *freqlfo;
- Fl_Slider *detune;
-private:
- void cb_detune_i(Fl_Slider*, void*);
- static void cb_detune(Fl_Slider*, void*);
-public:
- Fl_Value_Output *detunevalueoutput;
-private:
- void cb_detunevalueoutput_i(Fl_Value_Output*, void*);
- static void cb_detunevalueoutput(Fl_Value_Output*, void*);
-public:
- Fl_Choice *detunetype;
-private:
- void cb_detunetype_i(Fl_Choice*, void*);
- static void cb_detunetype(Fl_Choice*, void*);
-public:
- Fl_Check_Button *hz440;
-private:
- void cb_hz440_i(Fl_Check_Button*, void*);
- static void cb_hz440(Fl_Check_Button*, void*);
-public:
- WidgetPDial *fixedfreqetdial;
-private:
- void cb_fixedfreqetdial_i(WidgetPDial*, void*);
- static void cb_fixedfreqetdial(WidgetPDial*, void*);
-public:
- Fl_Value_Slider *volume;
-private:
- void cb_volume_i(Fl_Value_Slider*, void*);
- static void cb_volume(Fl_Value_Slider*, void*);
-public:
- Fl_Value_Slider *vsns;
-private:
- void cb_vsns_i(Fl_Value_Slider*, void*);
- static void cb_vsns(Fl_Value_Slider*, void*);
-public:
- WidgetPDial *pan;
-private:
- void cb_pan_i(WidgetPDial*, void*);
- static void cb_pan(WidgetPDial*, void*);
-public:
- WidgetPDial *pstr;
-private:
- void cb_pstr_i(WidgetPDial*, void*);
- static void cb_pstr(WidgetPDial*, void*);
-public:
- WidgetPDial *pt;
-private:
- void cb_pt_i(WidgetPDial*, void*);
- static void cb_pt(WidgetPDial*, void*);
-public:
- WidgetPDial *pstc;
-private:
- void cb_pstc_i(WidgetPDial*, void*);
- static void cb_pstc(WidgetPDial*, void*);
-public:
- WidgetPDial *pvel;
-private:
- void cb_pvel_i(WidgetPDial*, void*);
- static void cb_pvel(WidgetPDial*, void*);
-public:
- EnvelopeUI *ampenv;
- LFOUI *amplfo;
- Fl_Check_Button *stereo;
-private:
- void cb_stereo_i(Fl_Check_Button*, void*);
- static void cb_stereo(Fl_Check_Button*, void*);
-public:
- EnvelopeUI *filterenv;
- LFOUI *filterlfo;
- FilterUI *filterui;
- Fl_Button *applybutton;
-private:
- void cb_applybutton_i(Fl_Button*, void*);
- static void cb_applybutton(Fl_Button*, void*);
- void cb_Close_i(Fl_Button*, void*);
- static void cb_Close(Fl_Button*, void*);
- void cb_C_i(Fl_Button*, void*);
- static void cb_C(Fl_Button*, void*);
- void cb_P_i(Fl_Button*, void*);
- static void cb_P(Fl_Button*, void*);
- void cb_export_i(Fl_Button*, void*);
- static void cb_export(Fl_Button*, void*);
-public:
- void refresh();
- ~PADnoteUI();
- PADnoteParameters *pars;
- Master *master;
- OscilEditor *oscui;
- Oscilloscope *osc;
- ResonanceUI *resui;
-};
-#endif
diff --git a/source/modules/carla_native/zynaddsubfx/UI/PartUI.cpp b/source/modules/carla_native/zynaddsubfx/UI/PartUI.cpp
deleted file mode 100644
index 7e176df7c..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/PartUI.cpp
+++ /dev/null
@@ -1,1872 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#include "zynaddsubfx/UI/PartUI.h"
-//Copyright (c) 2002-2005 Nasca Octavian Paul
-//License: GNU GPL version 2 or later
-
-void PartSysEffSend::cb_01_i(WidgetPDial* o, void*) {
- master->setPsysefxvol(npart,neff,(int) o->value());
-}
-void PartSysEffSend::cb_01(WidgetPDial* o, void* v) {
- ((PartSysEffSend*)(o->parent()->user_data()))->cb_01_i(o,v);
-}
-
-Fl_Group* PartSysEffSend::make_window() {
- { syseffsend = new Fl_Group(0, 0, 100, 100);
- syseffsend->box(FL_NO_BOX);
- syseffsend->color(FL_BACKGROUND_COLOR);
- syseffsend->selection_color(FL_BACKGROUND_COLOR);
- syseffsend->labeltype(FL_NO_LABEL);
- syseffsend->labelfont(0);
- syseffsend->labelsize(14);
- syseffsend->labelcolor(FL_FOREGROUND_COLOR);
- syseffsend->user_data((void*)(this));
- syseffsend->align(Fl_Align(FL_ALIGN_TOP));
- syseffsend->when(FL_WHEN_RELEASE);
- { WidgetPDial* o = new WidgetPDial(0, 0, 25, 25, "01");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(1);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_01);
- o->align(Fl_Align(130));
- o->when(FL_WHEN_CHANGED);
- o->size(25,25);
- o->value(master->Psysefxvol[neff][npart]);
- char tmp[10];snprintf(tmp,10,"%d",neff+1);o->copy_label(tmp);
- } // WidgetPDial* o
- syseffsend->end();
- } // Fl_Group* syseffsend
- return syseffsend;
-}
-
-PartSysEffSend::PartSysEffSend(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- master=NULL;
- neff=0;
- npart=0;
-}
-
-void PartSysEffSend::init(Master *master_,int npart_,int neff_) {
- npart=npart_;
- neff=neff_;
- master=master_;
- make_window();
- syseffsend->show();
- end();
-}
-
-PartSysEffSend::~PartSysEffSend() {
- syseffsend->hide();
- //delete(syseffsend);
-}
-
-void PartKitItem::cb_minkcounter_i(Fl_Counter* o, void*) {
- part->kit[n].Pminkey=(int)o->value();
-}
-void PartKitItem::cb_minkcounter(Fl_Counter* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_minkcounter_i(o,v);
-}
-
-void PartKitItem::cb_m_i(Fl_Button*, void*) {
- if (part->lastnote>=0) minkcounter->value(part->lastnote);
-minkcounter->do_callback();
-maxkcounter->do_callback();
-}
-void PartKitItem::cb_m(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_m_i(o,v);
-}
-
-void PartKitItem::cb_M_i(Fl_Button*, void*) {
- if (part->lastnote>=0) maxkcounter->value(part->lastnote);
-maxkcounter->do_callback();
-minkcounter->do_callback();
-}
-void PartKitItem::cb_M(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_M_i(o,v);
-}
-
-void PartKitItem::cb_R_i(Fl_Button*, void*) {
- minkcounter->value(0);
-minkcounter->do_callback();
-maxkcounter->value(127);
-maxkcounter->do_callback();
-}
-void PartKitItem::cb_R(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_R_i(o,v);
-}
-
-void PartKitItem::cb_adeditbutton_i(Fl_Button*, void*) {
- partui->showparameters(n,0);
-}
-void PartKitItem::cb_adeditbutton(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_adeditbutton_i(o,v);
-}
-
-void PartKitItem::cb_subeditbutton_i(Fl_Button*, void*) {
- partui->showparameters(n,1);
-}
-void PartKitItem::cb_subeditbutton(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_subeditbutton_i(o,v);
-}
-
-void PartKitItem::cb_mutedcheck_i(Fl_Check_Button* o, void*) {
- part->kit[n].Pmuted=(int)o->value();
-}
-void PartKitItem::cb_mutedcheck(Fl_Check_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_mutedcheck_i(o,v);
-}
-
-void PartKitItem::cb_maxkcounter_i(Fl_Counter* o, void*) {
- part->kit[n].Pmaxkey=(int)o->value();
-}
-void PartKitItem::cb_maxkcounter(Fl_Counter* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_maxkcounter_i(o,v);
-}
-
-void PartKitItem::cb_labelbutton_i(Fl_Button*, void*) {
- const char *tmp=fl_input("Kit item name:",(const char *)part->kit[n].Pname);
-if (tmp!=NULL) snprintf((char *)part->kit[n].Pname,PART_MAX_NAME_LEN,"%s",tmp);
-}
-void PartKitItem::cb_labelbutton(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_labelbutton_i(o,v);
-}
-
-void PartKitItem::cb_adcheck_i(Fl_Check_Button* o, void*) {
- part->kit[n].Padenabled=(int)o->value();
-if (part->kit[n].Padenabled!=0) adeditbutton->activate();
- else adeditbutton->deactivate();
-}
-void PartKitItem::cb_adcheck(Fl_Check_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_adcheck_i(o,v);
-}
-
-void PartKitItem::cb_subcheck_i(Fl_Check_Button* o, void*) {
- part->kit[n].Psubenabled=(int)o->value();
-if (part->kit[n].Psubenabled!=0) subeditbutton->activate();
- else subeditbutton->deactivate();
-}
-void PartKitItem::cb_subcheck(Fl_Check_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_subcheck_i(o,v);
-}
-
-void PartKitItem::cb_sendtoeffect_i(Fl_Choice* o, void*) {
- if (o->value()!=0) part->kit[n].Psendtoparteffect=(int)o->value()-1;
- else part->kit[n].Psendtoparteffect=127;
-}
-void PartKitItem::cb_sendtoeffect(Fl_Choice* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_sendtoeffect_i(o,v);
-}
-
-void PartKitItem::cb_padeditbutton_i(Fl_Button*, void*) {
- partui->showparameters(n,2);
-}
-void PartKitItem::cb_padeditbutton(Fl_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_padeditbutton_i(o,v);
-}
-
-void PartKitItem::cb_padcheck_i(Fl_Check_Button* o, void*) {
- part->kit[n].Ppadenabled=(int)o->value();
-if (part->kit[n].Ppadenabled!=0) padeditbutton->activate();
- else padeditbutton->deactivate();
-}
-void PartKitItem::cb_padcheck(Fl_Check_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->parent()->user_data()))->cb_padcheck_i(o,v);
-}
-
-void PartKitItem::cb_enabledcheck_i(Fl_Check_Button* o, void*) {
- int answer=1;
-if (o->value()==0) answer=fl_choice("Delete the item?","No","Yes",NULL);
-if (answer!=0){
-pthread_mutex_lock(&master->mutex);
- part->setkititemstatus(n,(int) o->value());
-pthread_mutex_unlock(&master->mutex);
-
-if (o->value()==0) partkititemgroup->deactivate();
-else partkititemgroup->activate();
-o->redraw();
-partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0
-} else o->value(1);
-}
-void PartKitItem::cb_enabledcheck(Fl_Check_Button* o, void* v) {
- ((PartKitItem*)(o->parent()->user_data()))->cb_enabledcheck_i(o,v);
-}
-
-Fl_Group* PartKitItem::make_window() {
- { partkititem = new Fl_Group(0, 0, 670, 100);
- partkititem->box(FL_NO_BOX);
- partkititem->color(FL_BACKGROUND_COLOR);
- partkititem->selection_color(FL_BACKGROUND_COLOR);
- partkititem->labeltype(FL_NO_LABEL);
- partkititem->labelfont(0);
- partkititem->labelsize(14);
- partkititem->labelcolor(FL_FOREGROUND_COLOR);
- partkititem->user_data((void*)(this));
- partkititem->align(Fl_Align(FL_ALIGN_TOP));
- partkititem->when(FL_WHEN_RELEASE);
- { Fl_Group* o = partkititemgroup = new Fl_Group(55, 0, 605, 20);
- { Fl_Counter* o = minkcounter = new Fl_Counter(225, 0, 55, 15);
- minkcounter->type(1);
- minkcounter->minimum(0);
- minkcounter->maximum(128);
- minkcounter->step(1);
- minkcounter->callback((Fl_Callback*)cb_minkcounter);
- o->value(part->kit[n].Pminkey);
- } // Fl_Counter* minkcounter
- { Fl_Button* o = new Fl_Button(285, 3, 15, 12, "m");
- o->tooltip("set the minimum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_m);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(315, 3, 15, 12, "M");
- o->tooltip("set the maximum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_M);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(300, 3, 15, 12, "R");
- o->tooltip("reset the minimum key to 0 and maximum key to 127");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_R);
- } // Fl_Button* o
- { Fl_Button* o = adeditbutton = new Fl_Button(420, 0, 40, 15, "edit");
- adeditbutton->box(FL_THIN_UP_BOX);
- adeditbutton->labelsize(11);
- adeditbutton->callback((Fl_Callback*)cb_adeditbutton);
- if (part->kit[n].Padenabled==0) o->deactivate();
- if (n==0) o->hide();
- } // Fl_Button* adeditbutton
- { Fl_Button* o = subeditbutton = new Fl_Button(490, 0, 40, 15, "edit");
- subeditbutton->box(FL_THIN_UP_BOX);
- subeditbutton->labelsize(11);
- subeditbutton->callback((Fl_Callback*)cb_subeditbutton);
- if (part->kit[n].Psubenabled==0) o->deactivate();
- if (n==0) o->hide();
- } // Fl_Button* subeditbutton
- { Fl_Check_Button* o = mutedcheck = new Fl_Check_Button(60, 0, 20, 15);
- mutedcheck->down_box(FL_DOWN_BOX);
- mutedcheck->labelfont(1);
- mutedcheck->labelsize(11);
- mutedcheck->callback((Fl_Callback*)cb_mutedcheck);
- mutedcheck->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(part->kit[n].Pmuted);
- } // Fl_Check_Button* mutedcheck
- { Fl_Counter* o = maxkcounter = new Fl_Counter(335, 0, 55, 15);
- maxkcounter->type(1);
- maxkcounter->minimum(0);
- maxkcounter->maximum(128);
- maxkcounter->step(1);
- maxkcounter->callback((Fl_Callback*)cb_maxkcounter);
- o->value(part->kit[n].Pmaxkey);
- } // Fl_Counter* maxkcounter
- { Fl_Button* o = labelbutton = new Fl_Button(90, 0, 130, 15, "Bass Drum");
- labelbutton->box(FL_THIN_DOWN_BOX);
- labelbutton->down_box(FL_FLAT_BOX);
- labelbutton->labelfont(1);
- labelbutton->labelsize(10);
- labelbutton->callback((Fl_Callback*)cb_labelbutton);
- labelbutton->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE));
- o->label((char *)part->kit[n].Pname);
- } // Fl_Button* labelbutton
- { Fl_Check_Button* o = adcheck = new Fl_Check_Button(400, 0, 20, 15);
- adcheck->down_box(FL_DOWN_BOX);
- adcheck->labelfont(1);
- adcheck->labelsize(11);
- adcheck->callback((Fl_Callback*)cb_adcheck);
- adcheck->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(part->kit[n].Padenabled);
- if (n==0) o->hide();
- } // Fl_Check_Button* adcheck
- { Fl_Check_Button* o = subcheck = new Fl_Check_Button(470, 0, 20, 15);
- subcheck->down_box(FL_DOWN_BOX);
- subcheck->labelfont(1);
- subcheck->labelsize(11);
- subcheck->callback((Fl_Callback*)cb_subcheck);
- subcheck->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(part->kit[n].Psubenabled);
- if (n==0) o->hide();
- } // Fl_Check_Button* subcheck
- { Fl_Choice* o = sendtoeffect = new Fl_Choice(615, 0, 45, 15);
- sendtoeffect->down_box(FL_BORDER_BOX);
- sendtoeffect->labelsize(10);
- sendtoeffect->textfont(1);
- sendtoeffect->textsize(10);
- sendtoeffect->callback((Fl_Callback*)cb_sendtoeffect);
- sendtoeffect->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->add("OFF");char nrstr[10]; for(int i=0;iadd(nrstr);};
- o->value(part->kit[n].Psendtoparteffect+1);if (part->kit[n].Psendtoparteffect==127) o->value(0);
- } // Fl_Choice* sendtoeffect
- { Fl_Button* o = padeditbutton = new Fl_Button(560, 0, 40, 15, "edit");
- padeditbutton->box(FL_THIN_UP_BOX);
- padeditbutton->labelsize(11);
- padeditbutton->callback((Fl_Callback*)cb_padeditbutton);
- if (part->kit[n].Ppadenabled==0) o->deactivate();
- if (n==0) o->hide();
- } // Fl_Button* padeditbutton
- { Fl_Check_Button* o = padcheck = new Fl_Check_Button(540, 0, 20, 15);
- padcheck->down_box(FL_DOWN_BOX);
- padcheck->labelfont(1);
- padcheck->labelsize(11);
- padcheck->callback((Fl_Callback*)cb_padcheck);
- padcheck->align(Fl_Align(FL_ALIGN_LEFT));
- o->value(part->kit[n].Ppadenabled);
- if (n==0) o->hide();
- } // Fl_Check_Button* padcheck
- if (part->kit[n].Penabled==0) o->deactivate();
- partkititemgroup->end();
- } // Fl_Group* partkititemgroup
- { Fl_Check_Button* o = enabledcheck = new Fl_Check_Button(30, 0, 20, 15, "01");
- enabledcheck->down_box(FL_DOWN_BOX);
- enabledcheck->labeltype(FL_EMBOSSED_LABEL);
- enabledcheck->labelfont(1);
- enabledcheck->labelsize(13);
- enabledcheck->callback((Fl_Callback*)cb_enabledcheck);
- enabledcheck->align(Fl_Align(FL_ALIGN_LEFT));
- snprintf(label,10,"%d",n+1);o->label(label);
- o->value(part->kit[n].Penabled);
- if (n==0) o->deactivate();
- } // Fl_Check_Button* enabledcheck
- partkititem->end();
- } // Fl_Group* partkititem
- return partkititem;
-}
-
-PartKitItem::PartKitItem(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- n=0;
- part=NULL;
-}
-
-void PartKitItem::refresh() {
- enabledcheck->value(part->kit[n].Penabled);
- if (part->kit[n].Penabled==0) partkititemgroup->deactivate();
- else partkititemgroup->activate();
-
- mutedcheck->value(part->kit[n].Pmuted);
- labelbutton->label((char *)part->kit[n].Pname);
- minkcounter->value(part->kit[n].Pminkey);
- maxkcounter->value(part->kit[n].Pmaxkey);
- adcheck->value(part->kit[n].Padenabled);
- adcheck->do_callback();
- subcheck->value(part->kit[n].Psubenabled);
- subcheck->do_callback();
-
- sendtoeffect->value(part->kit[n].Psendtoparteffect+1);
- if (part->kit[n].Psendtoparteffect==127) sendtoeffect->value(0);
-
- this->redraw();
-}
-
-void PartKitItem::init(Part *part_,int n_,Master *master_,class PartUI *partui_) {
- part=part_;
- n=n_;
- partui=partui_;
- master=master_;
- make_window();
- //partkititem->show();
- end();
-}
-
-PartKitItem::~PartKitItem() {
- partkititem->hide();
- //delete(partkititem);
-}
-
-void PartUI::cb_Pan_i(WidgetPDial* o, void*) {
- part->setPpanning((int) o->value());
-}
-void PartUI::cb_Pan(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Pan_i(o,v);
-}
-
-void PartUI::cb_KeyShift_i(Fl_Counter* o, void*) {
- part->Pkeyshift=(int) o->value()+64;
-}
-void PartUI::cb_KeyShift(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_KeyShift_i(o,v);
-}
-
-void PartUI::cb_Grand_i(Fl_Button*, void*) {
- int event=Fl::event_button();
-if (event==FL_RIGHT_MOUSE){
- const char *tmp=fl_input("Instrument name:",(const char *)part->Pname);
- if (tmp!=NULL) snprintf((char *)part->Pname,PART_MAX_NAME_LEN,"%s",tmp);
-} else {
- if (event==FL_LEFT_MOUSE) bankui->show();
- else instrumenteditwindow->show();
-};
-}
-void PartUI::cb_Grand(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Grand_i(o,v);
-}
-
-void PartUI::cb_NoteOn_i(Fl_Check_Button* o, void*) {
- part->Pnoteon=(int) o->value();
-}
-void PartUI::cb_NoteOn(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_NoteOn_i(o,v);
-}
-
-void PartUI::cb_minkcounter1_i(Fl_Counter* o, void*) {
- part->Pminkey=(int) o->value();
-if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED);
- else o->textcolor(FL_BLACK);
-}
-void PartUI::cb_minkcounter1(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_minkcounter1_i(o,v);
-}
-
-void PartUI::cb_maxkcounter1_i(Fl_Counter* o, void*) {
- part->Pmaxkey=(int) o->value();
-
-if (part->Pminkey>part->Pmaxkey) o->textcolor(FL_RED);
- else o->textcolor(FL_BLACK);
-}
-void PartUI::cb_maxkcounter1(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_maxkcounter1_i(o,v);
-}
-
-void PartUI::cb_Volume_i(WidgetPDial* o, void*) {
- part->setPvolume((int) o->value());
-}
-void PartUI::cb_Volume(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Volume_i(o,v);
-}
-
-void PartUI::cb_Vel_i(WidgetPDial* o, void*) {
- part->Pveloffs=(int) o->value();
-}
-void PartUI::cb_Vel(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Vel_i(o,v);
-}
-
-void PartUI::cb_Vel1_i(WidgetPDial* o, void*) {
- part->Pvelsns=(int) o->value();
-}
-void PartUI::cb_Vel1(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Vel1_i(o,v);
-}
-
-void PartUI::cb_Controllers_i(Fl_Button*, void*) {
- ctlwindow->show();
-}
-void PartUI::cb_Controllers(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Controllers_i(o,v);
-}
-
-void PartUI::cb_Portamento_i(Fl_Check_Button* o, void*) {
- part->ctl.portamento.portamento=(int) o->value();
-}
-void PartUI::cb_Portamento(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Portamento_i(o,v);
-}
-
-void PartUI::cb_Edit_i(Fl_Button*, void*) {
- instrumenteditwindow->show();
-}
-void PartUI::cb_Edit(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Edit_i(o,v);
-}
-
-void PartUI::cb_m1_i(Fl_Button*, void*) {
- if (part->lastnote>=0) minkcounter->value(part->lastnote);
-minkcounter->do_callback();
-maxkcounter->do_callback();
-}
-void PartUI::cb_m1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_m1_i(o,v);
-}
-
-void PartUI::cb_M1_i(Fl_Button*, void*) {
- if (part->lastnote>=0) maxkcounter->value(part->lastnote);
-maxkcounter->do_callback();
-minkcounter->do_callback();
-}
-void PartUI::cb_M1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_M1_i(o,v);
-}
-
-void PartUI::cb_R1_i(Fl_Button*, void*) {
- minkcounter->value(0);
-minkcounter->do_callback();
-maxkcounter->value(127);
-maxkcounter->do_callback();
-}
-void PartUI::cb_R1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_R1_i(o,v);
-}
-
-void PartUI::cb_MIDI_i(Fl_Choice* o, void*) {
- part->Prcvchn=(int) o->value();
-}
-void PartUI::cb_MIDI(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_MIDI_i(o,v);
-}
-
-void PartUI::cb_keylimitlist_i(Fl_Choice* o, void*) {
- int val=0;
-val=atoi(o->text());
-part->setkeylimit(val);
-}
-void PartUI::cb_keylimitlist(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_keylimitlist_i(o,v);
-}
-
-void PartUI::cb_Mode_i(Fl_Choice* o, void*) {
- if ((int) o->value()==0){ /* Poly (implies no legato) */
- part->Ppolymode=1;
- part->Plegatomode=0;
-} else {
- if ((int) o->value()==1){ /* Mono (implies no legato) */
- part->Ppolymode=0;
- part->Plegatomode=0;
- } else {
- if ((int) o->value()==2){ /* Legato (implies mono) */
- part->Ppolymode=0;
- part->Plegatomode=1;
- };
- };
-};
-}
-void PartUI::cb_Mode(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Mode_i(o,v);
-}
-
-void PartUI::cb_Enabled_i(Fl_Check_Button* o, void*) {
- pthread_mutex_lock(&master->mutex);
-master->partonoff(npart,(int) o->value());
-pthread_mutex_unlock(&master->mutex);
-if (part->Penabled==0) partgroupui->deactivate();
- else partgroupui->activate();
-}
-void PartUI::cb_Enabled(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Enabled_i(o,v);
-}
-
-void PartUI::cb_Expr_i(Fl_Check_Button* o, void*) {
- part->ctl.expression.receive=(int) o->value();
-}
-void PartUI::cb_Expr(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Expr_i(o,v);
-}
-
-void PartUI::cb_PanDpth_i(WidgetPDial* o, void*) {
- part->ctl.panning.depth=(int) o->value();
-}
-void PartUI::cb_PanDpth(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_PanDpth_i(o,v);
-}
-
-void PartUI::cb_FltCut_i(WidgetPDial* o, void*) {
- part->ctl.filtercutoff.depth=(int) o->value();
-}
-void PartUI::cb_FltCut(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_FltCut_i(o,v);
-}
-
-void PartUI::cb_FltQ_i(WidgetPDial* o, void*) {
- part->ctl.filterq.depth=(int) o->value();
-}
-void PartUI::cb_FltQ(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_FltQ_i(o,v);
-}
-
-void PartUI::cb_BwDpth_i(WidgetPDial* o, void*) {
- part->ctl.bandwidth.depth=(int) o->value();
-}
-void PartUI::cb_BwDpth(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_BwDpth_i(o,v);
-}
-
-void PartUI::cb_ModWh_i(WidgetPDial* o, void*) {
- part->ctl.modwheel.depth=(int) o->value();
-}
-void PartUI::cb_ModWh(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_ModWh_i(o,v);
-}
-
-void PartUI::cb_PWheelB_i(Fl_Counter* o, void*) {
- part->ctl.pitchwheel.bendrange=(int) o->value();
-}
-void PartUI::cb_PWheelB(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_PWheelB_i(o,v);
-}
-
-void PartUI::cb_FMamp_i(Fl_Check_Button* o, void*) {
- part->ctl.fmamp.receive=(int) o->value();
-}
-void PartUI::cb_FMamp(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_FMamp_i(o,v);
-}
-
-void PartUI::cb_Vol_i(Fl_Check_Button* o, void*) {
- part->ctl.volume.receive=(int) o->value();
-}
-void PartUI::cb_Vol(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Vol_i(o,v);
-}
-
-void PartUI::cb_Sustain_i(Fl_Check_Button* o, void*) {
- part->ctl.sustain.receive=(int) o->value();
-if (part->ctl.sustain.receive==0) {
- part->RelaseSustainedKeys();
- part->ctl.setsustain(0);
-};
-}
-void PartUI::cb_Sustain(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Sustain_i(o,v);
-}
-
-void PartUI::cb_Close_i(Fl_Button*, void*) {
- ctlwindow->hide();
-}
-void PartUI::cb_Close(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Close_i(o,v);
-}
-
-void PartUI::cb_Reset_i(Fl_Button*, void*) {
- part->SetController(C_resetallcontrollers,0);
-}
-void PartUI::cb_Reset(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Reset_i(o,v);
-}
-
-void PartUI::cb_Rcv_i(Fl_Check_Button* o, void*) {
- part->ctl.portamento.receive=(int) o->value();
-}
-void PartUI::cb_Rcv(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Rcv_i(o,v);
-}
-
-void PartUI::cb_time_i(WidgetPDial* o, void*) {
- part->ctl.portamento.time=(int) o->value();
-}
-void PartUI::cb_time(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_time_i(o,v);
-}
-
-void PartUI::cb_thresh_i(Fl_Counter* o, void*) {
- part->ctl.portamento.pitchthresh=(int) o->value();
-}
-void PartUI::cb_thresh(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_thresh_i(o,v);
-}
-
-void PartUI::cb_th_i(Fl_Check_Button* o, void*) {
- part->ctl.portamento.pitchthreshtype=(int) o->value();
-}
-void PartUI::cb_th(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_th_i(o,v);
-}
-
-void PartUI::cb_t_i(WidgetPDial* o, void*) {
- int x=(int) o->value();
-
-part->ctl.portamento.updowntimestretch=x;
-}
-void PartUI::cb_t(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_t_i(o,v);
-}
-
-void PartUI::cb_propta_i(WidgetPDial* o, void*) {
- part->ctl.portamento.propRate=(int) o->value();
-}
-void PartUI::cb_propta(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_propta_i(o,v);
-}
-
-void PartUI::cb_proptb_i(WidgetPDial* o, void*) {
- part->ctl.portamento.propDepth=(int) o->value();
-}
-void PartUI::cb_proptb(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_proptb_i(o,v);
-}
-
-void PartUI::cb_Proprt_i(Fl_Check_Button* o, void*) {
- part->ctl.portamento.proportional=(int) o->value();
-if(o->value()){propta->activate();proptb->activate();}
-else {propta->deactivate();proptb->deactivate();};
-}
-void PartUI::cb_Proprt(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Proprt_i(o,v);
-}
-
-void PartUI::cb_BWdpth_i(WidgetPDial* o, void*) {
- part->ctl.resonancebandwidth.depth=(int) o->value();
-}
-void PartUI::cb_BWdpth(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_BWdpth_i(o,v);
-}
-
-void PartUI::cb_CFdpth_i(WidgetPDial* o, void*) {
- part->ctl.resonancecenter.depth=(int) o->value();
-}
-void PartUI::cb_CFdpth(WidgetPDial* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_CFdpth_i(o,v);
-}
-
-void PartUI::cb_Exp_i(Fl_Check_Button* o, void*) {
- part->ctl.modwheel.exponential=(int) o->value();
-}
-void PartUI::cb_Exp(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Exp_i(o,v);
-}
-
-void PartUI::cb_Exp1_i(Fl_Check_Button* o, void*) {
- part->ctl.bandwidth.exponential=(int) o->value();
-}
-void PartUI::cb_Exp1(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Exp1_i(o,v);
-}
-
-void PartUI::cb_inseffnocounter_i(Fl_Counter* o, void*) {
- ninseff=(int) o->value()-1;
-insefftype->value(part->partefx[ninseff]->geteffect());
-//insefftype->do_callback();
-inseffectui->refresh(part->partefx[ninseff]);
-int x=part->Pefxroute[ninseff];
-if (x==127) x=1;
-bypasseff->value(part->Pefxbypass[ninseff]);
-
-sendtochoice->value(x);
-}
-void PartUI::cb_inseffnocounter(Fl_Counter* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_inseffnocounter_i(o,v);
-}
-
-void PartUI::cb_insefftype_i(Fl_Choice* o, void*) {
- pthread_mutex_lock(part->mutex);
-part->partefx[ninseff]->changeeffect((int) o->value());
-pthread_mutex_unlock(part->mutex);
-inseffectui->refresh(part->partefx[ninseff]);
-}
-void PartUI::cb_insefftype(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_insefftype_i(o,v);
-}
-
-Fl_Menu_Item PartUI::menu_insefftype[] = {
- {"No Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Reverb", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Echo", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Chorus", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Phaser", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"AlienWah", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Distortion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"EQ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"DynFilter", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PartUI::cb_Close1_i(Fl_Button*, void*) {
- partfx->hide();
-}
-void PartUI::cb_Close1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Close1_i(o,v);
-}
-
-void PartUI::cb_sendtochoice_i(Fl_Choice* o, void*) {
- int x=(int) o->value();
-part->Pefxroute[ninseff]=x;
-if (x==2) part->partefx[ninseff]->setdryonly(true);
- else part->partefx[ninseff]->setdryonly(false);
-}
-void PartUI::cb_sendtochoice(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_sendtochoice_i(o,v);
-}
-
-Fl_Menu_Item PartUI::menu_sendtochoice[] = {
- {"Next Effect", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Part Out", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {"Dry Out", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 10, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PartUI::cb_bypasseff_i(Fl_Check_Button* o, void*) {
- part->Pefxbypass[ninseff]=(((int)o->value())!=0);
-}
-void PartUI::cb_bypasseff(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_bypasseff_i(o,v);
-}
-
-void PartUI::cb_C_i(Fl_Button*, void*) {
- presetsui->copy(part->partefx[ninseff]);
-}
-void PartUI::cb_C(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_C_i(o,v);
-}
-
-void PartUI::cb_P_i(Fl_Button*, void*) {
- pthread_mutex_lock(&master->mutex);
-presetsui->paste(part->partefx[ninseff],inseffectui);
-pthread_mutex_unlock(&master->mutex);
-}
-void PartUI::cb_P(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_P_i(o,v);
-}
-
-void PartUI::cb_Close2_i(Fl_Button*, void*) {
- instrumentkitlist->hide();
-}
-void PartUI::cb_Close2(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Close2_i(o,v);
-}
-
-void PartUI::cb_Mode1_i(Fl_Choice* o, void*) {
- part->Pkitmode=(int) o->value();
-if (part->Pkitmode==0) {
- kitlist->deactivate();
- } else {
- kitlist->activate();
-};
-}
-void PartUI::cb_Mode1(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Mode1_i(o,v);
-}
-
-Fl_Menu_Item PartUI::menu_Mode[] = {
- {"OFF", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"MULTI", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"SINGLE", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PartUI::cb_Drum_i(Fl_Check_Button* o, void*) {
- part->Pdrummode=(int) o->value();
-}
-void PartUI::cb_Drum(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Drum_i(o,v);
-}
-
-void PartUI::cb_padeditbutton1_i(Fl_Button*, void*) {
- showparameters(0,2);
-}
-void PartUI::cb_padeditbutton1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_padeditbutton1_i(o,v);
-}
-
-void PartUI::cb_padsynenabledcheck_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-part->kit[0].Ppadenabled=x;
-if (x==0) padeditbutton->deactivate();
- else padeditbutton->activate();
-}
-void PartUI::cb_padsynenabledcheck(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_padsynenabledcheck_i(o,v);
-}
-
-void PartUI::cb_adsynenabledcheck_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-part->kit[0].Padenabled=x;
-if (x==0) adeditbutton->deactivate();
- else adeditbutton->activate();
-}
-void PartUI::cb_adsynenabledcheck(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_adsynenabledcheck_i(o,v);
-}
-
-void PartUI::cb_adeditbutton1_i(Fl_Button*, void*) {
- showparameters(0,0);
-}
-void PartUI::cb_adeditbutton1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_adeditbutton1_i(o,v);
-}
-
-void PartUI::cb_subsynenabledcheck_i(Fl_Check_Button* o, void*) {
- int x=(int) o->value();
-part->kit[0].Psubenabled=x;
-if (x==0) subeditbutton->deactivate();
- else subeditbutton->activate();
-}
-void PartUI::cb_subsynenabledcheck(Fl_Check_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_subsynenabledcheck_i(o,v);
-}
-
-void PartUI::cb_subeditbutton1_i(Fl_Button*, void*) {
- showparameters(0,1);
-}
-void PartUI::cb_subeditbutton1(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->parent()->user_data()))->cb_subeditbutton1_i(o,v);
-}
-
-void PartUI::cb_Kit_i(Fl_Button*, void*) {
- instrumentkitlist->show();
-}
-void PartUI::cb_Kit(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Kit_i(o,v);
-}
-
-void PartUI::cb_Effects_i(Fl_Button*, void*) {
- partfx->show();
-}
-void PartUI::cb_Effects(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Effects_i(o,v);
-}
-
-void PartUI::cb_Author_i(Fl_Input* o, void*) {
- snprintf((char *)part->info.Pauthor,MAX_INFO_TEXT_SIZE,"%s",o->value());
-}
-void PartUI::cb_Author(Fl_Input* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Author_i(o,v);
-}
-
-void PartUI::cb_Comments_i(Fl_Input* o, void*) {
- snprintf((char *)part->info.Pcomments,MAX_INFO_TEXT_SIZE,"%s",o->value());
-}
-void PartUI::cb_Comments(Fl_Input* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Comments_i(o,v);
-}
-
-void PartUI::cb_Type_i(Fl_Choice* o, void*) {
- part->info.Ptype=o->value();
-}
-void PartUI::cb_Type(Fl_Choice* o, void* v) {
- ((PartUI*)(o->parent()->parent()->user_data()))->cb_Type_i(o,v);
-}
-
-Fl_Menu_Item PartUI::menu_Type[] = {
- {"--------------------------", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Piano", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Chromatic Percussion", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Organ", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Guitar", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Bass", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Solo Strings", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Ensemble", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Brass", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Reed", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Pipe", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Synth Lead", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Synth Pad", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Synth Effects", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Ethnic", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Percussive", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {"Sound Effects", 0, 0, 0, 0, FL_NORMAL_LABEL, 1, 11, 0},
- {0,0,0,0,0,0,0,0,0}
-};
-
-void PartUI::cb_Close3_i(Fl_Button*, void*) {
- instrumenteditwindow->hide();
-}
-void PartUI::cb_Close3(Fl_Button* o, void* v) {
- ((PartUI*)(o->parent()->user_data()))->cb_Close3_i(o,v);
-}
-
-Fl_Group* PartUI::make_window() {
- { partgroup = new Fl_Group(0, 0, 385, 180);
- partgroup->box(FL_NO_BOX);
- partgroup->color(FL_BACKGROUND_COLOR);
- partgroup->selection_color(FL_BACKGROUND_COLOR);
- partgroup->labeltype(FL_NO_LABEL);
- partgroup->labelfont(0);
- partgroup->labelsize(14);
- partgroup->labelcolor(FL_FOREGROUND_COLOR);
- partgroup->user_data((void*)(this));
- partgroup->align(Fl_Align(FL_ALIGN_TOP));
- partgroup->when(FL_WHEN_RELEASE);
- { Fl_Group* o = partgroupui = new Fl_Group(0, 0, 385, 180);
- { WidgetPDial* o = new WidgetPDial(50, 40, 25, 25, "Pan");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(11);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Pan);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->Ppanning);
- } // WidgetPDial* o
- { Fl_Counter* o = new Fl_Counter(195, 45, 90, 20, "KeyShift");
- o->labelsize(11);
- o->minimum(-64);
- o->maximum(64);
- o->step(1);
- o->callback((Fl_Callback*)cb_KeyShift);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->lstep(12);
- o->value(part->Pkeyshift-64);
- } // Fl_Counter* o
- { Fl_Scroll* o = new Fl_Scroll(166, 91, 125, 49);
- o->box(FL_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
- { Fl_Pack* o = new Fl_Pack(171, 96, 115, 35);
- o->type(1);
- o->spacing(5);
- for (int i=0;iinit(master,npart,i);}
- o->end();
- } // Fl_Pack* o
- o->end();
- } // Fl_Scroll* o
- { Fl_Button* o = new Fl_Button(195, 5, 185, 20, "Grand Piano");
- o->tooltip("left mousebutton - to choose/save/.. from/to bank or right mousebutton to cha\
-nge the name or middle button to change the instrument information");
- o->box(FL_UP_FRAME);
- o->down_box(FL_DOWN_FRAME);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Grand);
- o->align(Fl_Align(68|FL_ALIGN_INSIDE));
- o->label((char *)part->Pname);
- } // Fl_Button* o
- { Fl_Box* o = new Fl_Box(166, 81, 95, 10, "To Sys.Efx.");
- o->labelfont(1);
- o->labelsize(10);
- } // Fl_Box* o
- { Fl_Check_Button* o = new Fl_Check_Button(10, 155, 65, 20, "NoteOn");
- o->tooltip("set if the part receives NoteOn messages");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_NoteOn);
- o->value(part->Pnoteon);
- } // Fl_Check_Button* o
- { Fl_Counter* o = minkcounter = new Fl_Counter(295, 125, 40, 15, "Min.k");
- minkcounter->tooltip("Minimum key (that the part receives NoteOn messages)");
- minkcounter->type(1);
- minkcounter->labelfont(1);
- minkcounter->labelsize(10);
- minkcounter->minimum(0);
- minkcounter->maximum(127);
- minkcounter->step(1);
- minkcounter->textsize(10);
- minkcounter->callback((Fl_Callback*)cb_minkcounter1);
- o->value(part->Pminkey);
- } // Fl_Counter* minkcounter
- { Fl_Counter* o = maxkcounter = new Fl_Counter(340, 125, 40, 15, "Max.k");
- maxkcounter->tooltip("Maximum key (that the part receives NoteOn messages)");
- maxkcounter->type(1);
- maxkcounter->labelfont(1);
- maxkcounter->labelsize(10);
- maxkcounter->minimum(0);
- maxkcounter->maximum(127);
- maxkcounter->step(1);
- maxkcounter->textsize(10);
- maxkcounter->callback((Fl_Callback*)cb_maxkcounter1);
- o->value(part->Pmaxkey);
- } // Fl_Counter* maxkcounter
- { WidgetPDial* o = new WidgetPDial(10, 35, 30, 30, "Volume");
- o->tooltip("Part Volume");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(11);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Volume);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->Pvolume);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(135, 40, 25, 25, "Vel.Ofs.");
- o->tooltip("Velocity Offset");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vel);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->Pveloffs);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(95, 40, 25, 25, "Vel.Sns.");
- o->tooltip("Velocity Sensing Function");
- o->box(FL_ROUND_UP_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_Vel1);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->Pvelsns);
- } // WidgetPDial* o
- { Fl_Button* o = new Fl_Button(295, 90, 85, 30, "Controllers");
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Controllers);
- } // Fl_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(95, 155, 88, 20, "Portamento");
- o->tooltip("Enable/Disable the portamento");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Portamento);
- o->value(part->ctl.portamento.portamento);
- } // Fl_Check_Button* o
- { Fl_Button* o = new Fl_Button(15, 90, 130, 30, "Edit instrument");
- o->color(FL_LIGHT2);
- o->labelfont(1);
- o->labelsize(13);
- o->callback((Fl_Callback*)cb_Edit);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(315, 155, 15, 12, "m");
- o->tooltip("set the minimum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_m1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(345, 155, 15, 12, "M");
- o->tooltip("set the maximum key to the last pressed key");
- o->box(FL_THIN_UP_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_M1);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(330, 155, 15, 12, "R");
- o->tooltip("reset the minimum key to 0 and maximum key to 127");
- o->box(FL_THIN_UP_BOX);
- o->labelfont(1);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_R1);
- } // Fl_Button* o
- { Fl_Choice* o = new Fl_Choice(310, 45, 70, 20, "MIDI Chn.Rcv.");
- o->tooltip("receive from Midi channel");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(10);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_MIDI);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- char nrstr[10]; for(int i=0;iadd(nrstr); else o->add("Drms10");};
- o->value(part->Prcvchn);
- } // Fl_Choice* o
- { keylimitlist = new Fl_Choice(215, 155, 50, 20, "KLmt");
- keylimitlist->tooltip("Key Limit");
- keylimitlist->down_box(FL_BORDER_BOX);
- keylimitlist->labelsize(10);
- keylimitlist->textfont(1);
- keylimitlist->textsize(10);
- keylimitlist->callback((Fl_Callback*)cb_keylimitlist);
- keylimitlist->align(Fl_Align(FL_ALIGN_RIGHT));
- } // Fl_Choice* keylimitlist
- { Fl_Choice* o = new Fl_Choice(80, 130, 64, 18, "Mode :");
- o->tooltip("Poly, Mono or Legato mode");
- o->down_box(FL_BORDER_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->textfont(1);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Mode);
- o->add("Poly"); o->add("Mono"); o->add("Legato");
- if (part->Ppolymode!=0) o->value(0); else o->value(1);
- if (part->Ppolymode==0 && part->Plegatomode!=0) o->value(2);
- } // Fl_Choice* o
- if (part->Penabled==0) o->deactivate();
- partgroupui->end();
- } // Fl_Group* partgroupui
- { Fl_Check_Button* o = new Fl_Check_Button(90, 5, 75, 20, "Enabled");
- o->down_box(FL_DOWN_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Enabled);
- o->value(part->Penabled);
- } // Fl_Check_Button* o
- partgroup->end();
- } // Fl_Group* partgroup
- { ctlwindow = new Fl_Double_Window(500, 130, "Controllers");
- ctlwindow->box(FL_NO_BOX);
- ctlwindow->user_data((void*)(this));
- { Fl_Check_Button* o = new Fl_Check_Button(155, 55, 45, 20, "Expr");
- o->tooltip("Expression enable");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Expr);
- o->value(part->ctl.expression.receive);
- } // Fl_Check_Button* o
- { WidgetPDial* o = new WidgetPDial(10, 55, 30, 30, "PanDpth");
- o->tooltip("Panning Depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_PanDpth);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.panning.depth);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(90, 55, 30, 30, "FltCut");
- o->tooltip("Filter Cutoff depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_FltCut);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.filtercutoff.depth);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(50, 55, 30, 30, "FltQ");
- o->tooltip("Filter Q depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_FltQ);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.filterq.depth);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(125, 10, 30, 30, "BwDpth");
- o->tooltip("BandWidth depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_BwDpth);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.bandwidth.depth);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(50, 10, 30, 30, "ModWh");
- o->tooltip("Modulation Wheel depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_ModWh);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.modwheel.depth);
- } // WidgetPDial* o
- { Fl_Counter* o = new Fl_Counter(165, 15, 110, 20, "PWheelB.Rng (cents)");
- o->tooltip("Pitch Wheel Bend Range (cents)");
- o->labelsize(10);
- o->minimum(-6400);
- o->maximum(6400);
- o->step(1);
- o->callback((Fl_Callback*)cb_PWheelB);
- o->align(Fl_Align(FL_ALIGN_TOP));
- o->value(part->ctl.pitchwheel.bendrange);
- o->lstep(100);
- } // Fl_Counter* o
- { Fl_Check_Button* o = new Fl_Check_Button(205, 55, 60, 20, "FMamp");
- o->tooltip("FM amplitude enable");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_FMamp);
- o->value(part->ctl.fmamp.receive);
- } // Fl_Check_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(155, 80, 45, 20, "Vol");
- o->tooltip("Volume enable");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Vol);
- o->value(part->ctl.volume.receive);
- } // Fl_Check_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(205, 80, 60, 20, "Sustain");
- o->tooltip("Sustain pedal enable");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Sustain);
- o->value(part->ctl.sustain.receive);
- } // Fl_Check_Button* o
- { Fl_Button* o = new Fl_Button(400, 107, 95, 20, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(5, 107, 210, 20, "Reset all controllers");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Reset);
- } // Fl_Button* o
- { Fl_Group* o = new Fl_Group(280, 15, 160, 90, "Portamento");
- o->box(FL_UP_FRAME);
- o->labelsize(10);
- { Fl_Check_Button* o = new Fl_Check_Button(285, 20, 40, 20, "Rcv");
- o->tooltip("Receive Portamento Controllers");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Rcv);
- o->value(part->ctl.portamento.receive);
- } // Fl_Check_Button* o
- { WidgetPDial* o = new WidgetPDial(285, 60, 25, 25, "time");
- o->tooltip("Portamento time");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_time);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.portamento.time);
- } // WidgetPDial* o
- { Fl_Counter* o = new Fl_Counter(340, 20, 50, 20, "thresh");
- o->tooltip("Minimum or max. difference of the notes in order to do the portamento (x 100 \
-cents)");
- o->type(1);
- o->labelsize(10);
- o->minimum(0);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_thresh);
- o->value(part->ctl.portamento.pitchthresh);
- } // Fl_Counter* o
- { Fl_Check_Button* o = new Fl_Check_Button(365, 70, 15, 15, "th.type");
- o->tooltip("Threshold type (min/max)");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_th);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->value(part->ctl.portamento.pitchthreshtype);
- } // Fl_Check_Button* o
- { Fl_Box* o = new Fl_Box(340, 50, 55, 15, "x100 cnt.");
- o->labelsize(10);
- o->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { WidgetPDial* o = new WidgetPDial(315, 60, 25, 25, "t.dn/up");
- o->tooltip("Portamento time stretch (up/down)");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_t);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.portamento.updowntimestretch);
- } // WidgetPDial* o
- { WidgetPDial* o = propta = new WidgetPDial(405, 20, 25, 25, "Prp.Rate");
- propta->tooltip("Distance required to double change from nonpropotinal portamento time");
- propta->box(FL_NO_BOX);
- propta->color(FL_BACKGROUND_COLOR);
- propta->selection_color(FL_INACTIVE_COLOR);
- propta->labeltype(FL_NORMAL_LABEL);
- propta->labelfont(0);
- propta->labelsize(9);
- propta->labelcolor(FL_FOREGROUND_COLOR);
- propta->maximum(127);
- propta->step(1);
- propta->callback((Fl_Callback*)cb_propta);
- propta->align(Fl_Align(FL_ALIGN_BOTTOM));
- propta->when(FL_WHEN_CHANGED);
- o->value(part->ctl.portamento.propRate);
- } // WidgetPDial* propta
- { WidgetPDial* o = proptb = new WidgetPDial(405, 60, 25, 25, "Prp.Dpth");
- proptb->tooltip("The difference from nonproportinal portamento");
- proptb->box(FL_NO_BOX);
- proptb->color(FL_BACKGROUND_COLOR);
- proptb->selection_color(FL_INACTIVE_COLOR);
- proptb->labeltype(FL_NORMAL_LABEL);
- proptb->labelfont(0);
- proptb->labelsize(9);
- proptb->labelcolor(FL_FOREGROUND_COLOR);
- proptb->maximum(127);
- proptb->step(1);
- proptb->callback((Fl_Callback*)cb_proptb);
- proptb->align(Fl_Align(FL_ALIGN_BOTTOM));
- proptb->when(FL_WHEN_CHANGED);
- o->value(part->ctl.portamento.propDepth);
- } // WidgetPDial* proptb
- { Fl_Check_Button* o = new Fl_Check_Button(285, 40, 50, 15, "Proprt.");
- o->tooltip("Enable Proportinal Portamento (over fixed Portamento)");
- o->box(FL_THIN_UP_BOX);
- o->down_box(FL_DOWN_BOX);
- o->labelsize(9);
- o->callback((Fl_Callback*)cb_Proprt);
- o->value(part->ctl.portamento.proportional);
- if(o->value()){propta->activate();proptb->activate();}
- else {propta->deactivate();proptb->deactivate();}
- } // Fl_Check_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(445, 15, 50, 90, "Resonance");
- o->box(FL_UP_FRAME);
- o->labelsize(10);
- { WidgetPDial* o = new WidgetPDial(455, 60, 25, 25, "BWdpth");
- o->tooltip("BandWidth controller depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_BWdpth);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.resonancebandwidth.depth);
- } // WidgetPDial* o
- { WidgetPDial* o = new WidgetPDial(455, 20, 25, 25, "CFdpth");
- o->tooltip("Center Frequency controller Depth");
- o->box(FL_NO_BOX);
- o->color(FL_BACKGROUND_COLOR);
- o->selection_color(FL_INACTIVE_COLOR);
- o->labeltype(FL_NORMAL_LABEL);
- o->labelfont(0);
- o->labelsize(10);
- o->labelcolor(FL_FOREGROUND_COLOR);
- o->maximum(127);
- o->step(1);
- o->callback((Fl_Callback*)cb_CFdpth);
- o->align(Fl_Align(FL_ALIGN_BOTTOM));
- o->when(FL_WHEN_CHANGED);
- o->value(part->ctl.resonancecenter.depth);
- } // WidgetPDial* o
- o->end();
- } // Fl_Group* o
- { Fl_Check_Button* o = new Fl_Check_Button(10, 15, 40, 25, "Exp MWh");
- o->tooltip("Exponential modulation wheel");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Exp);
- o->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(part->ctl.modwheel.exponential);
- } // Fl_Check_Button* o
- { Fl_Check_Button* o = new Fl_Check_Button(85, 15, 35, 25, "Exp BW");
- o->tooltip("Exponential BandWidth Controller");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Exp1);
- o->align(Fl_Align(132|FL_ALIGN_INSIDE));
- o->value(part->ctl.bandwidth.exponential);
- } // Fl_Check_Button* o
- ctlwindow->end();
- } // Fl_Double_Window* ctlwindow
- { partfx = new Fl_Double_Window(390, 145, "Part\'s Insert Effects");
- partfx->box(FL_NO_BOX);
- partfx->user_data((void*)(this));
- { Fl_Counter* o = inseffnocounter = new Fl_Counter(5, 110, 80, 20, "FX No.");
- inseffnocounter->type(1);
- inseffnocounter->labelfont(1);
- inseffnocounter->minimum(1);
- inseffnocounter->maximum(127);
- inseffnocounter->step(1);
- inseffnocounter->textfont(1);
- inseffnocounter->callback((Fl_Callback*)cb_inseffnocounter);
- inseffnocounter->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- o->bounds(1,NUM_PART_EFX);
- o->value(ninseff+1);
- } // Fl_Counter* inseffnocounter
- { Fl_Choice* o = insefftype = new Fl_Choice(155, 110, 70, 15, "EffType");
- insefftype->down_box(FL_BORDER_BOX);
- insefftype->labelsize(10);
- insefftype->callback((Fl_Callback*)cb_insefftype);
- insefftype->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- insefftype->menu(menu_insefftype);
- o->value(part->partefx[ninseff]->geteffect());
- } // Fl_Choice* insefftype
- { inseffectuigroup = new Fl_Group(5, 5, 380, 100);
- inseffectuigroup->box(FL_FLAT_BOX);
- inseffectuigroup->color((Fl_Color)48);
- { EffUI* o = inseffectui = new EffUI(5, 5, 380, 95);
- inseffectui->box(FL_NO_BOX);
- inseffectui->color(FL_BACKGROUND_COLOR);
- inseffectui->selection_color(FL_BACKGROUND_COLOR);
- inseffectui->labeltype(FL_NORMAL_LABEL);
- inseffectui->labelfont(0);
- inseffectui->labelsize(14);
- inseffectui->labelcolor(FL_FOREGROUND_COLOR);
- inseffectui->align(Fl_Align(FL_ALIGN_TOP));
- inseffectui->when(FL_WHEN_RELEASE);
- o->init(part->partefx[ninseff]);
- inseffectui->end();
- } // EffUI* inseffectui
- inseffectuigroup->end();
- } // Fl_Group* inseffectuigroup
- { Fl_Button* o = new Fl_Button(325, 115, 60, 20, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close1);
- } // Fl_Button* o
- { Fl_Choice* o = sendtochoice = new Fl_Choice(235, 110, 80, 15, "Send To.");
- sendtochoice->down_box(FL_BORDER_BOX);
- sendtochoice->labelsize(10);
- sendtochoice->callback((Fl_Callback*)cb_sendtochoice);
- sendtochoice->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT));
- sendtochoice->menu(menu_sendtochoice);
- int x=part->Pefxroute[ninseff]; if (x==127) x=1;
- o->value(x);
- } // Fl_Choice* sendtochoice
- { Fl_Check_Button* o = bypasseff = new Fl_Check_Button(90, 110, 60, 15, "bypass");
- bypasseff->tooltip("if the effect is not used (is bypassed)");
- bypasseff->down_box(FL_DOWN_BOX);
- bypasseff->labelsize(11);
- bypasseff->callback((Fl_Callback*)cb_bypasseff);
- int x=part->Pefxbypass[ninseff];o->value(x);
- } // Fl_Check_Button* bypasseff
- { Fl_Button* o = new Fl_Button(90, 127, 25, 15, "C");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_C);
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(120, 127, 25, 15, "P");
- o->box(FL_THIN_UP_BOX);
- o->color((Fl_Color)179);
- o->labelfont(1);
- o->labelsize(11);
- o->labelcolor(FL_BACKGROUND2_COLOR);
- o->callback((Fl_Callback*)cb_P);
- } // Fl_Button* o
- partfx->end();
- } // Fl_Double_Window* partfx
- { instrumentkitlist = new Fl_Double_Window(670, 370, "Instrument Kit");
- instrumentkitlist->box(FL_NO_BOX);
- instrumentkitlist->user_data((void*)(this));
- { Fl_Button* o = new Fl_Button(375, 350, 160, 20, "Close Window");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close2);
- } // Fl_Button* o
- { Fl_Scroll* o = kitlist = new Fl_Scroll(0, 15, 670, 330);
- kitlist->type(2);
- kitlist->box(FL_UP_FRAME);
- { Fl_Pack* o = new Fl_Pack(0, 20, 670, 320);
- for (int i=0;iinit(part,i,master,this);}
- o->end();
- } // Fl_Pack* o
- if (part->Pkitmode==0) o->deactivate();
- kitlist->end();
- } // Fl_Scroll* kitlist
- { Fl_Box* o = new Fl_Box(5, 0, 25, 15, "No.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(55, 0, 25, 15, "M.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(235, 0, 40, 15, "Min.k");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(345, 0, 40, 15, "Max.k");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(405, 0, 50, 15, "ADsynth");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(470, 0, 60, 15, "SUBsynth");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Choice* o = new Fl_Choice(35, 350, 70, 15, "Mode");
- o->down_box(FL_BORDER_BOX);
- o->labelsize(11);
- o->textfont(1);
- o->textsize(11);
- o->callback((Fl_Callback*)cb_Mode1);
- o->menu(menu_Mode);
- o->value(part->Pkitmode);
- } // Fl_Choice* o
- { Fl_Check_Button* o = new Fl_Check_Button(285, 350, 70, 15, "Drum mode");
- o->down_box(FL_DOWN_BOX);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Drum);
- o->value(part->Pdrummode);
- } // Fl_Check_Button* o
- { Fl_Box* o = new Fl_Box(620, 0, 30, 15, "FX.r.");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- { Fl_Box* o = new Fl_Box(540, 0, 60, 15, "PADsynth");
- o->labelfont(1);
- o->labelsize(11);
- o->align(Fl_Align(FL_ALIGN_BOTTOM|FL_ALIGN_INSIDE));
- } // Fl_Box* o
- instrumentkitlist->end();
- } // Fl_Double_Window* instrumentkitlist
- { instrumenteditwindow = new Fl_Double_Window(395, 360, "Instrument Edit");
- instrumenteditwindow->box(FL_NO_BOX);
- instrumenteditwindow->user_data((void*)(this));
- { Fl_Group* o = new Fl_Group(0, 220, 395, 110);
- o->box(FL_UP_FRAME);
- { Fl_Group* o = new Fl_Group(205, 245, 100, 80, "PADsynth");
- o->box(FL_ENGRAVED_FRAME);
- o->labelfont(1);
- { Fl_Button* o = padeditbutton = new Fl_Button(215, 280, 80, 35, "Edit");
- padeditbutton->color((Fl_Color)51);
- padeditbutton->selection_color((Fl_Color)51);
- padeditbutton->labelfont(1);
- padeditbutton->labelsize(13);
- padeditbutton->callback((Fl_Callback*)cb_padeditbutton1);
- padeditbutton->align(Fl_Align(FL_ALIGN_WRAP));
- if (part->kit[0].Ppadenabled==0) o->deactivate();
- } // Fl_Button* padeditbutton
- { Fl_Check_Button* o = padsynenabledcheck = new Fl_Check_Button(215, 255, 80, 20, "Enabled");
- padsynenabledcheck->tooltip("enable/disable PADsynth");
- padsynenabledcheck->box(FL_UP_BOX);
- padsynenabledcheck->down_box(FL_DOWN_BOX);
- padsynenabledcheck->color((Fl_Color)51);
- padsynenabledcheck->selection_color((Fl_Color)51);
- padsynenabledcheck->labelfont(1);
- padsynenabledcheck->labelsize(11);
- padsynenabledcheck->callback((Fl_Callback*)cb_padsynenabledcheck);
- o->value(part->kit[0].Ppadenabled);
- } // Fl_Check_Button* padsynenabledcheck
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(5, 245, 100, 80, "ADDsynth");
- o->box(FL_ENGRAVED_FRAME);
- o->labelfont(1);
- { Fl_Check_Button* o = adsynenabledcheck = new Fl_Check_Button(15, 255, 80, 20, "Enabled");
- adsynenabledcheck->tooltip("enable/disable ADsynth");
- adsynenabledcheck->box(FL_UP_BOX);
- adsynenabledcheck->down_box(FL_DOWN_BOX);
- adsynenabledcheck->color((Fl_Color)51);
- adsynenabledcheck->selection_color((Fl_Color)51);
- adsynenabledcheck->labelfont(1);
- adsynenabledcheck->labelsize(11);
- adsynenabledcheck->callback((Fl_Callback*)cb_adsynenabledcheck);
- o->value(part->kit[0].Padenabled);
- } // Fl_Check_Button* adsynenabledcheck
- { Fl_Button* o = adeditbutton = new Fl_Button(15, 281, 80, 34, "Edit");
- adeditbutton->color((Fl_Color)51);
- adeditbutton->selection_color((Fl_Color)51);
- adeditbutton->labelfont(1);
- adeditbutton->labelsize(13);
- adeditbutton->callback((Fl_Callback*)cb_adeditbutton1);
- adeditbutton->align(Fl_Align(FL_ALIGN_WRAP));
- if (part->kit[0].Padenabled==0) o->deactivate();
- } // Fl_Button* adeditbutton
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(105, 245, 100, 80, "SUBsynth");
- o->box(FL_ENGRAVED_FRAME);
- o->labelfont(1);
- { Fl_Check_Button* o = subsynenabledcheck = new Fl_Check_Button(115, 255, 80, 20, "Enabled");
- subsynenabledcheck->tooltip("enable/disable SUBsynth");
- subsynenabledcheck->box(FL_UP_BOX);
- subsynenabledcheck->down_box(FL_DOWN_BOX);
- subsynenabledcheck->color((Fl_Color)51);
- subsynenabledcheck->selection_color((Fl_Color)51);
- subsynenabledcheck->labelfont(1);
- subsynenabledcheck->labelsize(11);
- subsynenabledcheck->callback((Fl_Callback*)cb_subsynenabledcheck);
- o->value(part->kit[0].Psubenabled);
- } // Fl_Check_Button* subsynenabledcheck
- { Fl_Button* o = subeditbutton = new Fl_Button(115, 280, 80, 35, "Edit");
- subeditbutton->color((Fl_Color)51);
- subeditbutton->selection_color((Fl_Color)51);
- subeditbutton->labelfont(1);
- subeditbutton->labelsize(13);
- subeditbutton->callback((Fl_Callback*)cb_subeditbutton1);
- subeditbutton->align(Fl_Align(FL_ALIGN_WRAP));
- if (part->kit[0].Psubenabled==0) o->deactivate();
- } // Fl_Button* subeditbutton
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(310, 245, 80, 35, "Kit Edit");
- o->color((Fl_Color)51);
- o->selection_color((Fl_Color)51);
- o->labelfont(1);
- o->callback((Fl_Callback*)cb_Kit);
- o->align(Fl_Align(FL_ALIGN_WRAP));
- } // Fl_Button* o
- { Fl_Button* o = new Fl_Button(310, 290, 80, 35, "Effects");
- o->color((Fl_Color)51);
- o->selection_color((Fl_Color)51);
- o->labelfont(1);
- o->labelsize(13);
- o->callback((Fl_Callback*)cb_Effects);
- } // Fl_Button* o
- o->end();
- } // Fl_Group* o
- { Fl_Group* o = new Fl_Group(0, 5, 395, 215);
- o->box(FL_UP_FRAME);
- { Fl_Input* o = new Fl_Input(5, 60, 385, 50, "Author and Copyright");
- o->type(4);
- o->color((Fl_Color)26);
- o->labelsize(10);
- o->callback((Fl_Callback*)cb_Author);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->maximum_size(MAX_INFO_TEXT_SIZE);
- o->value((char *) &part->info.Pauthor);
- } // Fl_Input* o
- { Fl_Input* o = new Fl_Input(5, 125, 385, 90, "Comments");
- o->type(4);
- o->color((Fl_Color)26);
- o->labelsize(11);
- o->callback((Fl_Callback*)cb_Comments);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->maximum_size(MAX_INFO_TEXT_SIZE);
- o->value((char *) &part->info.Pcomments);
- } // Fl_Input* o
- { Fl_Choice* o = new Fl_Choice(5, 25, 155, 20, "Type:");
- o->down_box(FL_BORDER_BOX);
- o->labelfont(1);
- o->labelsize(11);
- o->textsize(10);
- o->callback((Fl_Callback*)cb_Type);
- o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
- o->menu(menu_Type);
- o->value(part->info.Ptype);
- } // Fl_Choice* o
- o->end();
- } // Fl_Group* o
- { Fl_Button* o = new Fl_Button(150, 335, 95, 25, "Close");
- o->box(FL_THIN_UP_BOX);
- o->callback((Fl_Callback*)cb_Close3);
- } // Fl_Button* o
- instrumenteditwindow->end();
- } // Fl_Double_Window* instrumenteditwindow
- return instrumenteditwindow;
-}
-
-PartUI::PartUI(int x,int y, int w, int h, const char *label):Fl_Group(x,y,w,h,label) {
- part=NULL;
- adnoteui=NULL;
- subnoteui=NULL;
- padnoteui=NULL;
- lastkititem=-1;
-}
-
-void PartUI::init(Part *part_,Master *master_,int npart_,BankUI *bankui_) {
- bankui=bankui_;
- part=part_;
- npart=npart_;
- master=master_;
- ninseff=0;
-
- make_window();
- partgroup->position(this->parent()->x()+2,this->parent()->y()+2);
- partgroup->show();
- end();
-
-
- //if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show();
-
- int klimits[]={1,2,3,4,5,6,7,8,9,10,15,20,30,50,100,0};
-
- keylimitlist->add("OFF");
- int k=0;
- int val=-1;
- char tmp[10];
- while (klimits[k]!=0){
- sprintf(tmp,"%d",klimits[k]);
- keylimitlist->add(tmp);
- if (val==-1){
- if (klimits[k]>part->Pkeylimit) val=k;
- };
- k++;
- };
-
- if (val==-1) val=k;
- keylimitlist->value(val);
-}
-
-void PartUI::showparameters(int kititem,int engine) {
- if (engine==-1){//this is used if I want to clear the engine from the part
- if (kititem==lastkititem) kititem=-1;
- else kititem=lastkititem;
- };
-
- if (kititem!=lastkititem){
- if (adnoteui!=NULL) delete (adnoteui);
- if (subnoteui!=NULL) delete (subnoteui);
- if (padnoteui!=NULL) delete (padnoteui);
- adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
- lastkititem=kititem;
-
- if (kititem>=NUM_KIT_ITEMS) return;//bad kit item
- if (kititem<0) return;
-
- if (part->kit[kititem].adpars!=NULL)
- adnoteui=new ADnoteUI(part->kit[kititem].adpars,master);
-
- if (part->kit[kititem].subpars!=NULL)
- subnoteui=new SUBnoteUI(part->kit[kititem].subpars);
-
- if (part->kit[kititem].padpars!=NULL)
- padnoteui=new PADnoteUI(part->kit[kititem].padpars,master);
-
- };
-
-
-
- if ((engine==0)&&(adnoteui!=NULL)) adnoteui->ADnoteGlobalParameters->show();
- if ((engine==1)&&(subnoteui!=NULL)) subnoteui->SUBparameters->show();
- if ((engine==2)&&(adnoteui!=NULL)) padnoteui->padnotewindow->show();
-}
-
-PartUI::~PartUI() {
- if (adnoteui!=NULL) delete (adnoteui);
- if (subnoteui!=NULL) delete (subnoteui);
- if (padnoteui!=NULL) delete (padnoteui);
-
- partgroup->hide();
- //delete(partgroup);
-
- ctlwindow->hide();
- delete(ctlwindow);
-
- partfx->hide();
- delete(partfx);
-
- instrumentkitlist->hide();
- delete(instrumentkitlist);
-
- instrumenteditwindow->hide();
- delete(instrumenteditwindow);
-}
diff --git a/source/modules/carla_native/zynaddsubfx/UI/PartUI.h b/source/modules/carla_native/zynaddsubfx/UI/PartUI.h
deleted file mode 100644
index 5faa2df2b..000000000
--- a/source/modules/carla_native/zynaddsubfx/UI/PartUI.h
+++ /dev/null
@@ -1,333 +0,0 @@
-// generated by Fast Light User Interface Designer (fluid) version 1.0300
-
-#ifndef PartUI_h
-#define PartUI_h
-#include
-#include
-#include
-#include
-#include "WidgetPDial.h"
-#include "EffUI.h"
-#include "BankUI.h"
-#include "ADnoteUI.h"
-#include "SUBnoteUI.h"
-#include "PADnoteUI.h"
-#include "../Misc/Config.h"
-#include "../Misc/Master.h"
-#include "../Misc/Part.h"
-
-class PartSysEffSend : public Fl_Group {
- Fl_Group* make_window();
- Fl_Group *syseffsend;
- void cb_01_i(WidgetPDial*, void*);
- static void cb_01(WidgetPDial*, void*);
-public:
- PartSysEffSend(int x,int y, int w, int h, const char *label=0);
- void init(Master *master_,int npart_,int neff_);
- ~PartSysEffSend();
-private:
- Master *master;
- int neff;
- int npart;
-};
-#include
-#include
-#include
-#include
-#include
-
-class PartKitItem : public Fl_Group {
- Fl_Group* make_window();
- Fl_Group *partkititem;
- Fl_Group *partkititemgroup;
-public:
- Fl_Counter *minkcounter;
-private:
- void cb_minkcounter_i(Fl_Counter*, void*);
- static void cb_minkcounter(Fl_Counter*, void*);
- void cb_m_i(Fl_Button*, void*);
- static void cb_m(Fl_Button*, void*);
- void cb_M_i(Fl_Button*, void*);
- static void cb_M(Fl_Button*, void*);
- void cb_R_i(Fl_Button*, void*);
- static void cb_R(Fl_Button*, void*);
-public:
- Fl_Button *adeditbutton;
-private:
- void cb_adeditbutton_i(Fl_Button*, void*);
- static void cb_adeditbutton(Fl_Button*, void*);
-public:
- Fl_Button *subeditbutton;
-private:
- void cb_subeditbutton_i(Fl_Button*, void*);
- static void cb_subeditbutton(Fl_Button*, void*);
- Fl_Check_Button *mutedcheck;
- void cb_mutedcheck_i(Fl_Check_Button*, void*);
- static void cb_mutedcheck(Fl_Check_Button*, void*);
-public:
- Fl_Counter *maxkcounter;
-private:
- void cb_maxkcounter_i(Fl_Counter*, void*);
- static void cb_maxkcounter(Fl_Counter*, void*);
-public:
- Fl_Button *labelbutton;
-private:
- void cb_labelbutton_i(Fl_Button*, void*);
- static void cb_labelbutton(Fl_Button*, void*);
- Fl_Check_Button *adcheck;
- void cb_adcheck_i(Fl_Check_Button*, void*);
- static void cb_adcheck(Fl_Check_Button*, void*);
- Fl_Check_Button *subcheck;
- void cb_subcheck_i(Fl_Check_Button*, void*);
- static void cb_subcheck(Fl_Check_Button*, void*);
-public:
- Fl_Choice *sendtoeffect;
-private:
- void cb_sendtoeffect_i(Fl_Choice*, void*);
- static void cb_sendtoeffect(Fl_Choice*, void*);
-public:
- Fl_Button *padeditbutton;
-private:
- void cb_padeditbutton_i(Fl_Button*, void*);
- static void cb_padeditbutton(Fl_Button*, void*);
- Fl_Check_Button *padcheck;
- void cb_padcheck_i(Fl_Check_Button*, void*);
- static void cb_padcheck(Fl_Check_Button*, void*);
- Fl_Check_Button *enabledcheck;
- void cb_enabledcheck_i(Fl_Check_Button*, void*);
- static void cb_enabledcheck(Fl_Check_Button*, void*);
-public:
- PartKitItem(int x,int y, int w, int h, const char *label=0);
- void refresh();
- void init(Part *part_,int n_,Master *master_,class PartUI *partui_);
- ~PartKitItem();
-private:
- Part *part;
- int n;
- Master *master;
- char label[10];
- class PartUI *partui;
-};
-#include