User Tools

Site Tools


how_to_use_midibox_cv_with_a_dout_german

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
how_to_use_midibox_cv_with_a_dout_german [2006/03/27 14:46]
talion
how_to_use_midibox_cv_with_a_dout_german [2009/05/04 15:55]
129.120.95.63
Line 1: Line 1:
 +Midibox CV um dout's erweitern
  
 +Wem zwei bzw. acht Gates zu wenig sind, oder Vintage Drummer (Roland x0x) Triggern will, wird schnell feststellen,​ dass er mit der
 +vorhandenen Hardwareausstattung der Midibox CV nicht auskommt. Die Lösung ist denkbar einfach und wird im Folgenden
 +erläutert.
 +
 +Hardwareseitig -
 +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 -
 +sind einige Änderungen am Code zu machen. Zum einen muss das dout bei einem NoteOn der entsprechenden Note den Gate/​Trigger ​
 +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:
 +
 +Sourcen von Midibox CV herunterladen http://​www.ucapps.de/​mios_download.html und in main.asm nach dieser Stelle suchen:
 +
 +<​code>​
 +USER_MPROC_NotifyReceivedEvent
 + ;; process MIDI event
 + call CV_MIDI_NotifyReceivedEvent
 +
 + ;; for best latency: branch to USER_Tick so that the new CV values
 + ;; will be mapped immediately
 + rgoto USER_Tick
 +</​code>​
 +
 +Mit diesem Code ersetzen:
 +<​code>​
 +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
 + cpfseq MIOS_PARAMETER1,​ ACCESS
 + rgoto USER_MPROC_NRE_NoNoteChn1
 +USER_MPROC_NRE_NoteChn1
 + ;; MIOS_DOUT_PinSet expects pin number in WREG, value in MIOS_PARAMETER1
 + movf MIOS_PARAMETER3,​ W ; velocity == 0: off, velocity != 0: on
 + skpz
 + movlw 0x01
 + movwf MIOS_PARAMETER1
 +
 + movf MIOS_PARAMETER2,​ W ; pin number: note number - 0x24, we start with C-2
 + addlw -0x24
 + andlw 0x7f
 + call MIOS_DOUT_PinSet
 +USER_MPROC_NRE_NoNoteChn1
 + ;; END --- control DOUT pins via Note events at channel #1
 +
 + ;; process MIDI event
 + call CV_MIDI_NotifyReceivedEvent
 +
 + ;; for best latency: branch to USER_Tick so that the new CV values
 + ;; will be mapped immediately
 + rgoto USER_Tick
 +</​code>​
 +
 +
 +Was passiert hier? Midibox CV lauscht nun auf dem ersten Channel ab der Note C-2 auf einen NoteOn und aktiviert bei gespielter Note 
 +den entsprechenden dout. Bei einem NoteOff wird dieser wieder abgeschaltet.
 +
 +
 +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:
 +<​code>​
 +USER_SR_Service_Finish
 + ;; ---[ handle with control surface variables (flashing cursor, etc) ]---
 + goto CS_MENU_TIMER
 +</​code>​
 +
 +Und mit diesem Code ersetzen:
 +<​code>​
 +USER_SR_Service_Finish
 + clrf    MIOS_PARAMETER1 ​     ​
 + movlw ​  ​0x00 ​   ​
 + call    MIOS_DOUT_SRSet ​   ​
 + movlw ​  ​0x01 ​   ​
 + call    MIOS_DOUT_SRSet ​   ​
 + movlw ​  ​0x02 ​   ​
 + call    MIOS_DOUT_SRSet ​    
 + movlw ​  ​0x03 ​   ​
 + call    MIOS_DOUT_SRSet ​    
 +
 + ;; ---[ handle with control surface variables (flashing cursor, etc) ]---
 + goto CS_MENU_TIMER
 +</​code>​
 +
 +Hiermit erreicht man, dass bei jedem Cycle die dout's zurückgesetzt werden - das dauert 1ms. Somit kann man die Drummodule mit 1ms Latenz
 +triggern.
 +
 +
 +
 +Themen im Forum:
 +
 +http://​www.midibox.org/​forum/​index.php?​topic=2701.0\\
 +http://​www.midibox.org/​forum/​index.php?​topic=6333.0
how_to_use_midibox_cv_with_a_dout_german.txt · Last modified: 2009/05/04 15:55 by 129.120.95.63