Saturday, December 08, 2007

MIDI control of monitor source

These are the changes needed to implement MIDI control of monitor source:

in MidiInfo.h:

enum { // plugin MIDI properties
MP_BYPASS,
MP_MONITOR,
PLUGIN_MIDI_PROPS
};

in MainMidi.cpp:

const int CMainFrame::m_PluginMidiPropName[PLUGIN_MIDI_PROPS] = {
IDS_MP_BYPASS,
IDS_MP_MONITOR
};

case MP_MONITOR:
if (Toggle)
Val = (GetMonitorSource() != ParmIdx);
{
bool IsMod = IsModified();
SetMonitorSource(Val >= .5 ? ParmIdx : -1);
SetModify(IsMod); // restore modify flag
}
break;

The above change also requires a new version of the project file format, otherwise errors will occur in CFFPlugInfo::Serialize due the increased size of m_MidiInfo. This probably could have been avoided if the size of m_MidiInfo had been serialized, but it's too late for that now. The only remaining option is an explicit version test. Note that the version being tested is from the next level up, i.e. it's a CFFProject version, not a CFFPlugInfo version. The CFFPlugInfo version must be increased too, so that the clipboard format changes.

// this was tested and works fine
int MidiInfoSize = Version > 4 ? sizeof(m_MidiInfo) : sizeof(CMidiInfo);
...
ar.Write(m_MidiInfo, MidiInfoSize);
...
ar.Read(m_MidiInfo, MidiInfoSize);

1 comment:

PSF said...

Just want to thank for for this very impressive software! I've made several meta-plugin motion backgrounds for DVD slideshow GUI loaded with avisynth.

Maybe when starting up the first time the default resolution should be a bit lower so people can see how fast this really is.

One question: is there a way to key out colors with a freeframe plugin? Work with an alphachannel in a layer?

It would also be nice to have a gradient plugin which fills the screen and changes over time as a source.

In the flv player on http://download.videohelp.com/tin2tin/index.htm you can see some of the backgrounds I did with FFrend and Pete's plugins.