Hi,
I know SF created its own Midi ports, but it seems on Cubase/mac it keeps forgetting them every time, even after a save or an import when using faders or any other to send midi on a surface touch screen as the like of CC controllers, so my faders dont work unless I redo the ports every time, but it Cubase doesn't forget the IAC port, so can SF midi be assigned to an IAC driver port?
Christian Scheuer @chrscheuer2021-04-29 11:22:27.747ZHi Frank,
Thanks for posting here :)
@JesperA and I have tried to fix this numerous times, but I never was able to figure out why Cubase keeps resetting it. It has something to do with a unique ID that I wasn't able to fully understand.
Jesper - you're routing through iAC right?
Jesper Ankarfeldt @JesperA2021-04-29 11:25:43.974ZHey.
Yes correct. For things going to the studio setup such as generic remote I’m using IAC.
- FFrank Ilfman @Frank_Ilfman3
I have create SF IAC in and out and that in the Generic Remote so Cubase doesn't forget that, but i can't get my Fader to work when the IAC is selected only the SF own midi port?
Jesper Ankarfeldt @JesperA2021-04-29 11:48:26.561ZCan you explain your setup?
Is it surface faders?
If so, then you need to select the fader to send to an external midi port.
I’m not in front of a computer so can’t remember if you can do that it the surface editor. Else you would just need to trigger a script from the fader that routes the fader to that channel. I can help with that maybe later when I have a computer in front of me
- FIn reply toFrank_Ilfman3⬆:Frank Ilfman @Frank_Ilfman3
Sure,
So i create an IAC port named SF - Midi Out and SF - Midi In
I have a generic remote setup with say click vol on midi CC 20 and sustain on 64
on the surface editor i can't select the midi port only the SF command to send a CC and
the channel numberSo those only work if i have the SF midi port selected in the generic remote not the IAC, but then cubase don't remember those as they have a different ID
Christian Scheuer @chrscheuer2021-04-29 16:07:05.870ZAh gotcha. You may need to set up a script to handle the fader value events (when moving a fader) - such a script has access to send to any MIDI output / input (iAC included)
To do that, create a script with code like this and assign it to the fader's On Value Command:
const value = Number(event.trigger.value); //This will have the value of the fader sf.midi.sendCC({ externalMidiPort: 'name of the iac port', midiChannel: 1, midiCC: 11, //expression value: value, });- FFrank Ilfman @Frank_Ilfman3
is this correct ? as it doesnt seem to work

Christian Scheuer @chrscheuer2021-04-30 11:23:41.388ZYea that looks correct. Have you assigned the script to the fader?
- FFrank Ilfman @Frank_Ilfman3
yes, its not working
Christian Scheuer @chrscheuer2021-04-30 13:59:02.956ZCan you add a log(value) to the script to verify it's receiving values?
Christian Scheuer @chrscheuer2021-04-30 14:03:55.499ZAh, there was a couple of mistakes in the script. This works for me:
const value = Number(event.arguments.value); //This will have the value of the fader sf.midi.sendCC({ externalMidiPort: 'IAC Driver Bus 1', outputNum: 0, midiChannel: 1, midiCC: 11, //expression value: value, });- FFrank Ilfman @Frank_Ilfman3
Great stuff! work well now, for my next question
once i touch the fader and move it it takes focus from the main app window, i added a triger to keep the main window active
but i then i get those errors :
"02.05.2021 17:39:10.94 [Backend]: !! Command Error: Ilfman - Midi IAC Driver CC-64 Sustain [user:ckn5xnxw60003u5100t5dgi0k:cko7chzw000001u10liqibam1]:
TypeError: Cannot read property 'value' of null
(Ilfman - Midi IAC Driver CC-64 Sustain line 1)JavaScript error with InnerException: null
!! Command Error: Ilfman - Midi IAC Driver CC-20 Click Vol Script [user:ckn5xnxw60003u5100t5dgi0k:cko3b28a50000tc10mie0ldck]:
TypeError: Cannot read property 'value' of null
(Ilfman - Midi IAC Driver CC-20 Click Vol Script line 1)when i disable the active window its well but i lose the focus nd need to mouse click on the main window
"
Christian Scheuer @chrscheuer2021-05-03 11:08:00.960ZHi Frank,
You can't just add another trigger to this script to change the focus of an app. The script I used here can only be used as the "On Value Changed Command" of a fader.
Are you using SoundFlow on a touch screen and not an iPad? If so, what you'd want to do is add a new script for the "On Touch End Command" on the fader, so that once the touch ends, you can run a script to send focus back to Cubase.
- FFrank Ilfman @Frank_Ilfman3
Hey Christian,
Yes i am using a touch screen with my mac.
What is the script i would need ?
Christian Scheuer @chrscheuer2021-05-03 13:46:18.300ZTo focus Cubase, just use a script like this:
sf.ui.cubase.appActivateMainWindow();and assign it to the On Touch End Command in the fader.
- FFrank Ilfman @Frank_Ilfman3
Perfect.
- In reply tochrscheuer⬆:FFrank Ilfman @Frank_Ilfman3
Not sure where ?
but I've seen you posted a new script, ill be in the studio tomorrow and give it a go
do i need still to add any value?