****** 14.01.2008: first version - not yet ready 21.01.2008: second version. (DS pic) 02.05.2008: horizontal movement programmed on midihub board (PIC1) 10.05.2008: vertical movement programmed on pulse-velo board (PIC2) 12.05.2008: Thirth code revision PIC2 12.08.2008: serious failure on PIC2: result solenoids burned out... 15.12.2008: horizontal stepper motor power supply replaced. PIC2 still shows very shaky behaviour. 02.05.2009: firmware for PIC 1 and PIC 2 debugged and upgraded. 26.10.2010: redesign of horizontal motor movement. (PIC 1 code) gwr 05.11.2010: Firmware Midihub board V2.0 released. 13.11.2010: Hub firmware V2.3 15.11.2010: New sensor mounted for vertical movement 29.05.2011: Hub firmware V2.4 gwr midi channel : 12 (0-15) basisstemming cornet: 46 (Si b) [basisoktaaf wordt niet gebruikt]. Laagste noot is 52 ********************************** * PIC1: [midi-hub board.] * ********************************** Version 1.xx programmed by Johannes Taelman: ------------------------------------------- 2 analog outs: X17-2 and X17-3 2 used for dimmable lights, midi mapping: notes 117 and 116 velo used for dimming value. [not yet implemented] Must go fully OFF at reception of a note off. 02.05.2008: sofar, only implemented as ON/OFF for lights 6 bits (standard weidmueller outputs) X11-2 mapping on midi note 118 X11-3 mapping on note 119 X12-2 mapping on note 120 X12-3 mapping on note 121 X15-2 mapping on note 122 X15-3 mapping on note 123 stepping motor 1: via parallel bus. RA0, RA1, RA2, RA3, RA4, RA5 = data pic pin 2 : enable B pic pin 3 : enable A pic pin 4 : input 4 to motor controller pic pin 5 : input 3 to motor controller pic pin 6 : input 2 to motor controller pic pin 7 : input 1 to motor controller pic pin 25 - RB4 = strobe bit pic pins 23,22 - RB3, RB2 = input from left and right end sensors, these bits should be read by the controller. The logic level is 1 at rest. When the end position is reached, a zero is read. Zero on both inputs is a fault condition. The rotation is 2 degrees per step. So for 180 degrees we have 90 steps. From the center position to each sensor we should have about 45 steps. This motor should is controlled with midi controller 21. For value 64 it should be in center position, For value 0 it should be extreme left, and for 127 extreme right. The code is autocalibrating on reaching the endpositions. Version 2.00: firmware programmed by Godfried-Willem Raes --------------------------------------------------------- PROTON+ Compiler under MPLAB Here we use an Advantec stepper motor controller for the horizontal movement. X17-2 and X17-3 not used. Lights mapped on notes 121 (blue), 122 (blue), 123 (red) 2 analog sensor inputs (Pepperl+Fuchs) 2 digital inputs for PIR detectors. stepping motor control via Nanotec Controller. Controller 10: horizontal position. controller 31: motor speed controller 32: accelleration ramp controller 71: horizontal calibration controller 90: PIR modes controller 100: midi output modes controller 101: midi output data rate PIC2: [pulse/hold board, 14 outputs] ************************************ 22.01.2008: board soldered, according to circuit on the website. 10.05.2008: Stepper programmed. 12.05.2008: stepper pulse-withs: 20ms going down, 40ms going up. No hold implemented. 13.08.2008: Erroneous behaviour... Code too slow? Stepping motor starts unwinding for no apparent reason. solenoids can stay on indefinitely... (and burn out...) Listens to some controller ? red led liteshow on start-up to be implemented... Firmware needs a revision and improvement. 02.05.2009: Firmware rewritten and reprogrammed. 15.11.2010: Hardware modified: Penny & Giles sensor This requires changes in the firmware. Note/ventiel mapping stuurbaar via controller: (similar to ) Controller 13: 0 = standard mapping all bits = 0 (see lookup in Korn_valves.txt) [implemented] 1 = teoretical map (according to courses) bit 0 set [to do] 2 = mapping table 3 bit 1 set [to do] 3 = mapping table 4 bit 0 and 1 set [to do] bit2 = if set, user combinations for valves are enabled [implemented] if bit2 is set and all lower bits are 0 then: bit3 = 1/2t ventiel on if set (v1) bit4 = 1t ventiel on if set (V2) bit5 = 1 1/2t ventiel on if set (V3) Note: if controller 13 value >= 3, note on commands should not have any effect on the valve bits, since in that case the user is supposed to send the valve combinations prior to sending the note-on command. Also, different valve combinations can be sent whilst a note is sounding, leading to coloring effects and extended techniques. Note-off commands however should always zero all bit outputs for the valves. Harware wiring: Board pulse-hold version3 (same as and , but with correction of bug). The circuit drawing on the website is correct. This board however, is programmed in C now. We have and hold our doubts... pic pin 2 = an0 used as analog Penny & Giles sensor input pic pin 4 = nc Before 15.11.2010 we had: Mercury switch on both pins. When both pins are HIGH, the cornet is in a horizontal position (used for calibration on startup) When an0 is high, inclination is downwards when an2 is high, inclination is upwards when both pins are low, the end position is reached or there is a hardware error: Fault condition. uitgang 3 = white LED lite, hold only, note 126 (on board) [ok] uitgang 4 = white LED lite, hold only, note 127 (on board) [ok] uitgang 5 = 1/2 t ventiel [ok] uitgang 6 = 1 t ventiel [ok] uitgang 7 = 1 1/2t ventiel [ok] uitgang 9 = stepper (vertical movement) uitgang 10 = stepper uitgang 11 = stepper uitgang 12 = stepper The velo value should be determined for optimum reaction of stepping motor. The switching sequence should be in the firmware. Controller 22 steers this motor: at value 82, we should have the horizontal position (pin 2 and 4 high) At value 0, it should go to the lowest vertical position At value 127, it should go to the highest vertical position Callibration to horizontal happens on reception of controller 70. uitgang 13 = lite on cornet, hold only, note 125 [ok] (ex.Harley Light, now white 12-15V tungsten bulb) uitgang 14 = lite on cornet, hold only, note 124 [ok] (blue LED assembly) controller 25: duration of the velo pulse applied to outputs 5,6,7. Default setting: 64 pulse duration range: 0-127ms. [ok] Note-off moet alle velo's onderbreken en de hold's resetten. Program change for fingering lookups. [ TO DO ] Sys-ex for lookups: [to do] PIC3: DS-PIC tone generator *************************** 13.08.2008: TO DO: change waveform. More harmonics. 15.12.2008: drive transformer replaced. 15.11.2010: Unexplainable PIC crashes are persistent. Dit is fundamenteel dezelfde kode als ontwikkeld voor en . Bij note-off, moeten de outputs NUL zijn. Te genereren midi noten: 52 - 94 Reagerend op midi note on + velo/ note off Pitchbend: te implementeren met een bereik van +/- een halve toon (kwarttoon ook aanvaardbaar) noteer: status (224+k), lsb, msb signed!!! msb >= 64 is dus een verhoging van de frekwentie met msb - 64 msb <64 is een verlaging met ABS(msb-64) De pitchbend waarde moet gereset worden bij elke nieuwe noot of note off. De pitchbend moeten kunnen werken tijdens het genereren van een noot. Daarmee kunnen we immers vibrato, slides e.d.m. implementeren in de muziek. controller 1 : wind noise [to be implemented] Controller 7 : volume control. Het geluidsvolume mag niet onder een bepaald minimum komen. Anders is het niet realistisch meer. We kunnen controller 7 ook geheel weglaten en het volume overlaten aan sturing door het velo-byte. Controller 17: amplitude begrenzing - attack value (max. bereik voor de velo's) (dit was bij de volume controller, nr.7) Controller 18: Attack duration (zoals bij en ) controller 19: release [to be implemented] Controller 20: tuning : 0 to + 50 cents - default must be 440Hz 09.12.2007: worked on Bono. For 440Hz, the controller must be set to 5. Value 127 rises the pitch a quartertone. Parameters: amplitude: gemapt op midi-velocity (zie hoger) wave-shape: te onderzoeken. Sys-ex programmeerbare lookups: noot: max.velo(amplitude): wave-symmetry: 46 ... 84 Prog.change 120: p, legato Prog.change 121: mf, legato Prog.change 122: f-ff, legato Prog. change 123: p, sfz Prog.change 124: mf, sfz Prog. change 125: f, sfz Prog. change 126: for later expansion Prog. change 127: no lookups . For measurement and research.