├── .angulardoc.json ├── .gitattributes ├── .gitignore ├── BMEngine ├── BufferByteReader.cs ├── FastList.cs ├── GLTextEngine.cs ├── GLUtils.cs ├── IPluginRender.cs ├── MidiFile.cs ├── MidiInfo.cs ├── MidiTrack.cs ├── NoteColorPalettePick.xaml ├── NoteColorPalettePick.xaml.cs ├── OpenTK.dll.config ├── PluginUtils.cs ├── Properties │ └── AssemblyInfo.cs ├── RenderSettings.cs ├── ScriptedCompile │ ├── ExtraUI.cs │ └── IO.cs ├── UI │ ├── BBinding.cs │ ├── BetterCheckbox.xaml │ ├── BetterCheckbox.xaml.cs │ ├── BetterRadio.xaml │ ├── BetterRadio.xaml.cs │ ├── BetterSlider.xaml │ ├── BetterSlider.xaml.cs │ ├── Colors.xaml │ ├── Converters.cs │ ├── HexColorPicker.xaml │ ├── HexColorPicker.xaml.cs │ ├── InplaceConverter.cs │ ├── ListBox.xaml │ ├── Material.xaml │ ├── NumberSelect.xaml │ ├── NumberSelect.xaml.cs │ ├── RippleEffectDecorator.cs │ ├── Scrollbar.xaml │ ├── ValueSlider.xaml │ └── ValueSlider.xaml.cs ├── ZenithEngine.csproj └── packages.config ├── Black-Midi-Render ├── App.config ├── GLPostbuffer.cs ├── GLUtils.cs ├── KDMAPI.cs ├── Languages │ └── en │ │ └── window.xaml ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── OpenTK.dll.config ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── RenderWindow.cs ├── Settings.cs ├── Zenith.csproj ├── icon.ico ├── icon.png └── packages.config ├── ClassicRender ├── ClassicRender.csproj ├── Languages │ └── en │ │ └── classic.xaml ├── OpenTK.dll.config ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── packages.config └── preview.png ├── FlatRender ├── FlatRender.csproj ├── Languages │ └── en │ │ └── flat.xaml ├── OpenTK.dll.config ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── packages.config └── preview.png ├── LICENSE ├── MidiTrailRender ├── AuraSelect.xaml ├── AuraSelect.xaml.cs ├── Languages │ └── en │ │ └── miditrail.xaml ├── MidiTrailRender.csproj ├── OpenTK.dll.config ├── ProfileManager.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── Util.cs ├── aura_ring.png ├── packages.config └── preview.png ├── NoteCountRender ├── Languages │ └── en │ │ └── notecounter.xaml ├── NoteCountRender.csproj ├── OpenTK.dll.config ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── packages.config └── preview.png ├── PFARender ├── .gitignore ├── Languages │ └── en │ │ └── pfa.xaml ├── OpenTK.dll.config ├── PFARender.csproj ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── packages.config └── preview.png ├── README-plugin.md ├── README.md ├── ScriptedRenderer ├── Languages │ └── en │ │ └── scripted.xaml ├── OpenTK.dll.config ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Render.cs ├── Resources │ ├── Examples.zip │ └── preview.png ├── Script.cs ├── ScriptedRender.csproj ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs └── packages.config ├── TexturedRender ├── Languages │ └── en │ │ └── textured.xaml ├── OpenTK.dll.config ├── Pack.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── README.md ├── Render.cs ├── Resources │ ├── bar.png │ ├── keyBlack.png │ ├── keyBlackPressed.png │ ├── keyWhite.png │ ├── keyWhitePressed.png │ ├── note.png │ ├── noteEdge.png │ ├── pack.json │ ├── pluginPreview.png │ └── preview.png ├── Settings.cs ├── SettingsCtrl.xaml ├── SettingsCtrl.xaml.cs ├── TexturedRender.csproj └── packages.config ├── Zenith.sln ├── ZenithInstaller ├── App.config ├── App.xaml ├── App.xaml.cs ├── FodyWeavers.xml ├── FodyWeavers.xsd ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── ZenithInstaller.csproj ├── ZenithInstaller_nf5vy1mn_wpftmp.csproj ├── icon.ico └── packages.config ├── ZenithShared ├── InstallFailedException.cs ├── Properties │ └── AssemblyInfo.cs ├── ZenithLanguages.cs ├── ZenithShared.csproj ├── ZenithUpdates.cs └── packages.config └── build.bat /.angulardoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "repoId": "132e1921-3d2f-40c3-9aad-ca5bf9141f7d", 3 | "lastSync": 0 4 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /BMEngine/BufferByteReader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | 9 | namespace ZenithEngine 10 | { 11 | public class BufferByteReader 12 | { 13 | long pos; 14 | int buffersize; 15 | int bufferpos; 16 | int maxbufferpos; 17 | long streamstart; 18 | long streamlen; 19 | Stream stream; 20 | byte[] buffer; 21 | byte[] bufferNext; 22 | Task nextReader = null; 23 | 24 | public BufferByteReader(Stream stream, int buffersize, long streamstart, long streamlen) 25 | { 26 | if (buffersize > streamlen) buffersize = (int)streamlen; 27 | this.buffersize = buffersize; 28 | this.streamstart = streamstart; 29 | this.streamlen = streamlen; 30 | this.stream = stream; 31 | buffer = new byte[buffersize]; 32 | bufferNext = new byte[buffersize]; 33 | UpdateBuffer(pos, true); 34 | } 35 | 36 | void UpdateBuffer(long pos, bool first = false) 37 | { 38 | if (first) 39 | { 40 | nextReader = Task.Run(() => 41 | { 42 | lock (stream) 43 | { 44 | stream.Position = pos + streamstart; 45 | stream.Read(bufferNext, 0, buffersize); 46 | } 47 | }); 48 | } 49 | nextReader.GetAwaiter().GetResult(); 50 | Buffer.BlockCopy(bufferNext, 0, buffer, 0, buffersize); 51 | nextReader = Task.Run(() => 52 | { 53 | lock (stream) 54 | { 55 | stream.Position = pos + streamstart + buffersize; 56 | stream.Read(bufferNext, 0, buffersize); 57 | } 58 | }); 59 | nextReader.GetAwaiter().GetResult(); 60 | //lock (stream) 61 | //{ 62 | // stream.Position = pos + streamstart; 63 | // stream.Read(buffer, 0, buffersize); 64 | //} 65 | maxbufferpos = (int)Math.Min(streamlen - pos + 1, buffersize); 66 | } 67 | 68 | public long Location => pos; 69 | 70 | public int Pushback = -1; 71 | 72 | public byte Read() 73 | { 74 | if (Pushback != -1) 75 | { 76 | byte _b = (byte)Pushback; 77 | Pushback = -1; 78 | return _b; 79 | } 80 | byte b = buffer[bufferpos++]; 81 | if (bufferpos < maxbufferpos) return b; 82 | else if (bufferpos >= buffersize) 83 | { 84 | pos += bufferpos; 85 | bufferpos = 0; 86 | UpdateBuffer(pos); 87 | return b; 88 | } 89 | else throw new IndexOutOfRangeException(); 90 | } 91 | 92 | public byte ReadFast() 93 | { 94 | byte b = buffer[bufferpos++]; 95 | if (bufferpos < maxbufferpos) return b; 96 | else if (bufferpos >= buffersize) 97 | { 98 | pos += bufferpos; 99 | bufferpos = 0; 100 | UpdateBuffer(pos); 101 | return b; 102 | } 103 | else throw new IndexOutOfRangeException(); 104 | } 105 | 106 | public void Reset() 107 | { 108 | pos = 0; 109 | bufferpos = 0; 110 | UpdateBuffer(pos, true); 111 | } 112 | 113 | public void Skip(int count) 114 | { 115 | for (int i = 0; i < count; i++) 116 | { 117 | if(Pushback != -1) 118 | { 119 | Pushback = -1; 120 | continue; 121 | } 122 | bufferpos++; 123 | if (bufferpos < maxbufferpos) continue; 124 | if (bufferpos >= buffersize) 125 | { 126 | pos += bufferpos; 127 | bufferpos = 0; 128 | UpdateBuffer(pos); 129 | } 130 | else throw new IndexOutOfRangeException(); 131 | } 132 | } 133 | 134 | public void Dispose() 135 | { 136 | buffer = null; 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /BMEngine/FastList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace ZenithEngine 9 | { 10 | public class FastList : IEnumerable 11 | { 12 | private class ListItem 13 | { 14 | public ListItem Next; 15 | public T item; 16 | } 17 | 18 | private ListItem root = new ListItem(); 19 | private ListItem last = null; 20 | 21 | public T First 22 | { 23 | get 24 | { 25 | if (root.Next != null) return root.Next.item; 26 | else return default(T); 27 | } 28 | } 29 | public class Iterator 30 | { 31 | FastList _ilist; 32 | 33 | private ListItem prev; 34 | private ListItem curr; 35 | 36 | internal Iterator(FastList ll) 37 | { 38 | _ilist = ll; 39 | Reset(); 40 | } 41 | 42 | public bool MoveNext(out T v) 43 | { 44 | ListItem ll = curr.Next; 45 | 46 | if (ll == null) 47 | { 48 | v = default(T); 49 | _ilist.last = curr; 50 | return false; 51 | } 52 | 53 | v = ll.item; 54 | 55 | prev = curr; 56 | curr = ll; 57 | 58 | return true; 59 | } 60 | 61 | public void Remove() 62 | { 63 | if (_ilist.last.Equals(curr)) _ilist.last = prev; 64 | prev.Next = curr.Next; 65 | } 66 | 67 | public void Insert(T item) 68 | { 69 | var i = new ListItem() 70 | { 71 | item = item, 72 | Next = curr 73 | }; 74 | if (prev == null) 75 | _ilist.root.Next = i; 76 | else 77 | prev.Next = i; 78 | //if (curr.Equals(_ilist.last)) 79 | //{ 80 | // _ilist.last = curr; 81 | //} 82 | } 83 | 84 | public void Reset() 85 | { 86 | this.prev = null; 87 | this.curr = _ilist.root; 88 | } 89 | } 90 | 91 | public class FastIterator : IEnumerator 92 | { 93 | FastList _ilist; 94 | 95 | private ListItem curr; 96 | 97 | internal FastIterator(FastList ll) 98 | { 99 | _ilist = ll; 100 | Reset(); 101 | } 102 | 103 | public object Current => curr.item; 104 | 105 | T IEnumerator.Current => curr.item; 106 | 107 | public void Dispose() 108 | { 109 | 110 | } 111 | 112 | public bool MoveNext() 113 | { 114 | try 115 | { 116 | curr = curr.Next; 117 | 118 | return curr != null; 119 | } 120 | catch { return false; } 121 | } 122 | 123 | public void Reset() 124 | { 125 | this.curr = _ilist.root; 126 | } 127 | } 128 | 129 | public void Add(T item) 130 | { 131 | ListItem li = new ListItem(); 132 | li.item = item; 133 | 134 | if (root.Next != null && last != null) 135 | { 136 | while (last.Next != null) last = last.Next; 137 | last.Next = li; 138 | } 139 | else 140 | root.Next = li; 141 | 142 | last = li; 143 | } 144 | 145 | public T Pop() 146 | { 147 | ListItem el = root.Next; 148 | root.Next = el.Next; 149 | return el.item; 150 | } 151 | 152 | public Iterator Iterate() 153 | { 154 | return new Iterator(this); 155 | } 156 | 157 | public bool ZeroLen => root.Next == null; 158 | 159 | public IEnumerator FastIterate() 160 | { 161 | return new FastIterator(this); 162 | } 163 | 164 | public void Unlink() 165 | { 166 | root.Next = null; 167 | last = null; 168 | } 169 | 170 | public int Count() 171 | { 172 | int cnt = 0; 173 | 174 | ListItem li = root.Next; 175 | while (li != null) 176 | { 177 | cnt++; 178 | li = li.Next; 179 | } 180 | 181 | return cnt; 182 | } 183 | 184 | public bool Any() 185 | { 186 | return root.Next != null; 187 | } 188 | 189 | IEnumerator IEnumerable.GetEnumerator() 190 | { 191 | return FastIterate(); 192 | } 193 | 194 | public IEnumerator GetEnumerator() 195 | { 196 | return FastIterate(); 197 | } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /BMEngine/GLUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using OpenTK.Graphics.OpenGL; 8 | 9 | namespace ZenithEngine 10 | { 11 | public static class GLUtils 12 | { 13 | public static int MakeShaderProgram(string name) 14 | { 15 | int _vertexObj = GL.CreateShader(ShaderType.VertexShader); 16 | int _fragObj = GL.CreateShader(ShaderType.FragmentShader); 17 | int statusCode; 18 | string info; 19 | 20 | GL.ShaderSource(_vertexObj, File.ReadAllText("Shaders\\" + name + ".vert")); 21 | GL.CompileShader(_vertexObj); 22 | info = GL.GetShaderInfoLog(_vertexObj); 23 | GL.GetShader(_vertexObj, ShaderParameter.CompileStatus, out statusCode); 24 | if (statusCode != 1) throw new ApplicationException(info); 25 | 26 | GL.ShaderSource(_fragObj, File.ReadAllText("Shaders\\" + name + ".frag")); 27 | GL.CompileShader(_fragObj); 28 | info = GL.GetShaderInfoLog(_fragObj); 29 | GL.GetShader(_fragObj, ShaderParameter.CompileStatus, out statusCode); 30 | if (statusCode != 1) throw new ApplicationException(info); 31 | 32 | int shader = GL.CreateProgram(); 33 | GL.AttachShader(shader, _fragObj); 34 | GL.AttachShader(shader, _vertexObj); 35 | GL.LinkProgram(shader); 36 | return shader; 37 | } 38 | 39 | public static int MakePostShaderProgram(string name) 40 | { 41 | int _vertexObj = GL.CreateShader(ShaderType.VertexShader); 42 | int _fragObj = GL.CreateShader(ShaderType.FragmentShader); 43 | int statusCode; 44 | string info; 45 | 46 | GL.ShaderSource(_vertexObj, File.ReadAllText("Shaders\\Post\\post.vert")); 47 | GL.CompileShader(_vertexObj); 48 | info = GL.GetShaderInfoLog(_vertexObj); 49 | GL.GetShader(_vertexObj, ShaderParameter.CompileStatus, out statusCode); 50 | if (statusCode != 1) throw new ApplicationException(info); 51 | 52 | GL.ShaderSource(_fragObj, File.ReadAllText("Shaders\\Post\\" + name + ".frag")); 53 | GL.CompileShader(_fragObj); 54 | info = GL.GetShaderInfoLog(_fragObj); 55 | GL.GetShader(_fragObj, ShaderParameter.CompileStatus, out statusCode); 56 | if (statusCode != 1) throw new ApplicationException(info); 57 | 58 | int shader = GL.CreateProgram(); 59 | GL.AttachShader(shader, _fragObj); 60 | GL.AttachShader(shader, _vertexObj); 61 | GL.LinkProgram(shader); 62 | return shader; 63 | } 64 | 65 | public static void GenFrameBufferTexture(int width, int height, out int fbuffer, out int rtexture) 66 | { 67 | fbuffer = GL.GenFramebuffer(); 68 | GL.BindFramebuffer(FramebufferTarget.Framebuffer, fbuffer); 69 | rtexture = GL.GenTexture(); 70 | GL.BindTexture(TextureTarget.Texture2D, rtexture); 71 | GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height, 0, PixelFormat.Rgba, PixelType.Byte, (IntPtr)0); 72 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); 73 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); 74 | GL.FramebufferTexture(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, rtexture, 0); 75 | if (GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer) != FramebufferErrorCode.FramebufferComplete) throw new Exception(); 76 | } 77 | 78 | public static void GenFrameBufferTexture3d(int width, int height, out int fbuffer, out int rtexture, out int depthrenderbuffer) 79 | { 80 | fbuffer = GL.GenFramebuffer(); 81 | GL.BindFramebuffer(FramebufferTarget.Framebuffer, fbuffer); 82 | rtexture = GL.GenTexture(); 83 | GL.BindTexture(TextureTarget.Texture2D, rtexture); 84 | GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height, 0, PixelFormat.Rgba, PixelType.Byte, (IntPtr)0); 85 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); 86 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); 87 | depthrenderbuffer = GL.GenRenderbuffer(); 88 | GL.BindRenderbuffer(RenderbufferTarget.Renderbuffer, depthrenderbuffer); 89 | GL.RenderbufferStorage(RenderbufferTarget.Renderbuffer, RenderbufferStorage.DepthComponent, width, height); 90 | GL.FramebufferRenderbuffer(FramebufferTarget.Framebuffer, FramebufferAttachment.DepthAttachment, RenderbufferTarget.Renderbuffer, depthrenderbuffer); 91 | 92 | GL.FramebufferTexture(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, rtexture, 0); 93 | if (GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer) != FramebufferErrorCode.FramebufferComplete) throw new Exception(); 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /BMEngine/IPluginRender.cs: -------------------------------------------------------------------------------- 1 | using OpenTK.Graphics; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows.Controls; 8 | using System.Windows.Media; 9 | 10 | namespace ZenithEngine 11 | { 12 | public interface IPluginRender : IDisposable 13 | { 14 | string Name { get; } 15 | string Description { get; } 16 | bool Initialized { get; } 17 | ImageSource PreviewImage { get; } 18 | bool ManualNoteDelete { get; } 19 | double NoteCollectorOffset { get; } 20 | 21 | NoteColor[][] NoteColors { set; } 22 | double Tempo { set; } 23 | 24 | MidiInfo CurrentMidi { set; } 25 | 26 | string LanguageDictName { get; } 27 | 28 | double NoteScreenTime { get; } 29 | long LastNoteCount { get; } 30 | Control SettingsControl { get; } 31 | 32 | void Init(); 33 | void RenderFrame(FastList notes, double midiTime, int finalCompositeBuff); 34 | void ReloadTrackColors(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /BMEngine/MidiInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ZenithEngine 8 | { 9 | public class MidiInfo 10 | { 11 | public int division; 12 | public int trackCount; 13 | public long noteCount; 14 | public int firstTempo; 15 | public long tickLength; 16 | public double secondsLength; 17 | public TimeSignature timeSig = new TimeSignature() { numerator = 4, denominator = 4 }; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BMEngine/NoteColorPalettePick.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 71 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /BMEngine/UI/ValueSlider.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /BMEngine/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Black-Midi-Render/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Black-Midi-Render/GLPostbuffer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using ZenithEngine; 7 | using OpenTK.Graphics.OpenGL; 8 | 9 | namespace Zenith_MIDI 10 | { 11 | class GLPostbuffer: IDisposable 12 | { 13 | public int BufferID { get; private set; } 14 | public int TextureID { get; private set; } 15 | 16 | public GLPostbuffer(int width, int height) 17 | { 18 | int b, t; 19 | GLUtils.GenFrameBufferTexture(width, height, out b, out t); 20 | BufferID = b; 21 | TextureID = t; 22 | } 23 | 24 | public void BindBuffer() 25 | { 26 | GL.BindFramebuffer(FramebufferTarget.Framebuffer, BufferID); 27 | } 28 | 29 | public void BindTexture() 30 | { 31 | GL.BindTexture(TextureTarget.Texture2D, TextureID); 32 | } 33 | 34 | public static void UnbindBuffers() 35 | { 36 | GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0); 37 | } 38 | 39 | public static void UnbindTextures() 40 | { 41 | GL.BindTexture(TextureTarget.Texture2D, 0); 42 | } 43 | 44 | public void Dispose() 45 | { 46 | GL.DeleteFramebuffer(BufferID); 47 | GL.DeleteTexture(TextureID); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Black-Midi-Render/GLUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using OpenTK.Graphics.OpenGL; 8 | 9 | namespace Zenith_MIDI 10 | { 11 | static class GLUtils 12 | { 13 | public static int MakeShaderProgram(string name) 14 | { 15 | int _vertexObj = GL.CreateShader(ShaderType.VertexShader); 16 | int _fragObj = GL.CreateShader(ShaderType.FragmentShader); 17 | int statusCode; 18 | string info; 19 | 20 | GL.ShaderSource(_vertexObj, File.ReadAllText("Shaders\\" + name + ".vert")); 21 | GL.CompileShader(_vertexObj); 22 | info = GL.GetShaderInfoLog(_vertexObj); 23 | GL.GetShader(_vertexObj, ShaderParameter.CompileStatus, out statusCode); 24 | if (statusCode != 1) throw new ApplicationException(info); 25 | 26 | GL.ShaderSource(_fragObj, File.ReadAllText("Shaders\\" + name + ".frag")); 27 | GL.CompileShader(_fragObj); 28 | info = GL.GetShaderInfoLog(_fragObj); 29 | GL.GetShader(_fragObj, ShaderParameter.CompileStatus, out statusCode); 30 | if (statusCode != 1) throw new ApplicationException(info); 31 | 32 | int shader = GL.CreateProgram(); 33 | GL.AttachShader(shader, _fragObj); 34 | GL.AttachShader(shader, _vertexObj); 35 | GL.LinkProgram(shader); 36 | return shader; 37 | } 38 | 39 | public static int MakePostShaderProgram(string name) 40 | { 41 | int _vertexObj = GL.CreateShader(ShaderType.VertexShader); 42 | int _fragObj = GL.CreateShader(ShaderType.FragmentShader); 43 | int statusCode; 44 | string info; 45 | 46 | GL.ShaderSource(_vertexObj, File.ReadAllText("Shaders\\Post\\post.vert")); 47 | GL.CompileShader(_vertexObj); 48 | info = GL.GetShaderInfoLog(_vertexObj); 49 | GL.GetShader(_vertexObj, ShaderParameter.CompileStatus, out statusCode); 50 | if (statusCode != 1) throw new ApplicationException(info); 51 | 52 | GL.ShaderSource(_fragObj, File.ReadAllText("Shaders\\Post\\" + name + ".frag")); 53 | GL.CompileShader(_fragObj); 54 | info = GL.GetShaderInfoLog(_fragObj); 55 | GL.GetShader(_fragObj, ShaderParameter.CompileStatus, out statusCode); 56 | if (statusCode != 1) throw new ApplicationException(info); 57 | 58 | int shader = GL.CreateProgram(); 59 | GL.AttachShader(shader, _fragObj); 60 | GL.AttachShader(shader, _vertexObj); 61 | GL.LinkProgram(shader); 62 | return shader; 63 | } 64 | 65 | public static void GenFrameBufferTexture(int width, int height, out int fbuffer, out int rtexture) 66 | { 67 | fbuffer = GL.GenFramebuffer(); 68 | GL.BindFramebuffer(FramebufferTarget.Framebuffer, fbuffer); 69 | rtexture = GL.GenTexture(); 70 | GL.BindTexture(TextureTarget.Texture2D, rtexture); 71 | GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height, 0, PixelFormat.Rgba, PixelType.Byte, (IntPtr)0); 72 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); 73 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); 74 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToEdge); 75 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToEdge); 76 | GL.FramebufferTexture(FramebufferTarget.Framebuffer, FramebufferAttachment.ColorAttachment0, rtexture, 0); 77 | if (GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer) != FramebufferErrorCode.FramebufferComplete) throw new Exception(); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Black-Midi-Render/KDMAPI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | static class KDMAPI 9 | { 10 | public struct MIDIHDR 11 | { 12 | string lpdata; 13 | uint dwBufferLength; 14 | uint dwBytesRecorded; 15 | IntPtr dwUser; 16 | uint dwFlags; 17 | IntPtr lpNext; 18 | IntPtr reserved; 19 | uint dwOffset; 20 | IntPtr dwReserved; 21 | } 22 | 23 | public enum OMSettingMode 24 | { 25 | OM_SET = 0x0, 26 | OM_GET = 0x1 27 | } 28 | 29 | public enum OMSetting 30 | { 31 | OM_CAPFRAMERATE = 0x10000, 32 | OM_DEBUGMMODE = 0x10001, 33 | OM_DISABLEFADEOUT = 0x10002, 34 | OM_DONTMISSNOTES = 0x10003, 35 | 36 | OM_ENABLESFX = 0x10004, 37 | OM_FULLVELOCITY = 0x10005, 38 | OM_IGNOREVELOCITYRANGE = 0x10006, 39 | OM_IGNOREALLEVENTS = 0x10007, 40 | OM_IGNORESYSEX = 0x10008, 41 | OM_IGNORESYSRESET = 0x10009, 42 | OM_LIMITRANGETO88 = 0x10010, 43 | OM_MT32MODE = 0x10011, 44 | OM_MONORENDERING = 0x10012, 45 | OM_NOTEOFF1 = 0x10013, 46 | OM_EVENTPROCWITHAUDIO = 0x10014, 47 | OM_SINCINTER = 0x10015, 48 | OM_SLEEPSTATES = 0x10016, 49 | 50 | OM_AUDIOBITDEPTH = 0x10017, 51 | OM_AUDIOFREQ = 0x10018, 52 | OM_CURRENTENGINE = 0x10019, 53 | OM_BUFFERLENGTH = 0x10020, 54 | OM_MAXRENDERINGTIME = 0x10021, 55 | OM_MINIGNOREVELRANGE = 0x10022, 56 | OM_MAXIGNOREVELRANGE = 0x10023, 57 | OM_OUTPUTVOLUME = 0x10024, 58 | OM_TRANSPOSE = 0x10025, 59 | OM_MAXVOICES = 0x10026, 60 | OM_SINCINTERCONV = 0x10027, 61 | 62 | OM_OVERRIDENOTELENGTH = 0x10028, 63 | OM_NOTELENGTH = 0x10029, 64 | OM_ENABLEDELAYNOTEOFF = 0x10030, 65 | OM_DELAYNOTEOFFVAL = 0x10031 66 | } 67 | 68 | public struct DebugInfo 69 | { 70 | float RenderingTime; 71 | int[] ActiveVoices; 72 | 73 | double ASIOInputLatency; 74 | double ASIOOutputLatency; 75 | } 76 | 77 | [DllImport("OmniMIDI\\OmniMIDI")] 78 | public static extern bool ReturnKDMAPIVer(out Int32 Major, out Int32 Minor, out Int32 Build, out Int32 Revision); 79 | 80 | [DllImport("OmniMIDI\\OmniMIDI")] 81 | public static extern bool IsKDMAPIAvailable(); 82 | 83 | [DllImport("OmniMIDI\\OmniMIDI")] 84 | public static extern int InitializeKDMAPIStream(); 85 | 86 | [DllImport("OmniMIDI\\OmniMIDI")] 87 | public static extern int TerminateKDMAPIStream(); 88 | 89 | [DllImport("OmniMIDI\\OmniMIDI")] 90 | public static extern void ResetKDMAPIStream(); 91 | 92 | [DllImport("OmniMIDI\\OmniMIDI")] 93 | public static extern uint SendCustomEvent(uint eventtype, uint chan, uint param); 94 | 95 | [DllImport("OmniMIDI\\OmniMIDI")] 96 | public static extern uint SendDirectData(uint dwMsg); 97 | 98 | [DllImport("OmniMIDI\\OmniMIDI")] 99 | public static extern uint SendDirectDataNoBuf(uint dwMsg); 100 | 101 | [DllImport("OmniMIDI\\OmniMIDI")] 102 | public static extern uint SendDirectLongData(ref MIDIHDR IIMidiHdr); 103 | 104 | [DllImport("OmniMIDI\\OmniMIDI")] 105 | public static extern uint SendDirectLongDataNoBuf(ref MIDIHDR IIMidiHdr); 106 | 107 | [DllImport("OmniMIDI\\OmniMIDI")] 108 | public static extern uint PrepareLongData(ref MIDIHDR IIMidiHdr); 109 | 110 | [DllImport("OmniMIDI\\OmniMIDI")] 111 | public static extern uint UnprepareLongData(ref MIDIHDR IIMidiHdr); 112 | 113 | [DllImport("OmniMIDI\\OmniMIDI")] 114 | public static extern bool DriverSettings(OMSetting Setting, OMSettingMode Mode, IntPtr Value, Int32 cbValue); 115 | 116 | [DllImport("OmniMIDI\\OmniMIDI")] 117 | public static extern void LoadCustomSoundFontsList(ref String Directory); 118 | 119 | [DllImport("OmniMIDI\\OmniMIDI")] 120 | public static extern DebugInfo GetDriverDebugInfo(); 121 | } -------------------------------------------------------------------------------- /Black-Midi-Render/Languages/en/window.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | English 8 | 9 | 10 | General 11 | Modules 12 | Module Settings 13 | Render 14 | 15 | 16 | Downloading update... 17 | Update installed! 18 | Click here to restart Zenith 19 | 20 | 21 | Load 22 | Unload 23 | Width 24 | Height 25 | Browse 26 | FPS 27 | Presets 28 | Warning: Zenith Preview renders in the resolution above, then downscales to the window size 29 | SSAA 30 | Increasing SSAA can greatly increase the smoothness of the pixels but takes much more performance 31 | Language 32 | Render Resolution 33 | Preview Options 34 | Render Options 35 | 36 | 37 | Reload 38 | Start Preview 39 | Stop 40 | 41 | 42 | V-Sync Enabled 43 | Tempo Multiplier 44 | Right click slider or press space to toggle pause 45 | Preview Paused 46 | 47 | 48 | Save Path 49 | Include Audio 50 | Render Transparency Mask 51 | Bitrate 52 | FFMPEG crf: 0 = lossless, 51 = worst quality possible 53 | Delay start (seconds) 54 | ffmpeg debug 55 | Start Render 56 | If uploading the video online, please credit the program 57 | Customize FFmpeg Options (for experts, at your own risk) 58 | 59 | 60 | Realtime Playback 61 | Disable KDMAPI 62 | Enable KDMAPI 63 | Note Size 64 | Tick Based 65 | Time Based 66 | Ignore Color Events 67 | Use Background 68 | 69 | 70 | Press space to toggle pause, press enter on the preview window to fullscreen 71 | 72 | 73 | Reload 74 | Randomise color order 75 | Open Palettes Folder 76 | -------------------------------------------------------------------------------- /Black-Midi-Render/OpenTK.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Black-Midi-Render/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using System.Windows; 10 | using ZenithShared; 11 | 12 | namespace Zenith_MIDI 13 | { 14 | class Program 15 | { 16 | [STAThread] 17 | static void Main(string[] args) 18 | { 19 | #if !DEBUG 20 | try 21 | { 22 | #endif 23 | Console.Title = "Zenith"; 24 | Application app = new Application(); 25 | app.Run(new MainWindow()); 26 | #if !DEBUG 27 | } 28 | catch (Exception e) 29 | { 30 | string msg = e.Message + "\n" + e.Data + "\n"; 31 | msg += e.StackTrace; 32 | MessageBox.Show(msg, "Zenith has crashed!"); 33 | } 34 | #endif 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Black-Midi-Render/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Zenith")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Zenith")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("273da7bd-c89a-4574-97de-af425529faae")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Black-Midi-Render/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Zenith_MIDI.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Zenith_MIDI.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Black-Midi-Render/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.IO.Compression; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Newtonsoft.Json; 9 | using Newtonsoft.Json.Linq; 10 | 11 | namespace Zenith_MIDI 12 | { 13 | class Settings 14 | { 15 | public string PreviousVersion = ""; 16 | public string VersionName = "2.1.5"; 17 | public string LanguagesVersion = ""; 18 | public bool AutoUpdate = false; 19 | public bool Installed = false; 20 | public string SelectedLanguage = ""; 21 | public string InstallerVer = ""; 22 | 23 | public static readonly string SettingsPath = "Settings\\meta.kvs"; 24 | 25 | public Settings() 26 | { 27 | if (!File.Exists(SettingsPath)) 28 | { 29 | if(!Directory.Exists(Path.GetDirectoryName(SettingsPath))) 30 | Directory.CreateDirectory(Path.GetDirectoryName(SettingsPath)); 31 | SaveConfig(); 32 | } 33 | else 34 | { 35 | var stream = new StreamReader(new GZipStream(File.Open(SettingsPath, FileMode.Open), CompressionMode.Decompress)); 36 | var text = stream.ReadToEnd(); 37 | var obj = (dynamic)JsonConvert.DeserializeObject(text); 38 | stream.Close(); 39 | if (obj.version != null) VersionName = obj.version; 40 | if (obj.langsVersion != null) LanguagesVersion = obj.langsVersion; 41 | if (obj.selectedLang != null) SelectedLanguage = obj.selectedLang; 42 | if (obj.autoUpdate != null) AutoUpdate = obj.autoUpdate; 43 | if (obj.installed != null) Installed = obj.installed; 44 | if (obj.installerVer != null) InstallerVer = obj.installerVer; 45 | } 46 | } 47 | 48 | public void SaveConfig() 49 | { 50 | var jobj = new JObject(); 51 | jobj.Add("version", VersionName); 52 | jobj.Add("langsVersion", LanguagesVersion); 53 | jobj.Add("selectedLang", SelectedLanguage); 54 | jobj.Add("autoUpdate", AutoUpdate); 55 | jobj.Add("installed", Installed); 56 | jobj.Add("installerVer", InstallerVer); 57 | 58 | var stream = new StreamWriter(new GZipStream(File.Open(SettingsPath, FileMode.Create), CompressionMode.Compress)); 59 | stream.Write(JsonConvert.SerializeObject(jobj)); 60 | stream.Close(); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Black-Midi-Render/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduano/Zenith-MIDI/36f8ba3c06a6b26b9616f31a6d973d0d676e2747/Black-Midi-Render/icon.ico -------------------------------------------------------------------------------- /Black-Midi-Render/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduano/Zenith-MIDI/36f8ba3c06a6b26b9616f31a6d973d0d676e2747/Black-Midi-Render/icon.png -------------------------------------------------------------------------------- /Black-Midi-Render/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ClassicRender/Languages/en/classic.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | First Note 9 | Last Note 10 | Piano Height % 11 | Note screen time 12 | Same Width Notes 13 | Save 14 | Load Saved 15 | Defaults 16 | Draw black notes above (Warning: SLOWER!!) 17 | 18 | -------------------------------------------------------------------------------- /ClassicRender/OpenTK.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ClassicRender/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ClassicRender")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ClassicRender")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b733d6f1-78a8-43ca-91a3-28fa3e7025d4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ClassicRender/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ClassicRender.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ClassicRender.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap preview { 67 | get { 68 | object obj = ResourceManager.GetObject("preview", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /ClassicRender/README.md: -------------------------------------------------------------------------------- 1 | # Zenith-Classic-Render 2 | -------------------------------------------------------------------------------- /ClassicRender/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace ClassicRender 8 | { 9 | public class Settings 10 | { 11 | public int firstNote = 0; 12 | public int lastNote = 128; 13 | public double pianoHeight = 0.16; 14 | public double deltaTimeOnScreen = 300; 15 | public bool sameWidthNotes = true; 16 | public bool blackNotesAbove = true; 17 | 18 | public string palette = "Random"; 19 | 20 | public float noteBrightness = 1; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ClassicRender/SettingsCtrl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /ClassicRender/SettingsCtrl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Navigation; 15 | using System.Windows.Shapes; 16 | using ZenithEngine; 17 | using Newtonsoft.Json; 18 | 19 | namespace ClassicRender 20 | { 21 | /// 22 | /// Interaction logic for SettingsCtrl.xaml 23 | /// 24 | public partial class SettingsCtrl : UserControl 25 | { 26 | Settings settings; 27 | 28 | public event Action PaletteChanged 29 | { 30 | add { paletteList.PaletteChanged += value; } 31 | remove { paletteList.PaletteChanged -= value; } 32 | } 33 | 34 | public void SetValues() 35 | { 36 | firstNote.Value = settings.firstNote; 37 | lastNote.Value = settings.lastNote - 1; 38 | pianoHeight.Value = (int)(settings.pianoHeight * 100); 39 | noteDeltaScreenTime.Value = settings.deltaTimeOnScreen; 40 | sameWidth.IsChecked = settings.sameWidthNotes; 41 | blackNotesAbove.IsChecked = settings.blackNotesAbove; 42 | paletteList.SelectImage(settings.palette); 43 | } 44 | 45 | public SettingsCtrl(Settings settings) : base() 46 | { 47 | InitializeComponent(); 48 | noteDeltaScreenTime.nudToSlider = v => Math.Log(v, 2); 49 | noteDeltaScreenTime.sliderToNud = v => Math.Pow(2, v); 50 | this.settings = settings; 51 | paletteList.SetPath("Plugins\\Assets\\Palettes"); 52 | SetValues(); 53 | } 54 | 55 | private void Nud_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) 56 | { 57 | if (settings == null) return; 58 | if (sender == firstNote) settings.firstNote = (int)firstNote.Value; 59 | if (sender == lastNote) settings.lastNote = (int)lastNote.Value + 1; 60 | if (sender == pianoHeight) settings.pianoHeight = (double)pianoHeight.Value / 100; 61 | if (sender == noteDeltaScreenTime) settings.deltaTimeOnScreen = (int)noteDeltaScreenTime.Value; 62 | } 63 | 64 | private void NoteDeltaScreenTime_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) 65 | { 66 | if (settings == null) return; 67 | settings.deltaTimeOnScreen = noteDeltaScreenTime.Value; 68 | } 69 | 70 | private void BlackNotesAbove_Checked(object sender, RoutedEventArgs e) 71 | { 72 | if (settings == null) return; 73 | settings.blackNotesAbove = (bool)blackNotesAbove.IsChecked; 74 | } 75 | 76 | private void SameWidth_Checked(object sender, RoutedEventArgs e) 77 | { 78 | if (settings == null) return; 79 | settings.sameWidthNotes = (bool)sameWidth.IsChecked; 80 | blackNotesAbove.IsEnabled = !settings.sameWidthNotes; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /ClassicRender/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ClassicRender/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduano/Zenith-MIDI/36f8ba3c06a6b26b9616f31a6d973d0d676e2747/ClassicRender/preview.png -------------------------------------------------------------------------------- /FlatRender/Languages/en/flat.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | First Note 9 | Last Note 10 | Piano Height % 11 | Note screen time 12 | Same Width Notes 13 | Save 14 | Load Saved 15 | Defaults 16 | 17 | -------------------------------------------------------------------------------- /FlatRender/OpenTK.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /FlatRender/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FlatRender")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FlatRender")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ae59479c-9d0d-464c-a4d3-8fdd7e1f3786")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /FlatRender/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace FlatRender.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FlatRender.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap preview { 67 | get { 68 | object obj = ResourceManager.GetObject("preview", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /FlatRender/README.md: -------------------------------------------------------------------------------- 1 | # Zenith-Flat-Render 2 | -------------------------------------------------------------------------------- /FlatRender/Settings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace FlatRender 8 | { 9 | public class Settings 10 | { 11 | public int firstNote = 0; 12 | public int lastNote = 128; 13 | public double pianoHeight = 0.16; 14 | public double deltaTimeOnScreen = 300; 15 | public bool sameWidthNotes = true; 16 | 17 | public string palette = "Random"; 18 | 19 | public float noteBrightness = 1; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /FlatRender/SettingsCtrl.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /FlatRender/SettingsCtrl.xaml.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows; 9 | using System.Windows.Controls; 10 | using System.Windows.Data; 11 | using System.Windows.Documents; 12 | using System.Windows.Input; 13 | using System.Windows.Media; 14 | using System.Windows.Media.Imaging; 15 | using System.Windows.Navigation; 16 | using System.Windows.Shapes; 17 | 18 | namespace FlatRender 19 | { 20 | /// 21 | /// Interaction logic for SettingsCtrl.xaml 22 | /// 23 | public partial class SettingsCtrl : UserControl 24 | { 25 | Settings settings; 26 | 27 | public event Action PaletteChanged 28 | { 29 | add { paletteList.PaletteChanged += value; } 30 | remove { paletteList.PaletteChanged -= value; } 31 | } 32 | 33 | public void SetValues() 34 | { 35 | firstNote.Value = settings.firstNote; 36 | lastNote.Value = settings.lastNote - 1; 37 | pianoHeight.Value = (int)(settings.pianoHeight * 100); 38 | noteDeltaScreenTime.Value = settings.deltaTimeOnScreen; 39 | sameWidth.IsChecked = settings.sameWidthNotes; 40 | paletteList.SelectImage(settings.palette); 41 | } 42 | 43 | public SettingsCtrl(Settings settings) : base() 44 | { 45 | InitializeComponent(); 46 | noteDeltaScreenTime.nudToSlider = v => Math.Log(v, 2); 47 | noteDeltaScreenTime.sliderToNud = v => Math.Pow(2, v); 48 | this.settings = settings; 49 | paletteList.SetPath("Plugins\\Assets\\Palettes"); 50 | SetValues(); 51 | } 52 | 53 | private void Nud_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) 54 | { 55 | if (settings == null) return; 56 | if (sender == firstNote) settings.firstNote = (int)firstNote.Value; 57 | if (sender == lastNote) settings.lastNote = (int)lastNote.Value + 1; 58 | if (sender == pianoHeight) settings.pianoHeight = (double)pianoHeight.Value / 100; 59 | if (sender == noteDeltaScreenTime) settings.deltaTimeOnScreen = (int)noteDeltaScreenTime.Value; 60 | } 61 | 62 | private void NoteDeltaScreenTime_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) 63 | { 64 | if (settings == null) return; 65 | settings.deltaTimeOnScreen = noteDeltaScreenTime.Value; 66 | } 67 | 68 | private void SameWidth_Checked(object sender, RoutedEventArgs e) 69 | { 70 | if (settings == null) return; 71 | settings.sameWidthNotes = (bool)sameWidth.IsChecked; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /FlatRender/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /FlatRender/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arduano/Zenith-MIDI/36f8ba3c06a6b26b9616f31a6d973d0d676e2747/FlatRender/preview.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | # DON'T BE A DICK PUBLIC LICENSE 2 | 3 | > Version 1.1, December 2016 4 | 5 | > Copyright (C) 2020 Arduano 6 | 7 | Everyone is permitted to copy and distribute verbatim or modified 8 | copies of this license document. 9 | 10 | > DON'T BE A DICK PUBLIC LICENSE 11 | > TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 1. Do whatever you like with the original work, just don't be a dick. 14 | 15 | Being a dick includes - but is not limited to - the following instances: 16 | 17 | 1a. Outright copyright infringement - Don't just copy this and change the name. 18 | 1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. 19 | 1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. 20 | 21 | 2. If you become rich through modifications, related works/services, or supporting the original work, 22 | share the love. Only a dick would make loads off this work and not buy the original work's 23 | creator(s) a pint. 24 | 25 | 3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes 26 | you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back. -------------------------------------------------------------------------------- /MidiTrailRender/AuraSelect.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |