22 lines
517 B
C
22 lines
517 B
C
#pragma once
|
|
|
|
// Shim replacing FortySevenEffects MIDI.h for Arduino-AppleMIDI-Library
|
|
// on pico-sdk. Provides the subset of types actually referenced.
|
|
|
|
#include "midi_Defs.h"
|
|
#include <platform/pico_shim.h>
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifndef byte
|
|
typedef uint8_t byte;
|
|
#endif
|
|
|
|
inline void randomSeed(unsigned long seed) { srand((unsigned int)seed); }
|
|
|
|
inline long random(long min_val, long max_val) {
|
|
if (min_val >= max_val) return min_val;
|
|
return min_val + (rand() % (max_val - min_val));
|
|
}
|