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 Topic RSS sp_TopicIcon
Polyphony & midiNoteOn()
Avatar
TheSmile
Member
Members
September 12, 2018 - 12:18 am
Member Since: June 25, 2018
Forum Posts: 30
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!

Avatar
W Pirkle
Admin
September 12, 2018 - 7:49 am
Member Since: January 29, 2017
Forum Posts: 323
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

Avatar
TheSmile
Member
Members
September 12, 2018 - 2:02 pm
Member Since: June 25, 2018
Forum Posts: 30
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.

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

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

Avatar
TheSmile
Member
Members
September 12, 2018 - 5:29 pm
Member Since: June 25, 2018
Forum Posts: 30
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.

Avatar
W Pirkle
Admin
September 13, 2018 - 8:50 am
Member Since: January 29, 2017
Forum Posts: 323
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).

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

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

Avatar
TheSmile
Member
Members
September 19, 2018 - 10:38 pm
Member Since: June 25, 2018
Forum Posts: 30
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 😉

Avatar
W Pirkle
Admin
September 20, 2018 - 9:43 am
Member Since: January 29, 2017
Forum Posts: 323
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 

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

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

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

Is there any chance for a temp fix? Embarassed

Avatar
W Pirkle
Admin
September 22, 2018 - 4:49 pm
Member Since: January 29, 2017
Forum Posts: 323
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

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

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

MidiClock is no problem 😉

Avatar
TheSmile
Member
Members
September 22, 2018 - 8:42 pm
Member Since: June 25, 2018
Forum Posts: 30
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:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

Gwen: 32

TheSmile: 30

JimmyM: 30

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 558

Moderators: 1

Admins: 4

Forum Stats:

Groups: 12

Forums: 36

Topics: 567

Posts: 2276

Newest Members:

Ray C., Jon R., Pat, Jan, Ben_1, shane, teknojunque, David Richter, Nick45, EEkros

Moderators: W Pirkle: 323

Administrators: Tom: 69, JD Young: 80, Will Pirkle: 0, W Pirkle: 323