From: Ramon Gonzalez-A. <ar...@ma...> - 2005-06-05 22:48:19
|
Dear Martin, Aha! I think we find here the point with offset. As far as I understand, and always understood, the task-Offset offsets in the file the zero time of the context. so your example: > (create-soundfile (test-file-name) 'aiff 'short (foo-default-srate) 2) > > (define c > (context 2 > (output~ 1 (gate~ (sine~ (~ 440)) 1)) > (output~ 2 (time 1 (gate~ (sine~ (~ 880)) 1))))) > > (define t (make-task 0 0.5 (test-file-name) c)) > > (run-task t 2) > > would create a file with half a second of silence, and then 2 seconds of sound, starting with the 440Hz sine wave which would last 2 secs., and 1 sec later the 880Hz sinewave, which would last 1 sec. This is how I always understood it. So there are two possibilities: Either I had wrongly understood, and it was wrongly implemented, so my assumption seemed to be correct, else I was right, implementation was right, and you interpreted it wrongly, correcting it in the worng sense. And that, I think explains almost absolutely the problem I'm finding. In my example : >> ;shifting 1 sec. with task Offset >> (make-soundfile nam1 'aiff 'short 44100. 1) >> (define c1 >> (lambda () >> (context 1 (output~ 1 (mul~ (sine~ (~ 440.)) >> (read-bpf~ (make-bpf '((0 1) (1 0))))))))) >> (define m1 (make-task 0. 1. nam1 (c1) 'punch 44100. 1024)) >> (run-task m1 2. 1.) I expect a file with a 1sec. silence followed by a 1 sec enveloped sine. I am offseting in the soundfile by 1sec. the cero time of the context. From your understanding, indeed there would be 3 secs. silence, because after 1 sec. there is no output from my context. In any case, it is strange that there is in fact some sound, some blup which shouldn't be there according to your point of view. Gerhard? What do you think? As far as I can think of there is not such functionality in Foo as you mention, Martin (rendering from some moment onwards in the context time). Probably it is a good idea to have such possibility, but not with these parameters. Offset and Reference are finally a mechanism to insert at different moments in the soundfile. Actually, I'm almost completely sure my assumption is the (historically) correct one: think that the incremental mixing mechanism keeps the context, the scalar and the offset (point in time where the evalutation of the context has to be inserted in the result mix-file). And you are not expected to make your context knowing where in the soundfile would it be inserted, otherwise undoing a time operation would have to imply doing a new context. Offset and Reference are two very close fellows. The idea is that your whole network of offsets (points in time where things "happen" (contexts are inserted)) can be easily shifted up and down in the result soundfile for whatever reasons. I think we've got it! 2. I don't know what happens with the mails; sometimes I get them so much later than they are sent according to the mails' dates. So I didn't see all your mails, Martin, until now. I will try to work with the hack. I'll inform you how it goes. Thanks for it. All th best, Ramon |