Hi!
I can't remember what's the message for changing the array's visual size. I want to create a simple zoom in/zoom out tool in pd vanilla.
thank you!
Array's visual size
Hi!
I can't remember what's the message for changing the array's visual size. I want to create a simple zoom in/zoom out tool in pd vanilla.
thank you!
It's the [bounds( message, but it won't work like you want it to. Arrays are perfectly happy with plotting points outside of the visual box. You instead have to copy the part you are zooming in on from an array containing the full array into one you are using for visualization. And if you're doing it in vanilla, that means using [until]. Depending on the quality of the visual you're going for, that can get REALLY slow for long sound files.
All of the array messages are documented in 2.control.examples -> 15.array.pd and 16.more.arrays.pd, btw.
Thank you for the answer.
I was sure that I recently saw very effective zoom feature in someone's patch, but I can't remember where. Or maybe I was just seeing what I wanted to see
Btw, your abstractions are very cool... thanks for sharing.
@sinewave said:
Thank you for the answer.
I was sure that I recently saw very effective zoom feature in someone's patch, but I can't remember where. .
Maelstorm is too humble to mention it, but his [waveform.mmb] abstraction is very effective in doing this, it changed my life !
Nau
Ha! Actually, I didn't mention it because it's not vanilla. I attempted at first to make it vanilla-friendly, but it just wasn't worth it. It was WAY too slow.
What do you think, is it matter of object ([until] vs [uzi]), or package (vanilla vs extended)?
I believe it's just the interpreter. [until] sends out its bangs as fast as possible, but when you do a large amount of iterations over a pretty big loop, all of the message-passing and whatever initialization an object needs to make when it gets a message adds up. If you are able to stick some of that processing into a single external, you can skip all that extra overhead, and you also have the added luxury of the compiler making some optimizations on your code.
Have look at this one, it's amazing:
|] [] |.| ][|-| -- http://soundcloud.com/domxh
Oops! Looks like something went wrong!