How to use MidiMate1 mute
-
Hello teachers? You can switch interfaces now, but you haven't used the mute yet. How to use MidiMate
HiseSnippet 1683.3oc6Z0saSbDEd23rgXGHsAwE8hVoUnJHQPC1NgejRQr37Cxp3DSb.UDhhlrdr8nrdlUyNaHAJp8h9HzdaeDp5E7.fTutOD8MfdY6Mzyr+3cVGm+rBTnc2a7dNy4Lmu4LybNeqjqyY1XOOFWSO+F65h0zOsQicohNK1AQnZUWRSeRiZHOAlaFppxttHOObSMc8b2QpPO+nZAOu9VUPNHpMNQkl1CXDa7cIcIhDs0s9JhiyJnl3MHcUrddqp1L5hLGlOfmbFE0bQ1agZiWEIMaDCM8wVtIQv3MDHA1SSezJrl61nC6ozP6e.wiroCVJTRqALQgpWg4zThXoVsE6PbZVOdc6oooep5IYgbgYgyYTizjzSeR13iCFvLwC07g9HogWtTvqjJ7Jp.uA.IcEHMZHjlxngMm3JRFQhmILpRgMmVHHsqBkPa0FYpbFKx.KnhY6h1BuBGD54wz2nXwKadshEmYgBEfTumvbaD2b06W6IUt+Far1pMLuo4bKnLzl9BAH.peziU06hnXmX0EZw3lSS.ohKXRL+R0IDTboKMSgmWvDdhlsGQdLXaLLaiEKx55xnfvzmuhfVyWfOu4kfYbF.mR+Bi1A4VcoEocJIXy5IskJ3LmEQNNaBGxllQihTz.fSunPAB0gPwls7o1BBiZ1uUSaGGxKCoAGerbkk2gYibLIM2AfWTTmkPah2YsVIN.AHe9B46OUEtzl0ASaK5DkrjnOLgkZwOqGbxJFHAQ6lljnE6dWvOPBOYjtY.xtvEh.bn8uPtZ2ypKdFJ93KaJ3AFWnvUtxWb3OvYfjb1pLAdM5zA4FHNl8OTqVCbrHT3f4CbXYsC9A43zT+tah4p6LRCgKToukZr+2RUKhXGdPSwPFsJkHVyES2uRKZQmNg2te0kPBj7pcjNvNWLWPjPPeI71PcxvK54MVB6skf4Bk65cjFdWDL5jQkApDr2nQfa6ELh12JpsSupoe+8r1UUvCsMtJsNGCmEjEHD3cfeG2P5morFzwJ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F5mJ8cV0+rhAArp7eEW7TGVMoWne3qVllhA7J9NN6wFox9rqwV3mJk+oOcpYV3OmvJHlv5Rp64m6Wtye7reP18jS1DXWEbknJzglKBKQnc.KmBmbKmGZczVNOzJd4nxF3XrbpUe4v5C5K2q9PNs+QdKjox
-
@GUJIAN You need to get a reference to your midi muters.
Then you can use
midiMuter.setAttribute(midiMuter.ignoreButton, value);
-
@d-healey Can the teacher add the code above
-
@GUJIAN Here's an isolated example
HiseSnippet 825.3ocsV0saZCCE1AvUCZW2pzd.h3pTopJXqqaRUSixeSnMZQKcU6tNiiArHwFk3zUzTew1U6QZuAaGmDHgBpkh13BDGe96ye46bB87kTVPfzGYT7hoSXHicv1SEpQMFQ3BTmlHicwcIAJluY7Q0mNgDDvbPFF4+f9.ihEPQe986qSbIBJK8HD5RImx9D2iqROsWsOxccaSbXWv8xD8Q05PkhFRWYHfm73JnID5XxP1YDcX4vHisZ4vUReaEQwBfXpKclZOR9cQb7WxC38cYZipHanPwGiZLh65za1cM.gLJzK8lmO9l+BbWtCe94oLvyibXllQVNvH28AopOBHkKCjJDCo8v1Te9DUpGMd1F2Q.OPFP.pNKThiEk6mF3FRHBg5POxXVaevXdFVGWoxAlvW6eRoR.cGnLul3apugcCgXpZ9NyHEvgCYpEHDqxoAUVmcItvkKXlCBETEWJLkh5gJkTTU2deoqEU5MQJ.fb.zD2P19k9QohoU4v.l5Tkxm2GLsxbNenP5yhK1rTOozsPOmcw.v0XVwsJmz1x6qqXRyaPbc6C5Gq6hJnRYP7YRE6bgUDxJcaIy65ZvfU5KoVtL+U5VKr8uuDsDgd8Y9Y4EcfvS9EkSasdxIZLsjIPonifqNeBKwtsz0QKSz+dYwGJgWAYnQBBgPUQhvcSDgwrHhCEoHNgRQQvO6.O5KcZRTjYEBpIzmILeEWecLZxtFVHDqtKhaxBFqjShhM4gIv.qQauYdK+U+ZSmaT6a0PKOXuMdtzJZ9YmT6pKNKm+ezrbF5L2ZPm6hyJ3WAmtF03Y3A7arUgzwZYavJJxxqWfEaRmPWhZwsc505IN.M6BLjdMhHfqllcs+iXEXk6m1VSHtGtGWQGsZLlaEXT+b3+.FSzWOE2Zv.FUkBvB31ecSeKwCz9OKCUbwvtDXsILEfOKzyFdeIkAcWHXtPwwF4zZlX6JZaMCXyDNQF+A9j3rp11HwY0YNQdDpu7JZrnS+pomDcBfIQzahKB+k.v1bEi+dvj0UT5hkZoDe4ll3q1zDOZSS70aZhGuoI9lMMw29vIpW7cZnR5EO1fPc60JZcsgQKAATfQpUzeQzUN8E
-
@d-healey Teacher, I cannot combine these two examples together. If they are combined together, they will not work.
-
Content.makeFrontInterface(800, 600); const var NUM_BUTTONS = 3; const var buttons = []; const var panels = []; for (i = 0; i < NUM_BUTTONS; i++) { buttons[i] = Content.getComponent("BtnMute" + (i)); panels[i] = Content.getComponent("Panel" + (i)); buttons[i].setControlCallback(onBtnMuteControl); } inline function onBtnMuteControl(component, value) { local idx = buttons.indexOf(component); for (i = 0; i < panels.length; i++) { panels[i].showControl(idx == i); buttons[i].setValue(i == idx && value); } } onBtnMuteControl(buttons[0], true); //----------------------------------- const var MidiMuter1 = Synth.getMidiProcessor("MidiMuter1"); inline function onBtnMute0Control(component, value) { MidiMuter1.setAttribute(MidiMuter1.ignoreButton, value); }; Content.getComponent("BtnMute0").setControlCallback(onBtnMute0Control);
-
@d-healey The interface switching between MidiMate1 and Panel0 cannot use the BtnMute0, BtnMute1, and BtnMute2 buttons simultaneously.
-
@GUJIAN said in How to use MidiMate1 mute:
@d-healey Teacher, I cannot combine these two examples together. If they are combined together, they will not work.
You shouldn't try to combine them. The isolated example demonstrates how clicking a button can toggle the muter. You can take the principle and apply it to your project, using your existing button callbacks.