Skip to content

Node.js bindings for the FluidSynth software synthesizer.

Notifications You must be signed in to change notification settings

ad-si/fluidnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FluidNode

FluidNode is a wrapper for the FluidSynth software synthesizer.

Installation

npm install fluidnode

Futhermore, the fluidsynth binary must be installed on your system. You can find installation instructions for your system here.

Usage

Use FluidNode in your files like this:

import "fs" from "fs/promises"
import { renderFile } from "fluidnode"

const wavBuffer = await renderFile(
  filePath, // Path to MIDI file to get rendered
  options,  // Set gain and alternative soundfont path (both optional)
)

await fs.writeFile("out.wav", wavBuffer, { encoding: "binary" })

Default soundfont is GeneralUser.

Check out the [test/main.ts] file for a complete example.

Development

Check out the makefile for available commands.