; [ʞ] base.orc
;  ~ lexi hale <lexi@hale.su>
;  🄯 CC-NC-BY-SA 3.0
;  ? useful opcodes and defs

#ifndef BASE_INC
#define BASE_INC #1#

opcode fade, a, iiii
	isdur, isvol, ifin, ifout xin
	afade bpf linseg:a(0,isdur,1), 0,0, ifin,isvol, ifout,isvol, 1,0
	xout afade
endop

opcode pulse, a, ii
	idur,iwhen xin
	ap bpf linseg:a(0,idur,1), 0,0, iwhen,1, 1,0
	xout ap
endop

#end
