We’ve Got Our Balls Out!

Progress until today had been slow and painful with few breakthroughs and a loss of direction recently as well as a feeling that contribution to the project had been lacking on my part. That changed when Javascript was abandoned in favour of Flash as Russell knows a lot of Flash. He progressed quickly through the task of generating balls which can change colour and size with a variable (which in the case of this prototype is just a random number that will be replaced by inputs from Max using Flash Server)

While this breakthrough happened in the graphics department of the project, another breakthrough was happening with the sounds. The analyser part has been successful for a number of weeks now but today the recording part was filled out.

The basics of what has been accomplished:

  • A sound is recorded into a [buffer] when it sound peaks above a certain level.
  • The peak also ‘bangs’ a [counter] which sets the number of the [buffer] to record to.
  • The next time the sound peaks it is recorded to the [buffer] number set by the [counter].

The problem was that if the sound remained above the set peak level, then this would result in it continuously ‘banging’ the [counter] and so recording a fraction of a second into the [buffer] each time. What needed to happen was tracking to see if the sound peaked over a level and then set a [counter] to count for 2000ms (which is the max length of the [buffer]) to allow the recording to fill that [buffer] and not fill several [buffers]. As well as this it needed to know to reset the [counter] and select the next [buffer] if the sound stopped peaking above the set level before the 2000ms was up.

This has now been achieved but needs some fine tuning as when both statements are connected at the same time, they both function correctly but they do so at the same time. So another statement needs to be introduced in order to determine which way to go. One was with short sounds and one way with longer sounds.

Also when the [counter] ‘bangs’ the check box to record into the [buffer] it only turns it on, so the next time the cycle passes that [buffer] it will turn it off and not on, so will not record anything until the cycle after. The same problem occurs with the recalling and playback of the sounds.

Related Posts

Leave a Comment




YOUR COMMENT:

PLEASE NOTE:
Comment moderation is enabled and may delay your comment.
There is no need to resubmit your comment.