Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hydrumkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
hydrumkit
Commits
974523ea
Commit
974523ea
authored
6 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Reduce range of humanizer params + minor UI changes
Add a frame around the control groups.
parent
9965f3bd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugin/hydrumkit.ttl
+3
-3
3 additions, 3 deletions
plugin/hydrumkit.ttl
plugin/ui.c
+16
-7
16 additions, 7 deletions
plugin/ui.c
with
19 additions
and
10 deletions
plugin/hydrumkit.ttl
+
3
−
3
View file @
974523ea
...
...
@@ -89,7 +89,7 @@
lv2:
name
"Humanizer Latency Max"
;
lv2:
default
0.0
;
lv2:
minimum
0.0
;
lv2:
maximum
4
00.0
;
lv2:
maximum
1
00.0
;
units:
unit
units:
ms
;
]
,
[
a
lv2:
InputPort
,
...
...
@@ -99,7 +99,7 @@
lv2:
name
"Humanizer Latency StdDev"
;
lv2:
default
0.0
;
lv2:
minimum
0.0
;
lv2:
maximum
10
0.0
;
lv2:
maximum
2
0.0
;
units:
unit
units:
ms
;
]
,
[
a
lv2:
InputPort
,
...
...
@@ -128,7 +128,7 @@
lv2:
name
"Humanizer Velocity StdDev"
;
lv2:
default
0.0
;
lv2:
minimum
0.0
;
lv2:
maximum
1.0
;
lv2:
maximum
0.3
;
]
,
[
a
lv2:
InputPort
,
lv2:
ControlPort
;
...
...
This diff is collapsed.
Click to expand it.
plugin/ui.c
+
16
−
7
View file @
974523ea
...
...
@@ -46,6 +46,8 @@ struct plugin_ui {
GtkWidget
*
load_dialog
;
GtkWidget
*
button_box
;
GtkWidget
*
box
;
GtkWidget
*
frame
;
GtkWidget
*
humanize_frame
;
GtkWidget
*
humanize_box
;
GtkWidget
*
humanize_button
;
GtkWidget
*
humanize_latency_max_knob
;
...
...
@@ -117,11 +119,12 @@ static void on_load_dialog_response(GtkDialog *widget, gint response, void *hand
}
static
void
write_control_values
(
struct
plugin_ui
*
ui
)
{
WRITECONTROLVALUE
(
ui
->
humanize_latency_max_value
*
400
.
0
,
PORT_HUMANIZE_LATENCY_MAX
);
WRITECONTROLVALUE
(
ui
->
humanize_latency_stddev_value
*
100
.
0
,
PORT_HUMANIZE_LATENCY_STDDEV
);
WRITECONTROLVALUE
(
ui
->
humanize_latency_laid_back_value
*
100
.
0
,
PORT_HUMANIZE_LATENCY_LAID_BACK
);
// Values here should match the ranges specified in hydrumkit.ttl.
WRITECONTROLVALUE
(
ui
->
humanize_latency_max_value
*
100
.
0
,
PORT_HUMANIZE_LATENCY_MAX
);
WRITECONTROLVALUE
(
ui
->
humanize_latency_stddev_value
*
20
.
0
,
PORT_HUMANIZE_LATENCY_STDDEV
);
WRITECONTROLVALUE
(
ui
->
humanize_latency_laid_back_value
*
100
.
0
,
PORT_HUMANIZE_LATENCY_LAID_BACK
);
WRITECONTROLVALUE
(
ui
->
humanize_latency_regain_value
,
PORT_HUMANIZE_LATENCY_REGAIN
);
WRITECONTROLVALUE
(
ui
->
humanize_velocity_stddev_value
,
PORT_HUMANIZE_VELOCITY_STDDEV
);
WRITECONTROLVALUE
(
ui
->
humanize_velocity_stddev_value
*
0
.
3
,
PORT_HUMANIZE_VELOCITY_STDDEV
);
}
static
void
on_humanize_button_click
(
GtkButton
*
widget
,
void
*
handle
)
{
...
...
@@ -180,8 +183,10 @@ static LV2UI_Handle instantiate(const LV2UI_Descriptor *descriptor,
// Construct Gtk UI
ui
->
box
=
gtk_grid_new
();
gtk_orientable_set_orientation
(
GTK_ORIENTABLE
(
ui
->
box
),
GTK_ORIENTATION_VERTICAL
);
ui
->
frame
=
gtk_frame_new
(
"Drumkit"
);
ui
->
label
=
gtk_label_new
(
"No drumkit loaded."
);
ui
->
button_box
=
gtk_grid_new
();
ui
->
humanize_frame
=
gtk_frame_new
(
"Humanizer"
);
ui
->
humanize_box
=
gtk_grid_new
();
// Create the file chooser (we use a custom GtkButton instead of the
...
...
@@ -218,7 +223,7 @@ static LV2UI_Handle instantiate(const LV2UI_Descriptor *descriptor,
}
// Create the humanizer controls.
ui
->
humanize_button
=
gtk_check_button_new_with_label
(
"
Humaniz
e"
);
ui
->
humanize_button
=
gtk_check_button_new_with_label
(
"
Enabl
e"
);
ui
->
humanize_latency_max_knob
=
knob_widget_new
(
&
ui
->
humanize_latency_max_value
,
KNOB_SIZE
,
0
);
ui
->
humanize_latency_stddev_knob
=
knob_widget_new
(
&
ui
->
humanize_latency_stddev_value
,
KNOB_SIZE
,
0
);
ui
->
humanize_latency_laid_back_knob
=
knob_widget_new
(
&
ui
->
humanize_latency_laid_back_value
,
KNOB_SIZE
,
0
);
...
...
@@ -238,14 +243,16 @@ static LV2UI_Handle instantiate(const LV2UI_Descriptor *descriptor,
gtk_widget_set_halign
(
ui
->
label
,
GTK_ALIGN_CENTER
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
button_box
),
ui
->
load_button
);
gtk_widget_set_hexpand
(
ui
->
load_button
,
FALSE
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
box
),
ui
->
button_box
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
frame
),
ui
->
button_box
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
box
),
ui
->
frame
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_button
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_latency_max_knob
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_latency_stddev_knob
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_latency_laid_back_knob
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_latency_regain_knob
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_box
),
ui
->
humanize_velocity_stddev_knob
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
box
),
ui
->
humanize_box
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
humanize_frame
),
ui
->
humanize_box
);
gtk_container_add
(
GTK_CONTAINER
(
ui
->
box
),
ui
->
humanize_frame
);
g_signal_connect
(
ui
->
load_dialog
,
"response"
,
G_CALLBACK
(
on_load_dialog_response
),
ui
);
...
...
@@ -270,6 +277,7 @@ static void cleanup(LV2UI_Handle handle) {
gtk_widget_destroy
(
ui
->
load_dialog
);
gtk_widget_destroy
(
ui
->
load_button
);
gtk_widget_destroy
(
ui
->
button_box
);
gtk_widget_destroy
(
ui
->
frame
);
gtk_widget_destroy
(
ui
->
humanize_button
);
gtk_widget_destroy
(
ui
->
humanize_latency_max_knob
);
gtk_widget_destroy
(
ui
->
humanize_latency_stddev_knob
);
...
...
@@ -277,6 +285,7 @@ static void cleanup(LV2UI_Handle handle) {
gtk_widget_destroy
(
ui
->
humanize_latency_regain_knob
);
gtk_widget_destroy
(
ui
->
humanize_velocity_stddev_knob
);
gtk_widget_destroy
(
ui
->
humanize_box
);
gtk_widget_destroy
(
ui
->
humanize_frame
);
gtk_widget_destroy
(
ui
->
box
);
free
(
ui
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment