Pete's blog.

Friday, October 22, 2010

0.1 still isn't quite as far along as I'd hoped it would be. I had some hiccups getting Git to work(yes, it got MUCH MORE COMPLICATED) but now it all seems to be good. I have music.js located right here. So far I've plugged the Scales&notes.js from Bloop into the spots where I THINK they might go. This data and the js.music template were provided by F1LT3R. The goal is to get bloop to use Music instead of Scales&notes.js.

I've produced the following demos as well:Jupiter Approach
the file is named 'third' because my first one simply played a song in a browser. My second one was a godawful mess that got scrapped. This one, as I mentioned previously is based on a previously existing DSP demo. My changes put all the variable initialization inside the onAudioAvailable and onLoadedMetaData events. Previously it was hard coded.Fascination
This one was much harder. After a few more attempts, I finally finished this, which uses beatdetektor and causes text inside the div to pulse.

0.2 will require more research(Research was a major portion on 0.1, the links to my resources are provided in my last post). I really need to remind myself about keys and chords and all that other music related information that has hidden in the darkest recesses of my brain from disuse.

for 0.2 I hope to add more meaningful contributions to music, and build a few demos of my own. I've already resolved to work much more openly, since all of my successes came when I actually spoke up in IRC.

I'm also going to try and build some popcorn demos using beatdetektor. (ie, play a music video and do crazy stuff to it on the beats.)

Thursday, October 21, 2010

ALRIGHT, I finished that little thing I mentioned earlier just now. And yes, going on IRC and actually speaking up helped quite a bit.

Basically, I took this demo and used it as my template(I removed all the webGL stuff). When I asked about it on IRC, the fellow who'd made these demos and wrote BeatDetektor was actually there to answer questions and explain how it worked... which was... awesome...

So this whole thing turned out pretty good. I can make it a bit more sophisticated later. For those who may be interested, the link is here.

I've also uploaded the first demo I got working with audio data API and it is here. This demo was just me pasting whatever song I wanted into an existing demo and automating onLoadedMetaData event so nothign was hardcoded.

The best part of this whole thing was when I thought my audio processing loop didn't work... so I put in a window.alert to test it thinking it would STOP the page. Instead it produced hundreds of alert windows. After that I knew it worked.

Shortly after my last post I got that demo I was trying to do working. Alright! It's a bit funny still... sometimes it sounds like the songs sort of 'doubles up', one instance of the song ever so slightly ahead of the other.

This stuff, I'm finding now is really quite overwhelming, and my 0.1 release is going to be very very underwhelming unfortunately. Most of the work I've done I just end up scrapping because it just doesn't work properly. Anyway, these are things that can be remedied by simply asking the right person and I've just sort of been trying to do all of this work in a bubble, which hasn't served me too well.

OKAY so anyways, the next demo I'd like to make, which I'm working on just now, will basically play a song (a .ogg file, as I learned last week) and by also using BeatDetektor.js, I'd like to make text on the page kind of 'pulse'. Maybe after that I can turn it all into a bookmarklet that can be run on any page. And music.js can be used to make the music that feeds beatdetektor and changes the text? Lofty ambitions for someone who has only just recently made an ogg file play in his browser!

Friday, October 15, 2010

Wordpress.org is open and fun and you download the wordpress software and host it somewhere and you have this amazingly customizable content management and blog system that is free. Wordpress.com you simply sign up and if you want to customize things... there is a cost.

Anyway, there is now a wordpress up for the project I'm working on for YorkU, so for those who are interested it is here.

So, last night I was looking at the Audio Data API and I figured I'd play around a bit and just try and get a song playing in my browser using the HTML5 audio tag. It took FOREVER because I didn't know that Firefox doesn't support mp3s in AUDIO. It makes sense now that it's been explained to me(Apparently it's a licensing issue and would break Mozilla's open source policy) but last night I was rage-facing like crazy ( ie. "WHAT THE HELL IS AN OGG FILE?!?!")

Alright, so I downloaded this mp3 to ogg encoder and I was on my way.

My next step was to take this Totally awesome demo and insert a song of my choice into it. This meant downloading a few javascript libraries(dsp.js, processing.js, init.js and jquery.somethingsomething.etc) Still didn't quite work.

In order to run this demo LOCALLY on my machine I have to change a variable in firefox's autoconfig by going to about:config and changing security.fileuri.strict_origin_policy to FALSE.

Finally, after some input from Dave Humphrey it seems like my next step is to ensure that the right encoding information is loaded into the demo. Currently sampleRate and framesize is hardcoded, and not the same as that of the song I was going to use. So I'm going to make sure that information is drawn from the file instead of simply hardcoded. Then I can spin Q and F dials on ALL MY FAVORITE SONGS.

Wednesday, October 13, 2010

As is so eloquently explained in the title of this post, I have exposed myself to the world of GIT. My repository isn't QUITE a gig yet, but these things do take some time.

This process of starting a repository and getting git working on my system was built up to be quite difficult, but I actually found it much easier than going through hg and building Firefox. It took maybe 30 minutes(as opposed to... hours...).

I started my journey with Git here and after signing up(for the very fair cost of zero dollars) I was provided with very detailed instructions of how to create my SSH key and how to begin my first repository. The fruits of my labours can be found here.

The readme file is empty. BUT it comes with a very special message: "My very first commit".

Tonight I'm going to finally get cracking at music.js so I can put something awesome in a new repository. Getting started on these things is always the hardest part, but once the ball is rolling... Oh my yes.

Friday, October 8, 2010

Last night I was trying to get firefox to build on my machine, and for whatever reason I thought it just wasn't working. Well, today I found it 'why'. It's because I wasn't finding the right binary file. I came home today after learning of its' real location, found it, clicked it, and now I'm updating my blog from my very own version of Firefox, built right here on my computer.

SO, after going through your make, my firefox.exe is located here(results may vary)

c:\Users\pete\src\obj-i686-pc-mingw32\dist\bin\firefox.exe

I assumed it simply didn't work because:
a)I was clicking the wrong .exe
b)I assumed the worst when 'Make' didn't give me a friendly "Firefox build was successful" message
c)The error messages I was getting later were because I was running make in the wrong directory