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
Basic MIDI I/O?
No permission to create posts
January 25, 2016
3:28 am
Avatar
Ollie
New Member
Members
Forum Posts: 2
Member Since:
January 24, 2016
sp_UserOfflineSmall Offline

Hi!

As the title suggests I'm looking for help getting started with MIDI in RackAFX. I'm interested in creating plugins that manipulate MIDI and return that data to the client, like arpeggiators for e.g. I'm just wondering how to get started? I have the FX book but I can't seem to find anything about MIDI?

January 25, 2016
6:59 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Ollie

This topic is covered on this thread regarding VST:

http://www.willpirkle.com/foru.....-only-vst/

In a nutshell, you can not send MIDI back to the RackAFX host. it is a one-way option only. This means that your plugin can only receive (sink) MIDI messages and cannot transmit (source) MIDI back to the host.

You can do this in VST3, however there are strict limitations on the kinds of MIDI messages you can transmit back; nearly all messages except for note on/off and sysex are restricted from transmission. There is another thread here that discusses how to do that with VST3:

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

If you want to try the VST3 version, you can use Make VST to create a VST3 project (you need the VST3 SDK, and you need to follow the rules for locating the project folder relative to the SDK root) and of course you need a VST3 client (I use Reaper now). If you are only making an arpeggiator that needs a sequence of note on/off messages, then this will work for you. If you need to manipulate more complex MIDI stuff (controllers, RPNs, etc...) then it won't due to the built in limitations on MIDI sourcing in VST3.

In my Synth book, there is a chapter dedicated to trapping and decoding MIDI messages in the 3 APIs, but it does not cover transmitting MIDI back to the host.

Hope that helps -

Will

January 25, 2016
9:32 pm
Avatar
Ollie
New Member
Members
Forum Posts: 2
Member Since:
January 24, 2016
sp_UserOfflineSmall Offline

Thanks for the quick reply! Yes, returning the basic note on/off data to the client is all I really need to be able to do.

In the other thread you mention these functions.

midiNoteOn()
midiNoteOff()
midiPitchBend()
midiModWheel()
midiClock()
midiMessage() <- all midiMessages, unfiltered

While what they do seems obvious enough, I'm very new to DLLs and working without a main() function so I was hoping for more clarity so I might avoid guesswork. If my project was made VST, how would I use these functions to for e.g. get the incoming note on and return it as a different note to my VST client (I will probably use Cubase LE for this)? I notice they all return true but I don't know where the returned data goes or how to use the functions. Changing the incoming note to a new note will represent arepeggiator processing in this case; I'm just trying to create a working template for such a device.

January 26, 2016
12:55 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

These are functions that RackAFX calls when it receives MIDI data. Rather than make you decode the raw MIDI bytes, I decode the most common bunch:

Note On
Note Off
Pitch Bend
Mod Wheel
Clock

You then implement handlers for these functions to do as you please in response to them. If you want all the rest of the messages (which you would need to decode on your own) then set the boolean flag in your PlugIn constructor.

m_bWantAllMIDIMessages = true;

VST3 and AU do not use these message handlers.

For VST3, you would need to refer to the documentation, and/or use Make VST and look at the function:

bool Processor::doProcessEvent(Event& vstEvent)

Here, you can see where I decode the incoming VST MIDI messages, then forward those calls to the RackAFX functions above. This is where you receive MIDI messages in VST3.

If you want to transmit MIDI messages back to the host in VST3, then see the bottom of the function:

tresult PLUGIN_API Processor::process(ProcessData& data)

At the end of all of the processing, but before the last curly bracket, you would need to add the code in the thread:

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

to send MIDI note messages back to the host.

- Will

February 7, 2017
9:39 am
Avatar
arcyam
Member
Members
Forum Posts: 7
Member Since:
February 7, 2017
sp_UserOfflineSmall Offline

Bump

The links don't seem to be working on the revised site. I would like to attempt something similar to an arpeggiator and I think the posts would be useful.

February 8, 2017
10:10 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

The links are now fixed; happened during the website overhaul.

Also, there have been several similar requests for arpeggiator code so if you implement it, you might consider posting on the VST Forum page for others who might be interested. Ive sent MIDI out (note on and note off) for testing, but haven't implemented a MIDI arpeggiator (or MIDI delay, which is another effect you can do with note on/off).

You can also check out the VST3 SDK Forum:

https://sdk.steinberg.net/viewforum.php?f=4&sid=74d8031d7c53888b753be9ea79fcd225

Searching it, I think you might find similar questions about MIDI output.

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

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