atsushieno / sf2xrni Goto Github PK
View Code? Open in Web Editor NEWConverts SoundFont sf2 file to Renoise XRNI files
Converts SoundFont sf2 file to Renoise XRNI files
* What is this? sf2xrni is a Renoise tool for creating XRNI (instrument) files from a SoundFont sf2 file. * Usage $ (mono) sf2xrni(.exe) sf2-files For mono, you'll need mono 2.8 or later. When you run the tool, a directory is created to contain a set of XRNI files. e.g. for file "foo.sf2" it will create directory "foo". * Conversion Basics A soundfont file contains more than one Presets. A Preset is mapped to an XRN Instrument. A SF2 Preset contains more than one Instruments. An Instrument contains more than one Zones, and each Zone contains a SampleHeader, which is a set of information to retrieve raw sample. BaseNote is set from OverridingRootKey, or OriginalPitch. LoopMode is set from SampleModes. LoopStart/LoopEnd are set from those in SampleHeader. Resulting samples are sorted in KeyRange order and bound to SplitMap. * Dependencies sf2xrni uses a couple of libraries: - NRenoiseTools, to write XRNI files. http://www.codeplex.com/nrenoisetools - NAudio, which contains SoundFont2 file format support. http://naudio.codeplex.com/ - ICSharpCode.SharpZipLib. It is just NRenoiseTools dependency http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx The prebuilt assemblies are in the repo. Note that I didn't copy NAudio.dll from NRenoiseTools release binaries since 0.1.3. It is because the NAudio version in NRenoiseTools misses some required bits used by sf2xrni. I have imported it from NAudio project itself.
I think it would be super-useful to convert in the other direction. I will look into it.
I'm not well versed At All when it comes to compiling programs and tools I find on github. This is the 3rd time I've tried tackling putting this together this year and I'm Desperate. I've read the forum post you made on this from over an actual decade ago and it seems that there is supposed to be an exe (sf2xrni.exe) that you run using another tool called "mono" (also don't know what this is). The exe Isn't in the repo anymore and I assume that I'm supposed to make it using the makefile. My problem comes when I try to make it, as the command prompt tells that there's a missing file. No idea what It's looking for or what could be causing it. image attached.
With some sf2 files, looping the sample is broken. The intended start point of the loop becomes the end point, and the start of the sample serves as a start point. Here's a sf2 file in which the problem occurs for reference.
(On Windows, compiled from source with nmake of Visual Studio 2017.)
For example, No.207 Koto in ChoriumRevA.sf2 gives some strange sound.
`csc -platform:x86 -r:NAudio.dll -r:NRenoiseTools.dll sf2xrni.cs -debug
Microsoft (R) Visual C# Compiler version 2.0.0.61404
Copyright (C) Microsoft Corporation. All rights reserved.
error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.amd64.dll'
make: *** [Makefile:6: sf2xrni.exe] Error 1
`
Removing -debug from the Makefile fixed this issue for me.
Here's the error output:
Unhandled Exception:
System.IO.DirectoryNotFoundException: Could not find a part of the path "/media/lucas/Arquivos/audio-projects/Soundfonts/Games/fluidvolt-mother-3-soundfont/Mother 3./78_Synth 1/9.xrni".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode)
at Commons.Music.Sf2Xrni.Sf2XrniStreamingConverter.OnXrniCreated (NRenoiseTools.RenoiseInstrument xrni) [0x00000] in <filename unknown>:0
at Commons.Music.Sf2Xrni.Sf2Xrni.Import (System.String file, System.String filter) [0x00000] in <filename unknown>:0
at Commons.Music.Sf2Xrni.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "/media/lucas/Arquivos/audio-projects/Soundfonts/Games/fluidvolt-mother-3-soundfont/Mother 3./78_Synth 1/9.xrni".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode)
at Commons.Music.Sf2Xrni.Sf2XrniStreamingConverter.OnXrniCreated (NRenoiseTools.RenoiseInstrument xrni) [0x00000] in <filename unknown>:0
at Commons.Music.Sf2Xrni.Sf2Xrni.Import (System.String file, System.String filter) [0x00000] in <filename unknown>:0
at Commons.Music.Sf2Xrni.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
You can find the soundfont I was trying it on here https://musical-artifacts.com/artifacts/188
probably it maps instruments to oct.0 while it should be somewhere around o4.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.