• Coalman

    super clear
    thanks again!

    posted in technical issues read more
  • Coalman

    So, I have it that the block size is the number of samples per block and that the numbers attached to each is the value of each sample in that block.

    Then, I am looking at an FFT from which you can get a similar-looking array
    and is it that the first value will be the lowest frequency and then each subsequent value is another frequency band, with the total number of bands being the block size
    (so, if the blocks are set to 512, then there are 512 bands of analysis arranged low to high?)
    How do you find out what the center of each of these frequency bands is (I mean without a gui, from the design side)
    are each of these bands just equally divided (linear) values in hz based on the nyquist frequency or sampling rate (i.e. (44100/2)/512)
    or is there some other logic to the spread of frequencies represented by the different bands?

    posted in technical issues read more
  • Coalman

    thank you! well explained!

    posted in technical issues read more
  • Coalman

    if I make a simple patch like this:
    [osc~ 220]
    | [bang]

    I get an array of numbers for each bang in the console.
    Can someone tell me what these numbers represent?

    are they amplitudes of the signal at various time points in chronological order?
    if I use [tabwrite~] to store them in an array in my patch instead of printing them to the console are the indices then in chronological order?

    how does one get the frequency content of the signal back from this array of amplitude/time points?
    I guess this is a question that is related to how FFTs work maybe...

    I am giving away the fact that I am not a signal processing wizard here, but I would be very interested to know how these different numeric representations of these signals show their (the same?) information..

    posted in technical issues read more
  • Coalman

    Wow! Great. I hope to get a chance to try this out soooon!!!

    posted in pixel# read more
  • Coalman

    thats great, I am going out of town for a few days but excited to give it a try. Will send feedback. great!

    posted in patch~ read more
  • Coalman

    I was searching for something else but landed on this, downloaded the old version and will give it a test. Would love to see the new version too, it looks like a nicer version of something I was working on a while back!

    posted in patch~ read more
  • Coalman

    Thanks everyone!
    Great and informative answers!

    posted in technical issues read more
  • Coalman

    Recently someone posted something over on the Pd list that had this question inside part of a bigger question. I was interested in it but it didn't seem to get an answer so I thought I would try here...I know that Max has limits for list length but I was wondering if in Pd there is a maximum number of elements that can be listed?
    Likewise are the maximum limits to what can go into a message box?
    What about an array?

    I am sure someone has asked this before but I did not see any results when I searched for it.
    thanks in advance!

    posted in technical issues read more
  • Coalman

    First off thank you all for your help and suggestions!
    I managed to find a solution with a little help from my friends.

    So, my main problem turned out to be that I needed to create my socket BEFORE defining my function. Then only after both of these are done I could set up the string to send to Pd (because Python does this sort of weird recursivey thing).

    Also as some of you suggested my string was named badly, first I was using a the wrong variable data type ("b") then I tried to make a string using "str" as a name which confuses Python as "str" is the string data type. So for anyone else dealing with this be sure to call your string something like "data" or "lsdfdjkhgs" but not "str"!

    Anyway, it works now and I can send data over to [netrecieve]
    incidentally @whale-av 's suggestion to use Pd's built in messaging scripts located in the application folder (pdsend & pdreceive) brought up a lot of interesting possibilities that I will be exploring later and for anybody wanting to send messages between Pd and other programs this looks like a cool way to do it.

    anyway, I will share the code here in hopes it will help someone else:

    import socket
    from obspy.clients.seedlink.easyseedlink import create_client
    # first get all the socket declaration out of the way
    s = socket.socket()
    host = 'localhost'
    port =  #put (your) open port here, this is also part of Pd's [netreceive] argument
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((host, port))
    # then we define our callback which happens when we receive data
    # out socket is already set up so we can reference it here in the callback
    def handle_data(trace):
        # trace is an obspy.trace class so we must convert to string
        # I have to mess around with this "trace" because it is part of the class my client code is using
       data = str(trace)
       # we can then neatly append a ; with a "f-string" to make it work with Pd's FUDI protocol (Pd messages end in ";")
       data = f'{data};'
       # or
       # data = str(trace) + ';'
       # if you like
       # and send it over our socket
    #then AFTER all this my code connecting to the server (that returns the data as a string "trace" above, but the entire part for communicating with Pd is up there, and surprisingly simple despite the 'strange loops'!

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!