mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-12-22 02:31:12 +00:00
Page:
Music Player
Pages
32 Bit Integers
CATalog files
COPY files
Chat Client Server
Command Line & System Environment (CMDSYS)
Command Line Argument Parsing
Console I O
DCGR SPRite EDitor
DELete fles
Double Color Hires Graphics
Double Lo Res Graphics
Double Lo Res Test
Fiber Threads
File I O
Game Port SPI I O
Game Port SPI SD FAT
Game Port Wiring
HTTP Server
Hello World
Hi Res Graphics
Hi Res Test
Home
Installation Guide
Joystick and Buzz
Lo Res Graphics Library
Long Jump
Memory Manager
Music Player
Music Sequencer
NEWDIR
Network I O
PLASM compiler
PLASMA Byte Codes
PLASMA JIT Compiler Implementation
Porting Guide
REName files
ROGUE
RPN Calculator
Rod's Colors
SANE Floating Point
Sieve
System Library
TYPE file
Trivial FTP Daemon
Variable assignment and addressing explained
ZIPCHIP
Zero Page Usage (Apple IIe 64K )
code text Editor
1
Music Player
David Schmenk edited this page 2018-02-02 16:50:21 -08:00
Table of Contents
Playing music is always fun. Especially in games. This sample code will play sequenced notes generated from a MIDI file using this Python tool. The code will look for a MockingBoard sound card and use that to play the notes, or fall back to using the internal speaker. The sequencer can play more notes by quickly playing short bursts of simultaneous notes (called arpeggio in musicspeak) on both the MockingBoard and internal speaker. Interestingly, this code does not use interrupts to schedule the notes - it uses a polled timing loop instead. You can have it call back to a routine in a repeatable fashion for doing background processing while the music plays.
seqplay.pla
Home
Environment:
Command Line & System Environment