Search found 68 matches

by mguzdial
Sep 28th, '15, 01:14
Forum: Extending GP
Topic: Can we add new control structures to GP?
Replies: 7
Views: 3773

Re: Can we add new control structures to GP?

I"m okay with no closures. I'm an old-time Logo programmer. I look forward to exploring the functions as first-class object features!
by mguzdial
Sep 25th, '15, 16:41
Forum: Extending GP
Topic: Can we add new control structures to GP?
Replies: 7
Views: 3773

Can we add new control structures to GP?

This is a question about Extending GP, rather than describing an extension of GP. Would y'all prefer these under feature requests? Can we add new control blocks to GP? How do we do it? The control blocks defined in AuthoringSpecs.gp seem to all map to the underlying implementation -- the primitive s...
by mguzdial
Sep 25th, '15, 12:59
Forum: Requests
Topic: Export of sounds?
Replies: 1
Views: 2532

Export of sounds?

I'd love to be able to export a WAV file. As I'm creating effects in GP, I can play them, but I can't export them to share here or via email or anywhere else. I see that I can export images. Could we have that for sounds, too?
by mguzdial
Sep 25th, '15, 12:56
Forum: Working with GP
Topic: Audio Blocks
Replies: 4
Views: 2663

Re: Audio Blocks

I wrote a piece of code to play samples. to playSamples samples { openPortAudio len = (count samples) i = 1 while (i < len) { bufsamples = (list) bufcount = 0 while (and (bufcount < 1024) (i < len)) { add bufsamples (at samples i) i = (i + 1) bufcount = (bufcount + 1) } waitForAudio writeAudioData (...
by mguzdial
Sep 17th, '15, 16:57
Forum: Working with GP
Topic: Audio Blocks
Replies: 4
Views: 2663

Re: Audio Blocks

I'm working on being able to manipulate samples and then play them again. I've now decided that I want to create new sounds with changed samples, and I think I know how to do that. But in my explorations, I built a bit of code that I don't quite understand what's going on yet. Here's the code that I...
by mguzdial
Sep 17th, '15, 16:49
Forum: Working with GP
Topic: Class variables?
Replies: 1
Views: 2488

Class variables?

Is it possible to have class variables in GP? I was thinking about implementing the change of color function on pixels so that I only refresh every nth pixel change, or at the end of each row/column. But to do that, I'd need a count outside of any individual pixel. Could I use a class variable on cl...
by mguzdial
Sep 15th, '15, 18:05
Forum: Extending GP
Topic: Extending GP with Blocks to manipulate Pixels
Replies: 1
Views: 3004

Extending GP with Blocks to manipulate Pixels

In our Media Computation approach to teaching intro CS (see http://www.mediacomputation.org ), we write Python code that looks like this: def decreaseRed(picture): for pixel in getPixels(picture): r = getRed(pixel) setRed(pixel, r * 0.5) I wanted to be able to do similar things in GP, and with help ...
by mguzdial
Sep 15th, '15, 17:45
Forum: Projects
Topic: Dots
Replies: 2
Views: 2386

Re: Dots

So cool, John! I'm still wrapping my head around instantiating new objects within GP. What are the effective limits to number of instances and their size? I'm wondering if I could do some Kedama-like things, where I create single-pixel instances that get their color from some image, and then have th...