Re: [ecasound] Simple MIDI?

From: Stuart Allie <Stuart.Allie@email-addr-hidden>
Date: Fri Mar 09 2007 - 02:06:03 EET

Hi Dave,

> Before moving on to something rational, I tried the following.
> 1) replaced the normal eca-command-timidity with 'aplaymidi
> -p 130:0 %f'
> where 130:0 is a fluidsynth input port.
> 2) ran an ecasound like:
> ecasound -a:1 -i m0006.mid -o null \
> -a:2 -i jack_auto,fluid2 -o m0006.wav
> fluid2 is the jack output of the fluidsynth instance.
> I did get a couple of nice measures out of the speakers
> before everything
> crashed with horrible underruns. Would this work if
> aplaymidi put silent
> blocks onto stdout? Would they need to be the correct
> format, number or size?
> I know it's unbelievably slimy, but so tempting.

It's crazy, but it just might work :)

I think if aplaymidi wrote enough to stdout, it would be okay. I don't
think the format would matter too much as it's going straight to null
anyway. But you could use zeros to be sure. As for how many zeros... I
guess aplaymidi could do something like this:

Current tempo is t
I just sent an event at tick X
X is different to the last tick Y
So there is an elapsed real time of (mumble) something, lets call it T
(depends on t)
Which corresponds to N samples (taking into account sampling rate and
So print N zeros to stdout.

It'd work - I think.

Not sure if this is easier than making aplaymidi jack-transport-aware or

An alternative would be to hack ecasound so that any chains that had a
midi file as input could take a flag that said "I'll get the audio from
somewhere else, so don't actually make me an audio chain" or "get my
audio from null instead of stdout." Perhaps this could be a global
option: "-Mnull Makes midi inputs use null for sudio data - useful if
you want to get your audio via jack or an external source"

I think this would be useful, although you still have the problem of non
jack-transport awareness.

Interesting problem though.


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
Ecasound-list mailing list
Received on Fri Mar 9 04:15:02 2007

This archive was generated by hypermail 2.1.8 : Fri Mar 09 2007 - 04:15:02 EET