PURE DATA forum~

...that deal with pure data

You are not logged in.

#26 2011-11-30 07:06:50

matju
Member

Re: Challenge #1 - [osc~]->[dac~]

trying to re-send my 3rd submission (frequency only)

it didn't go through the first time.


Attachments:
Attachment Icon juste-osc-3.pd, Size: 528 bytes, Downloads: 131

Offline

 

#27 2011-11-30 07:12:58

matju
Member

Re: Challenge #1 - [osc~]->[dac~]

The [& 255] is really just the same as [mod 256].

The & is often faster than mod or % in many programming languages, though not in pd. It's just some kind of habit in this case. Except that if you use the GridFlow external, then doing [# &] on many values in one message can be a lot faster than [# %] or [# rem]. It's because & is an integer-only operation, and pd is a float-only language (except in GridFlow).

I've been using [f]x[+ 1] counters for a long time, and occasionally [+]x[t] counters, but in both cases, if there is not a reset using a [mod]-like object or [sel] or [moses] or other, then it gets stuck when it gets at 16777216.

Offline

 

#28 2011-11-30 08:05:01

Maelstorm
Administrator

Re: Challenge #1 - [osc~]->[dac~]

matju wrote:

trying to re-send my 3rd submission (frequency only)

I see you're throwing in the "fewest objects" idea there, too. ;-) I like it!


.mmb   |   My library

Offline

 

#29 2011-11-30 08:15:53

matju
Member

Re: Challenge #1 - [osc~]->[dac~]

Another topic related to Challenge #1 is my trick for making a stereo oscillator with exponential decay, from a single [cpole~] and no signal input. Well, it's not really mine, but I've never seen it as a pd patch before I did it.

I already posted something like it in the «fewest objects» thread, but it was as a [fexpr~] single-object-does-everything kind of patch. Now try to do it with [cpole~], [dac~] as the only signal-objects.

Offline

 

#30 2011-12-01 07:15:33

mod
Administrator

Re: Challenge #1 - [osc~]->[dac~]

is there a write-up somewhere of how [cpole~] works?  that would be handy, as it's not exactly the most intuitive thing to come to grips with.

here's a little delay/feedback thing (thanks to focalt for triggering that idea with his midi looper questions)


Attachments:
Attachment Icon OscDelay.pd, Size: 8,402 bytes, Downloads: 143

Offline

 

#31 2011-12-01 16:38:34

matju
Member

Re: Challenge #1 - [osc~]->[dac~]

[cpole~] works the way it's written in its help file, but if you want a totally different explanation of it, let's say that its outlets represent x,y of a moving point in 2 dimensions, the first two inlets (let's call them a,b) represent a motion, and the other two inlets represent a transformation... let's call them u and v.

The x,y get rotated and scaled by computing xu-vy and xv+uy. This causes a rotation by atan2(v,u) and a scaling by sqrt(uČ+vČ). Then a,b are added, to move the dot (plain translation), and that becomes the new x,y and the new output.

So, it's the same idea as [rpole~], but using complex numbers, which introduces a 2nd dimension to each signal, and a rotation concept.

Offline

 

#32 2011-12-01 17:12:34

mod
Administrator

Re: Challenge #1 - [osc~]->[dac~]

someone one day will explain it to me in a simpler way, i'm sure.

i need something more in the form of: "Jenny has 3 cakes, and Margie has 4 cakes.  Together they have 7 cakes"

the bits i can maybe makes sense of are: 

sqrt(uČ+vČ)  : this seems like an equation to find the side length of a triangle if the other 2 sides are known.




i hated trigonometry, and didn't pay too much attention, but with this bit:

atan2(v,u)   , i'm kind of guessing that u and v are also along the x and y axes ?

in that case, there is a right angle, and some dim memory tells me that i can use that to find the other angles if i know 2 side length or a side length and an opposite angle or whatever.  Sorry, i should have paid more attention in trig classes.


...actually now it is coming back a bit. 

i don't understand the difference between a motion and a translation though.

Offline

 

#33 2011-12-01 17:37:15

matju
Member

Re: Challenge #1 - [osc~]->[dac~]

Well, «motion» is more vague... I mean the kind of motion that is done by just adding, and this is translation.

Yes, (u,v) are in the same plane as (x,y) and (a,b).

The right angle idea you found is because the y axis is at a right angle with the x axis. It'd take a longer explanation to show it all, but in short, the meaning of xu-vy and xv+uy involves several right angles.

The formulas for the amounts of rotation and scaling are actually a reversal of :
u = scaling*cos(rotation)
v = scaling*sin(rotation)

You can indeed see u and v as sides of a right triangle for which you are figuring out the long side.

I don't know Jenny and Margie, but I bet that they aren't in grade 11. I like explaining things simply, but there are limits to what is possible to explain simply, in a few minutes, in a little box, in a foreign language, to a stranger. ;)

Offline

 

#34 2011-12-12 07:20:58

Re: Challenge #1 - [osc~]->[dac~]

Great challenge and submissions!  I had not played with pd in a few months, so this was a very fun way to refresh my memory.


Attachments:
Attachment Icon timOneOsc.pd, Size: 5,290 bytes, Downloads: 135

Offline

 

#35 2011-12-12 15:39:57

axiomshell
Member

Re: Challenge #1 - [osc~]->[dac~]

1 - Awesome stuff (all of them)
2 - I still have a lot of Pd to learn...

:)

Offline

 

#36 2011-12-12 17:30:00

mod
Administrator

Re: Challenge #1 - [osc~]->[dac~]

that's a great one! very interesting to try tweaking the sliders to make long sequences.

anyone got any ideas for challenge number 2?  we'll probably launch it early next year, but it'd be good to get some ideas in.

Offline

 

#37 2012-03-23 02:25:23

godinpants
Member

Re: Challenge #1 - [osc~]->[dac~]

Here's a not very interesting FM and sequencer.


puredata punx

Attachments:
Attachment Icon weakfm.pd, Size: 4,447 bytes, Downloads: 93

Offline

 

#38 2012-03-23 04:44:15

mod
Administrator

Re: Challenge #1 - [osc~]->[dac~]

great.  Now someone please suggest a new challenge.

Offline

 

#39 2012-03-25 01:27:57

godinpants
Member

Re: Challenge #1 - [osc~]->[dac~]

Challenge suggestion, recreate this sound: http://www.youtube.com/watch?v=SEq0X6awNO4


puredata punx

Offline

 

#40 2012-03-25 07:32:16

mod
Administrator

Re: Challenge #1 - [osc~]->[dac~]

ha ha , that's awesome.  +1 vote from me on that.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson


pd.webring info