• garrett

    Getting this error with Ofelia when trying to get a timestamp with os.time:

    [string "package.preload['__.x111e4f150.c'] = nil pack..."]:4: field 'day' missing in date table
    

    Any one know how to fix it? Patch attached.

    os-time.pd

    posted in technical issues read more
  • garrett

    I'm trying to retrieve and parse some simple JSON from a url. This is what works so far for me (although I'm not sure if ofLoadURL is what I should be using - there seem to be many ways to retrieve content from a url):

    ofelia f;
    resp = ofLoadURL("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY&date=2024-06-06");
    text = resp.data:getText();
    print(text);
    return(anything);
    

    I can output it as text but cannot understand how to parse it from buffer or the string to JSON. I've been using this as an example (https://stackoverflow.com/questions/4800605/iterating-through-objects-in-jsoncpp) so just to get one entry from the JSON should it be something like this? - not sure how to change it to work in Ofelia:

    Json::Value root;
    Json::Reader parser;
    
    // Parse the json (using the text in the code above)
    parser.parse( text, root );
    
    // Get the url
    print(root["url"]);
    

    posted in pixel# read more
  • garrett

    Does the getColor() integrated into Ofelia have the index 'bug' mentioned here - https://github.com/openframeworks/openFrameworks/issues/5321? I'm able to retrieve values way beyond what I would expect in the image like so:

    ofelia f;
    m = require("abc");
    pix = m.img:getPixels();
    
    //both of these agree on the number of pixels
    print("number of pixels:", pix:getWidth() * pix:getHeight());
    print("number of pixels: ", pix:getTotalBytes() / pix:getNumChannels());
    
    //but this returns a value????
    numofPixels = pix:getWidth() * pix:getHeight();
    print(pix:getColor(numofPixels + 1));
    
    return(anything);
    

    posted in pixel# read more
  • garrett

    @danielsomar said:

    hi everyone. I just solved this problem in my machine. Looking around some foruns, I've found this clue: problems with AU plugins. Try to delete some plugins that doesn't work in these folders: ~/Library/Audio/Plugins or Users/Library/Audio/Plugins...

    I've wrote some test plugins as VST and AU format. I've deleted them and Pd returned to work just fine.

    @danielsomar's solution worked for me - specifically removing the 'BlackHole.driver' and the 'MMAudio Device.driver'.

    posted in technical issues read more
  • garrett

    Hi

    Could somebody explain the mapping used in pix_coordinate? What corner does it start from? Is it bottom left, bottom right, top right, top left? I'm trying to split a video texture in two across rects but I seem to be getting different results to if I use an image instead of a video.

    thanks in advance
    Garrett

    posted in pixel# read more
  • garrett

    Hello

    Does anybody know where I can find info on whether pd is comptible with apples new intel processor as I am thinking of buying a macbook pro?

    a+
    gar

    posted in technical issues read more
  • garrett

    Hi

    Is there a way to trigger mencoder from inside Puredata to do this? I know Max/MSP has an object to communicate with shell - equivalent in Puredata?

    a+
    gar

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!