├── Applications └── ClockDivision_and_RhythmGeneration.md ├── Controller ├── Divide_Controller.c └── README.md ├── Hardware ├── Control Board Schematic.png ├── FrontPanel │ ├── SubHarmonics Front Panel.kicad_pcb │ ├── SubHarmonics Front Panel.kicad_pro │ └── SubHarmonics Front Panel.kicad_sch ├── Graphics │ ├── Input Stage Switching Behaviour.md │ ├── Modified Switching Labelled.png │ ├── Modified Switching in Noise Labelled.png │ ├── Noise 2.png │ ├── Original Switching Labelled.png │ ├── Original Switching in Same Noise Labelled.png │ └── Original Switching in Same Noise Near Threshold Labelled.png ├── PCBs │ ├── SubHarmonics Control Board v1 BoM.txt │ ├── SubHarmonics Control Board v1.brd │ ├── SubHarmonics Control Board v1.sch │ ├── SubHarmonics Main Board BoM v2.txt │ ├── SubHarmonics Main Board v2.brd │ └── SubHarmonics Main Board v2.sch ├── README.md └── SubHarmonics Main Board Schematic v2.png ├── LICENSE.txt └── README.md /Applications/ClockDivision_and_RhythmGeneration.md: -------------------------------------------------------------------------------- 1 | If you reduce the frequency of SubHarmonics' VCO or apply a clock signal to the 'Ext X In' from an LFO or similar source, 2 | you enable a range of opportunities in **Clock Division** and **Rhythm Generation**. 3 | 4 | ## SubHarmonics as a Clock Divider 5 | 6 | The two divider chains of SubHarmonics will offer direct division of the X clock by ratios of: 7 | 8 | 2, 4, 6, 8, 10, 12, 14 & 16 (for the A output) 9 | 10 | and 11 | 12 | 4, 6, 8, 10, 12, 14, 16, & 18 (for the B output) 13 | 14 | These divisions can be set either by the manual m & n divisor controls or by CV inputs. 15 | 16 | Many 'secondary' divisions can be established between A and B outputs. 17 | 18 | For example, with m=2 and n=6 the ratio between X and A is 1:2 and the ratio between X and B is 1:6, 19 | making the ratio between A and B 2:6 (1:3). 20 | 21 | Similarly, other odd integer ratios can be established via this 'secondary' approach, such that all integer ratios up 22 | to ten can be achieved: 23 | 24 |

25 | 26 |

27 | 28 | Similarly, even integer divisions from 10 to 18 can be achieved directly. 29 | 30 | ## Building Rhythm using SubHarmonics 31 | 32 | Given the clock division described above, it is possible to take the divided clock signals and use them to trigger 33 | percussive sounds, making SubHarmonics a Rhythm Generator. 34 | 35 | The complexity of the rhythms generated is greatly increased if logic operations (AND, OR XOR, etc) are performed between 36 | the clock signals (X, A & B) to derive more interesting patterns. 37 | 38 | Remember that SubHarmonics has it's own pair of internal logic modulators, which combine the A and B signals (through OR 39 | and XOR functions). These are combined at the 'ModMix' output and can be selected by the 'Mix' control (or by CV). 40 | This was desiged for use when the ModMix output was interpreted as an 'analog' audio signal (rather than a Boolean switching 41 | signal). Accorindingly, there are a couple of issues for the present 'Rhythm Generator' application: 42 | 43 | 1) Signals from the 'ModMix' output are inverted, running from 0 to -3.75V. To use as conventional (positive true) logic 44 | signals, they must be inverted. I use a Voltage Processor to perform this inversion ('Maths' or any capable processor can 45 | do the job). You can just shift the level (rather than do an inversion) but this results in a different function - interesting 46 | as it will generate a different pattern and potentially useful if you don't have the resource to do the actual inversion. 47 | 48 | 2) There is no real meaning in the mixed signals for intermediate settings of the 'Mix' control in this context; the mix 49 | is only relevant to the output when used in 'analog' applications - so switching between the two modulators is best achieved 50 | with changes between extreme settings of the 'Mix' control (0 or 5V CV) to give either the XOR or the OR modulator. 51 | 52 | The consequence of changing the Mix control is illustrated in this example: 53 | 54 |

55 | 56 |

57 | 58 | The 'scope traces show: 59 | * the X signal (top trace, Yellow) 60 | * the A subharmonic, m=8, (second trace, Cyan) 61 | * the B subharmonic, n=16, (third trace, Blue) 62 | * the Mix output, (bottom trace, Purple) 63 | 64 | The left-hand image shows the response with the OR modulator (Mix control fully clockwise or 5V CV Input) and the right-hand 65 | trace shows the response with the XOR modulator (Mix control fully counter clockwise or 0V CV input). 66 | 67 | Finally, AND **MOST IMPORTANTLY**, the two dividers are independant. This allows you to deliberately change the 'phase' between 68 | the SubHarmonics A & B. This introduces **additional variation in rhythm generation**. 69 | 70 | Variation is achieved by briefly changing the setting of one of the divisors (m or n), which introduces a relative delay 71 | (or advance, depending if you increase or decrease the divisor) relative to the other subharmonic, thereby changing the 72 | 'phase'. 73 | 74 | The process is not deterministic, but you will soon 'get the feel for it'. 75 | 76 | I prefer to adjust the largest divisor (i.e. max(m,n)) by one step for a couple of seconds and listen for the result before returning 77 | to the nominal value. 78 | 79 | There is a video, demonstrating these ideas with two percussion voices, [here](https://youtu.be/6WWO7RoppK4). 80 | 81 | The period, T0, of a pattern generated by mixing subharmonics m & n is given by: 82 | 83 | T0 = Tx.m.n/*gcd(m,n)* 84 | 85 | where Tx is the clock period and *gcd()* is the [greatest common divisor.](https://en.wikipedia.org/wiki/Greatest_common_divisor) 86 | 87 | Some examples are tabulated below: 88 | 89 |

90 | 91 |

92 | 93 | You can easily set up a reasonably complex rhythm source, with triggers from A, B, logical operations on A and B (I like to 94 | use an external AND gate driven by A and B, occasionally with extra inputs - as there is no AND modulator internal to SubHarmonics) 95 | and, of course, ModMix. 96 | 97 | You establish a basic pattern by setting m & n and introduce variation by 98 | * changing the 'phase' and 99 | * switching between the internal modulators. 100 | 101 | --- 102 | 103 | **SubHarmonics** can be used to generate 104 | * melody, using its VCO, 105 | * bass, using its dividers, 106 | * harmony, using its modulators, 107 | * **and rhythm**, using the process described above. 108 | -------------------------------------------------------------------------------- /Controller/Divide_Controller.c: -------------------------------------------------------------------------------- 1 | // Divide_Controller.c 2 | // 3 | // Software for the 'SubHarmonics' Harmonic Division VCO 4 | // m0xpd 5 | // 2023 6 | // https://github.com/m0xpd/SubHarmonics 7 | // 8 | // 9 | // PIC16F676 Configuration Bit Settings... 10 | 11 | #pragma config FOSC = INTRCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN) 12 | #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled) 13 | #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT enabled) 14 | #pragma config MCLRE = ON // RA3/MCLR pin function select (RA3/MCLR pin function is MCLR) 15 | #pragma config BOREN = ON // Brown-out Detect Enable bit (BOD enabled) 16 | #pragma config CP = OFF // Code Protection bit (Program Memory code protection is disabled) 17 | #pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled) 18 | 19 | 20 | #include 21 | #define _XTAL_FREQ 4000000 22 | 23 | int Divide1 = 0; 24 | int Divide2 = 0; 25 | int voltage; 26 | 27 | void ADC_Init() 28 | { 29 | ADCON0 = 0x81; //ADC Module Turned ON and Clock is selected 30 | ADCON1 = 0b100; ; 31 | } 32 | 33 | unsigned int ADC_Read(unsigned char channel) 34 | { 35 | if(channel > 7) //If Invalid channel selected 36 | return 0; //Return 0 37 | ADCON0 &= 0x81; //Clear the Channel Selection Bits 38 | ADCON0 |= channel<<2; //Setting the required Bits 39 | __delay_ms(2); //time to charge hold capacitor 40 | GO_nDONE = 1; //Initializes A/D Conversion 41 | while(GO_nDONE); //Wait for A/D Conversion to complete 42 | return ((ADRESH<<8)+ADRESL); //Return Result 43 | } 44 | 45 | void setDiv1(){ // set Divider 1 46 | if(Divide1&1){ 47 | RC5=1; 48 | } 49 | else{ 50 | RC5=0; 51 | } 52 | if(Divide1&2){ 53 | RC4=1; 54 | } 55 | else{ 56 | RC4=0; 57 | } 58 | if(Divide1&4){ 59 | RC3=1; 60 | } 61 | else{ 62 | RC3=0; 63 | } 64 | } 65 | 66 | void setDiv2(){ // set Divider 2 67 | if(Divide2&1){ 68 | RA5=1; 69 | } 70 | else{ 71 | RA5=0; 72 | } 73 | if(Divide2&2){ 74 | RA4=1; 75 | } 76 | else{ 77 | RA4=0; 78 | } 79 | if(Divide2&4){ 80 | RC0=1; 81 | } 82 | else{ 83 | RC0=0; 84 | } 85 | } 86 | void main(){ 87 | ANSEL=0X00; // all pins are digital 88 | TRISC=0X00; 89 | TRISA=0X00; 90 | // AN6 is analog input for Divide1 Potentiometer 91 | TRISC2 = 1; // on RC2, pin 8 92 | // AN5 is analog input for DIVIDE 2 Potentiometer 93 | TRISC1 = 1; // on RC1, pin 10 94 | ADC_Init(); 95 | 96 | 97 | while(1){ 98 | voltage=ADC_Read(0x6); // Just loop round doing this... 99 | Divide1=voltage/128; 100 | voltage=ADC_Read(0x5); 101 | Divide2=voltage/128; 102 | setDiv1(); 103 | setDiv2(); 104 | __delay_ms(5); 105 | } 106 | 107 | } 108 | 109 | 110 | -------------------------------------------------------------------------------- /Controller/README.md: -------------------------------------------------------------------------------- 1 | # Controller Code for SubHarmonics 2 | 3 | Code for the PIC 16F676 microcontroller is found [here.](https://github.com/m0xpd/SubHarmonics/blob/main/Controller/Divide_Controller.c) 4 | 5 | It was developed in C in Microchip's [MPLAB IDE](https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide). 6 | 7 | The [code](https://github.com/m0xpd/SubHarmonics/blob/main/Controller/Divide_Controller.c) should be placed within an MPLAB project for the 16F676, built and programmed into the device using a suitable programmer. 8 | 9 | I programmed the first PIC using my [PICKit 3](https://www.microchip.com/en-us/development-tool/PG164130) and my old [k1el PIC Programming Adapter](https://hamcrafters2.com/PICPGM.html), but I designed an In-Circuit Serial Programming 10 | Interface into the SubHarmonics Main Board, so you can program directly on the module: 11 |

12 | 13 |

14 | 15 | The PICKit3 supplies easily enough current to power the module; no special setting or modification needs to be made to the module during programming. 16 | 17 | I will try to post a complete MPLAB project (rather than just the C code) and a .hex file in this repository once I've figured out how to do it. 18 | -------------------------------------------------------------------------------- /Hardware/Control Board Schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Control Board Schematic.png -------------------------------------------------------------------------------- /Hardware/FrontPanel/SubHarmonics Front Panel.kicad_pro: -------------------------------------------------------------------------------- 1 | { 2 | "board": { 3 | "design_settings": { 4 | "defaults": { 5 | "board_outline_line_width": 0.09999999999999999, 6 | "copper_line_width": 0.19999999999999998, 7 | "copper_text_italic": false, 8 | "copper_text_size_h": 1.5, 9 | "copper_text_size_v": 1.5, 10 | "copper_text_thickness": 0.3, 11 | "copper_text_upright": false, 12 | "courtyard_line_width": 0.049999999999999996, 13 | "dimension_precision": 4, 14 | "dimension_units": 3, 15 | "dimensions": { 16 | "arrow_length": 1270000, 17 | "extension_offset": 500000, 18 | "keep_text_aligned": true, 19 | "suppress_zeroes": false, 20 | "text_position": 0, 21 | "units_format": 1 22 | }, 23 | "fab_line_width": 0.09999999999999999, 24 | "fab_text_italic": false, 25 | "fab_text_size_h": 1.0, 26 | "fab_text_size_v": 1.0, 27 | "fab_text_thickness": 0.15, 28 | "fab_text_upright": false, 29 | "other_line_width": 0.15, 30 | "other_text_italic": false, 31 | "other_text_size_h": 1.0, 32 | "other_text_size_v": 1.0, 33 | "other_text_thickness": 0.15, 34 | "other_text_upright": false, 35 | "pads": { 36 | "drill": 0.762, 37 | "height": 1.524, 38 | "width": 1.524 39 | }, 40 | "silk_line_width": 0.15, 41 | "silk_text_italic": false, 42 | "silk_text_size_h": 1.0, 43 | "silk_text_size_v": 1.0, 44 | "silk_text_thickness": 0.15, 45 | "silk_text_upright": false, 46 | "zones": { 47 | "45_degree_only": false, 48 | "min_clearance": 0.508 49 | } 50 | }, 51 | "diff_pair_dimensions": [], 52 | "drc_exclusions": [], 53 | "meta": { 54 | "version": 2 55 | }, 56 | "rule_severities": { 57 | "annular_width": "error", 58 | "clearance": "error", 59 | "copper_edge_clearance": "error", 60 | "courtyards_overlap": "error", 61 | "diff_pair_gap_out_of_range": "error", 62 | "diff_pair_uncoupled_length_too_long": "error", 63 | "drill_out_of_range": "error", 64 | "duplicate_footprints": "warning", 65 | "extra_footprint": "warning", 66 | "footprint_type_mismatch": "error", 67 | "hole_clearance": "error", 68 | "hole_near_hole": "error", 69 | "invalid_outline": "error", 70 | "item_on_disabled_layer": "error", 71 | "items_not_allowed": "error", 72 | "length_out_of_range": "error", 73 | "malformed_courtyard": "error", 74 | "microvia_drill_out_of_range": "error", 75 | "missing_courtyard": "ignore", 76 | "missing_footprint": "warning", 77 | "net_conflict": "warning", 78 | "npth_inside_courtyard": "ignore", 79 | "padstack": "error", 80 | "pth_inside_courtyard": "ignore", 81 | "shorting_items": "error", 82 | "silk_over_copper": "warning", 83 | "silk_overlap": "warning", 84 | "skew_out_of_range": "error", 85 | "through_hole_pad_without_hole": "error", 86 | "too_many_vias": "error", 87 | "track_dangling": "warning", 88 | "track_width": "error", 89 | "tracks_crossing": "error", 90 | "unconnected_items": "error", 91 | "unresolved_variable": "error", 92 | "via_dangling": "warning", 93 | "zone_has_empty_net": "error", 94 | "zones_intersect": "error" 95 | }, 96 | "rules": { 97 | "allow_blind_buried_vias": false, 98 | "allow_microvias": false, 99 | "max_error": 0.005, 100 | "min_clearance": 0.0, 101 | "min_copper_edge_clearance": 0.0, 102 | "min_hole_clearance": 0.25, 103 | "min_hole_to_hole": 0.25, 104 | "min_microvia_diameter": 0.19999999999999998, 105 | "min_microvia_drill": 0.09999999999999999, 106 | "min_silk_clearance": 0.0, 107 | "min_through_hole_diameter": 0.3, 108 | "min_track_width": 0.19999999999999998, 109 | "min_via_annular_width": 0.049999999999999996, 110 | "min_via_diameter": 0.39999999999999997, 111 | "solder_mask_clearance": 0.0, 112 | "solder_mask_min_width": 0.0, 113 | "use_height_for_length_calcs": true 114 | }, 115 | "track_widths": [], 116 | "via_dimensions": [], 117 | "zones_allow_external_fillets": false, 118 | "zones_use_no_outline": true 119 | }, 120 | "layer_presets": [] 121 | }, 122 | "boards": [], 123 | "cvpcb": { 124 | "equivalence_files": [] 125 | }, 126 | "libraries": { 127 | "pinned_footprint_libs": [], 128 | "pinned_symbol_libs": [] 129 | }, 130 | "meta": { 131 | "filename": "SubHarmonics Front Panel.kicad_pro", 132 | "version": 1 133 | }, 134 | "net_settings": { 135 | "classes": [ 136 | { 137 | "bus_width": 12.0, 138 | "clearance": 0.2, 139 | "diff_pair_gap": 0.25, 140 | "diff_pair_via_gap": 0.25, 141 | "diff_pair_width": 0.2, 142 | "line_style": 0, 143 | "microvia_diameter": 0.3, 144 | "microvia_drill": 0.1, 145 | "name": "Default", 146 | "pcb_color": "rgba(0, 0, 0, 0.000)", 147 | "schematic_color": "rgba(0, 0, 0, 0.000)", 148 | "track_width": 0.25, 149 | "via_diameter": 0.8, 150 | "via_drill": 0.4, 151 | "wire_width": 6.0 152 | } 153 | ], 154 | "meta": { 155 | "version": 2 156 | }, 157 | "net_colors": null 158 | }, 159 | "pcbnew": { 160 | "last_paths": { 161 | "gencad": "", 162 | "idf": "", 163 | "netlist": "", 164 | "specctra_dsn": "", 165 | "step": "", 166 | "vrml": "" 167 | }, 168 | "page_layout_descr_file": "" 169 | }, 170 | "schematic": { 171 | "legacy_lib_dir": "", 172 | "legacy_lib_list": [] 173 | }, 174 | "sheets": [], 175 | "text_variables": {} 176 | } 177 | -------------------------------------------------------------------------------- /Hardware/FrontPanel/SubHarmonics Front Panel.kicad_sch: -------------------------------------------------------------------------------- 1 | (kicad_sch (version 20211123) (generator eeschema) 2 | (paper "A4") 3 | (lib_symbols) 4 | (symbol_instances) 5 | ) 6 | -------------------------------------------------------------------------------- /Hardware/Graphics/Input Stage Switching Behaviour.md: -------------------------------------------------------------------------------- 1 | # Input Switching Behaviour 2 | 3 | The pulses applied to the SubHarmonics' divider chains are derived from either 4 | * the internal VCO or 5 | * the "Ext X In" input 6 | 7 | via the input stage formed of Q4 & Q5, Q6 and IC6C. 8 | 9 | These active elements amplify the input and form it into a pulse signal, which is saturated at levels of the +/- 12V 10 | power rails (at the collector of Q6) and subsequently half-wave rectified, inverted and attenuated (by D6 and IC6C) 11 | to pulses of approximately 5V. 12 | 13 | The Q4, Q5 stage is a stripped-down version of a conventional transistor [Schmitt Trigger.](https://en.wikipedia.org/wiki/Schmitt_trigger) 14 | 15 | In the present application, the input stage is required to have high sensitivity (a low value of 'HIGH THRESHOLD'), 16 | as the output of the VCO is rather small (~1.5 V peak). Accordingly, a low magnitude of the emitter resistor 17 | R19 = 10R was initially chosen in order to obtain a switching threshold of 0.85V. 18 | 19 | Unfortunately, this 10R resistor destroys almost all the hysteresis which is the defining property of a Schmitt Trigger. 20 | 21 | The images below show the switching behaviour of SubHarmonics with R19 at values of 10R and 470R. 22 | 23 |

24 | 25 |

26 |

27 | 28 |

29 | 30 | You can see that the 10 Ohm resistor results in switching of the 'X output' (Blue trace) at the same (0.85V) point on the upward 31 | and downward transistions of the External X input (Cyan trace). The switching point is shown by the 'scope's "A cursor", which 32 | superimoses a (white) horizontal line on the screen and records a numerical value at top left. The HIGH and LOW THRESHOLDS are 33 | equal and there is no hysteresis. 34 | 35 | The 470 Ohm resistor results in switching at 1.4V on upward transitions of the input (HIGH THRESHOLD = 1.4V, shown by the 'A cursor') 36 | whilst switching on the downward transition occurs at the lower input voltage of ~1.05V (LOW THRESHOLD = 1.05V, shown by the 'B cursor', 37 | which adds a dashed white horizontal line). There is now approximatey 0.35V of hysteresis. 38 | 39 | Although it is possible to further increase the emitter resistor magnitude in other applications (and thereby achieve greater hysteresis), 40 | this is won at the expense of still greater increases in the value of HIGH THRESHOLD. I have found that 470R is the largest 41 | value that can be used in SubHarmonics in order that the signal from the internal VCO is still detected. 42 | 43 | If we deliberately add 350mV (pk-pk) of noise: 44 | 45 |

46 | 47 |

48 | to the external X input, the potential benefits of the Schmitt Trigger action become clear. 49 | 50 | 51 | The modified (R19=470R) circuit operates well in the presence of the noise, 52 | 53 |

54 | 55 |

56 | 57 | with nice, clear, regular transitions of the (Blue) X output trace. 58 | 59 | However, the circuit in original configuration (R19 = 10R) suffers visible disruption of the (Blue) X output 60 | with the same noisy external X input 61 |

62 | 63 |

64 | 65 | This can be made to LOOK more dramatic by reducing the input signal (and keeping the noise amplitude the same). 66 |

67 | 68 |

69 | 70 | Note that it is not the peak 'signal' to noise ratio that is important; rather it is the THRESHOLD to noise ratio. 71 | 72 | What we did most significantly in the figure above was reduce the GRADIENT of the input signal around the 73 | threshold voltage, so we changed the effective timescale; the system spent more time around the decision point 74 | and there was more opportunity for the noise to cause false triggers, which showed up as visible lines on the 'scope. 75 | 76 | # Choosing a value for R19 77 | 78 | So, if you build a 'SubHarmonics' module you have a choice. 79 | * you could opt for the original R19 = 10R value, with the best possible input sensitivity (switching threshold = 0.85V), 80 | but NO Schmitt Trigger action, or 81 | * you could opt for the maximum R19 = 470R value, with a loss of input sensitivity (HIGH THSRESHOLD = 1.4V) and ~0.35V 82 | Schmitt Trigger 'hysteresis', or 83 | * you could opt for a mid-point compromise. 84 | 85 | I have built both versions (R19 = 10R, R19 = 470R). Both work well. 86 | 87 | I used the original (R19=10R) for six months and never noticed any problem with noise immunity on the 'Ext X In' input 88 | which made me wish there was Schmitt Trigger action. However, we are used to having high amplitude, noise-free signals 89 | avaialble from our oscillators, so that's hardly surprising. 90 | 91 | On the other hand, now I've enabled the Schmitt Trigger functionality, the same high amplitude oscillator and clock 92 | signals can still trigger the SubHarmonics module at the 'Ext X In' input but I get the "extra insurance" of 0.35V of 93 | noise immunity at no additional expense (a 470R resistor is no more expensive than a 10R resistor - or even a wire link!). 94 | 95 | So - all things considered - I guess I prefer the revised version with R19 = 470R. 96 | 97 | You must make your own choice. 98 | 99 | # Acknowledgement 100 | 101 | All this interest in the magnitude of R19 and the reinstatement of Schmitt Trigger action was prompted by a question raised 102 | by Yves Chartier, and subsequent discussion. I am grateful for Yves' valuable contribution and support. 103 | -------------------------------------------------------------------------------- /Hardware/Graphics/Modified Switching Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Modified Switching Labelled.png -------------------------------------------------------------------------------- /Hardware/Graphics/Modified Switching in Noise Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Modified Switching in Noise Labelled.png -------------------------------------------------------------------------------- /Hardware/Graphics/Noise 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Noise 2.png -------------------------------------------------------------------------------- /Hardware/Graphics/Original Switching Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Original Switching Labelled.png -------------------------------------------------------------------------------- /Hardware/Graphics/Original Switching in Same Noise Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Original Switching in Same Noise Labelled.png -------------------------------------------------------------------------------- /Hardware/Graphics/Original Switching in Same Noise Near Threshold Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/Graphics/Original Switching in Same Noise Near Threshold Labelled.png -------------------------------------------------------------------------------- /Hardware/PCBs/SubHarmonics Control Board v1 BoM.txt: -------------------------------------------------------------------------------- 1 | Partlist exported from /Users/pauldarlington/Documents/EAGLE/projects/Harmonic Division Oscillator/SubHarmonics Control Board v1.sch at 04/05/2023 07:58 2 | 3 | Part Value Device Package Description POPULARITY SPICEPREFIX 4 | C11 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 5 | C12 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 6 | C13 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 7 | D9 1N5817-T 1N5817-T DO41-7.6 1.0A SCHOTTKY BARRIER RECTIFIER 0 8 | D10 1N5817-T 1N5817-T DO41-7.6 1.0A SCHOTTKY BARRIER RECTIFIER 0 9 | D11 1N5817-T 1N5817-T DO41-7.6 1.0A SCHOTTKY BARRIER RECTIFIER 0 10 | D12 1N5817-T 1N5817-T DO41-7.6 1.0A SCHOTTKY BARRIER RECTIFIER 0 11 | IC11 4051N 4051N DIL16 8-channel ANALOG MULTIPLEXER 15 12 | IC12 4051N 4051N DIL16 8-channel ANALOG MULTIPLEXER 15 13 | JP4 PINHD-1X20 1X20 PIN HEADER 6 14 | JP5 PINHD-1X20 1X20 PIN HEADER 6 15 | LED1 LED3MM LED3MM LED 16 | LED2 LED3MM LED3MM LED 17 | LED3 LED3MM LED3MM LED 18 | LED4 LED3MM LED3MM LED 19 | LED5 LED3MM LED3MM LED 20 | LED6 LED3MM LED3MM LED 21 | LED7 LED3MM LED3MM LED 22 | LED8 LED3MM LED3MM LED 23 | LED9 LED3MM LED3MM LED 24 | LED10 LED3MM LED3MM LED 25 | LED11 LED3MM LED3MM LED 26 | LED12 LED3MM LED3MM LED 27 | LED13 LED3MM LED3MM LED 28 | LED14 LED3MM LED3MM LED 29 | LED15 LED3MM LED3MM LED 30 | LED16 LED3MM LED3MM LED 31 | R30 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 32 | R31 220k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 33 | R32 10k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 34 | R33 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 35 | R34 220k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 36 | R35 10k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 37 | R36 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 38 | R37 220k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 39 | R38 470 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 40 | R39 470 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 41 | R40 470 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 42 | R41 470 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 43 | R42 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 44 | R43 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 45 | R44 33k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 46 | R45 1M R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 47 | R46 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 48 | R47 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 49 | R48 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 50 | R49 2k2 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 51 | R50 2k2 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 52 | SK1 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 53 | SK2 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 54 | SK3 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 55 | SK4 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 56 | SK5 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 57 | SK6 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 58 | SK7 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 59 | SK8 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 60 | SK9 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 61 | SK10 THONKICONN_JACK THONKICONN_JACK WQP-PJ301M-12_JACK 62 | VAR1 10k VARISTOR C025-024X044 NTC Varistor 63 | VAR2 10k VARISTOR C025-024X044 NTC Varistor 64 | VAR3 10k VARISTOR C025-024X044 NTC Varistor 65 | VAR4 10k VARISTOR C025-024X044 NTC Varistor 66 | VR1 100k 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 67 | VR2 100k 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 68 | VR3 1M 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 69 | VR4 100k 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 70 | VR5 100k 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 71 | VR6 100k 9MM_SNAP-IN_POT_ 9MM_SNAP-IN_POT 9mm vertical snap-in pot, Alpha / Panasonic style 72 | -------------------------------------------------------------------------------- /Hardware/PCBs/SubHarmonics Main Board BoM v2.txt: -------------------------------------------------------------------------------- 1 | Partlist exported from /Users/pauldarlington/Documents/EAGLE/projects/Harmonic Division Oscillator/SubHarmonics Main Board v2.sch at 22/10/2023 07:06 2 | 3 | Part Value Device Package Description MF MPN OC_FARNELL OC_NEWARK POPULARITY SPICEPREFIX 4 | C1 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 5 | C2 1u CPOL-EUE2.5-5 E2,5-5 POLARIZED CAPACITOR, European symbol 16 C 6 | C3 10u CPOL-EUE2.5-5 E2,5-5 POLARIZED CAPACITOR, European symbol 16 C 7 | C4 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 8 | C5 22u CPOL-EUE2.5-5 E2,5-5 POLARIZED CAPACITOR, European symbol 16 C 9 | C6 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 10 | C7 22u CPOL-EUE2.5-5 E2,5-5 POLARIZED CAPACITOR, European symbol 16 C 11 | C8 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 12 | C9 0.1u C-EU050-025X075 C050-025X075 CAPACITOR, European symbol 29 C 13 | C10 2n2 C-EU050-030X075 C050-030X075 CAPACITOR, European symbol 9 C 14 | C11 1u CPOL-EUE2.5-5 E2,5-5 POLARIZED CAPACITOR, European symbol 16 C 15 | D1 1N5817 SCHOTTKY-DIODEDO35-7 DO35-7 Schottky Diode 3 16 | D2 1N5817 SCHOTTKY-DIODEDO35-7 DO35-7 Schottky Diode 3 17 | D3 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 18 | D4 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 19 | D5 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 20 | D6 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 21 | D7 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 22 | D8 1N4148DO35-7 1N4148DO35-7 DO35-7 DIODE 58 23 | IC1 40106N 40106N DIL14 Hex SCHMITT TRIGGER 4 24 | IC2 4051N 4051N DIL16 8-channel ANALOG MULTIPLEXER 15 25 | IC3 4051N 4051N DIL16 8-channel ANALOG MULTIPLEXER 15 26 | IC4 PIC16F676P PIC16F676P DIL14 14-Pin, Flash-Based 8-Bit CMOS Microcontroller MICROCHIP PIC16F676-I/P 9760512 54K2829 0 27 | IC5 LM324N LM324N DIL14 OP AMP 9 28 | IC6 LM324N LM324N DIL14 OP AMP 9 29 | IC7 4017N 4017N DIL16 COUNTER/DIVIDER 2 30 | IC8 4017N 4017N DIL16 COUNTER/DIVIDER 2 31 | IC9 4013N 4013N DIL14 Dual D FLIP FLOP, set/reset 4 32 | IC10 4001N 4001N DIL14 Quad 2-input NOR 1 33 | IC11 LM13700N LM13700N DIL16 Dual OTA with buffers 34 | IC12 78LXX 78LXX VOLTAGE REGULATOR 6 35 | JP1 PINHD-1X6 1X06 PIN HEADER 79 36 | JP2 PINHD-1X20 1X20 PIN HEADER 6 37 | JP3 PINHD-1X20 1X20 PIN HEADER 6 38 | Q1 2N3906 2N3906 TO92 PNP Transistor 11 39 | Q2 BC556A BC556A TO92-EBC PNP Transistror 0 40 | Q3 BC546A BC546A TO92-EBC NPN Transistor 0 41 | Q4 BC546A BC546A TO92-EBC NPN Transistor 0 42 | Q5 BC546A BC546A TO92-EBC NPN Transistor 0 43 | Q6 BC556A BC556 TO92-EBC PNP Transistror 2 44 | R1 10 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 45 | R2 10 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 46 | R3 10k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 47 | R4 270k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 48 | R5 10k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 49 | R6 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 50 | R7 6k8 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 51 | R8 220k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 52 | R9 220k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 53 | R10 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 54 | R11 1k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 55 | R12 47k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 56 | R13 1k5 R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 57 | R14 1M R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 58 | R15 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 59 | R16 1M R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 60 | R17 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 61 | R18 22k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 62 | R19 See Text R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 63 | R20 22k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 64 | R21 33k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 65 | R22 10k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 66 | R23 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 67 | R24 47k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 68 | R25 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 69 | R26 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 70 | R27 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 71 | R28 100k R-EU_0204/7 0204/7 RESISTOR, European symbol 79 R 72 | TR1 100k BOURNS_3362P_TRIMMERP BOURNS_3362P_TRIMMER 3362 Series 73 | TR2 1k TRIM_EU-B64Y B64Y POTENTIOMETER 0 74 | X2 2510- 2510- PAK100/2500-10 3M (TM) Pak 100 4-Wall Header 3M 2510-6002UB 9838244 46F4725 0 75 | -------------------------------------------------------------------------------- /Hardware/README.md: -------------------------------------------------------------------------------- 1 | # Hardware 2 | This folder contains hardware descriptions of the 'SubHarmonics' module. 3 | 4 | The information is presented as EAGLE 'sch' and 'brd' files for the two PCBs (in the [PCBs folder](https://github.com/m0xpd/SubHarmonics/tree/main/Hardware/PCBs) ) and as a small Kicad project for the front panel (in 5 | the FrontPanel folder). 6 | 7 | SubHarmonics is implemented in two modules, each of which has its own PCB. There is a Main Board, hosting the majority of the electronics and 8 | a Control Board, which contains all the front panel components including the division indicator LEDs and associated decoders. 9 | 10 | ## Main Board Description 11 | 12 | The Main Board schematic is available [here](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/SubHarmonics%20Main%20Board%20Schematic%20v2.png) (or by clicking on the graphic below) 13 | 14 |

15 | 16 | 17 |

18 | 19 | The VCO was inspired by the ['Shapes VCO' design by Moritz Klein](https://www.youtube.com/watch?v=QBatvo8bCa4), subsequently used in his VCO for the [Erica Synths Edu DIY VCO](https://www.ericasynths.lv/shop/diy-kits-1/edu-diy-vco/). Since developing 'SubHarmonics', I have learned that the core of the 40106 VCO was not a Klein original, but had been proposed earlier by Mark Shaner (a.k.a. "Synthmonger"), who published the idea [here](https://electro-music.com/forum/topic-28799.html) back in 2008. 20 | 21 | The output of this 'Shaner' 40106 VCO - or the input from an external 'X' source - is applied to the 'Divider_In' input of the SubHarmonic Dividers, the input stages of which produce a 0 : 5V pulse at node 'X' on the schematic. There is a detailed description of the derivation of this pulse signal, including 22 | discussion of options to set shared emitter resistor R19 to either maximise input sensitivity or enable a degree of noise immunity, [here.](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/Graphics/Input%20Stage%20Switching%20Behaviour.md) 23 | 24 | The system was designed around 'available materials' I found lying around my bench - in this case, mainly CD4000-series CMOS logic devices. 25 | 26 | The divisions in each of the two channels are achieved by a CD4015 (Decade counter) and a CD4051 (Analog Mux/Demux) in conventional 27 | configuration. The divisor is set by a PIC microcontroller, which reads a potentiometer or a CV input signal and decodes the voltage (0-5V) into 28 | one-of-8 settings for the dividers. 29 | 30 | A further divide-by-2 stage, implemented in a CD4013 (D-type SR flip-flop) applied to the outputs of the dividers adds another octave of division 31 | (necessary to implement the m=2 setting on the A channel). 32 | 33 | The outputs of the dividers, A and B (and their complements, not_A and not_B) are fed to two modulators, implemented in a quad NOR package (CD4001). 34 | 35 | The results of the OR and XOR operations are mixed in a voltage-controlled crossfader, implemented in half an LM13700. 36 | 37 | The [schematic](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/SubHarmonics%20Main%20Board%20Schematic%20v2.png) and [BoM](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Main%20Board%20BoM%20v2.txt) show LM324 quad op-amps. These work fine in this application, but you can substitute the ubiquitous TL074 if you prefer. 38 | 39 | The Main Board includes an In-Circuit Serial Programming (ICSP) interface (JP1) to facilitate programming the PIC. 40 | 41 | There is a [.sch](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Main%20Board%20v2.sch) file, a [.brd](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Main%20Board%20v2.brd) file and a [BoM](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Main%20Board%20BoM%20v2.txt) for the Main Board in EAGLE format in the [PCBs folder](https://github.com/m0xpd/SubHarmonics/tree/main/Hardware/PCBs). 42 | 43 | ## Control Board Description 44 | 45 | The Control Board schematic is available [here](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/Control%20Board%20Schematic.png) (or by clicking on the graphic below) 46 |

47 | 48 | 49 |

50 | 51 | In addition to controls, inputs and outputs, the Control Board hosts the division indicator LEDs and decoders to control these (which again use 52 | CD4051 analog demuxers). 53 | 54 | As well as to CV inputs for Pitch and FM, there are CV inputs for the divisors m and n and for the modulation mix. These last three are designed 55 | to operate over a range of 0 to 5V, but are protected such that voltages outside these limits will cause no damage. 56 | 57 | A 0V input on the modulation mix CV input gives the XOR modulation and a 5V input gives the OR modulation (which is spectrally richer, as it includes the 58 | harmonics of A and B as well as the sum and difference harmonics). An intermediate control voltage gives a mix of both modulation types. 59 | 60 | There is a [.sch](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Control%20Board%20v1.sch) file, a [.brd](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Control%20Board%20v1.brd) file and a [BoM](https://github.com/m0xpd/SubHarmonics/blob/main/Hardware/PCBs/SubHarmonics%20Control%20Board%20v1%20BoM.txt) for the Control Board in EAGLE format in the [PCBs folder.](https://github.com/m0xpd/SubHarmonics/tree/main/Hardware/PCBs) 61 | 62 | The Main and Control boards are joined by two 20-way 0.1 inch pitch headers. These have been specified with electrical redundancy (several pins are 63 | unused) to provide mechanical stability and security in assembling the module. 64 | 65 | 66 | The completed PCBs are seen in the photo below, which shows the Main Board from both sides and the Control Board from the 'top' side (the front panel 67 | components all are mounted on the 'bottom' side). 68 |

69 | 70 | 71 | 72 |

73 | 74 | ## Front Panel 75 | 76 |

77 | SubHarmonics Front Panel 78 | 79 |

80 | 81 | A simple Kicad project defining a Front Panel for the module is available in the [FrontPanel folder.](https://github.com/m0xpd/SubHarmonics/tree/main/Hardware/FrontPanel) 82 | -------------------------------------------------------------------------------- /Hardware/SubHarmonics Main Board Schematic v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m0xpd/SubHarmonics/d5fe7d4088630697cd0fa463e93f25ff565f8afe/Hardware/SubHarmonics Main Board Schematic v2.png -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public 411 | licenses. Notwithstanding, Creative Commons may elect to apply one of 412 | its public licenses to material it publishes and in those instances 413 | will be considered the “Licensor.” The text of the Creative Commons 414 | public licenses is dedicated to the public domain under the CC0 Public 415 | Domain Dedication. Except for the limited purpose of indicating that 416 | material is shared under a Creative Commons public license or as 417 | otherwise permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the 425 | public licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SubHarmonics 2 | 3 | 4 | 'SubHarmonics' is a Eurorack module which generates two squarewaves ('A' and 'B') which are sub-harmonics of another signal, 'X'. 5 | 6 |

7 | 8 |

9 | 10 | 11 | The signal X is either 12 | i) generated by the module's internal Voltage Controlled Oscillator 13 | or 14 | ii) is derived from an external signal applied to the module's 'Ext X In' input. 15 | 16 | The sub-harmonics are generated by hardware dividers, which divide the frequency of X by integer divisors (m, n) of 2, 4, 6, 8, 10, 12, 14, 16 or 18, 17 | giving the unit a range of a little over four octaves (18 ≈ 2 4.17 ). 18 | 19 | These divisors (m := f x / f A , n := f x / f B ) are voltage controlled - they can be set by potentiometers or by control voltages applied from external sources. 20 | 21 | It is seen that the signals A and B are themselves related in frequency by 'the ratio of two small integers' (m/n). So, in addition to each being 22 | sub-harmonics of X, the ratio between A and B often falls at a musically useful interval; 23 |

24 | 'SubHarmonics' generates harmony as well as bass. 25 |

26 | 27 | 28 | Other applications of 'SubHarmonics' in Clock Division and Rhythm Generation are described [here.](https://github.com/m0xpd/SubHarmonics/blob/main/Applications/ClockDivision_and_RhythmGeneration.md) 29 | 30 | 31 | 32 | ### Internal Modulators 33 | 34 | SubHarmonics includes a pair of internal modulators, which combine the A and B signals together (through an OR and an Exclusive OR operation) to 35 | exploit and develop the harmonic relationship between A and B into a richer sound. The OR modulation is equivalent (for these signals A, B) to simple 36 | amplitude modulation, as performed by (e.g.) an AND gate, whilst the Exclusive OR modulation implements the balanced modulation of A with B (as in a 37 | 'ring modulator'). I described the equivalence of OR and AND gates as modulators for the special class of 'antipalindromic' inputs (such as the present 38 | A and B signals) at tedious length [here.](http://m0xpd.blogspot.com/2023/03/logic-gates-and-modulation-curiosity.html) 39 | 40 | The two different modulation results are combined in a voltage-controlled crossfader circuit (controlled by a potentiometer or an external CV input) 41 | to give a single output which offers a choice OR A MIX of the modulation types at the 'Mod Mix' output. 42 | 43 | An introductory video, demonstrating SubHarmonics' features, is available [here](https://youtu.be/j_IT1Ucp6_4) 44 | 45 | ### Setup 46 | 47 | There are two presets that need adjustment on completion of the module to setup for use. Both are located on the topside of the Main Board. 48 | 49 | TR2 (a multi-turn 1k preset) controls the 1V/Octave tracking. It should be set by connecting the module to a reliable source of pitch CV signals and monitoring the outputs. I use octave outputs from a BeatStep Pro (you can use a keyboard with CV pitch outputs or simply a known voltage source) and listen to the pitch change. I find it easy to tune octaves by ear but, if you are uncertain, use a tuner or frequency counter. 50 | 51 | TR1 (a single turn 100k preset) controls the balance of the modulation mix crossfader. To set it properly requires access to an oscilloscope to see the 'Mod Mix' output waveform. If you have no access to a 'scope, set TR1 to about 60kΩ. 52 | 53 | If you do have a 'scope, set the divisors to m=2, n=6 (using the front panel controls) and the frequency to an arbitrary value (around 300Hz). View the 'A' and 'Mod Mix' outputs on the 'scope. Adjust TR1 until you see these waveforms when you put the Mix control at extreme ends of its travel (or, equivalently, apply 0V or 5V CV signals to the Mix input): 54 | 55 |

56 | 57 |

58 | 59 | (the yellow trace is the 'A' output, which stays the same in this setup process and is included only as a 'reference', the blue trace is the 'Mod Mix' output, which will change when you adjust TR1) 60 | 61 | [If you do not see this waveform on the ModMix output with these settings, it may be due to the phase relationship between the dividers - if this is the case, change the value of 'n' using the potentiometer all the way up to 18 and back to 6 and see if the phase is re-aligned. This is perfectly normal and is not a fault - there is another 'mode' of the system in the m=2, n=6 configuration to that illustrated above.] 62 | 63 | Note that the 'Mod Mix' output is inverted (it runs 0 to approx -4V); there wasn't a spare op-amp stage to restore polarity after the crossfader. 64 | This doesn't matter in ordinary applications; the ear is insensitive to the inversion and it will sound the same! There are, however, some implications of this inversion which are important to the 'time-domain' applications discussed [here.](https://github.com/m0xpd/SubHarmonics/blob/main/Applications/ClockDivision_and_RhythmGeneration.md) 65 | 66 | 67 | 68 | ### Miscellaneous Details 69 | 70 | The sub-harmonic generation and all signal processing is performed in hardware. 71 | 72 | A small (PIC) microcontroller is used to read the potentiometers and CV inputs and set the dividers. 73 | 74 | Details of the two PCBs and front panel are provided in the [Hardware](https://github.com/m0xpd/SubHarmonics/tree/main/Hardware) folder. Code for 75 | the 16F676 PIC is presented in the [Controller](https://github.com/m0xpd/SubHarmonics/tree/main/Controller) folder. 76 | 77 | SubHarmonics is: 78 | 12HP wide, 79 | requires 38mm behind the front panel (with the power header fitted) and 80 | draws 13.5mA from the 12V rail and 5mA from the -12V rail. 81 | 82 | The design is published under a Creative Commons CC BY-SA 4.0 [License](https://github.com/m0xpd/SubHarmonics/blob/main/LICENSE.txt). 83 | --------------------------------------------------------------------------------