Old 01-25-2011, 01:02 PM   #1
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default MIDI Voice counting -question

Hi

I need to count Midi voices played in my new JS plugin. I have counter, which count number of active voices. I need all MIDI messages which can change it:

Note on: counter +=1
Note off, or Note on with 0 velocity: counter -=1
All midi notes off: counter =0;
All midi sounds off: counter=0;

that's all?

Is there any method to check, if when switching on the plugin some note has been already started and is playing now?
Adam Fulara is offline   Reply With Quote
Old 01-25-2011, 02:51 PM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,975
Default

Quote:
Originally Posted by Adam Fulara View Post
Note on: counter +=1
Note off, or Note on with 0 velocity: counter -=1
All midi notes off: counter =0;
All midi sounds off: counter=0;

that's all?
Yes, that would be all.

Quote:
Originally Posted by Adam Fulara View Post
Is there any method to check, if when switching on the plugin some note has been already started and is playing now?
Not as far as I know. The MIDI editor obviously keeps track of notes internally, but I don't think there is a way to query the MIDI editor about this kind of information.
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 01-25-2011, 03:11 PM   #3
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,025
Default

^^^^
You would see its "Note off, or Note on with 0 velocity" when it ends.

So you might need to remember which Note Offs had a preceding Note On and count "orphan" Note Offs too. Messy.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 01-26-2011, 01:30 PM   #4
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default

Thanks! My first JS plugin is comming...
Adam Fulara is offline   Reply With Quote
Old 01-26-2011, 02:25 PM   #5
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,375
Default

Quote:
Originally Posted by Adam Fulara View Post
Is there any method to check, if when switching on the plugin some note has been already started and is playing now?
Nope.

What are you working on? The easiest way I know to track note activity is to use a chunk of memory. 128 on/off values for each channel that you could get input from. You can easily adapt the same model to track how long notes have been held if you need to. Implementing a note stack is another possibility but that might be overkill.
IXix is offline   Reply With Quote
Old 02-01-2011, 02:50 AM   #6
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default

Thank you

I'm working on 2 things. 1st is quite simple - but for my gear. I need to program simple protocol with change signal from 6 channels with 6 separate pitchbends to one channel with 6 or 7 CC messages (for each pitchbend separate).

Next step is to make interpretation of this CC in Kontakt to have it working (script in KSP language).

I have never seen any VSTi understanding 6-channels signal properly (including even hardware MIDI gear like MPC 1000 with great JJ OS). When you make a pitchbend on one channel it affect to another 5 channels, and that's wrong interpretation of the MIDI messages. Unfortunately ReaSynth has this bug too :/. It's useless with my guitar synth. I can always put 6 tracks for 6 channels and 6 instances of ReaSynth, but it's not useful when you had to switch between programs and VSTis in live situation fast.

Second is a simple midi vibrato effect.
Adam Fulara is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.