This adds both a midi generator and a midi type 1 simulator. While I would have preferred to use an existing tool for this, I found that timidity++ does not emit pitch wheel events correctly, and I don't know of another widely-distributed tool that does midi-to-midi format conversion. The c++ and python versions were co-developed. I wrote one to test the other. There is more cleanup to do, but `roundtrip.cpp` produces a valid type 0 midi file given a type 1 or type 0 midi file as input.
29 lines
608 B
Makefile
29 lines
608 B
Makefile
CFLAGS = -I../saturn -fstack-usage
|
|
OPT = -O3
|
|
LIBGCC = $(shell $(CC) -print-file-name=libgcc.a)
|
|
LIB = ../saturn
|
|
|
|
all:
|
|
|
|
include $(LIB)/m68k/common.mk
|
|
|
|
# 200 bytes
|
|
%-44100-s16be-1ch-100sample.pcm: Makefile
|
|
sox \
|
|
-r 44100 -e signed-integer -b 16 -c 1 -n -B \
|
|
$@.raw \
|
|
synth 101s $* 441 vol -10dB
|
|
mv $@.raw $@
|
|
|
|
%.pcm.o: %.pcm
|
|
$(BUILD_BINARY_O)
|
|
|
|
%.mid.o: %.mid
|
|
$(BUILD_BINARY_O)
|
|
|
|
slot.elf: slot.o sine-44100-s16be-1ch-1sec.pcm.o
|
|
|
|
interrupt.elf: interrupt.o jojo-11025-s16be-1ch.pcm.o
|
|
|
|
midi.elf: midi.o sine-44100-s16be-1ch-100sample.pcm.o midi_test-c-major-scale.mid.o f2.mid.o ../midi/parse.o $(LIBGCC)
|