top of page
  • andreahywong

Playing with poly~

Updated: Mar 21, 2019


Wow, today was such a productive day! Dr. Hamel and I worked on creating a module that will play a sample correlated with each colour and all of its blobs. i.e. every same-coloured blob will play the same sound file in polyphony! I previously made a player module but it would could only play 1 sound file per colour. So here goes!


We made use of many #MUSC320 objects!

Quick review of some old [objects] I played with today:

  • [buffer~] - outputs a list of data for each data cell in every plane

  • [onebang]

  • [poly~] - processes a list! (Here we use both [zl.sum] to output a sum of numbers in a list and

  • [sig~] to display the last n items in a list.

  • [groove~] - filters out repeated numbers

So what have we done here?


Main Module Patch: Player_v01

  • [buffer~] stores our sound file with a buffer name (samp1) for 2 channels and… I can’t remember what -1 was for right now.


Subpatch: PolyMaster

  • There's some rearranging of our colour data here... (routed by colour, we have continuous data of each blob’s x value, y value, x grid value, y grid value, index (where the first digit is the colour identifier (tracker 1 colour starts with 10, and second digit is the blob ID (tracker 2 blobs are 20, 21, 22, 23, etc…)

  • Here, we rearranged and unpacked our data so we have just the second digit (blob ID) prior to all location/x/y data

  • Then we can start routing data by blob ID #!

SubSubpatch: StartStop

  • Each blob’s data plays the sound file (currently x values control this).

  • When no new data from blob comes in (i.e. when the object is removed), sound turns off in 2 seconds using a [onebang] object to indicate if sound should be on or off!

  • coming out of the subpatch is packed on/off data of our sound file as well as the blob ID #


poly~ PolyGroove

  • blob ID # is currently used to target the instance in [poly~] object prior to sending start(1)/stop(0) messages to trigger a "start" (0 message and sig~ 1) or "stop" (stop message and sig~0) to a [groove~] object inside every instance of [poly~]

BUT... a problem arised.

Somehow the first time a non-first sample is banged (e.g. indices other than 10, 20, 30...) it doesn’t play until first sample is banged! My task this reading break is to debug what went wrong!

Update: Feb 21: turns out it was a simple problem to fix! My [onebang] wasn't "pre-loaded" so a simple [loadbang] object into the right inlet of [onebang] fixed it!


So there we have it! Layers of colour-associated sound files are on the way!

2 views0 comments

Recent Posts

See All
bottom of page