[PD] 3d fractals was Re: access to pd table from another application

2011-03-30 Thread Billy Stiltner
On 3/30/11, Mathieu Bouchard  wrote:

> I have no use for that. The code I write nowadays does not work on
> anything else than the GNU compilers. I also had good knowledge of 16-bit
> DOS stuff back then, but chose to try to forget it.
>
> The only thing I want to do relative to MS compilers, is know how to call
> GEM functions from GridFlow, where GEM is compiled by VC++, and GridFlow
> is compiled by MinGW. This is (probably) required to get [#from_pix],
> [#to_pix] and [gemdead] to work again on Windows.

Here is the MingW docs for how to do that but the link to reimp
appears to be dead.
http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs


If you could reverse engineer this it might work. Appears the stack is
reversed and the segments are in diferent chunks.
http://www.mmowned.com/forums/world-of-warcraft/bots-programs/memory-editing/281008-gcc-thiscall-calling-convention-linux-win32-mingw.html


Indeed the GEM exports are declared like this
# define GEM_EXPORT __declspec(dllexport)

The thing to do is use vc++ to compile to assembly language an  export function.
Then get gcc to compile the corresponding import function.

Look at the differences and make some inline assembly code to compensate.
Here is a reference from the gcc vcc+ veiwpoint.
http://wyw.dcweb.cn/stdcall.htm




> I am unsufficiently sophisticated for that kind of technology. Instead, I
> settled for using Linux.

Ha Ha likewise on the unsufficiently.

>
> What do you mean by « not correct » ?
>
>>   newx = ((x * x) - (y * y) - (z *z)) +k;
>
> for newx=0, x²-y²-z² = -k, hyberboloïd equation (revolution of hyperbola
> around x axis)
>
>>   newy = ((y *x) + (x *y)) +l;
>
> y*x = x*y, so for newy=0, 2*x*y = -l, another hyperbola formula
> (diagonally), but this one has translation symmetry instead, along z axis
> (because z is not used in this formula)
>
>>   newz = ((z * x) + (x * z)) +m;
>
> similar thing. but those * above are not products of floats, tell me right
> away.


Hopefully the compiler understood.

I have also used the quaternion with W removed.

Here are my notes on the matter.


**START OF HISTORY
1996 Formula:

 newx=((x*x)-(y*y)-(z*z))+k;
 newy=((x*y)+(x*y))+l;
 newz=(x*z)+(x*z)+m;

>From my green folder that has ENG 111 on the front
(guess this explains my bad grammar)

A*B=C
where
A:[x1,y1,z1]
B:[x2,y2,z2]
C:[x,y,z]

[x1,y1,z1] * [x2,y2,z2] = [x,y,z]


x = (x1*x2) - (y1*y2) - (z1*z2)
y = (x1*y2) + (y1*x2)
z = (x1*z2) + (z1*x2)

Correct only if A and B are the same
Or if x1,y1,z1 are the same and
 x2,y2,z2 are the same
 and a few other cases
 otherwize magnitude of x,y,z
 is slightly different than A * B
END OF HISTORY

START OF CODE 
SNIPET*
void mandelbrot::iterate(void)
{

 int vtxi;

 long int p,q,r;
 int n;
 double k,l,x,y,z,newx,newy,newz;
 double m;

 vtxi=0;

 for(r=1; rmagnitude)
   {
if((n>lowcolor)&&(n
> Complex numbers have 2 dimensions. The logic that originally led to
> finding them doesn't work for more dimensions. Looking at complex numbers
> in different ways (as modified vectors or as modified polynomials) leads
> to other structures that are interesting, in 2 or 4 or more dimensions,
> but fail to be as nice as complex numbers are. Complex numbers are very,
> very similar to real numbers.

> I don't know of any 3-dimensional number system that is sufficiently
> similar to complex numbers to be comparable.
>
>> a: [x1,y1,z1]
>> b: [x2,y2,z2]
>> a*b=(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k
>
> this is almost like cross-product, but the j part has the wrong sign.
> anyway. cross product is weird because a*a = 0, and this is also the case
> for your cross-product-like operator.


I have visited this perplexing search for the 3 dimensional equivalent
of j or i sporadically.
Elusive it is.


> I get the following error message :
>
>:-\ Cette vidéo est privée.
>Opération impossible
>
>   ___
> | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC

Appologies. You should be able to view it now. I had it set to private
instead of hidden.

 http://www.youtube.com/watch?v=xZUTn-rie8w

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Get list of a the arguments of a patch without using any external?

2011-03-30 Thread Jonathan Wilkes


--- On Thu, 3/31/11, Mathieu Bouchard  wrote:

> From: Mathieu Bouchard 
> Subject: Re: [PD] Get list of a the arguments of a patch without using any 
> external?
> To: "Jonathan Wilkes" 
> Cc: pd-list@iem.at
> Date: Thursday, March 31, 2011, 3:40 AM
> On Mon, 7 Mar 2011, Jonathan Wilkes
> wrote:
> 
> > I know, but I think your suggestion is cleaner-- you
> can get then number of args by [$@(--[list length] so $#
> isn't needed, and as you point out, having a way of saying
> "put args from $n and up in this object box" is very
> useful.
> 
> But what would be the syntax for it ?

I don't know. $@-3 = from $3 onward? Or $@3?

> 
> > (Without that, one either has to make the number of
> args static, or use dynamic patching-- i.e., either be less
> flexible or complicated.)
> 
> But dynamic patching does deserve to become easier too, and
> more high-level.

Absolutely.  It's just that $@ was sitting there ready, along with your 
comment, and both are concrete ideas that have concrete benefits so I 
thought it was worth getting it implemented.

> Imagine something like what [#in] or [#out]
> does for loading plugins, except it would be available for
> general use for any purpose whatsoever.

You'll have to walk me through this a bit-- I haven't used those 
before.

> Then imagine other
> things.
> 
> >> PS: the [delwrite~] clear method 
> >> http://sourceforge.net/tracker/?func=detail&aid=3170987&group_id=55736&atid=478072
> >> is still assigned to "nobody", because it's
> waiting for any
> >> of the five project admins to click on a button...
> It also
> >> didn't appear on pd-...@iem.at
> >> either : http://lists.puredata.info/pipermail/pd-dev/2011-02/thread.html
> > 
> > If one of the admins (finally) takes care of that,
> would you consider submitting a patch for $@ with the
> functionality you wrote in the comment?
> 
> It was just a reminder, not a condition.
> 
> 
> ___
> | Mathieu Bouchard  tél: +1.514.383.3801 
> Villeray, Montréal, QC

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Get list of a the arguments of a patch without using any external?

2011-03-30 Thread Ivica Ico Bukvic
> >> PS: the [delwrite~] clear method
> http://sourceforge.net/tracker/?func=detail&aid=3170987&group_id=557
> 36&atid=478072
> >> is still assigned to "nobody", because it's waiting for any
> >> of the five project admins to click on a button... It also
> >> didn't appear on pd-...@iem.at
> >> either : http://lists.puredata.info/pipermail/pd-dev/2011-
> 02/thread.html
> >
> > If one of the admins (finally) takes care of that, would you consider
> > submitting a patch for $@ with the functionality you wrote in the
> > comment?
> 
> It was just a reminder, not a condition.

Having merged this feature (with changes) to pd-l2ork, I can attest that the 
patch in its current condition will not work because memory allocation has 
changed dramatically since the patch was submitted, rendering it incomplete 
(e.g. code won't even compile). If interested, feel free to dig around pd-l2ork 
code to find the updated implementation (sans $# which is superfluous with the 
introduction of [list length], as Jonathan pointed out).

Best,

ico


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Get list of a the arguments of a patch without using any external?

2011-03-30 Thread Mathieu Bouchard

On Mon, 7 Mar 2011, Jonathan Wilkes wrote:

I know, but I think your suggestion is cleaner-- you can get then number 
of args by [$@(--[list length] so $# isn't needed, and as you point out, 
having a way of saying "put args from $n and up in this object box" is 
very useful.


But what would be the syntax for it ?

(Without that, one either has to make the number of args static, or use 
dynamic patching-- i.e., either be less flexible or complicated.)


But dynamic patching does deserve to become easier too, and more 
high-level. Imagine something like what [#in] or [#out] does for loading 
plugins, except it would be available for general use for any purpose 
whatsoever. Then imagine other things.



PS: the [delwrite~] clear method 
http://sourceforge.net/tracker/?func=detail&aid=3170987&group_id=55736&atid=478072
is still assigned to "nobody", because it's waiting for any
of the five project admins to click on a button... It also
didn't appear on pd-...@iem.at
either : http://lists.puredata.info/pipermail/pd-dev/2011-02/thread.html


If one of the admins (finally) takes care of that, would you consider 
submitting a patch for $@ with the functionality you wrote in the 
comment?


It was just a reminder, not a condition.

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] access to pd table from another application

2011-03-30 Thread Mathieu Bouchard

On Wed, 30 Mar 2011, Billy Stiltner wrote:

I have dug through my archives and found some programs that might be of 
interest to you as a reference for ms style handling of memory and 
registers with cpp and asm.

http://www.geocities.ws/billy_stiltner/code/ASM.zip


I have no use for that. The code I write nowadays does not work on 
anything else than the GNU compilers. I also had good knowledge of 16-bit 
DOS stuff back then, but chose to try to forget it.


The only thing I want to do relative to MS compilers, is know how to call 
GEM functions from GridFlow, where GEM is compiled by VC++, and GridFlow 
is compiled by MinGW. This is (probably) required to get [#from_pix], 
[#to_pix] and [gemdead] to work again on Windows.


But those are not the only ways to make GF and GEM work together : there's 
also [gf/gl].



Here's you something to make the dos shell look more like an old linux
terminal haha!
http://www.geocities.ws/billy_stiltner/code/FONT.zip


I am unsufficiently sophisticated for that kind of technology. Instead, I 
settled for using Linux.


And here is my 3d fractal. It is not correct it is using this for the 
orbits which is pretty and more like what I would imagine a 3d fractal 
looking like instead of a hypercomplex, quaternion, mandelcube or bulb..


What do you mean by « not correct » ?


  newx = ((x * x) - (y * y) - (z *z)) +k;


for newx=0, x²-y²-z² = -k, hyberboloïd equation (revolution of hyperbola 
around x axis)



  newy = ((y *x) + (x *y)) +l;


y*x = x*y, so for newy=0, 2*x*y = -l, another hyperbola formula 
(diagonally), but this one has translation symmetry instead, along z axis 
(because z is not used in this formula)



  newz = ((z * x) + (x * z)) +m;


similar thing. but those * above are not products of floats, tell me right 
away.


This is what I need to know how to do for the fractal for correct math 
but noone seems o know how to do complex numbers in 3d.


Complex numbers have 2 dimensions. The logic that originally led to 
finding them doesn't work for more dimensions. Looking at complex numbers 
in different ways (as modified vectors or as modified polynomials) leads 
to other structures that are interesting, in 2 or 4 or more dimensions, 
but fail to be as nice as complex numbers are. Complex numbers are very, 
very similar to real numbers.


I don't know of any 3-dimensional number system that is sufficiently 
similar to complex numbers to be comparable.



a: [x1,y1,z1]
b: [x2,y2,z2]
a*b=(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k


this is almost like cross-product, but the j part has the wrong sign. 
anyway. cross product is weird because a*a = 0, and this is also the case 
for your cross-product-like operator.



A comedy cartoon I done that has a mention of 5 dimensions.
http://www.youtube.com/watch?v=xZUTn-rie8w


I get the following error message :

  :-\ Cette vidéo est privée.
  Opération impossible

 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] access to pd table from another application

2011-03-30 Thread Billy Stiltner
>> Something prevented me from using glut
>> in the past I do not remember what it was.
>
> GLUT absolutely wants to run an infinite loop, otherwise it will not give
> you any events. Therefore you can't run it in the same thread as pd's
> event loop.
>

That must have been what kept me from using it as well.



> I tried breaking out of the event loop using setjmp/longjmp, just to make
> sure all implementations would support that hack, because I didn't want to
> use threads. The hack only worked on Linux, so I decided not to work with
> GLUT.
>


I have dug through my archives and found some programs that might be
of interest to you as a reference for ms style handling of memory and
registers with cpp and  asm.

http://www.geocities.ws/billy_stiltner/code/ASM.zip
That should get your mindframe going in the right direction haha!
It's all 16 bit code though so of no use now besides a reference but
the function pointers and interrupt pointers should still be the same
I'll have to do some studying now.

Allthough with windows XP this worked
http://www.geocities.ws/billy_stiltner/code/DLLTEST.zip


Here's you something to make the dos shell look more like an old linux
 terminal haha!
http://www.geocities.ws/billy_stiltner/code/FONT.zip

And here is my 3d fractal. It is not correct it is using this for the
orbits which is pretty and more like what I would imagine a 3d fractal
looking like instead of a hypercomplex, quaternion, mandelcube or
bulb..

newx = ((x * x) - (y * y) - (z *z)) +k;
   newy = ((y *x) + (x *y)) +l;
   newz = ((z * x) + (x * z)) +m;

This is what I need to know how to do for the fractal for correct math
but noone seems o know how to do complex numbers in 3d. Maybe someone
on the list can shed me some light on the subject.

/*
a: [x1,y1,z1]
b: [x2,y2,z2]

a*b=(y1 * z2 - z1 * y2)i + (x1 * z2 - z1 * x2)j + (x1 * y2 - y1 * x2)k

*/
here's the link to the code. the exe runs on vista and xp.
http://www.geocities.ws/billy_stiltner/code/fractal.zip
http://www.geocities.ws/billy_stiltner/code/website.zip

website.zip contains documentation sucha as keycommands.
It is awesome to view a transparent 3d fractal rotating and colorcycling.
I would love to do this with GEM. Any tips on achieving that would be wonderful.



>> I do not know about GEM and another opengl app coexisting though.
>
> Some months ago, I was told on pd-list that [gemwin] and [pdp_glx] can't
> coexist.


That is no good I will have to do what I need in an external for PD
but am still looking into
netsend and netreceive. I did find a library
http://stephengware.com/proj/javasocketbridge/
that works to connect but am studying cross browser DOM to get my code
to send messages. It's not the same as it used to be.Hopefully I can
write my own socket thing in JAVA to have a browser interface to pd.
This is still not good for files and saving presets so a JAVA file
server will have to be written as well.  I was able from a cmd prompt
and an MSYS shell to both pdsend and pdreceive. pretty cool another
option for  external application interface.




> If you have any pixel structures that don't fit in GEM, there is GridFlow.
> Supports up to 15 dimensions (though there's hardly ever a need for more
> than 5).
>
>   ___
> | Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
>

I will look into it. see above link for opengl program fractal.zip I'm
trying to implement.

A comedy cartoon I done that has a mention of 5 dimensions.
http://www.youtube.com/watch?v=xZUTn-rie8w

Come on E16 haha!

Thanks for the response it it has triggered some sparks. Now I must
get to studying and patching. I wonder if my drum machine will ever be
finished now.

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd latency on puredyne 9.10 with Nvidia HDA

2011-03-30 Thread Billy Stiltner
On 3/30/11, joel silvestre  wrote:
> Just in case, do you run pd with the rt flag?
>
> Joël
>

Sometimes

Thanks for thinking of that.
I'm thinking it is a hardware problem or some kind of kernel configuration.
I sent my patch to someone and it ran with smooth audio and  a very
low cpu load.
Cpu load on my machine goes up to 73% or so on UBUNTU studio 10.10.
The cpu load is very high with that linux at all times. It is the
opposite with windows cpu load is normally low and memory use is high.
Could be the power settings in linux. I have not messed with the power
settings.

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] [PD-announce] Tamuke - Offerings for Japan - Montreal

2011-03-30 Thread Michal Seta
Please forgive x-posts.



手向け TAMUKE

Offrandes pour le Japon / Offerings for Japan

April 1, 2011 from 8PM to 3AM
SAT, 1201, Boulevard Saint-Laurent

Open Call to all Laptop/iPhone Musicians in Montréal

Bring Your Own Laptop Orchestra
matralab (Hexagram Concordia) in collaboration with the SAT (Société des
arts technologiques) is organizing an artistic response to the disasters in
Japan (see the website for more info http://matralab.hexagram.ca/tamuke/).
The event will take place this friday at the SAT, 1201, Boulevard
Saint-Laurent in Montréal.
Around midnight we would open the stage for all Laptop/iPhone musicians to
come together and create a collective sound work, led and inspired by Eldad
Tsabary, founder and director of the Concordia Laptop Orkestra (CLOrk).
Over the past weeks, matralab (Concordia University) has collected some news
audio footage from the disasters with the goal of creating an audiowave
representing the mayhem that occurred when the tsunami hit Japan.
We invite you to bring your laptop/iPhone and your own portable
speakers/amplifiers !

Come latest at 11pm.

At the SAT, you will be able to download the audio files of the disaster
from a local server.
Everyone is welcome to interpret, mashup, remix, livecode, or play back
those materials with their software of preference. We would prefer if you
used MAINLY these materials.
At 11:45pm, Eldad Tsabary will give a short and simple intro into his laptop
conducting technique, so that the sounds coming from all of you can be
coordinated in some way by visual signs.
At midnight, you will all go to the stage and perform together for 30 min.
Please feel free to forward this announcement to anyone who may be
interested. And come yourself, of course.
And please sign-up by e-mail to japan.vi...@gmail.com just so we can
estimate how large the BYOLaptop Orchestra will be.

-- 
Michal Seta
Tech coordination
TAMUKE Project
514.575.9243
___
Pd-announce mailing list
pd-annou...@iem.at
http://lists.puredata.info/listinfo/pd-announce
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] triplicata (Re: access to pd table from another application)

2011-03-30 Thread Mathieu Bouchard


Sorry for the triplicata, this was a glitch probably due to having to 
reboot my server while the mail was being sent.


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] access to pd table from another application

2011-03-30 Thread Mathieu Bouchard

On Tue, 29 Mar 2011, Billy Stiltner wrote:

opengl seems to be the most common thing between mac, linux and ms so 
that is probably the best route for graphics.  I had no idea that there 
were keyboard routines in glut. Something prevented me from using glut 
in the past I do not remember what it was.


GLUT absolutely wants to run an infinite loop, otherwise it will not give 
you any events. Therefore you can't run it in the same thread as pd's 
event loop.


I tried breaking out of the event loop using setjmp/longjmp, just to make 
sure all implementations would support that hack, because I didn't want to 
use threads. The hack only worked on Linux, so I decided not to work with 
GLUT.



I do not know about GEM and another opengl app coexisting though.


Some months ago, I was told on pd-list that [gemwin] and [pdp_glx] can't 
coexist.


It is awesome to have GEM right there in PD but I'm having difficulty 
translating multiple objects like a 3d pixel space of say 300 x 300 x 
300 cubes


If you have any pixel structures that don't fit in GEM, there is GridFlow. 
Supports up to 15 dimensions (though there's hardly ever a need for more 
than 5).


 ___
| Mathieu Bouchard  tél: +1.514.383.3801  Villeray, Montréal, QC
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] pd latency on puredyne 9.10 with Nvidia HDA

2011-03-30 Thread joel silvestre
Just in case, do you run pd with the rt flag?

Joël


Le lundi 28 mars 2011 à 22:02 -0400, Billy Stiltner a écrit :
> On 3/28/11, yvan volochine  wrote:
> > On 03/28/2011 01:22 AM, Billy Stiltner wrote:
> >> I actually tried a smaller patch on both ubuntu studio 10.10 as well
> >> as puredyne 9.10.
> >> On both systems the audio was flawless using a 6ms buffer in pd.
> >>
> >>   So there is nothing wrong with my audio setup.
> >>
> >> But still the larger patch that runs fine on windows with 50ms buffer
> >> will not run without glitching with jack on either linux system.
> >>
> >> There is a difference in gem's default video codec between linux and
> >> windows. However I have tried the patch without even loading gem.
> >>
> >> What else could be the difference between linux and windows with pd?
> >
> > not with pd but there certainly are some differences in how the OS
> > handles your hardware.
> > IIUC you're getting into troubles as soon as the graphics are involved
> > in your patch ? your internal soundcard is Nvidia as well as your
> > graphic card, therefore my idea of trying with an external soundcard so
> > Nvidia chip takes care of graphics only (not sure if that makes sense,
> > coffee mode here).
> > anyway, I wouldn't trust Nvidia for anything else than graphics but
> > maybe that's just me
> >
> > 0.02 €
> > _y
> >
> yvan, thanks for the suggestion. I will have to try that. I noticed
> that both my sound card and SATA controller are both on IRQ 23 with
> Puredyne. This is not so with windows. Possibly this explains the
> problem. Allthough the glitching occurs when no file writing is
> happening the patch does prepare some files to be written to at
> startup.  The SATA controller is managed by Nvidia as well as the
> sound card. The audio chip(realtek) is separate from the Video and pci
> controller. I have not seen mention of the Realtek drivers for linux.
> So I will try to find out how to get Linux to use a differen't IRQ for
> the SATA controller and see if that does the trick. I don't think the
> BIOS allows for manually setting the IRQs of PCI devices but does
> offer the reserving of IRQs or assigning them to ISA devices. This
> discussion is getting off topic of PD but I would really like to use
> PD with Linux on this machine. I'm probably better off deleting the
> linux partitions though.
> 
> ___
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


[PD] Gem Stereo Imaging

2011-03-30 Thread Raffael Seyfried

Hi List

I have a question concerning the Stereo Imaging capabilities in Gem.
In two weeks I do the visuals on a party  and I've written a patch with 
some animations.
The idea was to do those projections in a simple form of 3d-Vision as a 
little gimmick, nothing too fancy though. My question is:


Does anyone of you have expierience with this? More importantly is there 
a way to project the visuals in red/cyan? That's what the 3d-Glasses 
merchant told me would work best. I only found a red/green stereo mode 
in pure data, which he told me would only work with black and white 
animations.


Thanks

Raffael

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list