| f | This is my quick and dirty summary of what you nee | f | This is my quick and dirty summary of what you nee |
| d to do to take an old (Boodler 1.x) soundscape -- | | d to do to take an old (Boodler 1.x) soundscape -- |
| as Python code -- and update it to work with Bood | | as Python code -- and update it to work with Bood |
| ler 2.0. This is not a substitute for reading the | | ler 2.0. This is not a substitute for reading the |
| new Designing Soundscapes tutorial. | | new Designing Soundscapes tutorial. |
| | | |
| n | - Create a directory. Put in a [Metadata] file whi | n | Create a directory. Put in a [Metadata] file which |
| ch includes the name of your package (`boodler.pac | | includes the name of your package (`boodler.packa |
| kage: ...`) and a `boodler.main: main` line. | | ge: ...`) and a `boodler.main: main` line. |
| | | |
| n | - Copy in your Python file, and rename it `main.py | n | Copy in your Python file, and rename it `main.py` |
| ` (to match the `boodler.main:` line in `Metadata` | | (to match the `boodler.main:` line in `Metadata`.) |
| . | | |
| | | |
| n | - Delete all the `name="..."` lines in your Agent | n | Delete all the `name="..."` lines in your Agent cl |
| classes. Put that information in the `Resources` f | | asses. Put that information in the `Resources` fil |
| ile, as `dc.title: ...` | | e, as `dc.title: ...` |
| | | |
| n | - - Titles in Boodler start with a capital letter, | n | - Titles in Boodler start with a capital letter, b |
| but do not capitalize each word after that. | | ut do not capitalize each word after that. |
| | | |
| n | - Add these lines: | n | Add these lines: |
| | | |
| n | `from boopak.package import *` | n | from boopak.package import * |
| `from boodle import agent, builtin` | | from boodle import agent, builtin |
| | | |
| n | - Make sure your Agent classes are defined as | n | Make sure your Agent classes are defined as |
| | | |
| n | class MyAgentName(agent.Agent): | n | class MyAgentName(agent.Agent): |
| | | |
| n | - - If you really want to use the `class MyAgentNa | n | - If you really want to use the `class MyAgentName |
| me(agent.Agent):` format, add an import line of th | | (agent.Agent):` format, add an import line of the |
| e form `from boodle.agent import Agent`. | | form `from boodle.agent import Agent`. |
| | | |
| n | - Call `bimport()` for each package you want to im | n | Call `bimport()` for each package you want to impo |
| port. | | rt. |
| | | |
| n | - - All sound sample files live in packages now, s | n | - All sound sample files live in packages now, so |
| o you'll have to import them this way. | | you'll have to import them this way. |
| | | |
| n | - - Sounds that used to be in the Boodler sound li | n | - Sounds that used to be in the Boodler sound libr |
| brary are now mostly in `org.boodler.old...` packa | | ary are now mostly in `org.boodler.old...` package |
| ges. For example, you might do this: | | s. For example, you might do this: |
| | | |
| n | water = bimport('org.boodler.old.water') | n | `water = bimport('org.boodler.old.water')` |
| | | |
| n | - Instead of referring to a sound as a string, ref | n | Instead of referring to a sound as a string, refer |
| er directly to the object in the imported package. | | directly to the object in the imported package. F |
| For example: | | or example: |
| | | |
| n | \# replace this:
| n | # replace this:
|
| self.sched_note('environ/rain-heavy.aiff') | | self.sched_note('environ/rain-heavy.aiff') |
| | | |
| \# with this:
| | # with this:
|
| self.sched_note(water.rain_heavy) | | self.sched_note(water.rain_heavy) |
| | | |
| n | - - No quotes, no `.aiff` suffix, and dashes have | n | - No quotes, no `.aiff` suffix, and dashes have ge |
| generally turned into underscores. Examine the pac | | nerally turned into underscores. Examine the packa |
| kage contents to see the exact names of the sound | | ge contents to see the exact names of the sound fi |
| files. | | les. |
| | | |
| n | - Built-in agents like `FadeOutAgent`, `FadeInOutA | n | Built-in agents like `FadeOutAgent`, `FadeInOutAge |
| gent`, `StopAgent` are now in the `builtin` module | | nt`, `StopAgent` are now in the `builtin` module. |
| . You will have to say, for example: | | You will have to say, for example: |
| | | |
| n | self.sched_agent(builtin.StopAgent()) | n | self.sched_agent(builtin.StopAgent()) |
| | | |
| n | - Change all `__init__()` functions in your agent | n | Change all `__init__()` functions in your agent cl |
| classes to `init()`. Remove this line wherever it | | asses to `init()`. Remove this line wherever it ap |
| appears: | | pears: |
| | | |
| n | \# no longer needed: | n | # no longer needed: |
| Agent.__init__(self) | | Agent.__init__(self) |
| | | |
| n | - Make sure the arguments to `init()` are the righ | n | Make sure the arguments to `init()` are the right |
| t types. Don't use an integer for a default value | | types. Don't use an integer for a default value if |
| if you want the user to be able specify a float. F | | you want the user to be able specify a float. For |
| or list arguments, you should declare an `_args` f | | list arguments, you should declare an `_args` fie |
| ield to specify the list type. | | ld to specify the list type. |
| | | |
| n | - Remove the `float(...)`, `int(...)`, etc casts f | n | Remove the `float(...)`, `int(...)`, etc casts fro |
| rom your `init()` method. Those conversations now | | m your `init()` method. Those conversations now oc |
| occur automatically. | | cur automatically. |
| | | |
| n | - Test your code with `boodler.py --external` *you | n | Test your code with `boodler.py --external` *your- |
| r-directory*. | | directory*. |
| | | |
| n | - When it works, create a package file with `boodl | n | When it works, create a package file with `boodle- |
| e-mgr.py --import create` *your-directory*. | | mgr.py --import create` *your-directory*. |
| | | |
| t | - Don't forget to install the package in your own | t | Don't forget to install the package in your own co |
| collection: `boodle-mgr.py install` *your-package. | | llection: `boodle-mgr.py install` *your-package.bo |
| boop* | | op* |
| | | |