Jump to content

tago

Members
  • Posts

    273
  • Joined

  • Last visited

Posts posted by tago

  1. Hi,

     i get note values instead of numbers when i press aftertouch.

    [397400.935] d0 64   Chn# 1  Aftertouch E-6
    [397400.937] d0 63   Chn# 1  Aftertouch D#6
    [397400.938] d0 61   Chn# 1  Aftertouch C#6
    [397400.939] d0 60   Chn# 1  Aftertouch C-6
    [397400.940] d0 5e   Chn# 1  Aftertouch A#5
    [397400.942] d0 5c   Chn# 1  Aftertouch G#5
    [397400.943] d0 59   Chn# 1  Aftertouch F-5
    [397400.944] d0 42   Chn# 1  Aftertouch F#3
    [397400.945] d0 16   Chn# 1  Aftertouch a#1
    [397400.946] d0 14   Chn# 1  Aftertouch g#1
    [397400.947] d0 00   Chn# 1  Aftertouch c-2

    Here my NGC config

    EVENT_AINSER id=6  type=Aftertouch  chn= 1  range=0:127  offset=0  ports=1000100000001000  lcd_pos=1:1:1  label="^std_aser"

     

    Shouldn't it look like this? (note the numbers after Aftertouch)

    [397400.943] d0 59   Chn# 1  Aftertouch 21
    [397400.944] d0 42   Chn# 1  Aftertouch 34
    [397400.945] d0 16   Chn# 1  Aftertouch 57
    [397400.946] d0 14   Chn# 1  Aftertouch 29
    [397400.947] d0 00   Chn# 1  Aftertouch 16

     

    Thanks in advance!

     

  2. Works too, thanks.

    I've a question regarding the range of kb_transpose. I'm planning to have a transposition range of +/- 2 octaves. I assume kb_transpose stepping is laid out in half tones, so it would look like -24, -12, 0, 12, 24. But this will not work as negative values seem to be forbidden. Any idea how to achieve this?

  3. Hi.

    I want to implement octave up/down buttons as found on many midi keyboards.

    I've read the NGR documentation and can't find a way to either read the value of kb_transpose or declare a global custom variable instead. The custom var would be used to store the current transpose value and in if-else statements inside the NGR script.

    Do i have to setup a dummy element and use its value as my custom variable? If yes, how do i do this?

    Or is there a better way of doing this?

  4. Here is my simplified NGC. (NGR posted above)

    I removed everything not related to the remaining problem (enabled and dimmed LEDs).

    If upload this config both LEDs are lit and dimmed. But when i uncomment KEYBOARD n=1 ... all J5A related scripts work as expected.

    Could there be a conflict regarding the shift registers?

    # Reset to default
    RESET_HW
    
    # KEYBOARD hardware
    KEYBOARD n=1   rows=8  dout_sr1=1  dout_sr2=2  din_sr1=1  din_sr2=2  din_inverted=1  break_inverted=0  din_key_offset=32 \
                   scan_velocity=1  scan_optimized=0  note_offset=36 \
                   delay_fastest=5  delay_fastest_black_keys=0  delay_slowest=100
    
    EVENT_KB id=1  type=NoteOn chn=1 key=any use_key_number=1 range=0:127  lcd_pos=1:1:1 label="Note %n"
    
    # J5A PORT SETUP
    # J5.A0 -> octave up switch
    # J5.A1 -> octave up LED
    # J5.A2 -> octave down switch
    # J5.A3 -> octave down LED
    
    # now enable DIOs (0 = input / 1 = output)
    DIO  port=J5AB  emu_din_sr=1  emu_dout_sr=1  output_mask=01010000
    
    # button events (DIN SR1 pins are assigned to hw_id=1/3)
    EVENT_BUTTON id=1  hw_id=1  type=CC chn=1 cc=16 range=0:127  fwd_id=LED:2
    EVENT_BUTTON id=2  hw_id=3  type=CC chn=1 cc=17 range=0:127  fwd_id=LED:4
    #EVENT_BUTTON id=1  hw_id=1  type=Meta  meta=RunSection:1  button_mode=OnOnly
    #EVENT_BUTTON id=2  hw_id=3  type=Meta  meta=RunSection:2  button_mode=OnOnly
    
    # LED events (DOUT SR1 pins are assigned to hw_id=2/4)
    EVENT_LED    id=3  hw_id=2  type=CC chn=1 cc=16 range=0:127
    EVENT_LED    id=4  hw_id=4  type=CC chn=1 cc=17 range=0:127

     

     

  5. I removed all other configs and tried to link the buttons to NGR scripts for testing purposes, which was not successful.

    NGC

    EVENT_BUTTON id=1  hw_id=1  type=Meta  meta=RunSection:1  button_mode=OnOnly
    EVENT_BUTTON id=2  hw_id=3  type=Meta  meta=RunSection:2  button_mode=OnOnly

    NGR

    if ^section == 0
      LOG "NGR script running..."
    endif
    
    if ^section == 1
      LOG "NGR section 1"
    endif
    
    if ^section == 2
      LOG "NGR section 2"
    endif

     

    The RunSections are not triggered.

  6. Since i already have configurations for DIO Matrix (keyboard) and AINSER8 modules (these modules are currently not connected to the core), could it be that there are conflicts related to emu_din_sr/emu_dout_sr? When i press the buttons connected to J5A note on/off events are triggered.

    Edit: uncommenting EVENT_KB stops those random note triggers.. really strange

  7. Just tried it.

    Both LEDs are lit up and look dimmed. Does the dimming occure due to emulated SR?

    Otherwise i think the LEDs should be off and only light up when a button is pressed with my config. Maybe i'm wrong.

    Here is my config

    # J5A PORT SETUP
    # J5.A0 -> octave up switch
    # J5.A1 -> octave up LED
    # J5.A2 -> octave down switch
    # J5.A3 -> octave down LED
    
    # now enable DIOs (0 = input / 1 = output)
    DIO  port=J5AB  emu_din_sr=1  emu_dout_sr=1  output_mask=01010000
    
    # button events (DIN SR1 pins are assigned to hw_id=1/3)
    EVENT_BUTTON id=1  hw_id=1  type=CC chn=1 cc=16 range=0:127  fwd_id=LED:3
    EVENT_BUTTON id=2  hw_id=3  type=CC chn=1 cc=17 range=0:127  fwd_id=LED:4
    
    # LED events (DOUT SR1 pins are assigned to hw_id=2/4)
    EVENT_LED    id=3  hw_id=2  type=CC chn=1 cc=16 range=0:127
    EVENT_LED    id=4  hw_id=4  type=CC chn=1 cc=17 range=0:127

     

     

  8. Just now, TK. said:

    IO Pins are not initialized in your pseudo code.

    That's true. I omitted that part in my example. But i already got the two LEDs working following the 008_j5_outputs tutorial. But this was only to test if its working at all.

     

    If there is no better solution i suppose i have to use two different strategies at the same time. One for the switches using NGR scripts and another for the LEDs using custom code. The LED handler would only read (get) kb_transpose, not alter it. But yeah, sounds like some dirty hack in the end.

    If you could add digital IO support that would be very nice. I assume others would like that addition too.

    Do you think you could do it?

  9. Thanks @TK.

    i already made a board that connects to a single J5 port. It has two LEDs and two tact switches on it.

    If i understand correctly the LEDs can't be controlled via NGR.

    So i need to do that via custom code? Maybe using the 006_rtos_tasks tutorial as implementation guide.

    I've already written some pseudo code here:

    If this is the correct way of doing it, i'd need to know how to the get kb_transpose value.

  10. 20 minutes ago, TK. said:

    This should be possible, just configure the analog inputs and trigger the NGR function via an EVENT_AIN

    You could change the value range and enable the filter function to avoid unintended triggers, a demo can be found here: https://github.com/midibox/mios32/blob/master/apps/controllers/midibox_ng_v1/cfg/tests/ain_fsr.ngc

    Best Regards, Thorsten.

    As i use tact switches: will this also work for tact switches or toggle switches only? Does the ain_fsr.gc example take care of the tact switch issue using " filter delay of 20 mS " ?

    Sorry, i'm a little overwhelmed by all of this.

     

    Edit: i also need to enable/disable two status LEDs connected to J5a/b.

     

     

  11. 1 hour ago, TK. said:

    Hi,

    you don't need to change the existing code to do this, just use the "set_kb_transpose" command in a NGR script.

    Following example demonstrates this: https://github.com/midibox/mios32/blob/master/apps/controllers/midibox_ng_v1/cfg/tests/kb_6.ngr

    And here the corresponding events which trigger the ^sections: https://github.com/midibox/mios32/blob/master/apps/controllers/midibox_ng_v1/cfg/tests/kb_6.ngc

    Best Regards, Thorsten.

    Hi Thorsten,

    thank you for your reply.

    I want to trigger transpose changes via hardware switches connected to J5a/b core ports. As i understand it, it is not possible to assign these switches in ngr/ngc scripts. Or is this still possible?

    Here is my original post about it:

     

     

     

  12. Hi,

    i'm too dump to understand how the NG apps works internally.

    I want to change the keyboard transpose parameter within the NG app, but can't figure out how to do it.

    There seems to be an event system where the kb_transpose parameter is used, but i've no idea where its value comes from and how i can change that value.

    It looks like this parameter can be changed via .ngr script (set_kb_transpose) though. But that doesn't help me i suppose.

    I'm simply lost.

     

    Thanks in advance

     

    Edit. i've already posted about it here:

     

  13. 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

×
×
  • Create New...