GameOfLife / Unit-Lib

The Unit Library is a system that provides high level abstractions on top of the SuperCollider language.
25 stars 6 forks source link

SplitEvent button in UScore ( | ) , expect also to split soundfile starttime in the chain ? #57

Open casperschipper opened 7 years ago

casperschipper commented 7 years ago

Would it be possible to make make SoundFile uDefs split as well ? Currently starttime of both events' soundfile players in the chain (before and after the cut) is set to 0.

woutersnoei commented 7 years ago

Hmm, interesting, that should actually work. Do you perhaps have a use case where it doesn't?

casperschipper commented 7 years ago

Whoops, my mistake: I think the splitting actually works correctly, except if you loop the soundfile and cut longer than its original length.

casperschipper commented 7 years ago

Correction: it appears now that if I turn loop on in diskSoundFile and then cut the file anywhere (even within the duration of the file), it always reset start to 0. So it is the looping that triggers the unexpected 0.

woutersnoei commented 7 years ago

Ah, ok, yes that is actually a feature. If we would cut the looped file it would result in a shorter loop, which I figured is not desirable in most cases. Unfortunately it can't start in the middle and then loop the whole file, it only loads the part that should play, and that is also what is looped.

casperschipper commented 7 years ago

Thanks, that explains it very well. An option could be to turn off the loop in the diskSoundFile if you choose "length from soundfile" ? It is more or less pointless to loop the sound, if the event has exactly the length of the soundfile (I noticed it even correctly adjusts if a different playback speed is selected).

On the other hand, side effects like that are maybe as unwanted as the original problem... Perhaps we should just mention the current behavior in the next version of the manual ?