Welcome to %s forums

BrainModular Users Forum

Login Register

I need to filter all notes off message

I need help on a Patch
Post Reply
nofish
Member
Posts: 114
Contact:

Unread post by nofish » 05 Nov 2007, 17:07

I have an older Yamaha keyboard with Midi out, which I want to use with Usine. Strangely, this keyboard is sending an "all notes off" message in addition to the normal note off messages everytime when there are no more notes played. (I have checked with MidiOx). This all notes of message (Controller no. 123) prevents vstI's from entering their release phase (cuts the sound).

Haven't found anything in the keyboard's manual to turn it off...
Any idea how I can filter out this all notes off message without affecting the normal notes off message? Have tried Usine's Midi filter module but this also filters the normal note off msg which isn't usefull for organ etc.

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 05 Nov 2007, 21:24

You could try to connect the different MIDI parts (channel, data1, data2) to A=B modules, and then connect these to AandB modules, which in turn controls a stop data flow module.

Annoying, isn't it? I used to have a synth once which did the same - a Roland JX3p I think. If the DX7 or TX7 got the all notes off message while sounding, they would emit louds klooiings or something.
Bjørn S

kara
Member
Posts: 106
Location: France - Bretagne
Contact:

Unread post by kara » 15 Nov 2007, 11:12

Or you can use a simple script to do this
//////////////////////////
// Filter midi out message
/////////////////////////
// parameters declaration
var input : Tparameter;
var output : Tparameter;

// initialisation : create parameters
procedure init;
begin
Input := CreateParam('In',ptMidi);
Output := CreateParam('Out',ptMidi);

SetIsInput(Output,false);
SetIsOutPut(Input,false);

end;

// Global variables
var i : integer;
var nbOfMidi : integer;
var ReceivedMidi : TMidi;

//////////////////////////////
// main proc
//////////////////////////////
begin
nbOfMidi := GetLength(input); // get the number of incoming midi codes
if nbOfMidi > 0
then begin
SetLength(outPut,nbOfMidi); // set the number of output codes
for i := 0 to nbOfMidi-1 // loop for all input codes, for polyphonic data (chords)
do begin
GetMidiArrayValue(input,i,ReceivedMidi); // get each code
if ReceivedMidi.Msg <> 128 then SetMidiArrayValue(output,i,ReceivedMidi); // set output value
end;
end
else SetLength(outPut,0); // nothing received, set out length to 0

end.

I didn't test this, since I'm at work, but it should work....
It filters out on midi channel 1, if you need other channels just change the value 128

k
Free samples-vsti's-artist hosting at www.kara-moon.com
Music forum at www.kara-moon.com/forum

Did I mention how great Usine is ?

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 15 Nov 2007, 12:01

Since the script is filtering MIDI, I think you should have a counter for the length of output inside the loop. Something like:

Code: Select all

VAR j &#58; integer;
...
if nbOfMidi > 0 
then begin
    j &#58;= 0;
    for i &#58;= 0 to nbOfMidi-1 
    do begin
      GetMidiArrayValue&#40;input, i, ReceivedMidi&#41;; 
      if ReceivedMidi.Msg <> 128 then begin
         SetMidiArrayValue&#40;output, j, ReceivedMidi&#41;;
         j &#58;= j + 1;
      end;
    end;
    SetLength&#40;outPut, j&#41;;
end 
else SetLength&#40;outPut,0&#41;;
I don't remember whether you have to set the required length before you fill the array with data, and I'm at work so I haven't got the time to check either, but you might have to keep the SetLength(outPut,nbOfMidi) part before the loop.
Bjørn S

nofish
Member
Posts: 114
Contact:

Unread post by nofish » 15 Nov 2007, 18:21

Thanks all!

I have found a midi filter plugin that is able to do exactly what I want - filtering out (kill) a specific midi msg! easier for me than do deal with scripts...

If interested it can be found here
http://www.kvraudio.com/forum/viewtopic.php?t=192282
-> midi notch filter

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 24 guests