09-03-2022, 03:06 PM
(09-03-2022, 02:28 PM)TempodiBasic Wrote: :The "WriteFourBytes" I needed to write in Lua v5.1 a few years ago so I could process wave files:
Moreover I have found this FreeBasic program that translate into MIDI a PLAY sound/song
It can be used to understand how MIDI file is built and so how to manage it!
And if this is interesting it can be translated into QB64.
Here original linkĀ https://www.freebasic.net/forum/viewtopi...14#p248014
Waiting feedbacks
Code: (Select All)
function longintencode(num)
return string.char(bit32.extract(num, 0, 8)) ..
string.char(bit32.extract(num, 8, 8)) ..
string.char(bit32.extract(num, 16, 8)) ..
string.char(bit32.extract(num, 24, 8))
end -- longintencode
It doesn't work anymore on the latest Lua because "bit32" module was removed. Maybe the person who created the Freebasic program which was posted, was translating from another language and didn't have extensive knowledge of a BASIC dialect, or didn't care for it.