→ home
 
→ index of namespace default
 
→ index of project tksdl
 
→ index of module tksdl

Class tksdl.SamplePlayer


Synopsis: A very basic sample player class. 

  Base classes:
  Methods: Description:


It's probably only good enough for simple game sound effects. Never used it for anything else, anyway ;)
Maximum polyphony is 16 voices.


 
→ top of page
Method getPan
Query panning offset for next noteOn calls
Signature
getPan():float
Returns
float–

 
→ top of page
Method getPolyphony
Query polyphony
Signature
getPolyphony():int
Returns
int–

 
→ top of page
Method getSample
Query currently active sample
Signature
getSample():AudioSample
Returns

 
→ top of page
Method getVolume
Query global volume
Signature
getVolume():float
Returns
float–

 
→ top of page
Method noteOff
Stop sample that is has been playing the given note for the longest time
Signature
noteOff(intnote)
Arguments
intnote–

 
→ top of page
Method noteOn
Trigger note using the currently active sample
Signature
noteOn(intnote,
  floatv 
  )  
Arguments
intnote–
floatv–

 
→ top of page
Method processSamples
Render/mix samples to the given output stream
Signature
processSamples(FloatArrayfa)
Arguments
FloatArrayfa–

 
→ top of page
Method setPan
Set panning offset for next noteOn
Signature
setPan(floatv)
Arguments
floatv–
Description

TODO: why is this not a parameter to the noteOn() method

 
→ top of page
Method setPolyphony
Set polyphony
Signature
setPolyphony(intnumVoices)
Arguments
intnumVoices–1..16

 
→ top of page
Method setSample
Set active sample
Signature
setSample(AudioSamplesample)
Arguments
AudioSamplesample–

 
→ top of page
Method setVolume
Set global volume
Signature
setVolume(floatv)
Arguments
floatv–0..1

 
→ top of page
 

Project Modules:tksdl 
Project Classes:AudioDevice , AudioSample , Cursor , FPS , Joystick , Key , Mouse , SamplePlayer , SDL , Viewport 
Project Functions:MIDINoteToFrequency 
All Namespaces:default , ui 
All Projects:core , debugtext , tkfreetype2 , tkmath , tkmidi , tkopengl , tkportaudio , tksdl , tkui , tkunit 


auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54