Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
paper_bits:pb702_midi_synth [2020/03/20 16:47] admin [Software] |
paper_bits:pb702_midi_synth [2020/03/20 20:47] admin [PB702 MIDI Synthesizer] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== PB702 MIDI Synthesizer ===== | ===== PB702 MIDI Synthesizer ===== | ||
- | The MIDI Synthesizer gives the possibility to connect your Paper Bits to a Midi Keyboard like the[[sound_boards:midi_keyboard|MIDI 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 basically an Arduino clone running a small program based on the wonderful [[http://sensorium.github.io/Mozzi/|Mozzi]] library.\\ | + | |
- | For burning the bootloader look here:\\ | + | 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.\\ |
- | [[avr_bootloader:avr_bootloader_main|AVR & Bootloader]]\\ | + | It's basically an Arduino clone running a small program based on the wonderful [[http://sensorium.github.io/Mozzi/|Mozzi]] library.\\ |
- | For uploading the program one needs an USB to Serial adapter or an Arduino:\\ | + | |
- | [[arduino_clones:serial_adapter|The Arduino as a Serial Adapter]]\\ | + | |
---- | ---- | ||
Line 61: | Line 58: | ||
==== Software ==== | ==== Software ==== | ||
- | The synthesizer program is based on 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.\\ | + | 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 the installation download the [[https://sensorium.github.io/Mozzi/download/|library]]\\ | + | 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]]\\ |
- | and install it like described here: [[https://www.arduino.cc/en/Guide/Libraries#toc4]]\\ | + | |
+ | |||
+ | === 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. | ||
- | Unfortunately there is nowadays a glitch in the Mozzi library. Arduino change the compiler. Now the uploaded code is smaller but a timing problem appeared, too. Here is an description about the problem. | + | === Mozzi Glitch === |
- | [[https://www.instructables.com/id/Arduino-IDE-16x-compiler-optimisations-faster-code/]]\\ | + | 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.instruc tables.com/id/Arduino-IDE-16x-compiler-optimisations-faster-code/]]\\ | ||
- | To fix the glitch follow these steps:\\ | + | 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.**\\ |
- | **In: arduino-x.x.x\hardware\arduino\avr\platform.txt change -O2 to -Os.**\\ | + | |
[[https://sensorium.github.io/Mozzi/fixes/updates/howto-for-arduino-1-dot-6-11/]]\\ | [[https://sensorium.github.io/Mozzi/fixes/updates/howto-for-arduino-1-dot-6-11/]]\\ | ||
- | \\ | ||
- | Code:\\ | + | === Code === |
+ | Upload that code to your board (Arduino UNO):\\ | ||
{{ :paper_bits:mozzi_midi_poli_12_1sec_limit.zip |}}\\ | {{ :paper_bits:mozzi_midi_poli_12_1sec_limit.zip |}}\\ | ||
+ | {{ :paper_bits:mozzi_midi_poli_10.7z |}}\\ | ||
---- | ---- |