Package voltage.core

# Class SamplerVoiceProgram

java.lang.Object
voltage.core.SamplerVoiceProgram

public class SamplerVoiceProgram extends Object
A simple class detailing a sampler voice program. The data members are publically accessible.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SamplerVoiceProgram.SampleInfo`
  A simple voice containing sample data, the buffer and sample rate.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `double`
  `attackHoldTime`
  Attack hold time in milliseconds.
  `double`
  `attackTime`
  Attack time in milliseconds.
  `double`
  `attenuation`
  Amount of volume attenuation.
  `double`
  `coarseTune`
  tuning in half-steps
  `double`
  `decayTime`
  Delay time in milliseconds.
  `double`
  `filterCutoff`
  0-1.0, overall filter modification
  `double`
  `filterResonance`
  0-1.0
  `double`
  `highFilterCutoff`
  In Hz.
  `int`
  `loopEndSample`
  The loop end sample index
  `boolean`
  `loopSample`
  Does it loop?
  `int`
  `loopStartSample`
  The loop start sample index
  `double`
  `lowFilterCutoff`
  In Hz.
  `double`
  `pan`
  0 = center, -1 = left, 1 = right
  `double`
  `releaseTime`
  Release time in milliseconds.
  `boolean`
  `reverseSamples`
  Should it play in reverse?
  `int`
  `rootNote`
  The MIDI note that represents the unaltered sample.
  `SamplerVoiceProgram.SampleInfo`
  `sampleInfo`
  The sample data
  `String`
  `sampleName`
  The sample name
  `boolean`
  `smoothResampling`
  smooth resampling uses more cpu but sounds better.
  `double`
  `speed`
  The speed to play the sample at.
  `double`
  `sustainLevel`
  Sustain level from 0 to 1.0
  `double`
  `tune`
  Fine tune in cents.
  `double`
  `velToAttenuation`
  Amount of velocity attenuation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SamplerVoiceProgram(SamplerVoiceProgram.SampleInfo info, int rootMIDINote)`
  Constructer Use this to set all the default values.

- ## Method Summary

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### sampleInfo

    public SamplerVoiceProgram.SampleInfo sampleInfo
    The sample data

  - ### sampleName

    public String sampleName
    The sample name

  - ### loopStartSample

    public int loopStartSample
    The loop start sample index

  - ### loopEndSample

    public int loopEndSample
    The loop end sample index

  - ### pan

    public double pan
    0 = center, -1 = left, 1 = right

  - ### coarseTune

    public double coarseTune
    tuning in half-steps

  - ### tune

    public double tune
    Fine tune in cents.

  - ### speed

    public double speed
    The speed to play the sample at. 1.0 is normal.

  - ### rootNote

    public int rootNote
    The MIDI note that represents the unaltered sample.

  - ### attenuation

    public double attenuation
    Amount of volume attenuation.

  - ### velToAttenuation

    public double velToAttenuation
    Amount of velocity attenuation.

  - ### attackTime

    public double attackTime
    Attack time in milliseconds.

  - ### attackHoldTime

    public double attackHoldTime
    Attack hold time in milliseconds.

  - ### decayTime

    public double decayTime
    Delay time in milliseconds.

  - ### sustainLevel

    public double sustainLevel
    Sustain level from 0 to 1.0

  - ### releaseTime

    public double releaseTime
    Release time in milliseconds.

  - ### filterCutoff

    public double filterCutoff
    0-1.0, overall filter modification

  - ### filterResonance

    public double filterResonance
    0-1.0

  - ### lowFilterCutoff

    public double lowFilterCutoff
    In Hz. This is the low range for velocity

  - ### highFilterCutoff

    public double highFilterCutoff
    In Hz. This is the high range for velocity

  - ### loopSample

    public boolean loopSample
    Does it loop?

  - ### reverseSamples

    public boolean reverseSamples
    Should it play in reverse?

  - ### smoothResampling

    public boolean smoothResampling
    smooth resampling uses more cpu but sounds better.

- ## Constructor Details

  - ### SamplerVoiceProgram

    public SamplerVoiceProgram(SamplerVoiceProgram.SampleInfo info, int rootMIDINote)
    Constructer Use this to set all the default values.
    Parameters:
      `info` - contains the sample data.
      `rootMIDINote` - the MIDI note that is the root for this sample. From 0 to 127.