****** 06.10.2008: much of the code can be recycled from the Korn project. 08.10.2008: Ob hardware finished. 08.11.2008: still waiting for firmware 28.12.2008: sound tests with ds-pic only. 18.10.2010: Start revision of firmware for midihub PIC controller 24.10.2010: PIC1 firmware version 2.7 now. midi channel : 14 (0-15) basisstemming hobo: 58 (Si b) PIC1: [midi-hub board.] *********************** Version 1.0: coded by Johannes Taelman 2 analog outs: X17-2 and X17-3 X17-2 used for motor speed. (PWM) (Controller 21). For value 0. motor should be off. The motor is a DC motor. X17-3: dimmable light, mapped on note 127 6 bits (standard weidmueller outputs) X11-2 mapping on motor direction command (100ms pulse) X11-3 mapping on note 122, white LED's on sensor assembly. X12-2 mapping on note 123 X12-3 mapping on note 124, yellow LED strip X15-2 mapping on note 125, yellow LED strip X15-3 mapping on note 126, yellow LED strip The motor should be controlled with midi controllers 21 and 22. For controller 22 value 64 it should be in center/ vertical position, For value 0 it should be extreme inwards, and for 127 extreme outwards. The code should be autocalibrating either on reaching the endpositions or on detection of vertical position. Controller 70 should be implemented to block the instrument in a vertical position, even when ctrl 21 is off. Version 2.0 - 2.7 : coded by Godfried-Willem Raes with hardware modifications. 24.10.2010: 1- Motor control: X17-2: Motor speed PWM X17-3: Motor speed PWM X16-x: analog tilt sensor input Controller 22: ob position: For value 0 it should be extreme inwards, and for 127 extreme outwards. For value 64 it should assume a pure vertical position. 2.- Lights: mapped on notes 0-5. The velo byte controls the flashing speed. Velo=0 is light off, velo=127 is permanent on. Compiler: Proton+ PIC2: [pulse board, 16 outputs, 13 used] **************************************** fingering solenoids, hold only. Noot/klep mapping stuurbaar via controller: (similar to ) Controller 13: 0 = standard mapping all bits = 0 (see lookup in Ob_valves.txt) 1 = teoretical map bit 0 set 2 = mapping table bit 1 set 3 = mapping table bit 0 and 1 set bit2 = if set, user combinations for valves are enabled if bit2 is set and all lower bits are 0 then the note on command wil not activate any coil. We expect the user to control the coils using key pressure commands. 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 after 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. Key pressure: 160 + channel, msb, lsb the highest bit of the 7 bit value in msb controlls the lowest key on the oboe the msb steers the lowest 7 valves The six highest bits of the 7-bit value in the lsb steers the highest valves. Lookup-table for the standard fingerings: weidmueller 16-1, read as bits 0-15: Hex 58 D770 59 5770 60 1770 61 0F70 62 0770 63 3370 64 0370 65 0570 66 0170 67 0070 68 00F0 69 0030 70 0530 71 0660 72 0110 73 0F70 74 0770 75 3370 76 0370 77 0570 78 0170 79 0070 80 00F0 81 0030 82 0130 83 0370 84 0110 85 0F70 86 0070 87 00F0 88 20F0 89 00B0 90 1130 91 1310 92 0650 93 0250 94 22D0 95 4368 96 0328 [for fingering documentation: see website] note that the lowest 3 bits are not used. PIC3: DS-PIC tone generator 30F3010 *************************** 13.08.2008: For we need trapezoidal waves. Dit is fundamenteel dezelfde kode als ontwikkeld voor , en . Bij note-off, moeten de outputs NUL zijn na de release tijd. Te genereren midi noten: 58 - 96 Reagerend op midi note on + velo/ note off Pitchbend: te implementeren met een bereik van +/- een kwarttoon. 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. [ TO DO] 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 : amount of injected noise in the sound. 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. In is geen optor toegepast zoals in . 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 time Controller 20: tuning : 0 to + 50 cents - default must be 440Hz For 440Hz, the controller must be set to 0. Value 127 rises the pitch a quartertone. (This works very well in Bono). Parameters: wave-shape: te onderzoeken. (Trapezoidal) [ for later upgrades and improvements ] 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.