tago

How can i set/get parameters?

6 posts in this topic

Hi,

i'm trying to add some custom code to the NG app.

I want to set/get a parameter called kb_transpose. It seems that this parameter is part of MBNG_EVENT_CONTROLLER_KB event.

1.) Do i have to dispatch MBNG_EVENT_CONTROLLER_KB when i want to change the value of kb_transpose?
2.) How would i get the current value of kb_transpose?

As you can see i've trouble understanding how i can change parameters via code without using ngc/ngr scripts. I've no idea where parameters are stored and how i can access them. Is there a suitable tutorial for this?


Your help is greatly appreciated

Share this post


Link to post
Share on other sites

Posted (edited)

Closer explanation:

I'm building a midi keyboard controller and would like to have two switches with respective indicator LEDs as octave up/down controls. The switches and LEDs are connected to J5a.

Edited by tago

Share this post


Link to post
Share on other sites

The 006_rtos_tasks tutorial should help me to understand where to put my custom code, right?

Share this post


Link to post
Share on other sites

Hi.

i'd appreciate some help understanding how the NG app works.

I want to transpose (octave up/down) a keyboard, but don't understand where the respective variable is stored and how i can change its value.

In MBNG_KB_NotifyToggle (mbng_kb.c) line 173 i found this:

s8 kb_transpose = (s8)item.custom_flags.KB.kb_transpose;

This appears to be the place where the transpose value is added to the actual note pressed. Is this correct?

How can i change kb_transpose myself?

 

Thank you very much

Share this post


Link to post
Share on other sites

It looks like kb_transpose is stored in mbng_event as

Quote

mbng_event_item_t

Where are the "event items" generated?

Share this post


Link to post
Share on other sites

I think that this question is obsolete: 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

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