• kompaqt.core

    Hello there,

    i would like to share two abstractions which allow you to create and control many instances of the same oscillator voice. The [polyx] object has two creation arguments, the number of voices and the name of the voice abstraction. The [sweepOsc] abstraction contains a comlex oscillator with a frequency ramp and an envelope.

    The polyx-help shows how you can address single voices with lists or i.e. generate a chord from 3 notes containing 10 harmonics each.

    If you want the [polyx] to use any of your abstractions you need to take care of the send/receive arguments, since they are desgined for the [sweepOsc] abstraction.

    This method can be used for any kind of abstraction from arrays to voices, filters or whatever you might need hundreds of (the loading of the objects though will definitely take a while).

    Any comments appreciated.

    gn8, kq

    http://www.pdpatchrepo.info/hurleur/polyx.zip

    posted in abstract~ read more
  • kompaqt.core

    Hey,

    this external is a very basic expansion of an [until] object. It can be used in any case where you would normally go for [until] plus any kind of counter (i.e. looping through arrays in logical time).
    You can set the number of steps via upper and lower limit and finally multiply the output by any constant allowing for some flexibility. All values can be negative as well. You can't accidentally go in an infinite loop either.

    I included the source and the makefile for linux or os x users. It's compiled as *.dll on a windows system.

    Hope anyone finds it useful.

    kq

    http://www.pdpatchrepo.info/hurleur/vor.zip

    posted in extra~ read more
  • kompaqt.core

    Hey there,

    i created two C externals pretty close to the tutorial examples from the HOW-TO. Compiling worked but PD didn't recognize the class_setup. I searched a bit and found i had to insert the line "__declspec(dllexport) void classname_setup(void);". After that PD recognizes the object.
    The only problem left is that my external isn't properly loaded every time i open a patch containing the object. Sometimes it gets changed to a simple comment. Its saying #X text 100 100 myexternal; in the .pd file, so it seems to happen while saving. It doesn't happen every time but often enough.
    Is this related to the line i had to insert? I thought it just changes the way PD handles the setup routine.
    In the running PD environment the externals work without any problems. Only the loading issue remains.

    I used dev c++ with mingw to compile it. I'm not familiar with compiling using a makefile. Any help is appreciated.

    kq

    posted in extra~ read more
  • kompaqt.core

    Hi there,

    i put together two abstractions which help shaping any ramp from objects like [line], [line~] and [vline~] or any numberstream between 0 to 1 and -1 to 1. You might be familiar with the quadratic or quartic methods to get non-linear ramps.

    The idea is this: You choose one of six modes, set the first and second limit of the output range and feed the abstraction with a ramp from 0 to 1.

    The modes are: three versions of the popular smoothstep, x^n, 1/(x^n), and a two point catmull-rom spline.
    The shaping always gets done in the range of -1 to 1 and after that the ramp is scaled up or down depending on the limits set.
    So to get quartic shaping you go for the x^n mode and set n=4. n=0.5 would be sqrt(2). You get all the possibilities from x^n to help shape any ramp from a to b. If you want to reverse the ramp simply switch the values of the limits.

    You should start with the myline_ex.pd patch for control and audio examples.
    Hope anyone finds it useful. I appreciate any comments.

    [disconnect(
    |
    [kompaqt.core]

    http://www.pdpatchrepo.info/hurleur/_mylines.zip

    posted in abstract~ read more
  • kompaqt.core

    Hi again,

    i tried your patch but didn't get out the real values. It seems the [bytes2any] produces some weird ascii stuff.

    You might want to check out the pdstring-help.pd in pd/extra/moocow and http://puredata.hurleur.com/sujet-2533-ascii-float .

    Maybe you just need to delimit every value you are sending with " " (space?) or a 0 byte. My message in Blender looks like: <bytesfrom int/float/string>+" "+<anotherbyte>+" "+etc.

    Otherwise i have no idea what could be wrong. But it seems your close to the real deal.

    Hope you can figure it out, kq

    posted in technical issues read more
  • kompaqt.core

    Hey vito,

    i tried VS and Dev-C++ but got stuck also. I found a simpler way, you might want to take a look at my last post here: http://puredata.hurleur.com/sujet-8697-problem-external-windows-saved-object-loaded-text

    For me this is the way to go. Basically take any program you like to create the *.c file and then use the template library including the makefile from the PD dev's.

    Hope it helps, kq

    posted in extra~ read more
  • kompaqt.core

    Hi dwan,

    thanks for the input. If you change the number of voices in [polyx] via numberbox on the right inlet, you can change the number of abstractions loaded without invoking a modification in any patch, but i'm not sure why actually. [polyx] itself doesn't get modified by changing the content of the [pd $0-voices].

    Since you need to modify [polyx] for use with different abstractions, it should be possible to use it as a template and then stop worrying about the saving issue.
    I thought about adding the possibility to change the abstraction you want to load also, but this won't work because the list in [polyx] is specifically designed for my [sweepOsc] abstraction.

    greetings from a snowy alps lodge, kq

    posted in abstract~ read more
  • kompaqt.core

    Hi all,

    since nobody comments on my idea i would really like to get some advice on future posts.

    Please help me to improve my presentation.
    Is this idea to basic to post about it?
    Was something like that posted already so it could be considered a double post?

    I had the feeling it is a generic way to get an "array of objects" like it is used in any other programming language, but with way less effort than something like the [polysynth] object with the wrapper and several sub-patch levels.

    thanks, kq

    posted in abstract~ read more
  • kompaqt.core

    Hey happilylazy,

    i never heard of those functions, and obviously got lucky to get it working without any proper networking knowledge. If it helps, my python code uses (socket.AF_INET,socket.SOCK_DGRAM) which should be the standard udp socket. I read about AF_INET in the ntohl() function descripition. So if my python message is reversed then the bytes2any object is able to get it in the right order.

    kq

    posted in technical issues read more
  • kompaqt.core

    Hey,

    i hope this helps. My message from Blender consists of a bytestring (address, stuff you want to send, 0). The 0 is used to delimit the message which is spit out by the bytes2any object. After that you can route the list by the address you gave it. See the attachment.

    kq

    http://www.pdpatchrepo.info/hurleur/UdpTest.pd

    posted in technical issues read more
  • kompaqt.core

    Hi,

    i had the same problem connecting Blender to PD. I'm using the [udpreceive] object.

    In PD extended theres an object [moocow/bytes2any]. It converts from bytes(bytestring) to a PD list. After that you can use the [route] object as usual.

    greets, kq

    posted in technical issues read more
  • kompaqt.core

    Hey,

    to open an abstraction like you described you need to do something like:

    [netreceive port]
    |
    [obj xpos ypos $1 <optional arguments of your abstraction>(
    |
    [send <name of a subpatch>]

    So the minimum information would be the first 4 arguments. "obj" tells pd what to create, positions are from top left in pixels, and finally the name of your abstraction. I strongly suggest you check out the pd/doc/manuals/pd-msg to get into that area. It's called dynamic patching.

    See the attachment for the basic idea. It's easier to work within a sub-patch so you can clear any mess without affecting the client.

    Hope it helped.

    greetings, kq

    http://www.pdpatchrepo.info/hurleur/createAbstraction.pd

    posted in technical issues read more
  • kompaqt.core

    Hey domien,

    it's possible to count backwards. Set the 2nd limit to a negative value, say -9, the step to -1 and the 1st limit to 1 it counts from 9 to 0. So you need to remember that the number of steps is always the difference between the limits.

    P.S.: I just figured that out. I will add it to the helpfile soon.

    greetings,
    kq

    posted in extra~ read more
  • kompaqt.core

    Hi,

    nice job on the tutorial. One thing you could add concerns the [line] object. The third creation argument (or inlet) defines the rate in ms for every output. Its default is 20ms per output but you can go down to samplerate if you wish so.

    I realized that only after building a faster rate ramp from the [line~] object in conjunction with a snapshot a while ago.

    I needed to adjust that value on some occasions, to get a smooth ramp without noticable aliasing.

    Have a good day (or night),

    kq

    posted in tutorials read more
  • kompaqt.core

    Hi again,

    didn't it expect it to be so easy in the end. I'm able to compile using mingw32 commandline and the makefile you linked me to. The critical point was to set the Path variables on windows described here http://www.pronix.de/pronix-1192.html . Also i had to set the Path to "C:\MinGW\msys\1.0\bin". Which is not in the tutorial but crutial for the makefile to work. Thats where my latest Error came from. It couldn't use the "uname" function in there.

    After that i still had a problem, but it was easier to solve. In the makefile there are several compilers. In mingw is a search for the pd path with "program files" as the default search location. Since my pd is not located there i had to manually insert my full path info.

    In the end it's way easier than any other method i tried. Compiling without makefile from VS 2010 ex or Dev C++, both Ide's with the makefile. But its too hard to trace the missing commandline options or missing includes.

    So in my case for win 7 x64 i only need mingw32 from here: http://sourceforge.net/projects/mingw/?source=dlp . Set all the path variables (described above). And check if your pd is in the default place (C:/Program Files/..).
    Finally follow the description for the makefile template and your done.
    Thanks again Maelstrom. I really thought i had to try a lot more ways before getting it to work properly.

    P.S.: I found out the __declspec(dllexport) function is actually used in the m_pd.h header file itself. So its taken care of exporting the setup function, which makes life easier once again. It's a windows only thing and they also note that: /* in MSW it's ugly. /*

    And thanks to moving this in the right place. I'm new to the forum and thought tech issues would fit in way.

    Cheers, kompaqt.core

    posted in extra~ read more
  • kompaqt.core

    Thanks for the link to the library template. I'm new to this building process so i need some tries to get it working. Currently im getting a " CreateProcess((null), uname -s, ...) failed. " error. Seems to be related to some OS PATH variable, but i haven't figured out yet where i need to set it. I'm not in a rush, sooner or later i might pin it down with my configuration. This template seems to be the route to take, thanks again for pointing me in that direction!

    posted in extra~ read more
  • kompaqt.core

    Hello,

    after several attempts over the years to connect PD and Blender via Osc i just tried a different route being inspired by my work with Processing and PD. I tried to simple down the process and work directly with udp sockets, basically getting rid of formating problems between different Osc implementations. After the switch i could easily send arrays with thousands of values from PD to Processing and back.
    I had the basic socket commands for python from the tutorials floating around and decided to give it another try.
    I'm nowhere near fluid in python, but i got it working on the most basic level. The code is simple and short. The best thing is that it should be usable for a few coming Blender versions, since the socket module shouldnt change much.
    What happens is that Blender sends the position vector of the game object to PD, which unpacks/packs it again and sends it back. If everything works you should see the incoming PD data in Blenders console.
    The problem of dropping framerate seems to occur when PD doesnt send the messages fast enough. To avoid that i attached a [metro 20], this is fast enough on my machine. The always sensor for the receive script is in pulse mode and the frequency is 5. This is also related to the framerate drop. When i use unlimited frequency i get the drop. You have to find the best values of message frequency from PD and logic ticks to compute incoming messages in Blender.

    I used Blender 2.65 (no libraries needed) and PureData extended 0.43.4.

    I hope this might be a help to others struggling like i did.

    Sending data from Blender to Processing also works, but i need to figure out how to get the data in Processing in the right format.

    http://www.pdpatchrepo.info/hurleur/_blenderUdp.zip

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!