diff --git a/packages/midi/midi.mjs b/packages/midi/midi.mjs index 51a077115..73383a378 100644 --- a/packages/midi/midi.mjs +++ b/packages/midi/midi.mjs @@ -536,6 +536,9 @@ export async function midin(input) { * * The note length is fixed as Superdough is not currently set up for undetermined * note durations + * + * The 'midichan' control value contains the number of the channel the note is coming from + * so it could be filtered or manipulated further in the chain. * * @name midikeys * @tags external_io, midi @@ -552,6 +555,10 @@ export async function midin(input) { * .s("saw") * .add(note(rand.mul(0.3))) * .lpf(1000).lpe(2).room(0.5) + * @example + * // discard all notes not coming out from midi channel 2 + * const kb = await midikeys('Arturia KeyStep 32') + * kb().filterValues(v=>v.midichan==2).s("tri") */ const kHaps = {}; const kListeners = {};