| 1 | import { Mac } from "../src/Mac.ts"; |
| 2 | |
| 3 | const mac = await Mac.open(); |
| 4 | mac.on("error", (error) => { |
| 5 | console.error(error); |
| 6 | }); |
| 7 | |
| 8 | mac.toast("Insert AD2 Track", { |
| 9 | detail: "Loading Addictive Drums 2...", |
| 10 | durationMs: 900, |
| 11 | }); |
| 12 | |
| 13 | await new Promise((resolve) => { |
| 14 | setTimeout(resolve, 1300); |
| 15 | }); |
| 16 | |
| 17 | mac.toast("Insert Blank Track", { |
| 18 | durationMs: 800, |
| 19 | }); |
| 20 | |
| 21 | await new Promise((resolve) => { |
| 22 | setTimeout(resolve, 1200); |
| 23 | }); |
| 24 | |
| 25 | mac.close(); |