# Roli Seaboard MPE with Cabbage

**URL:** <https://forum.cabbageaudio.com/t/roli-seaboard-mpe-with-cabbage/839>\
**Category:** Csound Noobs\
**Created:** [3 December 2017 17:16 UTC](https://forum.cabbageaudio.com/t/roli-seaboard-mpe-with-cabbage/839 "2017-12-03T17:16:15Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![alcomposer](https://forum.cabbageaudio.com/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@alcomposer](https://forum.cabbageaudio.com/u/alcomposer)\
**Post date:** [6 December 2017 03:53 UTC](https://forum.cabbageaudio.com/t/roli-seaboard-mpe-with-cabbage/839/28 "2017-12-06T03:53:36Z")

</div>

Just read this thread: [Aftertouch problem - #3 by iainmccurdy](http://forum.cabbageaudio.com/t/aftertouch-problem/699/3)

@iainmccurdy I made a test instrument that uses midiin like you suggested:

```csound

<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

massign 0, 1

;instrument will be triggered by keyboard widget

instr 1

kbnd pchbend 0, 48 
kbnd portk kbnd, .01
kpchbend = semitone(kbnd)

iInstrchan midichn

kstatus,kchan,kdata1,kdata2	midiin
if (kstatus==208 && kchan==iInstrchan ) then
kAftouch	=	kdata1
endif
 
kAftouchnew portk kAftouch/127, .05
//printk2	kAftouchnew

kEnv madsr .01, .0, 1, 1
ares pluck p5, p4*kpchbend, p4*100, 0, 1
ares2 oscil kAftouchnew, p4*kpchbend
out (ares+(ares2*0.5)) * kEnv

endin

</CsInstruments>
<CsScore>
f0 z
</CsScore>
</CsoundSynthesizer>

```

This actually works better in Cabbage than QtCsound for me. The Seaboard in Csound is now starting to feel like a real instrument!

One question regarding `portk` is there a better way to smooth out the k signal, so that swells are nice and smooth? I have tried `interp` but that doesn’t seam to work. I can just set the k-rate to 1, but I would prefer to have something less taxing on computer for live performance.

@rorywalsh after reading more about Geert’s github I found `SendMIDI`. This looks like it can easily generate virtual MIDI streams, with lots of control data. Possibly this could be used to make a ‘virtual’ Seaboard (lots of MIDI channels & pitchbend, pressure etc…):

> **[GitHub - gbevin/SendMIDI: Multi-platform command-line tool to send out MIDI...](https://github.com/gbevin/SendMIDI)**
>
> Multi-platform command-line tool to send out MIDI messages

---

_[View the full topic](https://forum.cabbageaudio.com/t/roli-seaboard-mpe-with-cabbage/839)._
