detect midichannel via program change

Post your groups/layouts here

Moderators: davidv, seb@plogue

Ulrik
Posts: 2
Joined: Fri Mar 04, 2005 4:58 am
Location: Sweden
Contact:

detect midichannel via program change

Postby Ulrik » Fri Oct 28, 2011 2:46 pm

Hi!
I wonder if this is possible, and if it is, how to do it.
This is what I want to do:
I have midi data coming in on 16 midi channels, on one of these channels there will be a specific program change number , and I know what program change number it will be, but I don't know on what midichannel it will come.
I want this program change message to trigger a gate to let that specific midi channel pass thru but no other channels, is this possible to do?

I would be much grateful if somebody with better understanding than me, could solve this problem I have.

Cheers / Ulrik

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Fri Oct 28, 2011 9:36 pm

The attached should do it.

Just check the proper program change in the PC filter bidule.

All the stuff above MIDI Dummy_0 is just to send a test program change. You can use the Int Variable to set the program change # and the channel remapper to set the midi channel.

Cheers!
Attachments
midi ch select by pgm ch.bidule
(44.66 KiB) Downloaded 195 times

Ulrik
Posts: 2
Joined: Fri Mar 04, 2005 4:58 am
Location: Sweden
Contact:

Re: detect midichannel via program change

Postby Ulrik » Sat Oct 29, 2011 2:45 am

Thanks a lot dts350z !!

It's working great, I am very grateful for your help! :D

All the best / Ulrik

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Mon Feb 20, 2017 4:46 pm

Hope someone can help w/a necro thread :roll:
Think I might use something like this, so trying to learn from it.
Cannot get it to work as I understand the OP request.

My pic is simplified from the original downloaded from here
First in my pic, Point A - seems to place at fixed value(1.0) at the 'audio' input of the switch. I'm thinking this is as a logical state input to the switch. Don't understand why it is connected to both inputs though... :roll:

I have found when I send the appropriate PC, the output from the channel selector is tothe gate associated w/the channel the PC came on. Channel number seen at B, and gate drive seen at C. All good,
However any new data presented at the PC filter also actuates the channel selector and output selector. So all channels continue to be seen at 'Through data...',

2017-02-20_Bidule_SwByPC_Question_0.png
2017-02-20_Bidule_SwByPC_Question_0.png (186.07 KiB) Viewed 1599 times

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Mon Feb 20, 2017 5:53 pm

Yes "A" is putting a constant 1 on the input of the "output selector". Joining it to the channel output select input adds one to the value from the channel extractor, so you get a 1 on output 1 when the channel is 0, A 1 on output 2 when the channel is 1, etc. For the example shown, you get a 1 on output 4 (but you have your monitor C, on output 3).

Any PC message will change the output selector to the channel the PC was on.

Since you appear to be joining all the midi signals together under your "through data observed here" you will see all data (from channels 0 - 3).

Kinda depends on what the channel extractor does between PC signals, however. It's not clear in the help file.

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Mon Feb 20, 2017 7:52 pm

Hello dts350z,
Thank for your reply. I get the 1 addition now.
The instant status at the monitor points was not a concern when doing the screen cap. I tried to cover the situation in my description.
(slack - i guess :roll: )

"Any PC message will change the output selector to the channel the PC was on."
Yes, understood and working, BUT - it doesn't stay there,
"However any new data presented at the PC filter also actuates the channel selector and output selector."

"Since you appear to be joining all the midi signals together ..."
Actually that label is just hiding the 'Midi Dummy' you had in the original. Indeed, all the midis are joined there, but the gates are to route only the PC selected channel through following its arrival on whatever channel (no :?: what I got from OP anyway),

"Kinda depends on what the channel extractor does between PC signals,"
To me it seems that the PC Filter is the problem. It continues putting out channel numbers, for data other than PCs! Channel selector follows...

Associated = I wanted to try 'Program change to param' as an alternative selector, I see it in the docs, but can't find it in the Bidule tree. Know the direction?

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Mon Feb 20, 2017 9:11 pm

Oh wow I didn't even look to see that I posted that layout ;0)

I think the program change to params is probably the program change extractor.

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Mon Feb 20, 2017 9:28 pm

The PC Fileter --> ch extractor wont change channels unless/until another filtered PC comes in on a different channel.

The original layout was set to only accept (filter) PC 5. Whatever channel PC 5 comes in on will be reflected at the bottom of the layout. Nothing will change until another PC 5 (on a different channel).

The layout essentially lets you select on of the 16 midi channels for thru, based on what channel you send PC5 on.

Of course by changing the PC filter you can change which PC(s) messages trigger the channel selection.

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Mon Feb 20, 2017 11:17 pm

Well, I don't know what separates our opinions! :)

Apologies all around for the large video, but I wanted to show what I am seeing. (Damn, didn't know I couldn't post .swf video here, so here it is as zip. Hope participants can view...) (Missing the text strikeout switch for the video comment too! :shock: ) EDIT: So no video allowed? Tried after mp4 convert and no go...

This is the original download. I replaced the unavailable midi input device with my keyboard.
I dragged the midi monitors out to left to be more obvious. I left the PC selector as the manual test config you gave, and show it working.

My keyboard is transmitting on midi channel 4. You can see I have been sending data through. Then I send the manual switch by program change on channel 1 using the original method. It is reflected in the midi monitors. Then I transmit w/my keyboard, on channel 4, and my key data passes right through...

2017-02-20_Bidule_ChSelect_Question.zip
(296.53 KiB) Downloaded 23 times


EDIT2:. I have seen some notes about logging. Is there some trace I can examine/provide?

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Tue Feb 21, 2017 1:04 am

Logic would say that you must be sending a PC on midi channel 4, before the note on/offs on ch 4.

If you use midi monitor 2's, instead of midi value display, you'll be able to see a sequence of midi events instead of just the last one.

I'm really not much of a keyboard guy, but I seem to remember some keyboards sending their current Program before Note ON?

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Tue Feb 21, 2017 7:14 am

I'll have to say logic fails in this case :) . I've traced midi data through many episodes before coming to this. Actually difficult to send PCs from that Korg, so experimented with a virtual device and sending PCs and data when first trying to sort this...

Do you know if there is an execution/processing log I can examine/provide?
EDIT: FWIW: Found the log
C:\Users\MyUserName\AppData\Roaming\Plogue\Bidule\bidule.log

I wanted to leave the project as close to unchanged for the demo as possible for this demo. Could you view the video?

Will try to 'peel the onion' again later. Appreciate your time.
Last edited by NTO on Tue Feb 21, 2017 12:17 pm, edited 1 time in total.

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Tue Feb 21, 2017 10:03 am

Well, switching the monitors was a good suggestion. Makes it a simple as can be...

2017-02-21_Bidule_PC_Switching_Mon2s.png
2017-02-21_Bidule_PC_Switching_Mon2s.png (20.93 KiB) Viewed 1563 times


Monitor 2_1 is between PC_Filter and Channel Extractor. For this to work should not see note data here :?:
Monitor 2_2 is at the final output showing channel 4 data is switched through...

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Tue Feb 21, 2017 10:32 am

Maybe it didn't work this way in the past. :?:
Explicit (IMO). Note data is not rejected.
2017-02-21_Bidule_PCfilterTest_0.png
2017-02-21_Bidule_PCfilterTest_0.png (75.97 KiB) Viewed 1560 times

NTO
Posts: 110
Joined: Sat Feb 18, 2017 9:54 am

Re: detect midichannel via program change

Postby NTO » Tue Feb 21, 2017 11:01 am

So if I inverted the filter, and use the other output, it works per the OP :?: :shock: :roll: :)
2017-02-21_Bidule_PC_SelectInverted.png
2017-02-21_Bidule_PC_SelectInverted.png (66.73 KiB) Viewed 1558 times

dts350z
Posts: 1521
Joined: Thu Jan 15, 2009 1:18 pm

Re: detect midichannel via program change

Postby dts350z » Tue Feb 21, 2017 7:53 pm

I cannot confirm your inverted filter results.

However, what is wrong is that the PC filter is letting Note on Note off messages through. My assumption was that only PC messages would come out the "filtered output" pin.

The fix is put a Midi Message Filter above the PC filter, and set it to only allow PC messages to pass to the filtered output.

midi ch select by pgm ch.bidule
(52.34 KiB) Downloaded 28 times


I'm at work so didn't have a keyboard but used a VST for simulation of your keyboard on ch 4. you can remove it and replace with a midi input device and your keyboard.


Return to “Bidule Layouts”

Who is online

Users browsing this forum: No registered users and 1 guest