• yanok

    My goal is to play the notes of the Kaossilator Pro from an external midi keyboard.
    The problem is that the Kaossilator Pro (Korg) can receive CC messages ONLY for the PadX - PadY controls. It does not understand midi notes.
    So I decided to try to face that problem with puredata (it is my very first patch...)
    I want to receive the midi in notes from my keyboard and convert them to the corresponding CC values and send them to the kaos pro.
    In my settings, the kaos receives pad X values on CC#26. So, in order to play the notes, I have to send the following values:
    1st note: 0, 2nd note: 10, 3rd note: 19, 4th note: 27, 36, 44, 53, 61, 70, 78, 87, 95, 104, 112 and 121, for the last note (with a 2 octaves scheme set on the kaos).

    If I set the kaos in C major, the notes would be:
    C4: 0, D4: 10, E4: 19, F4: 27, G4: 36, A4: 44, B4: 53,
    C5: 61, D5: 70, E5: 78, F5: 87, G5: 95, A5: 104, B5: 112
    C6: 121

    The algorithm (in C++ style) is easy:

    switch(midi note received from keyboard on Channel 1)
    {
    case 60: // Note 1 = C octave4 (in C major)
    send value 0 to CC#26 on Channel 1;
    break;
    case 62: // Note 2 = D octave4 (in C major)
    send value 10 to CC#26 on Channel 1;
    break;
    case 64: // Note 3 = E octave4 (in C major)
    send value 19 to CC#26 on Channel 1;
    break;
    case 65: // Note 4 = F octave4 (in C major)
    send value 27 to CC#26 on Channel 1;
    break;
    case 67: // Note 5 = G octave4 (in C major)
    send value 36 to CC#26 on Channel 1;
    break;
    [...]
    case 84: // Note 15 = C octave 6 (in C major)
    send value 121 to CC#26 on Channel 1;
    break;
    default:
    do nothing;
    }
    send midi note velocity to CC#27 on channel 1;

    The problem I face is with the velocity.
    For example, if I play one note on the keyboard, the patch sends the correct value to CC26 and also sends the velocity to CC27. If I release, velocity is set to zero (on CC27) and the sounds stops. That's OK.
    BUT if I play one note(let's say a C), hold it, play another one (let's say D), then release C (and keep D on), the release of C will send a zero velocity signal on CC27 and sound will stop, even if D is still pressed... as a newbie with puredata, I don't really know how to face that issue. Does anyone have a solution for that?
    use a counter maybe?
    Furthermore, I have absolutely no idea whether there is a much easier way to implement a switch/case statement with puredata or if what I did is OK. The patch is attached.
    Thanks in advance!

    http://www.pdpatchrepo.info/hurleur/KaosPatch.pd

    posted in technical issues read more
  • yanok

    Thanks for ur answer.
    Yes you're right. I tried different things so I got a bit lost with the different versions.
    With the patch I posted, the notes never stop playing since a zero velocity signal is never sent.
    The problem I described in my 1st post occurs when I link the right outlet of the notein object (velocity) directly to the ctlout 27 (e.g. bypassing the stripnote). Anyway in both cases, it does not work correctly. Any solution?

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!