Coder Social home page Coder Social logo

sf2xrni's Introduction

* 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.



sf2xrni's People

Contributors

atsushieno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sf2xrni's Issues

xrni2sf2

I think it would be super-useful to convert in the other direction. I will look into it.

not an issue. just need help

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.
image

Incorrect loop start & end points

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.

MegaManX.zip

(On Windows, compiled from source with nmake of Visual Studio 2017.)

Had to remove -debug flag from Makefile to compile on linux

`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.

Problem with SF2 presets with the '/' character in their names

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.