Top Documents Download Gallery Repository
Are you looking for a Software Engineer? Check Here

33midi Module

The midi module provides measures to read/write MIDI files. To utilize it, import the midi module using import function.

33.1Module Function

33.2midi.event Class

33.3midi.track Class

midi.track#seek
midi.track#seek(offset:number, origin?:symbol):reduce
Moves the insertion point in the track at which the next event is inserted. If origin is omitted or set to `set, the insertion point will be set to absolute offset from the beginning. If origin is set to `cur, the insertion point will be moved by offset from the current position.

midi.track#tell
midi.track#tell()
Returns the current insertion point in the track.

midi.track#erase
midi.track#erase(n?:number):reduce
Deletes an event at the current insertion point in the track. The argument n specifies the number of events to be deleted. If n is omitted, one event will be deleted.

midi.track#mml
midi.track#mml(str:string, max_velocity?:number):map:reduce
Parses MML in the string str and inserts resulted MIDI events at the current insertion point in the track.

The argument max_velocity specifies the maximum number of velocity in the MML. If omitted, it will be set to 127.

midi.track#note_off
midi.track#note_off(channel:number, note:number, velocity:number, deltaTime?:number):map:reduce

midi.track#note_on
midi.track#note_on(channel:number, note:number, velocity:number, deltaTime?:number):map:reduce

midi.track#poly_pressure
midi.track#poly_pressure(channel:number, note:number, value:number, deltaTime?:number):map:reduce

midi.track#control_change
midi.track#control_change(channel:number, controller, value:number, deltaTime?:number):map:reduce

midi.track#program_change
midi.track#program_change(channel:number, program, deltaTime?:number):map:reduce

midi.track#channel_pressure
midi.track#channel_pressure(channel:number, pressure:number, deltaTime?:number):map:reduce

midi.track#pitch_bend
midi.track#pitch_bend(channel:number, value:number, deltaTime?:number):map:reduce

midi.track#sequence_number
midi.track#sequence_number(number:number, deltaTime?:number):map:reduce

midi.track#text_event
midi.track#text_event(text:string, deltaTime?:number):map:reduce

midi.track#copyright_notice
midi.track#copyright_notice(text:string, deltaTime?:number):map:reduce

midi.track#sequence_or_track_name
midi.track#sequence_or_track_name(text:string, deltaTime?:number):map:reduce

midi.track#instrument_name
midi.track#instrument_name(text:string, deltaTime?:number):map:reduce

midi.track#lyric_text
midi.track#lyric_text(text:string, deltaTime?:number):map:reduce

midi.track#marker_text
midi.track#marker_text(text:string, deltaTime?:number):map:reduce

midi.track#cue_point
midi.track#cue_point(text:string, deltaTime?:number):map:reduce

midi.track#midi_channel_prefix_assignment
midi.track#midi_channel_prefix_assignment(channel:number, deltaTime?:number):map:reduce

midi.track#end_of_track
midi.track#end_of_track(deltaTime?:number):map:reduce

midi.track#tempo_setting
midi.track#tempo_setting(mpqn:number, deltaTime?:number):map:reduce

midi.track#smpte_offset
midi.track#smpte_offset(hour:number, minute:number, second:number, frame:number, subFrame:number, deltaTime?:number):map:reduce

midi.track#time_signature
midi.track#time_signature(numerator:number, denominator:number, metronome:number, cnt32nd:number, deltaTime?:number):map:reduce

midi.track#key_signature
midi.track#key_signature(key:number, scale:number, deltaTime?:number):map:reduce

midi.track#sequencer_specific_event
midi.track#sequencer_specific_event(binary:binary, deltaTime?:number):map:reduce

33.4midi.sequence Class

midi.sequence
midi.sequence(stream?:stream) {block?}
It creates an instance that contains SMF information.

midi.sequence#read
midi.sequence#read(stream:stream:r):map:reduce

midi.sequence#write
midi.sequence#write(stream:stream:w):map:reduce

midi.sequence#play
midi.sequence#play(port:midi.port, speed?:number, repeat:number:nil => 1):[background,player]

midi.sequence#track
midi.sequence#track(index:number):map {block?}

midi.sequence#mml
midi.sequence#mml(str:string, max_velocity?:number):reduce

midi.sequence#readmml
midi.sequence#readmml(stream:stream, max_velocity?:number):reduce

33.5midi.port Class

midi.port#send
midi.port#send(msg+:number):map:reduce

midi.port#play
midi.port#play(sequence:midi.sequence, speed?:number, repeat:number:nil => 1):map:[background,player]

midi.port#mml
midi.port#mml(str:string, max_velocity?:number):[background,player]

midi.port#readmml
midi.port#readmml(stream:stream, max_velocity?:number):[background,player]

midi.port#note_off
midi.port#note_off(channel:number, note:number, velocity:number):map:reduce

midi.port#note_on
midi.port#note_on(channel:number, note:number, velocity:number):map:reduce

midi.port#poly_pressure
midi.port#poly_pressure(channel:number, note:number, value:number):map:reduce

midi.port#control_change
midi.port#control_change(channel:number, controller:number, value:number):map:reduce

midi.port#program_change
midi.port#program_change(channel:number, program:number):map:reduce

midi.port#channel_pressure
midi.port#channel_pressure(channel:number, pressure:number):map:reduce

midi.port#pitch_bend
midi.port#pitch_bend(channel:number, value:number):map:reduce

33.6midi.controller Class

33.7midi.program Class

33.8midi.soundfont Class

midi.soundfont
midi.soundfont(stream:stream) {block?}
It creates an instance to access data in SoundFont file.

midi.soundfont#synthesizer
midi.soundfont#synthesizer(preset:number, bank:number, key:number, velocity:number):map {block?}

midi.soundfont#print
midi.soundfont#print():void

33.9midi.synthesizer Class


Copyright (C) 2011-2017 ypsitau