Jump to content

Recommended Posts

Posted
Quote

This one is especially useful in conjunction with EVENT_RECEIVER for converting or just 1:1 forwarding incoming MIDI event values.

I'm trying to code a simple switcher in NG and find myself stuck. 4 buttons just select a synth on a channel, but I can't find the Event_Sender setting that will allow all midi events to pass through as stated in the .NGC document. 

Posted
#attempt to make a small synth switcher

RESET_HW

LCD "%C@(1:1:1)vo.B vo.K  iPad syn4"

#setup encoder
ENC n=  1   sr= 1 pins=7:6   type=detented3

#disable router nodes
ROUTER n= 1   src_port=IN1   src_chn=0   dst_port=OUT1  dst_chn=0
ROUTER n= 2   src_port=IN1   src_chn=0   dst_port=OUT3  dst_chn=0
ROUTER n= 3   src_port=IN1   src_chn=0   dst_port=OUT4  dst_chn=0
ROUTER n= 4   src_port=IN2   src_chn=0   dst_port=OUT3  dst_chn=0
ROUTER n= 5   src_port=IN2   src_chn=0   dst_port=OUT4  dst_chn=0
ROUTER n=10   src_port=SPI4  src_chn=0   dst_port=OUT1  dst_chn=0
ROUTER n=11   src_port=SPI4  src_chn=0   dst_port=OUT1  dst_chn=0
ROUTER n=12   src_port=SPI4  src_chn=0   dst_port=OUT1  dst_chn=0
ROUTER n=13   src_port=USB1  src_chn=0   dst_port=OUT1  dst_chn=0
ROUTER n=14   src_port=USB1  src_chn=0   dst_port=OUT2  dst_chn=0
ROUTER n=15   src_port=USB1  src_chn=0   dst_port=OUT3  dst_chn=0
ROUTER n=16   src_port=USB1  src_chn=0   dst_port=OUT4  dst_chn=0

#get midi events from port USB1
EVENT_RECEIVER id=1  fwd_id=SENDER:1 type=NoteOn chn=1  key=any  ports=1000000000000000

#trigger different sections
EVENT_BUTTON id=5 hw_id=5  radio_group=1 button_mode=Toggle range=1:1 value= 1 label="@(1:1:2)  *    o     o    o "
EVENT_BUTTON id=6 hw_id=6  radio_group=1 button_mode=Toggle range=2:2 value= 0 label="@(1:1:2)  o    *     o    o " 
EVENT_BUTTON id=3 hw_id=3  radio_group=1 button_mode=Toggle range=3:3 value= 0 label="@(1:1:2)  o    o     *    o "
EVENT_BUTTON id=4 hw_id=4  radio_group=1 button_mode=Toggle range=4:4 value= 0 label="@(1:1:2)  o    o     o    * "

#send midi events to port usb1 if button  pressed
EVENT_SENDER  id=1 if_equal=Button:5:1  type=NoteOn chn=1   key=any  ports=1000000000000000
EVENT_SENDER  id=1 if_equal=Button:6:2  type=NoteOn chn=2   key=any  ports=1000000000000000
EVENT_SENDER  id=1 if_equal=Button:3:3  type=NoteOn chn=3   key=any  ports=1000000000000000
EVENT_SENDER  id=1 if_equal=Button:4:4  type=NoteOn chn=4   key=any  ports=1000000000000000




  





This is my staring point. It works but the type=NoteOn parameter in the EVENT_SENDER line needs replacing with something to allow all midi events to pass. I'm sure I'm missing something simple here 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...