Cabbage Logo
Back to Cabbage Site

Roli Seaboard MPE with Cabbage

Hey,

I have been experimenting with a Roli Seaboard Block lately, and would love to get it set-up and working with CSound in Cabbage.

Can CSound, (and Cabbage) deal with MPE? The only discussion I have found online is from 2016:
http://csound.1045644.n5.nabble.com/Csnd-Seaboard-RISE-controller-td5746784.html

Cheers,
Alex

Just an update:

Looks like CSound deals with MPE flawlessly… So simple to setup!! (Just plug CC74 (for slide movement) into any value. Also have to play with correct pitchbend scaling etc, was using semitone(kbnd) style pitchbending but was a bit low resolution - will report back when I get it worked out.

Can’t believe Roli don’t advertise this functionality. Cabbage is basically Roli Equator supercharged.

That’s cool. Btw, have you tried any of the cheaper alternatives, the qunxus and such?

[edit] maybe ROLI will sponsor me one considering I’ve been using their JUCE framework for over a decade now :joy:

Yes I agree, a Rise or Blocks Seaboard- (Grand IIRC doesn’t have slide).

I will check out the Qunxus… thanks for tip!

I’ve been trying out a Seaboard Rise over the weekend and you are right in suggesting that Csound can handle the MPE without too much trouble. You just have to make sure that all MIDI channels are being sent to a single instrument. massign 0, 1 for example will send all channel MIDI note events to instr 1. This is so that you won’t accidentally be turning on and off reverbs or other non MIDI instruments that you might have in your orchestra.
opcodes like pchbend, aftouch and midic7 automatically read on the channel on which the note was triggered so there is not too much to worry about.
I am getting full 14 bit resolution with pitch bend so even an 8 octave pitch bend is pretty smooth.
The only thing that requires a bit of extra work is the sustain pedal which is CC64 on channel 1 only so Csound’s built-in mechanism for note sustain won’t work. A little extra work.

Hey Iain,

Yes I saw your posts on CSound re Rise, your YouTube video is fantastic!
(For other forum members Iain’s video below):

It’s so fantastic that there is more traction for Seaboard integration with Csound! MPE (regardless of manufacturer) is really exciting for controlling synthesis, and especially Csound.

I have had a bit of trouble with the Blocks Seaboard, mainly Slide (in Y direction) gets reset to note-on value during note-off. So if you start in middle of keywave (0.5) then move up and release it does not stay at value 1 - rather it goes back to original value (0.5).

I’m too new to the Seaboard world (only had it for a week) so I don’t know if this is something that can be changed in software. I played with the settings for Slide: Multi; Highest; Lowest; etc. nothing worked but last. (and that was checking Midi Monitor output).

I just made a test patch that fixed the problem for me. I also felt that note-on velocity isn’t the best for playing / performing, possibly for some sounds, but not for sustained sounds. I think that it would be good to work out a mixture of both Note-On & Aftertouch to generate more accurate note triggers. I have a feeling this is what Equator is doing, as its really easy to play.

As a test I put this together (just a saw wave and sine wave mix controlled by Slide) Forgive any un-Csound-ish code:

form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginID("def1")
keyboard bounds(8, 158, 381, 95)
</Cabbage>
<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

;instrument will be triggered by keyboard widget
instr 1

kaftpre aftouch 0, 1
kportaft linseg 0, 0.0001, 0.1, 1, 0.1 
kaft portk kaftpre, kportaft

kbnd pchbend 0, 48
kport linseg 0, 0.0001, 0.01, 1, 0.01
kbnd portk kbnd, kport 
kpchbend = semitone(kbnd)

kcont init 1
midicontrolchange 74, kcont, 0, 1
kport2 linseg 0, 0.0001, 0.01, 1, 0.01
kcont portk kcont, kport2

koffval release
koff trigger koffval, .5, 0

kcontold samphold kcont, koff

if (koffval == 1.0) then
kcontout = kcontold
else
kcontout = kcont

endif

kEnv madsr .5, .0, 1, .1
aOutSaw  vco2  kaft, p4 * kpchbend, 0
aOutSine oscil kaft, p4 * kpchbend
out (aOutSaw*kcontout+aOutSine*(1-kcontout))*kEnv

endin

</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
</CsScore>
</CsoundSynthesizer>

Oh dear. I’ve just tested the Roli in Cabbage (so far I had just been using it in non-frontended Csound) and am getting terrible problems with stuck notes. (Could this be the cause of some of your own problems?
Maybe try it in Cabbage-free Csound.) This is happening in even with the most basic of synths when the same synth works fine in normal Csound. This suggests that Cabbage is choking when trying to handle the increased density of MIDI data that the Roli is sending out. As Cabbage is using JUCE to interface MIDI could the problem be there? I think the only way to tackle this problem is for Rory to get one of these machines…

Hey Iain,

I only get stuck notes if I play lots of notes at once, which is a bit hard on a Seaboard Block… :wink:

I really have to try ‘hard’ to get stuck notes. Which currently (I am doing it now) means just random 5 notes quavers… do you get stuck notes if you re-boot the Roli? I have noticed after a while the Seaboard Block can become very unstable, and start to pitch-shift everything… (maybe a firmware update is in order- I am currently uptodate)

The issue with the slide on the Y is independent of Cabbage. If I just play the Seaboard with Cabbage quit and monitor the Midi with Midi Monitor- then I can clearly see that CC74 is resetting to original, note-on value- instead of just staying at value.

Have you tested this exact aspect? Possibly the Rise functions differently?

Strange that JUCE chokes - yet ROLI makes JUCE now… :open_mouth:

I’d say it’s more likely that I’m not sending all MIDI data to Csound? I certainly haven’t thought bout 14 bit stuff? Here’s my code:

@alcomposer I haven’t had any problems with the Y position slide bouncing back when the note is released. Maybe there are some hardware differences between the Block and the Rise.
@rorywalsh I’m beginning to suspect that it might be the multichannel note-on and offs that are causing the problem. Almost all notes are sticking, even without any use of pitch bend. The Roli is sending different notes on different MIDI channels so could Cabbage be mis-reading the MIDI channel of the corresponding note offs?

Iain I’m not getting those sorts of problems here with the Blocks, only if I really try hard. It sounds like its not working for you even for single melody lines?

Im using a MacOS 10.12.6 Machine, with Cabbage V2.0.20a.

Just for historical sake, here is a printout from MidiMonitor showing the Note-On/Off CC74 reset issue:
CC74 and Note-on:of issue.txt (4.9 KB)

No, it’s not useable at all here. I’m on Cabbage 2.0.27a. Interestingly I tried it on Cabbage 1 and there are no problems there…

Strange… I will update to 2.0.27a and see how that goes.

Hmm, that’s really strange. Especially since Cabbage 1 is using an earlier version of JUCE. My MIDI handling code hasn’t changed at all. It’s literally copied and pasted over.

Quite possible, but very difficult to figure out without the device. I’ll trawl through the JUCE forum and see if I can find anything.

Rory, I know that its preferable to have a device, but until that happens would it help if we sent you midi recordings from the Roli?

So it seems there is an actual MPE class. Looks like I’ve some reading to do.

Good thinking. Let it be in the style of something tasteful, I’ve a feeling I’ll be listening to it a lot over the next few days :joy:

There’s some info here about them with Reaper, although it states that blocks is not yet supported.

Well, its late here currently so tasteful test tracks may not be a thing right now.

Just tested with v2.0.27a and a short plucked sound- yup… lots of stuck notes. :frowning: I can confirm.

UPDATE: stuck notes with Seaboard Block is a sporadic issue for me. Unless I try really hard there are no stuck notes. Trying hard = playing 10 fingers all at once.

RoliTest.mid.zip (3.7 KB)
Here is a MIDI file of some short notes which should demonstrate the problem.
Here is some clarification of where I encounter problems:
Cabbage 2 (latest beta) OSX: problems
Cabbage 1 OSX: problems
Cabbage 2 (latest beta) Windows: problems
Cabbage 1 (32 bit) Windows: no problems!

@iainmccurdy I have been playing today with the Seaboard Block and there doesn’t seam to be any issues with v2.0.27a on MacOS (at least on my computer). However at first I was seeing many problematic stuck notes. (This may be a difference with the firmware on the Blocks v’s Rise? As these devices are doing all the centroid processing, there very well could be a difference between devices & firmware versions)

I think (at least on my end) this is a sporadic issue. What I have noticed is that the Seaboard can get overwhelmed and need to be power cycled to start to work again. I would like to get to the bottom of the finer differences with the Blocks v’s Rise. I have contacted Roli- so will post here any news.

Its quite important- as the Blocks Seaboard is much more accessible size & price wise. So there is greater chance that future Csound Seaboard users will be using this device. Also - Cabbage is (as far as I know & obviously using Csound and sound engine) the only MPE enabled free/OSS VST/AU/Host instrument effect, so its actually very cool and important.

One thing I have noticed when using Equator- is that there is a timeout of held notes. So if I hold down a keywave- it will eventually time out. (obviously not good for drones- but probably good for stuck notes).

Also- having Blocks Dashboard running I can see that when Cabbage gets stuck notes- so does Dashboard. So I don’t know if its a problem with Cabbage- (at least on my computer).

@rorywalsh It looks like that MPE Class is for generating MPE test MIDI data, and for also changing modes of attached Roli devices. Don’t know why it couldn’t simply be SysEx messages.

Also @iainmccurdy can you let me know if you are doing the pitchbend the same way as my .csd above?

@alcomposer Yes I am reading pitch bend in exactly the same way as you are.
I am reluctant to blame firmware as I have not experienced any similar issues using the Rise with basic Csound, CsoundQt or Equator so it really feels like there is still something within 64 bit Cabbage’s handling of its MIDI that is amiss. I want to examine the MIDI data to see what it could be that is tripping Cabbage up.