Re: Module for working with Vectors
Posted: 05 Dec 2012 20:41
Updated to include some more functions for creating random vectors (floats, integers, and unique floats after inspiration from Antonio), calculating magnitude, calculating angle between vectors, changing the range of all values for all elements, and probably something else. Complete documentation to come soon.
My goal for this module is to create a place to go for working with vectors. I don't personally have uses for all of these (like angle between two vectors), but I wouldn't be surprised if someone comes along who does.
To provide some ideas, vectors can be used to store values of some meter over time. For example, if you're watching the output level in a template for Logic, you might want to know if that level has clipped recently. If you only look at the current value, you can only see clips when they happen. Instead, if you look at the levels for the last 10 seconds, you can know if a clip occurred within that time period.
My personal motivation behind this are for a module I've been developing for syncing to an external MIDI clock. I keep track of when the ticks come in (in a vector) to keep an eye on how tempo changes over time. That lets me monitor the quality of the signal (the reason for my Stats module), detect missed ticks, and so on. It also helps me keep a more consistent tempo instead of only going by instantaneous measures, which can vary quite a bit.
My goal for this module is to create a place to go for working with vectors. I don't personally have uses for all of these (like angle between two vectors), but I wouldn't be surprised if someone comes along who does.
To provide some ideas, vectors can be used to store values of some meter over time. For example, if you're watching the output level in a template for Logic, you might want to know if that level has clipped recently. If you only look at the current value, you can only see clips when they happen. Instead, if you look at the levels for the last 10 seconds, you can know if a clip occurred within that time period.
My personal motivation behind this are for a module I've been developing for syncing to an external MIDI clock. I keep track of when the ticks come in (in a vector) to keep an eye on how tempo changes over time. That lets me monitor the quality of the signal (the reason for my Stats module), detect missed ticks, and so on. It also helps me keep a more consistent tempo instead of only going by instantaneous measures, which can vary quite a bit.