The first thing that had to be accomplished was a basic understanding of Pure Data, how it works and knowledge of the programming data. When previously attempting to learn Pure Data, I followed some tutorials online by Dr. Rafael Hernandez, which helped to explain the basic functions and different types of objects and boxes that can be found as well as the basic maths and logic that has to be used within the program to make the patches work.
Once I had a basic understanding of Pure Data programming language, I made a few test patches with simple sine wave and sawtooth wave oscillators to ensure that what I had understood actually worked in practice - this allowed me to get familiar with the shortcuts rather than just watching and understanding.
It then came the time to construct the patch for the project.
In order to get the patch started, the first bit of programming had to be the construction of the camera input. Making sure that the camera was being read by Pure Data and the data could be read correctly was the priority at this stage before even thinking about the audio. Pure Data has a bank of example patches or sections of patches that can be used or used for reference material; one of these is a video section which incorporates the built in webcam on a laptop - extra cameras can be added at a later date with more in depth programming.
(Figure 2.)
Figure 2. (above) shows the help box which appears with all the tutorial settings and examples of what is possible with the program. As seen on the right hand side, there are several video examples that are open to users to learn from and edit for their own use. The one that I have taken most use from is number 03.movement_detection.pd.
(Figure 3.)
Figure 3. shows one of the first patches that was developed. The 'create', 'destroy' and 'dimen' message boxes at the top are sending messages to the 'gemwin' object to create and destroy the webcam incoming image as well as the size of the image that would be analysed. The 'gemwin' object is what is being controlled by the message boxes; in this instance, this is the webcam. The gemhead is very similar in the instance that it receives information from the webcam which, in turn, sends information to another object which tells Pure Data that it is receiving video (pix_video.)
The problem with this patch is with the (pix_pix2sig~) object. This object transfers data from the signal into audio and there is a matching reversal object as well. In this instance the RGBA data could not be extracted which was attempted in the above figure; instead, audio data was the output measurement; due to this, the patch had to be altered/ deleted.
(Figure 5.)
(Figure 2.)
Figure 2. (above) shows the help box which appears with all the tutorial settings and examples of what is possible with the program. As seen on the right hand side, there are several video examples that are open to users to learn from and edit for their own use. The one that I have taken most use from is number 03.movement_detection.pd.
(Figure 3.)
Figure 3. shows one of the first patches that was developed. The 'create', 'destroy' and 'dimen' message boxes at the top are sending messages to the 'gemwin' object to create and destroy the webcam incoming image as well as the size of the image that would be analysed. The 'gemwin' object is what is being controlled by the message boxes; in this instance, this is the webcam. The gemhead is very similar in the instance that it receives information from the webcam which, in turn, sends information to another object which tells Pure Data that it is receiving video (pix_video.)
The problem with this patch is with the (pix_pix2sig~) object. This object transfers data from the signal into audio and there is a matching reversal object as well. In this instance the RGBA data could not be extracted which was attempted in the above figure; instead, audio data was the output measurement; due to this, the patch had to be altered/ deleted.
(Figure 4.)
(Figure 5.)
The patches in Figure 4. and Figure 5. has similar problems as previous versions. However, in Figure 5, data was outputted to an array which could be readable; it was a shame that it was only possible to obtain one variable of data and not able to get the full RGBA data that was sought after.
After several failing attempts at tying to obtain the RGBA data, the idea was altered to instead, utilising the motion detection capabilities of Pure Data programming.
After several failing attempts at tying to obtain the RGBA data, the idea was altered to instead, utilising the motion detection capabilities of Pure Data programming.




No comments:
Post a Comment