Doing away with hardware MIDI interrupters

Adam Munich, Mon Jul 20 2015, 07:45PM

Hi all,

After having quite a frustrating time trying to run 8 synchronized timers on a micro controller unsuited for the task, I thought of a better way to play MIDI files into a DRSSTC.

Link2

Inside this ZIP file is a SoundFont file and a player; just drop the SF2 into the player, select your favorite MIDI file and out of your sound card, will come nice square pulses that can be buffered and sent over a fiber link.


1437421453 2893 FT0 Pulse


Cheers,
-Adam
Re: Doing away with hardware MIDI interrupters
Goodchild, Mon Jul 20 2015, 08:22PM

Adam,

I like the idea, my only dread is the lack of control over the PC sound card, if the OS decided to steal the card or the driver crashed you could be potentially left with some long pulses that can cause damage, are you mitigating that in any way? Potentially a micro with priority control over the fiber output being fed from a USB codec could solve that problem, but then again I'm paranoid....

Great work, I would not have guessed that an audio codec could resolve <50uS pules seeing that it's approaching it upper bandwidth usually around 20KHz.
Re: Doing away with hardware MIDI interrupters
Adam Munich, Fri Jul 24 2015, 05:19PM

The sound card does sample at 44,100 Hz, so I figured if I were to create a waveform with 10 "high" samples and 90 low samples, I'd get a ~440Hz waveform to play with. Adding a few bits here and there and concatenating several samples gave me a true 440Hz wavfile to play with.

SoundFonts are played at different pitches through resampling, so the ~120us pulse width for 440 becomes shorter for higher frequencies, and greater for lower ones. The idea is your "buffer" would be a schmitt-triggered adjustable one-shot which pays attention to only the rising edges.

I have not yet built that, but will have more space to screw about with my tesla coil when I move from berkeley to atherton in a month or so.

Cheers,
-Adam
Re: Doing away with hardware MIDI interrupters
nzoomed, Sat Jul 25 2015, 02:14AM

Is it possible to have software that can generate MIDI output from taking the peaks and notes of the waveform of any music being played and convert it to a signal that would play on the tesla coil?

This would be far easier than getting midi files and trying to synchronise them to a backing track.
Re: Doing away with hardware MIDI interrupters
fatboyslim, Wed Sept 30 2020, 07:48AM

Are you able to repost the sf2 link? This is the solution to my midi problems I have been searching for.