Class: FluidSynth::FluidSampleT

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/ffi-fluidsynth.rb

Overview

< SoundFont preset

Fields:

:name

(Array<Integer>) < Sample name

:start

(Integer) < Start index

:end

(Integer) < End index, index of last valid sample point (contrary to SF spec)

:loopstart

(Integer) < Loop start index

:loopend

(Integer) < Loop end index, first point following the loop (superimposed on loopstart)

:samplerate

(Integer) < Sample rate

:origpitch

(Integer) < Original pitch (MIDI note number, 0-127)

:pitchadj

(Integer) < Fine pitch adjustment (+/- 99 cents)

:sampletype

(Integer) < Values: #FLUID_SAMPLETYPE_MONO, FLUID_SAMPLETYPE_RIGHT, FLUID_SAMPLETYPE_LEFT, FLUID_SAMPLETYPE_ROM

:valid

(Integer) < Should be TRUE if sample data is valid, FALSE otherwise (in which case it will not be synthesized)

:data

(FFI::Pointer(*Short)) < Pointer to the sample’s data

:amplitude_that_reaches_noise_floor_is_valid

(Integer) < Indicates if a amplitude_that_reaches_noise_floor is valid (TRUE), set to FALSE initially to calculate.

:amplitude_that_reaches_noise_floor

(Float) < The amplitude at which the sample’s loop will be below the noise floor. For voice off optimization, calculated automatically.

:refcount

(Integer) < Count of voices using this sample (use #fluid_sample_refcount to access this field)

:notify

(FFI::Pointer(*)) Implement this function to receive notification when sample is no longer used. @param sample Virtual SoundFont sample @param reason #FLUID_SAMPLE_DONE only currently @return Should return #FLUID_OK

:userdata

(FFI::Pointer(*Void)) < User defined data