2023-06-21 09:33:23 +00:00
|
|
|
': This program uses
|
|
|
|
': InForm - GUI library for QB64 - v1.5
|
|
|
|
': Fellippe Heitor, 2016-2023 - fellippe@qb64.org - @fellippeheitor
|
|
|
|
': https://github.com/FellippeHeitor/InForm
|
|
|
|
'-----------------------------------------------------------
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
OPTION _EXPLICIT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
TYPE WaveformType
|
|
|
|
active AS LONG
|
|
|
|
waveform AS LONG
|
|
|
|
note AS LONG
|
|
|
|
length AS LONG
|
|
|
|
lengthType AS LONG
|
|
|
|
tempo AS LONG
|
|
|
|
volume AS LONG
|
|
|
|
volRamp AS LONG
|
|
|
|
END TYPE
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
DIM SHARED Waveform(1 TO 5) AS WaveformType, currentWaveform AS LONG, currentControl AS LONG
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
': Controls' IDs: ------------------------------------------------------------------
|
2023-06-24 02:38:56 +00:00
|
|
|
DIM SHARED PlayFXDesigner AS LONG
|
|
|
|
DIM SHARED Waveforms AS LONG
|
|
|
|
DIM SHARED ConfigureWaveform AS LONG
|
|
|
|
DIM SHARED PlayFX AS LONG
|
|
|
|
DIM SHARED Waveform1TB AS LONG
|
|
|
|
DIM SHARED Waveform2TB AS LONG
|
|
|
|
DIM SHARED Waveform3TB AS LONG
|
|
|
|
DIM SHARED Waveform4TB AS LONG
|
|
|
|
DIM SHARED Waveform5TB AS LONG
|
|
|
|
DIM SHARED WaveformLB AS LONG
|
|
|
|
DIM SHARED WaveformSlider AS LONG
|
|
|
|
DIM SHARED WaveformNameLB AS LONG
|
|
|
|
DIM SHARED NoteLB AS LONG
|
|
|
|
DIM SHARED NoteSlider AS LONG
|
|
|
|
DIM SHARED LengthLB AS LONG
|
|
|
|
DIM SHARED LengthSlider AS LONG
|
|
|
|
DIM SHARED LengthEffectsDL AS LONG
|
|
|
|
DIM SHARED TempoLB AS LONG
|
|
|
|
DIM SHARED TempoSlider AS LONG
|
|
|
|
DIM SHARED VolumeLB AS LONG
|
|
|
|
DIM SHARED VolumeSlider AS LONG
|
|
|
|
DIM SHARED VolRampLB AS LONG
|
|
|
|
DIM SHARED VolRampSlider AS LONG
|
|
|
|
DIM SHARED PlayFXTB AS LONG
|
|
|
|
DIM SHARED PlayBT AS LONG
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
': External modules: ---------------------------------------------------------------
|
2023-06-24 02:38:56 +00:00
|
|
|
'$INCLUDE:'../../InForm/InForm.bi'
|
2023-06-21 09:33:23 +00:00
|
|
|
'$INCLUDE:'PlayFX.frm'
|
2023-11-30 21:42:40 +00:00
|
|
|
'$INCLUDE:'../../InForm/xp.uitheme'
|
|
|
|
'$INCLUDE:'../../InForm/InForm.ui'
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
': Custom procedures: --------------------------------------------------------------
|
2023-06-24 02:38:56 +00:00
|
|
|
FUNCTION IsDifferentWaveform%% (w1 AS WaveformType, w2 AS WaveformType)
|
|
|
|
IsDifferentWaveform = w1.waveform <> w2.waveform OR w1.note <> w2.note OR w1.length <> w2.length OR w1.lengthType <> w2.lengthType OR w1.tempo <> w2.tempo OR w1.volume <> w2.volume OR w1.volRamp <> w2.volRamp
|
|
|
|
END FUNCTION
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB SetConfigControls (id AS LONG, curCtrl AS LONG)
|
2023-06-21 09:33:23 +00:00
|
|
|
Control(WaveformSlider).Value = Waveform(id).waveform
|
|
|
|
Control(NoteSlider).Value = Waveform(id).note
|
|
|
|
Control(LengthSlider).Value = Waveform(id).length
|
|
|
|
Control(LengthEffectsDL).Value = Waveform(id).lengthType
|
|
|
|
Control(TempoSlider).Value = Waveform(id).tempo
|
|
|
|
Control(VolumeSlider).Value = Waveform(id).volume
|
|
|
|
Control(VolRampSlider).Value = Waveform(id).volRamp
|
|
|
|
|
|
|
|
currentWaveform = id
|
|
|
|
currentControl = curCtrl
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB ClearWaveform (id AS LONG)
|
2023-11-30 21:42:40 +00:00
|
|
|
Waveform(id).active = FALSE ' set not in use
|
2023-06-21 09:33:23 +00:00
|
|
|
Waveform(id).waveform = 3 ' triangle
|
|
|
|
Waveform(id).note = 42 ' half-way through the scale
|
|
|
|
Waveform(id).length = 4 ' quarter
|
|
|
|
Waveform(id).lengthType = 1 ' normal
|
|
|
|
Waveform(id).tempo = 120 ' 120
|
|
|
|
Waveform(id).volume = 100 ' max
|
|
|
|
Waveform(id).volRamp = 10 ' 10 ms
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB MakePlayString
|
|
|
|
DIM s AS STRING
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Waveform(currentWaveform).active THEN
|
|
|
|
s = "T" + LTRIM$(STR$(Waveform(currentWaveform).tempo)) + "L" + LTRIM$(STR$(Waveform(currentWaveform).length))
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SELECT CASE Waveform(currentWaveform).lengthType
|
|
|
|
CASE 1
|
2023-06-21 09:33:23 +00:00
|
|
|
s = s + "MN"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 2
|
2023-06-21 09:33:23 +00:00
|
|
|
s = s + "ML"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 3
|
2023-06-21 09:33:23 +00:00
|
|
|
s = s + "MS"
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
s = s + "V" + LTRIM$(STR$(Waveform(currentWaveform).volume)) + "Q" + LTRIM$(STR$(Waveform(currentWaveform).volRamp))
|
|
|
|
s = s + "@" + LTRIM$(STR$(Waveform(currentWaveform).waveform)) + "N" + LTRIM$(STR$(Waveform(currentWaveform).note))
|
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
Text(currentControl) = s
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB MakePlayFXString
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = "MB"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Text(Waveform1TB) <> "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = Text(PlayFXTB) + Text(Waveform1TB)
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Text(Waveform2TB) <> "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = Text(PlayFXTB) + "," + Text(Waveform2TB)
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Text(Waveform3TB) <> "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = Text(PlayFXTB) + "," + Text(Waveform3TB)
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Text(Waveform4TB) <> "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = Text(PlayFXTB) + "," + Text(Waveform4TB)
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF Text(Waveform5TB) <> "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Text(PlayFXTB) = Text(PlayFXTB) + "," + Text(Waveform5TB)
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
': Event procedures: ---------------------------------------------------------------
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_BeforeInit
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_OnLoad
|
|
|
|
DIM i AS LONG
|
|
|
|
FOR i = 1 TO 5
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform i
|
2023-06-24 02:38:56 +00:00
|
|
|
NEXT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
SetConfigControls 1, Waveform1TB
|
|
|
|
SetFocus Waveform1TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_BeforeUpdateDisplay
|
2023-06-21 09:33:23 +00:00
|
|
|
'This event occurs at approximately 60 frames per second.
|
|
|
|
'You can change the update frequency by calling SetFrameRate DesiredRate%
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_BeforeUnload
|
2023-06-21 09:33:23 +00:00
|
|
|
'If you set __UI_UnloadSignal = False here you can
|
|
|
|
'cancel the user's request to close.
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_Click (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFX
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
|
|
|
PLAY Text(PlayFXTB)
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformNameLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXDesigner
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveforms
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE ConfigureWaveform
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_MouseEnter (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFX
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformNameLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXDesigner
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveforms
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE ConfigureWaveform
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_MouseLeave (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFX
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformNameLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXDesigner
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveforms
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE ConfigureWaveform
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_FocusIn (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
SetConfigControls 1, Waveform1TB
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
SetConfigControls 2, Waveform2TB
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
SetConfigControls 3, Waveform3TB
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
SetConfigControls 4, Waveform4TB
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
SetConfigControls 5, Waveform5TB
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_FocusOut (id AS LONG)
|
2023-06-21 09:33:23 +00:00
|
|
|
'This event occurs right before a control loses focus.
|
|
|
|
'To prevent a control from losing focus, set __UI_KeepFocus = True below.
|
2023-06-24 02:38:56 +00:00
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_MouseDown (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFX
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformNameLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXDesigner
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveforms
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE ConfigureWaveform
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_MouseUp (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFX
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformNameLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformLB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayFXDesigner
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveforms
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE ConfigureWaveform
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_KeyPress (id AS LONG)
|
2023-06-21 09:33:23 +00:00
|
|
|
'When this event is fired, __UI_KeyHit will contain the code of the key hit.
|
|
|
|
'You can change it and even cancel it by making it = 0
|
2023-06-24 02:38:56 +00:00
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE PlayBT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE WaveformSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_TextChanged (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE PlayFXTB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform1TB
|
|
|
|
IF Text(id) = "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform 1
|
|
|
|
SetConfigControls 1, Waveform1TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform2TB
|
|
|
|
IF Text(id) = "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform 2
|
|
|
|
SetConfigControls 2, Waveform2TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform3TB
|
|
|
|
IF Text(id) = "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform 3
|
|
|
|
SetConfigControls 3, Waveform3TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform4TB
|
|
|
|
IF Text(id) = "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform 4
|
|
|
|
SetConfigControls 4, Waveform4TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE Waveform5TB
|
|
|
|
IF Text(id) = "" THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
ClearWaveform 5
|
|
|
|
SetConfigControls 5, Waveform5TB
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_ValueChanged (id AS LONG)
|
|
|
|
SELECT CASE id
|
|
|
|
CASE WaveformSlider
|
|
|
|
SELECT CASE Control(id).Value
|
|
|
|
CASE 1
|
2023-06-21 09:33:23 +00:00
|
|
|
SetCaption WaveformNameLB, "Square"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 2
|
2023-06-21 09:33:23 +00:00
|
|
|
SetCaption WaveformNameLB, "Sawtooth"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 3
|
2023-06-21 09:33:23 +00:00
|
|
|
SetCaption WaveformNameLB, "Triangle"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 4
|
2023-06-21 09:33:23 +00:00
|
|
|
SetCaption WaveformNameLB, "Sine"
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE 5
|
2023-06-21 09:33:23 +00:00
|
|
|
SetCaption WaveformNameLB, "Noise"
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE NoteSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE LengthEffectsDL
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE TempoSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolumeSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
CASE VolRampSlider
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SELECT
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
DIM temp AS WaveformType
|
2023-06-21 09:33:23 +00:00
|
|
|
temp.waveform = Control(WaveformSlider).Value
|
|
|
|
temp.note = Control(NoteSlider).Value
|
|
|
|
temp.length = Control(LengthSlider).Value
|
|
|
|
temp.lengthType = Control(LengthEffectsDL).Value
|
|
|
|
temp.tempo = Control(TempoSlider).Value
|
|
|
|
temp.volume = Control(VolumeSlider).Value
|
|
|
|
temp.volRamp = Control(VolRampSlider).Value
|
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
IF IsDifferentWaveform(temp, Waveform(currentWaveform)) THEN
|
2023-06-21 09:33:23 +00:00
|
|
|
Waveform(currentWaveform) = temp
|
2023-11-30 21:42:40 +00:00
|
|
|
Waveform(currentWaveform).active = TRUE
|
2023-06-24 02:38:56 +00:00
|
|
|
END IF
|
2023-06-21 09:33:23 +00:00
|
|
|
|
|
|
|
MakePlayString
|
|
|
|
MakePlayFXString
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
SUB __UI_FormResized
|
2023-06-21 09:33:23 +00:00
|
|
|
|
2023-06-24 02:38:56 +00:00
|
|
|
END SUB
|