Posted on: 14. Feb, 2012 [ 10:00 ] - Last edit: 14. Feb, 2012 [ 10:03 ]

Making a music box in SuperCollider

I need to make a broken music box sound for a project of my wife. I didn't wanted to search the whole Logic sample library to find nice instruments, it was a good oportunity to make some sound design with SuperCollider. After making a little pattern for spawning some synths and chords (happy major melodies of course, it's a music box!) I started working on the sound. From a simple sine wave with a percussive envelope, the first change was to use a ringing filter and a trigger with a decay. This sounded already much better, because of the first attack. I later combined it with a very short array of sine waves with some harmonics slightly out of tune. Much better, but then I thought about filter the whole sound to damp a little bit the sound, making it less brilliant and sound more kind of broken. I didn't knew modulating the frequency of that filter would make such a difference. The sound started to be more natural, the percussive part at the beginning now much punchier and more broken sound, even if the sound was still bright, I think this did what I was looking for. You can look at the code below and try it out in SuperCollider

Posted on: 3. Dec, 2011 [ 18:20 ] - Last edit: 3. Dec, 2011 [ 20:32 ]

Lua AV

I've been playing around with LuaAV mostly with OpenGL primitives, lines, dots, the usual stuff... I really got fond of Lua by using löve. It was really easy and simple so I started making animation and try to make some small games. Never finished one, but I understood the power of Lua, and then I got to try LuaAV, which is capable of the same things, but much more flexible (specially for animations) and allows tridimensional space (löve is constrained to 2D). So basically one needs much more code (all the OpenGL calls) but is nothing a quick library with wrappers wouldn't solve. I still haven't got to write 'my own' library, but there are now some functions I copy from file to file.

Anyway, here are some examples I've made this week, one of them is a port of the recursion toy by soulwire and some other graphics I've achieved messing around with lines and trying to do my own kind of recursion toy, which resulted more in a random walk but the results were quite funny.

If you are into graphics I suggest you to try LuaAV. I've never done something productive with processing or similar software (which is usually recommended for beginners). I guess the simple concepts of Lua gave me a better idea how to use it (and the most 'easier to use' interface of löve), and after half way understanding how the OpenGL calls and the draw function works, it was quite easy and I expect to do more experiments of this kind.

Posted on: 3. Dec, 2011 [ 17:05 ] - Last edit: 3. Dec, 2011 [ 18:24 ]

Building this site with Lua

Why generating my site html code and pages with lua? because I can. Or better said, because I wanted to try this out. I've been using Lua in the lasts months and really got fond of it. It started with löve, then LuaAV, and now pure Lua for scripting. It's really easy and I like it a lot. Lua ALL the things!

The first problem I encountered was: how do I make it easy to use? I don't know. At first I wanted to put a file with text and the script should do the rest (creation date of the file, modification date, extract title from filename, etc...) but then I decided to make every post in lua 'code' too. Well, more like a little lua table which will be read and interpreted, so, this way I can put also some other metadata I might use in the future. Like what? like a link, embedd a video or audio player, put some formatted code, etc... So the structure for every post is as follows:

{ Date="YYYYMMDD_HHMM",Title="",Content="",Meta="",Link="",Audio="", Video="", Code="" }

Now the Date, Title and Content are implemented. The rest should be integrated when I find nice code or audio / video players to embed in my site. I might have to check out how do I display code, or just upload the file and link it here... maybe also some kind of shortcut for links, like in org mode, so I don't have to write html code in my posts.

I have plans to put this on github in the near future, but as I already mentioned in my first post, still have a lot to do to make it flexible for people who are not me.

For now, I will try to catch on some stuff I've been wanted to post since my chyrp blog died some weeks ago. That's the nice thing about building my site with lua and with this file per post structure, if the databe or something breaks, I still can re-read the posts and use them with another template or cover to pure text files.

Posted on: 3. Dec, 2011 [ 14:50 ] - Last edit: 4. Dec, 2011 [ 09:57 ]

First Post

This not blog has been produced with a CSS template and a lua script which I will be releasing in the future... at the moment everything is fixed for my purpose, but I will expand it over the time, put a setting file and make it more flexible, so maybe other people would like to use it too. I don't like much logging into the web and making posts from there. I always wanted to just make a file with text, some metadata and upload it to a folder, then run a script (which I could schedule every hour or so...) and just build my site as I want it. No database involver, just HTML/CSS and with enough flexibility to use my own HTML code and whatever I want. So, the old LuaDropBlogger based on kukkaismoiva will be deleted and use this one instead. Nice thing, you can grab a css template from the free CSS templates (look at the footer for the address) and just chang it to fit your purpose. I will try to upload some pictures and code I made this week which I liked