Update of "Muzic MIDI sound package"
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

Artifact ID: 6ed39b268e1b789d9b29caed6709419483d54dff
Page Name:Muzic MIDI sound package
Date: 2019-04-26 06:41:44
Original User: chw
Parent: ce8b4cb84a42bcea2e87bad84a276e5b6d3b8694
Content

muzic command

Name

muzic - a MIDI sound package compatible with Muzic.

Synopsis

package require Muzic
muzic::subcommand ...

Description

muzic is a Tcl music interface to the Sonivox MIDI rendering (software synthesis) library on Android. The original package was developed by Steve Landers and is Copyright (c) 2005 Eolas Technologies Inc. It is released under a Tcl/BSD style license.

To use Muzic, no special provisions are needed, since it is fully integrated in AndroWish.

The Muzic API contains just five procedures:

muzic::init

Must be called once to initialize audio playback.

muzic::soundfont file

This command exists for compatibility with the original package. It can be called with no arguments or with builtin. Everything else throws an error since the Android software synthesizer has no support for SoundFont files.

muzic::channel channel instrument

Assigns an instrument to a channel. channel is an integer from 0 to 15 identifying the MIDI channel. instrument is the instrument number, typically a MIDI instrument number from 0 to 127.

muzic::playnote channel pitch volume ?duration?

Plays a note on specified channel, at specified pitch and volume. The pitch is the raw MIDI pitch, as per the general midi standard - where middle C is 60 (see http://www.mozart.co.uk/information/articles/midinote.htm which has a table of MIDI pitch values). volume is a number between 0 and 100. duration is optional, and defaults to 500 (i.e. 500 ms). If a negative duration is given, the note is played continuously. If a volume of zero is given, playback of the note ends.

muzic::close

To be called when MIDI audio playback shall be stopped in order to conserve battery power.