Jump to content

din_key_offset not working on NG/KB?


FantomXR
 Share

Recommended Posts

Hey people,

 

I need to adjust the starting note of the right half of my keyboard. Here is the code from NG:
 

 

RESET_HW
 
LCD "%CKeyboard Mapped"
 
# keyboard configuration
KEYBOARD n=1   rows=12  dout_sr1=1  dout_sr2=2  din_sr1=1  din_sr2=2 \
               din_inverted=0  break_inverted=0  din_key_offset=64 \
               scan_velocity=1  scan_optimized=0  note_offset=21 \
               delay_fastest=8  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  kb_transpose=0  lcd_pos=1:1:1 label="Note %n"

 

It seems, that the din_key_offset parameter is not working. It doesn't matter which number I insert, the resulting key# is the same everytime. The right half is far too low. It starts at a-1 and not at C#-3.

 

I first tried KB, but same here. 

 

Any tipps?
 

Thanks,

Chris

Link to comment
Share on other sites

Maybe the number is too high so that an overrun happens?

 

Which note is played when you are using din_key_offset=1

which note when you are using din_key_offset=2

and 3... and 4... are you able to increase it until the expected note will be played?

 

At which value an unexpected note will be played?

 

Best Regards, Thorsten.

Link to comment
Share on other sites

I tried different and random numbers from 0 to 32. Nothing is changing. It stays at a-1.

 

Maybe something is swapped. I'll try tomorrow, if the starting key of the left half changes by putting another number behind din_key_offset=x. But the left half is working perfectly... and the right half is working too, it's just the wrong starting point ;)

 

Do you may have an old revision of the KB-app? I could try to upload an old one. 

Link to comment
Share on other sites

The result is:
Changing din_key_offset=x doesn't have any impact on the played notes. It stays with a-1.

 

I will update my svn and check what you suggested. I will build an app with VARIANT=1 and =0 and try both. 

 

//edit: Okay: With VARIANT=1 I get absolutely no notes out of the keybed. With VARIANT=0 same thing as mentioned above (stays at a-1).

 

//edit: BTW: It's a TP/100 I'm checking with. But this shouldn't be a problem. I have the diode-matrix-layout and build an adaptor. I doublechecked the connections... here should everything be fine.

Edited by FantomXR
Link to comment
Share on other sites

Hi Christian,

 

I just re-compiled the latest MIDIboxKB V1.013 out of my latest SVN Rev.2034 and installed it on my testbed LPC17 with the Fatar TP9 (88 keys) and it works as expected.

I checked all settings in MiosStudio -> o.k.

I checked all 88 Keys about their correct notes -> o.k.

 

Maybe my project.hex will help. Settings are according to MiosStudio screenshot.

If this doesn´t help then your TP100 scanmatrix or your DIN/DOUT connectiion is different from the one Thorsten proposed on his Keyboard project page.

 

Good Luck!

Jo

project.hex

post-6136-0-77908000-1408477132_thumb.jp

Link to comment
Share on other sites

Okay! After some other tests I think, the diode-matrix-layout / pinout of the keybed that I have is not correct. I attached the layout and the pcb-layout I created to build an adaptor. Everything should be fine. but it isn't. 

 

I experimented with single pin-to-pin connections. When I connect the 1st and the 3rd pin of the left side to O7 and O6, the 2nd pin to I0 of J3 and I play the lowest note MIOS Studio outputs the correct note which is a-1.

If I now do exactly the same connections with the right side and press the according key (which should be the black key right next to C-3) I would also expect, that MIOS Studio outputs a-1 but nothing happens. I tried other keys, but none of them are sending values.

 

I think that my adaptor (pin 1 is most left) should work if the pinout in the schematic is correct. If you have time, maybe you can look over it...

post-10331-0-58205000-1408492240_thumb.p

post-10331-0-66779900-1408492243_thumb.p

Edited by FantomXR
Link to comment
Share on other sites

Hi Christian,

 

I checked your adapter PCB and it seems to be correct.

 

2 possibilities, which can cause your troubles:

  1. Fatar has changed the pinning of the right half of the scan matrix on the TP100 keyboard
    The scan matrix schematic relates to TP/8/9.
  2. The top right ribbon cable Connector _TO_JP2 is plugged in reverse order.
    (I know, it is a very stupid idea, but it may be worth for a try)

Best regards,

Jo

Link to comment
Share on other sites

Hi Jo!

 

The schematic is from a 5-page-datasheet about the TP/100. I think it has more something to do that studiologic let fatar produce a specific design which fits their acuna electronis (my TP/100 is a sparepart from an acuna). 

 

I already checked it... the connections are wrong! It has nothing to do with reversed pins ;) 

 

As soon as I wrote it down correctly I will post the informations here.

Link to comment
Share on other sites

New test results:

 

I checked the pcb of the keybed. It seems that the pcb is prepared not to be used with the foil-cables only. Next to the foil-connector there are smd pads. I think, that I could add a standard micromatch-connector to the board. This made it easy to see, which pins are connected to something. Because I don't have a micromatch-connector here, I added a standard 20pin ribbon cable.

I realized, that there are a lot of pins left open. As you can see in the pic the top row (which should normally contain the row-signals) has no traces except for the last two pins (pin 1 is most right). 

I removed the rubber contacts to see where the traces are going to. The lower row of the connector leads to the makes and brakes, the top row to the diodes.

 

I connected pin 1 and 3 of the right side (MK5 and BK5) directly to the DIO to O5 and O4 of J4. Result: I can get the first eight keys of the right half working with the correct note-output: C#3 - G#3.

But now I don't know where to connect the other pins. I tried to connect MK6 and BK6 to MK0 and BK0. This leads to the problem mentioned above: The triggered notes are starting at a-1. So:

C#3, D3, D#3, E3, F3, F#3, G3, G#3, a-1, b-1, etc.

 

Connecting MK6 and BK6 to O3 and O2 of J4 don't have any effect. And again: Adjusting din_key_offset has also not effect.

 

The fact, that I can trigger C#3-G#3 without connecting any rows of the right half leads to the assumption, that there this will might not function correctly without adjusting the firmware.

 

Any tipps how to proceed?

Thanks!
Chris

post-10331-0-07993600-1408546564_thumb.j

Link to comment
Share on other sites

Hi Christian

The connections Fatar (StudioLogic) uses, seems to be related to a 8-Bit microcontroller. E.g. BR0 & BR5 can not be scanned in the same scan run because L & R Return Lines (T0..7) are tied together. This doubles the scan runs.

Instead of BR0/5,...., BR4/9, BR10 and reading LH T0..7 & RH T0..7 as one 16-Bit value you have to scan BR0 and reading T0..7, BR1 and reading T0..7, etc.

If You see a chance to cut the connections between the LH and RH T0...7 in your recent schematic , you can use the DIO with the Connection scheme for the 88 Key TP8/9 keyboard. (Your adapter PCB shown at 2014-08-20)

Regards,

Jo

Edited by nlate
Link to comment
Share on other sites

Christian,

It is not only SW you also need additional HW (HC595) because you have to scan BR0..10 and MK0..10 = 22 scan lines.

This means 3 Shift registers. This can't be done with 1DIO Module.

On my TP9 there are a lot of bridging wires (Loetbruecken), may be the bridging on TP100 between LH and RH T0..7 is also achieved in the same manor.

Regards,

Jo

Edited by nlate
Link to comment
Share on other sites

Okay, I see your point!

 

I tested with a multimeter. My assumption is correct. Both sides share T0-T7. So the only solution is what you already suggested.

Good to know :-) I will go into it in the upcoming week. 

 

Thanks for your help!

 

BTW: Here is a build recently finished!

 

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