Skip to content

Commit

Permalink
Merge pull request #245 from shorepine/musicmd3
Browse files Browse the repository at this point in the history
WOOD PIANO example
  • Loading branch information
bwhitman authored Jun 26, 2024
2 parents 4de3961 + 0d38e3f commit c30c7d7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/music.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Tulip is a **music computer** where everything about the underlying synthesis an
- A scale and chord library to define musical notes in code, e.g. `music.Chord("F:min")`
- Have total low level control of all oscillators, specifying their filters, waveform, modulation sources, ADSRs

## A small note about Tulip Desktop

If you're using [Tulip Desktop](tulip_desktop.md) instead of a real Tulip, things will mostly be the same. CV sending does not work on Tulip Desktop. And anytime you see `/sys/` (for example, to open an example), replace it with `../sys/`.


## The built-in Tulip synthesizer

Expand Down Expand Up @@ -395,4 +399,29 @@ import m5dac2
m5dac2.send(2.5, channel=0) # sends 2.5V
```

## Custom patches (WOOD PIANO)

To load your own patches (and assign them to voices), try out the infamous DX100 "WOOD PIANO" tone. We've included AMY commands for it (we can show you how to generate those later!)

First, load up the AMY commands and assign them to a "memory patch" and voice. Memory patches start at #1024.

```python
patch = open("/sys/ex/woodpiano.txt","r").read()
amy.send(store_patch="1024,"+patch)
amy.send(load_patch=1024, voices="6") # assign this patch to voice number 6
```

Now, you can play this patch on the voice!

```python
s = midi.Synth(1)
s.program_change(1024)
s.note_on(50,1)
s.note_on(55,1)
```






1 change: 1 addition & 0 deletions tulip/fs/ex/woodpiano.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1P0.25a0.297302,0,0,1,0,0I1A0,0.000188,0,1,728,0.017039,4401,0.000188,147,0.000188L7Zv2P0.25a1.681793,0,0,1,0,0I0.498125A0,0.000188,0,1,3412,0.000188,0,0.000188,117,0.000188L7Zv3P0.25a0.229251,0,0,1,0,0I1A0,0.000188,0,1,0,1,6709,0.000188,117,0.000188L7Zv4P0.25a1.681793,0,0,1,0,0I0.5A0,0.000188,0,1,3412,0.000188,0,0.000188,117,0.000188L7Zv5P0.25a0.000377,0,0,1,0,0I1A0,0.000188,0,1,0,1,0,1,2,0.000188L7Zv6P0.25a0.000377,0,0,1,0,0I1A0,0.000188,0,1,0,1,0,1,2,0.000188L7Zv7w4f3.5a0.000188Zv8w4f3.5a0.000205Zv0w8b0.08f0,1,0,0,1,1o5A0,1,147,0.000188B0,1,0,1,0,1,0,1,179,1O1,2,3,4,5,6L8Z

0 comments on commit c30c7d7

Please sign in to comment.