tag:blogger.com,1999:blog-65155642474796094802024-03-13T22:53:30.476-07:003mpty's labA blog about my hacking, programming and music composing projects... also a lot of other useless stuff ;)3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-6515564247479609480.post-88920825854111787662017-03-14T17:57:00.001-07:002022-01-21T09:04:01.154-08:00ProzaKc Blues (Intro) - TranscriptionWriting here after a long time just to post the transcription of the initial part of ProzaKc Blues by King Crimson.<br />
The transcription is written for the piano. Here is a PNG version of it:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-q_uyNbBScu4/WMiX1qZLc5I/AAAAAAAAAxE/4zwWVVHj8UwfqVCj_hM-JSL5EPlaYuX7wCLcB/s1600/ProzaKc_Blues.png" style="margin-left: 1em; margin-right: 1em;"><img alt="king crimson prozakc blues piano transcription" border="0" height="320" src="https://1.bp.blogspot.com/-q_uyNbBScu4/WMiX1qZLc5I/AAAAAAAAAxE/4zwWVVHj8UwfqVCj_hM-JSL5EPlaYuX7wCLcB/s320/ProzaKc_Blues.png" title="" width="226" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
The PDF version, together with the MuseScore source files, is available on <a href="https://drive.google.com/file/d/0BwaW3XXsGj7UN2U2V0k0c3o2Qzg/view?usp=sharing&resourcekey=0-zGrJs5qCPSxYCha_lVgS6w">Google Drive</a>. MIDI/MP3 files also available.<br />
<br />
License: Creative Commons - <a href="http://creativecommons.org/licenses/by/4.0/" id="license_title_link" target="_blank">Attribution 4.0 International</a><br />
<br />Unknownhttp://www.blogger.com/profile/05904224536890247757noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-15994762129511254362013-09-24T17:02:00.001-07:002021-10-04T05:30:00.188-07:00Template presentazione tesi DEI/UniPD<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Siccome la gente che si laurea spesso ha di meglio da fare che inventarsi un layout per le slide da usare durante la discussione, ecco un template che ho fatto scopiazzando dalle diapositive di alcuni professori del DEI. Formato ODP e PPT.<br />
<br />
Ecco delle immagini del mio capolavoro:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-qf0PVLPsafY/UkImVFaqv9I/AAAAAAAAAIg/LQOqC3-_3wk/s1600/Selezione_001.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="http://1.bp.blogspot.com/-snlCq0X2aCw/UkImUy5c7jI/AAAAAAAAAIc/2AhSH55Eh7o/s1600/Selezione_002.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="http://4.bp.blogspot.com/-qf0PVLPsafY/UkImVFaqv9I/AAAAAAAAAIg/LQOqC3-_3wk/s1600/Selezione_001.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><img border="0" height="150" src="https://4.bp.blogspot.com/-qf0PVLPsafY/UkImVFaqv9I/AAAAAAAAAIg/LQOqC3-_3wk/s200/Selezione_001.png" width="200" /><a href="http://1.bp.blogspot.com/-snlCq0X2aCw/UkImUy5c7jI/AAAAAAAAAIc/2AhSH55Eh7o/s1600/Selezione_002.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://1.bp.blogspot.com/-snlCq0X2aCw/UkImUy5c7jI/AAAAAAAAAIc/2AhSH55Eh7o/s200/Selezione_002.png" width="200" /></a></div>
<br />
<a href="https://drive.google.com/file/d/0BwaW3XXsGj7UQkhic096dGF4UzA/view?usp=sharing&resourcekey=0-A3-AYUywRTh7OcCcOgKY6g">Il template è scaricabile da QUA.</a>Unknownhttp://www.blogger.com/profile/05904224536890247757noreply@blogger.com5tag:blogger.com,1999:blog-6515564247479609480.post-5255329027413741042013-07-09T06:31:00.000-07:002013-07-09T06:51:39.232-07:00Blender: Find the longest edge in a meshI had to write this simple script for my thesis on acoustic simulations on a 3D model of a human head (HRTF stuff).<br />
<br />
So this script iterates over all the selected edges of the current object and show the longest one's length (you have to look at the console to view the message).<br />
It also writes the maximum frequency that can be calculated using the BEM according to a paper by Brian Katz:<br />
<div style="text-align: center;">
$$f_{max} = \frac{c}{6 \times edge_{max}}$$</div>
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #FFFFFF; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: 1em; text-align: left; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #008800; font-weight: bold;">import</span> <span style="color: #0e84b5; font-weight: bold;">bpy</span>
sound_speed <span style="color: #333333;">=</span> <span style="color: #6600ee; font-weight: bold;">343.0</span>
obj <span style="color: #333333;">=</span> bpy<span style="color: #333333;">.</span>context<span style="color: #333333;">.</span>active_object
edges <span style="color: #333333;">=</span> obj<span style="color: #333333;">.</span>data<span style="color: #333333;">.</span>edges
vertices <span style="color: #333333;">=</span> obj<span style="color: #333333;">.</span>data<span style="color: #333333;">.</span>vertices
matrix <span style="color: #333333;">=</span> obj<span style="color: #333333;">.</span>matrix_world<span style="color: #333333;">.</span>copy()
mm <span style="color: #333333;">=</span> <span style="color: #6600ee; font-weight: bold;">0.0</span>
<span style="color: #008800; font-weight: bold;">for</span> ee <span style="color: black; font-weight: bold;">in</span> edges:
vv <span style="color: #333333;">=</span> ee<span style="color: #333333;">.</span>vertices
v1 <span style="color: #333333;">=</span> matrix <span style="color: #333333;">*</span> vertices[ee<span style="color: #333333;">.</span>vertices[<span style="color: #0000dd; font-weight: bold;">0</span>]]<span style="color: #333333;">.</span>co
v2 <span style="color: #333333;">=</span> matrix <span style="color: #333333;">*</span> vertices[ee<span style="color: #333333;">.</span>vertices[<span style="color: #0000dd; font-weight: bold;">1</span>]]<span style="color: #333333;">.</span>co
mm <span style="color: #333333;">=</span> <span style="color: #007020;">max</span>((v1<span style="color: #333333;">-</span>v2)<span style="color: #333333;">.</span>length, mm)
max_freq <span style="color: #333333;">=</span> sound_speed <span style="color: #333333;">/</span> (<span style="color: #0000dd; font-weight: bold;">6</span> <span style="color: #333333;">*</span> mm)
<span style="color: #008800; font-weight: bold;">print</span>(<span style="background-color: #fff0f0;">"Longest edge's length: </span><span style="background-color: #eeeeee;">%f</span><span style="background-color: #fff0f0;">"</span><span style="color: #333333;">%</span>mm)
<span style="color: #008800; font-weight: bold;">print</span>(<span style="background-color: #fff0f0;">"fmax: </span><span style="background-color: #eeeeee;">%f</span><span style="background-color: #fff0f0;">"</span><span style="color: #333333;">%</span>max_freq)
</pre>
</div>
Unknownhttp://www.blogger.com/profile/05904224536890247757noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-13024152288927436022012-09-22T06:46:00.000-07:002012-12-06T14:45:02.285-08:00How to get ASUS notebooks' media keys to work with Winamp/MusicBee/EtcLet me say it clearly: ASUS I Hate you.<br />
Ok, actually I don't hate asus. They make great products. I'm just ranting about the fact that they limited their notebooks' media keys to work only with, say, Windows Media Player or Media Center.<br />
<br />
I was a big Winamp user (I recently switched to MusicBee) and I was desperate to find a way to make my media keys work with it so I could play Left4Dead and skip songs while playing.<br />
<br />
After hours of googling I found the answer: <a href="http://zaak404.wordpress.com/2011/05/09/controlling-foobar2000-with-asus-g73-media-keys/">http://zaak404.wordpress.com/2011/05/09/controlling-foobar2000-with-asus-g73-media-keys/</a><br />
All you have to do is to replace ASUS' DMedia.exe (C:\Program Files (x86)\ASUS\ATK Package\ATK Media) with the supplied one and you are almost done. Zaak404's versione requires you to write a small configuration file to make his program interact only with one single media player... I'm lazy (and I reinstall windows frequently) so I made my own version of his program and it doesn't require any user effort.<br />
<br />
So, kudos to zaak404 for doing all the real (read "hard") work on this code. I just edited it to make it work "globally". I'm using windows' keybd_event function, which has been around from win 3.1 I think :D It's deprecated, but it still works in windows 7 so... I don't give a fuck about it ;)<br />
<br />
I packed the binary in a Zip file with a .bat file. To install it just right-click install.bat and run it as administrator. Now restart your PC and all should work fine. If it doesn't it probably means ASUS changed the default DMedia.exe's directory, so you have to find the new one and copy manually .\bin\Release\DMedia.exe.<br />
<br />
If you have any other problem, just drop a comment below.<br />
<br />
<a href="http://www.mediafire.com/download.php?dxxz2yki7bjj6vk">Download .ZIP</a><br />
<a href="https://bitbucket.org/3mpty/atkmediainterceptor">Repository@BitBucket</a>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com53tag:blogger.com,1999:blog-6515564247479609480.post-60699888938131228172012-04-02T11:46:00.000-07:002012-04-05T07:17:17.295-07:00Rainy Day (AKA "Random stuff in Processing")So here we are again... A little test-sketch done in Processing (<a href="http://processing.org/">http://processing.org/</a>) to test out the feasibility of some ideas, of my brother, about a simple art installation.<br />
<br />
The idea is to put a projector and a camera in a dark room. The projector would show a greyish background along with computer generated rain (simple stuff, not photorealistic) and cast the shadow of the people passing against a wall.<br />
Using the camera and some Processing/OpenFrameworks kung-fu the rain should start bouncing against shadows' edges.<br />
<br />
Here's a screenshot of the first sketch. Just trying out some ideas with a static and simple image:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-LExTk9x_hYc/T3nr5rCMF0I/AAAAAAAAAIE/RSxlxRisq8c/s1600/screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="214" src="http://2.bp.blogspot.com/-LExTk9x_hYc/T3nr5rCMF0I/AAAAAAAAAIE/RSxlxRisq8c/s320/screenshot.png" width="320" /></a></div>
<br />
The rendering (without the OPENGL option) is quite slow, as you can see in the applet linked below. That's due to some quick'n'dirty hacks to get the job done in less time. I also lowered the number of particles created per-frame.<br />
It also could take a lot to load because I'm using a 4MB mp3 for the background "music". I should definitely cut it :D<br />
<br />
<div style="text-align: center;">
<span style="font-size: large;"><a href="http://www.openprocessing.org/sketch/57835">Rainy Day (Sketch)</a></span></div>
<div style="text-align: center;">
<span style="font-size: large;"><a href="http://www.openprocessing.org/sketch/57835/show">Rainy Day (Applet)</a></span><br />
<br />
<span style="font-size: large;">Youtube Video:</span><br />
<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/3c5lTWw-yHI?feature=player_embedded' frameborder='0'></iframe></div>
<span style="font-size: large;"> </span></div>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-85662748943147709502011-12-09T10:54:00.000-08:002017-03-14T18:16:49.175-07:00Von Hertzen Brothers - Angel's Eyes (Keyboard Solo Transcription)Whoa,<br />
it has been a while since I wrote a post on this blog :D<br />
Anyway, today I transcribed the "fast notes, scale and arpeggios"-style solo you can hear toward the end of this song by Von Hertzen Brothers:<br />
<br />
<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/0KygVRdooJI?feature=player_embedded' frameborder='0'></iframe></div>
<br />
I just realized what I can do when I have to study engineering but I have no will to do it :P<br />
<br />
So, this is the download link pointing to a beautiful PDF of the sheet music:<br />
<div style="text-align: center;">
<a href="https://drive.google.com/open?id=0BwaW3XXsGj7UUnozcW44QzZ0NWM"><span class="Apple-style-span" style="font-size: x-large;">DOWNLOAD</span></a></div>
<br />
Oh, and one last thing: I the fingering is slightly off the notes' heads, and this is not my fault :) I'm trying a new notation application and it doesn't seem to properly support this feature.<br />
<br />
Hope you'll enjoy it... if you make a video playing the song and put it on youtube-alike please include a link to my blog (instead of linking directly to the PDF)3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-3319855377234729002011-06-06T14:04:00.000-07:002017-03-14T18:15:08.186-07:00Europe - Superstitious (Guitar Solo Backing Track)A few days ago I learnt this awesome solo (I've done it on the keyboards, obviously :D) by Europe.<br />
After something like, I think, 2 hours of learning it by ear and trying to play it at normal speed I managed to do it. So, I wanted a backing track to play along without the original guitar solo and... 5 minutes with a drum machine, an improvised bass guitar line and some PADs doing chords this is what I created, a nice sounding backing track of Superstitious:<br />
<a href="https://drive.google.com/open?id=0BwaW3XXsGj7Ua0U4Wm5tbjdEVEU">Europe - Superstitious (Guitar Solo Backing Track).mp3</a><br />
<br />
Feel free to drop a comment ;)3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com3tag:blogger.com,1999:blog-6515564247479609480.post-83262267054296479842011-04-23T13:44:00.001-07:002011-05-11T04:50:03.334-07:00"We Won't Get Fooled Again" Intro Sound - TutorialThis post will be an accurate tutorial on how to recreate the sound used by The Who in the song mentioned in the title (the post about Baba O’Riley was a descriptive and, you know, I can’t write properly in English :D… but I think the VST I coded was somehow easy to use enough to forgive about my writing “skills”).<br />
<br />
<b>UPDATE: This is what it sounds like :D</b><br />
<object height="81" width="100%"> <param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11716110&show_comments=true&auto_play=false&color=ff7700"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11716110&show_comments=true&auto_play=false&color=ff7700" type="application/x-shockwave-flash" width="100%"></embed> </object> <a href="http://soundcloud.com/paolomontesel/we-wont-get-fooled-again-intro">We Won't Get Fooled Again [Intro Sound]</a> by <a href="http://soundcloud.com/paolomontesel">Paolo Montesel</a><br />
<br />
<span style="font-size: 180%;">SOFTWARE NEEDED:</span><br />
<ul><li>Reaktor (You should be able to recreate the same patch in similar modular synth software and even on your average keyboard with 2 LFO… It can also be emulated with 1 LFO and 1 arpeggiator)</li>
<li>Plogue Bidule (That is, a modular VST host… just because it is much more flexible than ordinary hosts, but any decent host with insert effects could do)</li>
<li>Some kind of Organ/Hammond VST (even crappy :D)</li>
</ul><span style="font-size: 85%;"><span style="font-weight: bold;">Note:</span><br />
There’s some nice open source modular synth out there (ALSA Modular Synth, Ingen, etc…) and they can do what I do in this tutorial, but I’m not using them since they are quite instable and incomplete.</span><br />
<br />
<span style="font-size: 180%;">BIDULE PATCH</span><br />
First of all, let’s create the Bidule patch and later we will focus on the Reaktor part:<br />
<br />
<a href="http://1.bp.blogspot.com/-B_APwcfGQzk/TbM6eBrLnAI/AAAAAAAAAB4/pD0McsxcAiU/s1600/bidulePatch.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5598883049271696386" src="http://1.bp.blogspot.com/-B_APwcfGQzk/TbM6eBrLnAI/AAAAAAAAAB4/pD0McsxcAiU/s320/bidulePatch.png" style="cursor: hand; cursor: pointer; display: block; height: 265px; margin: 0px auto 10px; text-align: center; width: 224px;" /></a>The image is pretty self-explanatory but I’m gonna explain it anyway:<br />
<ul><li>UMX 49 – This is my USB Keyboard and is used as a MIDI input device</li>
<li>B4 II – Hammond VST</li>
<li>Reaktor5 – Native Instruments’ masterpiece ;)</li>
<li>Mixer – In this patch it is useless, but it’s there by default :D</li>
<li>ASIO4ALL – ASIO (low latency) audio output. Be sure of using an ASIO driver or you’ll be getting weird sounds (in Windows)</li>
</ul><span style="font-size: 180%;">WHAT WE ARE GOING TO DO IN REAKTOR</span><br />
<span style="font-style: italic;">Aka “What’s going on in the song?”</span><br />
<br />
Well it’s pretty simple. There’s the Hammond-like sound being put on and off something like 4-5 times a second and this is achieved by modulating the amplification of the organ with a square wave with values 0-1.<br />
Then there is a low pass filter controlled by a sinusoidal LFO.<br />
Yeah, I told you, simple.<br />
<span style="font-size: 180%;"><br />
REAKTOR</span><br />
<div style="text-align: center;"><span style="font-size: 130%;">ON/OFF</span></div>First of all, we create the on/off effect:<br />
<br />
<a href="http://3.bp.blogspot.com/-yC-v0Y38jNU/TbM6eThYSaI/AAAAAAAAACA/87uhHQ3GsZ4/s1600/reaktor1.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5598883054062422434" src="http://3.bp.blogspot.com/-yC-v0Y38jNU/TbM6eThYSaI/AAAAAAAAACA/87uhHQ3GsZ4/s320/reaktor1.png" style="cursor: hand; cursor: pointer; display: block; height: 79px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><span style="font-weight: bold;">1:</span><br />
<ul><li>“Tempo Info” is an object that give us the Beats Per Second setting of Reaktor, so if you take the inverse of it we get the frequency of the current tempo. “Mod Multi” is a Knob with step set to “1” and is used as a frequency multiplier (the multiplication is the “X” object). The point of having knobs is to make it easy to change parameters of the patch and tweak them easily.</li>
<li>The LFO (Low Frequency Oscillator, an oscillator that works at low frequencies) takes the frequency calculated and output a square wave (The output port is called “Pls” due to “Pulse”, another name for square wave) with amplitude 0.5, so we get a wave oscillating between [-0.5, 0.5].</li>
<li>The last block is simply adding 0.5 to the wave so we get it to oscillate between [0, 1]</li>
</ul><span style="font-weight: bold;">2:</span><br />
<ul><li>This isn’t a necessary step, but since the square wave contains a lot of high frequencies we get some “clicks” in the sound. So we simple filter it with a low-pass filter (LPF) and we get a square wave that is “less squared” :).</li>
<li>“Square Flt” is another knob.</li>
<li>“Log” is a Reaktor object used to turn a “frequency” signal to a “pitch” signal. If your modular synth uses plain freq signals you can avoid this.</li>
</ul><span style="font-weight: bold;">3:</span><br />
<ul><li>This is the easier block of the patch.</li>
<li>The 2 “In” are the audio inputs. The 2 “Out” are the ouputs.</li>
<li>“X” is, again, the multiplication.</li>
<li>Now we can press some key on our MIDI keyboard to hear how it sounds. Adjust the knob value as you want (for the filter knob I have 100, the other should be as accurate as possible to the original track).</li>
</ul><div style="text-align: center;"><span style="font-size: 130%;">LFO-CONTROLLED LPF</span></div><br />
<a href="http://2.bp.blogspot.com/-10RwtAGjHi4/TbM6efk_ymI/AAAAAAAAACI/M8qtH-NpNV0/s1600/reaktor2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5598883057298819682" src="http://2.bp.blogspot.com/-10RwtAGjHi4/TbM6efk_ymI/AAAAAAAAACI/M8qtH-NpNV0/s320/reaktor2.png" style="cursor: hand; cursor: pointer; display: block; height: 253px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><span style="font-weight: bold;">1:</span><br />
<ul><li>This time we are gonna use a sinusoidal wave so we connect the “Sin” output of the LFO. “LFO Freq” and “LFO Amp” are knobs (See the last snapshot to see some nice values to start with to create your own sound).</li>
</ul><span style="font-weight: bold;">2:</span><br />
<ul><li>Here we have 2 knobs. The first, “LFO Filter Res”, is the parameter used to set the LPF resonance (if you don’t know what it is just play a bit with the knob and hear the difference… for the technical explanation Google something like “resonant low pass filter”).</li>
<li>LFO Offset is added to the LFO output to get values between [Offset-Amp, Offset+Amp] otherwise we would get the sound filtered way too much.</li>
<li>Both the signal are then converted to pitch signals used to control the 2 filters (one for the left channel, the other for the right one).</li>
</ul><span style="font-weight: bold;">3:</span><br />
<ul><li>Instead of connecting the stuff from the first part of the tutorial directly to the outputs we insert two LPF controlled by the LFO in 1.</li>
</ul><br />
<div style="text-align: center;"><span style="font-size: 130%;">FINAL PATCH AND PANEL<br />
</span></div><br />
<a href="http://1.bp.blogspot.com/-eCM-VFNlJKw/TbM6e5pYSJI/AAAAAAAAACQ/to51obr9zEk/s1600/reaktorComplete.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5598883064296523922" src="http://1.bp.blogspot.com/-eCM-VFNlJKw/TbM6e5pYSJI/AAAAAAAAACQ/to51obr9zEk/s320/reaktorComplete.png" style="cursor: hand; cursor: pointer; display: block; height: 122px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><a href="http://3.bp.blogspot.com/-D0Wyw4HIuOc/TbM6fOCxgWI/AAAAAAAAACY/Zs5UwNd7pRA/s1600/reaktorPanel.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5598883069771743586" src="http://3.bp.blogspot.com/-D0Wyw4HIuOc/TbM6fOCxgWI/AAAAAAAAACY/Zs5UwNd7pRA/s320/reaktorPanel.png" style="cursor: hand; cursor: pointer; display: block; height: 165px; margin: 0px auto 10px; text-align: center; width: 295px;" /></a><span style="font-weight: bold;">The “Mod Multi” knob value is totally wrong because the last time I opened this patch I played a bit with it ;).</span><br />
<br />
<span style="font-size: 180%;">FINAL WORDS</span><br />
Now you are ready to have fun playing We Won’t Get Fooled Again :) Feel free to drop a comment if you need some help. I’m not gonna upload the final patch since I want you to do it with your hands and learn something :P<br />
<br />
I should definitely try to do this in ALSA Modular Synth or Ingen, but these two softwares are way too instable… Ingen looks promising and I’ve been using it for some tests but from the SVN activity I saw it’s no longer actively developed. Too bad, someone should take the duty of doing some serious bug-hunting, develop it in the area where it lacks features and package it for the major Linux distribution (Ubuntu Maverick doesn’t include it in the official repos) because it could become the defacto open source modular synth.<br />
<br />
I really hope the open source audio community will be able to fill the gap with Windows and Mac since I’m a huge Linux user/fan… Trust me, I tried hard to do some serious audio stuff in Linux but when I tried to do something more than the basic stuff I could not find the proper software. Ardour is amazing but it needs some improvement on the plugin/sidechaining part.<br />
I dunno why but on Windows I get no clicks (xrun in jack’s jargon) while on Linux I get some clicks in the audio even if I lower the audio quality and all…<br />
<br />
<span style="font-weight: bold;">P.S.: I’m not a Reaktor guru so it’s probable that there are easier ways to get the job done, but I don’t know them :D<br />
</span>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com4tag:blogger.com,1999:blog-6515564247479609480.post-84595853269926734422011-03-20T12:52:00.000-07:002017-03-14T18:16:02.445-07:00Baba O'Riley intro sound - tutorialLet's try to explain how to obtain the sound used in the intro of one of The Who's masterpieces. Pete Townshend in the original recording used a Lowrey organ with a feature called "Marimba Repeat" that gives the exact effect of the song. Basically it is an arpeggiator-like technique: the notes on the keyboard are splitted into two parts. The first ones play down beat and the others upbeat, thus creating a rapid alternating of them.<br />
<br />
So, in Baba O'Riley, F and C play down beat and, say, D and E play upbeat. I managed to emulate that effect using my KORG Triton with 2 custom arpeggiators and splitting the keyboard. Maybe I'll write something about it or just upload the patch. Instead, I wanna explain how to use a simple VST I coded for the exact reason of emulating the "Marimba Repeat".<br />
<br />
First of all, you need to use some kind of modular or semi-modular VST host (the kind that allow you to "wire" audio & midi i/o the way you want) because, due to techinal issues, applications like Cubase don't allow you to use the plugin as a "MIDI Effect". A good host is Plogue Bidule.<br />
<br />
This is a picture of the patch you have to create:<br />
<br />
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-dOSw8n4NvYw/TYZh217kivI/AAAAAAAAABo/8jxmrOAZrWU/s1600/patch.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5586259982617447154" src="https://4.bp.blogspot.com/-dOSw8n4NvYw/TYZh217kivI/AAAAAAAAABo/8jxmrOAZrWU/s200/patch.png" style="cursor: hand; cursor: pointer; height: 139px; width: 200px;" /></a></div>
<br />
It is pretty simple: Input Device -> Marimba Repeat Emu -> VSTi (mdaEPiano in the image) -> Audio Output. The brighter wires are MIDI connections. The audio i/o of Marimba Repeat Emu are dummy and are there only to make some VST hosts happy.<br />
All you have to do now is playing some notes to hear how it sounds like.<br />
<br />
Let's explain the MRE interface:<br />
<br />
<div style="text-align: center;">
<a href="http://4.bp.blogspot.com/-ouk2BJzGMV4/TYZixp19jFI/AAAAAAAAABw/SPMdCeb4XIk/s1600/plugin.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5586260992984976466" src="https://4.bp.blogspot.com/-ouk2BJzGMV4/TYZixp19jFI/AAAAAAAAABw/SPMdCeb4XIk/s320/plugin.png" style="cursor: hand; cursor: pointer; height: 320px; width: 184px;" /></a></div>
<br />
It's pretty minimalistic and there's also a small help if you click on "Help/About". This is how it works: instead of playing certain notes down beat and the others upbeat it splits the keyboard in two part (much like my Triton patch does) so that the left keys play down beat and the right upbeat. It also allows you to transpose the right part of the keyboard. The "keyboard split" parameter adjust the key used to split the keyboard. "BPM" obviously sets the speed and velocity (%) sets the MIDI velocity associated with the notes.<br />
<br />
So, to play Baba, with the left hand keep plaing F C F C F and so on in sync with the arpeggiator and with the right hand play, for example, D and E.<br />
<br />
I made this crappy video to show my triton patch but, since the principle is the same, it gives you an idea of what you get doing what I suggested.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="349" src="https://www.youtube.com/embed/zyfoyY60iwo" title="YouTube video player" width="400"></iframe><br />
<span style="font-size: 180%; font-weight: bold;"><br />Download: <a href="https://drive.google.com/open?id=0BwaW3XXsGj7UUFhjeUg1RXFfRk0">Marimba Repeat Vst</a></span>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com13tag:blogger.com,1999:blog-6515564247479609480.post-35421813422345801592011-02-01T15:31:00.000-08:002017-03-14T18:21:51.461-07:00Merge Google Maps chunks in a single, large, imageYesterday I was asked by my brother (an art student in Venice) to write some kind of application to merge Minecraft-Overviewer map chunks in a single image for a project he is doing for an exam (I have not a clue of what he is gonna do :D).<br />
<br />
Minecraft-Overviewer can be used to render Minecrat's maps and make them navigable in a browser using Google Maps API, so my python script actually works on any Google Maps image chunks.<br />
<br />
To use it, just type in a terminal:<br />
<pre style="background: none repeat scroll 0% 0% rgb(246 , 248 , 255); color: rgb(0 , 0 , 32);">.<span style="color: rgb(48 , 128 , 128);">/</span>mergeMap.py <span style="color: rgb(0 , 125 , 69);"><blahblah/ZoomN></span> <span style="color: rgb(0 , 125 , 69);"><output.ext></span></pre>
Where "ext" can be any format supported by Python's PIL library (so PNG & JPG for sure).<br />
<br />
BIG WARNING:<br />
With Zoom > 4 the processing time / disk space required / RAM required could easily become a problem and the OS could freeze ;)<br />
<br />
Download: <a href="https://drive.google.com/open?id=0BwaW3XXsGj7UWkxua2Jld05yTHM">mergeMap.py</a><br />
Screenshot: <a href="https://drive.google.com/open?id=0BwaW3XXsGj7UT3pjRzZ3blZUbkk">Zoom6.jpg</a> <a href="https://drive.google.com/open?id=0BwaW3XXsGj7UOEFWQTR2Y0Fmek0">Zoom5.jpg</a><br />
(Sorry, no thumbinals... they are HUGE images :D something like 10K x 10K and 20K x 20K pixels)3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com2tag:blogger.com,1999:blog-6515564247479609480.post-14134930806593781382011-01-18T13:52:00.000-08:002017-03-14T18:01:51.973-07:00Yann Tiersen TranscriptionI transcribed a simple (yet beautiful) piece of music by French composer Yann Tiersen. Check it out ;)<br />
<br />
<a href="https://drive.google.com/open?id=0BwaW3XXsGj7USENwUVFmZWJYdUU">Comptine d'été n° 3</a><br />
<br />
I made them with MuseScore (an Open Source program that's a bit of an hack) and should be 99% correct ;) If not, please let me know.3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-31317707641121544482010-03-01T14:38:00.001-08:002010-03-01T14:47:35.282-08:00First post about my music ;)<div>I composed this some time ago from an idea I got while "improvising" on my father's acoustic guitar. I'm not a guitarrist so it is a simple song (actually it is a part of a song) but I like it and I'm trying to finish it. The drum kit part isn't appropriate because I can't play the drums so I wrote only something to give an idea, leaving the task of writing the final version to some drummer friend of mine xD.</div><div><br /></div><div>WARNING: The midi file is played by sequencer of windows so it doesn't sound very well ;)</div><div><br /></div><div>Download link:</div><a href="http://sites.google.com/site/3mptyslab/empty.mp3">3mpty - Empty</a> (Work In Progress)<div>(All rights reserved, at least for the moment)</div><div><br /></div><div>Tell me what ya think :)</div><div>3mpty</div><div><br /></div><div>[Ongoing projects: a pesudo-funky prog metal song :D]</div>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-19538976690235944562009-07-24T08:11:00.000-07:002009-07-24T08:44:14.293-07:00Experimenting with haXeSo, I found on the web this nice language that can compile to flash/javascript/php and other bytecodes (even to pure binary) and I decided to give it a try.<br /><br />And, also, some time ago I started to wonder if I could make a Facebook app (a game).<br />I started to think to something easy to make and funny to play and then a little flash game on a site with some simple tutorials reminded me of a stupid game I wrote in C at school using only OpenGL's rectangle and triangle.<br /><br />I spent something like 3 hours trying to code a GameMaker-like engine in flash, but I wasn't able to figure out how the flash drawing system works.<br />Tired, I pointed my browser to Google and found this nice <a href="http://gm2d.com/2009/02/simple-flash-game-in-haxe/">tutorial</a> on making a 2D game with haXe. Its approach to bitmap blitting is odd: it creates a BitmapData object for the screen, then it creates a Bitmap from it and adds it to the root (flash.Lib.current).<br /><br />I adapted some of the tutorial code to my engine and now I have some rectangle moving on the screen :). The next step will be to add support for animating sprite and then I can start the funny part: programming the gameplay.<br /><br />Here is the demo (only 6Kb, you should understand why it is so small xD):<br /><embed src="http://sites.google.com/site/3mptyslab/haXe_demo.swf" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="200" width="320"></embed>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-21026802887605474332009-06-25T06:28:00.000-07:002009-06-25T06:41:08.976-07:00New release of KlonDukeNew release of my tool to edit iPod Klondike savefiles!<br /><br />Well, actually it is not a new release, I just rewrote the old code using Qt4 instead of FLTK.<br />Advantages? Easier to compile, solves some issue and looks nicer :).<br /><br />You can download the linux binary or the source code from <a href="http://code.google.com/p/emptylab/">emptylabs @ Google Code</a> (it is name v0.2).<br /><br />Some screenshots (before, after, about):<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Jn6tlJtVRZk/SkN895le1uI/AAAAAAAAAA8/792rEuIbHKU/s1600-h/original.png"><img style="cursor: pointer; width: 82px; height: 200px;" src="http://3.bp.blogspot.com/_Jn6tlJtVRZk/SkN895le1uI/AAAAAAAAAA8/792rEuIbHKU/s200/original.png" alt="" id="BLOGGER_PHOTO_ID_5351258185118176994" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Jn6tlJtVRZk/SkN8-BOnvHI/AAAAAAAAABE/tBGQPWGKSVA/s1600-h/duked.png"><img style="cursor: pointer; width: 82px; height: 200px;" src="http://1.bp.blogspot.com/_Jn6tlJtVRZk/SkN8-BOnvHI/AAAAAAAAABE/tBGQPWGKSVA/s200/duked.png" alt="" id="BLOGGER_PHOTO_ID_5351258187169774706" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Jn6tlJtVRZk/SkN8-bH_DwI/AAAAAAAAABM/U9mtUqwRl6w/s1600-h/about.png"><img style="cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_Jn6tlJtVRZk/SkN8-bH_DwI/AAAAAAAAABM/U9mtUqwRl6w/s200/about.png" alt="" id="BLOGGER_PHOTO_ID_5351258194121264898" border="0" /></a><br /><br />P.S.: If someone manages to compile it under MSVC or XCode I'll be happy to link it here :)3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-77523148193880081012009-05-24T04:34:00.000-07:002009-05-24T04:42:29.880-07:00iPod LyricsTired of manually downloading songs lyrics and copy-paste into plain-text files to view them in iPod's "Notes", I searched the web for a site that could do it for me. I only found some applications to download and use on my computer but it was not what I was looking for, so i wrote a simple python script to do the job.<br />After thinking a little about it I realized that I could simply write a "one page" website that sent request to my little script... so I did it and if you open you browser at <a href="http://ipodlyrics.x10hosting.com/">http://ipodlyrics.x10hosting.com/</a> you'll find a beta version of it.<br /><br />3mpty3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com1tag:blogger.com,1999:blog-6515564247479609480.post-73060396680912568782009-04-03T11:00:00.000-07:002011-05-10T11:03:59.846-07:00Ingen: Opensource Modular SynthAfter trying alsa modular synth and seeing it crashing every 2 mins, I decided to search the web for something better... and I found Ingen.<br />
<br />
<div style="text-align: center;"><a href="http://drobilla.net/blog/wp-content/uploads/2008/09/ingen.png"><img alt="A simple MIDI-controlled synthesizer patch" class="size-full wp-image-33" height="232" src="http://drobilla.net/blog/wp-content/uploads/2008/09/ingen.png" title="Saw/Lowpass Synth" width="300" /></a></div><br />
Ingen is a software that uses LADSPA and LV2 plugins, connected with each other, to create synths. LV2 is a new format of plugin, that probably will substitute the old and limited LADSPA if all goes right.<br />
LV2 gives the programmer the possibility to create a custom GUI, just like VSTs do.<br />
<br />
You can install Ingen from your distro's repository, but if the version you get is not up to date, you should checkout the latest from SVN: If you are able do deal with the console, the second is the better choice, because it means more stable software.<br />
<br />
On <a href="http://dev.drobilla.net/wiki/IngenInstallation">this page</a> there's the step-by-step guide to compile it from SVN.<br />
(The build system, waf, needs python 2.x to work.)<br />
<br />
If you get an error ending with<br />
<div style="background-color: #c8c8c8;"><span class="Apple-style-span" style="color: #000000;">/giomm-2.4/giomm/error.h:97: error: expected declaration before ‘}’ token Build failed</span><br />
<span class="Apple-style-span" style="color: #000000;">-> task failed (err #1):</span><br />
<span class="Apple-style-span" style="color: #000000;">{task: cxx ConnectWindow?.cpp -> ConnectWindow?_1.o}</span></div><br />
I managed (in a not so good way) to "solve" it:<br />
Just open the file error.h (that should be in some folder like "/usr/include/giomm-2.4/giomm/") and skip the source to the line indicated by the number indicated (in this case, 97). After that, change the line from "HOST_NOT_FOUND," to "HOST_NOT_FOUND_," and do the same for the next line.<br />
Then recompile with ./waf and all should work fine. After compiling, reopen error.h and revert the changes.<br />
<br />
Now, a simple "sudo ./waf install" or "./waf install" if you are already root installs the app on your system.<br />
To run it, if you don't see it on the app menu, open a shell and write "ingen -eg": this will start ingen with the graphical frontend.<br />
<br />
As I wrote before, Ingen needs plugins installed on your computer, otherwise it is quite useless.<br />
Here are some links to good plugins:<br />
<ul><li><a href="http://calf.sourceforge.net/">Calf</a></li>
<li><a href="http://plugin.org.uk/lv2/">SWH</a></li>
<li><a href="http://blop.sourceforge.net/">Blop</a></li>
<li><a href="http://ll-plugins.nongnu.org/index.html">Misc LV2 plugins</a></li>
</ul>Ingen automatically adds LV2 plugins in its menu, while for LADSPA ones you must right click->find.<br />
<br />
If you have any problem or question, just leave a comment or write some line on Ingen's IRC channel on freenode.<br />
<br />
I hope to write a short tutorial to describe how to create a simple synth with ADSR ampli.<br />
<br />
3mpty3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-68493118688190633902009-03-13T08:41:00.001-07:002012-04-02T10:54:37.027-07:00Python CGI Debugging howto: Part 2Ok, in the previous post I wrote that probably there was a better way to display errors for cgi script in python, so, here it is:<br />
<br />
<div style="background-color: #ffffff;"><span style="color: blue; font-weight: bold;">import </span>cgitb<br />
cgitb<span style="font-weight: bold;">.</span>enable<span style="font-weight: bold;">() </span><span style="color: green; font-style: italic;">#This enable it all<br />
</span></div><br />
<br />
Two lines :)<br />
<br />
Simply put them at the beginning of a script and they do all the work. It's also possible to output errors in a log file instead of displaying them in the browser of the user (just take a look at python documentation on cgitb.enable()), a far better solution for production environment.3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-13658311418180998672009-03-13T07:41:00.000-07:002009-03-13T08:10:37.068-07:00Python CGI Debugging howtoI found this useful when you are trying to debug a python script running on a remote server (that has a previous version of python, in my case :( ).<br /><br />To show the classic interpreter error messages just do this:<br /><br /><div style="background-color: #DDDDDD;"><span style="color: blue; font-weight: bold;">import </span>sys<br />sys<span style="font-weight: bold">.</span>stderr <span style="font-weight: bold">= </span>sys<span style="font-weight: bold">.</span>stdout<br /><br /><span style="color: blue; font-weight: bold">print </span><span style="color: red">"Content-type: text/html\n"<br /></span></div><br /><br />In this way, we set the errors to output text on the standard output (in other words, we redirect the errors to the standard output), then we print the standard HTTP header to inform the browser that the following text will be an HTML page (even text/plain works fine) and if we get an error, it will be in some part of the page source :D.<br /><br />Simple, probably not the best, but it works.3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0tag:blogger.com,1999:blog-6515564247479609480.post-85365840821155734512009-01-22T06:59:00.000-08:002009-01-30T07:09:16.933-08:00KlonDuke 0.1Here's my new useless software: <span style="font-weight: bold;">KlonDuke</span><br />It's a graphical application based on the FLTK2 toolkit that lets you edit savefiles of the iPod game "Klondike".<br /><br />(You must have already saved a game to use this tool)<br />It's really simple, just open it, click on "Open", select the "datafile" in the directory IPODDIR/iPod_Control/gamedata_RW/110xx (Where IPODDIR is the directory where the disk is mounted on unix-like systems or something like F: in Windows, and 110xx is the game ID starting by 110 with the last two digits changing from version to version), edit whatever you want (if it shows a wrong player name it's better that you simply close the program), click "save" and then "close" or "quit".<br /><br />If something goes wrong you can delete the datafile from klondike's directory and the game will create a new one.<br /><br /><span style="font-weight: bold;">Screenshot:</span><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Jn6tlJtVRZk/SXiT0atsPaI/AAAAAAAAAAM/RhCV67vx6qA/s1600-h/screenshot.png"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer; width: 171px; height: 320px;" src="http://4.bp.blogspot.com/_Jn6tlJtVRZk/SXiT0atsPaI/AAAAAAAAAAM/RhCV67vx6qA/s320/screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5294143890707463586" border="0" /></a><br /><br /><span style="font-weight: bold;">Sources:</span> <a href="http://emptylab.googlecode.com/files/klonduke-0.1.tar.gz">klonduke-0.1.tar.gz</a><br />SHA1 Checksum: 334d212c228e354a9643693f1ecd51b7c028763a<br /><span style="font-weight: bold;">Linux binary:</span> <a href="http://emptylab.googlecode.com/files/klonduke-0.1_linux.tar.gz">klonduke-0.1_linux.tar.gz</a><br />SHA1 Checksum: <span style="white-space: nowrap;">5441f93807876dda33dfb8b454a86717647fdd8b</span><br /><span style="font-weight: bold;">Windows binary:</span> I'm having problem with FLTK2 and MinGW<br /><span style="font-weight: bold;">Mac binary:</span> I don't have a Mac!<br /><br />P.S.:<br />If you want to make a precompiled executable that isn't listed there simply leave a comment. I need a Mac binary and a MS VC++ one (VC is better than MINGW).3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com1tag:blogger.com,1999:blog-6515564247479609480.post-20483032167183503942009-01-21T06:44:00.000-08:002009-01-21T08:56:11.375-08:00FLTK2 howto: Display images on widgetsI spent some time figuring out how to do this. Yes, you simply call:<br /><br /><span style="font-family:arial;">widgetName->image(myPrettyImage);</span><br /><br />But (at least for me) this did not work.<br />So I searched in the documentation but all seemed right.<br />The next logical step was "search on Google" (everyone should know that "he is your friend").<br /><br />I read something on a forum regarding the function <span style="font-family:arial;">fltk::register_images()</span> (Absolutely not documented) and I understood that it must be called before you use any other image-related stuff with fltk2.<br /><br />So, if you want a widget to display your beautiful image you must code a main() like this:<br /><br /><pre><br />#include "myMainWindowWithBackgrounImage.h"<br />#include <fltk/SharedImage.h><br />#include <fltk/run.h><br /><br />int main()<br />{<br /> fltk::register_images();<br /> myMainWindowWithBackgroundImage win;<br /> win.show();<br /> return fltk::run();<br />}<br /></pre>You must then link the executable to libpng, libjpeg and libfltk2_images passing <span style="font-family:arial;">"-lpng -ljpeg -lfltk2_images" <span style="font-family:times new roman;">to the compiler.</span><span style="font-family:webdings;"><span style="font-family:verdana;"><span style="font-family:trebuchet ms;"><span style="font-family:times new roman;"><span style="font-family:lucida grande;"></span></span></span></span></span></span><span style="font-family:georgia;"><span style="font-family:courier new;"></span></span>3mptyhttp://www.blogger.com/profile/06525317408892079080noreply@blogger.com0