music-sensitive boids

i am not a programmer
i am interested in social dynamics
and now multi-agent modelling

the breve version of flocking is a little too schitzophrenic
and i am attempting to soften the flow of movement

does anyone know of a program that crosses flocking
with music?

that is
different boids respond to different frequencies etc of sound

i think this will show spatially
the relationships between elements of the music
which our minds follow

it might make for a nice visualiser too

ps
thanks for breve
i hope i can learn how to program enough to realise my thoughts...

music-sensitive boids

what do you mean with schitzophrenic? Too fast or too much 'birds' or......

it is quite simple to slow it down, lessen the # of birds etc...if that's what you want

does anyone know of a program that crosses flocking
with music? that is
different boids respond to different frequencies etc of sound 

How exactly do you see this? a 'point' in space or on the ground, emitting a certain freq? (indexed by, say, a sphere of certain colour) Nice idea, but you'd need 3D glasses or and surround sound to really understand then what's going on.

music-sensitive boids

BTW: Quote:i hope i can learn how to program enough to realise my thoughts...

here's a good place to start: http://www.spiderland.org/breve/documentation.php

Download the .pdf tutorial and see if it's something you want to delve deeper into.

music-sensitive boids

Rxke wrote:what do you mean with schitzophrenic? Too fast or too much 'birds' or......

the 'birds'
are always turning their heads around like crazy
when i changed the darts to spheres
the movement was much more interesting...
i suspect the way to do it
is to conflate all the vectors of neighbours to one vector
and this will produce a smooth pointing and moving dart!

Rxke wrote:How exactly do you see this? a 'point' in space or on the ground, emitting a certain freq? (indexed by, say, a sphere of certain colour) Nice idea, but you'd need 3D glasses or and surround sound to really understand then what's going on.

no no it is simpler than that
you have assumed something far more sophisticated than suggested

simply this:
pipe in some music
and
if each of the 'birds' has an added rule
which is to home in on certain sounds or frequencies
their movement will be as normal
flocking
however it will be influenced by the flow of music

there should be a visable representation of the music
in a much more interesting and human way
than a spectrograph

does this make sense?

and thank you for taking notice of my query...
i will delve into the manual!
though i suspect i might drown
hehehhe

music-sensitive boids

2020 wrote:the 'birds'
are always turning their heads around like crazy
when i changed the darts to spheres
the movement was much more interesting...
i suspect the way to do it
is to conflate all the vectors of neighbours to one vector
and this will produce a smooth pointing and moving dart!

The really interesting thing about the Swarm algorithm (or really, the "Boids" algorithm) is that so many different behaviors can be observed based on changes in the "weights" which control the urges of the agents.

If you look at the Swarm simulation method "flock-normally", you can see where these weights are set:

  + to flock-normally:
    wanderConstant = 4.0.
    worldCenterConstant = 5.0.
    centerConstant = 2.0.
    velocityConstant = 2.0.
    spacingConstant = 5.0.

    maxVelocity = 15.
    maxAcceleration = 15.
    cruiseDistance = .4.

By playing with these parameters you should be able to produce less "schitzophrenic" birds. Try turning down the wanderConstant and turning up the velocity constant.

If you're using the Mac OS X version of breve, run the InterfaceSwarm simulation and you can control these variable interactively through the interface.

- jon

o dear

i tried running your interface swarm
but there is a file missing
""
and it can't run without it
line 38
which could be:
@include Stationary.

thanks again for your kind attention...

music-sensitive boids

jk wrote:By playing with these parameters you should be able to produce less "schitzophrenic" birds. Try turning down the wanderConstant and turning up the velocity constant.- jon

thanks jon
but i found that the darts still have that ... fluttering
where they keep pointing at different neighbours...

unless you have a bunch of settings that reproduce the original boids smoothness
i think there is a basic problem in the algorithm
and i suspect it has something to do with conflating orientations
to draw only one direction rather than the ten or so it does a second
and since all the neighbouring agents are doing the same
there should be a smooth alignment at the emergent level of the flock

music-sensitive boids

2020 wrote:but i found that the darts still have that ... fluttering
where they keep pointing at different neighbours...

The fluttering, while visually distracting, is the correct behavior. The agents always point in the direction of their velocity vector. The fluttering occurs when the velocity is very very close to 0 -- any small change in velocity will then also dramatically change their heading. The tiny velocity change of ( -0.001, 0, 0 ) to ( 0.001, 0, 0 ) will change the bird's heading 180 degrees! Again, not so hot visually, but probably not an indication of a problem in the algorithm.

You could also experiment with reducing the maxAcceleration parameter. That determines how quickly an agent will be able to change its velocity and heading. Note though, as in the example above, even extremely small velocity changes can trigger the fluttering.

music-sensitive boids

thanks jon
um...
i will continue fiddling
to see if i can...
increase the velocities in order to reduce the flicker effect...?

but feel free to post settings that you have found to give a smooth flight

hmmm....
it occurs to me
that was is needed is some kind of history check
so that the bird doesn't flicker
that is
it can only change its angular momentum slowly...
does this make sense?

sorry to bother you
i really am quite clueless concerning programming...
as i said initially
my experience is with social dynamics
and i am hoping to explore this with breve
once i get to grips with the simple stuff like flocking

Smooth Input Frequencies

You may want to smooth your signal input. Spikes in the sound frequency mabe causing your swarms erratic flight path.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.