![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Repeat triggers with the same duration | |
tuscland Member |
![]() ![]() ![]() Hi everybody, I would like to create a adaptative delay line for use with triggers. This is like a memory not of a value but rather of a time between triggers. It looks like a delay line, but it is not as the delay time changes and adapts itself to preceding triggers. I am struggling to find a solution to this problem, but I don't any solution. The problem is to measure the time at sample rate, and use this value as a reference. I have seen that measuring the value with a ramp is not very precise. I thought about measureing it with sample count, but I can't find how to do it. If someone could give me some creative suggestions, it would allow me to build the solution.
IP: Logged | |
pete Member |
![]() ![]() ![]() Hi Cam As you have been using Up/Down counter as a ramp to feed a writer or reader then the value on that ramp is a value that represents time (which can be stored in memory or in a sample rate Sample and hold if it's only one value that's needed. Sample Rate working sample and hold can be made with Pete's DSP if you put a GateToTrigger module(with invert set to one) into the TrackAndPreHold modules gate input. See help text in TrackAndPreHold module. Also by using one negate module and MixerWithWrap you can find the difference in time between two triggers even if the ramp has flipped over to a negative number. Wrap around maths can be considered as the numbers on a clock face i.e. 10-4=6 or 2-4=10. As as long as the number of Maximum NumberOfSamples is more than the longest time between any two triggers it should be easy to workout. You already know how to make repeating triggers at a rate set by a value. But instead of counting the occasional triggers you just have to put a constant one in the CountUp field and you are then counting all samples. Max number is going to be more like 96000 than the 10 we have been playing with. You know how to measure the time between two triggers keeping the same scale. If not just make a ramp with max samples of 96000, sample and hold the output of the ramp when the first trigger happens and put this output into a Negate module. then SampleAndHold the output of the ramp when the second trigger happens. The put this output into a wrapping mixer with the Negates output and the output of this mixer is a value that represents the time between the two triggers. This is what you feed into the repeating trigger makes described above. I'm not sure what is supposed to happen now you have the triggers. Is the recorded sound supposed to be stretched to match its new duration or is it supposed to repeat the sound regardless of the duration of the recorded clip or are the triggers supposed to change so that as soon as one clip is finished the next clip starts but in a different order. Or does only one clip get recorded and it gets repeated over and over again. I don't yet know what is supposed to happen so I can't yet give you a better way of doing it. Try describing the action in a step by step fashion. Pete IP: Logged | |
tuscland Member |
![]() ![]() ![]() Okay Okay, I try again, the Up/Down counter feeding a sample rate sample and hold was the idea, but I could not make it work. Kyma is a hard practice! IP: Logged | |
SSC Administrator |
![]() ![]() ![]() Have you tried using the CapyTalk expression? For example !KeyDown durationBetweenTriggers This also has an option to measure the duration between a number of triggers, for example !KeyDown durationBetweenTriggers: 4 You could use this elsewhere for setting a BPM, for example 1 bpm: (!KeyDown durationBetweenTriggers) s bpm removeUnits IP: Logged | |
tuscland Member |
![]() ![]() ![]() The Capytalk expressio is ok, but I need to have the duration at sample rate. IP: Logged | |
tuscland Member |
![]() ![]() ![]()
Here I am with some cool classes that I made so far with Pete's help. Now I can very precisely compute the time between two triggers, but I don't know how to generate triggers from that : the PulseTrain module accept control-rate argument, which cause phase problems to my current patch. Now I just have to generate the triggers in response to the computed duration. This way I'll be able to repeat n-times the zero-crossed waves I was talking about in a previous post. See?
[This message has been edited by tuscland (edited 17 April 2006).] [This message has been edited by tuscland (edited 17 April 2006).] IP: Logged | |
SSC Administrator |
![]() ![]() ![]() Could you use the Equality Sound to compare the duration against an Oscillator on a Ramp waveform having a fixed frequency (e.g. 1 s hz)? The Tolerance field would control the width of the pulse. But that would only give you the first pulse (the rest would depend on the repetition rate of the Oscillator). Pete, can your up-counter take an audio rate input as its limit or as its Modulus? [This message has been edited by SSC (edited 17 April 2006).] IP: Logged | |
tuscland Member |
![]() ![]() ![]() Hi ! The idea I had this morning was to use wrap around maths: We know the duration as a 0 to 1 value. If I substract this value to 1, and add a up/down counter ramp with a known gradient, into a mixer with wrap around, into an absolute value. The value will hit the ceiling and wrap around each time the time is elapsed. I tried it, and it doesn't work: I only get one repetition. The solution would be to have a ramp with a sample rate settable ceiling. I'll check with SetableRamp, if there's something I can do with it.
[This message has been edited by tuscland (edited 17 April 2006).] IP: Logged | |
pete Member |
![]() ![]() ![]()
I've added the bit to your TriggersDuration to turn it back to triggers. This is frequency locked but not phase locked as expected. You may want to add in a ORed reset to have power over the phase. Note the value one in the FirstStepOffSet field. This is because the feedback has a one sample delay and this compensates for it. Also as it contains a memory name, you may need some funky small talk to make it unique if more than one module was used at the same time. BTW I don't think you need the absolute module on the output of the TriggerDurations as wrap around maths deals with this (remember 2:00 pm - 4 Hours = 10:00 am). The only time it would do anything is if the duration was greater than one second in which case finding the absolute won't help. Another by the way is that the Negate module does the same as any audio type inverter except that the value minus one remains minus one. All other values apart form zero get inverted. The sign in my icon was (-1=-1) not (1=-1). and BTW I love you Icons. SSC, there is no sample rate control of mod or limit but the frequency controlled ramp And AstableInFrequence can have it's frequency changed at sample rate. The problem is that theses inputs are in the form of 0=DC and 1= Half sample rate. There may be a way to transform the duration value to this frequency value at sample rate but I can't think of a way of doing it without using the divide module. Hope it helps Pete IP: Logged | |
tuscland Member |
![]() ![]() ![]() That's just great! I tried the reader/writer trick, but I did fear that I would have latency in the chain, and it didn't worked probably because I made a mistake. I did some correction on my module so that the values are more precise (I previously had 0.999999 instead of 1 for example). Concerning the absolute thing, yes I thought about that but for the sake of simplicity and flexibility, I get a more universal prototype with the absolute value in it. The function is best outlined I think. I have corrected the issue with the Negate module, and as soon as I have finished with my Sound, I will bundle everything properly with nice icons. Pete, your module deserve colored icons! I have tried to use the RampFrequencyControlled proto, but it didn't worked properly as the division is not very good to use, and yields to unprecise results. Camille IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.