<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>Control &#187; Topic: Interface Acting Strangely</title>
		<link>http://charlie-roberts.com/Control/forum/topic.php?id=11</link>
		<description>forum for discussing Control interface software</description>
		<language>en-US</language>
		<pubDate>Wed, 22 May 2013 20:41:38 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://charlie-roberts.com/Control/forum/rss.php?topic=11" rel="self" type="application/rss+xml" />

		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-45</link>
			<pubDate>Fri, 04 Feb 2011 16:47:37 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">45@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>The ontouchend works fine, the oninit doesn't still, but once the put those lines of code into my code, it deletes all the buttons except the one with the code in it. Not sure what the problem is exactly.
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-44</link>
			<pubDate>Fri, 04 Feb 2011 05:55:43 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">44@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Yeah, I think the ontouchend works fine but the oninit should actually be:</p>
<p>"oninit": "window.WIDGET_NAME.fillDiv.style.backgroundColor = '#f00';",</p>
<p>You can't use "this" in oninit at this point... I'm trying to think of a way to enable that so it's consistent across all event handlers, but for now you can refer to the widget by using window.theWidgetsNameGoesHere.
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-41</link>
			<pubDate>Thu, 03 Feb 2011 19:39:45 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">41@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Got it to upload, had an error in my code somewhere, but still had some issues with the colour(some of the buttons disappeared). I'll just wait until an update is finished for this to work, as it is not necessary for the interface to work.
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-40</link>
			<pubDate>Thu, 03 Feb 2011 17:17:35 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">40@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Thats fine if its not enabled yet. Its not required for my interface, just make it easier for people to use once i distribute it. The code you put in the post however, I added to my code, but it then wouldn't update. I'm not sure if there is an error or something, but it wasn't working for me.
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-39</link>
			<pubDate>Thu, 03 Feb 2011 03:26:58 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">39@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Yeah, I didn't really enable that yet. Hmmm... the best way I can think of is to put the following in each button:</p>
<p>"ontouchend": "this.fillDiv.style.backgroundColor = '#f00';",<br />
"oninit":            "this.fillDiv.style.backgroundColor = '#f00';",</p>
<p>The oninit ensures that the buttons will start at the right color, the ontouchend ensures that after you've lifted your finger it will revert to the correct color. </p>
<p>Unfortunately, I just tried this and although the ontouchend works, the oninit doesn't for some reason. I'll see if I can figure it out later on tonight but I'm skeptical it can be fixed without an update to the app. - Charlie
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-38</link>
			<pubDate>Thu, 03 Feb 2011 00:54:18 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">38@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Thanks!! Last change suggested works! Just need to set all the MIDI messages and I should be almost done. I will definitely share the entire project once its done, as this can be very beneficial.</p>
<p>One question. Is it possible to change the colour of a button before it is pressed. As of now all my defaults are black, and I can't seem to find something on your guide to change that.
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-37</link>
			<pubDate>Thu, 03 Feb 2011 00:49:04 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">37@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Most of this confusion is my fault for not making it clear that best practice is to start new projects using the template interface:</p>
<p><a href="http://charlie-roberts.com/Control/interfaces/template.js" rel="nofollow">http://charlie-roberts.com/Control/interfaces/template.js</a></p>
<p>I've changed the Creating Interfaces (Intro) page to emphasize this information. I'll try to do a video on interface construction some time soon as well. Thanks for bearing with it!
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-36</link>
			<pubDate>Thu, 03 Feb 2011 00:43:10 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">36@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Ahhh, OK, got it. So you've defined a min and a max for the button, but those values only work for OSC. midiMin and midiMax specify the range of values if you have a MIDI destination selected. So, the value is being set to 127 (the default midiMax) and the script is never triggering.</p>
<p>Change the ontouchstart to the following and you should be fine (it worked for me when I tested it):</p>
<p>"ontouchstart": "if(this.value == this.max) { control.showToolbar();} else { control.hideToolbar(); }",</p>
<p>PS - when you finish the project I'd love to know what this is for if you're able to share... thanks!
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-35</link>
			<pubDate>Thu, 03 Feb 2011 00:16:22 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">35@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Thanks for the tip. "isLocal":true worked and it has stopped sending the MIDI message, but the menu is still not appearing. It appears fine when I am not connected to a computer, but once i connect, the menu no longer appears. Still unsure of why this is. Here is the code for it(updated)</p>
<pre><code>{
    &#34;name&#34;: &#34;tabButton&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .571,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;isLocal&#34;: true,
    &#34;mode&#34;: &#34;toggle&#34;,
    &#34;color&#34;: &#34;#333333&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;min&#34;: 0,
    &#34;max&#34;: 1,
    &#34;ontouchstart&#34;: &#34;if(this.value == 1) { control.showToolbar();} else { control.hideToolbar(); }&#34;,

},
{
    &#34;name&#34;: &#34;tabButtonLabel&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .571,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#fff&#34;,
    &#34;value&#34;: &#34;menu&#34;,
    &#34;isLocal&#34;: true,
},</code></pre>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-34</link>
			<pubDate>Thu, 03 Feb 2011 00:06:28 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">34@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>add a "isLocal":true to the button. That should stop it from outputting. You might also want to remove the:</p>
<p>tabLabel.changeValue(\'Hide Tabs\');</p>
<p>and </p>
<p>tabLabel.changeValue(\'Show Tabs\');</p>
<p>...since that's not actually happening; there's no widget named tabLabel.
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-33</link>
			<pubDate>Wed, 02 Feb 2011 22:56:09 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">33@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Disregard previous post. I figured that part out. However, the menu button is still not responding, and is instead sending a control message, channel 1 Bank Select 127. Any reason why this would be occurring?
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-32</link>
			<pubDate>Wed, 02 Feb 2011 22:50:33 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">32@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Thanks. One thing I'm not understanding however. I need to send exact parameter numbers, ex, button 1 will be 1, button 2 will be 2. All of these will be sending under control change 90. Where do I set the value for these? Is this in the midiMin and midiMax or somewhere else?
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-31</link>
			<pubDate>Wed, 02 Feb 2011 22:41:42 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">31@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>I honestly think it's getting screwed up by trying to send impossible channel numbers.</p>
<p>Use:</p>
<p>"midiType": "cc",<br />
"channel": 1,<br />
"midiNumber": 85, // substitute 85 - 92 here</p>
<p>Also don't set midiMin or midiMax values... they will default to 0 - 127. If you set them to 0 and 1 those are the only two numbers that will be sent.
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-30</link>
			<pubDate>Wed, 02 Feb 2011 22:30:25 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">30@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>The refresh button will help. I will add it in.</p>
<p>As for the MIDI messages I need to send, I will (when this is complete) be sending these to a lighting board, and each MIDI message actives a macro on the board. Basically this allows me to control the entire lighting system from an iPhone. </p>
<p>To activate the macros, I need to send a control change (between 85 and 92) with a parameter between 0-127. The final version will be using Control Change 90. The numbers for parameters will be different based on what macro is needs to activate.</p>
<p>Please tell me if this is possible and how I can go about coding it to get it to work.</p>
<p>Also, do you know why the menu button stops working when I connect it to my mac and to MIDI Monitor?
</p>]]></description>
					</item>
		<item>
			<title>admin on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-29</link>
			<pubDate>Wed, 02 Feb 2011 22:15:50 +0000</pubDate>
			<dc:creator>admin</dc:creator>
			<guid isPermaLink="false">29@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>Hi Joey,</p>
<p>MIDI channels range from 1 - 16. Just change all your channels to be 1 and you should be fine. Actually, you might also want to change the midiNumber so that each button sends a different cc message; right now they're all sending cc 49 so you won't be able to tell them apart.</p>
<p>Finally, I would add a refresh button to your code while you're testing it...</p>
<p>{<br />
    "name": "refresh",<br />
    "type": "Button",<br />
    "x": .6, "y": .9,<br />
    "width": .2, "height": .1,<br />
    "startingValue": 0,<br />
    "isLocal": true,<br />
    "mode": "contact",<br />
    "ontouchstart": "interfaceManager.refreshInterface()",<br />
    "stroke": "#aaa",<br />
},<br />
{<br />
    "name": "refreshLabel",<br />
    "type": "Label",<br />
    "x": .6, "y": .9,<br />
    "width": .2, "height": .1,<br />
    "isLocal": true,<br />
    "value": "refresh",<br />
},</p>
<p>That way you can just make changes on your server and hit refresh to see them instead of having to constantly add new interfaces.</p>
<p>Hope this helps... - Charlie
</p>]]></description>
					</item>
		<item>
			<title>joey_fergie on "Interface Acting Strangely"</title>
			<link>http://charlie-roberts.com/Control/forum/topic.php?id=11#post-28</link>
			<pubDate>Wed, 02 Feb 2011 20:54:20 +0000</pubDate>
			<dc:creator>joey_fergie</dc:creator>
			<guid isPermaLink="false">28@http://charlie-roberts.com/Control/forum/</guid>
			<description><![CDATA[<p>I am working on an interface that will send MIDI signals to a computer, which will then send those to another device. As I am still testing, I have the signals being sent to MIDI Monitor (for OSX) to make sure it is working correctly. Currently I have 6 buttons (all set right now to send the same MIDI message, but that will change in the future) and a menu button. Here is the code:</p>
<pre><code>loadedInterfaceName = &#34;TA Lights&#34;;

interfaceOrientation = &#34;portrait&#34;;

infoText = &#34;Interface for Theatre Aurora Light Desingers and Operators to control and program lights remotely.&#34;;

pages = [[
{
    &#34;name&#34;: &#34;b1&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .005,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b1Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .005,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;1&#34;,
    &#34;align&#34;: &#34;center&#34;
},

{
    &#34;name&#34;: &#34;b2&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .17,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b2Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .17,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;2&#34;,
    &#34;align&#34;: &#34;center&#34;
},
{
    &#34;name&#34;: &#34;b3&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .335,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b3Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .335,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;3&#34;,
    &#34;align&#34;: &#34;center&#34;
},
{
    &#34;name&#34;: &#34;b4&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .5,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b4Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .5,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;4&#34;,
    &#34;align&#34;: &#34;center&#34;
},
{
    &#34;name&#34;: &#34;b5&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .665,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b5Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .665,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;5&#34;,
    &#34;align&#34;: &#34;center&#34;
},
{
    &#34;name&#34;: &#34;b6&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#00aaaa&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;midiMin&#34;: 0,
    &#34;midiMax&#34;: 1,
    &#34;mode&#34;: &#34;momentary&#34;,
    &#34;midiType&#34;: &#34;cc&#34;,
    &#34;channel&#34;: 90,
    &#34;midiNumber&#34;: 49,
    &#34;requiresTouchDown&#34;: true,
    &#34;ontouchstart&#34;: &#34;&#34;
},
{
    &#34;name&#34;: &#34;b6Label&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .003,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;value&#34;: &#34;6&#34;,
    &#34;align&#34;: &#34;center&#34;
},

{
    &#34;name&#34;: &#34;tabButton&#34;,
    &#34;type&#34;: &#34;Button&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .571,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;mode&#34;: &#34;toggle&#34;,
    &#34;color&#34;: &#34;#333333&#34;,
    &#34;stroke&#34;: &#34;#aaaaaa&#34;,
    &#34;min&#34;: 0,
    &#34;max&#34;: 1,
    &#34;ontouchstart&#34;: &#34;if(this.value == 1) { control.showToolbar(); tabLabel.changeValue(\&#39;Hide Tabs\&#39;);} else { control.hideToolbar(); tabLabel.changeValue(\&#39;Show Tabs\&#39;); }&#34;,
},
{
    &#34;name&#34;: &#34;tabButtonLabel&#34;,
    &#34;type&#34;: &#34;Label&#34;,
    &#34;x&#34;: .83,
    &#34;y&#34;: .571,
    &#34;width&#34;: .165,
    &#34;height&#34;: .142,
    &#34;color&#34;: &#34;#fff&#34;,
    &#34;value&#34;: &#34;menu&#34;,
},

],

];</code></pre>
<p>The code can also be downloaded from <a href="http://theatreaurora.vicmetcalfe.com/talights.js" rel="nofollow">http://theatreaurora.vicmetcalfe.com/talights.js</a></p>
<p>Here is the problem. The six buttons are not transmitting a MIDI signal to my computer(should be a control change message), but the Menu button ends up sending a Control, chan 1, num 127 signal, and stops bringing the menu up.</p>
<p>Any suggests?
</p>]]></description>
					</item>

	</channel>
</rss>
