<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Mimicing birds</title>
		<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds</link>
		<description>Posts in the discussion thread &quot;Mimicing birds&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Tue, 12 May 2026 16:12:32 +0000</lastBuildDate>
		
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1749305</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1749305</link>
				<description></description>
				<pubDate>Tue, 09 Apr 2013 09:14:04 +0000</pubDate>
				<wikidot:authorName>StephaneMagnenat</wikidot:authorName>				<wikidot:authorUserId>709253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Indeed this works in more cases than the previous solution.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1748991</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1748991</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 21:11:08 +0000</pubDate>
				<wikidot:authorName>eziosoma</wikidot:authorName>				<wikidot:authorUserId>1452547</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>This will not run if you want to generate a number between zero and a number bigger than 32768/2.</p> <p>What about:</p> <div class="code"> <pre><code>v = abs(v % n)</code></pre></div> <p>instead?</p> <p>I have done some test with Thymio and it seems to run.</p> <p>The code I have used to test it is:</p> <div class="code"> <pre><code>var v = 0 var n = 32767 onevent button.forward call math.rand(v) v = abs(v % n)</code></pre></div> <p>Working in Aseba and looking at the Variables pane is possible to see the variable v to change randomly its value every time you press the forward button on Thymio.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1748664</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1748664</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 08:04:43 +0000</pubDate>
				<wikidot:authorName>StephaneMagnenat</wikidot:authorName>				<wikidot:authorUserId>709253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>In principle yes, but given the quality of our random number generator, I am not sure the effect is visible. There are also two problems for the distribution even with the division:</p> <ul> <li>the abs will not work if math.rand() returns -32768</li> <li>if the targetted number is not a divisor of 32768, then the distribution is skewed anyway</li> </ul> <p>So this code works in all cases, with a non-uniform distribution I agree:</p> <div class="code"> <pre><code>var v = 0 var n = 10 call math.rand(v) v = abs(v/2) % n</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1748643</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1748643</link>
				<description></description>
				<pubDate>Mon, 08 Apr 2013 06:20:53 +0000</pubDate>
				<wikidot:authorName>retp2401</wikidot:authorName>				<wikidot:authorUserId>890170</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Striclty speaking, using a modulo for constraining a random variable range is a bad idea as the distribution will be affected. You should use a division to constrain the range between -n and n, and then an addition to shift the mean and have a range between 0 and 2*n.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1744017</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1744017</link>
				<description></description>
				<pubDate>Tue, 02 Apr 2013 07:40:45 +0000</pubDate>
				<wikidot:authorName>StephaneMagnenat</wikidot:authorName>				<wikidot:authorUserId>709253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>math.rand() returns a random number between -32768 to 32767, if you want a number between 0 and n-1, do</p> <div class="code"> <pre><code>var v = 0 var n = 10 call math.rand(v) v = abs(v) % n</code></pre></div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1740910</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1740910</link>
				<description></description>
				<pubDate>Fri, 29 Mar 2013 09:37:51 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thank you for the information. Maybe I should try out beaglebone or arduino uno for this. But it will be definitely a bigger learning curve to use those.</p> <p>BTW: I need more information on the math.rand() function and how I can assign them to a variable, cause it didn't work the way I did. It would be even better to assign a random number between say 30 seconds to 1.5 minutes.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1740431</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1740431</link>
				<description></description>
				<pubDate>Thu, 28 Mar 2013 20:37:44 +0000</pubDate>
				<wikidot:authorName>retp2401</wikidot:authorName>				<wikidot:authorUserId>890170</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The sound sampling frequency is about 8Khz, which mean that the highest frequency you can get out of Thymio is 4Khz. According to this paper: S. Fagerlund, &quot;Acoustics and physical models of bird sounds&quot;, this is too low. Thus you cannot mimick birds with Thymio.</p> <p>BTW, the timer is limited because aseba can only handle signed 16 bits integer. But you can do a software counter inside the timer event to extend it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1740009</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1740009</link>
				<description></description>
				<pubDate>Thu, 28 Mar 2013 12:33:11 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>That worked. The meta-box wasn't showing up automatically. Unfortunately the sound is way to quiet on thymio to mimick a raven. :(</p> <p>BTW: Why is the timer limited to 65000&#160;ms? It's too less! :-)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1738254</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1738254</link>
				<description></description>
				<pubDate>Mon, 25 Mar 2013 21:24:40 +0000</pubDate>
				<wikidot:authorName>eziosoma</wikidot:authorName>				<wikidot:authorUserId>1452547</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Make sure that no metadata is set in the exported file as explained also by the video.</p> <p>The file you are exporting originally has two values in the first two metadata.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737943</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737943</link>
				<description></description>
				<pubDate>Mon, 25 Mar 2013 11:35:11 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>This is exaclty how I saved it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737895</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737895</link>
				<description></description>
				<pubDate>Mon, 25 Mar 2013 08:51:13 +0000</pubDate>
				<wikidot:authorName>StephaneMagnenat</wikidot:authorName>				<wikidot:authorUserId>709253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>A video showing how to make sounds with audacity is available <a href="http://www.youtube.com/watch?v=aWtPvnLYMps">on youtube</a>, hopefully it helps.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737654</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737654</link>
				<description></description>
				<pubDate>Sun, 24 Mar 2013 22:26:51 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>It means thymio is playing its default start sound instead of the .wav I saved under s0.wav on the SD-card. So my thought is that the format somehow could be wrong, but I saved it exactly as written in the wiki.</p> <p>Also: The s0.wav from a robot-library here works and the logo of that file is different. The one I exported got an audacity logo.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737634</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737634</link>
				<description></description>
				<pubDate>Sun, 24 Mar 2013 21:50:49 +0000</pubDate>
				<wikidot:authorName>eziosoma</wikidot:authorName>				<wikidot:authorUserId>1452547</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>What do you mean with &quot;doesn't work&quot;?<br /> You are no more able to reproduce the exported file on the MAC, you are not able to make Thymio reproduce it&#8230;</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737617</guid>
				<title>Re: Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737617</link>
				<description></description>
				<pubDate>Sun, 24 Mar 2013 20:59:21 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>BTW: I tried to save a .wav file in MAC OSX by using Audacity. The file I get under export contains the ADC-logo and it doesn't work (I used exactly the settings in the wiki 8000, .wav, 8bit.)</p> <p>Here is the original file:<br /> <a href="http://www.freesound.org/people/inchadney/sounds/159426/">http://www.freesound.org/people/inchadney/sounds/159426/</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-636513#post-1737323</guid>
				<title>Mimicking birds</title>
				<link>http://aseba.wikidot.com/forum/t-636513/mimicing-birds#post-1737323</link>
				<description></description>
				<pubDate>Sun, 24 Mar 2013 12:39:37 +0000</pubDate>
				<wikidot:authorName>Heidegger</wikidot:authorName>				<wikidot:authorUserId>1560534</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Has anyone used Thymio to mimick bird sounds? I'm a bit afraid the speaker isn't loud enough for it. I could find many .wavs of crows in the internet. But I think I do have to convert them first. Any ideas on matching the sound level of thymio with the birds sound level?</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>