Open MrEricSir opened 12 years ago
These FX commands are #defines which look something like CMD_ARPEGGIO
or VOLCMD_VIBRATO
. With libopenmpt they live in a few places:
Not sure which of these is most pertinent to our purposes.
For Lua users, issuing such commands currently looks like:
song:effectCommand(channel, 17, 120) -- 17 means "tempo"
But should look something like:
song:effectCommand(channel, 'tempo', 120)
Modipulate-lua should map strings to these constants. This could be done easily by keeping a Lua table:
{
arpeggio = 1, -- from CMD_ARPEGGIO
portamentoup = 2, -- from CMD_PORTAMENTOUP
portamentodown = 3, -- from CMD_PORTAMENTODOWN
....
}
Any value not in here would evaluate to nil
, which Modipulate should ignore.
Right now, users have to type in numbers to specify effect/volume commands. This isn't very user friendly.
We should have some type of system of constants in the C layer (#defines, probably) for each of these commands.
In Lua, etc. we'll need to find a way to either copy these or pass them through from the C layer.