Sound Workbench
Model was written in NetLogo 5.0.4
•
Viewed 207 times
•
Downloaded 48 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
extensions [ sound ] globals [ instrument-index memory ] ;; initializes the instrument-index and the memory bank to startup set instrument-index 0 set memory (list "" "" "" "") end ;; plays the current note and prints it to the output area to play run generate-command output-print generate-command end ;; generates a NetLogo command to play the current instrument ;; at the current tone with the current velocity to-report generate-command report (word "sound:play-note \"" ( item instrument-index sound:instruments ) "\" " tone " " velocity " " duration) end ;; saves the current command in the nth memory slot to save [ n ] set memory replace-item n memory generate-command end ;; returns a list of tones comprising a middle-C major scale to-report c-major-scale report map [? + 60] [0 2 4 5 7 9 11 12] end ;; arrow keys to scroll through the instrument list to first-instrument set instrument-index 0 play end to last-instrument set instrument-index length sound:instruments - 1 play end to next-instrument if instrument-index < length sound:instruments - 1 [ set instrument-index instrument-index + 1 play ] end to prev-instrument if instrument-index > 0 [ set instrument-index instrument-index - 1 play ] end ; Public Domain: ; To the extent possible under law, Uri Wilensky has waived all ; copyright and related or neighboring rights to this model.
There are 10 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Sound Workbench.png | preview | Preview for 'Sound Workbench' | over 11 years ago, by Uri Wilensky | Download |
This model does not have any ancestors.
This model does not have any descendants.