• groovelastig

    looking for an object that works like a classical 2D array:

    f array n[][] = {{1, 2, 3;};
    {4, 5, 6;}}

    and is accessed by telling it the coordinates where to read / write a value (float or int would suffice).

    arrays in Pd seem to only work 1D, assigning 1 value to 1 position?

    posted in technical issues read more
  • groovelastig

    WinXP Pro SP3
    Pd version 0.42-5
    17-Jan-07 version of PortMidi

    hey everyone,

    I've been working with PD vanilla 0.42-5 - PortMidi midiout last night, trying to figure out why it wouldn't work with my AKAI MPD 24 properly. Here's what I found:

    Patch (as attached:)

    240, 71, 0, 104, 49, 0, 11, 8, 0, 0, 72, 97, 108, 108, 111, 32, 32, 32, 247
    |
    midiout

    And to check the results, i used: midiout -> Midiyoke -> MidiOX (all latest versions)

    Problem

    The message I sent (which was a valid MPD 24 SysEx message, double-checked several times from MidiOX directly) was DEC

    240, 71, 0, 104, 49, 0, 11, 8, 0, 0, 72, 97, 108, 108, 111, 32, 32, 32, 247

    and should convert have converted to HEX

    F0 47 00 68 31 00 0B 08 00 00 48 61 6C 6C 6F 20 20 20 F7

    instead, it comes out HEX

    F0 47 00 68 31 00 02 08 00 00 52 61 6C 6C 1B 20 20 20 F7

    • with 3 wrong HEX pairs.

    What happens

    I looked a bit at the first number, DEC 11 that should come out HEX 0B but comes out HEX 02

    here's how it behaves in reverse engineering:

    when i send DEC 0, 1, 2 or 3, it comes out HEX 0
    when i send DEC 4, 5 6 or 7, it comes out HEX 1

    see table:

    DEC .. DEC -> HEX

    00 .. 03 -> 00
    04 .. 07 -> 01
    08 .. 11 -> 02
    12 .. 15 -> 03
    16 .. 19 -> 04
    20 .. 23 -> 05
    24 .. 27 -> 06
    28 .. 31 -> 07
    32 .. 35 -> 08
    36 .. 39 -> 09
    40 .. 43 -> 0A
    44 .. -> 0B

    etc.

    When you look at the BIN, it becomes obvious what's happening:

    DEC (BIN) .. DEC (BIN) -> HEX (BIN)

    00 ( 0) .. 03 ( 11) -> 00 ( 0)
    04 ( 100) .. 07 ( 111) -> 01 ( 1)
    08 ( 1000) .. 11 ( 1011) -> 02 ( 10)
    12 ( 1100) .. 15 ( 1111) -> 03 ( 11)
    16 (10000) .. 19 (10011) -> 04 ( 100)
    20 (10100) .. 23 (10111) -> 05 ( 101)

    .. two bits at the end are truncated.

    It wouldn't surprise me if we found them somewhere in the other 'wrong numbers' ofthe original message.

    When I manipulate the numbers to come out correctly in MidiOX, my MPD 24 will happily accept the sysex and execute it so the probelm is definitely not MidiOx or Midiyoke.

    Questions

    1. can anyone confirm this?
    2. is anyone currently maintaining PortMidi, so this could maybe get fixed?

    thanks
    groovelastig

    http://www.pdpatchrepo.info/hurleur/sysex-conversion_vanilla.pd

    posted in technical issues read more
  • groovelastig

    hey everyone,

    I have a (probably very basic) question:

    ctlin returns

    1. value
    2. cc-number
    3. midi-channel

    in that order.

    I have 6 touchfaders CC1 - CC6 on channel 1, and I'd like to display the value of each one in a number box.

    so I patched this:

    ctlin
    |   \   \
    v   n   ch
      X
    pack
    |
    route 1 2 3 4 5 6
          |  |  |  |  |  |
          v1 v2 v3 v4 v5 v6
    

    seems pack is only triggered by cc-number after the value has been changed so effectively, value lags 1 cycle behind

    I've been messing all afternoon with trigger, pack, unpack, select, route and although I RFTM several times I can't get it right.

    help?

    posted in technical issues read more
  • groovelastig

    thanks! just messed around with [matrix] for a few hours yesterday and it's exactly what I wanted.

    I'm a bit gutted it outputs it's contents everytime you fill it - of course, I only want it to output when I send an [element], [col], [row] etc. command.

    I got around it using [t f] on the output, but that gives me a (non-lethal) error when it receives a matrix variable. outputs the floats alright though

    posted in technical issues read more
  • groovelastig

    works in Pd-vanilla 0.42-5! switching for now. will e tended get the nicer midi, too, eventually?

    edit: puts together sysex message correctly but some stuffs still faulty * aargh

    posted in technical issues read more
  • groovelastig

    I think the sysex code is broken (for windows?)

    have you checked with midiox?

    instead of

    240
    67 16 8
    50 12 247

    midiox gets ..
    240
    67 0 0
    16 0 0
    ..

    ??
    also, midiox doesn't understand how many bytes of sysex to expect. (says 0)

    it might be supersimple to fix but it doesn't work as described in the manual..

    posted in technical issues read more
  • groovelastig

    thanks @toxonic

    i'll check out the patch you posted right now

    edit: that patch read out all incoming values as being ch01 so it didn't quite do what I wanted

    thanks @pulsed; [swap] seems indeed to be exactly what i need .. edit: yes that did the trick

    thanks again for the quick help -

    i'm working with the AKAI MPD 24 and soon with the APC 20, I'll post stuff once i've come up with something useful or cool

    the basic idea is to make the APC a kickass MIDI controller for everything else but ableton live : D

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!