Code: Select all
// create sunvox object
sv = sv_new()
// place and connect modules
sv_lock(sv)
sv_new_module(sv,"Input","Input",300,512) // 1
sv_new_module(sv,"Pitch Detector","Pitch Detector",400,512) // 2
sv_connect_module(sv,1,2)
sv_unlock(sv)
input = 1
pitch_detector = 2
while 1
{
// Wait for the EVT_QUIT event
while( get_event() )
{
if EVT[ EVT_TYPE ] == EVT_QUIT
{
breakall
}
}
// get the detected pitch from the pitch detector module
// $pitch = ??
}
sv_remove(sv)