This Week March 17, 2008
Posted by bperdue in : Uncategorized , trackbackI haven’t had a lot of time to work on my project the past week, but I’ve made some conceptual progress and I should be able to put in some hours between now and Wednesday’s meeting.
As noted last week, my latest obstacle is the fact that getting the visualization to “listen” to an MIDI doesn’t seem to be possible. This can probably be worked around by using a converter which will put an MIDI file into Comma-Separated Value (CSV) format, and then using that file (which is text and has a standard format) to get the information I need. I’m still working on precisely what to do with that ability by exploring the LSLWiki. My best guess at the moment is that I’ll have to make the MIDI files into notecards and then use the llGetNotecardLine function. I can store the notecards in a separate prim so that the visualization can always find them, I suppose.
Fortunately, MIDI will make much of my job otherwise fairly simple. MIDI assigns numeric values (from 0 to 127) to notes over 10 octaves; I’ve found a table which matches notes to numbers. Extracting these values from the CSV file should be mostly a search problem, which might take a little coding but shouldn’t overall be abundantly difficult. Then I can have some sort of conditional - do switch statements exist in LSL? - to make the tracer prim fly around a bit.
Another thing that may be possible is getting the visualization to work in time with the related MIDI. The CSV holds time values for each event in a file, including notes, in clocks. Using that data and LSL’s time functions (which are in seconds), I may be able to get the visualization to run in time with the MIDI. Alternately, if the visualization processes quickly enough, I may just be able to have it change when the notes change, which would certainly save a lot of code but would rely on code efficiency to a greater degree.
Approx. hrs: 1 so far, more to come
Comments»
no comments yet - be the first?