VERY new to GE so please bear with me. I have an AudioStreamPlayer in which I load a wav file. As I understand it, the wav is loaded as an AudioStreamSample. I need to be able to edit its "Loop End" member variable of AudioStreamSample from another script, but I don't see how to create this connection as the AudioStreamSample does not appear in the inspector as a child of the AudioStreamPlayer.

My application is to build a musical instrument. My wav file is a single-cycle waveform, and changing the loop_end alters the pitch.

Thanks for any inputs.

@alspacka AudioStreamSample is a resource, it's associated with the AudioStreamPlayer but not as a child, it's assigned to AudioStreamPlayer's stream property and loaded in when this node is loaded, if it's assigned in the editor. Its properties may not appear in autocomplete, but you should be able to modify them. In this case you'd AudioStreamPlayer.stream.loop_end = value

Thanks! I'm not sure how resources work yet -- if I access the .stream.loop_end from my StreamPlayer, will that modify one particular instance of the wav file, or will it modify my base resource? I ask because I need to have multiple instances of the wav file running at once, with different loop end points.

5 years later