using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Buzz.MachineInterface { public interface IBuzzMachine { // Buzz uses reflection and delegates to access the machine's functions so there's only documentation here // {U} = ui thread, {A} = an audio thread, {M} = midi thread // Declaration: // [MachineDecl] public : IBuzzMachine // Constructor: // {U} public (IBuzzMachineHost host); // Parameter properties: // {A} [ParameterDecl] public { get; set; } // Interpolator parameters must be new'd in the constructor and never changed // Generator Work functions: // {A} public void Work(); // control machine // {A} public Sample Work(); // {A} public bool Work(Sample[] output, int n, WorkModes mode); // Effect Work functions: // {A} public Sample Work(Sample s); // {A} public bool Work(Sample[] output, Sample[] input, int n, WorkModes mode); // Machine state that is saved in files (CMachineInteface::Init, CMachineInteface::Load, CMachineInteface::Save): // {U} public MachineState { get; set; } // Right-click menu commands: // {U} public IEnumerable Commands { get; } // Other functions: // {U} public void Stop(); // {U} public void ImportFinished(IDictionary machineNameMap); // {M} public void MidiNote(int const channel, int const value, int const velocity); // {M} public void MidiControlChange(int const ctrl, int const channel, int const value); // {A} public int GetLatency(); } }