Xenakis' Sieves with JavaScript

Aug 5, 2012 at 12:15pm

Xenakis' Sieves with JavaScript

So I’m trying to learn about JavaScript and using it in Max, but I’m still at real early stages working with code. I’ve tried to write a little script that generates elementary Sieves (see Iannis Xenakis & Christopher Ariza). Like I say, its a real rudimentary (and yeah, its probably easier to combine the residual classes using Max [zl] processes, but this is a learning exercise for [js]) so don’t expect the full complement of sieve handling methods that people like Ariza have done.

I’m encountering a bit of a weird problem getting the segment to work starting from a negative number. I’m thinking that its because the Sieves should start at 0 and run simultaneously in either direction ‘infinitely’ – the segment should just be a frame, but maybe i’m using it as a point of initialised?

I’ve only been learning JavaScript for about 2 weeks through codeAcademy.com – and then only just looked at using [js] to implement it through Max – so I’m assuming there will be some real basic errors?

If anyone could take a look and give me some pointers on areas for improvement, it’d be really appreciated!

– Pasted Max Patch, click to expand. –
Attachments:
  1. sieves.js
#63853
Aug 6, 2012 at 9:18am

I doubt I can help, but you probably should use the “4280.sieves.js” file name in the js object.
The copy-compressed patch is fine, just don’t know how to hook it all up!

#230269

You must be logged in to reply to this topic.