class Haematite::SoundFont

Overview

A SoundFont is a collection of samples and parameters used for sample-based synthesis. This is a virtual representation of an on-disk SoundFont.

Defined in:

haematite/soundfont.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(stream : IO) #

Creates a new SoundFont instance by reading data from the given stream.


def self.new(filename : String | Path) #

Loads SoundFont data from the given filename, creating a new SoundFont instance.


Instance Method Detail

def bitsPerSample : Int32 #

The bit depth used for this SoundFont's sample data.


def info : SoundFontInfo | Nil #

The info on this SoundFont.


def info? : SoundFontInfo | Nil | Nil #

The info on this SoundFont.


def instrumentArray : Array(Haematite::Instrument) #

def instruments : Slice(Instrument) #

The instruments defined in this SoundFont.


def presetArray : Array(Haematite::Preset) #

def presets : Slice(Preset) #

The presets stored in this SoundFont.


def sampleHeaderArray : Array(Haematite::SampleHeader) #

def sampleHeaders : Slice(SampleHeader) #

The sample headers for this SoundFont.


def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

def waveData : SoundFontPCMData #

The SoundFont's sample data.