Jump to content

Midi forwarding with modification


macsaif
 Share

Recommended Posts

 

Hello

On 29/07/2018 at 3:30 PM, macsaif said:

How fast is the switching to another ngc and ngr? 

 

don't remember that exactly, but I guess the time to reboot, with fast boot flag at bootloader it's fast

On 29/07/2018 at 3:30 PM, macsaif said:

Do I have to do a  reset after switching(to start the ngc with hw reset) ? 

IIRC you don't "have to"

with reset, all previous definitions will be erased

without reset they will remain after loading new files

 

Best

Zam

Link to comment
Share on other sites

  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Is it possible to use LED to store parameters? For example the Ain is sent to specified CC but paralelly it is sent to specified LED. When making a snapshot (stoting of parameters on SD card) then the parameters of the specified LEDs will be stored. When loading of stored data, they will be loaded to LEDs than itbwill be sent to CCs. In that case it would be possible to use one potentiometer for controlling of more CC parameters. 

How to send at Event_Button or Event_Ainser the actual value to the specified LED?

Fwd_id is sending the id or the value to the specified LED? 

I have tried Event_Button id=1001 fwd_id=LED:1001 however it havent sent the acrual status of the button to the specified led in the led matrix but illuminated some group of leds in matrix. If I am setting LED 1001 in NGR file it eorks correctly. 

Link to comment
Share on other sites

The configuration line for DOUTmatrix is:

DOUT_MATRIX n=1 rows=8 inverted=0 sr_dout_sel1=1 sr_dout_r1=2 led_emu_id_offset=1001

 

If I setthe LED1001 from NGR file:

set LED:1001 127

it works.

 

If I set the LED1001 from NGC:

EVENT_BUTTON id=1065 hw_id=1065 fwd_id=LED:1001 type=CC chn=1 cc=66 range=0:127 button_mode=Toggle ports=1111110000000000

it lights up 7 leds from the matrix.

 

Am I doing something wrong, or is there any other thing to adjust?

Link to comment
Share on other sites

Thanks, it was the problem.

Other limitation is that I can not use in NGR the function

if LED:1001 == 0

it works only with Button. I think it is a huge limitation and could solve lot of my plans. Now I have to rethink the program solution. 

 

Edited by macsaif
Link to comment
Share on other sites

The section from NGR:

 

if ^section == 23
if LED:2050 == 0
set LED:2050 127
else
set LED:2050 0
endif
endif

 

MIOS STUDIO response:

[323893.111] [MBNG_FILE_R:454] ERROR: 'LED' not found in event pool by 'if' command!

[323893.111] [MBNG_FILE_R:454] ERROR: invalid left value 'LED' in 'if' command!

[323893.112] [MBNG_FILE_R:454] stopped script execution due to previous error!

[323893.112] [MBNG_FILE_R_Exec] ERROR: (hw_id)LED:2050 not found in event pool at mem pos 0x8a7!

[323893.113] [MBNG_FILE_R_Exec] ERROR: invalid left value at mem pos 0x8a7!

 

Link to comment
Share on other sites

I am trying to assign to one potentiometer more CC messages depending on the status of the Button or LED but there are 2problebs:

Here is the program:

# Reset to default
RESET_HW

AINSER n=1 enabled=1 muxed=1 cs=1 resolution=7bit

EVENT_AINSER id=21 hw_id=21  if_equal=BUTTON:1002:127 type=CC chn=4 cc=7 ain_mode=Snap ports=1111110000000000
EVENT_AINSER id=221 hw_id=21 if_equal=BUTTON:1002:0  type=CC chn=4 cc=8 ain_mode=Snap ports=1111110000000000

DIN_MATRIX n=1 rows=8 inverted=0 sr_dout_sel1=1 sr_din1=2 sr_din2=1 button_emu_id_offset=1001

EVENT_BUTTON id=1002 hw_id=1002 button_mode=Toggle fwd_id=LED:2002 range=0:127 

DOUT_MATRIX n=1 rows=8 inverted_sel=0 inverted_row=0 sr_dout_sel1=1 sr_dout_r1=2 led_emu_id_offset=2001


EVENT_LED id=2002 hw_id=2002 range=0:127

 

1. if I put as condition if_erqual=LED:2002:0 it does not respond.Is it possible to use LED as condition for EVENT_AINSER?

2. If I use as condition if_equal=BUTTON:1002:0 it Works. But I want to use both EVENTs in Snapmode, it means if I switch between them they will remember their previous status and when I switch back to them the pot will start to send CC values only in case when I reach this value. It seems that the snap function is connected to HW_ID not to the ID of the event.

Any idea?

Link to comment
Share on other sites

Hello

 

On 06/08/2018 at 11:01 PM, macsaif said:

1. if I put as condition if_erqual=LED:2002:0 it does not respond.Is it possible to use LED as condition for EVENT_AINSER?

It should.

Make sure your tipo is not at NGC like here... if_erqual= won't work... if_equal= will !

 

On 06/08/2018 at 11:01 PM, macsaif said:

It seems that the snap function is connected to HW_ID not to the ID of the event.

Can't confirm that, but if you observe this and are sure everything else is ok at your NGC then it's the case

 

Best

Zam

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I have rechecked it again, unfortunately does not work

EVENT_AINSER id=3 hw_id=3 if_equal=LED:3228:0 type=CC chn=1 cc=83  ain_mode=Direct ports=1111110000000000

EVENT_AINSER id=1003 hw_id=3 if_equal=LED:3228:127 type=CC chn=4 cc=83  ain_mode=Direct ports=1111110000000000

The LED:3228 is defined and used for other functions too.

 

I have tried the function set_active AINSER:3 0

And set_active AINSER:3 1

 

The activation and deactivation command is sent from NGR file. The deactivation works however once deactivated I am no table to activate it again.

 

Frank

Link to comment
Share on other sites

I am using it for activating a led in a matrix, and ot is activated by a Button, which means values are 0 or 127. The Led on the panel works. 

At the moment no idea but I will try several solutions I have in my head. Just another question.

1.Can I forward the AINSER value to LED and adjust the LED to send a CC value? 

2.Can I forward the AINSER value to multiple LEDs(more fwd_id commands in EVENT_AINSER)? 

Link to comment
Share on other sites

39 minutes ago, macsaif said:

1.Can I forward the AINSER value to LED and adjust the LED to send a CC value? 

You can forward any event to any event, but I don't get the second part of your question, LED with different lit depending of value ?

41 minutes ago, macsaif said:

2.Can I forward the AINSER value to multiple LEDs(more fwd_id commands in EVENT_AINSER)? 

Only one fwd_id allowed, you should forward to a sender and duplicate this sender (same hw_id different id) each one sending/forwarding to a different led.

Or you use meta runscript and then do your forwarding/conditional at NGR.

Best

Zam

Link to comment
Share on other sites

  • 2 weeks later...

I have solved the problem, the program is more less ready, however unfortunately I reached the max allowed. NGR size. Most probably I will have to switch between 6 different .NGR files in that case I will be able to lower the size of NGR files (maybe to half). The controller is working in 6 modes, approx the half of the control elements have the same function in each mode, the rest is different. 

Is it possible to change to another. NGR file by using load command (only NGR, the NGC should stay default) without changing the values of LED, BUTTON, AINSER, etc? 

FRANK

Link to comment
Share on other sites

I have solved partially the problem at the conversion. I have a question obout BANKs because the solution was using of BANKs for activating and deactivating groups of SENDERs based on the status of 8x1 LEDS. I have 16 banks.

Some of the SENDERS are not assigned to any bank, they should work always.

The problem is when I am changing the bank, all of the SENDERS which are not assigned to any BANK, are sending their actual value(I think in the same order they are configured in NGC).

Is that normal?

How to avoid that?

I do not want to send any value at changing of the bank, just in case the value of the SENDER is changing!

Link to comment
Share on other sites

Another question>

I am trying the routingof MIDI IN to MIDI OUTbz Receiver and SENDER like this>

EVENT_RECEIVER id=1 chn=1 type=NoteOn range=0:127 ports=0000010000000000 fwd_id=SENDER:4000
EVENT_RECEIVER id=2 chn=4 type=NoteOn range=0:127 ports=0000010000000000 fwd_id=SENDER:4050

EVENT_SENDER id=4000 hw_id=4000 range=map1 type=NoteOn chn=1 ports=0000010000000000
EVENT_SENDER id=4050 hw_id=4050 range=map1 type=NoteOn chn=4 ports=0000010000000000

 

MIDI IN2 ch1 to MIDI OUT2 ch1 using map1 for changing of velocity curve.

the samefor channel 4

The problem is that the C-2 note is sent from ch1 also to ch4, the rest is OK

if I change the configuration like this>

EVENT_RECEIVER id=1 chn=1 type=NoteOn range=0:127 ports=0000010000000000 fwd_id=SENDER:4000
EVENT_SENDER id=4000 hw_id=4000 range=map1 type=NoteOn chn=1 ports=0000010000000000
nothing is changed, it means the chn4 is forwarded to chn4 too and the c-2 note from ch1 is forwarded to ch4

what is wrong?

 

 

Link to comment
Share on other sites

On 05/09/2018 at 11:50 PM, macsaif said:

Is it possible to change to another. NGR file by using load command (only NGR, the NGC should stay default) without changing the values of LED, BUTTON, AINSER, etc? 

No you can only load a full set of files (NGC,NGR etc...) BUT i think you can trick this by having twice the same .NGC (with different name according to .NGR)

 

13 hours ago, macsaif said:

The problem is that the C-2 note is sent from ch1 also to ch4, the rest is OK

Not sure it's the reason, but you don't define any note, so maybe default is C-2, try with note=all

 

Best

Zam

Link to comment
Share on other sites

Hello,

 

I will try it, maybe this is the problem, however it is interesting that I have only forwarding CHANNEL1 to CHANNEL1 and it is doing CHANNEL4 to CHANNEL4 too.

Any idea about BANK? I am changing the bank for example from 1 to 2 and it sends the value of senders (CC) which are not assigned to any bank and the value of the activated senders. I have to switch out this function somehow!

At the moment it seems that I do not have to call other NGR, NGC to extend the programming possibilities. There is only one reason, I am thinking that I will use another NGR NGC to extend the snapshot capacity from 128 to 256. When I want to store presets in range 0-127 I will use 1.NGC, when I want to store presets in range 128-255 I will use 2.NGC. Both NGHC files should have the same configuration, it means it should not change any value at switching between 2 NGC files, I hope!

Frank

Link to comment
Share on other sites

Hello,

the problem 1 is solved. I have not recognized earlier how importan is to keep the order of the parameters, if I change the order of the parameters it does not work. Now it looks like:

EVENT_RECEIVER id=4000 hw_id=4000 fwd_id=SENDER:4000 type=NoteOn  chn=1 key=any  range=map1 ports=0000010000000000

EVENT_RECEIVER id=4001 hw_id=4001 fwd_id=SENDER:4000 type=NoteOn  chn=1 key=any  range=map2 ports=0000010000000000

EVENT_SENDER id=4000 hw_id=4000 type=NoteOn range=0:127  chn=1 key=any ports=0000010000000000

EVENT_SENDER id=4001 hw_id=4000 type=NoteOn range=0:127  chn=4 key=any ports=0000010000000000

I am using more receivers and activating only 1, this way I can change the velocity map. By choosing the sender I am changing the MidiCH.

 

Now I am trying to write a looped command to make the CHAOS function, sending NoteOff from Midi Chn 1-2 and from key 0-126. The program in NGR looks like:

if ^section == 53

if LED:3185 != 127

send NoteOff USB1 1 LED:3185 0

send NoteOff USB1 2 LED:3185 0

set LED:3185 [LED:3185 + 1]

exec_meta RunSection:53

else

set LED:3185 0

endif

endif

 

I am calling the Section53 by pressing a button. If I exclude  exec_meta RunSection:53 than it sends to chn1 and chn2 the NoteOff command however if I include the calling of Section53 (looping) than it sends nothing and the program freezes. Any idea?

Thank you in advance!

Frank

Edited by macsaif
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...