tag:blogger.com,1999:blog-45788484172689486762024-03-13T14:22:54.161+11:00Create UniversesAssorted fun software creationsUnknownnoreply@blogger.comBlogger35125tag:blogger.com,1999:blog-4578848417268948676.post-34824583676702489812014-09-13T13:50:00.003+10:002014-09-13T13:50:48.150+10:00This blog has moved<span style="font-size: small;">New posts will appear here:</span><br />
<br />
<div style="text-align: center;">
<a href="https://createuniverses.wordpress.com/"><span style="font-size: x-large;">https://createuniverses.wordpress.com/</span></a></div>
<br />
Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-45290320393402986872014-09-02T22:13:00.000+10:002014-09-02T22:13:14.713+10:00Interactive programming environmentsWhen I read the <a href="http://prog21.dadgum.com/198.html">latest post</a> in the <a href="http://prog21.dadgum.com/">programming in the twenty-first century</a> blog, a blog I have been reading for years, I felt I should finally update this blog at least with a screenshot of the interactive programming environment I've been working on (and in) recently.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZsoPYQihITmuUBs4nEVkWamSPBLLjvqIDZcf4wzP0R1v1s97h3URolupCAIyKi8MCMBzD-F9gkvdaDd4x6gQfEnyUa2PXZ8i6XWqdvEp_kQgkD_8fPE_ta9hGsvWaF8V6RctqKvSOtdY/s1600/zIr0sSl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZsoPYQihITmuUBs4nEVkWamSPBLLjvqIDZcf4wzP0R1v1s97h3URolupCAIyKi8MCMBzD-F9gkvdaDd4x6gQfEnyUa2PXZ8i6XWqdvEp_kQgkD_8fPE_ta9hGsvWaF8V6RctqKvSOtdY/s1600/zIr0sSl.png" height="261" width="320" /></a></div>
<br />
<br />
Here are some videos:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/PGNEuq3XL7c?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/0uEBs98PKQE?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
James Hague has written about the interactive environments that existed on old computers before, but his latest post blew my nostalgia into overdrive, compelling me to post this. Thanks James. Thames.<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-5352754219876862852012-06-23T02:10:00.000+10:002014-09-05T11:58:01.519+10:00Fluid Concepts and Creative AnalogiesThe book <a href="http://cogsci.indiana.edu/book.html">Fluid Concepts and Creative Analogies</a> describes a cognitive model that is very compelling and fun to study.<br />
<br />
When you run <a href="https://archive.org/details/JavaCopycat">an implementation</a> of this cognitive model, the cognitive model seems
to actively pursue an agenda in an incredible, human like way. Some aspects of its behaviour are reminiscent of ant colony simulators, with <i>codelets </i>as the ants. Each <i>codelet </i>is attracted to a "<i>salient</i>" ("pheromone scented") part of the workspace and
does one little piece of work - proposing or building a structure,
changing the salience of a new part of the workspace, changing the
activation and <i>slippability </i>of one of the concepts in the <i>slipnet</i>, and
so on. As the codelets run, the system seems to be pursuing an agenda, an agenda that is different every time it runs, and that is emergent rather than explicitly programmed in.<br />
<br />
Trying to apply this cognitive model to other domains is a mind bending exercise. By way of contrast, when applying a genetic algorithm to a problem for example, you just need to define a few recombination operators for generating new proposed solutions from old ones, and a fitness function for measuring a proposed solution. When this program runs, its style is simply a parallel prioritized search. The fluid concepts cognitive model on the other hand has a much more compelling, beautiful style as it works toward a solution. Whether it is more or less efficient is not as important to me as its behaviour.<br />
<br />
When applying this cognitive model to a new domain, you need examine the domain in more detail than with other AI techniques. You need to choose the concepts
involved, how they are connected to each other and how these concepts manifest themselves through the
"top-down" codelets they can generate and how "bottom-up" codelets
should be influenced by the activations of the concepts. When you see this program running, you see a story unfold about a thought process rather than just a dry search. The system notices features, which may activate concepts, which may direct the system to search for features related to that activated concept. The activation of a concept may also strengthen the bond between two other concepts, causing a slippage of activation. For example, thinking about the letter "a" and the concept of successorship may lead you to start thinking about the letter "b". Its this richness and depth of domain knowledge that gives systems based on this cognitive model such a compelling, beautiful character.<br />
<br />
As well as <a href="http://cogsci.indiana.edu/book.html">Fluid Concepts and Creative Analogies</a>, I've been reading the following two books written by the co-authors:<br />
<br />
<a href="http://mitpress.mit.edu/books/analogy-making-perception">Analogy-Making as Perception - A Computer Model by Melanie Mitchell</a><br />
<br />
<a href="http://mitpress.mit.edu/books/subtlety-sameness">The Subtlety of Sameness by Robert French</a><br />
<br />
Also its helpful when studying this to read <a href="http://people.cs.kuleuven.be/%7Ejoaquin.vanschoren/zsp/fluidconcepts/">An evaluation of the Fluid Concept Architecture,</a> a good examination of the cognitive model.<br />
<br />
<b>Links:</b><br />
<br />
<a href="http://cogsci.indiana.edu/book.html">The book</a><br />
<br />
<a href="http://pp.kpnet.fi/seirioa/cdenn/hofstadt.htm">A review and description of the book by Daniel Dennett</a><br />
<br />
<a href="http://www.cogsci.indiana.edu/">Fluid Analogies Research Group</a> <br />
<br />
<strike><a href="http://itee.uq.edu.au/%7Escottb/_Copycat/" rel="nofollow">A java implementation of Copycat by Scott Bolland.</a></strike><br />
<b>Update: </b>Scott Bolland appears to have disappeared from the internet. A copy of the Copycat program along with the tutorial pages <a href="https://archive.org/details/JavaCopycat">appears on the Internet Archive.</a><br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-23462529070860747312012-05-14T16:40:00.000+10:002016-10-05T09:57:39.972+11:00Synthbench v002<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmRMDCWTyBA5LpOam5tbqMYV0nKJJx9fBTa1cInlzZSnaMwSukWLsDKwvALvYHmrKSqcehL72ArLrL9khpourDv2ev-A2LZcIU394D0_aITeQQNvyQqGdG5l-W5uXWk_jqiuLdI6CYx3o/s1600/bench.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmRMDCWTyBA5LpOam5tbqMYV0nKJJx9fBTa1cInlzZSnaMwSukWLsDKwvALvYHmrKSqcehL72ArLrL9khpourDv2ev-A2LZcIU394D0_aITeQQNvyQqGdG5l-W5uXWk_jqiuLdI6CYx3o/s1600/bench.png" /></a></div>
<br />
<br />
<u><b>tech notes:</b></u><br />
<br />
Synthbench is an audio synthesis tool inspired by the "Reactable" instrument.<br />
<br />
It features:<br />
- Generators and LFO controllers with waveforms editable in real time <br />
either interactively with the mouse or through lua commands.<br />
- Generators and LFO controllers that use standard waveforms.<br />
- High pass, low pass and band pass filter effect nodes<br />
- Delay / phase shift effect node<br />
- A tracker, accessible using tracker controller nodes that can be <br />
attached to a generator like any other controller node<br />
- The two parameters of a generator node can be separately controlled by <br />
a controller node<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPt8kT8ubABPgqpsNmP7JGiYsn6o6ki-bSwM4nuWHGPVB-go53ZFOmGAK3WQR09YS_DASJ3kuPNAowibPE2nphHC0vupEB3FsgysClkxLlYKUWhLObDgJSoFJvSOMJJMgaXRqvTHyVmmA/s1600/tracker.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPt8kT8ubABPgqpsNmP7JGiYsn6o6ki-bSwM4nuWHGPVB-go53ZFOmGAK3WQR09YS_DASJ3kuPNAowibPE2nphHC0vupEB3FsgysClkxLlYKUWhLObDgJSoFJvSOMJJMgaXRqvTHyVmmA/s1600/tracker.png" /></a></div>
<br />
<u><b>interface notes:</b></u><br />
<br />
To adjust the tempo, the center node (small purple circle) needs to be<br />
selected and the controls window needs to be visible ("Controls" menu<br />
item toggles it).<br />
<br />
The "mf" and "ma" controller nodes need to be attached to a generator<br />
to enable it to be controlled by the tracker. Sliding the "Track"<br />
parameter selects which track controls the controller node.<br />
<br />
If you find that a controller node is controlling the pitch instead of<br />
the amplitude or vice versa, try moving the controller around the<br />
generator until what it controls changes.<br />
<br />
When placing a high or low pass filter, you may want to increase the Q<br />
parameter slightly to make the effect more dramatic.<br />
<br />
The generator and controller nodes that allow you to modify the<br />
waveform are the "lua" nodes. The "WaveformEdit" menu item toggles the<br />
waveform editor.<br />
<br />
The "Waveform", "Tracker" and "Synthbench" menu items toggles the<br />
visibility of the respective panes.<br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/Synthbench_v002.zip">Download</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-83241015594917941712011-11-18T17:51:00.000+11:002016-10-05T09:59:11.726+11:00The Cave - fugue @ Syntax 2011<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX7mKCSVpPH_kuiaR59_rAHzzCUzuY8NGeL6coiUb5TyTuCao-g1rKvBNS91M8LFCu7B02xJo-1Wr6ZdT3TP_Ma_YlrjarzvfAdcguB9fcstnzA5GHnsNeDH_jopc6d2SZBvyfvRR7JAE/s1600/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX7mKCSVpPH_kuiaR59_rAHzzCUzuY8NGeL6coiUb5TyTuCao-g1rKvBNS91M8LFCu7B02xJo-1Wr6ZdT3TP_Ma_YlrjarzvfAdcguB9fcstnzA5GHnsNeDH_jopc6d2SZBvyfvRR7JAE/s320/1.PNG" width="320" /></a></div>
<br />
<br />
This demo uses an engine similar to wtf-atabimp, with a few new features, such as high speed OpenGL rendered voxels and a clean up of the mp3 playing code. All voxel operations (such as "adding" and "carving out" voxels) are done in constant time, with the "housekeeping" of the voxel render list occuring at render time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGFAwzvGv2FdVh-fLYAupdXzyUBrr4E8fDl71CqvHCkqX4ZZTOaygskf-R9tkUyNOl1rua9aDGP3uyhpPXLXqyJS8P4spOKqLFYwGY8IN-knhORJ24CgfmPjYmCUKd4XhMAKH5hVe_RB8/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGFAwzvGv2FdVh-fLYAupdXzyUBrr4E8fDl71CqvHCkqX4ZZTOaygskf-R9tkUyNOl1rua9aDGP3uyhpPXLXqyJS8P4spOKqLFYwGY8IN-knhORJ24CgfmPjYmCUKd4XhMAKH5hVe_RB8/s320/2.PNG" width="320" /></a></div>
<br />
This demo is built on a framework that allows the entire demo to be driven by lua. The lua files are included, and can be modified freely. There is also a console available from the demo itself, providing a "live coding" environment which permits complete modification of the demo while it is running. There is an unmarked pane splitter at the bottom of the window which can be moved to reveal the console. The console now maintains a persistent session, so the command history is maintained between runs.<br />
<br />
Thanks to cTrix for his wizardry in creating this awesome music for the demo!<br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/TheCave.zip">Download</a><br />
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-14915888315655400642011-10-24T16:51:00.010+11:002011-11-20T19:37:33.308+11:00WikiReader Forth Simulator - updateNow features:<br />
<ul><li>Stack window refreshes after every command</li>
<li>WikiReader style boot menu</li>
<li>New sample programs</li>
<li>Added SP@ word </li>
<li>WikiReader consistent implementation of PICK </li>
<li>Found and fixed a memory corrupting crash bug in Ficl Forth associated with the LOCALS| word. WikiReader Forth doesn't support LOCALS| so this is moot.</li>
<li>Includes a scroller sample which doesn't use LOCALS| or PICK </li>
</ul><br />
<ul></ul>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4578848417268948676.post-24925713159807923472011-10-24T15:08:00.007+11:002011-11-20T19:37:54.370+11:00Nokia E71 live coding - updateThis update features:<br />
<ul><li>Single application instead of 2 separate applications</li>
<li>Full use of E71 keyboard - all characters accessible using bottom left meta key, no need to use Nokia special character dialog</li>
<li>Tested on the Nokia C5</li>
<li>Trace window with go to error capability</li>
<li>Console with history and persistent session</li>
<li>Saving and loading console sessions</li>
<li>Integrated editor with go to line and search functions</li>
<li>Editor and Console use fixed width font</li>
<li>Several sample programs included with installation</li>
</ul><br />
<ul></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-87994550557071658842011-06-18T18:35:00.003+10:002011-11-20T15:27:09.394+11:00Lua based live coding tools for the Nokia E71<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYpTl5ud5CqUVz-Y7scsL5zKGgp4KL6GHS9A2lOMuMEG0os5GtZd3Sv9P9-MUZFbh6Edvh3ann2sHtAjKsR3ThxqmySjVPfqe31vaPAxxIDoPpW_FA33xF0Iy6cjxSQgoWKjj1i0obh5s/s1600/linecurve.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYpTl5ud5CqUVz-Y7scsL5zKGgp4KL6GHS9A2lOMuMEG0os5GtZd3Sv9P9-MUZFbh6Edvh3ann2sHtAjKsR3ThxqmySjVPfqe31vaPAxxIDoPpW_FA33xF0Iy6cjxSQgoWKjj1i0obh5s/s1600/linecurve.png" /></a></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-m7Mrl0wGBHgTQmLpqjXPWZHReeVY0EWGO25GWO6SwhGXuKtBeND22VhayYyNW-hEzrF3SyPRTof16ru3hcUVwKoAOOSvwXz06oCpWofjGJu3P9qK2N3swqOrCCZtKmceYUqfFMVY5V8/s1600/TextEd-menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-m7Mrl0wGBHgTQmLpqjXPWZHReeVY0EWGO25GWO6SwhGXuKtBeND22VhayYyNW-hEzrF3SyPRTof16ru3hcUVwKoAOOSvwXz06oCpWofjGJu3P9qK2N3swqOrCCZtKmceYUqfFMVY5V8/s1600/TextEd-menu.png" /></a></div><br />
<span style="font-size: large;"><b>Installing</b></span><br />
<br />
Using Nokia PC Suite, install the following .sis files:<br />
<br />
<ul><li>qt.sis</li>
<li>LiveCode.sis</li>
<li>TextEd.sis</li>
<li>spectrum.sis</li>
</ul><br />
They can be installed in any order.<br />
<br />
After installing, its handy to map the hardware buttons mapped so they start LiveCode, TextEd and spectrum to save you from having to traverse the menu every time you want to make a change to your lua code or see the effect of your change.<br />
<br />
<span style="font-size: large;"><b>Running the tools</b></span><br />
<br />
<b>LiveCode</b> and <b>TextEd</b> together provides a basic and fun live coding environment for Nokia mobile phones. When you run LiveCode, it loads a file called <b>livecode.lua</b> in the Root directory of the phone memory to retrieve the newest definitions of the <b>update</b> and <b>render</b> functions. Running the TextEd program after this will open <b>livecode.lua</b> for editing in a basic text editor, where any lua code may be written and <b>update</b> and <b>render</b> can be redefined. After making your changes and saving, you can return to the running instance of LiveCode, and reload your definitions of <b>update</b> and <b>render</b> by hitting any key on your phone.<br />
<br />
I've included a small set of samples to get you started. Place them in the Root directory of the phone memory, rename one of them to <b>livecode.lua</b> then start the LiveCode program to try it out! If you read the samples, you'll see the only callback currently defined is <b>drawLine</b>, which takes 4 numbers to specify the endpoints of the line to be drawn. This function can only be called inside <b>render</b>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuymnsaiPJSmExmzx_jpB58tzHhE8lc_iy7AkbvG81F5AcB6nh4P-5EE6Ano-056nfGz4dSV6av9Jlu-fpjGvJpn6e81pPrqefmdItq0X8X-EdEtvAQQgs9OZy6NkarwgzqTasQsviC0Y/s1600/TextEd-livecode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuymnsaiPJSmExmzx_jpB58tzHhE8lc_iy7AkbvG81F5AcB6nh4P-5EE6Ano-056nfGz4dSV6av9Jlu-fpjGvJpn6e81pPrqefmdItq0X8X-EdEtvAQQgs9OZy6NkarwgzqTasQsviC0Y/s1600/TextEd-livecode.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oWY8dFNVQui_Bu0K31S4BhJOfzbnAcotZ0f5WhLsNIxhbHNYEMZV3ApeX0xWcnq8WWNtdLtJvpWgPCUufeKXpBF4fqOrQzr1kDwY0iD11vi1RCmDDt-riJWc0Ho4yWs2Ed95CCdOHSM/s1600/brat.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oWY8dFNVQui_Bu0K31S4BhJOfzbnAcotZ0f5WhLsNIxhbHNYEMZV3ApeX0xWcnq8WWNtdLtJvpWgPCUufeKXpBF4fqOrQzr1kDwY0iD11vi1RCmDDt-riJWc0Ho4yWs2Ed95CCdOHSM/s1600/brat.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oWY8dFNVQui_Bu0K31S4BhJOfzbnAcotZ0f5WhLsNIxhbHNYEMZV3ApeX0xWcnq8WWNtdLtJvpWgPCUufeKXpBF4fqOrQzr1kDwY0iD11vi1RCmDDt-riJWc0Ho4yWs2Ed95CCdOHSM/s1600/brat.png" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oWY8dFNVQui_Bu0K31S4BhJOfzbnAcotZ0f5WhLsNIxhbHNYEMZV3ApeX0xWcnq8WWNtdLtJvpWgPCUufeKXpBF4fqOrQzr1kDwY0iD11vi1RCmDDt-riJWc0Ho4yWs2Ed95CCdOHSM/s1600/brat.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7z9YDIxbrQ-wzoGy4ibdbQY0nntFOz7KvIkrDZrF6H4xsXWeIYCiE5wbWWNHM6fL8Jz2FbyyIG1jtLBntvdzsyQgxHkUqNay8CyNdOzZiWgHXa-12BpzYC0I2hDrSdkYh0Skf8LizR4/s1600/pie1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7z9YDIxbrQ-wzoGy4ibdbQY0nntFOz7KvIkrDZrF6H4xsXWeIYCiE5wbWWNHM6fL8Jz2FbyyIG1jtLBntvdzsyQgxHkUqNay8CyNdOzZiWgHXa-12BpzYC0I2hDrSdkYh0Skf8LizR4/s1600/pie1.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZTwYbUsGbxqeEkQ15r0wLHzzJcmxWUeg0KRUq6pDt0-VB3H_YTxD6DOnpjcAruoS9i7Q0QJswAhVbkcWbrm9ZBiHIDNHw96J7sDuH7p9PzcQ3Sb6Ifbl0SQxNrmZMXBgRIp3mgcQR8EY/s1600/spin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZTwYbUsGbxqeEkQ15r0wLHzzJcmxWUeg0KRUq6pDt0-VB3H_YTxD6DOnpjcAruoS9i7Q0QJswAhVbkcWbrm9ZBiHIDNHw96J7sDuH7p9PzcQ3Sb6Ifbl0SQxNrmZMXBgRIp3mgcQR8EY/s1600/spin.png" /></a></div><br />
<span style="font-size: large;"><b>Audio coding with spectrum and lua</b></span><br />
<br />
I have also provided a version of the spectrum demo with a slight modification - this version allows the waveform to be specified from lua. The spectrum program reloads the file <b>spectrum.lua</b> whenever the mode settings are changed to obtain the newest definition of the <b>calcsample</b> function, which it uses to compute the waveform. If you open TextEd after opening spectrum, TextEd will allow you to edit the spectrum.lua file. Starting the LiveCode program will tell TextEd to go back to editing <b>livecode.lua</b> the next time it starts.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjctW1kqdL6Ea40Ey_pqFpbrm6bQve_j_K56NwPdbuN1wcfjieMID3o9uXhI4FlK0-0zDo3steBXC23wh67XZmoIzZgqb7-ArcM10aw-oBPNIch3YRO0bKNL1nnToM8nurea6F_OxPMehM/s1600/spectrum-square.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjctW1kqdL6Ea40Ey_pqFpbrm6bQve_j_K56NwPdbuN1wcfjieMID3o9uXhI4FlK0-0zDo3steBXC23wh67XZmoIzZgqb7-ArcM10aw-oBPNIch3YRO0bKNL1nnToM8nurea6F_OxPMehM/s1600/spectrum-square.png" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUWP61EOIb0c7pn1Mi5zKfW5NwiNp8SJSSNahRdwShoSUSDIxuYIvUNRPBqm63pwgU1wLu6DZ1-LdIrkQ_m46dxO9Yx9jRpgkAeBAHLKtm329MysETVlpec_rUN4YBbBnAoUIWX39_DE/s1600/spectrum-tooth.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUWP61EOIb0c7pn1Mi5zKfW5NwiNp8SJSSNahRdwShoSUSDIxuYIvUNRPBqm63pwgU1wLu6DZ1-LdIrkQ_m46dxO9Yx9jRpgkAeBAHLKtm329MysETVlpec_rUN4YBbBnAoUIWX39_DE/s1600/spectrum-tooth.png" /></a></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZIM_g95w_8jFZloaiFWMslWwxvXPUkZ9VYkOsAYky5ndE9Cq9CT4aYnRSWoXTFz8xhecoK1sUGJq7tZwE28N0raLSFHfymuwNci3eDuPj3WWXuUZDvcMKDWzpwsyApT9_HpfFq01XyvQ/s1600/spectrum-sine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div><br />
<div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZIM_g95w_8jFZloaiFWMslWwxvXPUkZ9VYkOsAYky5ndE9Cq9CT4aYnRSWoXTFz8xhecoK1sUGJq7tZwE28N0raLSFHfymuwNci3eDuPj3WWXuUZDvcMKDWzpwsyApT9_HpfFq01XyvQ/s1600/spectrum-sine.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZIM_g95w_8jFZloaiFWMslWwxvXPUkZ9VYkOsAYky5ndE9Cq9CT4aYnRSWoXTFz8xhecoK1sUGJq7tZwE28N0raLSFHfymuwNci3eDuPj3WWXuUZDvcMKDWzpwsyApT9_HpfFq01XyvQ/s1600/spectrum-sine.png" /></a> </div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyU1uXlhlIwdXhQBEFWX35szOzFoNiiiOQgtOK86NoaKQ9aRqJc9NMlrgx1KKx_w2Rd3qSYriybmcGbNwUJwFL49gmZyKHrIwxDxmGHkhkpamkCmVIixZKMFIvR31fj6nsB2E8H_sGKi0/s1600/TextEd-spectrum.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyU1uXlhlIwdXhQBEFWX35szOzFoNiiiOQgtOK86NoaKQ9aRqJc9NMlrgx1KKx_w2Rd3qSYriybmcGbNwUJwFL49gmZyKHrIwxDxmGHkhkpamkCmVIixZKMFIvR31fj6nsB2E8H_sGKi0/s1600/TextEd-spectrum.png" /></a></div><br />
The original version of the spectrum demo comes from the Qt SDK, available from <a href="http://qt.nokia.com/">qt.nokia.com</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-21985277408150824102011-06-18T07:43:00.006+10:002016-10-05T10:03:48.053+11:00wtf-atabimp - fugue @ Flashback 2011<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSnNJuejqo4Q-Y_fgA4xuo9dBM1Xu7RqZlbh3Ou66PPXwcfCvsDxPAK0Cvu5tSGbV5IhHF4FfcVtf_PLK8i-OsFKrNW_0y5TeUrcKG6FuC9zvV50KpjwZn7ycle_R10Pz_joYLZsduhu4/s1600/wtf-atabimp.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSnNJuejqo4Q-Y_fgA4xuo9dBM1Xu7RqZlbh3Ou66PPXwcfCvsDxPAK0Cvu5tSGbV5IhHF4FfcVtf_PLK8i-OsFKrNW_0y5TeUrcKG6FuC9zvV50KpjwZn7ycle_R10Pz_joYLZsduhu4/s320/wtf-atabimp.PNG" width="320" /></a></div>
<br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/wtf-atabimp.zip">Download</a><br />
<br />
This demo is built on a framework that allows the entire demo to be driven by lua. The lua files are included, and can be modified freely. There is also a console available from the demo itself, providing a "live coding" environment which permits complete modification of the demo while it is running. There is an unmarked pane splitter at the bottom of the window which can be moved to reveal the console.<br />
<br />
This is my first demo, and I wrote it this way to permit the protoyping of different effects easily. In this demo, there are only 3 effects:<br />
<br />
<ul>
<li>A 3D braitenberg vehicle simulation, where 200 randomly placed objects self organize into a group of 3D curves</li>
<li>An animated heightmap</li>
<li>A randomly generated group of polylines with a bunch of triangular guys moving along them.</li>
</ul>
<br />
<iframe allowfullscreen="" frameborder="0" height="349" src="https://www.youtube.com/embed/dGbNPqRDZVE" width="425"></iframe>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-71718165940842700082011-06-17T18:01:00.007+10:002011-11-20T15:22:10.313+11:00Synthbench - Flashback updateI presented this version at <a href="http://defame.com.au/flashback.php">Flashback 2011</a>. It features:<br />
<br />
<ul><li>Generator and controller elements that use lua specified waveforms</li>
<li>A continuously running tracker where instruments can be assigned to the tracks using "music" effect elements</li>
<li>Completely scriptable operation. From the lua console it is possible to construct the table, and manipulate all its controls including the data in the tracker or the waveforms in the lua generators and controllers over time.</li>
<li>Update callbacks which are called at 20Hz, and also after each note played by the tracker</li>
<li>The delay effect now mixes the input with a delayed version of itself</li>
<li>There are also 3 filter effects - band pass, high pass and low pass filters</li>
</ul> I'm in the process of uploading some videos demonstrating the new features. They will appear in <a href="http://www.youtube.com/user/paperwitch">this youtube channel.</a><br />
<br />
There are some example scripts which demonstrate how to use the scripting features. You can also refer to the readme file for further documentation.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="349" src="http://www.youtube.com/embed/b_b9laI_iw0" width="425"></iframe><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="349" src="http://www.youtube.com/embed/GZB8vdto30s" width="425"></iframe>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-33824869587876512732011-03-19T18:56:00.019+11:002016-10-05T14:53:17.021+11:00WikiReader Forth Simulator<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8D6dljso3bwloN8q9qg30c_IFzaXGYFfeNE7Gdzc92yk5uhWOloGDJNkxklkmdgjJCTDdXZgIO7b0NkCPGKvjDtltmgC6slSIQFIV-uc-6dYjGk0FofDjcBbdsIKcP9TP4O-uKRA1o0/s1600/ss1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8D6dljso3bwloN8q9qg30c_IFzaXGYFfeNE7Gdzc92yk5uhWOloGDJNkxklkmdgjJCTDdXZgIO7b0NkCPGKvjDtltmgC6slSIQFIV-uc-6dYjGk0FofDjcBbdsIKcP9TP4O-uKRA1o0/s320/ss1.PNG" width="320" /></a></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJyr1f0CME8FOZRrlknWQ5Ccr54dnoZiwMcW8PjK3qvJkEslvfiDv0j-k85Cc2SYXaOKCLiEd_PAe55jG2xfK1pUYuAjGvUT9Twg0bkWYWc0xTeEuRi-fWBtEmo_NNNwPRAaYSAUsXBDI/s1600/ss3.PNG" style="margin-left: 1em; margin-right: 1em;"><br />
</a></div>
<br />
I bought a WikiReader recently, which apart from being a 4GB text only offline version of Wikipedia, comes with a fun feature where it can run any Forth programs which are placed on its internal mini SD card. I wrote this program so I could test my small Forth programs without having to swap the mini SD card in and out repeatedly. The current version can run most of the test programs exactly as they appear on the SD card very faithfully. This app uses a Forth interpreter provided by the open source embeddable Forth implementation <a href="http://ficl.sourceforge.net/">FICL (http://ficl.sourceforge.net/)</a>, and it works by providing device specific words as callbacks to a simulated WikiReader. It implements enough now to be useful, including the framebuffer functions, GDI functions (including text rendering using the device's font) and input functions, so I'm releasing it.<br />
<br />
<span style="font-size: large;"><b>Usage:</b></span><br />
<br />
See simlib.4th for the list of device specific words supported by this simulator, as well as simtest.4th for some simple examples. The other Forth programs included are the ones which come with the device and which I've tested on this simulator. Please refer to them for more reference material when writing your own programs.<br />
<br />
The console supports multi-line commands. To enter a multi-line command, press ctrl-enter for a new line. The console also keeps a history of all commands entered. To navigate the history, press ctrl-up or ctrl-down. Pressing up or down without ctrl will move the cursor around the console.<br />
<br />
To simulate moving your finger over the screen during the execution of your Forth command or program, move your mouse over the screen while holding down the left mouse button. To simulate hardware key presses, the hardware keys are mapped as follows:<br />
<br />
<table align="center" border="1" style="width: 300px;"><tbody>
<tr align="left"> <td>Search</td> <td>Q</td> </tr>
<tr align="left"> <td>History</td> <td>W</td> </tr>
<tr> <td style="text-align: left;">Random</td> <td style="text-align: left;">E</td> </tr>
</tbody></table>
<br />
<span style="font-size: large;"><b>A note about the calculator progam, calc.4th:</b></span><br />
<br />
The calculator program is not completely identical to the original version on the retail device, because the version on the device has a bug. I found the bug while writing this simulator, and submitted a bug report. <a href="https://github.com/wikireader/wikireader/issues/24">Here is a link to the bug report.</a> To see the bug for yourself, on your device, try the following calculation: -75 + 5 =. The result it gives is gibberish, and when trying it on the simulator with the original calc.4th, a stack underflow occurs. Fortunately, I believe I have fixed the bug, and have included the fixed version of calc.4th in the simulator. You can transfer this fixed version to your device as well.<br />
<br />
Here are the downloads for the fixed calculator:<br />
<ul>
<li><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/calc.4th">calc.4th</a></li>
<li><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/calc.patch">calc.patch</a> (so you can see what I changed more clearly)</li>
</ul>
<br />
<span style="font-size: large;"><b>Screenshots:</b></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbnAc6fCBElToktVF5vXnJxsZtfDaTadgzXc3VI2a0oq1mw3z3sO3_X-WhmHt3hnxQtwAzpb8oGsk_rJV9irIFH6xMeiZKgMGsLVE-jc-xA_A8Y2rU9J59iIreHZdyv_YEYn_rBdIRPts/s1600/ss2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbnAc6fCBElToktVF5vXnJxsZtfDaTadgzXc3VI2a0oq1mw3z3sO3_X-WhmHt3hnxQtwAzpb8oGsk_rJV9irIFH6xMeiZKgMGsLVE-jc-xA_A8Y2rU9J59iIreHZdyv_YEYn_rBdIRPts/s320/ss2.PNG" width="320" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbsEuupIDYyieC4I1YpjJ8-6IhuLr0x-nU1YPGFqsKCdIQ96KHZyPHyE4Dn5GRNBBbUwp6KszEcTacLww1HqnvQ1RD0RPt1go5jShS0x07fN-Oz0j6HwGt0JX9shY68LSiyJtE9Bx19U/s1600/ss3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisbsEuupIDYyieC4I1YpjJ8-6IhuLr0x-nU1YPGFqsKCdIQ96KHZyPHyE4Dn5GRNBBbUwp6KszEcTacLww1HqnvQ1RD0RPt1go5jShS0x07fN-Oz0j6HwGt0JX9shY68LSiyJtE9Bx19U/s320/ss3.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MIQ6PCmm5_q8NlNewHLFmAvkfli2zAqd6C1CoYAE3-FLrgR0RaqW57vmBd6sv_VmYWAHJ9LZc8VNMmkBI3DOdYPZajHd_VXyaJhLFPZ1xZ_YJriqw17Yu2e5RtVVxEudOdVYIKmQQ-o/s1600/ss4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2MIQ6PCmm5_q8NlNewHLFmAvkfli2zAqd6C1CoYAE3-FLrgR0RaqW57vmBd6sv_VmYWAHJ9LZc8VNMmkBI3DOdYPZajHd_VXyaJhLFPZ1xZ_YJriqw17Yu2e5RtVVxEudOdVYIKmQQ-o/s320/ss4.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI53FsEvUjWh96ou2vPigSiMoZ3iq7fS2K7oPvaK2OTiTeYFwTmljbm_dya0N3q1H7aSyzXXG6jnO6CTxwOdzgYX5kK8Euhu2mR8iybneSObJATV9JKUecE5-9RX6YZhfGQ8rytWf-k-c/s1600/ss5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI53FsEvUjWh96ou2vPigSiMoZ3iq7fS2K7oPvaK2OTiTeYFwTmljbm_dya0N3q1H7aSyzXXG6jnO6CTxwOdzgYX5kK8Euhu2mR8iybneSObJATV9JKUecE5-9RX6YZhfGQ8rytWf-k-c/s320/ss5.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ6PawENwGHAW3SNmfMDHzIGtgq6J4D7KNp-j5z_IQw66pw1ykjvypn1uTK5xoR_FTH3ZJUHUCwGYVOU0ri6L6YPatlBBM72q7-eSlb6CO36kIn9UhK2Fh7b9SJAZ-tcYv9rAl9CWPP6Q/s1600/ss6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ6PawENwGHAW3SNmfMDHzIGtgq6J4D7KNp-j5z_IQw66pw1ykjvypn1uTK5xoR_FTH3ZJUHUCwGYVOU0ri6L6YPatlBBM72q7-eSlb6CO36kIn9UhK2Fh7b9SJAZ-tcYv9rAl9CWPP6Q/s320/ss6.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpxTIVapL_03xImY_7ec3fgfzGI70GEfIDdesfwqP9WNu1K7tGm3VOc1kJsZ7QNeg9FqRGyulpkVw_lmMF4LH1AuiAAp_b0mD0Bww6HMFmAH_iQBJexLqDGRkm9tzWycBmaPalUwI-xM/s1600/ss7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqpxTIVapL_03xImY_7ec3fgfzGI70GEfIDdesfwqP9WNu1K7tGm3VOc1kJsZ7QNeg9FqRGyulpkVw_lmMF4LH1AuiAAp_b0mD0Bww6HMFmAH_iQBJexLqDGRkm9tzWycBmaPalUwI-xM/s320/ss7.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJyK5tEmDvJvXGjv_Jp0cxj-g9os0rDRSp3Yfy24KYM8B5f7l8TZaA54HcIknu5_7kQPHBYdZLEBqNTiHuk-wHEupCNvnlBMKSKy7nqu-vcg4kzKaBcLdzgnoB1VHX3_-9XG4qQXjmaig/s1600/ss8.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJyK5tEmDvJvXGjv_Jp0cxj-g9os0rDRSp3Yfy24KYM8B5f7l8TZaA54HcIknu5_7kQPHBYdZLEBqNTiHuk-wHEupCNvnlBMKSKy7nqu-vcg4kzKaBcLdzgnoB1VHX3_-9XG4qQXjmaig/s320/ss8.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpUXpjTVBLHtH68F98-X1oHafeZtwk2V8zlriKMDqIzSkKnDbzfT__T3Gm8aIxigv_FVnckDu0lT82LplWwAZvJuDIfFVM4AT1ctgrxcIPVvYwSuUgj0Mf5lXYP8j-cUysODh8C9li7cg/s1600/ss9.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpUXpjTVBLHtH68F98-X1oHafeZtwk2V8zlriKMDqIzSkKnDbzfT__T3Gm8aIxigv_FVnckDu0lT82LplWwAZvJuDIfFVM4AT1ctgrxcIPVvYwSuUgj0Mf5lXYP8j-cUysODh8C9li7cg/s320/ss9.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq-ds4tPeJ6THRyNdD68Z-4Y4V3V8pjPFjtvi70rnTK1jNJ66XLD3M-u7JXEzEyk39rAAaye6TZF0CHE1z-ecWmv4VT6qfzQFxE3fT285gFH-86z3oeC78g5hxNS1npu92EjmBA3hlquQ/s1600/ss10.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq-ds4tPeJ6THRyNdD68Z-4Y4V3V8pjPFjtvi70rnTK1jNJ66XLD3M-u7JXEzEyk39rAAaye6TZF0CHE1z-ecWmv4VT6qfzQFxE3fT285gFH-86z3oeC78g5hxNS1npu92EjmBA3hlquQ/s320/ss10.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/WikiReaderSim_v003.zip">Download</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/WikiReaderSim_src_v003.zip">Download source code</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-4578848417268948676.post-59908701605263509382011-02-04T19:24:00.004+11:002011-11-20T15:19:45.684+11:00Synthbench - A Reactable Simulator - Update 4This is still a limited early release. This update features sine and square wave generator and controller nodes, as well as 2 effect nodes - a band pass filter, and a delay effect. The output node now accepts multiple audio sources.<br />
<br />
I've modified the look so it is closer to the style of the Reactable. Square nodes are generators, circular nodes are controllers, and square nodes with rounded corners are effects. I'm still using text to label the nodes though - the labels are "sin" for sine wave, "sqr" for square wave, "del" for delay and "bpf" for band pass filter. I also haven't bothered with rotating the nodes just yet. <br />
<br />
<iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/zwSc7Cs9ARg" title="YouTube video player" width="480"></iframe>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-20026979010509222212010-12-23T14:56:00.019+11:002010-12-23T15:52:50.235+11:00Synthbench usage video<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Jl0PwX1WIRg?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Jl0PwX1WIRg?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-52986342524026723522010-12-16T23:24:00.002+11:002011-11-20T19:21:32.854+11:00Synthbench - A Reactable Simulator - Update 3<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZSEdW4odhT57qRAtRtPZ3FGlirWc82vhNQOBly9lk0gyfekqbqC0T7fMX31zD7a8WHvII1t5QqvIP3y2e1rsoNInssVWrvAmWKnik4xHpZ0ZeKqvTwd_zUdV37PMIwulAtbbukBmreU/s1600/Synthbench.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZSEdW4odhT57qRAtRtPZ3FGlirWc82vhNQOBly9lk0gyfekqbqC0T7fMX31zD7a8WHvII1t5QqvIP3y2e1rsoNInssVWrvAmWKnik4xHpZ0ZeKqvTwd_zUdV37PMIwulAtbbukBmreU/s400/Synthbench.PNG" width="327" /></a></div><br />
<br />
This is a bug fix release for the <a href="http://createuniverses.blogspot.com/2010/12/synthbench-reactable-simulator-update-2.html">Synthbench_2010_12_16</a> version. The output node no longer auto connects when dragged. Prior to this fix, when the output node was dragged, it instantly tried connecting to itself, resulting in bizarre behaviour. Also, the output node is now labeled appropriately.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-34603835421280414432010-12-16T16:13:00.004+11:002011-11-20T19:21:40.290+11:00Synthbench - A Reactable Simulator - Update 2<div class="separator" style="clear: both; text-align: left;"><b></b></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZSEdW4odhT57qRAtRtPZ3FGlirWc82vhNQOBly9lk0gyfekqbqC0T7fMX31zD7a8WHvII1t5QqvIP3y2e1rsoNInssVWrvAmWKnik4xHpZ0ZeKqvTwd_zUdV37PMIwulAtbbukBmreU/s1600/Synthbench.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3ZSEdW4odhT57qRAtRtPZ3FGlirWc82vhNQOBly9lk0gyfekqbqC0T7fMX31zD7a8WHvII1t5QqvIP3y2e1rsoNInssVWrvAmWKnik4xHpZ0ZeKqvTwd_zUdV37PMIwulAtbbukBmreU/s400/Synthbench.PNG" width="327" /></a></div><br />
<br />
This is a bug fix release for the <a href="http://createuniverses.blogspot.com/2010/12/synthbench-reactable-simulator_14.html">Synthbench_2010_12_14</a> version. The program should no longer hang regardless of the node network you try to create.<br />
<br />
Whenever there is a cycle in the network, Synthbench no longer hangs - the nodes in the cycle merely stop updating.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-53792250048884688992010-12-14T16:16:00.004+11:002011-11-20T19:21:47.979+11:00Synthbench - A Reactable Simulator - Update 1<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7k141Tn6j1NT5G6p6CIN7dPeopN6okRLwTZIt2OWguMqfsdiIyaVK8AuJzoxFrFhudVIOJ6Yut8Hh1nQ7LJeM7QgypJiUTqnYmZ3qpX2ucwSuigKyZlOLOAca_h4ueTIFn8Msk87NWRE/s1600/Synthbench.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7k141Tn6j1NT5G6p6CIN7dPeopN6okRLwTZIt2OWguMqfsdiIyaVK8AuJzoxFrFhudVIOJ6Yut8Hh1nQ7LJeM7QgypJiUTqnYmZ3qpX2ucwSuigKyZlOLOAca_h4ueTIFn8Msk87NWRE/s400/Synthbench.PNG" width="327" /></a></div><br />
<br />
This program is inspired by the Reactable, and it attempts to simulate it. This is a very limited early version - the project is an excercise in audio programming.<br />
<br />
<b>Differences between this version (2010_12_14) and the previous version (2010_12_03):</b><br />
<ul><li>Its possible to add new nodes to the table by dragging them from the palette</li>
<li>The nodes auto-connect and disconnect as you drag them. Controller nodes connect to generators and other controllers, while generators only connect to the output node. Also, a node won't auto connect with a node further away from the output node than it is, encouraging radial node layouts. I may change this rule.</li>
<li>The nodes are labelled - generators are labelled "g", controllers are labelled "c".</li>
<li>The controller nodes modify a parameter away from the base setting, which means that manipulating the sliders will have an effect even if a controller node is connected.</li>
</ul><br />
<b>Controls:</b><br />
<ul><li>Move a node by dragging it with the left mouse button</li>
<li>Pan the view by dragging an empty spot with the left mouse button</li>
<li>Zoom the view by dragging an empty spot up and down with the right mouse button</li>
</ul> <b>Limitations and known bugs:</b><br />
<ul><li>The output node doesn't do any mixing - it accepts only one input from a generator node</li>
<li>In fact, all the nodes accept only one input at the moment, which means the only thing you can make at the moment is a chain.</li>
<li>The only parameter a controller will modify is the period</li>
<li>The program might hang if you make a complex structure it can't support - only make a chain for now. </li>
</ul>Despite these limitations, you can still achieve some interesting effects.<br />
<br />
<b>Coming up in the next version(s):</b><br />
<ul><li>Low/high/band pass filters nodes and other effect nodes</li>
<li>Sequencer nodes</li>
<li>Controller nodes affecting more parameters</li>
<li>Improving the look - possibly switching to 3D so effects can be added</li>
<li>Make more use of the Lua console</li>
</ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-63885507421190545192010-12-03T01:40:00.002+11:002011-11-20T19:22:21.846+11:00Synthbench - A Reactable simulator<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiED3-c_5qKvuZPVPQOSQ-QZoav7iGcp91BrtCrR5drFC4a1UtiOUwappjkAEEnhD6CIc3iL91Urs5Df1_DRMp2Q8WRItL64D5zvfun1kykeCQ_F4cd03R4v7NAZCsVJbXTgipdlGi5W6Q/s1600/Synthbench.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiED3-c_5qKvuZPVPQOSQ-QZoav7iGcp91BrtCrR5drFC4a1UtiOUwappjkAEEnhD6CIc3iL91Urs5Df1_DRMp2Q8WRItL64D5zvfun1kykeCQ_F4cd03R4v7NAZCsVJbXTgipdlGi5W6Q/s320/Synthbench.png" width="185" /></a></div><br />
This program is inspired by the <a href="http://www.reactable.com/">Reactable</a>, and it attempts to simulate it. This is a very limited early version - the project is more of a proof of concept which provides an excercise in audio programming. You can still have some fun with it though. The table layout consists of a sinewave generator, with a sinewave controller controlling it. Selecting the sinewave controller (the node on the left) allows you to modify its parameters using the sliders at the top of the window.<br />
<br />
The Lua scripting pane is a functional Lua repl that allows you to enter multi-line Lua expressions and programs, although isn't tied to anything in the simulator yet.<br />
<br />
A better, actually useful version is coming soon.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-12442946502371818192010-11-20T19:19:00.003+11:002010-11-20T19:23:31.947+11:00Syntax Party 2010I attended <a href="http://www.syntaxparty.org/">Syntax Party 2010</a> this year. I've always admired the demoscene from afar, so when I heard there was going to be an event in Melbourne, I had to go and see it. I ended up having the time of my life! The venue was filled with like-minded, friendly, enthusiastic programmers and artists all eager to show their creations, and to query in detail about the creations of others. People from all over Australia arrived to code and party all weekend, and the atmosphere was relaxed and fun. Even though I didn't have a production prepared specifically for the event, I was encouraged to enter some of the programs I had been showing people during the event. They were <a href="http://createuniverses.blogspot.com/2010/08/mechabach.html">Mechabach </a>and <a href="http://createuniverses.blogspot.com/2007/11/ball-game-simulation.html">Ball Game</a>, and they were both well received. I've made some great new friends, including an ANSI artist named Ozzy who created a logo for my new handle, "fugue":<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqIYdOMbENeSGbui1VtdITJS1DjT3MDpmplsUlwscRuRKq5gcFGYJN94_mEG824E4c1tKFL9TzelrV7WF5Vy7p0XTAmMmfYiypMQRxxRu5k-2zs0N5bpFee0Q6TvFosIifergMNy1jABk/s1600/fugue.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqIYdOMbENeSGbui1VtdITJS1DjT3MDpmplsUlwscRuRKq5gcFGYJN94_mEG824E4c1tKFL9TzelrV7WF5Vy7p0XTAmMmfYiypMQRxxRu5k-2zs0N5bpFee0Q6TvFosIifergMNy1jABk/s1600/fugue.png" /></a></div><br />
I look forward to next year's Syntax Party event in Sydney!Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-6029184313227340202010-08-19T15:16:00.002+10:002016-10-05T14:54:34.457+11:00Mechabach<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikw51-muB5raI4siyKLeePLK2HUZepkvYjvVSS8aKC02daYDt9nKyzwAqTLm_XlWJC441DtHkJQ13MrUKqG5pTlSsk2vouXAcINF5-R4j7dKl9sxb7WmDlDKXr_vxSUSUeWc9_Iumaa-A/s1600/mechabach.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikw51-muB5raI4siyKLeePLK2HUZepkvYjvVSS8aKC02daYDt9nKyzwAqTLm_XlWJC441DtHkJQ13MrUKqG5pTlSsk2vouXAcINF5-R4j7dKl9sxb7WmDlDKXr_vxSUSUeWc9_Iumaa-A/s320/mechabach.PNG" /></a></div>
<br />
This program demonstrates a simple procedural composition technique for automatically generating contrapuntal compositions. Sounds completely crazy? Try it.<br />
<br />
When you run it, it generates a file called "test.mid", and proceeds to open it with the default midi playing program you have installed. I suggest using <a href="http://www.musanim.com/player/">MAMPlayer</a>, because of its visualisation of the midi file as it plays it.<br />
<br />
<b>What is it doing?</b><br />
<br />
It generates several independent tracks, one note at a time. Notes inside beats 1 and 3 are always notes in the tonic chord, and notes inside beats 2 and 4 are always notes in the dominant 7th chord. Since it always works in C major, the tonic notes are C, E and G, and the dominant notes are G, B, D and F. Also the note that is chosen is either the nearest or 2nd nearest higher or lower note to the previous note that is part of the chord it is assigned to. The choice about whether the note is higher or lower, or is the nearest or 2nd nearest is a random choice. For example, if the previous note is C, and the next note falls inside the 2nd beat of the bar, then it may either choose the D or F above the C, or the B or G below the C. As for the rhythm, there are 3 rhythms, each 1 bar long. These are 4 crotchets, 8 quavers, or a hopping rhythm of 4 repeats of a dotted quaver and a semi-quaver. Every bar, it chooses randomly from these 3 rhythms.<br />
<br />
Will it ever end?<br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/Mechabach.zip">Download</a><br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/Mechabach_src.zip">Download source code</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-77636054022368204702010-08-11T15:42:00.005+10:002011-11-20T19:28:29.379+11:00Assorted bits and pieces<b><span style="font-size: large;">DominoSolver</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif-9zHd9qsAfsvLfl30nemq0hbPkWWgpQqXQRA1oaeKDI-ZQr5o1X_UA7frY-zx8dNGsgM_8XndEdEZziouOVb08VjoHZ9tx8AZc1cGZ0qfJEpyMpvE5QIDwJDe6vXpxPPRpmFVafMl2I/s1600/DominoSolver2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif-9zHd9qsAfsvLfl30nemq0hbPkWWgpQqXQRA1oaeKDI-ZQr5o1X_UA7frY-zx8dNGsgM_8XndEdEZziouOVb08VjoHZ9tx8AZc1cGZ0qfJEpyMpvE5QIDwJDe6vXpxPPRpmFVafMl2I/s320/DominoSolver2.PNG" /></a></div><br />
This is a small program which generates a Dominosa problem to solve, then uses my implementation of <a href="http://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X">Knuth's Algorithm X</a> to solve it. The controls are:<br />
<br />
Press 'r' to generate a new puzzle<br />
Press 'p' to pause the solution search<br />
Press 's' to single step the solution search<br />
Press 'c' to continue the solution search<br />
<br />
<b><span style="font-size: large;">Eternity2</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtG2s4uI5fEoN6Z3cvO8edFdIsjqv15J-_bVc1Hlu8rs6qB4zyresYHzVAMBebsGTk0-FAxR1XzeEOfnYpdJ4ZMR0PqxH4MsrzkCTJ-TrBCjiF62f21KMyrHCp-rAIPIY9ftzi_xOxBg0/s1600/Eternity2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtG2s4uI5fEoN6Z3cvO8edFdIsjqv15J-_bVc1Hlu8rs6qB4zyresYHzVAMBebsGTk0-FAxR1XzeEOfnYpdJ4ZMR0PqxH4MsrzkCTJ-TrBCjiF62f21KMyrHCp-rAIPIY9ftzi_xOxBg0/s320/Eternity2.PNG" /></a></div><br />
<br />
This started out as a utility to help explore the huge Eternity2 puzzle, but as usually happens with me, I became sidetracked by pretty objects. The puzzle solving aspect is a minor part of this tool - the major focus of it is in procedurally generating the designs of the tiles, and from a programming point of view getting practice using the OpenGL stencil buffer by using it to produce different designs, and learning how to render to many textures.<br />
<br />
To edit a design, pan over to the single tile view (its near the bottom right of the board), and press the spacebar. (To pan, drag with the right mouse button.) Labels will appear underneath some of the sliders, indicating they may be changed to alter the design. This is the area in question:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigt8npWUp9-CX6tn84jPqoZnMZ7NwxU2QcMmBIg5cZjMGzBj-93Wgs9BLXdiR_xBAxMXqvIq2_mr0pfMjVrAMu6XjboOuilH-qECpuo-1Yjz8QVjiwRZ4yNZhGmTkP_5oJH8EHpBXIUQw/s1600/Eternity22.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigt8npWUp9-CX6tn84jPqoZnMZ7NwxU2QcMmBIg5cZjMGzBj-93Wgs9BLXdiR_xBAxMXqvIq2_mr0pfMjVrAMu6XjboOuilH-qECpuo-1Yjz8QVjiwRZ4yNZhGmTkP_5oJH8EHpBXIUQw/s320/Eternity22.PNG" /></a></div><br />
If you pan to the left, you'll see this design repeated on a grid, to give you an indication of how it looks when tesselated. You can continue editing here as well of course.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhozX_DuripiXWILrs87RPTQjhqcDr0kA74BAlICdVnjBcdf7VHvi4mZUL4Z-wzXLUczFKCHdd88RLQyHG2cJsyaQxsirKqfxCE8BMt3EJzPh1fDNF0WtYdySQnUwlAb-MOAzA8P4szjaA/s1600/Eternity24.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhozX_DuripiXWILrs87RPTQjhqcDr0kA74BAlICdVnjBcdf7VHvi4mZUL4Z-wzXLUczFKCHdd88RLQyHG2cJsyaQxsirKqfxCE8BMt3EJzPh1fDNF0WtYdySQnUwlAb-MOAzA8P4szjaA/s320/Eternity24.PNG" /></a></div><br />
If you like, you can still "play" Eternity 2, and attempt to solve the puzzle - when you click on an empty part of the board (the large greyish area), candidate pieces are revealed on the top right, which you can click to place the tile. Tiles highlighted green have already been placed, and will be moved if you click them. I was going to investigate some simple auto placement strategies, but I got bored and moved on before I did this.<br />
<br />
Included is a file called e2dataset.txt. This is not the official Eternity 2 tile set - it is a randomly generated tile set which includes border and corner pieces.<br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
<b><span style="font-size: large;">PegSolitaire</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYSjh-h-wxkpELPjAvfP3vFLLL0Hw9BHzJPsgnX90RePk-K30v9Ml0LE_G8uSRfTsgOuThnU71XA8Tt2PLMVD0p4ipNACueG4aIGRgCGjCxhTTMV-R45kABwxZOh4Jx8I66_iEuba2tJ8/s1600/PegSolitaire.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYSjh-h-wxkpELPjAvfP3vFLLL0Hw9BHzJPsgnX90RePk-K30v9Ml0LE_G8uSRfTsgOuThnU71XA8Tt2PLMVD0p4ipNACueG4aIGRgCGjCxhTTMV-R45kABwxZOh4Jx8I66_iEuba2tJ8/s320/PegSolitaire.PNG" /></a></div><br />
<br />
A simple implementation of Peg Solitaire. Right click to move a peg. There is some inactive AI code in the project.<br />
<br />
<b><span style="font-size: large;">RenderToTexturePlay</span></b><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidn1W6aUdM5uXOHuxyk0Olsi6Me_osOzsOMV1c86AGcbzd-O_Ne-DILcj3k-u4Hcrv8BSl3oszxDcMjbBYWaIyZ0MC0WGtUJXPNHS2n9yrmGy5wIiT_7kWHnIx274pHZqfoTRkk4FJlQ/s1600/RenderToTexturePlay.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiidn1W6aUdM5uXOHuxyk0Olsi6Me_osOzsOMV1c86AGcbzd-O_Ne-DILcj3k-u4Hcrv8BSl3oszxDcMjbBYWaIyZ0MC0WGtUJXPNHS2n9yrmGy5wIiT_7kWHnIx274pHZqfoTRkk4FJlQ/s320/RenderToTexturePlay.PNG" /></a></div><br />
A simple render to texture experiment. Not interactive, but the texture is animated, so it may have instructive value.<br />
<br />
<b><span style="font-size: large;">FreewaySim</span></b><br />
<br />
A simple simulation to play with some of the dynamics of traffic and overtaking behaviours.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOMePkNjzcwSa-k_aVxxvRZf1VfwiLHfMLy_mWpCinbGLz3Wzv1a4XpgKhOW5c-MQw9WWqAAFfr_4elfLKZKmdoo91c5bs5J13EU8oig3ugEwvt6Gs-qhblOjIfAilAwdFuseaVkCBCpY/s1600/FreewaySim.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOMePkNjzcwSa-k_aVxxvRZf1VfwiLHfMLy_mWpCinbGLz3Wzv1a4XpgKhOW5c-MQw9WWqAAFfr_4elfLKZKmdoo91c5bs5J13EU8oig3ugEwvt6Gs-qhblOjIfAilAwdFuseaVkCBCpY/s320/FreewaySim.PNG" /></a></div><br />
<br />
Some of the parameters are in the Freeway constructor if you want to play around.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzte6doeNaQ08uXiaxdMIIB7E4ITcOGUkRRlD_U6SoLYEYoWfl2Cr96dOJUiGpJNsYOi4gjxjTmjoCcz0NOOy04v67iA8tSugisXWjJ6lxseavXsaO-3Bj3q_VG1NG8YhL330XPQc6w8/s1600/FreewaySim2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzte6doeNaQ08uXiaxdMIIB7E4ITcOGUkRRlD_U6SoLYEYoWfl2Cr96dOJUiGpJNsYOi4gjxjTmjoCcz0NOOy04v67iA8tSugisXWjJ6lxseavXsaO-3Bj3q_VG1NG8YhL330XPQc6w8/s320/FreewaySim2.PNG" /></a></div><br />
<b><span style="font-size: large;">EmptyWorld</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtAvwVUHV14CNy-PbDpY8iA2DwSB964N51Szbowu1WLn50_PNee5WEzhqHHKB4Gwy_QeCCnANQSMhdRGYc9uBbwPWd9W84ruo2qvArqO3MKVfxyQsa5Ft3qFLvdxkI2Vw5eCHS4ZEiof0/s1600/EmptyWorld.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtAvwVUHV14CNy-PbDpY8iA2DwSB964N51Szbowu1WLn50_PNee5WEzhqHHKB4Gwy_QeCCnANQSMhdRGYc9uBbwPWd9W84ruo2qvArqO3MKVfxyQsa5Ft3qFLvdxkI2Vw5eCHS4ZEiof0/s320/EmptyWorld.PNG" /></a></div><br />
<br />
Its an empty world. Its a simple 3D environment complete with scene picking and an intuitive camera behaviour which you can use to render whatever thing you're working with in a 3D space instead of the usual console window.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4578848417268948676.post-86456649073499706382010-08-09T15:57:00.004+10:002016-10-05T14:56:29.613+11:00AudioTest - a precursor to a Reactable simulator<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIW5ZRkw5KrwHzLOd_UoGJ7-Z8kRPAamABzxr2zkI0i-mu_Vp8EEgUZ2me9dYDxFj7xW4PJfBHd8GCyu3u-ULMaXIH0BwJBvdxJtjSRpPJkM66A9TyOFKVnFzjr0Fr5IunxYSmnsPX7zI/s1600/AudioTest.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a>Downloads:</b><br />
<ul>
<li><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/AudioTest_src_v002.zip">Source code</a></li>
<li><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/AudioTest_v002.zip">Win32 binaries</a></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIW5ZRkw5KrwHzLOd_UoGJ7-Z8kRPAamABzxr2zkI0i-mu_Vp8EEgUZ2me9dYDxFj7xW4PJfBHd8GCyu3u-ULMaXIH0BwJBvdxJtjSRpPJkM66A9TyOFKVnFzjr0Fr5IunxYSmnsPX7zI/s1600/AudioTest.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIW5ZRkw5KrwHzLOd_UoGJ7-Z8kRPAamABzxr2zkI0i-mu_Vp8EEgUZ2me9dYDxFj7xW4PJfBHd8GCyu3u-ULMaXIH0BwJBvdxJtjSRpPJkM66A9TyOFKVnFzjr0Fr5IunxYSmnsPX7zI/s320/AudioTest.PNG" /></a></div>
<br />
<br />
<br />
<br />
This application is a platform for some basic audio experiments and tests. It features:<br />
<br />
<br />
<ul>
<li>A <a href="http://www.lua.org/">Lua REPL</a> which permits the generation and modification of a waveform</li>
</ul>
<ul>
<li>Mouse modifiable waveform</li>
</ul>
<ul>
<li>Regeneration of waveform from Lua expression during the sliding of the sliders</li>
</ul>
<ul>
<li>The effects of modifications to the waveform are heard instantly, because it is being streamed as it is modified</li>
</ul>
<br />
It is my first foray into audio programming. It is a precursor for a <a href="http://en.wikipedia.org/wiki/Reactable">"Reactable"</a> simulator, similar to <a href="http://www.psychosynth.com/index.php/Main_Page">PsychoSynth.</a><br />
<br />
<b><span style="font-size: large;">Things to try</span></b><br />
<br />
When the program starts, a sample expression appears, along with the resulting waveform, and the audio of the waveform should be heard.<br />
<br />
Slide the first slider to alter the pitch of the waveform.<br />
<br />
Slide the second slider, and notice the waveform and audio change according to the expression in the expression text box.<br />
<br />
In the expression text box, enter a Lua expression that sets the variable "result". Variables you can refer to in the expression are:<br />
<br />
<ul>
<li><i><b>x</b></i> which is the time variable in the waveform, allowing you make "result" a function of time</li>
</ul>
<ul>
<li><i><b>p2</b></i>, which is the setting of the second slider (The first slider controls the pitch). To see the value of <i><b>p2</b></i>, run <i><b>print(p2)</b></i> in the provided Lua REPL.</li>
</ul>
<br />
For example, the expression:<br />
<br />
<i><b>result = 0.2 * math.sin(x * ((2.0 * math.pi) / p2))</b></i><br />
<br />
produces a sine wave whose frequency is modifiable with the second slider.<br />
<br />
There are some more example expressions in audiooutput.cpp.<br />
<br />Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-59785639829592664802010-08-07T21:55:00.008+10:002016-10-05T14:57:16.605+11:00QtLuaImagine<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE5RYhlkbLfqf2Lyrb4quRdBTlDJoaRJr5qn2fe2HzK2-uvq5sAVWiCU4QK8Ozc7mdOHxAasVnDg3-jJMPQ63ut6aUeKY2xwAqHpQuS0SJhdWhD772w4sMEKYUGt8LWr99O8fVEtbPRBs/s1600/QtLuaImagine.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE5RYhlkbLfqf2Lyrb4quRdBTlDJoaRJr5qn2fe2HzK2-uvq5sAVWiCU4QK8Ozc7mdOHxAasVnDg3-jJMPQ63ut6aUeKY2xwAqHpQuS0SJhdWhD772w4sMEKYUGt8LWr99O8fVEtbPRBs/s320/QtLuaImagine.PNG" width="265" /></a></div>
<br />
This project demonstrates the use of scripting languages in a Qt project to enable a 3D "live coding" environment. The scripting languages supported are <a href="http://www.lua.org/">Lua</a> and Scheme (through <a href="https://ccrma.stanford.edu/software/snd/snd/s7.html">s7 Scheme</a>). For a version which uses Common Lisp (through <a href="http://ecls.sourceforge.net/">ECL</a>), see <a href="http://createuniverses.blogspot.com/2009/09/qtimagine-skeleton-project-for-live.html">QtImagine</a> and <a href="http://createuniverses.blogspot.com/2009/09/qtcsg-constructive-solid-geometry.html">QtCSG</a>.<br />
<br />
The system calls the functions "update" and "render" in both languages to update and render the frame respectively. These functions can be redefined at runtime at the <a href="http://en.wikipedia.org/wiki/Read-eval-print_loop">REPL.</a><br />
<br />
When QtLuaImagine first starts, press "Enter" or click the "Execute" button to load an example Lua source file containing example definitions of update() and render(). Then, load the source file into your favourite text editor, make some changes, then load your freshly edited source file from the REPL by issuing the appropriate load command (dofile("filename.lua") for Lua, or (load "filename.scm") for Scheme) to see the effect of your change instantly. Of course, you can also enter expressions and definitions at the REPL itself. The REPL features a command history.<br />
<br />
I hope this provides a starting point for programmers getting into live coding for the first time.<br />
<br />
<a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/createuniverses/QtLuaImagine.zip">Download</a>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-62837089311245614262009-09-08T14:58:00.018+10:002011-12-01T12:32:51.087+11:00QtCSG - Constructive Solid Geometry scripted from ECL<div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMm7-lysGcRpsvf_xp0zjG-OphJ80BZumb6FTafF1KXOHrnMkBAPUDwQuJZihswpsUJMmWKQUWnxQ-OJCz7T1Y7HkAviLKXBMCF02lLSIPcOZ5doybXRBVtAgkihltq-UAaqXzq5AgqME/s1600-h/QtCSG.PNG" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5378956832077320930" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMm7-lysGcRpsvf_xp0zjG-OphJ80BZumb6FTafF1KXOHrnMkBAPUDwQuJZihswpsUJMmWKQUWnxQ-OJCz7T1Y7HkAviLKXBMCF02lLSIPcOZ5doybXRBVtAgkihltq-UAaqXzq5AgqME/s400/QtCSG.PNG" style="height: 400px; width: 325px;" /></a></div><br />
<br />
<br />
This project is the same as the earlier project, <a href="http://createuniverses.blogspot.com/2009/09/qtimagine-skeleton-project-for-live.html">QtImagine</a> except this also features an implementation of "Constructive Solid Geometry" operations that can be performed on 3D models such as difference, union and intersection. The algorithm for performing these operations comes from the <a href="http://unbboolean.sourceforge.net/">UnBBoolean</a> (<a href="http://unbboolean.sourceforge.net/">http://unbboolean.sourceforge.net/</a>) Java CSG implementation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM0nL77P_t6_-0yYpfpDEdTd7OGomeGRNnoKCqqvIxJCX1O5dG4wv5_OVcCj_F5KfoFDegEf_lHA6vZFZ70tM1b1arc6ICZVijE7pLZuWAN8GdBH3Z7pMKNHgfK35vL6Jwxcwj_0pTtiE/s1600-h/QtCSG2.PNG" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5378958389055468802" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM0nL77P_t6_-0yYpfpDEdTd7OGomeGRNnoKCqqvIxJCX1O5dG4wv5_OVcCj_F5KfoFDegEf_lHA6vZFZ70tM1b1arc6ICZVijE7pLZuWAN8GdBH3Z7pMKNHgfK35vL6Jwxcwj_0pTtiE/s400/QtCSG2.PNG" style="height: 400px; width: 325px;" /></a></div><br />
<br />
See the files csg-test.lisp, csg-test2.lisp and csg-test3.lisp for examples on how to use these features. To run them, note that they need to be loaded in order - first csg-test.lisp, then csg-test2.lisp, then finally csg-test3.lisp, since they reference objects that were created by earlier scripts.<br />
<br />
Similarly, see init.lisp and live-render.lisp for a live rendering example script.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwkR0oxK1m_lDPgbNpsmyRH_BoJqyuwlPYTUQ3qa-6Qgd0_Yw5tASNIzOqnPqYzujM__ZkZqtfsVZ0CJq4ZIjNhYEVmod1A_laaFs46dOfwoh7V5TTvAm0sSdSG1REQ89DqntF-dG2kc/s1600-h/QtCSG3.PNG" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5378958394785351618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXwkR0oxK1m_lDPgbNpsmyRH_BoJqyuwlPYTUQ3qa-6Qgd0_Yw5tASNIzOqnPqYzujM__ZkZqtfsVZ0CJq4ZIjNhYEVmod1A_laaFs46dOfwoh7V5TTvAm0sSdSG1REQ89DqntF-dG2kc/s400/QtCSG3.PNG" style="height: 400px; width: 325px;" /></a></div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-64291791458531203222009-09-01T17:27:00.021+10:002011-12-01T12:35:34.160+11:00QtImagine - a skeleton project for live coding using ECL<b>QtImagine has been updated!</b><br />
<br />
In the process of releasing <a href="http://createuniverses.blogspot.com/2010/08/qtluaimagine.html">QtLuaImagine</a>, I cleaned up the code for QtImagine. All lisp code is now run through a (handler-bind) block so that error messages can be captured. What this means is that error messages are displayed in the main window, so no more need to flip between the console and the main window when an error occurs. Also, grey streams have been used to redirect trace output to the main window as well.<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEXkkWfHkzHZY3ZxTcOCtwQUYN8My0nNisEI04B8YTYNSoJ8yTJ34Ttvv6fb5r_WO9GeONOxb8TShtgqEOoIj-0msx9qiifZLYtGo27FQjkXioDD-VMw6Tv7T7A8scjxY9ZqlesJz7T6I/s1600-h/Imagine.PNG" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5376398389863295010" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEXkkWfHkzHZY3ZxTcOCtwQUYN8My0nNisEI04B8YTYNSoJ8yTJ34Ttvv6fb5r_WO9GeONOxb8TShtgqEOoIj-0msx9qiifZLYtGo27FQjkXioDD-VMw6Tv7T7A8scjxY9ZqlesJz7T6I/s400/Imagine.PNG" style="height: 400px; width: 325px;" /></a></div><br />
<br />
This project demonstrates the use of <a href="http://ecls.sourceforge.net/">ECL</a> in a <a href="http://qt.nokia.com/">Qt</a> project to enable a 3D "live coding" environment.<br />
<br />
The system calls the lisp functions (update) and (render) to update and render the frame respectively. These functions can be redefined at runtime at the <a href="http://en.wikipedia.org/wiki/Read-eval-print_loop">REPL</a>.<br />
<br />
When QtImagine first starts, click the "Execute" button to load an example lisp source file containing example definitions of (update) and (render) which will produce a simple animation. Then, load the source file into your favourite text editor, make some changes, then load your freshly edited source file from the REPL by issuing the load command (load "live-render.lisp") to see the effect of your change instantly. Of course, you can also enter expressions and definitions at the REPL itself. The REPL features a command history.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4578848417268948676.post-22108087473167699782009-08-20T08:18:00.013+10:002018-01-24T17:01:29.311+11:00Scripting simulations with ECL<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPy7FD7sd_L5j273tdXy_L78itg1XAkhyphenhyphenl1NawsXZoUWaPwJ6GFiR62ZTSeFzozoQELAI1HuasxBBEixlejvNP8f0RA_oq1I-WZ1M3c3nr2gzLvayira8ibvPIBswdr9rllNZX8mxVBTA/s1600-h/01-craneloaded.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822649915418914" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPy7FD7sd_L5j273tdXy_L78itg1XAkhyphenhyphenl1NawsXZoUWaPwJ6GFiR62ZTSeFzozoQELAI1HuasxBBEixlejvNP8f0RA_oq1I-WZ1M3c3nr2gzLvayira8ibvPIBswdr9rllNZX8mxVBTA/s400/01-craneloaded.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a><br />
<br />
<b>Download:</b> <a href="https://drive.google.com/open?id=1BOP9kzYSCXkbUSF4RkOLuNxMYc4M3rtO">QtEclSmallSimulations2.zip (Win32 binary)</a><br />
<br />
I've been adding to the program mentioned <a href="http://createuniverses.blogspot.com/2009/06/embedding-lisp-interpreter-into-qt-app.html">in a previous post</a>. The circuit simulator and origami crease pattern editor are drivable from the lisp repl, and the verlet physics based paper simulator has been implemented and is manipulated from the repl.<br />
<br />
Also, the repl itself features command history.<br />
<br />
Here is the list of functions currently available from the repl:<br />
<br />
<span style="font-size: 130%; font-weight: bold;">ORIGAMI CREASE EDITOR</span><br />
<br />
<span style="font-weight: bold;">origami-start</span><br />
Initialises origami crease editor with a plain sheet of paper consisting of 1 four sided facet.<br />
<br />
<span style="font-weight: bold;">origami-end</span><br />
Clears the origami crease editor.<br />
<br />
<span style="font-weight: bold;">origami-creasecoords</span><br />
Takes 4 parameters (x1 y1 x2 y2) representing the 2 endpoints of a crease line.<br />
<br />
<span style="font-weight: bold;">origami-crease</span><br />
Takes 2 vertex ids (nodeA nodeB) and uses them as the 2 endpoints of a crease line.<br />
<br />
<span style="font-weight: bold;">origami-creasepp</span><br />
Takes 2 vertex ids (nodeA nodeB) and forms the crease from "folding" one vertex on the other. The crease line is the perpendicular bisector.<br />
<br />
<span style="font-weight: bold;">origami-creasell</span><br />
Takes 4 vertex ids (l1v1 l1v2 l2v1 l2v2) to describe the endpoints of 2 lines, and forms the crease from "folding" one line onto the other.<br />
<br />
<span style="font-weight: bold;">origami-fold</span><br />
Takes 3 vertex ids (nodeF nodeA nodeB) and attempts to fold nodeF around the (nodeA nodeB) line by finding its mirror on the other side. It does the same with connected vertices as necessary.<br />
<br />
<span style="font-weight: bold;">origami-makeverletpaper</span><br />
Makes a verlet physics representation of the current crease pattern, so it can be manipulated in the verlet physics environment.<br />
<br />
<span style="font-size: 130%;"><span style="font-weight: bold;">VERLET PHYSICS</span></span><br />
<br />
<span style="font-weight: bold;">verlet-lock</span><br />
Takes 1 vertex id, and fixes that node in space.<br />
<br />
<span style="font-weight: bold;">verlet-free</span><br />
Takes 1 vertex id, and frees that node if it was fixed.<br />
<br />
<span style="font-weight: bold;">verlet-freeall</span><br />
Removes all position constraints<br />
<br />
<span style="font-weight: bold;">verlet-rotate</span><br />
Takes 4 parameters (nodeF nodeA nodeB angle) and rotates nodeF around the axis defined by nodeA and nodeB using the angle parameter. As the system resolves this attempt to do this rotation, you'll see whether the system currently permits or rejects such a motion.<br />
<br />
<span style="font-weight: bold;">verlet-numnodes</span><br />
Returns the number of nodes.<br />
<br />
<span style="font-weight: bold;">verlet-numstruts</span><br />
Returns the number of struts.<br />
<br />
<span style="font-weight: bold;">verlet-show</span><br />
Not implemented - will show the given node id.<br />
<br />
<span style="font-weight: bold;">verlet-hide</span><br />
Not implemented - will hide the given node id.<br />
<br />
<span style="font-weight: bold;">verlet-showall</span><br />
Not implemented - will show all node ids.<br />
<br />
<span style="font-weight: bold;">verlet-hideall</span><br />
Not implemented - will hide all node ids.<br />
<br />
<span style="font-weight: bold;">verlet-addfstrut</span><br />
Not implemented - will add a folding strut, which is the same as the crease struts, but is marked as a folding strut, because it can be removed when a given fold is completed.<br />
<br />
<span style="font-weight: bold;">verlet-addsstrut</span><br />
Not implemented - will add a structural strut manually. For facets containing more than 3 edges, structural struts are necessary to keep those facets flat. For the crane model, all facets are triangular, so this isn't necessary yet.<br />
<br />
<span style="font-weight: bold;">verlet-removefstruts</span><br />
Not implemented - will remove all folding struts.<br />
<br />
<span style="font-weight: bold;">verlet-removesstruts</span><br />
Not implemented - will remove all structural struts.<br />
<br />
<span style="font-weight: bold;">verlet-autoaddsstruts</span><br />
Not implemented - will automatically add structural struts where needed for facets containing more than 3 edges.<br />
<br />
<span style="font-weight: bold;">verlet-satisfy</span><br />
Not implemented - will allow the user to manually invoke the verlet constraint resolver, rather than having it run all the time.<br />
<br />
<span style="font-size: 130%;"><span style="font-weight: bold;">CIRCUIT SIMULATOR</span></span><br />
<br />
<span style="font-weight: bold;">circuit-AddNode</span><br />
Takes 2 parameters (x y) and adds a new node at that location.<br />
<br />
<span style="font-weight: bold;">circuit-AddResistor</span><br />
Takes 3 parameters (nodeA nodeB resistance) and creates a resistor connecting nodeA and nodeB using the resistance parameter.<br />
<br />
<span style="font-weight: bold;">circuit-AddVoltage</span><br />
Takes 3 parameters (nodeA nodeB voltage) and creates a voltage source connecting nodeA and nodeB using the voltage parameter.<br />
<br />
<span style="font-weight: bold;">circuit-AddCurrent</span><br />
Takes 3 parameters (nodeA nodeB voltage) and creates a current source connecting nodeA and nodeB using the current parameter.<br />
<br />
<span style="font-weight: bold;">circuit-SetTweenA</span><br />
Takes 3 parameters (component x y) and adds a tween vertex on one side of the component. For circuit rendering purposes.<br />
<br />
<span style="font-weight: bold;">circuit-SetTweenB</span><br />
Takes 3 parameters (component x y) and adds a tween vertex on one side of the component. For circuit rendering purposes.<br />
<br />
<span style="font-weight: bold;">circuit-DoLoops</span><br />
Automatically finds the loops in the circuit. It is necessary to call this once modifications to the circuit are complete for the circuit to be simulated correctly.<br />
<br />
<span style="font-weight: bold;">circuit-Clear</span><br />
Clears the current circuit.<br />
<br />
<span style="font-weight: bold;">circuit-ShowCurrent</span><br />
Turns on the animated rendering of the current.<br />
<br />
<span style="font-weight: bold;">circuit-ShowComponents</span><br />
Turns on rendering of the components.<br />
<br />
<span style="font-weight: bold;">circuit-ShowNodes</span><br />
Turns on rendering of the nodes.<br />
<br />
<span style="font-weight: bold;">circuit-ShowLoops</span><br />
Turns on rendering of the loops.<br />
<br />
<span style="font-weight: bold;">circuit-HideCurrent</span><br />
Turns off the animated rendering of the current.<br />
<br />
<span style="font-weight: bold;">circuit-HideComponents</span><br />
Turns off rendering of the components.<br />
<br />
<span style="font-weight: bold;">circuit-HideNodes</span><br />
Turns off rendering of the nodes.<br />
<br />
<span style="font-weight: bold;">circuit-HideLoops</span><br />
Turns off rendering of the loops.<br />
<br />
<span style="font-weight: bold;">circuit-Rewire</span><br />
Takes 3 parameters (componentID nodeFrom nodeTo) and disconnects the component from nodeFrom and connects it to nodeTo.<br />
<br />
<span style="font-weight: bold;">circuit-DeleteComponent</span><br />
Takes a componentID as a parameter and deletes it.<br />
<br />
<span style="font-weight: bold;">circuit-DeleteNode</span><br />
Takes a nodeID as a parameters and deletes it if there is nothing connected to it.<br />
<br />
<span style="font-size: 130%;"><span style="font-weight: bold;">LIVE RENDERING</span></span><br />
<br />
<span style="font-weight: bold;">ogl-renderon</span><br />
Turn on live rendering<br />
<br />
<span style="font-weight: bold;">ogl-renderoff</span><br />
Turn off live rendering<br />
<br />
<span style="font-weight: bold;">ogl-drawline</span><br />
Takes 6 parameters (x1 y1 z1 x2 y2 z2) that describe a 3D line, and renders it. This can only be called from within the paper-render function. Redefine the paper-render function at will at runtime.<br />
<br />
<span style="font-size: 130%;"><span style="font-weight: bold;">OLD TEST FUNCTIONS</span></span><br />
<br />
<span style="font-weight: bold;">myadd</span><br />
Takes 2 parameters and adds them<br />
<br />
<span style="font-weight: bold;">myaddlist</span><br />
Takes a list and adds the numbers in the list.<br />
<br />
<span style="font-size: 130%; font-weight: bold;">Screenshots:</span><br />
<br />
Press "Execute" when the program starts to load the script which computes the crane crease pattern:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPy7FD7sd_L5j273tdXy_L78itg1XAkhyphenhyphenl1NawsXZoUWaPwJ6GFiR62ZTSeFzozoQELAI1HuasxBBEixlejvNP8f0RA_oq1I-WZ1M3c3nr2gzLvayira8ibvPIBswdr9rllNZX8mxVBTA/s1600-h/01-craneloaded.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822649915418914" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPy7FD7sd_L5j273tdXy_L78itg1XAkhyphenhyphenl1NawsXZoUWaPwJ6GFiR62ZTSeFzozoQELAI1HuasxBBEixlejvNP8f0RA_oq1I-WZ1M3c3nr2gzLvayira8ibvPIBswdr9rllNZX8mxVBTA/s400/01-craneloaded.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a><br />
<br />
Having a look at the crease pattern in the pattern editor:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQo9XYfy-6K1KvolE-JTV5da0RicHYHq9snNcgdxdkPNmry5shvU8sVoTOg9nNfCB4bZJ2BVJpqFTKfnSpzEwYxdlyFiTI_kO7ZfLtri50dBvMMgrvyAo7bdsvEXag7khJcmb5GZM2jfo/s1600-h/02-cranecrease.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822658882540914" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQo9XYfy-6K1KvolE-JTV5da0RicHYHq9snNcgdxdkPNmry5shvU8sVoTOg9nNfCB4bZJ2BVJpqFTKfnSpzEwYxdlyFiTI_kO7ZfLtri50dBvMMgrvyAo7bdsvEXag7khJcmb5GZM2jfo/s400/02-cranecrease.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a><br />
<br />
<span style="font-weight: bold;">Verlet physics paper manipulation and live rendering: </span>Calling verlet-rotate from the repl to rotate the 4 corner vertices at once, 0.1 degrees at a time (the rotation continues due to momentum), then calling ogl-renderon to turn on live rendering, and modifying the paper-render function live by loading live-render.lisp (the function simul-rotate has been defined for convenience to do the simultaneous rotation):<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGSYzHWgmIzlaaojdp3WO_5vxYEU8IKvNo9rbiAHkb1ePvFP3E6Ov4RXyJdGu1TdTMJ9VYVLXIRkGi3gzCvkG8YDEm6SOugMwISOumk0PrOFIqDPNvLlUGQzSo9MJletFHSSuKqaJt94s/s1600-h/04-liverender.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822670182164018" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGSYzHWgmIzlaaojdp3WO_5vxYEU8IKvNo9rbiAHkb1ePvFP3E6Ov4RXyJdGu1TdTMJ9VYVLXIRkGi3gzCvkG8YDEm6SOugMwISOumk0PrOFIqDPNvLlUGQzSo9MJletFHSSuKqaJt94s/s400/04-liverender.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a><br />
<br />
<span style="font-weight: bold;">Circuit simulator: </span>Switching to the circuit simulator and loading a circuit (block-circuit.lisp):<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWU4w_5W7cMNRgZK3MLzUivQv3CkEaE21laeGNzhT_N4eQ8PYh7hhICWkoNPJQKXhlfO7i3W42701_HjyqUDSXvZic6hRrNqQQCoqJjUS0C9PNb6_qF1do69HI3bCDFRqESQXi809d7c/s1600-h/05-loadcircuit.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822676454639794" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWU4w_5W7cMNRgZK3MLzUivQv3CkEaE21laeGNzhT_N4eQ8PYh7hhICWkoNPJQKXhlfO7i3W42701_HjyqUDSXvZic6hRrNqQQCoqJjUS0C9PNb6_qF1do69HI3bCDFRqESQXi809d7c/s400/05-loadcircuit.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a><br />
<br />
Loading the scripts "block-circuit2.lisp" and "block-circuit3.lisp" to modify the circuit:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAjVqeraIvZ5mzSGOfLnAYYDsDxd1mjDCVb5N-Xzf31ngNixABsIglT639M5GGl2EdjAKyUucOQDQ_6CvjZB7VXvV1rzfRf3CNhLzY2q3EWM5-prj2MSX5bMUKloTPStm01DaC-OdJVLE/s1600-h/07-changecircuit.PNG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5371822687111987538" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAjVqeraIvZ5mzSGOfLnAYYDsDxd1mjDCVb5N-Xzf31ngNixABsIglT639M5GGl2EdjAKyUucOQDQ_6CvjZB7VXvV1rzfRf3CNhLzY2q3EWM5-prj2MSX5bMUKloTPStm01DaC-OdJVLE/s400/07-changecircuit.PNG" style="cursor: pointer; height: 400px; width: 325px;" /></a>Unknownnoreply@blogger.com1