Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
paper_bits:pb702_midi_synth [2017/09/12 22:16]
admin [Paper PCB]
paper_bits:pb702_midi_synth [2020/03/21 13:17]
admin [Software]
Line 1: Line 1:
 ===== PB702 MIDI Synthesizer ===== ===== PB702 MIDI Synthesizer =====
  
-The MIDI Synthesizer gives the possiblility ​to connect your Paper Bits to your Keyboard. It is polyphonic up to six notes and has three different waveforms: square, triangle and sine.\\ +{{:​paper_bits:​pb702_midi_synth.jpg?​600|}}\\ 
-It'​s ​basicaly ​an Arduino ​klone running a small program based on the wonderfull ​[[http://​sensorium.github.io/​Mozzi/​|Mozzi]] ​librarie.+ 
 +The MIDI Synthesizer gives the possibility ​to connect your Paper Bits to any Midi Keyboard, such as the [[sound_boards:​midi_keyboard|MIDI Keyboard]]. It is polyphonic up to six notes and has four different waveforms: square, triangle, saw tooth and sine.\\ 
 +It'​s ​basically ​an Arduino ​clone running a small program based on the wonderful ​[[http://​sensorium.github.io/​Mozzi/​|Mozzi]] ​library.\\
  
 ---- ----
Line 12: Line 14:
 ==== Parts ==== ==== Parts ====
   * **Resistors:​**   * **Resistors:​**
 +  * 1x 220 Ohm
   * 1x 330 Ohm   * 1x 330 Ohm
 +  * 2x 470 Ohm 
 +  * 2x 1 KOhm 
 +  * 2x 1.2 KOhm 
 +  * 1x 2 KOhm 
 +  * 1x 3.3 KOhm 
 +  * 1x 3.9 KOhm 
 +  * 2x 8.2 KOhm 
 +  * 1x 10 KOhm 
 +  * 2x 47 KOhm 
 +  * 1x 100 KOhm 
 +  * 1x 220 KOhm 
 +  * 1x 1 MOhm
   * **Capacitors:​**   * **Capacitors:​**
- +  * 2x 22 pF 
-  * 5x 100 nF (foil)+  * 2x 1 nF 
 +  * 1x 4.7 nF 
 +  * 3x 100 nF 
 +  * 1x 150 nF
   * **Electrolytic Capacitors:​**   * **Electrolytic Capacitors:​**
-  * 1x 4,7 µF +  * 1x µF 
-  * 1x 10 µF +  * 2x 10 µF 
-  * 1x 47 µF +
   * **Semiconductors**:​   * **Semiconductors**:​
- +  * Atmega 328P-PU 
-  * optocoupler ​+  * OpAmp MCP 6002 
 +  * Optocoupler 6N138 
 +  * **Cristal** 
 +  * 1x 16 MHz 
 +  * **Diodes** 
 +  * 1x 1N4148
   * 1x LED   * 1x LED
   * **Mechanical:​**   * **Mechanical:​**
-  * 1x IC socket, ​16 pin +  * 1x IC socket, ​28 pin 
-  * 1x IC socket, ​pin +  * 2x IC socket, ​pin 
-  * 1x pin strip 1x9+  * 1x pin strip 1x14pin
   * 2x pin header, female 90° 1x3, 1x2   * 2x pin header, female 90° 1x3, 1x2
   * 2x pin header, male 90° 1x3, 1x2   * 2x pin header, male 90° 1x3, 1x2
-  * 3x mini switch +  * 2x push button
-  * 3x push button+
   * 3x jumpers   * 3x jumpers
-  * **Potentiometers:​** 
-  * 1x 10k 
  
 ---- ----
-~~socialite:icon facebook twitter googleplus reddit tumblr~~+==== Software ==== 
 + 
 +First of all one needs a bootloader on the Atmega chip. For burning the bootloader follow the [[avr_bootloader:avr_bootloader_main|AVR & Bootloader]] manual.\\ 
 +For uploading the program one needs an USB to Serial adapter or an Arduino to mimic one: [[arduino_clones:​serial_adapter|The Arduino as a Serial Adapter]]\\ 
 + 
 + 
 +=== Mozzi and MIDI === 
 +The synthesizer program is based on the MIDI library and the [[https://​sensorium.github.io/​Mozzi/​|Mozzi Library]], have a look at the [[https://​sensorium.github.io/​Mozzi/​doc/​html/​index.html|Mozzi Dokumentation]] to learn more about it.\\ 
 +The MIDI library can be installed via the library manager, for the Mozzi installation download the [[https://​sensorium.github.io/​Mozzi/​download/​|Mozzi library]] and install it like described here: [[https://​www.arduino.cc/​en/​Guide/​Libraries#​toc4]]\\ 
 + 
 +=== Mozzi Mode === 
 +There are three different sound quality modes for the Mozzi library. The MIDI Synth needs the HIFI mode. To change that open in .../​sketchbook/​libraries/​Mozzi_102 the mozzi_config.h file and comment out the AUDIO_MODE STANDARD and uncomment the AUDIO_MODE HIFI. It should look like that:\\ 
 + 
 +   //#​define AUDIO_MODE STANDARD 
 +   //#​define AUDIO_MODE STANDARD_PLUS 
 +   #​define AUDIO_MODE HIFI 
 +then save the file. 
 + 
 +=== Mozzi Glitch === 
 +Unfortunately the latest version of Arduino is responsible for a timing glitch in the Mozzi library. Arduino changed the compiler from O2 to Os. Now the uploaded code is smaller but a timing problem appears, too. Here is an description about the problem here: 
 +[[https://​www.instructables.com/​id/​Arduino-IDE-16x-compiler-optimisations-faster-code/​]]\\ 
 + 
 +To fix the glitch one has to downgrade the compiler. Change in: arduino-x.x.x\hardware\arduino\avr\platform.txt the compiler from **-Os** into **-O2.**\\  
 +[[https://​sensorium.github.io/​Mozzi/​fixes/​updates/​howto-for-arduino-1-dot-6-11/​]]\\ 
 + 
 +=== Code === 
 +Upload that code to your board (Arduino UNO):\\ 
 +{{ :​paper_bits:​mozzi_midi_poli_12_1sec_limit.zip |}}\\ 
 +{{ :​paper_bits:​mozzi_midi_poli_10.7z |}}\\
  
 ---- ----
 +==== License ====
 +
 +This board is designed by **Wolfgang Spahn**, 2017-20.\\
 +It is licensed under a [[http://​creativecommons.org/​licenses/​by-nc-sa/​4.0/"​|Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]].
 +
 +<​html>​
 +<a rel="​license"​ href="​http://​creativecommons.org/​licenses/​by-nc-sa/​4.0/"><​img alt="​Creative Commons License"​ style="​border-width:​0"​ src="​https://​i.creativecommons.org/​l/​by-nc-sa/​4.0/​88x31.png"​ /></​a> ​
 +</​html>​
 +
 +----
 +