// SRG added this baud rate clock:and I made a connector for pin D7, near the midi connector, which is connected to the TI serial link output, so the UCF connection file GateManPoly.ucf changed here:
//-----------------------------------------------------------
// 16x baud clock fixed at MIDI rate 115.2 or 19.2 Kbaud (clk = 50MHz)
//-----------------------------------------------------------
always @ ( posedge clk )
begin
// 27 states for 115200 baud (27.126736111...)
// if ( baudcounter == 8'd26 )
// 163 states for 19200 baud (162.7604167)
// if ( baudcounter == 8'd162 )
// 326 states for 9600 baud (2x163)
if ( baudcounter == 9'd325 )
begin bclk <= 1'b1; baudcounter <= 0; end // one less because we stat at 0
else
begin bclk <= 1'b0; baudcounter <= baudcounter + 8'b1; end
end
# DCE serial connectionsThe midi signal comes from a years old but great Yamaha S90 synthesizer, set to analog midi output, with a 4 meter cable.
##NET "TTY_In" LOC = "R7" | IOSTANDARD = LVTTL ;
NET "TTY_In" LOC = "D7" | IOSTANDARD = LVTTL ;
To program the synth I've made a Tcl/Tk
script which allows all parameters to be accessed from a window with
sliders:
gatemanedit1.tcl
The above link now points to an updated version which allows sending
of any paramter value by pressing enter after typing a new value in
some edit box, and it has a button to send all parameter
changes.
I´ve made this change to the code of the builtin micro processor to make it recognize NoteOFF commands so that for certain keyboards stuck notes are prevented.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This section will:
;; toggle the gate signal if it's on.
;; turn gate on if it's off.
;;
NOTE_ON:
;SET_SYNTH:
INPUT s8, TRANSPOSE ; sample the value of TRANSPOSE port
COMPARE DATAbyte2, 00 ; is velocity zero?
JUMP NZ, PLUCK ; If not, we pluck a string
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
NOTE_OFF:
INPUT s8, TRANSPOSE ; sample the value of TRANSPOSE port
RELEASE:
; "Release" refers to when the synth key is released.
After assembling and rebuilding the Xilinx .bit file, the change
appears to work.