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
Polyphony & midiNoteOn()
No permission to create posts
September 12, 2018
12:18 am
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Hi,

I'm not shure if this is the right forum ...
However - I'm kind of stuck - when I set more than 1 note in my DAW at the same time (chords) - midiNoteOn() is processed one time only.
I tried the same with the same results in the doProcessEvent() function (VSTProcessor.cpp).

I'm not shure how polyphony is handled - I imagined something like stepwise at samplerate or so 😉

What am I doing wrong?

Thanks for help!

September 12, 2018
7:49 am
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

What code are you using? Is this from the synth book (if so, which project?) or from a ported project from RackAFX? 

Also what VST3 SDK are you compiling with? 

I did a routine check of synth projects last year, so not sure what could have changed. 

- Will

September 12, 2018
2:02 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Hi,

VST SDK is VST 3.6.8

my code for Note On is more or less like this (i removed voicing and so on):

bool __stdcall CMrQ::midiNoteOn(UINT uChannel, UINT uMIDINote, UINT uVelocity)

{
//midiCounter ++;
//displayFloat(midiCounter);

samplerNote = float(uMIDINote)*halftone;
}

when I use my display function it shows me only one event even if two or more notes are hit at the same time. With a little offset between the notes everything works as expected.

September 12, 2018
5:25 pm
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Is this from the synth book (if so, which project? - or the basis) or from a ported project from RackAFX? 

September 12, 2018
5:29 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

It's not from the Synth Book.
It's from what I wrote in RackAFX and then exported to the VST SDK.

September 13, 2018
8:50 am
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

OK thanks; I will get back to this thread as soon as I can. The MIDI handling didn't change significantly in the later SDK versions. I'm currently on 3.6.10 which is required for the latest version of RackAFX 6.9 so I am guessing you may be on an older version of RackAFX as well (likewise, nothing really changed there either).

September 13, 2018
1:48 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

RackAFX is 6.9.2 Itried it with the 3.6.10 VST SDK with same results.

September 19, 2018
10:38 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

I'm still stuck here.

Today i built the DXSynth from your Synth Projects with the actual RackAFX and VST SDK 3.6.10 and it behaves in the same way - only one note is played when notes are set at the same time in the sequencer (like most people set chords).
With a little offset it works. But the same that happens with noteOn happens with NoteOff - set at the same time only one is recognized.

Edit:

numEvents in VSTProcessor.cpp shows me the right count of events happening at the same time. Now I don't know if i should try to rewrite all the noteOn/Off stuff from there? Hmmm ...

Thanks 😉

September 20, 2018
9:43 am
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Jimmy

I found the cause of this issue and will report the fix shortly (I'll also need to do a RAFX update to fix this for future users).

Please standby...

- Will 

September 20, 2018
12:54 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Okidoki - btw: MidiClock() doesn't work for me as well (what is not  a huge problem) 😉

September 21, 2018
4:54 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Is there any chance for a temp fix? Embarassed

September 22, 2018
4:49 pm
Avatar
W Pirkle
Admin
Forum Posts: 261
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

You can use the files here to patch the VST exported project:

VSTProcessor.zip

Unzip these two files and replace the same-named files in your exported VST project; they are located in the <PROJECT>/project_source/source/vst_source folder. If you look at the Process() function you can see the addition of the new method for processing the MIDI block of data. Please set breakpoints and watch the MIDI processing for all events with a given sample interval. 

As for MIDI clock, please check the VST3 SDK to note the strict limitations on incoming MIDI data for VST3 - clock is not supported.

If you are trying to use clock information to synchronize LFOs, delay times, or even sequence events, then use the host information to get BPM and timing info instead.

http://willpirkle.com/Download.....mation.pdf

- Will

September 22, 2018
5:56 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Thanks a lot! I'll check it right now.

MidiClock is no problem 😉

September 22, 2018
8:42 pm
Avatar
TheSmile
Member
Members
Forum Posts: 28
Member Since:
June 25, 2018
sp_UserOfflineSmall Offline

Works like a charm on Mac but getting an error at Win (Visual Studio 2017):

'bool Steinberg::Vst::Sock2VST3::Processor::processEventsForInterval(Steinberg::Vst::IEventList *,int,int &)': cannot convert argument 3 from 'Steinberg::int32' to 'int &'

Got it working - so no need to speed anything up 😀

Thanks a lot again!

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 43

Peter: 41

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 527

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 552

Posts: 2168

Newest Members:

Steve Duell, Cal, LamebrainEddy, SteveThackery, rawbirdtoe, Bill, hill william, NAUN_SONAR, sufy, Diane

Moderators: W Pirkle: 261

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 261