The pyPSG is PSG (Programmable sound generator. aka. AY-3-8910) simplified emulator implement by python.
- python 3.7 (or later).
- 3-channel square wave output.
- 1-channel noise generator (Can be mixed with any square wave output channel).
- Sample generation can specify any sampling rate (ex. 24KHz, 48KHz ... 192KHz).
- The generated sample is floating point type (0.0 - 1.0).
- Some feature are not implemented. For example, hardware envelope generator.
Filename | Description |
---|---|
pypsg.py |
PSG implementation module. |
testpsg.py |
This is a test program for pypsg.Requires python-sounddevice library. |
fbd.py |
Music sequencer using pypsg. |
fbdplayer.py |
An executable module that uses the fbd module to play "fbd" files. |
fbdwave.py |
An executable module that uses the fbd module to generate a .wav from a "fbd" file. |
data/ | There are music files that can be used with fbdplayer and fdbwave. |
Plays the "fbd" file specified by the first argument.
Requires janus, python-sounddevice library.
Example:
# python3(py) fbdplayer.py data/YS205.fbd
If you get "output underflow", try increasing the value of BUFFER_BLOCK_SIZE in fbdplayer.py.
Generates the wav file specified by the second argument from the "fbd" file specified by the first argument.
Example:
# python3(py) fbdwave.py data/YS205.fbd YS205.wav