@@ -87,7 +87,7 @@ Documentation
87
87
=============
88
88
API documentation for this library can be found in `PunkConsole_API <https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media/pseudo_readthedocs_punkconsole.pdf >`_.
89
89
90
- .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/docs /Stereo_Punk_Console_test.png
90
+ .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media /Stereo_Punk_Console_test.png
91
91
92
92
The CedarGrove PunkConsole emulates an astable square-wave oscillator and
93
93
synchronized non-retriggerable one-shot monostable multivibrator to create
@@ -117,55 +117,55 @@ two analog input pins. The sequencer is controlled by an internal list of
117
117
notes that select the oscillator frequency; pulse width is potentiometer
118
118
controlled.
119
119
120
- Minimum and maximum input ranges (may be further limited by the MPU):
121
- pulse_width: 0.05ms to 5000ms
122
- frequency: 1Hz to >4MHz
120
+ - Minimum and maximum input ranges (may be further limited by the MPU):
121
+ - pulse_width: 0.05ms to 5000ms
122
+ - frequency: 1Hz to >4MHz
123
123
124
- Practical input ranges for audio (empirically determined):
125
- pulse_width: 0.5ms to 5ms
126
- frequency: 3Hz to 3kHz
124
+ - Practical input ranges for audio (empirically determined):
125
+ - pulse_width: 0.5ms to 5ms
126
+ - frequency: 3Hz to 3kHz
127
127
128
128
The CedarGrove Punk Console algorithm uses PWM frequency and duty cycle
129
129
parameters to build the output waveform. The PWM output frequency is an
130
130
integer multiple of the oscillator frequency input compared to the one-shot
131
131
pulse width input:
132
132
133
- ` pwm_freq = freq_in / (int((pulse_width) * freq_in) + 1) `
133
+ `` pwm_freq = freq_in / (int((pulse_width) * freq_in) + 1) ` `
134
134
135
135
The PWM output duty cycle is calculated after the PWM output frequency is
136
136
determined. The PWM output duty cycle is the ratio of the one-shot pulse
137
137
width and the wavelength of the PWM output frequency:
138
138
139
- `pwm_duty_cycle = pulse_width * pwm_freq `
139
+ ``pwm_duty_cycle = pulse_width * pwm_freq ``
140
+
140
141
141
- Notes:
142
142
Planned updates:
143
143
144
- For non-PWM analog output, use `audiocore ` with a waveform sample in the
145
- `RawSample ` binary array, similar to the `simpleio.tone() ` helper. The output
144
+ For non-PWM analog output, use `` audiocore ` ` with a waveform sample in the
145
+ `` RawSample `` binary array, similar to the `` simpleio.tone() ` ` helper. The output
146
146
waveform's duty cycle will be adjusted by altering the contents of the array,
147
147
perhaps with `ulab ` to improve code execution time. The
148
- `audiocore.RawSample.sample_rate ` frequency is expected to be directly
148
+ `` audiocore.RawSample.sample_rate ` ` frequency is expected to be directly
149
149
proportional to the original algorithm's PWM frequency output value, calculated
150
- from the `sample_rate ` divided by the length of the `audiocore.RawSample ` array
150
+ from the `` sample_rate `` divided by the length of the `` audiocore.RawSample ` ` array
151
151
(number of samples).
152
152
153
153
MIDI control: A version that uses USB and/or UART MIDI is in the queue. Note
154
- that the `PunkConsole.mute ` property could be used for note-on and note-off.
155
- `note_in_example.py ` shows how muting can be used for individual notes.
154
+ that the `` PunkConsole.mute ` ` property could be used for note-on and note-off.
155
+ `` note_in_example.py ` ` shows how muting can be used for individual notes.
156
156
157
157
CV control: A Eurorack version was discussed, it's just a bit lower on the
158
158
to-do list, that's all. But you know, the first two examples use analog inputs
159
159
(0 to +3.3 volts) for frequency and pulse width control. Just sayin'.
160
160
161
161
162
- .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/docs /CG_PunkConsole_04.jpeg
162
+ .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media /CG_PunkConsole_04.jpeg
163
163
164
- .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/docs /CG_PunkConsole_01.jpeg
164
+ .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media /CG_PunkConsole_01.jpeg
165
165
166
- .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/docs /CG_PunkConsole_02.jpeg
166
+ .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media /CG_PunkConsole_02.jpeg
167
167
168
- .. image :: ( https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/docs /CG_PunkConsole_03.jpeg
168
+ .. image :: https://github.com/CedarGroveStudios/CircuitPython_PunkConsole/blob/main/media /CG_PunkConsole_03.jpeg
169
169
170
170
171
171
For information on building library documentation, please check out
0 commit comments