okay further update - i did update the code and there was a math error, but after fixing it and testing the values printed it still seems to be crashing. looks like it's this code causing the freeze/crash:
//tempo/beat div can be called on the fly
public void UpdateTempo(int value)
float divisor = beatDivisions[value];
tempo = masterTempo / 60.0f * divisor;
so, if i just call csound.setChannel("tempo", tempo); at Start(), there's no issue. the Debug Log statement prints correctly as long as i comment out the csound call when i run the scene. but if i comment out the call at Start() and call UpdateTempo(int value) it hangs or crashes every time the scene runs. wondering if this is a bug? it's very repeatable. all i can think is that it doesn't like two math operations using no parentheses or maybe wants them handled separately? it's very weird, but annoyingly consistent. beatDivisions[value] is an array of preset tempo divisions corresponding to selected rhythmic division/multiplication of the master tempo. it all prints out correctly but Csound throws up when it hits it for some reason. anyway here it is. let me know what you think. thanks!
MainController.cs-rev1.zip (2.9 KB)