### Projecting a signal vector onto a plane

I assume that a signal vector is a long list of sample values. So a signal vector of size 512 is a vector in 512 dimensions? Is there a way to project (a mathematical term) a signal vector onto a plane of ones choice and then reinterpret the new vector as a list of samples to be read at the sampling rate and outputted by your soundcard? Could one project a vector on to a space of a different dimensional size (ie 768) and then have the longer vector read out by the soundcard (the sound resulting would be 1.5 times longer). Has anyone experimented with this? Any pointers much appreciated.

Short answer would be to use poke~ and peek~ objects. Problem is, with both you need buffer~ and buffer~ specifies its time in milliseconds(however, I’ve heard of many people working around this to get number-of-samples in different ways: most of them simply keep track of the conversion from ms to samps). Also take a look at the lookup~ object.

Long answer MIGHT be that you could even use Jitter matrices to write samples to and read from(using the jitter versions of poke~ and peek~: jit.poke~ and jit.peek~) like in this newer example:

Max5/examples/jitter-examples/audio/jit.sampler-exampler.maxpat

You might be able to project a vector onto a space of different dimensional size, but then you would probably do so by slowing down the signal’s arrival/capture rate which would be the same as reading the 512 samples at a rate which is 1.5 times slower.

I might be completely misunderstanding what your "plane" of choice is, though. And you might also be referring to a non-real-time signal-vector which doesn’t depend on the sampling-rate until it is played-back or output at a specific sampling-rate. Either way, I’d start by looking at peek~ and poke~(poke~ is the particular object which you might use to project the vector onto your plane of choice after using peek~ to capture or write the vector(s)).

buffer~ also takes the sizeinsamps message. However, as of right now there is a small bug where the initial buffer size cannot be 0 or buffer~ wont resize with the sizeinsamps message.

Quote: chthonic wrote on Mon, 14 July 2008 08:18

—————————————————-

> I assume that a signal vector is a long list of sample values. So a signal vector of size 512 is a vector in 512 dimensions? Is there a way to project (a mathematical term) a signal vector onto a plane of ones choice and then reinterpret the new vector as a list of samples to be read at the sampling rate and outputted by your soundcard? Could one project a vector on to a space of a different dimensional size (ie 768) and then have the longer vector read out by the soundcard (the sound resulting would be 1.5 times longer). Has anyone experimented with this? Any pointers much appreciated.

—————————————————-

The 512 dimensions part is not correct. There are 512 consecutive sample values in a one-dimensional space (at any given moment the amplitude can be specified with a single value). The name vector, however very commonly used in this context, is maybe slightly confusing as the mathematical vector [3, 4, -6] represents indeed a point in three dimensional space.

_

johan

It is possible to think of a buffer filled with (say) 512 samples as a vector x in 512-dimensional space. Projections would then be represented by matrices P:

http://en.wikipedia.org/wiki/Projection_matrix

You can then carry out the projection by matrix multiplication and calculate y=Px. So if P were chosen to be a n by 512 projection matrix, P would project x into an n-dimensional vector y. As for re-interpreation in sound, this y could be used in any way you desire.

Forums > MaxMSP