Skip to content

Instantly share code, notes, and snippets.

@grejppi
Last active August 29, 2015 13:56
Show Gist options
  • Save grejppi/9178616 to your computer and use it in GitHub Desktop.
Save grejppi/9178616 to your computer and use it in GitHub Desktop.
Testing how a VST plugin written with the VeSTige header behaves in different hosts

This is done when the dispatcher callback gets effMainsChanged

#define DUMP_AEFFECT(A) \
    printf ("\t.magic == %d\n", A->magic); \
    printf ("\t.dispatcher == %p\n", A->dispatcher); \
    printf ("\t.process == %p\n", A->process); \
    printf ("\t.setParameter == %p\n", A->setParameter); \
    printf ("\t.getParameter == %p\n", A->getParameter); \
    printf ("\t.numPrograms == %i\n", A->numPrograms); \
    printf ("\t.numParams == %i\n", A->numParams); \
    printf ("\t.numInputs == %i\n", A->numInputs); \
    printf ("\t.numOutputs == %i\n", A->numOutputs); \
    printf ("\t.flags == %x\n", A->flags); \
    printf ("\t.ptr1 == %p\n", A->ptr1); \
    printf ("\t.ptr2 == %p\n", A->ptr2); \
    printf ("\t.empty3 == %s\n", A->empty3); \
    printf ("\t.unkown_float == %f\n", A->unkown_float); \
    printf ("\t.ptr3 == %p\n", A->ptr3); \
    printf ("\t.user == %p\n", A->user); \
    printf ("\t.uniqueID == %d\n", A->uniqueID); \
    printf ("\t.unknown1 == %s\n", A->unknown1); \
    printf ("\t.processReplacing == %p\n", A->processReplacing);

The fields empty3, unkown_float (sic), and unknown1 are never set by the plugin, so some hosts displayed garbage data (filtered out here).

Reaper (Wine)

Reaper sets ptr1

	.magic == 1450406992
	.dispatcher == 6E7038C0
	.process == 00000000
	.setParameter == 6E703700
	.getParameter == 6E703730
	.numPrograms == 0
	.numParams == 16
	.numInputs == 0
	.numOutputs == 2
	.flags == 110
	.ptr1 == 01380C60
	.ptr2 == 00000000
	.empty3 == 
	.unkown_float == 0.000000
	.ptr3 == 07064500
	.user == 00000000
	.uniqueID == 29483
	.unknown1 == 
	.processReplacing == 6E7037E0

VstHost (Wine)

VstHost doesn't touch anything.

	.magic == 1450406992
	.dispatcher == 6E7038C0
	.process == 00000000
	.setParameter == 6E703700
	.getParameter == 6E703730
	.numPrograms == 0
	.numParams == 16
	.numInputs == 0
	.numOutputs == 2
	.flags == 110
	.ptr1 == 00000000
	.ptr2 == 00000000
	.empty3 == <garbage>
	.unkown_float == 0.059175
	.ptr3 == 001A98A0
	.user == 00000000
	.uniqueID == 29483
	.unknown1 == <garbage>
	.processReplacing == 6E7037E0

MuLab (Wine)

MuLab sets ptr1

	.magic == 1450406992
	.dispatcher == 6E7038C0
	.process == 00000000
	.setParameter == 6E703700
	.getParameter == 6E703730
	.numPrograms == 0
	.numParams == 16
	.numInputs == 0
	.numOutputs == 2
	.flags == 110
	.ptr1 == 06E6C6B0
	.ptr2 == 00000000
	.empty3 == P
	.unkown_float == 0.000000
	.ptr3 == 00168C20
	.user == 00000000
	.uniqueID == 29483
	.unknown1 == (
	.processReplacing == 6E7037E0

Giada (Linux)

Giada does not touch anything.

	.magic == 1450406992
	.dispatcher == 0x7fe4c4b1de70
	.process == (nil)
	.setParameter == 0x7fe4c4b1dcb0
	.getParameter == 0x7fe4c4b1dd10
	.numPrograms == 0
	.numParams == 16
	.numInputs == 0
	.numOutputs == 2
	.flags == 110
	.ptr1 == (nil)
	.ptr2 == (nil)
	.empty3 == `
	.unkown_float == 0.000000
	.ptr3 == 0x20e7600
	.user == (nil)
	.uniqueID == 29483
	.unknown1 == 
	.processReplacing == 0x7fe4c4b1ddb0

LMMS

LMMS sets user

	.magic == 1450406992
	.dispatcher == 6E7038C0
	.process == 00000000
	.setParameter == 6E703700
	.getParameter == 6E703730
	.numPrograms == 0
	.numParams == 16
	.numInputs == 0
	.numOutputs == 2
	.flags == 110
	.ptr1 == 00000000
	.ptr2 == 00000000
	.empty3 == <garbage>
	.unkown_float == 0.000000
	.ptr3 == 0013FF40
	.user == 7CD6E3A8
	.uniqueID == 29483
	.unknown1 == <garbage>
	.processReplacing == 6E7037E0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment