Skip to content

Commit

Permalink
Neaten up example
Browse files Browse the repository at this point in the history
  • Loading branch information
ideoforms committed Aug 6, 2024
1 parent 3b3bfb3 commit 18de801
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ isobar includes a large array of basic compositional building blocks (see [Patte
## Usage

```python
import isobar as iso
from isobar import *

#------------------------------------------------------------------------
# Create a geometric series on a minor scale.
# PingPong plays the series forward then backward. PLoop loops forever.
#------------------------------------------------------------------------
arpeggio = iso.PSeries(0, 2, 6)
arpeggio = iso.PDegree(arpeggio, iso.Scale.minor) + 72
arpeggio = iso.PPingPong(arpeggio)
arpeggio = iso.PLoop(arpeggio)
arpeggio = PSeries(0, 2, 6)
arpeggio = PDegree(arpeggio, iso.Scale.minor) + 72
arpeggio = PPingPong(arpeggio)
arpeggio = PLoop(arpeggio)

#------------------------------------------------------------------------
# Create a velocity sequence, with emphasis every 4th note,
# plus a random walk to create gradual dynamic changes.
# Amplitudes are in the MIDI velocity range (0..127).
#------------------------------------------------------------------------
amplitude = iso.PSequence([50, 35, 25, 35]) + iso.PBrown(0, 1, -20, 20)
amplitude = PSequence([50, 35, 25, 35]) + PBrown(0, 1, -20, 20)

#------------------------------------------------------------------------
# A Timeline schedules events at a specified tempo. By default, events
# are send to the system's default MIDI output.
#------------------------------------------------------------------------
timeline = iso.Timeline(120)
timeline = Timeline(120)

#------------------------------------------------------------------------
# Schedule events, with properties generated by the Pattern objects.
Expand Down

0 comments on commit 18de801

Please sign in to comment.