• alexandros

    This message should't be a problem, it's quite often there. As long as you hear your sound card OK, then it's OK. If using ALSA doen't seem to work, give Jack a try.
    It's weird, but using Jack with the ALSA driver most of the time works smoothly, while Pd with ALSA alone could have issues. At least to my experience.

    posted in technical issues read more
  • alexandros

    On the 1st of September, I'll be giving a workshop on Pd + Arduino at the electropixel#8 festival, in case you're interested.
    http://electropixel.org/alexandros-drymonitis-pd-arduino/

    posted in news read more
  • alexandros

    I think you need to keep track of which keys are kept pressed. There's no way to press two keys together, the computer is faster than your hands and it detects two separate key presses. If you use something like [keyup] or maybe [hid] (I think it's from the HID library, can't remember exactly), to determine than 1 is still pressed when you press 2, or the other way around, then you'll be able to get the output you want.

    posted in technical issues read more
  • alexandros

    "print" translates all characters in a message to their ASCII bytes. So, sending "print 0p100v" to [comport], will result in 48 112 49 48 48 118 sent to the Arduino. Check ASCII table to understand this in case you don't know ASCII.
    Sending floating point values to control PWM doesn't really make much sense since PWM takes bytes, so integer values from 0 to 255. I don't know if "print" will actually break a floating point value and translate the dot as well (which is ASCII 46). If you want to send floating point values to the Arduino, you should make sure the dot gets translated to ASCII (if it's not done with "print" you should probably do it with [list fromsymbol]) and then in the Arduino code look for byte 46 and do the necessary math to assemble the floating point value.

    posted in I/O hardware diyread more
  • alexandros

    I don't see why a Raspberry Pi won't be able to power up the sound card, but then I don't know if the MOTU runs on Linux. If it does, I think the Pi is the best way to go. You can set it to run the patch on boot, and you can also easily add a push button to shut the system down. Though, if there's no writing to the SD card, unplugging the power shouldn't be a problem.

    posted in I/O hardware diyread more
  • alexandros

    sudo apt-get install pd-zexy

    posted in technical issues read more
  • alexandros

    You can use [shell] from the ggee library and send it the message "date". Though the Pi should probably be connected to the internet to give you the correct date and time.

    posted in technical issues read more
  • alexandros

    [oscparse] and [oscformat] are native object of Pd and you can't find them via Deken (Help -> Find externals). The best you can do is either install the latest LTS Ubuntu 18.04, which I think comes with Pd-0.48-1, or download the source code, either from Pd's or Miller's website, and compile it yourself. The INSTALL.txt file is now pretty detailed and covers all you need to compile it from source.

    posted in technical issues read more
  • alexandros

    Hadn't seen this post, hence I'm replying so late. In Pd, the comma separates commands, so [3, 80( will send the value 30 and then the value 80 to comport, so the Arduino won't get it.
    I think you're making this more complex than needed. Try this in the Arduino code:

    int whichPin;
    int pwmVal;
    int pwmPins[2] = { 9, 10 }; // pins witn PWM capability
    
    void setup() {
      Serial.begin(9600);
      for (int i = 0; i < 2; i++) {
        pinMode(pwmPins[i], OUTPUT);
      }
    }
    
    void loop() {
      if (Serial.available()) {
        static int tempVal;
        char inChar = Serial.read();
        if (isDigit(inChar)) {
          // assemble the value in case it's more than one digit
          tempVal = tempVal * 10 + inChar - '0';
        }
        else {
          if (inChar == 'p') {
            whichPin = tempVal;
            tempVal = 0;
          }
          else if (inChar == 'v') {
            pwmVal = tempVal;
            tempVal = 0;
            analogWrite(pwmPins[whichPin], pwmVal);
          }
        }
      }
    }
    

    Then in Pd send a message like this to [comport], "print 0p100v". This will set the value 100 to pin 9 (the first pin in the pwmPins array in the Arduino code).
    There's no string assembly whatsoever in this code and it should work.

    posted in I/O hardware diyread more
  • alexandros

    It's quite likely that the ports will change, but I'm no specialist when it comes ti MIDI, so I might be wrong. Better write a scripts that detects devices by name and retrieves the numbers which is then used in aconnect.

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!