Jump to content

robinfawell

Programmer
  • Posts

    292
  • Joined

  • Last visited

Everything posted by robinfawell

  1. In an effort to better understand MIOS 32 I wonder whether there would be an advantage in purchasing the STM32 primer(see Link below). There are two versions of the STM32 with different flash memory sizes. I would like to produce an equivalent of Qbas velocity scanning system using the core 32. With the higher clock speeds and Direct Memory Access (DMA) this may be possible using C program code. I understand "C" to some extent and assembler a little. Any comments will be appreciated. Robin My link
  2. After a long break this my first query. I have nearly finished the case and stand for my digital piano. The keyboard used is a Fatar Wood 88 note velocity sensitive and I will follow QBas scan matrix (latest version). I am trying to get a better understanding of the QBas asm code . There is early reference to IRQ_TMP1. As far as I can understand the TMP's and IRQ_TMP's are restricted MIOS memory locations. I may be wrong but they would seem to be all the same. Is there significance in the name IRQ? (interrupt request?) and in the name TMP (Temporary?). Would TMP locations be used differently from IRQ_TMP locations? Are they merely general purpose locations? I will appreciate any answers. Robin PS I was making assumptions based on the PIC operation. The use of the Memory locations will depend on MIOS. Therefore I am asking for an explanation of the two functions. If there is a reference somewhere just point me to it.
  3. Since I sent the original message I have thought some more about the solution that uses BR0,MK0 etc as the strobe and uses T0-T7 as the parallel inputs to the SR. This has an obvious advantage. The sequence will follow the sequence of the keys from the lowest note to the highest note dealing with 4 notes or 8 switches at each strobe. Robin
  4. The TP40 has 88 keys. I have found that you can download the circuit from the Doepfer Website. Go to the Products, Spare Parts and you will see the 88 note keybed in the first section. Click on Matrix_88.gif As I understand it the idea is that the signals T0 to T7 are "strobes" which sequentially transfer the switch status from the keys in pairs. There are 176 switches for the 88 keys. The 1st and 2nd switches are mechanically arranged so that the 1st contact closes first and the 2nd contact closes later. The time difference will indicate how strongly the key is pressed. The shorter the time the louder the note, hence velocity sensing! If an 8 bit Dout is used to generate the "strobes" then you will need to store in a Din Module the following BR0, MK0 :BR10,MK10 ie 22 data bits (for each strobe). Alternatively you could strobe with T0 to T15 and use only 11 data bits (for 16 strobes). After each strobe the 22 bits must be transmitted serially to the Core Module. At this stage I would suggest that it would be a good idea to utilise either the 3rd Din unused bits 24 - 22 = 2 bits X 8 =16 switch states for other uses or even use the total Dout capability of 32 bits to provide an extra capability of 32-22 =10 X 8 = 80 switch states. I would welcome any comments from more experienced forum members on whether there is any advantage in using an 8 or a 16 bit strobe, bearing in mind that the following processing by the core will involve bit manipulation. Polarity of Diodes. You will see that the anodes of the diodes are connected to T0 -T7. When T0 is active the first two diodes in each 16 switch group should enable note info from the 1st Key,9th key,17th key etc etc to be passed to the Din module. The rest state of the Din shift register has a pull up resistor ie a "1". Connecting the strobe to a "0" via a switch and diode to the shift register input will not change the input state. The diode(s) are reverse biased. The diodes (I think) need reversing. I am reluctant to do this on a new keybed. There are 176 diodes and I will need to take the keybed apart. I think that the best way will be to arrange for pull-down resistors from the SR input to ground. This will allow the diode polarity to remain unchanged. The strobe will change to a "1". This may need track cutting but the resistors are in parallel. I must admit that I have not checked this out carefully on the PCB. From various Forum references it would seem that Qbas has succeeded in producing a midi interface for the Fatar 88 keybed. The other solution is to swap T0-T7 with the BRx/MKx, using the latter as a strobe. Perhaps that is how Qbas managed the solution. If Qbas or others can help me I will appreciate it. Regards Robin
  5. Thanks Thorsten If I understand your answer properly, the USER_Tick follows the other tasks you mentioned. Then when USER_Tick is completed the other tasks will immediately be restarted then followed by a second USER_Tick and so on until the system is closed down. Best Regards Robin
  6. In TK's and QBas 8 x 8 and 16 x 16 keyboard Scan Matrix the SM_ButtonHandler is called from USER_Tick. This is described in the MIOS Functions Reference as "This function called by MIOS in the mainloop when nothing else is to do" A number of questions occur. If called does the SM-ButtonHandler function perform once only? Or can it perform several times ? What happens if the function takes too much time? Thanks in advance Robin
  7. I am still working on understanding QBas scan matrix 16 X 16. I'm now about half way. The velocity calculations rely on measuring the time difference between the first and second contact. This will of of course vary depending on how strongly the note is played. I have the Fatar circuits for the 51 note keybed. I assume that the 88 key version works the same.This shows the first and second contact as normally open. However the first contact is labeled Bk = Break ? and the second contact Mk = Make? This might imply a normally closed first contact and a normally open second contact. I wonder whether a Fatar keybed user such as QBas or SounDuke or others could clear up this matter or me? Thanks Robin
  8. I should have remembered the syntax rules! Robin
  9. Thanks Nils bit_number is a variable and appears in several places in sm_fast. It never occurred to me that the - was a minus sign. I was thinking of it as a hyphen. Robin
  10. That is what I thought originally. However if you search for "7-bit_number" in all the files that comprise sm c example v1.zip there is only one file that contains "7-bit_number" and that file is sm fast.inc and in that file there is only one instance of "7-bit_number" and that line is the one referred to in the first instance. This seems to discount that "7-bit_number" is a variable. Robin
  11. I know what btfss means. My difficulty is with the second operand "7-bit_number". Perhaps I have complicated this. I was thinking "any 7 bit number", originally. If I conclude that this is referring to the 7th bit of SM_DOUT_VALUE why not just write btfss SM_DOUT_VALUE, 7 Robin
  12. The line btfss SM_DOUT_VALUE, 7-bit_number Appears in all of the scan matrix versions in the single shift step macro SM_BUTTON_HANDLER SHIFT MACRO bit_number I have found btfss f, b where b = 0-7 Can anyone help Robin
  13. This is an example of the drawing without explanation text. Robin Core_Din_Dout Circuit_2.pdf
  14. I am currently trying to figure out the details of "scan matrix" from Thorsten and QBas. The current task is the operation of the core / Din and Dout Shift registers. I have produced a CAD drawing of the interconnections in DWG format. I can convert this to pdf for example. If I think that this may be useful to others I could post the drawing and explanations on the forum and/or Wiki. What formats should I use? Robin
  15. To QBas Please ignore the previous message. I think that I have made an incorrect assumption. It is likely that the Dout strobe is the same as for the 5 octave Fatar keybed. The left and middle sections of the 88 keys circuit will probably be Left Section Connector T0, T1, T2, T3, T4, T5, T6, T7 ; MK0, BR0, MK1, BR1, MK2, BR2, MK3, BR3 (32 Keys) Middle Section Connector T0, T1, T2, T3, T4, T5, T6, T7 ; MK4, BR4, MK5, BR5, MK6, BR6, MK7, BR7 (32 keys) and the Right Section Connector T0, T1, T2, T3, T4, T5, T6, T7 ; MK8, BR8, MK9, BR9, MK10, BR10 (24 keys) This will require three DinX4 modules and one DoutX4 Module. The scan matrix will be 8 X 24 of which 8 X 22 will have 2 contacts per key for velocity sensing and a further 16 single contacts will be available for other uses (sustain pedal etc) The T0 -T7 connections will connect to the Dout Module and the MK and BR connections will be Din inputs. Please let me know whether I am correct. Robin
  16. Reply to QBas. I understand asm a little and C slightly more. However I am very willing to help in presenting the scan matrix code with more explanation. You may have the circuit diagram of the Fatar 88 keys keybed. If you have please email it to me or place on the forum. I have a diagram (gif) of the 5 octave keyboard. This shows two sections. The left keyboard shows 32 keys (64 contacts) connected to a 16 pin connector. 5 Octave Keyboard Left Section Connector T0, T1, T2, T3, T4, T5, T6, T7 ; MK0, BR0, MK1, BR1, MK2, BR 2, MK3, BR3 The right hand keyboard has 3 keys missing on the MK7, BR7 bus and also uses the same size connector eg Right Section Connector T0, T1, T2, T3, T4, T5, T6, T7 ; MK4, BR4, MK5, BR5, MK6, BR 6, MK7, BR7 I assume that the "T" wires correspond to the eight Dout shift registers outputs and the "MK" and "BR" correspond to the 16 Din shift register inputs. 88 note Keyboard For the 88 key version I assume that there will be two 32 key sections (as above, left section) with a 24 key section. Perhaps the 24 key section will use T8 - T15 ie a second Dout register and also reuse some of MK0, BR0 - MK7, BR7 again. (I calculate 3 MK/BR contact sets?) Guess MK0/BR0, MK1/BR1, MK2/BR2. Please let me have your comments. Robin
  17. I want to be sure that I understand the concept, Stryd_one. Are you proposing a look up table that will scale the black note velocities? Therefore in its simplest form this would be a linear scaling. eg any black note velocity midibox output = 0.9 X any keybed black note produced velocity. And will the table method introduce less latency than one of your formulas ?eg Doepfer seem to use a pot to alter the scaling factor during setup. Other Items There are other items which could be included. The various piano pedals. Keyboards Splits. Some these items are appropriate to Pianos, some not. Robin
  18. Thanks Stryd_One for such a comprehensive reply. In QBas 16 X 16 program the SM_VEL_Timer uses FSR2 and IRQ_TMPx. Is it possible to write in C and "force" the code to use FSR2 and IRQ_TMPx? Robin
  19. No, this is a weighted keybed. See link http://www.doepfer.de/home_e.htm , click on LMK4. You will see the reference to black key sensitivity. The keybeds are Fatar TP10 type which are at the top of the Fatar range. I believe that QBas has the TP10 Wood which I think is the version to use with digital pianos to give the most realistic piano feel. How they achieve the compensation is is not made clear, except that is obviously electronic. I have searched more today. There are numerous references to the problem, some with white keys more sensitive. Robin
  20. Here is an extract from the manual of the Doepfer LMK2 Here's the link http://www.doepfer.de/pdf/LMK2_man.pdf It looks as if we need a reduction factor of 0.9 to achieve the Doepfer default value. Robin
  21. I have come across many examples where the black key/white key velocity is cited as a problem. I did not keep any of these references, however. Sometimes it has been impossible to obtain maximum velocity. It is due to the difference in the length of the the lever. Doepfer who sell the Fatar keybeds correct for this in their interface. I will provide some links to show that is a real problem. The impression I have is that there is 10% to 15% difference in relative velocity. There is one way to prove this, by experiment. At the first level this could be done by hitting adjacent B/W keys with the same force. After that it could be made more scientific using weights. Those with Fatar type keybeds could try the first experiment. I can't -- I have no keybed at present. I agree with Stryd_One . The correction should be implemented in Midibox and should be kept out of the PC BTW Here is link to Pianoteq. This demonstrates the extent of the software modelling of the latest software pianos. It does not appear to have B/W key correction. http://www.pianoteq.com/pianoteq_details.php#technology Robin
  22. I have been analysing the QBas Scan Matrix program that is written in ASM. I would like to modify it to incorporate changes due to velocity variations between black and white keys. When reading about Assembler and C, I learned that it is sometimes more efficient to program in C and allow the compiler to compose the the ASM code. The article however, pointed out that C should not be used where interrupts were involved. Looking at QBas 16 X 16 scan matrix I wonder whether there would be scope for writing in the program in C and including asm code where needed. (Using __asm "asm code" __endasm) I would guess that the likely asm code would include would be the following. Manipulations of clocks associated with Dout and Din. Code such as the Function SM_VEL_Timer that uses FSR2 and IRQ_TMPx Question Should I just use asm for sm_fast? or is there some scope for using asm within C? I would appreciate any guidance. Robin
  23. I am looking seriously at building a pc based digital piano. There is a very large choice of programs including 4Front Technologies True Piano Best Service Galaxy 11 Bluethner Digital Model One Modartt Pianoteq National Instruments Akoustik Piano Sampletekk various simulations Steinberg The Grand 2 Synthology Ivory Vienna Symphonic Library Bosendorfer Imperial At present I am studying QBas 16 X 16 scan matrix that is based on Thorsten's work for both scanning and velocity sensing. It is hard going for me but I am beginning to understand the assembler code. I have read that with velocity sensed keybeds there is a difference between the relative velocity (loudness) between the black and white keys. I think that this will be the case for Fatar keybeds. I hope to be able to compensate for the velocity difference with a change to the assembler code. Could QBas or anyone else confirm the black/white key problem. Hopefully, I will eventually be able to understand the program sufficiently to provide additional comments to make the code more understandable to others. I am retired from work and have more time than most. Robin
  24. To see the drawings and specifications for the Fatar keybed range you need a password. Has anyone discovered this password. SounDuke may have some comments to make. Cheers Robin
  25. Here is a link that explains how the Hammond organ drawbars work. http://theatreorgans.com/hammond/drawbar.htm It shows how the sine waves generated by the fundamental and the various harmonics are added together to produce a given sound. Note that the numbers on each drawbar are proportional to the amplitude of the signal. Perhaps someone with more knowledge can suggest how you might synthesise this using midibox methods. If you want a lightweight organ, even leslie speakers are fairly heavy! As in most things in life it depends on what aspects are more important to you, authenticity or weight. Regards Robin
×
×
  • Create New...