<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Simple condition?]]></title><description><![CDATA[<p>Hi,<br />
I'm having a problem making a logical part of a patch which should output 0 or 1 depending on the keys I pressed on MIDI keyboard. For example, if I press only one key, output 0 and midi number of the key. If I press 2 keys at the same time, output 1 and midi number of the lower key.<br />
Any help is welcome.</p>
<p>sinewave</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 22:22:02 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/4761.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 19 Feb 2011 18:20:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Simple condition? on Sat, 19 Feb 2011 18:20:47 GMT]]></title><description><![CDATA[<p>Hi,<br />
I'm having a problem making a logical part of a patch which should output 0 or 1 depending on the keys I pressed on MIDI keyboard. For example, if I press only one key, output 0 and midi number of the key. If I press 2 keys at the same time, output 1 and midi number of the lower key.<br />
Any help is welcome.</p>
<p>sinewave</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Sat, 19 Feb 2011 18:20:47 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sat, 19 Feb 2011 18:31:11 GMT]]></title><description><![CDATA[<p>any 2 keys, or 2 particular keys ??</p>
<p>my first impulse would be to use [select]...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/2</guid><dc:creator><![CDATA[JesseScott]]></dc:creator><pubDate>Sat, 19 Feb 2011 18:31:11 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sat, 19 Feb 2011 19:00:05 GMT]]></title><description><![CDATA[<p>any two keys. I need some object which &quot;knows&quot; whether I pressed two or just one key at the time. And if 2 keys are pressed, the object should be able to compare them and choose the lower one.<br />
Thank you for the response, anyway.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/3</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Sat, 19 Feb 2011 19:00:05 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sat, 19 Feb 2011 19:30:17 GMT]]></title><description><![CDATA[<p>i would still use [select]... you'll just have to make one with every midi cc option...<br />
and then use an [expr] to determine which is lowest... not that hard, just tedious.</p>
<p>but maybe someone knows a better way...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/4</guid><dc:creator><![CDATA[JesseScott]]></dc:creator><pubDate>Sat, 19 Feb 2011 19:30:17 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sat, 19 Feb 2011 23:06:01 GMT]]></title><description><![CDATA[<p>i'm pretty sure, this could be done easier - but i'm too tired. nevertheless it seems to work, at least i hope so. i used [poly] to get the values of two key at once and then determined, if they both are pressed with [&amp;&amp;], comparing if both velocity values are greater then 0. with [list-minmax] i determined the lowest key value.<br />
hope this could help.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/poly_lowest_key.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/poly_lowest_key.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/5</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Sat, 19 Feb 2011 23:06:01 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sun, 20 Feb 2011 12:41:07 GMT]]></title><description><![CDATA[<p>toxonic, thank you for the solution, it does exactly what I've asked for in my post. But I should have been more precise in describing what I'm aiming for. I forgot to mention that I need something which will &quot;hold&quot; the previous true/false state until I press next key(s), which gives opposite result. Since your example gives true/false state depending on the note off message, it simply doesn't work for me.<br />
Do you remember old cheap Casio keyboards and their &quot;fingered&quot; function? Instead of playing chords with three or more fingers, they offered a possibility to play them with just one or two fingers. One note gives major chord, two notes gives minor etc. When you release the key, it keeps playing the last chord until you press something else.<br />
I'm building a patch which will be controlled by the theremin's pitch antenna, that means, theremin will glide in two or three octaves range, triggering the &quot;right&quot; notes only. Something like <a href="http://en.wikipedia.org/wiki/Autoharp" rel="nofollow">autoharp</a> strummed with theremin. I tried it and it sounds promising, and that's why I am so persistant. If I do not succeed in &quot;fingered&quot; style, I will turn to classic &quot;multi fingered&quot; approach.<br />
thank you all for your help<br />
sinewave</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/6</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Sun, 20 Feb 2011 12:41:07 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Sun, 20 Feb 2011 23:07:37 GMT]]></title><description><![CDATA[<p>ok, i never owned such a device, but i was tinkering around a bit and built the attached patch, witch is nearly as confusing as the last one.... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /><br />
if you hit a single note on your keyboard, it will play a major chord, if you hit two keys, it will play a minor chord based on the lowest key.<br />
is this what you wanted?</p>
<p>edit: if you want the theremins values as basic pitch to build a minor or major chord upon (depending on if you hit a note on your keyboard), this would be much easier.</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/finger-chords.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/finger-chords.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/7</guid><dc:creator><![CDATA[toxonic]]></dc:creator><pubDate>Sun, 20 Feb 2011 23:07:37 GMT</pubDate></item><item><title><![CDATA[Reply to Simple condition? on Mon, 21 Feb 2011 00:47:57 GMT]]></title><description><![CDATA[<p>Thank you, toxonic!</p>
<p>This is exactly what I needed for &quot;fingered&quot; chords. Yes, it is confusing <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /> it may take some time before I understand it. But for now, I will just paste it into my autoharp patch.<br />
I really appreciate your help, it must have been time consuming for you. I'll let you know when I finish the patch...<br />
sinewave</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4761/simple-condition/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4761/simple-condition/8</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Mon, 21 Feb 2011 00:47:57 GMT</pubDate></item></channel></rss>