NAME
    idi - Easy, command-line MIDI

SYNOPSIS
      perl -Midi -E 'x(qw(c1 f o5)); n([qw(qn Cs)],"F","Ds",[qw(hn Gs_d1)])' | timidity -Od -
      # or with fluidsynth

      # Compare with:
      perl -MMIDI::Simple -E 'new_score; noop qw(c1 f o5); n qw(qn Cs); n "F"; n "Ds"; n qw(hn Gs_d1); write_score shift()' idi.mid
      timidity -Od idi.mid

      # Play a drum back-beat:
      perl -Midi -E 'u(4, ["1010"], ["0101"], ["1111"])' | timidity -Od -

      # Control a MIDI device (uniquely named "usb") in real-time
      perl -Midi -E 'i(@ARGV)' keyboard usb

DESCRIPTION
    Easy, command-line MIDI!

FUNCTIONS
  b
      b(100)

    Set BPM

  c
      c(15)

    Channel

    Default: 0

  d
      d(128)

    Duration

    Default: 96

  e
      e(0)

    Play at end

    Default: 1

  g
    Return the MIDI::Simple score object.

  i
    Invoke MIDI::RtController to control the second argument with the first.

  n
      n(qw(hn C))
      n(qw(hn 60))
      n(qw(hn C E G))
      n(qw(hn 60 64 67))
      n([qw(hn 60 64 67)], [qw(hn 65 69 71)], ...)
      n(\@note_spec1, \@note_spec2, ...)

    Add notes as either a list of a single note-spec or a list of
    array-references of note-specs. Please see the MIDI::Simple
    documentation for what a "note_spec" is.

  o
      o(3)

    Octave

    Default: 5

  p
      p($channel, $patch_number)

    Patch

    Default: "0, 0" (channel 0, piano)

  r
      r($note_duration)

    Add rest. See the MIDI::Simple documentation for what "note_durations"
    are valid.

  t
      t("$numerator/$denominator")

    Time signature

    Default: "none"

  u
      u($bars, $kick, $snare, $hihat)
      u(4, ["1010"], ["0101"], ["1111"])

    Play a drum pattern Ã  la MIDI::Drummer::Tiny.

  v
      v(127)

    Volume

    Default: 64

  w
      w("filename.mid")

    Write score to a file.

  x
    No-op (with "MIDI::Simple::noop")

SEE ALSO
    The t/01-methods.t file in this distribution

    Exporter

    File::Slurper

    File::Temp

    MIDI::Simple

    Music::Tempo

    Moo

    strictures

    namespace::clean

AUTHOR
    Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE
    This software is Copyright (c) 2022-2025 by Gene Boggs.

    This is free software, licensed under: The Artistic License 2.0 (GPL
    Compatible)

