From 2dbd0cd81dff72aea42344188d20f7d7f6d20e1a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 18 Jul 2006 05:46:24 +0000 Subject: Removed globals (Om.h) git-svn-id: http://svn.drobilla.net/lad/ingen@96 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/MidiNoteNode.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/libs/engine/MidiNoteNode.h') diff --git a/src/libs/engine/MidiNoteNode.h b/src/libs/engine/MidiNoteNode.h index db51235a..e7d3831a 100644 --- a/src/libs/engine/MidiNoteNode.h +++ b/src/libs/engine/MidiNoteNode.h @@ -39,17 +39,17 @@ template class OutputPort; class MidiNoteNode : public InternalNode { public: - MidiNoteNode(const string& path, size_t poly, Patch* parent, samplerate srate, size_t buffer_size); + MidiNoteNode(const string& path, size_t poly, Patch* parent, SampleRate srate, size_t buffer_size); ~MidiNoteNode(); - void process(samplecount nframes); + void process(SampleCount nframes); - void note_on(uchar note_num, uchar velocity, samplecount offset); - void note_off(uchar note_num, samplecount offset); - void all_notes_off(samplecount offset); + void note_on(uchar note_num, uchar velocity, SampleCount offset); + void note_off(uchar note_num, SampleCount offset); + void all_notes_off(SampleCount offset); void sustain_on(); - void sustain_off(samplecount offset); + void sustain_off(SampleCount offset); private: @@ -57,28 +57,28 @@ private: struct Key { enum State { OFF, ON_ASSIGNED, ON_UNASSIGNED }; Key() : state(OFF), voice(0), time(0) {} - State state; size_t voice; samplecount time; + State state; size_t voice; SampleCount time; }; /** Voice, one of these always exists for each voice */ struct Voice { enum State { FREE, ACTIVE, HOLDING }; Voice() : state(FREE), note(0) {} - State state; uchar note; samplecount time; + State state; uchar note; SampleCount time; }; float note_to_freq(int num); - void free_voice(size_t voice, samplecount offset); + void free_voice(size_t voice, SampleCount offset); Voice* _voices; Key _keys[128]; bool _sustain; ///< Whether or not hold pedal is depressed InputPort* _midi_in_port; - OutputPort* _freq_port; - OutputPort* _vel_port; - OutputPort* _gate_port; - OutputPort* _trig_port; + OutputPort* _freq_port; + OutputPort* _vel_port; + OutputPort* _gate_port; + OutputPort* _trig_port; }; -- cgit v1.2.1