Search found 65 matches
- Mon Dec 21, 2020 8:08 am
- Forum: Support and Development
- Topic: Object does not stop correctly
- Replies: 1
- Views: 2318
Re: Object does not stop correctly
This is because your button in the last frame jumps over the target destination, never reaching it and trying to go back. Try this: function move (dt) --Checked if the Button X position is bigger or smaller than targetX and ajust the speed to positive or negative if button.x > targetX then button.x ...
- Sun Feb 16, 2020 9:23 am
- Forum: Libraries and Tools
- Topic: [LIB] utf8string
- Replies: 9
- Views: 12097
Re: [LIB] utf8string
Functions like "lower" and "upper" can be seriously optimized like this: local _l = function(c) return tolower[c] or c end local newlower = function(str) return str:gsub(utf8_charpattern, _l) end The simple bench with this optimisation gives me this results: local function check(...
- Sun Feb 16, 2020 8:22 am
- Forum: Games and Creations
- Topic: Simple FFT demo
- Replies: 8
- Views: 10385
Re: Simple FFT demo
using the absolute lowest quality algorithm in existence The specific algorithm does not matter, since it can be changed at any time. I am primarily interested in functional analysis itself. Including the reduction of the samples. Also, thanks to this, you can make almost any sound look like an eig...
- Sun Feb 16, 2020 4:26 am
- Forum: Games and Creations
- Topic: Simple FFT demo
- Replies: 8
- Views: 10385
Re: Simple FFT demo
since one calling :decode() already "extracts the specific samples" from the file itself "Specific" means "we can skip samples". Our music has 44100 samples per second, so max displayed freq is ~44100. Windows size defines minimal frequency that can be catched. But if ...
- Fri Feb 14, 2020 5:01 pm
- Forum: Games and Creations
- Topic: Simple FFT demo
- Replies: 8
- Views: 10385
Re: Simple FFT demo
The FFT result seems incorrect Thanks for the explanation. Currently, I have some problems with functional analysis, and I would love to read additional materials. In addition, this post is still promoting sound analysis stuff, so if someone is interested and wants to start doing better things, my ...
- Fri Feb 14, 2020 12:58 pm
- Forum: Games and Creations
- Topic: Lissajous curves
- Replies: 2
- Views: 5591
Re: Lissajous curves
Cool math correctness!
- Fri Feb 14, 2020 12:13 pm
- Forum: Games and Creations
- Topic: Simple FFT demo
- Replies: 8
- Views: 10385
Simple FFT demo
This is not very optimised (FFI FFT preferred), but looks cool and has a basics for realtime sound analysis. (this post is a promotion of sound analysis in Lua+LÖVE) https://sun9-9.userapi.com/c857420/v857420288/1758f8/u8YEkwTvdtU.jpg UPD: FFT v0.2 is looks ok and (probably) normalized, but lowfreq ...
- Sat Feb 08, 2020 7:44 am
- Forum: Support and Development
- Topic: Calling C dll from love2d
- Replies: 11
- Views: 11788
Re: Calling C dll from love2d
On windows you should use __declspec(dllexport). Minimal crossplatfom library looks like this. #include "lua/lua.h" #include "lua/lauxlib.h" int lua_summ(lua_State *L){ double a = luaL_checknumber(L, 1); /* get first arg */ double b = luaL_checknumber(L, 2); /* get second arg */ ...
- Wed Jan 08, 2020 3:44 am
- Forum: Support and Development
- Topic: Selecting multiple functions in one class depending on the modificator/table index
- Replies: 5
- Views: 6114
- Tue Jan 07, 2020 8:03 am
- Forum: Support and Development
- Topic: Is it possible to make a file explorer?
- Replies: 6
- Views: 5373
Re: Is it possible to make a file explorer?
It's simple task using ffi-luafilesystem reimplementation like this: https://github.com/3scale/luafilesystem ... fs_ffi.lua.
No binaries, also it can read/write utf8-names instead of default lfs on windows, that can be very useful.
No binaries, also it can read/write utf8-names instead of default lfs on windows, that can be very useful.