Browse Source

add framework for midi functions

export_samplerate
Alexandros Theodotou 3 years ago
parent
commit
b07e4459af
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 21
      data/icon-themes/zrythm-dark/scalable/README.md
  2. 84
      data/icon-themes/zrythm-dark/scalable/status/articulation-legato.svg
  3. 83
      data/icon-themes/zrythm-dark/scalable/status/articulation-portato.svg
  4. 62
      data/icon-themes/zrythm-dark/scalable/status/articulation-staccato.svg
  5. 80
      data/icon-themes/zrythm-dark/scalable/status/articulation-staccato2.svg
  6. 92
      data/icon-themes/zrythm-dark/scalable/status/drum-flam.svg
  7. 84
      data/icon-themes/zrythm-dark/scalable/status/dynamics-crescendo.svg
  8. 106
      data/icon-themes/zrythm-dark/scalable/status/strum.svg
  9. 2
      data/meson.build
  10. 4
      data/theme.css
  11. 2
      doc/dev/Doxyfile.cfg.in
  12. 30
      doc/dev/gtk_tips.md
  13. 1
      doc/dev/meson.build
  14. 8
      inc/actions/actions.h
  15. 16
      inc/actions/arranger_selections.h
  16. 3
      inc/actions/channel_send_action.h
  17. 88
      inc/audio/midi_function.h
  18. 2
      inc/gui/backend/arranger_selections.h
  19. 1
      inc/gui/backend/event.h
  20. 17
      inc/gui/widgets/button_with_menu.h
  21. 14
      inc/gui/widgets/editor_toolbar.h
  22. 11
      inc/utils/gtk.h
  23. 2
      inc/utils/ui.h
  24. 8
      resources/gtk/help-overlay.ui
  25. 51
      resources/gtk/menus.ui
  26. 15
      resources/meson.build
  27. 103
      resources/ui/editor_toolbar.ui
  28. 2
      resources/ui/help_toolbar.ui
  29. 96
      resources/ui/meson.build
  30. 1
      resources/ui/splash.ui
  31. 4
      resources/ui/timeline_toolbar.ui
  32. 2
      resources/ui/toolbox.ui
  33. 6
      scripts/gen-gschema.scm
  34. 7
      scripts/gen-gtk-resources-xml.scm
  35. 6
      scripts/meson.build
  36. 92
      src/actions/actions.c
  37. 25
      src/actions/arranger_selections.c
  38. 1
      src/audio/meson.build
  39. 50
      src/audio/midi_function.c
  40. 5
      src/gui/backend/event_manager.c
  41. 7
      src/gui/widgets/arranger_object.c
  42. 1
      src/gui/widgets/bot_bar.c
  43. 14
      src/gui/widgets/button_with_menu.c
  44. 2
      src/gui/widgets/dialogs/string_entry_dialog.c
  45. 4
      src/gui/widgets/digital_meter.c
  46. 62
      src/gui/widgets/editor_toolbar.c
  47. 3
      src/gui/widgets/main_window.c
  48. 17
      src/gui/widgets/transport_controls.c
  49. 35
      src/zrythm_app.c

21
data/icon-themes/zrythm-dark/scalable/README → data/icon-themes/zrythm-dark/scalable/README.md

@ -5,6 +5,10 @@ with Zrythm. If not, see @@ -5,6 +5,10 @@ with Zrythm. If not, see
<https://creativecommons.org/licenses/by-sa/4.0/>.
- add.svg
- articulation-portato.svg
- articulation-staccato2.svg
- strum.svg
- dynamics-crescendo.svg
- augmentation-dot.svg
- automate.svg
- bus.svg
@ -173,3 +177,20 @@ with Zrythm. If not, see @@ -173,3 +177,20 @@ with Zrythm. If not, see
- speaker
- stereo
- waveform
----
The following icons are authored by [Denelson83](https://commons.wikimedia.org/wiki/User:Denelson83),
vectorized by [Ekips39](https://commons.wikimedia.org/wiki/User:Ekips39) and modified.
They are licensed under [Creative Commons Attribution-Share Alike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/deed.en).
- articulation-legato.svg
- articulation-staccato.svg
----
The following icons are authored by Vladimir Morozov
on Visualhunt.com and modified.
They are licensed under [Creative Commons Attribution 2.0 Generic](https://creativecommons.org/licenses/by/2.0/).
- drum-flam.svg

84
data/icon-themes/zrythm-dark/scalable/status/articulation-legato.svg

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="200"
height="200"
version="1.1"
id="svg24"
sodipodi:docname="articulation-legato.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs28" />
<sodipodi:namedview
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1025"
id="namedview26"
showgrid="false"
inkscape:zoom="2.8284271"
inkscape:cx="108.98887"
inkscape:cy="103.66475"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg24" />
<g
transform="translate(-0.823463,-4.5614245)"
id="g880">
<path
d="m 179.02322,17.550561 h 7.15719 V 102.68 c 0,4.30902 -2.52235,7.46196 -5.2549,10.5098 -4.41412,3.67844 -9.24863,4.93961 -14.71373,4.93961 -6.72628,0 -10.50981,-4.30902 -10.50981,-8.72314 0.3153,-9.03843 12.92707,-16.815687 20.59923,-16.500393 2.83764,0.105098 6.84385,1.856549 2.96119,2.101961 z"
id="path14"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098"
sodipodi:nodetypes="ccscscccc" />
<path
d="m 169.46982,125.69647 9.11036,11.09981 c -15.13412,22.91138 -35.21757,32.71563 -44.99169,37.76034 -25.01334,13.45255 -58.887091,17.01567 -75.492586,17.01567 -15.449417,0 -32.37416,-1.79317 -37.839259,-5.47161 l 6.595095,-12.26929 c 8.933336,3.78353 18.392162,5.04471 31.529421,5.14981 41.829029,-0.3153 68.103549,-15.23922 71.256489,-17.23609 9.03844,-5.36 20.07373,-9.56392 39.93727,-35.94354 z"
id="path16"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098"
sodipodi:nodetypes="cccscccccc" />
<path
d="m 42.196058,67.997634 h 2.101962 v 85.129436 c 0,4.30902 -2.522354,7.46196 -5.254904,10.50981 -4.414119,3.67843 -9.24863,4.93961 -14.71373,4.93961 -6.726276,0 -10.509807,-4.30902 -10.509807,-8.72314 0.315294,-9.03844 12.927063,-16.81569 20.599222,-16.5004 2.837648,0.1051 6.410982,1.57647 7.777257,2.10196 z"
id="path18"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098" />
<path
d="m 106.35896,54.334885 h 8.56496 v 85.129435 c 0,4.30902 -2.52235,7.46196 -5.2549,10.50981 -4.41412,3.67843 -9.24863,4.93961 -14.713731,4.93961 -6.726276,0 -10.509807,-4.30902 -10.509807,-8.72314 0.315294,-9.03844 12.927063,-16.81569 20.599218,-16.5004 2.83765,0.1051 -0.052,1.57647 1.31426,2.10196 z"
id="path20"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098"
sodipodi:nodetypes="ccscscccc" />
<path
sodipodi:nodetypes="ccscscccc"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098"
id="path20-7"
d="m 179.26239,17.550559 h 8.56496 V 102.68 c 0,4.30902 -2.52235,7.46196 -5.2549,10.50981 -4.41412,3.67843 -9.24863,4.9396 -14.71373,4.9396 -6.72627,0 -10.50981,-4.30901 -10.50981,-8.72313 0.3153,-9.03844 12.92707,-16.815692 20.59922,-16.500402 2.83765,0.1051 -0.052,1.57647 1.31426,2.10196 z" />
<path
sodipodi:nodetypes="ccscscccc"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.05098"
id="path20-76"
d="m 35.733056,67.997639 h 8.56496 v 85.129431 c 0,4.30902 -2.52235,7.46196 -5.2549,10.50981 -4.41412,3.67843 -9.24863,4.93961 -14.71373,4.93961 -6.72628,0 -10.50981,-4.30902 -10.50981,-8.72314 0.31529,-9.03844 12.92706,-16.81569 20.59922,-16.5004 2.83765,0.1051 -0.052,1.57647 1.31426,2.10196 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

83
data/icon-themes/zrythm-dark/scalable/status/articulation-portato.svg

@ -0,0 +1,83 @@ @@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16mm"
height="16mm"
viewBox="0 0 16 16"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="articulation-portato.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="48.468382"
inkscape:cy="29.485419"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
transform="translate(0,0.61793647)"
id="g873">
<g
id="g866">
<path
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.46731;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 5.8326887,6.0273228 V 14.07298"
id="path835" />
<ellipse
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.0155;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path837"
cx="8"
cy="6.1802144"
rx="2.4187772"
ry="1.701679" />
</g>
<circle
r="0.42851612"
cy="1.0996432"
cx="8"
id="path839"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.42727;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" />
<path
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:0.840482;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 10.384571,3.1062901 H 5.6154286"
id="path835-7" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

62
data/icon-themes/zrythm-dark/scalable/status/articulation-staccato.svg

@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="200"
height="200"
version="1.1"
id="svg18"
sodipodi:docname="articulation-staccato.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<metadata
id="metadata24">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs22" />
<sodipodi:namedview
inkscape:guide-bbox="true"
showguides="true"
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1025"
id="namedview20"
showgrid="false"
inkscape:zoom="2.0975"
inkscape:cx="82.274311"
inkscape:cy="83.9151"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg18" />
<path
sodipodi:nodetypes="ccscscccc"
d="M 89.336496,183.51626 H 79.299389 V 67.878361 c 0,-5.853277 3.426308,-10.136162 7.138142,-14.276284 5.996039,-4.9967 12.563129,-6.709854 19.986799,-6.709854 9.13682,0 14.27628,5.853277 14.27628,11.849316 -0.42829,12.277604 -17.55983,22.842054 -27.981514,22.413766 -3.854597,-0.142763 -3.258927,-1.298016 -3.258927,-1.298016 z"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:1.42763"
id="path14" />
<path
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:3.6397"
d="m 113.98772,22.194252 a 14.558774,14.558774 0 1 1 -29.117544,0 14.558774,14.558774 0 1 1 29.117544,0 z"
id="path16" />
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

80
data/icon-themes/zrythm-dark/scalable/status/articulation-staccato2.svg

@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="articulation-staccato2.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 16 16"
height="16mm"
width="16mm">
<defs
id="defs2" />
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="27"
inkscape:window-x="0"
inkscape:window-height="1025"
inkscape:window-width="1920"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="29.485419"
inkscape:cx="48.468382"
inkscape:zoom="7.9195959"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Layer 1">
<g
transform="matrix(0.94901665,0,0,0.94901665,1.0502131,0.82063266)"
id="g922">
<g
id="g916"
transform="translate(0.24559588,0.38510531)">
<path
id="path835"
d="M 4.7938052,5.1542587 V 14.233151"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<ellipse
ry="1.7930971"
rx="2.5487194"
cy="5.2624054"
cx="7.0775495"
id="path837"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.07005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<circle
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.81318;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path839"
cx="7.3231454"
cy="1.1628332"
r="0.54438072" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

92
data/icon-themes/zrythm-dark/scalable/status/drum-flam.svg

@ -0,0 +1,92 @@ @@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
height="16"
width="16"
sodipodi:docname="drum-flam.svg"
version="1.1"
xml:space="preserve"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="Layer_1"><metadata
id="metadata81"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs79"> </defs><sodipodi:namedview
inkscape:current-layer="g994"
inkscape:window-maximized="1"
inkscape:window-y="27"
inkscape:window-x="0"
inkscape:cy="9.4845513"
inkscape:cx="9.6911135"
inkscape:zoom="22.627417"
showgrid="false"
id="namedview77"
inkscape:window-height="1025"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" /> <g
style="fill:#f2f2f2"
transform="matrix(0.94745795,0,0,0.94745795,0.63459287,2.8763764)"
id="g994"><g
transform="matrix(1.0638695,0,0,1.0638695,-0.49651267,-0.84092549)"
id="g1010"><g
transform="matrix(0.39296649,0,0,0.39296649,-47.614765,-10.281429)"
id="g4"
style="fill:#f2f2f2"> <polygon
points="130.9,41.9 139,36.6 139.2,36.9 131.1,42.1 "
id="polygon2"
style="fill:#f2f2f2" /> </g><g
transform="matrix(0.39296649,0,0,0.39296649,-47.614765,-10.281429)"
id="g8"
style="fill:#f2f2f2"> <path
d="m 137.3,42.7 c -0.3,1.6 -0.9,2.8 -1.6,3.7 l -0.1,-0.1 c 0.2,-0.3 0.5,-0.6 0.7,-1.1 0.4,-0.9 0.6,-1.8 0.6,-2.7 0,-0.7 -0.1,-1.4 -0.4,-2.1 -0.3,-0.8 -0.9,-1.5 -1.6,-2.1 -0.7,-0.6 -1.5,-1 -2.3,-1.1 h -0.2 v -4 h 0.2 c 0.1,0.3 0.1,0.6 0.2,0.8 0.2,0.6 0.6,1.2 1.1,1.7 1.3,1.2 2.2,2.2 2.7,3.1 0.5,0.8 0.7,1.7 0.7,2.7 0.1,0.5 0.1,0.9 0,1.2"
id="path6"
style="fill:#f2f2f2" /> </g><g
transform="matrix(1.0976032,0,0,0.33787241,-141.12788,-7.6563877)"
id="g12"
style="fill:#f2f2f2"> <rect
x="132.60001"
y="33.799999"
width="0.30000001"
height="13.8"
id="rect10"
style="fill:#f2f2f2" /> </g><g
transform="matrix(0.39296649,0,0,0.39296649,-47.614765,-10.281429)"
id="g16"
style="fill:#f2f2f2"> <path
d="m 128.3,48 c 0.2,-0.6 0.6,-1.1 1.3,-1.5 0.6,-0.4 1.3,-0.6 2,-0.6 0.6,0 1,0.1 1.3,0.4 0.3,0.3 0.5,0.6 0.5,1.1 0,0.2 0,0.4 -0.1,0.6 -0.2,0.6 -0.6,1.1 -1.3,1.5 -0.6,0.4 -1.3,0.6 -2,0.6 -0.5,0 -1,-0.2 -1.3,-0.4 -0.3,-0.3 -0.5,-0.6 -0.5,-1.1 0,-0.2 0,-0.4 0.1,-0.6"
id="path14"
style="fill:#f2f2f2" /> </g><rect
style="fill:#f2f2f2;stroke-width:0.622962"
id="rect18"
height="9.9143057"
width="0.64821768"
y="-1.6084183"
x="12.114559" /><g
transform="matrix(0.39296649,0,0,0.39296649,-47.614765,-10.281429)"
id="g24"
style="fill:#f2f2f2"> <path
d="m 143.6,48 c 0.4,-1.2 1.2,-2.1 2.5,-2.9 1.3,-0.8 2.6,-1.2 3.9,-1.2 1.1,0 2,0.3 2.7,0.8 0.7,0.6 1,1.3 1,2.1 0,0.4 -0.1,0.8 -0.3,1.2 -0.4,1.2 -1.3,2.1 -2.5,2.9 -1.3,0.8 -2.6,1.2 -4,1.2 -1.1,0 -2,-0.3 -2.6,-0.9 -0.7,-0.6 -1,-1.3 -1,-2.1 0,-0.2 0.1,-0.6 0.3,-1.1"
id="path22"
style="fill:#f2f2f2" /> </g><g
transform="matrix(0.39296649,0,0,0.39296649,-47.614765,-10.281429)"
id="g52"
style="fill:#f2f2f2"> <path
d="m 130.8,56.1 c 3,5.4 14.5,5.4 17.5,0 L 148,55.9 c -2.7,3.6 -14.2,3.6 -16.9,0 z"
id="path50"
style="fill:#f2f2f2" /> </g></g></g> </svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

84
data/icon-themes/zrythm-dark/scalable/status/dynamics-crescendo.svg

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16mm"
height="16mm"
viewBox="0 0 16 16"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="dynamics-crescendo.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="48.468382"
inkscape:cy="44.637707"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g916"
transform="matrix(0.81778741,0,0,-0.83254642,2.2120692,12.783506)">
<path
id="path835"
d="M 4.7938052,5.1542587 V 14.233151"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<ellipse
ry="1.7930971"
rx="2.5487194"
cy="5.2624054"
cx="7.0775495"
id="path837"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.07005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
transform="translate(0.0391376)"
id="g937">
<path
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.18;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 10.172572,11.149582 5.7491528,13.045061"
id="path835-7"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
id="path835-7-6"
d="M 10.172572,14.94054 5.7491528,13.045061"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.18;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

106
data/icon-themes/zrythm-dark/scalable/status/strum.svg

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16mm"
height="16mm"
viewBox="0 0 16 16"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="strum.svg">
<defs
id="defs2" />
<sodipodi:namedview
inkscape:guide-bbox="true"
showguides="true"
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="7.4379254"
inkscape:cy="29.325316"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1025"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:nodetypes="ccccccccc"
d="M 3.2764985,4.5071546 H 2.7212186 V 0.57815371 H 6.5311593 V 4.5071546 H 5.9710791 V 2.2450026 H 3.2764985 Z"
style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.11906"
id="path16" />
<g
transform="matrix(0,-0.73467603,0.73467603,0,1.7899178,8.6608436)"
id="g937">
<path
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.18;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 10.172572,11.149582 5.7491528,13.045061"
id="path835-7"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
id="path835-7-6"
d="M 10.172572,14.94054 5.7491528,13.045061"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.18;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="matrix(-0.80121395,0,0,-0.80121395,17.044442,17.772835)"
id="g916-8">
<path
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 4.7938052,5.1542587 V 14.233151"
id="path835-8" />
<ellipse
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.07005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none"
id="path837-5"
cx="7.0775495"
cy="5.2624054"
rx="2.5487194"
ry="1.7930971" />
</g>
<g
id="g916-8-0"
transform="matrix(-0.80121395,0,0,-0.80121395,10.29682,17.772835)">
<path
id="path835-8-9"
d="M 4.7938052,5.1542587 V 14.233151"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<ellipse
ry="1.7930971"
rx="2.5487194"
cy="5.2624054"
cx="7.0775495"
id="path837-5-6"
style="fill:#f2f2f2;stroke:#f2f2f2;stroke-width:1.07005;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

2
data/meson.build

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
gschema_top = 'org.zrythm.Zrythm'
gschema = configure_file (
input: gschema_gen_wrap,
input: gen_gschema_wrap,
output: gschema_top + '.gschema.xml',
command: [
'@INPUT0@', '@OUTPUT@', gschema_top,

4
data/theme.css

@ -179,7 +179,7 @@ bot-bar toolbar, @@ -179,7 +179,7 @@ bot-bar toolbar,
assistant,
buttonbox,
timeline-selection-info,
timeline-toolbar,
.timeline-toolbar,
piano-roll-selection-info,
piano-roll-toolbar,
browser toolbar,
@ -215,7 +215,7 @@ help-toolbar separator @@ -215,7 +215,7 @@ help-toolbar separator
margin: 4px;
}
timeline-toolbar separator
.arranger-toolbar separator
{
background-color: alpha (grey, 0.6);
margin: 4px;

2
doc/dev/Doxyfile.cfg.in

@ -812,7 +812,7 @@ INPUT = \ @@ -812,7 +812,7 @@ INPUT = \
@MESON_SOURCE_ROOT@/inc \
@MESON_SOURCE_ROOT@/tests \
@MESON_SOURCE_ROOT@/doc/dev/cyaml_schemas.h \
@MESON_SOURCE_ROOT@/doc/dev/gtk_tips.h \
@MESON_SOURCE_ROOT@/doc/dev/gtk_tips.md \
@MESON_SOURCE_ROOT@/doc/dev/mainpage.h \
@MESON_SOURCE_ROOT@/doc/dev/processing_cycle.h \
@MESON_SOURCE_ROOT@/doc/dev/release_checklist.h \

30
doc/dev/gtk_tips.md

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
GTK Tips
========
# dispose() vs finalize() vs destroy()
According to ebassi from GTK:
Rule of thumb: use dispose()
for releasing references to objects you acquired
from the outside, and finalize() to release
memory/references you allocated internally.
There's basically no reason to
override `destroy()`; always use `dispose`/`finalize`.
The "destroy" signal is for
other code, using your widget, to release
references they might have.
# Specify menu for GtkMenuButton in XML
Specify the id of the menu, like:
```xml
<property name="menu">my_menu_id</property>
```
----
Copyright (C) 2019-2020 Alexandros Theodotou
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

1
doc/dev/meson.build

@ -38,6 +38,7 @@ if dot_bin.found() @@ -38,6 +38,7 @@ if dot_bin.found()
'CONTRIBUTING.md'),
'mainpage.h',
'cyaml_schemas.h',
'gtk_tips.md',
'processing_cycle.h',
'release_checklist.h',
'weblate.h',

8
inc/actions/actions.h

@ -142,11 +142,6 @@ activate_quit (GSimpleAction *action, @@ -142,11 +142,6 @@ activate_quit (GSimpleAction *action,
GVariant *variant,
gpointer user_data);
void
activate_shortcuts (GSimpleAction *action,
GVariant *variant,
gpointer user_data);
void
activate_zoom_in (GSimpleAction *action,
GVariant *variant,
@ -491,6 +486,9 @@ DECLARE_SIMPLE ( @@ -491,6 +486,9 @@ DECLARE_SIMPLE (
DECLARE_SIMPLE (activate_insert_silence);
DECLARE_SIMPLE (activate_remove_range);
/* MIDI functions. */
DECLARE_SIMPLE (activate_midi_function);
/**
* @}
*/

16
inc/actions/arranger_selections.h

@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
#include <stdint.h>
#include "actions/undoable_action.h"
#include "audio/midi_function.h"
#include "audio/position.h"
#include "audio/quantize_options.h"
#include "gui/backend/automation_selections.h"
@ -125,6 +126,9 @@ typedef enum ArrangerSelectionsActionEditType @@ -125,6 +126,9 @@ typedef enum ArrangerSelectionsActionEditType
* AutomationPoint values.
* (this is handled by EDIT_PRIMITIVE) */
//ARRANGER_SELECTIONS_ACTION_EDIT_RAMP,
/** MIDI function. */
ARRANGER_SELECTIONS_ACTION_EDIT_MIDI_FUNCTION,
} ArrangerSelectionsActionEditType;
static const cyaml_strval_t
@ -142,6 +146,8 @@ arranger_selections_action_edit_type_strings[] = @@ -142,6 +146,8 @@ arranger_selections_action_edit_type_strings[] =
ARRANGER_SELECTIONS_ACTION_EDIT_FADES },
{ "Mute",
ARRANGER_SELECTIONS_ACTION_EDIT_MUTE },
{ "MIDI function",
ARRANGER_SELECTIONS_ACTION_EDIT_MIDI_FUNCTION },
};
/**
@ -532,6 +538,16 @@ arranger_selections_action_new_edit ( @@ -532,6 +538,16 @@ arranger_selections_action_new_edit (
ArrangerSelectionsActionEditType type,
bool already_edited);
/**
* Wrapper over
* arranger_selections_action_new_edit() for MIDI
* functions.
*/
UndoableAction *
arranger_selections_action_new_edit_midi_function (
ArrangerSelections * sel_before,
MidiFunctionType midi_func_type);
/**
* Creates a new action for automation autofill.
*

3
inc/actions/channel_send_action.h

@ -53,6 +53,9 @@ static const cyaml_strval_t @@ -53,6 +53,9 @@ static const cyaml_strval_t
CHANNEL_SEND_ACTION_DISCONNECT },
};
/**
* Action for channel send changes.
*/
typedef struct ChannelSendAction
{
UndoableAction parent_instance;

88
inc/audio/midi_function.h

@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
/*
* Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
* Zrythm is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Zrythm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file
*
* MIDI functions.
*
* TODO move to a more appropriate directory.
*/
#ifndef __AUDIO_MIDI_FUNCTION_H__
#define __AUDIO_MIDI_FUNCTION_H__
#include "utils/yaml.h"
typedef struct ArrangerSelections ArrangerSelections;
/**
* @addtogroup audio
*
* @{
*/
typedef enum MidiFunctionType
{
MIDI_FUNCTION_CRESCENDO,
MIDI_FUNCTION_FLAM,
MIDI_FUNCTION_FLIP_HORIZONTAL,
MIDI_FUNCTION_FLIP_VERTICAL,
MIDI_FUNCTION_LEGATO,
MIDI_FUNCTION_PORTATO,
MIDI_FUNCTION_STACCATO,
MIDI_FUNCTION_STRUM,
} MidiFunctionType;
static const cyaml_strval_t
midi_function_type_strings[] =
{
{ __("Crescendo"), MIDI_FUNCTION_CRESCENDO },
{ __("Flam"), MIDI_FUNCTION_FLAM },
{ __("Flip H"), MIDI_FUNCTION_FLIP_HORIZONTAL },
{ __("Flip V"), MIDI_FUNCTION_FLIP_VERTICAL },
{ __("Legato"), MIDI_FUNCTION_LEGATO },
{ __("Portato"), MIDI_FUNCTION_PORTATO },
{ __("Staccato"), MIDI_FUNCTION_STACCATO },
{ __("Strum"), MIDI_FUNCTION_STRUM },
};
static inline const char *
midi_function_type_to_string (
MidiFunctionType type)
{
return midi_function_type_strings[type].str;
}
/**
* Applies the given action to the given selections.
*
* @param sel Selections to edit.
* @param type Function type.
*/
void
midi_function_apply (
ArrangerSelections * sel,
MidiFunctionType type);
/**
* @}
*/
#endif

2
inc/gui/backend/arranger_selections.h

@ -27,6 +27,8 @@ @@ -27,6 +27,8 @@
#ifndef __GUI_BACKEND_ARRANGER_SELECTIONS_H__
#define __GUI_BACKEND_ARRANGER_SELECTIONS_H__
#include <stdbool.h>
#include "utils/yaml.h"
typedef struct ArrangerObject ArrangerObject;

1
inc/gui/backend/event.h

@ -173,6 +173,7 @@ typedef enum EventType @@ -173,6 +173,7 @@ typedef enum EventType
ET_ENGINE_ACTIVATE_CHANGED,
ET_MIDI_BINDINGS_CHANGED,
ET_PORT_CONNECTION_CHANGED,
ET_MIDI_FUNCTION_APPLIED,
} EventType;
/**

17
inc/gui/widgets/button_with_menu.h

@ -60,7 +60,7 @@ typedef struct _ButtonWithMenuWidget @@ -60,7 +60,7 @@ typedef struct _ButtonWithMenuWidget
GtkMenuButton * menu_btn;
/** The menu to show when arrow is clicked. */
GtkMenu * menu;
//GtkMenu * menu;
} ButtonWithMenuWidget;
/**
@ -70,14 +70,29 @@ typedef struct _ButtonWithMenuWidget @@ -70,14 +70,29 @@ typedef struct _ButtonWithMenuWidget
/**
* This must only be called once to set up the
* widget.
*
* @param btn The main button.
* @param menu Optional GtkMenu to set for the
* arrow button.
* @param menu Optional GMenuModel to set for the
* arrow button.
*/
void
button_with_menu_widget_setup (
ButtonWithMenuWidget * self,
GtkButton * btn,
GtkMenu * menu,
GMenuModel * gmenu_model,
bool downward_arrow,
int height,
const char * btn_tooltip_text,
const char * menu_tooltip_text);
static inline GtkMenuButton *
button_with_menu_widget_get_menu_button (
ButtonWithMenuWidget * self)
{
return self->menu_btn;
}
#endif

14
inc/gui/widgets/editor_toolbar.h

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 Alexandros Theodotou <alex at zrythm dot org>
* Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
*
* This file is part of Zrythm
*
@ -41,6 +41,8 @@ typedef struct _ToolboxWidget ToolboxWidget; @@ -41,6 +41,8 @@ typedef struct _ToolboxWidget ToolboxWidget;
typedef struct _QuantizeMbWidget QuantizeMbWidget;
typedef struct _QuantizeBoxWidget QuantizeBoxWidget;
typedef struct _SnapGridWidget SnapGridWidget;
typedef struct _ButtonWithMenuWidget
ButtonWithMenuWidget;
/**
* The PianoRoll toolbar in the top.
@ -52,8 +54,18 @@ typedef struct _EditorToolbarWidget @@ -52,8 +54,18 @@ typedef struct _EditorToolbarWidget
SnapGridWidget * snap_grid_midi;
QuantizeBoxWidget * quantize_box;
GtkToolButton * event_viewer_toggle;
ButtonWithMenuWidget * functions_btn;
GtkButton * apply_function_btn;
GMenuModel * midi_functions_menu;
} EditorToolbarWidget;
/**
* Refreshes relevant widgets.
*/
void
editor_toolbar_widget_refresh (
EditorToolbarWidget * self);
void
editor_toolbar_widget_setup (
EditorToolbarWidget * self);

11
inc/utils/gtk.h

@ -218,20 +218,23 @@ z_gtk_button_set_icon_name ( @@ -218,20 +218,23 @@ z_gtk_button_set_icon_name (
* Creates a button with the given icon name.
*/
GtkButton *
z_gtk_button_new_with_icon (const char * name);
z_gtk_button_new_with_icon (
const char * name);
/**
* Creates a toggle button with the given icon name.
*/
GtkToggleButton *
z_gtk_toggle_button_new_with_icon (const char * name);
z_gtk_toggle_button_new_with_icon (
const char * name);
/**
* Creates a button with the given resource name as icon.
*/
GtkButton *
z_gtk_button_new_with_resource (IconType icon_type,
const char * name);
z_gtk_button_new_with_resource (
IconType icon_type,
const char * name);
/**
* Creates a toggle button with the given resource name as

2
inc/utils/ui.h

@ -341,7 +341,7 @@ ui_set_pointer_cursor ( @@ -341,7 +341,7 @@ ui_set_pointer_cursor (
#define ui_set_cut_clip_cursor(widget) \
ui_set_cursor_from_icon_name ( \
GTK_WIDGET (widget), \
"cutter", 9, 6);
"cut-tool", 9, 6);
#define ui_set_eraser_cursor(widget) \
ui_set_cursor_from_icon_name ( \

8
resources/ui/shortcuts.ui → resources/gtk/help-overlay.ui

@ -1,9 +1,7 @@ @@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<!--
Copyright (C) 2019 Alexandros Theodotou <alex at zrythm dot org>
Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
This file is part of Zrythm
@ -21,8 +19,9 @@ @@ -21,8 +19,9 @@
along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
<object class="GtkShortcutsWindow" id="shortcuts-builder">
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
@ -315,4 +314,3 @@ @@ -315,4 +314,3 @@
</object>
</interface>

51
resources/gtk/menus.ui

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
This file is part of Zrythm
Zrythm is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zrythm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
<menu id="app-menu">
<item>
<attribute name="label">Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
</menu>
<menu id="menubar">
<section>
<item>
<attribute name="label">Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
</section>
<section>
<item>
<attribute name="label">Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
</interface>

15
resources/meson.build

@ -15,11 +15,22 @@ @@ -15,11 +15,22 @@
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
# gen resources XML
resource_files = files ([
'gtk/help-overlay.ui',
'gtk/menus.ui',
])
subdir ('ui')
zrythm_gresources_xml = configure_file (
output: 'zrythm.gresources.xml',
input: gen_gtk_resources_xml_wrap,
input: [
gen_gtk_resources_xml_wrap,
resource_files,
],
command: [
'@INPUT@',
'@INPUT0@',
meson.current_source_dir(),
'@OUTPUT@'
])

103
resources/ui/editor_toolbar.ui

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.1 -->
<!--
Copyright (C) 2019 Alexandros Theodotou <alex at zrythm dot org>
Copyright (C) 2019-2020 Alexandros Theodotou <alex at zrythm dot org>
This file is part of Zrythm
@ -23,6 +23,10 @@ @@ -23,6 +23,10 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="EditorToolbarWidget" parent="GtkToolbar">
<style>
<class name="arranger-toolbar" />
<class name="editor-toolbar" />
</style>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -35,29 +39,26 @@ @@ -35,29 +39,26 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
<child>
<object class="GtkBox">
<property name="visible">1</property>
<child>
<object class="GtkLabel">
<property name="visible">1</property>
<property name="label" translatable="yes">Highlight</property>
<property name="margin-start">3</property>
<property name="margin-end">3</property>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="chord_highlighting">
<property name="visible">1</property>
<property name="active-id">highlight_both</property>
<items>
<item translatable="yes" id="highlight_none">None</item>
<item translatable="yes" id="highlight_chord">Chord</item>
<item translatable="yes" id="highlight_scale">Scale</item>
<item translatable="yes" id="highlight_both">Both</item>
<item translatable="yes" id="highlight_none">No Highlight</item>
<item translatable="yes" id="highlight_chord">Highlight Chord</item>
<item translatable="yes" id="highlight_scale">Highlight Scale</item>
<item translatable="yes" id="highlight_both">Highlight Both</item>
</items>
</object>
</child>
@ -69,6 +70,11 @@ @@ -69,6 +70,11 @@
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
@ -80,6 +86,22 @@ @@ -80,6 +86,22 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkToolItem">
<property name="visible">True</property>
<child>
<object class="ButtonWithMenuWidget"
id="functions_btn">
<property name="visible">True</property>
</object>
</child>
</object>
</child>
<!-- extra space so we can add widgets at the
end -->
<child>
@ -104,4 +126,59 @@ @@ -104,4 +126,59 @@
</object>
</child>
</template>
<menu id="midi_functions_menu">
<section>
<item>
<attribute name="label" translatable="yes">Crescendo</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">crescendo</attribute>
<attribute name="icon">dynamics-crescendo</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Flam</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">flam</attribute>
<attribute name="icon">drum-flam</attribute>
</item>
<submenu>
<attribute name="label" translatable="yes">Flip</attribute>
<item>
<attribute name="label" translatable="yes">Horizontal</attribute>
<attribute name="icon">object-flip-horizontal</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">flip-horizontal</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Vertical</attribute>
<attribute name="icon">object-flip-vertical</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">flip-vertical</attribute>
</item>
</submenu>
<item>
<attribute name="label" translatable="yes">Legato</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">legato</attribute>
<attribute name="icon">articulation-legato</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Portato</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">portato</attribute>
<attribute name="icon">articulation-portato</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Staccato</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">staccato</attribute>
<attribute name="icon">articulation-staccato2</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Strum</attribute>
<attribute name="action">win.midi-function</attribute>
<attribute name="target">strum</attribute>
<attribute name="icon">strum</attribute>
</item>
</section>
</menu>
</interface>

2
resources/ui/help_toolbar.ui

@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
<object class="GtkToolButton" id="shortcuts">
<property name="visible">1</property>
<property name="icon-name">input-keyboard</property>
<property name="action-name">app.shortcuts</property>
<property name="action-name">win.show-help-overlay</property>
</object>
</child>
<child>

96
resources/ui/meson.build

@ -0,0 +1,96 @@ @@ -0,0 +1,96 @@
# Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
resource_files += files ([
'arranger_object_info_dialog.ui',
'audio_editor_space.ui',
'automatable_selector.ui',
'automation_editor_space.ui',
'automation_track.ui',
'bind_cc_dialog.ui',
'bot_bar.ui',
'bot_dock_edge.ui',
'bounce_dialog.ui',
'center_dock.ui',
'channel.ui',
'chord_editor_space.ui',
'chord_key.ui',
'chord_pad.ui',
'chord_selector_window.ui',
'clip_editor_inner.ui',
'clip_editor.ui',
'control_room.ui',
'create_project_dialog.ui',
'editor_toolbar.ui',
'event_viewer.ui',
'expander_box.ui',
'export_dialog.ui',
'export_midi_file_dialog.ui',
'export_progress_dialog.ui',
'fader_buttons.ui',
'fader_controls_grid.ui',
'file_browser.ui',
'first_run_assistant.ui',
'fishbowl_window.ui',
'header.ui',
'help_toolbar.ui',
'home_toolbar.ui',
'inspector_ap.ui',
'inspector_chord.ui',
'inspector_editor.ui',
'inspector_master.ui',
'inspector_midi.ui',
'inspector_plugin.ui',
'inspector_track.ui',
'left_dock_edge.ui',
'log_viewer.ui',
'main_window.ui',
'midi_controller_popover.ui',
'midi_editor_space.ui',
'mixer.ui',
'modulator_view.ui',
'panel_file_browser.ui',
'plugin_browser.ui',
'port_info_dialog.ui',
'port_selector_popover.ui',
'preferences.ui',
'project_assistant.ui',
'project_scale_popover.ui',
'project_toolbar.ui',
'quantize_box.ui',
'quantize_dialog.ui',
'range_action_buttons.ui',
'right_dock_edge.ui',
'route_target_selector.ui',
'scale_selector_window.ui',
'scripting_window.ui',
'snap_box.ui',
'snap_grid_popover.ui',
'splash.ui',
'string_entry_dialog.ui',
'timeline_bot_box.ui',
'timeline_panel.ui',
'timeline_toolbar.ui',
'toolbox.ui',
'top_bar.ui',
'track_lane.ui',
'tracklist_header.ui',
'track_top_grid.ui',
'track.ui',
'transport_controls.ui',
'view_toolbar.ui',
])

1
resources/ui/splash.ui

@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
<property name="decorated">False</property>
<property name="deletable">False</property>
<property name="icon_name">zrythm</property>
<property name="title" translatable="yes">Splash</property>
<child>
<placeholder/>
</child>

4
resources/ui/timeline_toolbar.ui

@ -23,6 +23,10 @@ @@ -23,6 +23,10 @@
<interface>
<requires lib="gtk+" version="3.20"/>
<template class="TimelineToolbarWidget" parent="GtkToolbar">
<style>
<class name="arranger-toolbar" />
<class name="timeline-toolbar" />
</style>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>

2
resources/ui/toolbox.ui

@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon-name">cutter</property>
<property name="icon-name">cut-tool</property>
</object>
</child>
</object>

6
scripts/gschema-gen.scm → scripts/gen-gschema.scm

@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
(add-to-load-path "@SCRIPTS_DIR@")
(define-module (gschema-gen)
(define-module (gen-gschema)
#:use-module (guile-utils)
#:use-module (ice-9 string-fun)
#:use-module (ice-9 format)
@ -461,6 +461,10 @@ Args: @@ -461,6 +461,10 @@ Args:
"tool" "select-normal"
"Selected editing tool"
"Selected editing tool.")
(make-schema-key
"midi-function" "i" "0"
"Last used MIDI function"
"Last used MIDI function (index corresponding to enum in midi function action).")
))) ;; ui
(schema-print

7
scripts/gen-gtk-resources-xml.scm

@ -148,9 +148,14 @@ Args: @@ -148,9 +148,14 @@ Args:
'("gnome-builder" "ext"
"fork-awesome" "font-awesome"))
;; add theme and close
;; insert standard gtk menus
;; (see GtkApplication docs)
(display
" </gresource>
<gresource prefix='/org/zrythm/Zrythm'>
<file preprocess='xml-stripblanks'>gtk/menus.ui</file>
<file preprocess='xml-stripblanks'>gtk/help-overlay.ui</file>
</gresource>
</gresources>"))))))
(apply main (program-arguments))

6
scripts/meson.build

@ -68,11 +68,11 @@ meson_post_install_wrap = configure_file ( @@ -68,11 +68,11 @@ meson_post_install_wrap = configure_file (
)
# create the gschema generator wrap
gschema_gen_wrap = configure_file (
output: 'gschema_gen_wrap.sh',
gen_gschema_wrap = configure_file (