forked from ideoforms/isobar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
still many things are untested and may not work reliably
- Loading branch information
Fabian-Robert Stöter
committed
Apr 11, 2015
1 parent
4daa889
commit 800aa67
Showing
33 changed files
with
3,741 additions
and
3,353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
#!/usr/bin/python | ||
|
||
from isobar import * | ||
import isobar as iso | ||
|
||
# create a repeating sequence with scalar transposition: | ||
# [ 36, 38, 43, 39, ... ] | ||
a = PSeq([ 0, 2, 7, 3 ]) + 36 | ||
a = iso.PSeq([0, 2, 7, 3]) + 36 | ||
|
||
# apply pattern-wise transposition | ||
# [ 36, 50, 43, 51, ... ] | ||
a = a + PSeq([ 0, 12 ]) | ||
a = a + iso.PSeq([0, 12]) | ||
|
||
# create a geometric chromatic series, repeated back and forth | ||
b = PSeries(0, 1, 12) + 72 | ||
b = PPingPong(b) | ||
b = PLoop(b) | ||
b = iso.PSeries(0, 1, 12) + 72 | ||
b = iso.PPingPong(b) | ||
b = iso.PLoop(b) | ||
|
||
# create an velocity series, with emphasis every 4th note, | ||
# plus a random walk to create gradual dynamic changes | ||
amp = PSeq([ 50, 35, 25, 35 ]) + PBrown(0, 1, -20, 20) | ||
amp = iso.PSeq([50, 35, 25, 35]) + iso.PBrown(0, 1, -20, 20) | ||
|
||
# a Timeline schedules events at a given BPM. | ||
# by default, send these over the first MIDI output. | ||
timeline = Timeline(120, debug = True) | ||
output_device = iso.io.midi.MidiOut("IAC Driver IAC Bus 1") | ||
timeline = iso.Timeline(120, device=output_device, debug=True) | ||
|
||
# assign each of our Patterns to particular properties | ||
timeline.sched({ 'note': a, 'dur': 1, 'gate': 2 }) | ||
timeline.sched({ 'note': b, 'dur': 0.25, 'amp': amp }) | ||
timeline.sched({'note': a, 'dur': 1, 'gate': 2}) | ||
|
||
timeline.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
__version__ = "0" | ||
__author__ = "Daniel Jones <http://www.erase.net/>" | ||
|
||
from isobar.pattern import * | ||
from isobar.note import * | ||
from isobar.scale import * | ||
from isobar.chord import * | ||
from isobar.key import * | ||
from isobar.util import * | ||
from isobar.timeline import * | ||
from pattern import * | ||
from note import * | ||
from scale import * | ||
from chord import * | ||
from key import * | ||
from util import * | ||
from timeline import * | ||
|
||
import sys | ||
|
||
FOREVER = sys.maxint | ||
FOREVER = sys.maxsize | ||
|
||
# REST = -sys.maxint - 1 | ||
# END = -sys.maxint + 1 |
Oops, something went wrong.