General
bouncing ball with gravity
Started by Phil999 on .
Sign in or create an account to join the conversation.
I would like to have a template with many bouncing balls. Each ball is triggered manually, but the bouncing behavior should be variable for each ball. I made a little example with one ball, derived from the 'gravity' template that uses accelerometer data to move balls.
Because the ball's physics are scripted, I find it difficult to influence the bouncing behavior with faders or knobs. I would like to make the ball bounce for a longer time, or indefinitely. Especially at the last stage the ball should bounce more until it has used up all kinetic energy, like a rubber or ping-pong ball.
gravity2.jzml
Because the ball's physics are scripted, I find it difficult to influence the bouncing behavior with faders or knobs. I would like to make the ball bounce for a longer time, or indefinitely. Especially at the last stage the ball should bounce more until it has used up all kinetic energy, like a rubber or ping-pong ball.
gravity2.jzml
wrong approach. The Multislider object provides the properties I need. I'll post the template when it's ready.
Hi
I think there are issues with your formula's - that rand is a problem . . .
Also the friction component seems to slow the fall as well as rise . . .
I think you need to set up gravity as a constant force downwards
Workout speed at bounce-time, deduct a little for loss and reverse it
Then allow your gravity to slow it down until it falls again and repeat
Does that make sense?
Cheers
MM
I think there are issues with your formula's - that rand is a problem . . .
Also the friction component seems to slow the fall as well as rise . . .
I think you need to set up gravity as a constant force downwards
Workout speed at bounce-time, deduct a little for loss and reverse it
Then allow your gravity to slow it down until it falls again and repeat
Does that make sense?
Cheers
MM
yes it makes sense, but you know, the template in my first post was not done by myself. I just modified it to make it behave like ping-pong balls. I hardly understand the script.
The Multislider object is much better, I just need to have some kind of threshold that will send trigger data. That shouldn't be a problem.
My goal is to trigger notes with one or several Multisliders, each Multislider with slightly different and editable properties. A dial below each Multislider for the note pitch. Quite simple, but it will be very interesting. Like one or several ping-pong balls bouncing, or VCLFO's (voltage controlled LFO's). And (with friction parameter close to zero) an Euler-Disk like oscillator.
http://www.youtube.com/watch?v=ug2bKCG4gZY
The Multislider object is much better, I just need to have some kind of threshold that will send trigger data. That shouldn't be a problem.
My goal is to trigger notes with one or several Multisliders, each Multislider with slightly different and editable properties. A dial below each Multislider for the note pitch. Quite simple, but it will be very interesting. Like one or several ping-pong balls bouncing, or VCLFO's (voltage controlled LFO's). And (with friction parameter close to zero) an Euler-Disk like oscillator.
http://www.youtube.com/watch?v=ug2bKCG4gZY
I did the original template. The idea behind the rand was to make rebounds behaviour less predictive for each ball. As for the friction, it's meant to slow balls in any direction.Macciza wrote:Hi
I think there are issues with your formula's - that rand is a problem . . .
Also the friction component seems to slow the fall as well as rise . . .
I think you need to set up gravity as a constant force downwards
Workout speed at bounce-time, deduct a little for loss and reverse it
Then allow your gravity to slow it down until it falls again and repeat
Does that make sense?
Cheers
MM
Edit : haven't tested the ping-pong changes
don't, it's just an abuse of your template.axel_liine wrote:
Edit : haven't tested the ping-pong changes
I took the gravity template because I didn't know of any other method, and realised yesterday that it is very easy with the Multislider object. When my ping-pong-ball template is finished, everything will make sense.
I have an initial template ready, now I just need one or two lines of code for the note trigger. I created a script, executed on frame, to send a note every time the Multislider.x value is equal 0.5. Although an easy task, it came out wrong because, well, I don't know how to code:
So if someone wants to help me with this primitive task, please do. You can save me hours. I have the manual next to me, and I already opened dozens of user templates, trying to find something similar to what I need.
bouncingball02.jzml
if x==0.5;
noteout(1,Knob.x,Knob2.x,1)
Would it be better to create a custom MIDI, and trigger it with a script? And I guess getattribute should be used.So if someone wants to help me with this primitive task, please do. You can save me hours. I have the manual next to me, and I already opened dozens of user templates, trying to find something similar to what I need.
bouncingball02.jzml
Hi
Maybe something like this?
See if you can work out what is happening and why . . .
Cheers
MM
bouncingball02.1.jzml
Maybe something like this?
See if you can work out what is happening and why . . .
Cheers
MM
bouncingball02.1.jzml
oh yes! It is a bit critical when the Multislider is coming close the middle position, I feel I have to 'help' a bit with changing tension and friction values to get the desired trigger 'dynamics', but it behaves how I wanted.
The conditional expression a?b:c you used in the 'trigger' expression is interesting. I'll have to study that one, at the moment I don't know what it does. It came to my mind after posting that there is a problem with the condition x==0.5, it would send 'note on' when the Multislider is not moved. Maybe this a?b:c avoids that problem?
I've gone through almost the entire user library, and analysed the 'miniKeys-and-TestNotes-v1' template in detail. What a sophisticated template, so many things I don't understand. And the longer I spent with wondering how it works, I refreshed my internet browser every 5 minutes to see if Macciza is online or not.
The solution was simple, but I don't think I would have found it. Even after many more hours. Thank you very much. Again.
EDIT: the trigger indicator LED was also something I didn't know how to do. Now it is clear.
EDIT2: is there another example of this logical function a?b:c ? I have never seen it.
The conditional expression a?b:c you used in the 'trigger' expression is interesting. I'll have to study that one, at the moment I don't know what it does. It came to my mind after posting that there is a problem with the condition x==0.5, it would send 'note on' when the Multislider is not moved. Maybe this a?b:c avoids that problem?
I've gone through almost the entire user library, and analysed the 'miniKeys-and-TestNotes-v1' template in detail. What a sophisticated template, so many things I don't understand. And the longer I spent with wondering how it works, I refreshed my internet browser every 5 minutes to see if Macciza is online or not.
The solution was simple, but I don't think I would have found it. Even after many more hours. Thank you very much. Again.
EDIT: the trigger indicator LED was also something I didn't know how to do. Now it is clear.
EDIT2: is there another example of this logical function a?b:c ? I have never seen it.
No worries,
The conditional is kind of a C shortform 'if?then:else" with some limits to the then and else cases . . .
It is mentioned briefly in the Logic section in chapter 13 - Any C book should provide more details.
So basically it say - if x > .5 send a 1 or else send 0 - in the MIDI trigger section it turns notes on/off . . .
Not sure of other examples but you will see it quite often, particularly now you know what it is.
For a bit of fun I made the pitch and velocity knobs mass-spring mode with low friction and narrower ranges
Muck around with speeds etc and you end up with some nice random arpeggiation and dynamics
Duplicate it few times and you end up with some cool ambient sort of stuff
Conforming it to scales would probably be good too for more diatonic sort of stuff
Sometimes it can be the smallest thing that you miss that makes it hard to understand how something works . .
I certainly still come across many things that can stump me when looking at other peoples projects
But stick at it and gradually you will start to build up a repertoire of techniques to use . . .
And remember there is often more than one way to 'skin a Lemur' . . . .
Cheers
MM
The conditional is kind of a C shortform 'if?then:else" with some limits to the then and else cases . . .
It is mentioned briefly in the Logic section in chapter 13 - Any C book should provide more details.
So basically it say - if x > .5 send a 1 or else send 0 - in the MIDI trigger section it turns notes on/off . . .
Not sure of other examples but you will see it quite often, particularly now you know what it is.
For a bit of fun I made the pitch and velocity knobs mass-spring mode with low friction and narrower ranges
Muck around with speeds etc and you end up with some nice random arpeggiation and dynamics
Duplicate it few times and you end up with some cool ambient sort of stuff
Conforming it to scales would probably be good too for more diatonic sort of stuff
Sometimes it can be the smallest thing that you miss that makes it hard to understand how something works . .
I certainly still come across many things that can stump me when looking at other peoples projects
But stick at it and gradually you will start to build up a repertoire of techniques to use . . .
And remember there is often more than one way to 'skin a Lemur' . . . .
Cheers
MM
yes the manual mentions it briefly, but with the working template and your explanation here I understand it now. I might use it again, especially in cases when I want to trigger something at a certain value but not if it already has that value. With the > this is avoided in an elegant way.Macciza wrote: So basically it say - if x > .5 send a 1 or else send 0
This is going to be a nice interface with 3-5 of those triggers. And you guessed right, it's going to be combined with AB's NOD-E's (note generator in Reaktor) for ambient music, that was the plan behind those ping-pong balls. It came out differently, visually not so attractive, but I'm very pleased to have found solutions for the two problems (the other one was to combine several ABreakpoint2's, which was not possible, but can be replaced with Lemur-controlled NOD-E's).
The next live performance will be . . . hypnotic. Together with appropriate synths and samplers I think this is a big step towards an emulation of those famous Buchla synthesiser systems.
Good idea by the way to put some order (scales) into the note pitches. I think I'll leave that for the moment, but implement it in future if I can.
Hi
I did have a look at multi ABreakpoint and it is possible - just takes a bit of work due to alias's . .
Almost got there - can have another look and pass it on to you to finish off it you want . ..
Cheers
MM
I did have a look at multi ABreakpoint and it is possible - just takes a bit of work due to alias's . .
Almost got there - can have another look and pass it on to you to finish off it you want . ..
Cheers
MM
really? That would be fantastic. Antonio said he tried it several times, but didn't succeed. Well, didn't succeed in acceptable time I assume, it's quite some work.
For me it would be just great. I could use much less VSTi's for the same effect, everything would be easier and simpler. But if it doesn't work, never mind. I already have what I need, and that's the important thing.
Here is the thread for the multi-ABreakpoint:
http://liine.net/forum/viewtopic.php?f=26&t=1311&start=0
For me it would be just great. I could use much less VSTi's for the same effect, everything would be easier and simpler. But if it doesn't work, never mind. I already have what I need, and that's the important thing.
Here is the thread for the multi-ABreakpoint:
http://liine.net/forum/viewtopic.php?f=26&t=1311&start=0