Added some more tweaks:
The effect for the reverse cymbal was captured twice on the demo, so I added a volume check. You can now check the instrument and get a result for volume and note!
I updated the demo to stop it getting triggers from the low volume triggers (e.g. the double ping effect and the double spin). This is achieved by extending the result value from Get_Instrument() to return more data that just boolean.
Now it returns an integer with both the volume and instrument note in both halves of the integer.
I can now use the realtime call:
ping=BASS.AGKBASS_Get_Instrument(16)
if GetVolume(Ping)>10 then doPing()
so only act on volume > 10.
To extract the HIWORD of the value, a simple function GetVolume() is
function GetVolume(i)
Result=(i && 0xFFFF0000) >> 16
endFunction Result