LÖVE Audio Effects Playground
Re: LÖVE Audio Effects Playground
I actually thought about that - allowing the user to rewire things however they want - but since it doesn't change the outputted audio it would just be confusing.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: LÖVE Audio Effects Playground
That's very cool indeed! Extra points if the cables are shaped like a catenary
Re: LÖVE Audio Effects Playground
It's more or less two sines added together which I don't think counts as a catenary shape, so no extra points I guess.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: LÖVE Audio Effects Playground
I don't blame you, it gets really complex. Still very cool though.
The use of sines was a bit surprising. I thought you would have used Bézier curves. It's what I would have used probably.
The use of sines was a bit surprising. I thought you would have used Bézier curves. It's what I would have used probably.
Re: LÖVE Audio Effects Playground
I just needed the cables to sag a bit, and sines have those saggy bits! No idea that shape this actually is.
Code: Select all
-- (hiX,hiY) is the higher connection on the screen.
-- (loX,loY) is the lower.
for segment = 0, SEGMENTS do
local tx = segment / SEGMENTS -- Move linearly on x.
local ty = sin(tx*TAU/4) -- Quickly approach lower y (ty=1).
local sag = sin(tx*TAU/2) * MAX_SAG -- Sag in the middle.
local segmentX = lerp(hiX, loX, tx)
local segmentY = lerp(hiY, loY, ty) + sag
end
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: LÖVE Audio Effects Playground
Well, extending a line reveals the true shape.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: LÖVE Audio Effects Playground
Awesome little educational tool! I usually can't keep up with the Games subforum, but this is great.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: LÖVE Audio Effects Playground
Thanks
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: LÖVE Audio Effects Playground
I was bothered by the fact that the sine waves straighten up unnaturally near one of the ends, so I ended up making a parabolic version. A parabola is a decent-ish approximation of a catenary in many cases.
(Rename to main.lua to test)
(Rename to main.lua to test)
- Attachments
-
- pseudo-catenary.lua
- (4.99 KiB) Downloaded 133 times
Re: LÖVE Audio Effects Playground
That's nice. I'll save that code for the future.
In the program, the cables swing back and forth a bit. Could you implement physically correct swinging as well? (Just kidding.)
In the program, the cables swing back and forth a bit. Could you implement physically correct swinging as well? (Just kidding.)
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Who is online
Users browsing this forum: No registered users and 1 guest