-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major fix/update for lib/permutation.dc; fix for midi_change_ring.dc …
…example; add a simpler midi_change_ring.dc example
- Loading branch information
Aaron K. Johnson
committed
Mar 7, 2024
1 parent
9000755
commit 9562b24
Showing
6 changed files
with
202 additions
and
155 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"midi.dc" import | ||
"redis_midi.dc" import | ||
"permutations.dc" import | ||
|
||
var perm_obj | ||
6 setup_permutation | ||
perm_obj ! | ||
|
||
create scale 60 , 62 , 65 , 67 , 70 , 72 , | ||
-7 const TRANSPOSITION | ||
|
||
: _midi_change_ring | ||
block_sigint | ||
### | ||
100 | ||
scale | ||
perm_obj @ next_permutation_item | ||
+ | ||
@ | ||
TRANSPOSITION + | ||
dup svpush | ||
0x90 | ||
send_midi_reverse | ||
### | ||
redis_midi.get_on_gate sleep | ||
0 svpop 0x90 send_midi_reverse | ||
redis_midi.get_off_gate sleep | ||
unblock_sigint | ||
_midi_change_ring | ||
; | ||
|
||
: midi_change_ring | ||
"You are now entering an endless loop, hit CTRL-C to stop..." print cr | ||
"Notice that you won't be able to stop until a note off event hits." print cr | ||
"In this way, the notes end cleanly!" print cr | ||
_midi_change_ring | ||
; | ||
|
||
midi_change_ring |
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
Oops, something went wrong.