This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
how_to_use_midibox_cv_with_a_dout [2006/03/27 13:21] talion |
how_to_use_midibox_cv_with_a_dout [2009/05/06 14:23] (current) 129.120.95.63 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Midibox CV um dout's erweitern | + | **Midibox CV to extend "DOUTs"** |
- | Wem zwei bzw. acht Gates zu wenig sind, oder Vintage Drummer (Roland x0x) Triggern will, wird schnell feststellen, dass er mit der | + | Anyone who considers 2 or 8 gates too few, or wants to trigger vintage drum synths/modules (Roland x0x style), may find the existing hardware of the Midibox CV insufficient. The solution is simple. |
- | vorhandenen Hardwareausstattung der Midibox CV nicht auskommt. Die Lösung ist denkbar einfach und wird im Folgenden | + | |
- | erläutert. | + | |
- | Hardwareseitig - | + | **Hardware** |
- | wird ein dout Modul benötigt, welches mit J8 des Coremodules verbunden wird. Ein doutx4 stellt 32 Gates/Trigger bereit. An dieser | + | |
- | Stelle der Hinweis: Da hier ohne Optokopller oder Transistoren gearbeitet wird, unbedingt darauf achten das die Gates/Trigger nicht | + | |
- | "belastet" oder gar kurz geschlossen werden. | + | |
- | Softwareseitig - | + | A dout module is needed, which will be connected to J8 of the coremodule. A doutx4 provides 32 gates/triggers. |
- | sind einige Änderungen am Code zu machen. Zum einen muss das dout bei einem NoteOn der entsprechenden Note den Gate/Trigger | + | Some advice at this point: because it will be built without any optocouplers or transistors to protect the DOUT, it is essential not to apply any external voltage to the Gates/Triggers, and also to prevent short circuit. |
- | aktivieren, zum anderen kann man optional die Dauer des Impulses, unabhängig der Länge der Note, auf 1ms reduzieren. Hintergrund | + | |
- | ist die eigenart mancher Drummer. So lösen die x0x-Boxen (606, 808, 909 ...) den Sound nicht bei Anschwellen der Gatespannung, sondern | + | |
- | beim wieder Abflachen aus. | + | |
- | DOUT AKTIVIEREN: | + | **Software** |
- | Sourcen von Midibox CV herunterladen [[http://http://www.ucapps.de/mios_download.html|http://www.ucapps.de/mios_download.html]] und in main.asm nach dieser Stelle suchen: | + | A few changes have to be made to the sourcecode. On the one hand, the dout has to activate the gate/trigger on receiving the appropriate NoteOn: on the other hand you may want to reduce the duration of an impulse to 1ms |
+ | independent of the Note duration. | ||
+ | Here as background is the trigger characteristic of some drum machines. The x0x-boxes (606,808,909...) trigger the sound at decrease of voltage at the gate instead of increase.\\ //IE at the trailing edge of the +ve pulse rather than the leading edge? I'm not sure if this is correct.\\ [[http://en.wikipedia.org/wiki/CV/Gate#Gate|Wikipedia]] says that Roland and Sequential gear is V-Trig {normal low, set high to trigger} and Moog, Korg and Yamaha is S-Trig {normal high, set low to trigger}. The [[http://66.102.7.104/search?q=cache:IBefydaCrJIJ:www.kentonuk.com/kmanualspdf/psoloman.pdf+%22V-trig%22+edge&hl=en&gl=au&ct=clnk&cd=5&client=firefox|manual]] for the Kenton Pro Solo MIDI-CV converter says: " ... Most synths / sequencers & drum machines will want the Positive edge pulse, but a few require the Negative edge instead. (e.g. Korg Monopoly) .. " I've also seen written elsewhere that the 606 trigger out is V-Trig, but the 707 internal triggering for it's own voices is S-Trig\\ Also, if the trailing edge was the trigger, how would gates and envelopes work ie ADSR when AD happens at leading edge, D as gate is held high, and R when gate drops low? - Bunsen// | ||
+ | |||
+ | __Activate dout:__ | ||
+ | |||
+ | Download the source of Midibox CV at http://www.ucapps.de/mios_download.html and search for the following in | ||
+ | "main.asm": | ||
+ | <code> | ||
USER_MPROC_NotifyReceivedEvent | USER_MPROC_NotifyReceivedEvent | ||
;; process MIDI event | ;; process MIDI event | ||
Line 27: | Line 27: | ||
;; will be mapped immediately | ;; will be mapped immediately | ||
rgoto USER_Tick | rgoto USER_Tick | ||
+ | </code> | ||
- | Mit diesem Code ersetzen: | + | Replace it with: |
+ | <code> | ||
USER_MPROC_NotifyReceivedEvent | USER_MPROC_NotifyReceivedEvent | ||
+ | |||
+ | ;; BEGIN --- control DOUT pins via Note events at channel #1 | ||
+ | movf MIOS_PARAMETER1, W ; Note Off -> Note On with velocity 0 | ||
+ | andlw 0xf0 | ||
+ | xorlw 0x80 | ||
+ | bnz USER_MPROC_NRE_NoNoteOff | ||
+ | USER_MPROC_NRE_NoteOff | ||
+ | bsf MIOS_PARAMETER1, 4 | ||
+ | clrf MIOS_PARAMETER3 | ||
+ | USER_MPROC_NRE_NoNoteOff | ||
movlw 0x90 ; check for Note On at channel #1 | movlw 0x90 ; check for Note On at channel #1 | ||
- | IFNEQ MIOS_PARAMETER1, ACCESS, rgoto USER_MPROC_NRE_NoNoteChn1 | + | cpfseq MIOS_PARAMETER1, ACCESS |
+ | rgoto USER_MPROC_NRE_NoNoteChn1 | ||
USER_MPROC_NRE_NoteChn1 | USER_MPROC_NRE_NoteChn1 | ||
;; MIOS_DOUT_PinSet expects pin number in WREG, value in MIOS_PARAMETER1 | ;; MIOS_DOUT_PinSet expects pin number in WREG, value in MIOS_PARAMETER1 | ||
Line 54: | Line 66: | ||
;; will be mapped immediately | ;; will be mapped immediately | ||
rgoto USER_Tick | rgoto USER_Tick | ||
+ | </code> | ||
+ | What happens here? Midibox CV is listening to the first channel (beginning from tune C-2) for a NoteOn and | ||
+ | activates the corresponding dout. A NoteOff deactivates the dout. | ||
+ | __Define the number of connected DOUT shift registers:__ | ||
- | Was passiert hier? Midibox CV lauscht nun auf dem ersten Channel ab der Note C-2 auf einen NoteOn und aktiviert bei gespielter Note | + | If you're using more than one DOUT shift register, you must also change this code in "main.inc" to reflect the number of shift registers: |
- | den entsprechenden dout. Bei einem NoteOff wird dieser wieder abgeschaltet. | + | <code> |
+ | ;; initialize the SRIO driver | ||
+ | movlw 0x01 | ||
+ | call MIOS_SRIO_NumberSet | ||
+ | </code> | ||
+ | To set it to the maximum (16), just replace the code with this: | ||
+ | <code> | ||
+ | ;; initialize the SRIO driver | ||
+ | movlw 0x0F | ||
+ | call MIOS_SRIO_NumberSet | ||
+ | </code> | ||
- | 1MS ERWEITERUNG FÜR VINTAGE DRUMMER: | ||
- | Wer Vintage Drummer triggern will muss diesen Code zusätzlich in die main.asm einsetzen. Nach folgender Stelle suchen: | + | __1ms Extension For Vintage Drum Machines:__ |
+ | Those who want to trigger vintage drums have to modify the sourcecode as follows: | ||
+ | Search for the following: | ||
+ | <code> | ||
USER_SR_Service_Finish | USER_SR_Service_Finish | ||
;; ---[ handle with control surface variables (flashing cursor, etc) ]--- | ;; ---[ handle with control surface variables (flashing cursor, etc) ]--- | ||
goto CS_MENU_TIMER | goto CS_MENU_TIMER | ||
+ | </code> | ||
- | + | Replace it with: | |
- | Und mit diesem Code ersetzen: | + | <code> |
USER_SR_Service_Finish | USER_SR_Service_Finish | ||
- | clrf MIOS_PARAMETER1 | + | clrf MIOS_PARAMETER1 |
movlw 0x00 | movlw 0x00 | ||
call MIOS_DOUT_SRSet | call MIOS_DOUT_SRSet | ||
Line 81: | Line 109: | ||
call MIOS_DOUT_SRSet | call MIOS_DOUT_SRSet | ||
movlw 0x03 | movlw 0x03 | ||
- | call MIOS_DOUT_SRSet | + | call MIOS_DOUT_SRSet |
;; ---[ handle with control surface variables (flashing cursor, etc) ]--- | ;; ---[ handle with control surface variables (flashing cursor, etc) ]--- | ||
goto CS_MENU_TIMER | goto CS_MENU_TIMER | ||
+ | </code> | ||
+ | |||
+ | This leads to a reset of all DOUTs once per cycle - this lasts 1ms. So the drum modules can be triggered | ||
+ | with a 1ms latency. | ||
+ | |||
+ | MIDIbox SEQ allows up to 48 digital outputs as this type of trigger. [[http://ucapps.de/midibox_seq_options.html]] | ||
+ | __Changing the midi channel:__ | ||
- | Hiermit erreicht man, dass bei jedem Cycle die dout's zurückgesetzt werden - das dauert 1ms. Somit kann man die Drummodule mit 1ms Latenz | + | If you want the DOUT triggers to respond to MIDI events on a channel other than #1, replace instances of "0x80" and "0x90" with the following values: |
- | triggern. | + | |
+ | * Channel 1: 0x80, 0x90 | ||
+ | * Channel 2: 0x81, 0x91 | ||
+ | * Channel 3: 0x82, 0x92 | ||
+ | * Channel 4: 0x83, 0x93 | ||
+ | * Channel 5: 0x84, 0x94 | ||
+ | * Channel 6: 0x85, 0x95 | ||
+ | * Channel 7: 0x86, 0x96 | ||
+ | * Channel 8: 0x87, 0x97 | ||
+ | * Channel 9: 0x88, 0x98 | ||
+ | * Channel 10: 0x89, 0x99 | ||
+ | * Channel 11: 0x8A, 0x9A | ||
+ | * Channel 12: 0x8B, 0x9B | ||
+ | * Channel 13: 0x8C, 0x9C | ||
+ | * Channel 14: 0x8D, 0x9D | ||
+ | * Channel 15: 0x8E, 0x9E | ||
+ | * Channel 16: 0x8F, 0x9F | ||
+ | __Forum articles:__ | ||
- | Themen im Forum: | + | [[http://www.midibox.org/forum/index.php/topic,13478.0.html]] -- Information on receiving on ALL channels, information on excluding specific DOUT pins from being reset with the 1ms trigger extension code |
- | [[http://http://www.midibox.org/forum/index.php?topic=2701.0|http://www.midibox.org/forum/index.php?topic=2701.0]] | + | [[http://www.midibox.org/forum/index.php?topic=2701.0]] (German)\\ |
- | [[http://http://www.midibox.org/forum/index.php?topic=6333.0|http://www.midibox.org/forum/index.php?topic=6333.0]] | + | [[http://www.midibox.org/forum/index.php?topic=6333.0]] (German) |