Getting
started with the assignment was indeed a tedious one, especially without having
any MAX/MSP and Arduino hardware programming background. Some classmates of
mine even modified the Arduino firmware to work as he wanted it to be. Most of the
codes are available online; but extracting the right one would be a challenge.
I started
working on my piece the week before with some ideas which I grasped on and
implement it on the PCB board connected to Arduino with the programming support
of Maxuino. Moving on to what I did last week, I assigned the 4 regions
according to the screen of the Mac. Mousestate horizontal and vertical figures
are the two numbers that I require for selecting the 4 regions.
“Split” Object
The ranges
are set by the “split” object where maximum and minimum values are input as reference.
These values are obtained from the mousestate position at the limit axis of
that particular region. Each region has its own set of values, maximum and
minimum. The mousestate will identify the location of the mouse cursor. With
that particular value, both horizontal and vertical, it will pass through the
“split” object and then read the values according to the reference input. If it
is within the stipulated range, the object will read as within and therefore in
my case would read as “1”. Alternatively, if it does not fall within the range
of maximum and minimum, it will read as “0”.
“Toggle” Object
The “split”
object is connected to a toggle, when 1 is passed out, the toggle will be
turned on (with a cross in the square shaped object), whereas when the 0 is
received on the toggle, it will turn it off (without a cross in the centre). I
put an additional number object, which reads 1 and 0, to view and test the
outcome of the toggle. This is for me to check if the reading of the “split”
object is correctly correlated with the toggle, within or not within range
values (1 and 0 values).
Multiplication factor
A
multiplication factor is added to combine both the horizontal and vertical
values so as to achieve a common range in between the X- and Y-axis. This means
that when the mouse cursor position can be within the range of horizontal
X-axis but not in the vertical Y-axis, it would read as 0 instead of 1 even
though it has satisfied the horizontal X-axis. With this knowledge, I craft out
the range for the 4 region to ensure every region has its own X- and Y-
boundary.
Mousestate with "Split" object to assign the 4 regions
Completed 4 regions allocation
Integrating Lights to the performance
The result
is then connected to another toggle; after which would determine the light on
and off state in relation to the toggle on and off. Since I will be using 4
quadrants of the screen, I explored Maxuino and copied the part that is
required for my lights to work. I believe there would a simpler way, in fact
the GU; but since being not able to figure out, I work towards the manual way.
In total I will be having 7 lights for my performance; 4 of which will be used
for my quadrants, 2 of which will be used for my music rhythm and 1 would
specify the quick movement of the mouse cursor from place to another.
Extracting the right portion to make my light work for the quadrants!
Part 1 - Creating the 4 quadrants with lights to assign the Silat Pengantin "Play Area"
Let Music fills the Air
As mention
on previous week write-up, I have decided to add in music as part of my
performance. Movement according to the beat and tempo would be considered an
important ingredient to shine in the performance of “Silat Pengantin” and
perhaps other dance too. I incorporated the music using “sfplay” which I had
picked up in the MAX tutorial. With the availability of the kompang and gamelan
recordings found in the internet, I downloaded and convert the file to .aif.
The reason is simply because “sfplay”could work on .aif file but not .mp3.
There are, of course, some MAX/MSP users whom have been creating and writing
programmes or GUI for sound, thus even playing .mp3 file is possible as well as
changing the frequency based on the GUI they created. However, to not
complicate things on my performance, I decided to download, convert and play.
Simplicity comes on hand if anything goes wrong in the programme, for example
if it does not work as u command.
There is an
“open” message and a play bar connected to the “sfplay”. The “open”message
causes a pop-up window to appear for the user to select the music and then
store in “sfplay”. I input a toggle for it to start playing and pause playing.
The playbar would be useful to select the part of the music to be played using
its slider. The toggle is also connected to a “delay 2000” object. This step is
to allow a delay of 2 seconds before banging the next step, which is for my
programme, banging the “metro” object to start counting every 1600ms. The metro
controls the light on and off in relation to the defined time. There will be
two music lights for my programme; one would be with the rhythm of the kompang
(metro 250ms) whereas the other would be on the gamelan beat (metro 1600ms).
"Sfplay" for the music to be played
Movement speed of Mouse Cursor
Hard swift
punches and “bunga bunga” would be most of the moves that are performed during
Silat Pengantin. So how are we going to differentiate them when we are
integrating it to a hardware and software? Basically, I thought of the movement
as general and the difference between the “bunga-bunga” and punches are the
speed of the execution using the fist and/or palm. Therefore I would like to do
something relating to speed to differentiate these two movements. Punches are
frequently executed are fast commonly representing as an attack, whereas “bunga
bunga” are executed slowly with gentle flow that shape the artistic movement of
the performance.
The process
to get the speed of the cursor was not easy. I had to consult an ADM classmate
of mine through the process. With his explanation, I designed my own object
flowchart to obtain the speed indicator of the cursor. The horizontal and
vertical position of the mousestate links to another pop-up window, which I
named as “p horizontal speed” and “p vertical speed”. This window is a subset
to read the information and clears the movement every 50ms. It passes through a switch and an if-else
statement. The reason why an if-else statement is needed is to convert any backward motion (from right to
left) to a positive number so that the speed can be obtain as positive value
and be reflected on the slider. With the time and cursor movement from a point
of location to another, I am able to obtain the speed.
The value of
the speed is then copied out of the additional window and went through a series
of mathematics addition and division to obtain the average values. The obtained
value then undergoes the “split” object and as mentioned above, the “split”
object will detect the defined range and read it accordingly, to be within or
not. As for my programme, I have linked it to a metronome that ticks for every
500ms with a counter of 0 to 3. This would cause my light outcome to blink 3
consecutive times at a speed of 500ms if the values are in between the “split”
object range of 100 to 1000. 100 is a value given to detect the best sharp and
quick movement. Values lesser than 100 are not feasible as I realised even the
slightest move would cause the light to blink for 3 times indicating it is a
punch. 1000 would just be a constant value to identify the maximum value, which
frequently would not be achieved even at fastest movement.
Movement Speed programming flowchart
Horizontal/Vertical Mouse cursor speed detection flowchart
Punches detection Light Indicator and "Sfplay" kompang and gamelan beat with light
Programming Completed; Ready to be Performed!
Part II - Software Explanation
Part III - The Performance
As a form of
future improvements, I would like to implement Wii accelerometer instead of the computer
mouse. Moreover, I would think that the Wii could be acted as the mouse
cursor if I am able to link to the Mac. The lights are simply attractive but I
would move on to expand my thought on how the lights could be part of the
performance. Suggestion made by my audience would be linking the lights to the
musical instrument of gamelan or kompang, not only the beat. Apart from that I
hope to have some learning interaction on the movement aspect. Punches, for
example cannot be towards the newly-weds or above. They should be pointed down
and as such I am intending to use the angular movement of the Wii accelerometer
to achieve such results.
Well, it is
easier said than done. Of course I would want my performance to be a successful
one. Perhaps, I would want people to crowd around a view the performance! I am
not really good in programming but sure do, to challenge my thoughts; I would
want to explore ways to make it happen. Along the way, I do face some problems
but with the help of my classmates I am able to achieve the results that I
wanted.
Looking forward
for Assignment 2!
No comments:
Post a Comment