Hi there,
I just discovered Fugio and it looks like this can solve my need of a MIDI VIDEO PLAYER.
But I really can't find Examples or a Documentation hat helps me.
Can someone give me an example how to convert the MIDI values NOTE and CHANNEL to a filename for the Mediaplayer
for example:
MIDI Channel 1 and MIDI Note 77 returns filename "1/77.mp4" (File "77.mp4" in Folder "1")
MIDI Channel 2 and MIDI Note 66 returns filename "2/66.mp4"
...
Any help would be very appreciated.
Cheers
Andy
MIDI Note to Filename
-
- Posts: 1
- Joined: Mon May 28, 2018 10:48 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: MIDI Note to Filename
Hi Andy, I just discovered Fugio as well. Yeah, I wish there were more resources about it. Hopefully, that'll come in time.
-
- Posts: 3
- Joined: Mon Jun 04, 2018 10:14 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: MIDI Note to Filename
Seems this could be done with LUA.
Any idea?
Any idea?
-
- Posts: 3
- Joined: Mon Jun 04, 2018 10:14 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: MIDI Note to Filename
Could this work?
Code: Select all
fugio = require "fugio"
PinInput1 = fugio.input( "Input1" )
PinInput2 = fugio.input( "Input2" )
PinOutput = fugio.output( "Output" )
local filepath = "C:/videos/"
local suffix = ".mp4"
functions main()
-- putting it all together
local midichannel = PinOutput1:get()
local midinote = PinOutput2:get()
local filename = filepath .. midichannel .. "/" .. midinote .. suffix
-- log output
fugio.log( midichannel )
fugio.log( midinote )
fugio.log( filename )
-- check if file exists
local f=io.open(filename,"r")
if f~=nil then
-- file does not exist
fugio.log( "File does not exist" )
else
-- file exists
fugio.log( "File does exist" )
PinOutput:set( filename )
end
io.close(f)
end
Who is online
Users browsing this forum: No registered users and 0 guests