bouncing ball with gravity
bouncing ball with gravity
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.
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.
- Attachments
-
- gravity2.jzml
- (11.08 KiB) Downloaded 121 times
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: bouncing ball with gravity
wrong approach. The Multislider object provides the properties I need. I'll post the template when it's ready.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: bouncing ball with gravity
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
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: bouncing ball with gravity
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
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
-
- Liine Staff
- Posts: 126
- Joined: 14 Dec 2011 12:12
Re: bouncing ball with gravity
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
Re: bouncing ball with gravity
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.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: bouncing ball with gravity
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:
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.
Code: Select all
if x==0.5;
noteout(1,Knob.x,Knob2.x,1)
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.
- Attachments
-
- bouncingball02.jzml
- (13.23 KiB) Downloaded 118 times
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: bouncing ball with gravity
Hi
Maybe something like this?
See if you can work out what is happening and why . . .
Cheers
MM
Maybe something like this?
See if you can work out what is happening and why . . .
Cheers
MM
- Attachments
-
- bouncingball02.1.jzml
- (14.19 KiB) Downloaded 135 times
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: bouncing ball with gravity
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.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: bouncing ball with gravity
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
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]