{"id":1991,"date":"2018-05-08T22:03:31","date_gmt":"2018-05-08T13:03:31","guid":{"rendered":"https:\/\/www.utsbox.com\/?p=1991"},"modified":"2018-07-04T23:12:00","modified_gmt":"2018-07-04T14:12:00","slug":"%e3%82%b3%e3%83%b3%e3%83%88%e3%83%ad%e3%83%bc%e3%83%ab%e5%80%a4%e3%82%92%e6%95%b0%e5%ad%97%e3%81%a7%e8%a1%a8%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/www.utsbox.com\/?p=1991","title":{"rendered":"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u5024\u3092\u6570\u5b57\u3067\u8868\u793a"},"content":{"rendered":"<h1>VST GUI\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u5024\u3092\u6570\u5b57\u3067\u8868\u793a\u3059\u308b<\/h1>\n<p>VST GUI\u3092\u4f5c\u6210\u3059\u308b\u3046\u3048\u3067\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u5024\u3092\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.utsbox.com\/wp-content\/uploads\/2018\/05\/displayvalue_gif.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.utsbox.com\/wp-content\/uploads\/2018\/05\/displayvalue_gif.gif\" alt=\"\" width=\"240\" height=\"160\" class=\"alignnone size-full wp-image-2000\" \/><\/a><\/p>\n<p>\u306a\u304a\u3001VST GUI\u306e\u57fa\u672c\u7684\u306a\u4f5c\u6210\u65b9\u6cd5\u3068\u3057\u3066\u4e0b\u8a18\u3092\u3054\u7406\u89e3\u3044\u305f\u3060\u3044\u3066\u3044\u308b\u524d\u63d0\u3067\u9032\u3081\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.utsbox.com\/?p=1186\">\u6700\u5c0f\u69cb\u6210\u306eVST GUI<\/a><\/li>\n<li><a href=\"https:\/\/www.utsbox.com\/?p=1230\">\u3064\u307e\u307f(\u30ce\u30d6)\u7b49\u306e\u5b9f\u88c5\u65b9\u6cd5<\/a><\/li>\n<li><a href=\"https:\/\/www.utsbox.com\/?p=1550\">\u3064\u307e\u307f(\u30ce\u30d6)\u306e\u5b9f\u88c5<\/a><\/li>\n<li><a href=\"https:\/\/www.utsbox.com\/?p=1688\">\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u306e\u5b9f\u88c5<\/a><\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u3053\u3061\u3089\u306eTips\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b\u5404\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f5c\u6210\u3059\u308b\u95a2\u6570\u3082\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.utsbox.com\/?page_id=1316#TIPS\u3001\u4e00\u89a7\u8868\u3001\u305d\u306e\u4ed6\">\u306f\u3058\u3081\u3066\u306eVST3\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u308a &#8211; TIPS\u3001\u4e00\u89a7\u8868\u3001\u305d\u306e\u4ed6<\/a><\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>\u307e\u305a\u3001VST GUI\u30af\u30e9\u30b9\u306eopen()\u95a2\u6570\u5185\u3067\u5404\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002(\u53c2\u8003\uff1a\u300c<a href=\"https:\/\/www.utsbox.com\/?p=1550\">\u3064\u307e\u307f(\u30ce\u30d6)\u306e\u5b9f\u88c5<\/a>\u300d\u300c<a href=\"https:\/\/www.utsbox.com\/?p=1688\">\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u306e\u5b9f\u88c5<\/a>\u300d)<br \/>\n\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u4f5c\u6210\u6642\u306b\u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u3042\u3089\u304b\u3058\u3081\u5b9a\u7fa9\u3057\u305f\u30e1\u30f3\u30d0\u30fc\u5909\u6570\u306b\u4fdd\u5b58\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u30e1\u30f3\u30d0\u30fc\u5909\u6570\u306f\u3042\u3089\u304b\u3058\u3081\u5b9a\u7fa9\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3010guieditor.h\u3011<br \/>\n[crayon mark=&#8221;4-5&#8243;]<br \/>\nclass MyVSTGUIEditor : public VSTGUIEditor, public IControlListener<br \/>\n{<br \/>\nprotected:<br \/>\n\tCControl* control1;<br \/>\n\tCControl* control2;<\/p>\n<p>public:<br \/>\n\t\uff5e\uff5e \u4e2d\u7565 \uff5e\uff5e<br \/>\n}<br \/>\n[\/crayon]<br \/>\n\u3010guieditor.cpp\u3011<br \/>\n[crayon mark=&#8221;9-10&#8243;]<br \/>\nbool PLUGIN_API MyVSTGUIEditor::open(void* parent, const PlatformType&#038; platformType)<br \/>\n{<br \/>\n\t\/\/ GUI\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u304b\u308c\u305f\u3068\u304d\u306b\u3001UI\u3092\u4f5c\u6210\u3059\u308b<\/p>\n<p>\t\uff5e\uff5e \u4e2d\u7565 \uff5e\uff5e<\/p>\n<p>\t\/\/\u3000&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\t\/\/ \u3053\u3053\u304b\u3089\u5404\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u4f5c\u6210<br \/>\n\tcontrol1 = createKnob(1, 10, 60);<br \/>\n\tcontrol2 = createTextLabel(1, 50, 10);<\/p>\n<p>\t\uff5e\uff5e \u4e2d\u7565 \uff5e\uff5e<\/p>\n<p>\t\/\/ GUI\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30aa\u30fc\u30d7\u30f3\u306b\u6210\u529f\u3057\u305f\u5834\u5408\u306ftrue\u3092\u8fd4\u3059<br \/>\n\treturn true;<br \/>\n}<br \/>\n[\/crayon]<\/p>\n<p>\u3064\u3065\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u64cd\u4f5c\u3057\u305f\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u308bvalueChanged()\u95a2\u6570\u3067\u5024\u3092\u66f4\u65b0\u3059\u308b\u305f\u3081\u306e\u51e6\u7406\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<p>\u3010guieditor.cpp\u3011<br \/>\n[crayon mark=&#8221;15-31&#8243;]<br \/>\nvoid MyVSTGUIEditor::valueChanged(CControl* pControl)<br \/>\n{<br \/>\n\t\/\/ \u3069\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u64cd\u4f5c\u3055\u308c\u305f\u304b\u3092\u53d6\u5f97\u3059\u308b\u3002<br \/>\n\tint32 index = pControl->getTag();<\/p>\n<p>\t\/\/ \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u3002<br \/>\n\tfloat value = pControl->getValueNormalized();<\/p>\n<p>\t\/\/ \u53d6\u5f97\u3057\u305f\u5024\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u53cd\u6620\u3055\u305b\u308b<br \/>\n\tcontroller->setParamNormalized(index, value);<\/p>\n<p>\t\/\/ \u97f3\u58f0\u51e6\u7406\u30af\u30e9\u30b9\u306b\u53cd\u6620\u3057\u305f\u5024\u3092\u901a\u77e5\u3059\u308b<br \/>\n\tcontroller->performEdit(index, value);<\/p>\n<p>\t\/\/ \u5024\u3092\u8868\u793a\u3057\u305f\u3044\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u64cd\u4f5c\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d<br \/>\n\tif (pControl == control1)<br \/>\n\t{<br \/>\n\t\t\/\/ \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304b\u3089\u6587\u5b57\u5217\u3092\u53d6\u5f97<br \/>\n\t\tString128 tmp;<br \/>\n\t\tcontroller->getParamStringByValue(index, value, tmp);<\/p>\n<p>\t\t\/\/ \u53d6\u5f97\u3057\u305f\u6587\u5b57\u5217\u306fUNICODE\u306a\u306e\u3067UTF8\u306b\u5909\u63db<br \/>\n\t\tchar text[256];<br \/>\n\t\twcstombs(text, tmp, 128);<\/p>\n<p>\t\t\/\/ \u53d6\u5f97\u3057\u305f\u6587\u5b57\u5217\u3092\u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u306b\u8a2d\u5b9a<br \/>\n\t\t((CTextLabel*)control2)->setText(text);<\/p>\n<p>\t\t\/\/ \u30c6\u30ad\u30b9\u30c8\u30e9\u30d9\u30eb\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u518d\u63cf\u753b\u3059\u308b<br \/>\n\t\tcontrol2->setDirty();<br \/>\n\t}<br \/>\n}<\/p>\n<p>[\/crayon]<br \/>\n\u5024\u3092\u8868\u793a\u3055\u305b\u305f\u3044\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u64cd\u4f5c\u3055\u308c\u305f\u5834\u5408\u306b\u6587\u5b57\u5217\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304b\u3089\u53d6\u5f97\u3057\u307e\u3059\u3002(\u4eca\u56de\u306e\u5834\u5408\u3001\u3064\u307e\u307f(\u30ce\u30d6)\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u5834\u5408)<br \/>\n\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304b\u3089\u53d6\u5f97\u3057\u305f\u6587\u5b57\u5217\u306fUNICODE\u306a\u306e\u3067UTF8\u306b\u5909\u63db\u3057\u307e\u3059\u3002<br \/>\n\u5909\u63db\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30c3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u8a2d\u5b9a\u3057\u3001\u753b\u50cf\u3092\u66f4\u65b0\u3059\u308b\u305f\u3081\u306esetDirty()\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u5024\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u4ee5\u5916\u306b\u3082VST3.6\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u304c\u3042\u308a\u307e\u3059\u3002\u4e0b\u8a18\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.utsbox.com\/?page_id=1316\">\u306f\u3058\u3081\u3066\u306eVST3\u30d7\u30e9\u30b0\u30a4\u30f3\u4f5c\u308a<\/a><\/li>\n<\/ul>\n<p>\u307e\u305f\u3001\u8cea\u554f\u3084\u3054\u6307\u6458\u306f\u30b3\u30e1\u30f3\u30c8\u6b04\u3084<a href=\"https:\/\/jbbs.shitaraba.net\/computer\/42917\/\" title=\"\u63b2\u793a\u677f\" target=\"_blank\" rel=\"noopener\">\u63b2\u793a\u677f<\/a>\u3001<a href=\"https:\/\/twitter.com\/vstcpp\">Twitter<\/a>\u3067\u3044\u305f\u3060\u3051\u3070\u3068\u304a\u3082\u3044\u307e\u3059\u3002<\/p>\n<p>\u25a0<a href=\"https:\/\/jbbs.shitaraba.net\/computer\/42917\/\" title=\"\u63b2\u793a\u677f\" target=\"_blank\" rel=\"noopener\">\u63b2\u793a\u677f<\/a><br \/>\n\u25a0Twitter\u30a2\u30ab\u30a6\u30f3\u30c8\uff1a@vstcpp\u3000\u3000\u3000URL\uff1a<a href=\"https:\/\/twitter.com\/vstcpp\">https:\/\/twitter.com\/vstcpp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VST GUI\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u5024\u3092\u6570\u5b57\u3067\u8868\u793a\u3059\u308b VST GUI\u3092\u4f5c\u6210\u3059\u308b\u3046\u3048\u3067\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u5024\u3092\u8868\u793a\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002 \u306a\u304a\u3001VST GUI\u306e\u57fa\u672c\u7684\u306a\u4f5c\u6210\u65b9\u6cd5\u3068\u3057\u3066\u4e0b\u8a18\u3092\u3054\u7406\u89e3\u3044 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[17],"tags":[],"class_list":["post-1991","post","type-post","status-publish","format-standard","hentry","category-vst3"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p5fXUX-w7","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/posts\/1991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1991"}],"version-history":[{"count":11,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/posts\/1991\/revisions"}],"predecessor-version":[{"id":2278,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=\/wp\/v2\/posts\/1991\/revisions\/2278"}],"wp:attachment":[{"href":"https:\/\/www.utsbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.utsbox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}