Browse Source

FL Studio fixes

now supports muted playlist items which are now skipped
fixed channel automation being sent to VST when they should be skipped, added warning too.
new FL Parser
master
Unknown 4 years ago committed by ferris
parent
commit
020b75e15b
  1. 105
      Tests/PlayerTest/Song.h
  2. 10
      WaveSabreConvert/FLConverter.cs
  3. BIN
      WaveSabreConvert/FLParser/Monad.FLParser.dll

105
Tests/PlayerTest/Song.h

@ -6,17 +6,15 @@ WaveSabreCore::Device *SongFactory(SongRenderer::DeviceId id)
switch (id)
{
case SongRenderer::DeviceId::Slaughter: return new WaveSabreCore::Slaughter();
case SongRenderer::DeviceId::Smasher: return new WaveSabreCore::Smasher();
case SongRenderer::DeviceId::Adultery: return new WaveSabreCore::Adultery();
}
return nullptr;
}
const unsigned char SongBlob[] =
{
0x78, 0x00, 0x00, 0x00, 0x44, 0xac, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x40, 0x04, 0x00, 0x00, 0x00,
0x01, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x8c, 0x00, 0x00, 0x00, 0x44, 0xac, 0x00, 0x00, 0x25, 0x49,
0x92, 0x24, 0x49, 0x92, 0x24, 0x40, 0x01, 0x00, 0x00, 0x00,
0x01, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -24,77 +22,44 @@ const unsigned char SongBlob[] =
0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x31, 0xdf, 0x7f, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x6a,
0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x69,
0xb4, 0xe7, 0x3c, 0x00, 0x00, 0x00, 0x3f, 0x0a, 0xd7, 0x23,
0x3c, 0x00, 0x00, 0x00, 0x00, 0x6a, 0xb4, 0xe7, 0x3c, 0x00,
0x3c, 0x00, 0x00, 0x00, 0x00, 0x69, 0xb4, 0xe7, 0x3c, 0x00,
0x00, 0x80, 0x3f, 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00,
0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69,
0xb4, 0xe7, 0x3c, 0x00, 0x00, 0x00, 0x3f, 0x0a, 0xd7, 0x23,
0x3c, 0x00, 0x00, 0x00, 0x3f, 0xa4, 0x00, 0x00, 0x00, 0x07,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x6a, 0xb4, 0xe7, 0x3c, 0x90, 0x49, 0x4c, 0x3e, 0x52, 0xb8,
0x5e, 0x3f, 0x20, 0x00, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x0c,
0xd7, 0x23, 0x3e, 0x09, 0xd7, 0x63, 0x3f, 0x6a, 0xb4, 0xe7,
0x3c, 0xdc, 0xd2, 0xad, 0x3e, 0x00, 0x00, 0x00, 0x3f, 0x20,
0x00, 0x00, 0x00, 0x0b, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x42, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3c, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00, 0x00,
0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00,
0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24,
0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea,
0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc,
0xea, 0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00,
0xbc, 0xea, 0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00,
0x00, 0xbc, 0xea, 0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24,
0x00, 0x00, 0xbc, 0x8a, 0x73, 0x02, 0x00, 0x3c, 0x64, 0xea,
0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00, 0x00, 0x3c, 0x64,
0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00, 0x00, 0x3c,
0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00, 0x00,
0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24, 0x00,
0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea, 0x24,
0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc, 0xea,
0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00, 0xbc,
0xea, 0x24, 0x00, 0x00, 0x3c, 0x64, 0xea, 0x24, 0x00, 0x00,
0xbc, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xc5,
0x8f, 0x61, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x31, 0xdf,
0x7f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x6a, 0xb4, 0xe7, 0x3c, 0x00, 0x00,
0x80, 0x3f, 0x0a, 0xd7, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x80, 0x3f, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x77,
0x11, 0x2b, 0x00, 0x00, 0xb0, 0x11, 0x2b, 0x00, 0x00, 0x30,
0x77, 0x11, 0x2b, 0x00, 0x00, 0xb0, 0x11, 0x2b, 0x00, 0x00,
0x30, 0x77, 0x11, 0x2b, 0x00, 0x00, 0xb0, 0x11, 0x2b, 0x00,
0x00, 0x30, 0x77, 0x11, 0x2b, 0x00, 0x00, 0xb0, 0x99, 0x83,
0x01, 0x00, 0x30, 0x77, 0x11, 0x2b, 0x00, 0x00, 0xb0, 0x11,
0x2b, 0x00, 0x00, 0x30, 0x77, 0x11, 0x2b, 0x00, 0x00, 0xb0,
0x11, 0x2b, 0x00, 0x00, 0x30, 0x77, 0x11, 0x2b, 0x00, 0x00,
0xb0, 0x11, 0x2b, 0x00, 0x00, 0x30, 0x77, 0x11, 0x2b, 0x00,
0x00, 0xb0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x24, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00,
0x00, 0x27, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa7, 0x00, 0x00,
0x00, 0x00, 0x26, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa6, 0x00,
0x00, 0x00, 0x00, 0x29, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa9,
0x00, 0x00, 0x00, 0x00, 0x24, 0x60, 0x22, 0x56, 0x00, 0x00,
0xa4, 0x00, 0x00, 0x00, 0x00, 0x27, 0x60, 0x22, 0x56, 0x00,
0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x26, 0x60, 0x22, 0x56,
0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0x22,
0x56, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x24, 0x60,
0x22, 0x56, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x27,
0x60, 0x22, 0x56, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00,
0x26, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00,
0x00, 0x29, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa9, 0x00, 0x00,
0x00, 0x00, 0x24, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa4, 0x00,
0x00, 0x00, 0x00, 0x27, 0x60, 0x22, 0x56, 0x00, 0x00, 0xa7,
0x00, 0x00, 0x00, 0x00, 0x26, 0x60, 0x22, 0x56, 0x00, 0x00,
0xa6, 0x00, 0x00, 0x00, 0x00, 0x29, 0x60, 0x22, 0x56, 0x00,
0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5,
0x8f, 0x61, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
SongRenderer::Song Song = {

10
WaveSabreConvert/FLConverter.cs

@ -281,6 +281,8 @@ namespace WaveSabreConvert
if (pl is PatternPlaylistItem)
{
var pl2 = (PatternPlaylistItem) pl;
if (pl2.Muted) continue; // muted, skip it
int position = pl.Position;
foreach (var notes in pl2.Pattern.Notes)
{
@ -354,6 +356,8 @@ namespace WaveSabreConvert
if (pl is ChannelPlaylistItem)
{
var pl2 = (ChannelPlaylistItem) pl;
if (pl2.Muted) continue;
var startOffset = pl2.StartOffset < 0 ? 0 : pl2.StartOffset;
var endOffset = pl2.EndOffset < 0 ? pl2.Length : pl2.EndOffset;
@ -365,6 +369,12 @@ namespace WaveSabreConvert
if (chan.Id == auto.Channel.Id)
{
if (!auto.VstParameter)
{
logger.WriteLine("WARNING: Track {0} contains channel param automation which is not supported", flTrack.Name);
continue;
}
var newAuto = track.Automations.FirstOrDefault(a => a.ParamId == auto.Parameter);
if (newAuto == null)
{

BIN
WaveSabreConvert/FLParser/Monad.FLParser.dll

Binary file not shown.
Loading…
Cancel
Save