Jump to content

moonskin

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by moonskin

  1. We're still working on it ;) At this stage, we're still working on the scan matrix code that will scan up to 32 x 32 which could also be 64 x 16 ie 1024 switch points. Our hope is that we can produce something that could scan a large console with second touch. If we can get that working satisfactorily, we will start to think about configuration. We will need to consider how much data can be stored and how we get it in efficiently. It must necessarily be a different beast to midio128 because it will only scan inputs - the DOUTs are used to activate columns in the matrix. It should contain at least OnOff and Toggle functionality in some form. It is definitely NOT a case of rewriting midio128 for matrix scanning. I'm currently trying to work my way through the perl script that converts the .ini file and understand where that data ends up in midio128 because we're also working on the custom Midio128FM (For Miditzer). It may be that this might be useful research for the scan matrix (or not) or there may be other useful ways of processing configuration data that I don't know about yet. So it is moving but only slowly with so much else happening atm. Cheers Graham
  2. I've been pursuing my own solution to the wiring issue. The idea is basically to have carrier board for 32 diodes that connects to the 4 ribbon cables from a DIN board and provides a 34 pin IDC ribbon cable output. The two extra wires in the ribbon carry the 5V from the DIN board and a single connection from one DOUT pin for the common. The 34 way cable goes to a small spreader board where the ribbon is plugged in and the board routes to pins to solder connecting wires. This will allow me to wire a keyboard (for example) to two spreader boards locally and then connect them back to two diode boards (which connect to the two DINs and one commoned DOUT pin for my 64 way row or one DIN and one DOUT pin if you are using 32 wide rows). I'll make the diode boards stackable (and in pairs) so that the ribbons from the DINS can have multiple connectors and loop from board to board. The DOUTs can be connected to points on the diode boards as appropriate. I hope that the end result will be that stops/keyboards etc will have wire bundles locally to the small spreader boards. The spreader boards (2 per row) will connect with 34 way ribbon cable to the diode boards. The diode boards will be in a stack, daisy-chained to the DINS with the core and DOUT close by. If this works, it will mean the major part of the wiring is local bundles to the spreader boards. Almost everything else is via ribbon cable with connectors. It should make it easily expandable and also easy to disconnect any section. You could use exactly the same boards for Midio128 if you wanted to by replacing the diodes with links. (I'm also learning board layout with Eagle and have first drafts of the artwork done. The diode boards are 3x4 inches and the spreader boards are less than half that size. I believe it is easier to work in small, manageable chunks!) Cheers Graham
  3. I'm wondering if anyone has tried/considered using photointerruptors? They do need a power supply. I think the transistor side would be fine with MIDIBox. The pedal would only need a vane on it to interrupt the beam so you get complete non-contact switching and also adjustment by moving the vane rather than the electronics. Here is a basic how-to. In the circuit on this page, the 1k resistor is already present on the DIN board. http://www.makingthings.com/teleo/teleo/cookbook/ir_interruptor.htm Cheers Graham.
  4. I'm trying to teach myself how the scan matrix examples work and was wondering if someone could give me a start here. In the button handler code there is this... ;; shift 8 times SM_BUTTON_HANDLER_SHIFT 7 SM_BUTTON_HANDLER_SHIFT 6 SM_BUTTON_HANDLER_SHIFT 5 SM_BUTTON_HANDLER_SHIFT 4 SM_BUTTON_HANDLER_SHIFT 3 SM_BUTTON_HANDLER_SHIFT 2 SM_BUTTON_HANDLER_SHIFT 1 SM_BUTTON_HANDLER_SHIFT 0 Is this section getting values from 8 pins of the DIN for 1 of DOUT or is it getting 1 DIN pin for each of the 8 DOUTs? Is the loop below looping through the DIN pins or the DOUTs? ;; loop 8 times incf SM_BUTTON_COLUMN, F, BANKED movlw 8-1 cpfsgt SM_BUTTON_COLUMN, BANKED rgoto SM_ButtonHandler_InnerLoop Which of DIN or DOUT is the column and which is the row? (What I want to get to eventually is 64 DIN pins with 8 DOUT's to scan organ keyboards/stops with debouncing.) Thanks Graham
  5. Perhaps I should clarify my thinking here. While I'm quite happy to use a matrix for myself, the educator in me is not so sure it would be useable for many. MIDIO128 works so well because it is so straightforward to connect. I'm thinking about this aspect along with the fact that MIDIO128 is a mature, stable app. This gives a strong platform on which to base modifications as well as retaining all the benefits. It strikes me that with MIDIO128, there is plenty of left-over power to be utilised. I also think about the fact that not all keyboards can be adapted to matrix wiring whereas matrix wired keyboards should be able to be wired with a common bus. I also like the idea of 4x64 because it retains the ease of wiring - 1 DOUT pin to each common and 1 DIN to the same note on each keyboard via a diode and still allows common bus keyboards to be used. I would also think it fairly straightforward to develop a PC board to hold the diodes with connectors for ribbon cables to sit between keyboards and DINs. So it's not actually the software implementation that concerns me but rather the ease of connection that is my focus. I'll keep thinking and investigating all the possibilities - keeps Alzheimers away so I'm told. ;D Cheers Graham
  6. Thanks for the info. I've been looking at the various matrix scan ideas and was thinking over a scheme where two lots (2x61 note manuals per lot) of switches feed into a single set of DINs via diodes. The common lines would be switched (via a single pin and buffers) in USER_Tick and a flag set or unset so that the MIDI status byte could be changed to a different channel value appropriately before sending . eg the ini file sets the first two manuals to channels 1 & 2 then if the flag is set for the alternate manuals, add 2 to the status byte so it comes out on channels 3 and 4 (Note numbers are constant on each lot of manuals - only the channels change.) This would give me effectively a 128x2 matrix albeit a rather specialised one, but one much easier to wire than a 16x16 one. The trick will be whether I can swap the DIN status for each lot in and out from storage in a reasonable time within USER_Tick. That's why I need to understand how they are stored. I'll keep working away at the code to see if I can get my head around it. Thanks again. Graham
  7. I've been trying to work my way through understanding some aspects of MIDIO128. I'm particularly interested in adding some code to USER_Tick. My understanding is that USER_Tick follows all the other routines but I'm not clear about the timing relationship between this and debouncing. On a single scan, if any DINs have changed then debouncing is started. When USER_Tick is returned to next, has the debouncing finished or does it take several "trips" through USER_Tick before this is completed? My second question: is there any documentation that I can look at to see where and how the DIN pin status is stored and retrieved in order for it to be checked for changed pins? I've looked at where I think it is in the code but I can't seem to get what is happening. ??? Thanks Graham
  8. Is it possible to add extra data to the .ini file in MIDIO128. I want to attach 3 pots to the analog inputs on the core. I can modify the MIDIO128 code to read the three pots OK but I would like to be able to set the MIDI channels for the three pots' outputs in the .ini file rather than hard code them. This is so that users only have to be able to make entries in the .ini file rather than delve into the code itself. The pots are for two swells and crescendo on Miditzer and users will need to set the channels in relation to their existing hardware. Thanks Graham
  9. Thanks so much Thorsten. If I understand correctly the code below is what I need. Regards Graham MIDIO_DIN_Toggle ;; when on: toggle between 0x00 and the DIN value defined in dump ;; when off: send nothing IFSET TMP1, 0, rgoto MIDIO_DIN_NotifyChangeEnd ;; get the state of the DOUT corresponding to the current DIN movf MIDIO_CURRENT_DIN, W call MIDIO_DOUT_Get movwf TMP1 ;; save new status of DIN and send rcall MIDIO_DIN_Hlp_SaveStat rgoto MIDIO_DIN_Send
  10. Hi I'm new to MIOS and it's a long time since I've worked with any assembler but it's great fun. I'm trying to develop code so that the MIDI command sent by a button will always act in the opposite sense to it's corresponding DOUT. This is so the MIDI software on a PC (Miditzer) will get an off code when the DOUT is active and vice versa. The DOUTs will be controlled from the PC and not using FORWARDIO I have three questions if someone would be kind enough to answer them. 1) When I get the state of a DOUT with MIDIO_DOUT_Get and it returns zero, does that mean that the DOUT pin is at 0V or is it in the non-active state (as defined in the .ini file, which could be 5V if invert is enabled)? 2) What variable holds the invert flag if I need to take it into account? 3) I lifted the code that gets the DIN status from another section on the MIDIO128 code. Is this piece of code the one to use? Also, my congratulations on the quality of the code. I use it as an example for my students of high qualty internal documentation. Thanks Graham Here is my code so far: MIDIO_DIN_Toggle ;; when on: toggle between 0x00 and the DIN value defined in dump ;; when off: send nothing IFSET TMP1, 0, rgoto MIDIO_DIN_NotifyChangeEnd ;; get the state of the DOUT corresponding to the current DIN movf MIDIO_CURRENT_DIN, W call MIDIO_DOUT_Get movwf TMP1 ;; TMP1 will now be 0 or non-zero depending on state of DOUT ;; I'm not sure which way around it is ;; get DIN status call MIDIO_FSR_DINValue movff MIDIO_CURRENT_DIN, WREG call MIOS_HLP_GetBitORMask andwf INDF0, W ;; W will now be 0 if the DIN will send an ON command ;; when it gets to MIDIO_DIN_Send iorlw TMP1 ;; W now holds 0 if the values are the both 0 ;; so the next statement may be bnz rather than bz - not sure which ;; If an OFF DOUT returns zero then we need bz to turn it on. ;; we may also need to consider whether any INVERT flags are set by the .ini file ;; or whether the DOUT_Get takes that into account. bz MIDIO_DIN_Send ; skip the toggle ;; toggle appr. bit in DIN_VALUE register call MIDIO_FSR_DINValue SET_BSR MIDIO_BASE movf MIDIO_CURRENT_DIN, W, BANKED call MIOS_HLP_GetBitORMask xorwf INDF0, F MIDIO_DIN_Send
  11. Hi all I intend to use MIDIIO128 using touch sensors to send Midi to software. I will have LEDs connected to DOUT to indicate the state of the stops. The software will send MIDI whenever a stop is changed, either in response to DIN messages or from it's combination action to the DOUTs. The question I have is for the following scenario... Action 1 I switch a stop off with the touch sensor. The LED turns off because the software sends the code to turn the DOUT off because it has turned a stop off in reponse to the DIN. (FORWARDIO is NOT enabled.) Action 2 I press a piston so the software sends a MIDI code from it's combination action to turn that stop on so the LED turns on. Am I correct in assuming that the LED is on but the DIN is off (the most recent state from the touch sensor). The next touch will be a turn on command and it would need another touch to turn it off. If this is the case, is it possible to have the "toggle state" of a DIN respond to a change in DOUT such that it is always opposite. ie a touch on the DIN will always send a MIDI code to do the opposite to the DOUT state? I understand that enabling FORWARDIO reflects the DIN state in the DOUT. Is it possible to do the opposite? ie software sends midi to DOUT which changes toggle state of DIN to the opposite regardless of what state the DIN was already in. I assume that this may invole a rewrite of parts of the MIDIIO128 code. How is the current toggle state of the DIN stored? Can I change it? Sorry for so many questions. If they have been answered elswhere then please point me there as I haven't been able to find them. Many thanks Graham
×
×
  • Create New...