Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
How to send a Midi message (sysex, CC and NRPN)
No permission to create posts
December 11, 2015
6:35 am
Avatar
Tom
Admin
Forum Posts: 65
Member Since:
April 3, 2014
sp_UserOfflineSmall Offline

Hi EZB,

I only tried 32 bit as I tested with RackAFX, not a plain VST plugin.

The "multithreaded" library refers to the c++ CRT library which used to exist as single-threaded and mutli-threaded version until Visual Studio 2008 AFAIR. Newer versions only have the multi-threaded CRT, so this is nothing you need to care about with newer compilers. You won't need to use multiple threads for multiple midi connections, you just can call "getMessage" sequentially for multiple ports.

The MMSYSERR_ALLOCATED code looks like the driver is already in use by your process. What may be the problem is that the operating system only sees one process (your DAW) that already has openened the midi port, so you can't open it again from your plugin (which from the operating system's point of view is still the same process). What you could do in this case is to spawn a process from your plugin and do midi from there and use some interprocess-communication between the plugin and that "midi process" to connect them. However, if you can route the MIDI yoke ports accordingly it may be easier to use dedicated ports.

Cheers
Tom

December 12, 2015
6:20 am
Avatar
EZB
Member
Members
Forum Posts: 24
Member Since:
September 14, 2015
sp_UserOfflineSmall Offline

Hello Tom

Thank you for your answer. You helped me go into the right direction.

I tried RackAFX. I could open the port and send midi and I could even debug with RackAFX.
Then I returned to my old project and suddenly it worked as well. And then suddenly it didn't after
a few compiles. There is definitely something strange going on when I use my host as the debug command . I hope I can pinpoint it in the future.

One thing was very strange though. Running the RackAfx project gave me all the ports including the Midi Yoke ports.
Running the SDK test project didn't give me the Midi Yoke ports. Don't even know where to begin with that. ­čśÇ

The most important thing at this moment is that I managed to send a midi message. Now what I need to do is populate 2 listboxes with the input and output ports.

August 23, 2017
5:10 am
Avatar
arcyam
Member
Members
Forum Posts: 7
Member Since:
February 7, 2017
sp_UserOfflineSmall Offline

W Pirkle said

To transmit a Note On event, you would add this to the end of the process( ) method:

// --- get the event list for output
IEventList* outputEvents = data.outputEvents;

(Thanks for all of your help, Will!)

I would like to know more about ownership of the output IEventList (I see that it's pure virtual for one). The Steinberg docs and example code are either hopelessly silent on the matter, or I have missed some valuable source of information.

When I step into my plugin, data.outputEvents is a null pointer in the process() method. Should I create a member of type CVSTMidiEventList (which I see overrides the virtual methods in IEventList) and assign its pointer to data.outputEvents? What about lifecycle management of outputEvents? Etc.... 

Should I ask this on the Steinberg forums?

August 23, 2017
10:03 am
Avatar
W Pirkle
Admin
Forum Posts: 140
Member Since:
January 28, 2017
sp_UserOnlineSmall Online

You need to setup an output port for MIDI. In the VSTProcessor::Initialize( ) function, add the port

addEventOutput(STR16("Event Output"), 16);

Then your data output pointer will be non-null. You are highly limited to the kind of MIDI data you can send. See the fourth post at the top of this thread

http://www.willpirkle.com/foru.....-and-nrpn/

- Will

No permission to create posts
Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online: W Pirkle
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Derek: 41

Peter: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msalda├▒a: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 478

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 29

Topics: 479

Posts: 1870

Newest Members:

certvalue111, sobhana s, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 140

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 140