Code Monkey home page Code Monkey logo

psgplay's People

Contributors

frno7 avatar gasman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psgplay's Issues

Does not compile on macOS

Error message:

psgplay % make V=1 all
lib/internal/Makefile:19: WARNING: Disassembler disabled: The C compiler does not support __attribute__((__scalar_storage_order__("big-endian")))
cc -shared -Wl,-soname,libpsgplay.so.0 -g -o lib/psgplay/libpsgplay.so lib/psgplay/ice.o lib/psgplay/version.o lib/psgplay/psgplay.o lib/psgplay/sndh.o lib/psgplay/bit.o lib/psgplay/fifo.o lib/psgplay/print.o lib/psgplay/string.o lib/psgplay/bus.o lib/psgplay/cpu.o lib/psgplay/device.o lib/psgplay/exception-vector.o lib/psgplay/fdc.o lib/psgplay/glue.o lib/psgplay/machine.o lib/psgplay/mfp.o lib/psgplay/mixer.o lib/psgplay/mmu.o lib/psgplay/mmu-trace.o lib/psgplay/psg.o lib/psgplay/ram.o lib/psgplay/rom.o lib/psgplay/shifter.o lib/psgplay/sound.o lib/psgplay/system-variable.o lib/psgplay/m68kops.o lib/psgplay/m68kcpu.o
ld: unknown options: -soname 
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lib/psgplay/libpsgplay.so] Error 1

Mac OS Core Audio

Implement a driver for Core Audio in lib/out/core-audio.c. PSG play for Mac OS is currently limited to saving WAVE format files. Linux, on the other hand, also has a driver for ALSA in lib/out/alsa.c, which permits an interactive text mode user interface:
Atari ST main menu

ALSA issue "broken pipe"

Starts playing nice, then after 23 seconds it exits violently with:

psgplay: error: (null): ALSA snd_pcm_writei failed: -32 Broken pipe

Also leaving the terminal in a bad state.

PS: Wondering how I can make it play without alsa. Maybe adding a feature that an output file of "-" means to dump the wav to stdout, then I can pipe it into any player. Asking psgplay to write to a named pipe does unfortunately not work "Illegal seek".

Emulate Atari STE LMC1992 tone and volume hardware

Some SNDH files made for the Atari STE make use of the LMC1992 circuit for tone and volume control. Let PSG play emulate this piece of hardware:

The LMC1992 is a monolithic integrated circuit that providesfour stereo inputs, bass and treble tone controls, and volume, balance, and front-rear fader controls. These functions are digitally controlled through a three-wire communication interface.

Plan:

Atari ST GEM user interface

As an option, use GEM for a graphical user interface for Atari ST. See also #5. Plan:

  • AES for TOS/libc;
  • VDI for TOS/libc;
  • design an application user interface;
  • implement GEM user interface.

PSG play for Atari ST currently displays a VT52 video screen:
Atari ST main menu

Illegal option pipefail

I hit a little bump building psgplay. Here's the end of the output:

$ make ALSA=1
...
  CC      lib/m68k/m68kdasm.o
  CC      lib/m68k/softfloat.o
  CC      lib/psgplay/psgplay.o
  CC      lib/psgplay/sndh.o
script/version: 4: set: Illegal option -o pipefail
lib/psgplay/Makefile:15: recipe for target 'lib/psgplay/version.c' failed
make: *** [lib/psgplay/version.c] Error 2

I discovered that set -o pipefail is a bashism, and that bash is not the default shell on my machine.

I was able to fix the problem by changing the shebang of script/version from #!/bin/sh to #!/bin/bash

Happy to submit a PR if you like.

Create a new repository for TOS/libc

TOS/libc in lib/toslibc is a variant of a C standard library that can be used to build other C programs for Atari ST, and so it makes sense to create a new TOS/libc repository for it. Its main feature is that a normal unmodified m68k compiler can be used without applying any patches. Unlike traditional Atari ST compilers, C int type integers are 32-bit rather than 16-bit.

The FreeMiNT libcmini package is similar, but it requires a special m68k-atari-mint compiler.

libpsgplay as PSG play in a linkable library

Building PSG play as a library allows other music players to link with it.

Emulate Atari STE DMA sound hardware

Some SNDH files made for the Atari STE make use of its sound DMA hardware. Let PSG play emulate this piece of hardware. Plan:

  • define DMA sound device in lib/atari/sound.c;
  • 6258, 12517, 25033 and 50066 Hz sampling frequencies;
  • mono and stereo sound;
  • 8-byte FIFO DMA prefetch buffer;
  • Double buffer DMA sound registers;
  • assert MFP GPIP I7 DMA interrupt;
  • assert MFP Timer A DMA interrupt.

Atari ST MIDI interface

As an option, have PSG play on Atari ST accept MIDI commands in two forms:

  • traditional MIDI instrument control for the three channels of the YM2149;
  • raw YM2149 register settings via MIDI, as a technical means of PSG register remote control.

As a variant, the standard MIDI file (SMF) file format could be supported.

SNDH tracks don't stop playing

In the SNDH archive, file Daglish_Ben/Footballer_of_the_Year_2.sndh plays a couple of seconds then the rest is silent.
In interactive mode it shows that it is still playing track 1 although there is no sound.
Is it possible to get psgplay to move onto the next track when the first one has finished playing? --stop=auto isn't working for this particular file.
Maybe silence detection is required?

Originally mentioned in #13 (comment)

File is just a tone

This file is just playing a tone. I updated to the latest as I was a bit of of date, but no change:
Tao/TSD_STe/Intensity.sndh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.