• alexandros

    You can type apt-cache search ^pd- and you'll get a list of all available libraries for Pd in your repo. I think I installed creb via apt-get.

    posted in patch~ read more
  • alexandros

    I have run it on a Pi. You just need all the externals he uses. IIRC, it's the CREB library, the jmmmp and mmb abstractions, and I think that's it, but I could be missing something. You can install the first two with apt-get. The mmb library is not there, but you can just copy it from the Benjolin directory you have in your computer, it's just abstractions, mainly vanilla.

    posted in patch~ read more
  • alexandros

    @gmoon I did compile Ofelia for Ubuntu and I remember that it was quite smooth. Hasn't @cuinjune fixed this yet? I think this was a known issue that would get fixed, or I might not remember right.

    posted in technical issues read more
  • alexandros

    Everything will be replaced by the new installation. Note that software you compile yourself end up in /usr/local/bin whereas software installed via apt-get ends up in /usr/bin, so the older Pd will still be there. It's just the pd command in the terminal will be linked to /usr/local/bin/puredata/bin/pd instead of /usr/bin/.... when you run sudo make install. The older version you compiled yourself will be overwritten.

    posted in technical issues read more
  • alexandros

    Just high resolution analog values. If you want to do audio with the Teensy you need the audio board that's designed for this. But then it becomes rather independent from Pd.

    posted in I/O hardware diyread more
  • alexandros

    On Linux you'll get the version of your system when installing software via apt-get. Unless you upgrade your system you'll always get the same Pd version. If you're on a system with frequent updates, like Ubuntu or Ubuntu Studio (not LTS), then you can just wait a few months till the next release when you'll get an up-to-date Pd.
    If you don't want to wait or you have a system that doesn't update frequently you can compile Pd from the source. Just go to Miller's website and download the latest source. It includes a INSTALL file with instructions on how to do it, it's really not hard.

    posted in technical issues read more
  • alexandros

    I mainly use the Teensy board as it is much more powerful than the Arduino. Lately I've been using this external ADC with this voltage reference for pots to raise the resolution to 16-bits.
    Other than that, whatever fits the needs of each project. Arduino UNO is great for fast prototyping as it offers female headers.

    posted in I/O hardware diyread more
  • alexandros

    It looks alright. Perhaps you're facing the same issue with me and the Arduino prints 10 when you try to print 13. Read the README file of the GitHub repository where I explain this and how to check it. Maybe you need [serial_print13] instead of [serial_print]. [receive] objects should normally work, that's why I suggest the above.

    Analog values tend to change all the time due to noise (unless you use the ResponsiveAnalogRead library which I highly recommend). Digital values though are much cleaner. For these values you can also do a test and see if a value has changed and print it only in that case. You'll need a variable for each button to hold its previous value and test against the new value. If they are different then print and save the new value to the variable for the next test.
    This way you should print each button separately and not with a loop. Hope this all makes sense.

    posted in I/O hardware diyread more
  • alexandros

    I would suggest to not mix the analog values with the digital ones. The first code could be changed to the following (using Serial.print() with the [serial_print] abstraction):

    void setup()
    {
      for(int i = 2; i < 14; i++)
      pinMode(i, INPUT);
      Serial.begin(115200); // perhaps use a faster baud rate
    }
    
    void loop()
    {
      Serial.print("knobs"); // use "knobs" as a keyword so you can receive
      // the knob values as a list with a [r knobs] in Pd
      for(int i = 0; i < 6; i++){
        unsigned int knob = analogRead (i);
        Serial.print(" "); // first print a white space to separate the "knob" keyword from the values
        // and the values from each other
        Serial.print(knob); // then  print the actual knob value
      }
      Serial.println(); // finally print a newline character to denote end of data for keyword "knobs"
    
      // the same technique applies to the switches too
      // receive the switch values as a list with [r switches]
      Serial.print("switches");
      for(int i = 2; i < 14; i++) {
        int switchVal = digitalRead(i);
        Serial.print(" ");
        Serial.print(switchVal);
      }
      Serial.println();
    }
    

    As for writing to several outputs you need to set which output you want to write to and then the value you want to write. Here's an example that writes to several different digital outputs:

    int pin = 0;
    int val = 0;
    // some random pins
    int pins[4] = {3, 4, 5, 6];
    
    void setup() {
      for (int i = 0; i < 4; i++) {
        pinMode(pins[i], OUTPUT);
        digitalWrite(pins[i], LOW);
      }
    
      Serial.begin(115200);
    }
    
    void loop() {
      if (Serial.available()) {
        static int temp;
        byte in = Serial.read();
        if (isDigit(in)) {
          temp = temp * 10 + in - '0';
        }
        else if (in == 'p') {
          pin = temp;
          temp = 0;
        }
        else if (in == 'v')  {
          val = temp;
          temp = 0;
          digitalWrite(pins[pin], val);
        }
    }
    

    With the code above you can send messages like this one print $1p$2v in Pd to the [comport] object. $1 is the number of the pin you want to light up starting from 0 and incrementing by 1 (so the first pin used which is pin 3 in the Arduino code would be 0 in the Pd patch), and $2 is the value, 0 or 1.
    Note though that in the first code (and the code you posted), you're using all digital pins as inputs so there's no pin left to use as output. If you want to combine these two chunks of code you'll have to use less pins as inputs and leave some to be used as outputs.

    posted in I/O hardware diyread more
  • alexandros

    Since you went through my tutorial and got some code working, can you share what you already have? Then I can suggest changes to make it work with [serial_print].

    posted in I/O hardware diyread more

Internal error.

Oops! Looks like something went wrong!