<?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[Mouse position to frequency]]></title><description><![CDATA[<p>Hello there!</p>
<p>I'm trying to create a theremin-like patch in pd which should be controlled with mouse. Y axis replaces the volume antenna and X axis replaces the pitch antenna. The first idea is to have four octaves range with equal distances (equal number of pixels) between each octave. For example:<br />
mouse = 0 ... 110 Hz<br />
mouse = 400 ... 220 Hz<br />
mouse = 800 ... 440 Hz<br />
mouse = 1200 ... 880 Hz<br />
mouse = 1600 ... 1760 Hz<br />
I'm stuck with scaling the x axis values, probably because I'm not good in mathematics. Any advice, link, or help will be well appreciated.<br />
Thank you!<br />
sinewave.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 17:50:17 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/3624.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Mar 2010 00:38:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mouse position to frequency on Fri, 05 Mar 2010 00:38:45 GMT]]></title><description><![CDATA[<p>Hello there!</p>
<p>I'm trying to create a theremin-like patch in pd which should be controlled with mouse. Y axis replaces the volume antenna and X axis replaces the pitch antenna. The first idea is to have four octaves range with equal distances (equal number of pixels) between each octave. For example:<br />
mouse = 0 ... 110 Hz<br />
mouse = 400 ... 220 Hz<br />
mouse = 800 ... 440 Hz<br />
mouse = 1200 ... 880 Hz<br />
mouse = 1600 ... 1760 Hz<br />
I'm stuck with scaling the x axis values, probably because I'm not good in mathematics. Any advice, link, or help will be well appreciated.<br />
Thank you!<br />
sinewave.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Fri, 05 Mar 2010 00:38:45 GMT</pubDate></item><item><title><![CDATA[Reply to Mouse position to frequency on Fri, 05 Mar 2010 02:45:04 GMT]]></title><description><![CDATA[<p>An easy way to do this in Pd without much math is to just scale the pixels to MIDI notes and feed them into a [mtof]:</p>
<p>[inlet] &lt;-- x coordinate<br />
|<br />
[expr $f1 / 400 * 12] &lt;-- scale 0-400 to 0-12<br />
|<br />
[+ 45] &lt;-- offset by 45 (MIDI 45=110Hz)<br />
|<br />
[mtof]</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/2</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Fri, 05 Mar 2010 02:45:04 GMT</pubDate></item><item><title><![CDATA[Reply to Mouse position to frequency on Fri, 05 Mar 2010 16:44:37 GMT]]></title><description><![CDATA[<p>Thanks, Maelstorm!<br />
I tried to avoid [mtof] from the beginning because I thought that it will accept integers only and consequentially the glissando parts could sound too grainy, but I was wrong. If I don't make extremely fast movements with the mouse, it sounds ok. BTW, is there a way to get a view inside the pd objects, just to see how they work?</p>
<p>sinewave</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/3</guid><dc:creator><![CDATA[sinewave]]></dc:creator><pubDate>Fri, 05 Mar 2010 16:44:37 GMT</pubDate></item><item><title><![CDATA[Reply to Mouse position to frequency on Sat, 06 Mar 2010 07:06:00 GMT]]></title><description><![CDATA[<p>You can download the source code:</p>
<p><a href="http://puredata.info/downloads" rel="nofollow">http://puredata.info/downloads</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/3624/mouse-position-to-frequency/4</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Sat, 06 Mar 2010 07:06:00 GMT</pubDate></item></channel></rss>