Luca Fusi Sound Design | Implementation

13May/140

WUIS Worklog TUE 5/13

Been a few days! Between negotiating the return to work and beginning a very intense journey into Reading Things AgainTM, I haven't had much to talk about on the coding front. Today, I went back in for two lessons' worth of fun. One, I think, was almost entirely irrelevant to sound, but a fun aside to pursue.

Today I Learned:

  • A little bit about vector math--the dot product and cross product. Operations like these, performed on the ol' 3D Euclidean plane, are used to calculate all sorts of stuff like position, speed, physics checks and the like. Hitting this tutorial sent me on a random dive into vector algebra and math I haven't thought about in probably twenty years. It'd be interesting to take a fuller crash course through that stuff sometime down the line, but for now, I had to stop when I found myself observing a Java applet that exhibits one of the most popular proofs of the Pythagorean Theorem. Probably not something I need to be overly concerned with for now, but it's cool to see a) what vector math is b) why it's useful and that c) Unity has a bunch of built-in functions (or are they classes? constructors? Blah) for handling it.
  • About the fact that you can enable or disable components--you know, attachable functions like Lights, Physics, Scripts, etc. in the visual editing side of Unity--on the fly. While investigating that, I learned that you can create GameObjects on the fly, too, and started trying to enhance my learning experience on this tutorial by branching out. Predictably, this got me to a point where I started having issues with code compilation, and got stumped. Then, the net went down, and all progress halted.

Up Tomorrow:

    • I've sent off a volley to some of my C#-knowing buddies about the difficulties I was running into with my experiments into runtime GameObject creation in Unity. It's perplexing that shit's going wrong, especially since the code snippet flagged by the compiler as somehow bad (see below) was copy-pasted directly from the Unity documentation, but I'll get through it.

Assets/EnableComponents.cs(36,29): error CS1525: Unexpected symbol `:', expecting `)', `,', `;', `[', or `='

I would love to find a really, truly full and interactive guide to C# syntax somewhere on the net. Something where I could, say, plug in a line of code I've taken from somewhere and just have the various pieces identified. There are seemingly so many ways to write this stuff that it's tough to know what piece is doing what sometimes.

9May/140

WUIS Worklog FRI 5/9

It's Friday! Slow day full of other stuff happening. I should really temporarily rename this endeavor to something that doesn't mention Wwise...

Today I Learned:

  • About the Awake and Start functions. One's called every time the project launches, whether its containing script is enabled (checkboxed) or not. The other's called afterwards and only if the parent script's enabled. Useful tools for initializing variables, values, game states, etc. I was pleased to be able to write the code provided by this tutorial without having to look at it beforehand--but then, it was pretty easy!
  • Learned the difference between the Update() and FixedUpdate() functions--former executes once per frame, but frames can take varying amounts of time! Latter is more consistent and gets its timing from the physics engine or something.
  • The differences between Input.GetKeyDown() (returns true if a key's down, but only for the first frame in which this function's executed) and Input.GetKey(), which can retrigger.

Tried my hand at some off-the-rails coding to figure out some pay rate conversion stuff. I was all excited to use structs, proper data types etc. and make 'em public--then be able to edit them from Unity's Inspector view and check the results out in realtime!--but it turns out that you can't get structs flagged / exposed to show up in the Inspector view, even if they're public. Drag.

Up Tomorrow:

  • More tutorials--unless it's nice out, then I'm going outside.
8May/140

WUIS Worklog THU 5/8

Today I Learned:

  • About scope and access. This does a lot to explain some of the compiler errors I've been getting when trying to build. I'm used to straight-ahead, "functional" programming stuff like .BAT scripting, which doesn't involve either of these concepts and in which variables set anywhere can pretty much be accessed anywhere else (an exception being within code blocks like IF statements). Turns out that public variables will display in the Unity GUI within the inspector of the object they're attached to, which allows you to tweak them at runtime. Useful for debugging and tuning RTPC curve calculations and stuff like that, I guess!
  • Read more into classes after seeing the Unity tutorial guy whizz through a bunch of stuff on them without stopping. Basic CompSci stuff that I just don't know, and seems worth reviewing. The differences between classes, structs (though I haven't run into these yet), functions, constructors, and instances of the above are still pretty murky right now. I will have to take an actual class on this stuff at some point, if only for the sake of having a teacher to ping with questions...

Debating switching the default editor back to MonoDevelop because of some intelligent stuff it does. Since it knows what scripts are loaded into the project, what's public, what's private, etc. it can autocomplete function references that Sublime can't. So, using MonoDevelop would prevent me from fucking this stuff up. On the other hand, sticking with Sublime force me to improve my knowledge of scope and access, since I'd have to be more careful.

Up Tomorrow:

  • Continuing with the tutorials! I'm thinking I'll probably hit my Text Fighter v1.0 project after a few more. Some days, you just wanna stay on target.
7May/140

WUIS Worklog WED 5/7

So at this point, this venture's got me straight-up learning about Object-Oriented Programming, assorted computer science fundamentals, C# and its syntax. This this stuff translates readily into understanding more about Unity, vis-a-vis C# being a development language for it (and these tutorials feeding me easy examples of attaching scripts to objects, etc.)--but it doesn't really have much to do with Wwise, sound, or what I set out to do. The whole of "learning to program" is a rabbit hole into which I could tumble endlessly, so I think I should take a moment to update my daily and overall goals.

The end goal, for now, is still to figure out how to cook a Wwise project up and then create a Unity project which can invoke sound calls, RTPC updates and the like from those bundled banks, turning them into really simple game functions like, "When I push space, this sound plays" or "When I move the mouse on this axis, this RTPC increases."

To hit that point, I'll finish these tutorials, and daily:

  • List the stuff I've "learned" how to do. ("Learned," as in, "have experienced in one or another tutorial"--but won't necessarily have under my skin until I've really ventured off the rails and experimented with).
  • Any particularly cool points or definitions I feel like I've covered, I'll go into more detail on. And maybe list a few examples of how I can see that working in a simple project I'll define as I go along.

By finishing these tutorials and daily drilling in these reminders of what I've learned about C#, I expect that I'll be able to crack open the Wwise-Unity Integration Demo classes and at least understand what's going on at a structural level. It'll still be Greek, but I'll be able to recognize it as such, instead of a big text file full of scary.

Today I Learned:

  • About inheritance, main classes and base classes. Specifying a base class lets a class inherit certain properties, like instance variables and functions. When you create a new Unity script, that first public class and open brackets it creates specifies "MonoBehaviour" as the base class. This is like some default framework that Unity has which contains a bunch of useful functions. Makes sense. Diving deeper, it seems like there are other ways to do this kind of inheritance stuff with "delegation" and "subtyping"--but I don't know what the deal with those paradigms are or why I'd elect to use them. Yet.
  • About different value types--int and float, for starters. I don't know why exactly one of my example scripts has to explicitly define a floating value as such twice. That is, in the statement, "float coffeeTemperature = 85.0f;", why do we have to say both 'float' and put the 'f' suffix after the initialization value? Anyways, I'm not expecting this type of stuff to start becoming a problem until I'm converting between data types. As an example of why an audio-related function might do that could be turning a super fine-tuned, precise value like mouse coordinates into an integer that falls somewhere specific on an RTPC graph.
  • About constructors, which are like functions that are used to create brand-new objects (like GUI boxes) at runtime. Decided to make some semi-interactive controls to accompany the coffee temperature test tutorial on IF statements, and ran into some compilation errors until I looked this up.
  • About loops--While, DoWhile, For and ForEach--and when you'd use each one. Messed around a bit with trying to combine some examples.

Up Tomorrow:

Thinking to go off the rails a little bit. As a simple but creative test of what I've been learning, I have this crazy idea that I want to make a button-navigable, text-based RPG fighter that does some really easy damage calculation. From what I've seen, tweaking the GUI may be the hardest part.

Much respect for UI programmers.

6May/140

WUIS Worklog TUE 5/6

  • Started late, lost a big chunk of the day to exercise and housework.
  • But, hit up a few more scripting tutorials to get the brain back in gear.

Up Tomorrow:

5May/140

One Week Later, Thoughts

Last week, I set the flag down and declared I'd be learning C# while I wait out this strange inter-contract abeyance.

I haven't made as much progress as I've hoped to. And typically, what I'd do is beat myself up over that. Why hasn't this thing taken root?, Why have you wasted other time doing XYZ when you know deeply that this is the best thing for you--that your mind craves those challenges, actually, on the days you've elected to do something else? and other such self-eroding lines of thought.

But that's a useless way of looking at things. There are lessons to be learned in our failures (probably even more than in our successes!) if we can find the clarity to wall off the sting of it, step back and analyze why things have gone wrong. Maybe you'll see some of yourself in this post and in the days' upcoming work logs. I don't mean for this site to turn into a self-help resource, but I don't mind exposing my flaws if it might help someone else.

The truth is that aligning my mind and body to want to work at this thing every day in a world full of easy, alluring--ultimately unsatisfying--escapist options, is really difficult. And as darkly reassuring as it would be to think that I'm alone in that, I suspect I'm not. Success on this front means building up good habits, like keeping the whole Luca unit running well on meditation, exercise, and a healthy diet, three things I've found to provide a lot of stability and satisfaction. Reflecting on how those things help has built some momentum towards keeping them going, and their upkeep becomes easier. As an aside, I've found that those three together are critically intertwined, and I can't really skip on any of them without the others falling apart. So that's something to troubleshoot.

I think it also means giving in to the bad habits, though, and seeing where they lead you. By not forbidding them, you naturally start to see that they don't provide you with the same satisfaction that all of your good habits do, or that their effects are totally impermanent. You naturally start to trend away from them, even as you've given yourself total permission to explore them in the face of your less sexy productive options.

This is what I'm finding in the face of some clarity today. Long as I'm learning--be it C# or how to short-circuit my natural tendencies towards more consistent progress--it's all good.


I wanted to share this song with someone after rediscovering it this morning.

Hooray For Earth - True Loves from Young Replicant on Vimeo.

 

I find this track irrepressibly beautiful and hopeful in a way I can't easily describe. And I've felt this way ever since stumbling across it three years ago.

Every little element comes together in just the right way to serve the meaning I've ascribed it. The thin, unpracticed vocals and kitchen sink percussion; that impossibly low bass line and how it wavers on the edge of breaking some oscillator or amp. The one, single variation on that chip sound when it bends up and down on the final chorus. And the terrible amount of reverb that glues it all together.

A friend of mine put it well: "There are a lot of songs that sound like this, actually...but this one is special."

What I think it is is that this track feels like being young as you experienced it--not as someone looking back.

Thanks for reading!