MacOS USB MIDI Corruption
When sending modest sized System Exclusive MIDI messages to a USB MIDI device, CoreMIDI will sometimes corrupt the message by dropping some blocks of the message, while duplicating others.
| /* DMA Stall | |
| This sketch will demonstrate how the FreeTrouch library code makes reads to | |
| PTC peripheral registers without the required Read-Synchronization. While | |
| such reads succeed, they stall the AHB-APB Bridge C. | |
| This is normally not an issue - but if there are other accesses going through | |
| that bridge, then they will be stalled as well. A common example is to use the | |
| DMAC to transfer data to the DAC or from the ADC. These peripherals are on | |
| the same bridge (C). Stalls caused by non-scyhcronized reading seem to be on |
| #include <Arduino.h> | |
| class DebouncedSwitch { | |
| public: | |
| DebouncedSwitch(int p, int mode=INPUT_PULLDOWN) : pin(p), nextValidAt(0) { | |
| pinMode(pin, mode); | |
| state = nextState = digitalRead(pin); | |
| } | |
| bool update() { |
| /** | |
| *** Probes & Data storage | |
| **/ | |
| AdafruitIO_Feed *probe1 = io.feed("probe_one"); | |
| AdafruitIO_Feed *probe2 = io.feed("probe_two"); | |
| AdafruitIO_Feed *probe3 = io.feed("probe_three"); | |
| AdafruitIO_Feed *probe4 = io.feed("probe_four"); | |
| const int numberOfProbes = 4; |
| #include "RTClib.h" | |
| #include <Adafruit_MCP23017.h> | |
| #define NUM_ONES_LEDS 4 | |
| RTC_DS3231 rtc; | |
| Adafruit_MCP23017 mcpMinutes; | |
| Adafruit_MCP23017 mcpHours; | |
| Adafruit_MCP23017 mcpMonths; | |
| Adafruit_MCP23017 mcpDayLow; | |
| Adafruit_MCP23017 mcpDayHigh; |
| #include "RTClib.h" | |
| #include <Adafruit_MCP23017.h> | |
| #define NUM_ONES_LEDS 4 | |
| enum { | |
| pinFirst = 0, | |
| pinLast = 15, | |
| pinJanuary = 0, | |
| pinFebruary, |
| #include <Adafruit_SPIFlash.h> | |
| namespace { | |
| // === | |
| // === Test Data Generation and Checking | |
| // === | |
| const size_t BLOCKSIZE = 512; |
| """Convert DDP mastered CDs to Kunaki's CUE format. | |
| tl;dr: | |
| python ddp-to-kunaki.py my-cool-cd-ddp-dir my-cool-cd-kunaki | |
| This will produce two files: | |
| my-cool-cd-kunaki.CUE <-- the markers | |
| my-cool-cd-kunaki.iso <-- the audio (*not* an ISO format file!) |
| #!/bin/sh | |
| . /usr/local/pisound/scripts/common/common.sh | |
| log "starting pbj" | |
| flash_leds 1 | |
| killall scsynth | |
| killall sclang | |
| rm -f /tmp/sclang-*.log 2>/dev/null || true |