Groovy Documentation

groovy.aprint.midi
[Groovy] Class MidiCategory

java.lang.Object
  groovy.aprint.midi.MidiCategory

@Category(MidiEventGroup)
class MidiCategory
extends java.lang.Object

Helper Category for midi handling

Authors:
pfreydiere


Method Summary
java.lang.Object addNote(int channel, int midiNote, long timestamp, long length)

Add midi note in this group

java.lang.Object countDistinctNotes()

Return a hash with all the notes and the count of each notes the notes are the keys, the values are the cardinality

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filter(groovy.lang.Closure c)

Filter the collection with a specific filter

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterChannel(int channel)

Filter event in a channel and return only the events link to the channel passed in parameter

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterMidiTrack(int trackNo)

Filter events from a specific track, and return only the events in this track

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterNotes()

Filter the note in a midiEvent Group

Note[] listDistinctNotes()

List distinct notes from the midi files

int[] listTracks()

List the tracks from the event group @return

java.lang.Object save(java.io.File saveTo)

Write the group to a midi file 0

MidiTransformHelper transformFor(org.barrelorgandiscovery.scale.Scale s)

Create transform for Midi into VirtualBook conversion

MidiTransformHelper transformFor(ScaleHelper s)

Create Transform for Midi into VirtualBook conversion

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

addNote

java.lang.Object addNote(int channel, int midiNote, long timestamp, long length)
Add midi note in this group
Returns:
Parameters:
channel - the midi channel
midiNote - the midi note
timestamp - the note start in microseconds
length - the note length in microseconds


countDistinctNotes

java.lang.Object countDistinctNotes()
Return a hash with all the notes and the count of each notes the notes are the keys, the values are the cardinality
Returns:


filter

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filter(groovy.lang.Closure c)
Filter the collection with a specific filter
Returns:
Parameters:
c - the closure that take the event in first parameter and return a boolean for the filter


filterChannel

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterChannel(int channel)
Filter event in a channel and return only the events link to the channel passed in parameter
Returns:
Parameters:
channel


filterMidiTrack

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterMidiTrack(int trackNo)
Filter events from a specific track, and return only the events in this track
Returns:
Parameters:
trackNo


filterNotes

org.barrelorgandiscovery.virtualbook.transformation.importer.MidiEventGroup filterNotes()
Filter the note in a midiEvent Group
Returns:
all the note events from the collection (which can have tempo or generic midi messages)


listDistinctNotes

Note[] listDistinctNotes()
List distinct notes from the midi files
Returns:
an array containing the notes used in the midi event group


listTracks

int[] listTracks()
List the tracks from the event group
Returns:


save

java.lang.Object save(java.io.File saveTo)
Write the group to a midi file 0
Returns:
Parameters:
saveTo - the file in which save the group of event


transformFor

MidiTransformHelper transformFor(org.barrelorgandiscovery.scale.Scale s)
Create transform for Midi into VirtualBook conversion
Returns:
Parameters:
s


transformFor

MidiTransformHelper transformFor(ScaleHelper s)
Create Transform for Midi into VirtualBook conversion
Returns:
Parameters:
s


 

Groovy Documentation