pl-synth-0.1.0.0: Bindings and wrappers for PL_SYNTH - no-deps sound effects synthesizer and tracker.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.PlSynth.FFI

Synopsis

Documentation

plSynthInit :: Ptr CFloat -> IO () Source #

Initialize the lookup table for all instruments. This needs to be done only once.

The table will be written to the memory pointed to by tab_buffer, which must be PL_SYNTH_TAB_LEN elements long or PL_SYNTH_TAB_SIZE bytes in size.

plSynthTabSize :: Int Source #

Amount of memory needed for plSynthInit.

plSynthSoundLen :: Ptr PlSynthSoundT -> IO Int Source #

Determine the number of samples needed for one channel of a particular sound effect.

plSynthSound :: Ptr PlSynthSoundT -> Ptr Int16 -> IO Int Source #

Generate a stereo sound into the buffer pointed to by samples.

The buffer must be at least pl_synth_sound_len() * 2 elements long.

plSynthSongLen :: Ptr PlSynthSongT -> IO Int Source #

Determine the number of samples needed for one channel of a particular song.

plSynthSong :: Ptr PlSynthSongT -> Ptr Int16 -> Ptr Int16 -> IO Int Source #

Generate a stereo song into the buffer pointed to by samples, with temporary storage provided to by temp_samples.

The buffers samples and temp_samples must each be at least pl_synth_song_len() * 2 elements long.

plSynthWavWrite Source #

Arguments

:: CString

path

-> Ptr Int16

samples

-> Int

samples_len

-> Int16

channels (2)

-> Int

samplerate (44100)

-> IO () 

Write generated samples ta WAV-formatted file.

Not a part of the pl_synth API. Lifted from the example.c.

pattern SIN :: Word8 Source #

pattern SAW :: Word8 Source #

pattern SQR :: Word8 Source #

pattern TRI :: Word8 Source #