Jump to content

anakin

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by anakin

  1. Hi Just for contribute to the forum, I was able to code something for this with a help from a friend of mine something like this: ///////////////////////////////////////////////////////////////////////////// // Local variables ///////////////////////////////////////////////////////////////////////////// // Store Program Change Number int CurrentPC = 0; // Define higher program change number #define MAXPCNUM 63 ///////////////////////////////////////////////////////////////////////////// // This function is called by MIOS when an button has been toggled // pin_value is 1 when button released, and 0 when button pressed ///////////////////////////////////////////////////////////////////////////// if (pin == 13 && pin_value == 1) { CurrentPC++; if (CurrentPC > MAXPCNUM ) CurrentPC = MAXPCNUM; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); } if (pin == 14 && pin_value == 1) { CurrentPC--; if (CurrentPC < 0 ) CurrentPC = 0; MIOS_MIDI_BeginStream(); MIOS_MIDI_TxBufferPut(0xC0); // Program Change Event MIOS_MIDI_TxBufferPut(CurrentPC); // Program Change Number MIOS_MIDI_EndStream(); } What do you think about? Maybe not so elegant... Hope this will help someone... bye Anakin
  2. Hi I'm looking for an help with something like this... I'm building a very simple pedalboard midi controller ( just built) using midio128 as app. It work good, only send note_on note_off messages depending on key pressed. Obviously I change for my needings the ini files for range of notes. Now I would like to expand it adding two addition buttons: one for increase program change and one for decrease it. I think it is quite clear that I can't use the ini file for do this because it is not implemented in the code, so I need to code something new. I want to use Midio128 as it is so simple and direct, but I don't know how to do this in the code ( and where...) Any suggestions? I'm considering also to use other applications maybe in C ( maybe easier for me to code in) but using something like ain64_din128_dout128_v2_0 I need to make also modification in the hardware ( put all analogs to ground). I look also this post ( yes, I used the search!!!) that is exactly what I need but I can't understand how to do... http://www.midibox.org/forum/index.php/topic,427.0.html Any help or suggestion? Bye Anakin
  3. anakin

    SM_fast

    Hi Tk and thank you :) It's not a matter of changing the speed ( it is just as fast!) it is only for try to understand how it work as I'm bit new to asm. So, what does the code I posted stands for? I can't understand the reason of it and what does it mean. Ok , it is for the debounce counters but I don't know how it means, maybe it's better to search at google and then return here! For the difference between sm_fast and sm_slow thank you very much I understand ( so for example if I add a pot in a free ain port, it will stop the scanning of the matrix , right?) thanks! Anakin
  4. anakin

    SM_fast

    I'm studying the application SM_fast ( asm version) and I have some question on it, just for tryin' to understand the way it work. 1)I'm searching where I can change the "scanning speed" of the keyboard: I think it is on main.asm here: movlw 10000 & 0xff movwf MIOS_PARAMETER1 movlw 10000 >> 8 movwf MIOS_PARAMETER2 movlw 0x00 call MIOS_TIMER_Init call SM_Init movlw 0x00 movwf SM_CH_STATUS movlw 0 call MIOS_AIN_NumberSet call MIOS_AIN_UnMuxed movlw 4;7 call MIOS_AIN_DeadbandSet it is right? If no where it is ? 2)What's the difference in Sm-Fast and Sm_slow in performance? What's the difference in managing the scan matrix? Thank you for your help! Anakin
  5. Hi Tk and thank you for your reply! If I remove the first core , I don't have the problem. If I upload a dummy app on second core with merger enable all work good ( I upload the slow version of SM) So I think maybe is a hardware issue, maybe with the matrix I'm using, I have to do some tests on it, surely I can open a new treat if is a hardware compatibility problem, but it is very strange as if remove the first core the apps seems to work good! Bye Anakin p.s. I have some question about SM_fast but I post in a separate treat.
  6. Hi and thank you for your reply Yes, I just did this and also phisical disconnect it and it change and work good. The problem seems to be the merge... that's why my question... bye
  7. Hi First of all excuse me there's the possibility that this is a question just submitted... I try to find in the forum but without results. :) I'm using two midiboxes connected together with the classic tx and rx ports in this way: first midibox with standard Midibox64 , the midiout of it ( port TX 25 ) connected with the midi in port ( port RX 26 ) of second pic, it work on channel 1 Second midibox running the scan matrix application of TK ( fast version) in an old keyboard ( midi merge function enable in the code) ,work on channel 1. I'm suffer this kind of problem: Few times it doesn't put out the Note_off message and the results is that note always stay ON and I need to re-push the key for do the Note_off. I notice that it happens when I move some pots in the first midibox, or when I'm playin' hard ( e.g. slides) so this is my question. Is it possible that the problem is caused by a kind of "data overflow" from the input of the second pic? What's about the performance of the midi merge feature? Is there any kind of filter on it? I don't think Midibox link will help in my case because I think this isn't a loop problem: what do you think about? And what's about the sharing of the same channel: is this a problem? Thank you very much for your help Anakin
  8. Hi and thank you! ;) you got right! Now I solved the problem! I forgot that the code is an example, so now I add the function in the INIT and all work good. Excuse me for my "not seriously searching" in the forum but it was not a matter of searching, but a matter of understanding that I must "ADD", not "modify" Thank you! Anakin p.s. I use ASM because I'm starting to try to understand it instead of C. ???
  9. Hi and thank you for your help... but still not solved the problem!!! I try to explain: TK made 4 differents codes for working with scan matrix, 2 in C and 2 in ASM each are divided in "simple" and "fast". Assuming that I'm working with the one "fast" and in ASM, the link you gave me is for C code but doesn't matter! I go to MIOS Functions Reference (ASM Version) and take a look at the mergerGet and mergerSet function... I take a look at file called mios.h in code sm_example2_v1a and I find "something" that refer to midi merger function: ;; ========================================================================== ;; General constants ;; ========================================================================== ;; used by MIOS_MIDI_Interface* MIOS_MIDI_INTERFACE_COMMON EQU 0x00 MIOS_MIDI_INTERFACE_TO_HOST EQU 0x01 ;; used by MIOS_MIDI_Merger* MIOS_MIDI_MERGER_DISABLED EQU 0x00 MIOS_MIDI_MERGER_ENABLED EQU 0x01 MIOS_MIDI_MERGER_MBLINK_EP EQU 0x02 MIOS_MIDI_MERGER_MBLINK_FP EQU 0x03 But code has also other files and these are general constant... so where ( meaning in which file and where in the code) I have to change parameters for enabling it? Where's my mistake? Thank you Bye Anakin
  10. Hi friends I'm working with example codes for scanning keyboard matrix made by TK ( and re-worked by QBAS) codes are sm_example1_v2a, sm_example1_v1a and Sm_16x16 Vel. I need to enable the midi merge-serial function for cascade 2 cores via midi in-out ports: I think the code to modify is the file Mios.h ( but i'm not sure about) but I don't know where and how as i'm not familiar with ASM. ??? Can you help me please? Bye Anakin
  11. Hi Tk Another time I want to thank you very much for your help! Today I will try to do something, write down some code and try it in my hardware. Best regards :) Anakin
  12. Hi Maybe for the reason that english is not my default language :) i'm not sure I understand the stuff... We have 2 method for write the eeprom of the core: 1 using mios studio or other software and send a .syx file and this a thing that I already can do... 2 using the application by itself for doing it... is this what we are talking about? If so, what do you mean with "parse the sysex stream"? So, if I understand well (just before trying to understand code you wrote) this is a "template" for doing what we are talking about, also if it is complicated, it is C, so it's better for me ;D The main reason why I don't use the "generic MIOS download feature" (case 1 the two method), is that this is not so fast... and I'm using my hardware based Midibox for live situation, it is difficult to explain but I have to change some "presets" 2-3 times every night and the first method is not so easy, the other reason is that writing down everytime the value of the pots (in hexadecimal) and write them in the file "preset.asm", recompile and then put is into the core it's not a simple thing... Best and optimal thing: decided a "pot situation", do like a snapshots and store them into the eeprom, so then I can resume them when I want. Are you agree? I'm mistaken in something? Best regards Anakin
  13. Hi and thank you for your help It's OK, I will try to code something using the EEPROM write function. Just another question: You tell me that it's better to suspend the midi data when we are writing on eeprom... maybe you are think about a "special state", a "programming state" in which midi messages are not recognize or are you thinking about something else? Bye Anakin
  14. Hi I'm doing some tests using the application sm_example2_v1b that is coded in ASM. The apps for me is quite difficult also because i'M not able to code in asm but quite well in C. question: is it possible to add some lines in C inside the code in asm? in which way? Do I have to create a new file called , for example main.c and code inside or I have to do in other way? thank you for your precious help! Anakin
  15. Hi Tk and thank you for your reply I'm not 100% sure that you understand the first part of my question... I try to explain in other way, with examples. 1) I have a a code and it is made by some "subcodes" like main.C , main.H ( some in C some in ASM) when the compiler do the job it brings all and create the .hex file; I have a feature that is wrote in preset.asm and I want to change it, I do and I would like to upload a new code ( I know quite well the method for do it ) so when I compile, the compiler brings ALL the codes (main.asm, main.C, preset.asm ecc ecc) and create the .hex. Just for asking and understanding, I want not to touch the application wrote in the pic ( 99% made by the main.c and other files) but I would like ONLY to re-write the files stored in the eeprom with the file preset.asm, but how to do it? 2) I think you understand well my question regarding other ways to change the values stored in the eeprom , but maybe I don't understand... Is it possible to change the files stored in the eeprom without using the .hex and mios studio ecc ecc but with the application running and use special feature for doing it ( I'm thinking about a "special state" where the application go to some kind of "listen state" where it doesn't work but only work for doing the thing I need)? Is it difficult to do? some kind of help? Thank you very much! Anakin
  16. Hi to all I'm using and application (part wrote down in C and part in Assembler) and in particular it has the "classic" MAIN.C, MAIN.H (for managing with pots and buttons ecc ecc) and I have also a file called Preset.asm that work in this way: It write some values in the eeprom of the PIC when I flashed it with the .sys file and in the "Main.c" there a shortcut for those values: so when I press one din it read the values in the eeprom and some Control Change will assume those values (pots related to those CC will not work)... it work like a normal "preset" bank. The "preset.asm" is like this: list p=18f452 radix dec org 0xf00000 ; eeprom base address db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x50, 0x30, 0x20, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x30, 0x20 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x70, 0x40 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50 db 0x00, 0x30, 0x20, 0x70, 0x60, 0x40, 0x50, 0x20 db 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 db 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x40 db 0x50, 0x40, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40 END this is my questions. The only way to change the value of the preset is to make a new .sys file and put it into the core... is there a way to compile a new .sys file without include on it the Main.c , Main.h ecc ecc ,but only the preset.asm so doesn't matter if the main.c is different... after the flashing of the PIC nothing will change in Main.c ecc ecc, the only thing the will change is the preset.asm file.... any idea? In your opinion there's a way to change the values of the eeprom without re-flashing the pic? E.G. make a "dedicated" din that if you press it together with another din, the system will "read" some pots value and report it to the eeprom...some kind of "user preset" that I can change without sending a new .sys file. Thank you for your help! Anakin
  17. I see what you mean now... You'll need to make (fairly minor) modifications to the matrix scannig functions, to use QBAS's code. Any Idea?
  18. Yes I know that diodes are "one way street" :) ---great methaphore!!!--- I'm telling that in my case, the difference between my hardware and the hardware that own Mr Qbas (thanks 1000 times for your help!!!) isn't only in diodes and numbers of column and rows...but is in the general way of managing the two contacts x keys...if you can take I look at the schematics of qbas keyboard and mine, I'm sure you'll think so! Suggestions? Bye Anakin
  19. Hi Stryd_one I attached two schematics because I own all of the two hardware from fatar, the only difference is in the polarity of diodes. Doesn't matter if you choose the DF or DR version, the difference with the hardware used by mr Qbas is in the connections that go to dout module and connection that go to din module. I try the app like sm_ example ecc ecc and they work good!!! :) What the matter? If I try the apps of qbas it doesn't work and the reason stand in the connection and general way of managing the matrix. In FATAR you have T0, T1, T2 ecc that goes to dout and they increase when you increase the note: ex C1=T0, C#1=T1 and so on until T7 and then restart from T0... In QBAS hardware used (like you can see here http://i119.photobucket.com/albums/o139/qbas_photos/diagram_matrix.jpg ) connections that go to dout don't increase when you increase the note: are the connection to din that increase when you increase notes. This is the main difference and I don't know how to solve! If I had only one contact x keys this won't be a problem, just swap the the column with row and surely work, but I have 2 contact x keys going to din module and I'm now in a black point... Any suggestions? Anakin tp8df.pdf tp8dr.pdf tp8df.pdf tp8dr.pdf
  20. Hi to everyone I'm doing a lot of work in tryin' to solve a big problem I have with the application for managing the velocity with the scan matrix. I try to explain I own a FATAR hardware matrix 8x8 with double contact in each key for velocity. I try all the apps of example find in the download area and the work good meaning that when a press keys I can see in midiox the right output. I wonder if someone have experience in tryin' to use the apps sm_16x16_vel in a FATAR keyboards because I find a big difference in the hardware way to manage the double contact in key. In the qbas schematics you have che connections going to dout module named I, II, III ecc and the connections going to din module named a, b, c, d, e, ecc. In the qbas hardware going on from C1, C#1, D#1, D ecc the connections going to dins change (a-b, c-d, e-f ecc) and the connection to dout stay the same ( I ) this obviously for the first 6 notes and then restart using "II" In FATAR keyboard are the connections to dout modules that change when notes increase, so (named the connection like qbas named) in C1 you have "I" to dout and a-b to din , in C#1 you have "II" and c-d to din and so on. There's a way to connect this keyboard and using this app, or there's the needing to make changes in the code first of all? Is there, please, any person who experienced this and solved? If so, in which way? Thank you very much for the help! Anakin p.s. I'm quite sure that polarity of diodes are not important in this case, but...i'm a newbie...so....
  21. Hi and thank you for your answer. I can tell what i can't understand about. 1) Can you please tell me a place (in web) where i can Understand how a matrix work? 2) I have Fatar tp-80 that is a 61keys keyboard with scan matrix and touch sensivity. Is there a link there to understand how to connect it to a core module ( I think using dins and douts). Where can i find a schematics of connection to midibox? In this link in the doepfer page there's a schematics of how my keyboard work : http://www.doepfer.de/DIY/Matrix_61.gif 3) Is there the application of QBAS suitable for my keyboard? Thank you for your help! Anakin
  22. Hi to all! I red all the post in this forum regarding the possibility of controlling and use midibox project with standard production keyboard that is working in matrix and that are touch sensitive. I think there's really the needing to clarify all the because for me ( and for sure, for other people) this is not clear. My questions: Many people have the availability of standard keyboards from old synths or organs or bought from somewhere (90% FATAR keyboard). these are working in matrix of 8x8 and are touch sensitive. Is there any preconfigured code already wrote for manage this kind of stuff? What's the matter with the DIN multiplexers? There's the need to change them? Please I'm very confused about...can someone please direct me in the right way? Thank you very much! Anakin p.s. maybe this could be a good starting point to work together in this way and posts our results here!
  23. Ok Thank you very much...i'll choose simple midimerger instead of midilink...I've done some test and returned to me with no loops at all...so that's great! Bye! Anakin
  24. Hi I made some tests, some good, some bad, but, at last I can't make the Mblink work as I want. Let's try to explain: I made basically 3 kind of tests: 1) the first was to made the change that Mr. Thorsten suggested me in the ain64_din128_dout128_v2_0 as described above and in the core 2 configured as forwarding point (core 1 running merger with pic18f452 so midiout of it go to midiin of core 2, core 3 running midio ) and make also the change to midio configuration enabling mblink_ep because is the last core and after this there's the midiout connected to a PC running midiox for testing. RESULT: Midimessages from the two midiin connected to the merger (core1) don't go out and midiox only read midimessages from core 2 and core 3 2) Second was to change only the configuration of midio changing from mblink_ep to "enable" (simple merge). RESULT:Midimessages from the two midiin connected to the merger (core 1) go out and I can read them in midiox, but when a generate midimessages with core 2 (e.g. moving a pot) , together with every CC (or others) messages I get also an additional message "undefined" STATUS 249 ( I think is a dedicated message for the midilink function) 3)Third was to change only the configuration of midio changing from mblink_ep to "mblink_fp". RESULT:Midimessages from the two midiin connected to the merger (core 1) go out and I can read them in midiox, but when a generate midimessages with core 2 (e.g. moving a pot) , together with every CC (or others) messages I get also an additional message "undefined" STATUS 249 ( I think is a dedicated message for the midilink function) and the same is when I generate messages with core 3. CONCLUSIONS: WHERE IS MY ERROR? Any suggestion? The only thing that was not involved with my changes is the merger...do I have to make some changes also in this? Thank you all for the help you can give me!!! Anakin
×
×
  • Create New...