Jump to content

Starting up the dual manual organ


macsaif

Recommended Posts

Hello, just made the board including 2 mio matrix modules to scan one 61key Fatar Tp 8o and one 73 key Fatar TP 8o. The 61ley keybed is working, on the second one I have to check few things, it is not working. However I have somw issues with the 61key part too:

1. Sometimes happens that after releasing of keys the tone is still playing. I have to press and release these keys to stop playing these notes. What can be the reason? Maybe the active optimized key scanning function? The board is configured according to the sample code ob the midibox kb page. 

2. What are the optimal min and max delay numbers to achieve the best velocity response (do you have experience with tp8o?) 

3. Is there any option to add velocity response curves? 

4. How to calibrate pitch and mod wheel? When I start this option the program is freezing

5.Now I am working why the second kb is not working... Are there any parameters what I have to adjust whe I have 2 kwyboards (shift registers are set to 3 and 4).

 

Thank you in advanve

Frank

 

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Hi!

1.) Try to set make_debounce=1

2.) Those values depend on your own liking. It's not that hard to find out the values that fits your playing. 

3.) Yes. But not in MB_KB. In NG you can define maps. 

4.) Same here. In NG it's easier. Also if you do not calibrate the potentiometer on the hardwareside you won't get the full resolution. You need to scale and offset the output of the potentiometer to the full range of your ADC. Look here:

5.) Nothing special has to be done. But you need an adapter. You can not connect the 76 / 73 key straight to the DIO matrix as you can do with the 61.  

Link to comment
Share on other sites

Thank you for the answers. Another issues found:

1. I will try thes command and report

2.I have tried values in range 20 to 500 however the keybed response is far away form my old roland a33. Maybe the velocity curve will help

3. I will try ng however originally I wanres to use kb because of better response (velocity, scanning) 

4. Same as 3

5. I have made the adaptor. The lower part should work without adptor however there is no any response. I am continuing to find the mistake

6. New issue. I have recognized that the analog iputs are sending continously values even there is a pull ip or pull down resistor. 0-1 or 126-127 etc. 

Is there any function which filters out the small changes in short time? 

Thank you in advance

 

Frank

 

Link to comment
Share on other sites

Hello again,

 

some update:

1. It seems that the make_debounced on helped. Now I am not recognizing this problem

5. I have tried to plug the the first board of the 73 key keyboard to the plug for the 61 key keyboard. Reconfigured the settings to scan the matrix with reversed diodes, changed the jumper for pullup?down resistors. It is working, so there should be some other problem, maybe the configuration or some HW problem. Here are my settings, maybe somebody with more experience will find the problem in the configuration:

set kb 1 note_offset 36
set kb 1 rows 8
set kb 1 velocity on
set kb 1 optimized off
set kb 1 dout_sr1 1
set kb 1 dout_sr2 2
set kb 1 din_sr1 1
set kb 1 din_sr2 2
set kb 1 din_key_offset 32
set kb 1 din_inverted off
set kb 1 make_debounced on
set kb 1 break_inverted off
set kb 1 delay_fastest 20
set kb 1 delay_slowest 100
set kb 2 note_offset 28
set kb 2 rows 12
set kb 2 velocity on
set kb 2 optimized off
set kb 2 dout_sr1 3
set kb 2 dout_sr1 3
set kb 2 din_sr1 3
set kb 2 din_sr2 4
set kb 2 din_key_offset 32
set kb 2 din_inverted on
set kb 2 make_debounced on
set kb 2 break_inverted off
set kb 2 delay_fastest 50
set kb 2 delay_slowest 1000
set kb 1 midi_ports 0x1031
set kb 2 midi_ports 0x1031
set kb 1 midi_chn 1
set kb 2 midi_chn 4
set kb 2 ain_modwheel 6
set kb 2 ain_modwheel_inverted on
set kb 1 ain_sustain 5
set kb 2 ain_sustain 7
set kb 1 ain_expression 1
set kb 2 ain_expression 3
set kb 2 ain_pitchwheel 4
Link to comment
Share on other sites

Where did you buy the 73 keybed? I was never able to get the 73 TP/8O running. At least on my test-keybed it seems that the scanning is totally different and I never had the courage to dive into this. 

Anyway: I have a 76key hammeraction and also a TP/8SK with 73 keys which both are working fine. The TP/8SK has reversed diodes so you have to adapt the hardware (jumper) and software (din_inverted).

And I don't understand this:

Just now, macsaif said:

It is working, so there should be some other problem

Is it working or not?

Link to comment
Share on other sites

I bought it at company which is dealing with manufacturing of custom synths (I can not tell the name). They had it for testing however cancelled the production and they had on stock one remaining keybed and they sold it to me. It was lot of searxhing and emailing with many manufacturers and stocks. 

 

Regarding my problem:

There are 2 connectors for 61 keys and 2 connectors for 73 keys the directio of shiftvrwgister is the same: low61, high 61, low 73, high73. When I plug the lower part cable to the 3rs connector (where it is plannwd to be) nothing happens. When I plug it to the firat connector it works. So maybe there is some configuration problem of the shift registers or some hw problem in my board. I have enclosed the configuration, please check the configuration of the shift registera, maybe therw is a problem. 

Frank

Link to comment
Share on other sites

Just now, macsaif said:

set kb 2 optimized off
set kb 2 dout_sr1 3
set kb 2 dout_sr1 3
set kb 2 din_sr1 3
set kb 2 din_sr2 4

should be

set kb 2 optimized off
set kb 2 dout_sr1 3
set kb 2 dout_sr2 4
set kb 2 din_sr1 3
set kb 2 din_sr2 4
 
Edited by FantomXR
Link to comment
Share on other sites

Thank you.

 

I have found  2 HW problems:

1. 5V was not connected to the 3rd 74HC165 (1st 74HC165 of the second DIO Matrix)

2. The SC pin on the second DIO Matrix  was connected to O8 of the 1st 74HC595 and SER to second 74HC595 instead of  SCLK pin of both 74HC595s. Now it is corrected.

 

Still not working. My questions:

1. Is it possible that some of the IC are damaged due to these mistakes?

2. Is it possible that te 1st board is working with Pull up and the second is working with pull down mode(inverted and not inverted mode)?

 

Frank

Link to comment
Share on other sites

I have started the study the possibility to solve the scanning of 2 keybeds and few additional functions with Midibox NG.

1. Do y need SD card reader connected to STM32F4 module (it is written in the NG manual that it requires an SD card). Basically I will do the same functions as with th Midibox KB, just I want to add Pitch and Modwhell calibration, implement a velocity curve for 2 keybeds (the same curve for both) and implement the scanning of the digital inputs of the core module to switch on and off some functions of KB (Make is break, Octave +-, Midi channel selection)

2. Is the programming of Midibux KB the same under Midibox NG, or it is completely diferent? Is there anybody who can send me a sample code under Midibox NG?

3. How can I implement velocity curves, is there any example?

 

Thank you in advance!

 

Frank

Link to comment
Share on other sites

To 1) yes, you've to add a SD Card.
If you haven't purchased the SD Card socket yet, you could also use a common Mini SD Card adapter as available in super markets. See also the bottom of this page ("Alternative Adapter for MBHP_CORE_STM32F4 module): http://www.ucapps.de/mbhp_sdcard.html

2) programming is similar, but parameters have to be entered into the .NGC file.
See also following page: http://ucapps.de/midibox_ng_manual_ngc.html
Search for "he keyboard command"

3) see kb_2.ngc and kb_6.ngc/kb_6.ngr example configurations

Best Regards, Thorsten.

Link to comment
Share on other sites

Today I made some measurements with the odigital oscilloscope. I think the configuration file is OK now but I am still not able to start up the second keybed on the shift registers  3 and 4. On the sift register 1 the lower part of keybed 2 with inverted diodes works.

I have measured the signals passing trough the shift registers and I have found an intersting thing. If I play only the keybed 1, and measuring the QH output of the 1st shif register (connected to STM32) I nicely see the signals going to the processor. However if I play the second keybed, the signal is nicely measurable until SER pin of the 1st register (Signal coming from the QH pin of 2nd shift register) than on the QH output of the first shift register it is lost, I see no effect but if I am pushing more keys on keybed it turns the output to log 1. The signals coming forom keybed 1 are still noticable.  And here I am lost. Do you have any idea or experience with 2 manuals connected to STM32F4?

Thank you in advance!

 

Frank

Link to comment
Share on other sites

Here is the matrix scheme I have made on separate PCB. The conversion to 20pin connector of 73keyboard is done directly on the pcb there is no any separate board for it. If I made some mistake there I think it has no any effect on the shift register 3, it should work the same way as shift register 1 and 2. and as I have told earlier the lower part of the 73keyboard is working on shift register 1 and 2 but the shift register 3 is not working with any of the keyboards (61 or 73 keys)

matrix.pdf

Link to comment
Share on other sites

Is it possible that the shift registers are not passing trough the whole line of information(From Nr 4to output of the 1st). As I have measured by the oscilloscope I can see the inputs of second shift register on the QH output of the first shift register but the inputs of the third shift register can be measured on the output of the second shift register,on the first register there is no effect.The same for fourth shift register....I see its signals on the outputof the third register however there is not recognizable on the output of the second register.

I think in the configuration file it is adjusted correctly (I have configured 1-4 shift registers) . Is it possible that the "Paralel load-LD pin of 74hc165" signal which is set fromRC pin(PB12 of STM32module) is sent after 16 cycles of the clock signal and not 32(I think for 4shift registers it should be 32)? 

Link to comment
Share on other sites

SOLVED! 

Simple and stupid mistake. I had to adjust to scan 4 shift registers! 

Now I have to decide wether I am switching to NG and implementing velocity curves, pitch bend and modwheel calibration and control of octaves, midi channels and break is make function via din port or keep it as it is and will solve all these things in the second board. 

Some things to consider:

1. How can I reach faster reaction (latency)... Keep the board on MidiboxKB, lead the output of the board to the secons modules inpit where the octave transpose and midi channel routing will be solved... Or install NG on the first board, make all controls based on the inputs in one board with 10 times slower keyboard scan and connect the output of the board directly to the sound module

2. How to solve that there is running continously a signal fro pitch bend, modwheel and expression pedal switching between close values, 0-1, 126-127.....isnt there any simple filter function which filters that changes in value smaller than the defined number in the defined time rangr will be not recognized and sent to output? I have seen the function which limits the time between 2 events however it does not solve the problem just limits the evets sent to the output. 

3. Make the circuit to calibrate the pitchwheel and modwheel or connect them to the second board running NG. 

Why these things (point 2 and 3)are not implemented in KB? I think it is not so complicated to program it, or am I wrong? 

Frank

 

Link to comment
Share on other sites

I have tuned the velocity, fastest 20, slowest 380. Modwheel is working from 0 to 127, only pitchwheel needs an analogue correction or calibration in midibox ng. Now it is working 0,5-2.5V, midpoint 1.5V. My question is:

If I change to midibox ng, I have to change the interval to fastest 2, slowest 38. Is that wide enough to give good velocity response? I want to apply velocity curve too. 

 

Link to comment
Share on other sites

On 10.3.2018 at 11:38 PM, macsaif said:

only pitchwheel needs an analogue correction or calibration in midibox ng

Your values that you will get after software-calibration in NG will not be sufficient for pitchbend. Pitchbend is high-resolution MIDI with 11 or 12bit. In my experience there is no way to get this smoothly running without a hardware calibration. I posted a link above where duggle made some examples. 

To explain the difference between software- and hardware-calibration:
Depending on the ADC you use, you need a fullscale of 0-3.3V or 0-5.0V to get a nice pitchbend-signal. If I read your post correctly your potentiometer reads 0.5V-2.5V. That results in a fullrange of 0-1.5V.
With the pinrange-calibration NG offers you can now tell (=offset) the MIDIbox, that it should take 0.5V as lowest analog voltage and 2.5V as highest analog voltage. But anyway: You still have only 1.5V which is less than half NG expects.

If you do a hardware-calibration you will use an IC and some resistors to offset AND scale your range 0.5V - 2.5V to 0V-3.3V / 5V so the potentiometer outputs fullscale! That gives NG the full range and you won't end up with jittering values or a bad resolution. 

In short: Software can only set an offset of an analog signal but it can not scale it.

Link to comment
Share on other sites

I have tried th midibox ng however I can not start it to play any notes. The configuration is the same as KB. Only one thing which is not adjusted, the number of shift registers. 

Where can by adjusted that the data has to be sent to Midi 2 and Midi 1(maybe this is the problem) on channel 1 or 4?

Is it possible to upload. Ngc files without connected SD card? I am trying it however no any effect. 

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...
×
×
  • Create New...