---
### **Group 1: Core MIDI & Key Configuration**
*(Foundational features for defining what and how to sample.)*
#### **1. Key Range Selection**
- **User-Defined:**
- Set via MIDI input (two keys pressed simultaneously or sequentially) or CLI/interactive mode.
- CLI option: `--key-range START END --key-interval INT`.
#### **2. MIDI Messages (Including Aftertouch & Randomization)**
- **User-Defined:**
- Randomize CC/Aftertouch values, including range (e.g., ±5 from base value) and mode (per note, round-robin, or global).
- Define if the base value is fixed or randomized.
#### **3. Key Range Limitation for MIDI Messages**
- **User-Defined:**
- Override the global key range for specific MIDI messages (e.g., CC#64, CC#65). Allows to define the keyrange for sending the midi messages. Imagine some pitch randomisation that you do not want in the lower octaves...
---
### **Group 2: Sampling Modes**
*(Define how to sample: chords, drums, or single notes.)*
#### **4. Chord Sampling Mode**
- **User-Defined:**
- Select chord types (e.g., maj7, min9, dom7), number of slices (16–32), and output file.
- Optional some templats with chords in key
#### **5. Drum Sampling Mode**
- **User-Defined:**
- Use the General MIDI drum map or a custom mapping.
- Define velocity layers per drum sound.
- would also support interactive sampling, count in etc. ( handy for sampling real percussive instruments )
#### **6. Velocity Crossfades**
- **User-Defined:**
- Set velocity ranges and crossfade curves (linear or exponential).
---
### **Group 3: User Assistance & Sync**
*(Help the user sync and monitor the sampling process.)*
#### **7. Monitor Output for Assistance**
- **User-Defined:**
- Play a reference tone (the exact note to be sampled or a fixed tone) and configure count-in (e.g., 2 bars).
#### **8. Tempo (BPM) Awareness**
- **User-Defined:**
- Set BPM manually or auto-detect from MIDI clock.
- Configure count-in for synchronization.
---
### **Group 4: Advanced Routing & Post-Processing**
*(Route and process audio after sampling, keeping the original audio intact.)*
#### **9. Aux Bus**
- **User-Defined:**
- Control output/input levels and binding (e.g., velocity, CC).
- Define post-processing options like phase alignment and filtering.
---
### **Group 5: CLI & Configuration**
*(Define how users interact with the tool, including testing and documentation.)*
#### **10. CLI Help & Key Range Argument**
- **User-Defined:**
- Provide clear CLI options for all features, with structured `--help` documentation.
- Example CLI usage:
```bash
--key-range 30 67 --key-interval 1
--chord-mode --chord-types maj7,min9 --slices 16
--drum-mode --drum-map gm --layers 3
--monitor --play-reference note --count-in 2
--aux-bus bus_a --output-level 0.7 --bind velocity
```
#### **11. Testing of the CLI `--help` System**
- **Requirements:**
- Ensure `--help` displays **all available commands** and their descriptions clearly.
- Test that `--help` works for **subcommands** (if applicable).
- Verify that **default values** are shown in the help text.
- Confirm that **required arguments** are marked as such.
#### **12. Extensive Testing of CLI Arguments**
- **Requirements:**
- Test **all CLI arguments** for correct parsing (e.g., `--key-range 30 67`).
- Validate that **invalid inputs** (e.g., `--key-range 67 30`) are rejected with a clear error message.
- Ensure **optional arguments** (e.g., `--key-interval`) default to expected values if not provided.
- Test **argument combinations** (e.g., `--chord-mode --slices 16`) to ensure they work together.
- Verify that **conflicting arguments** (e.g., `--chord-mode` and `--drum-mode` simultaneously) are handled gracefully.
- test the audio devices in the conf/autosamplerT_config.yaml excist and can be accessed (so test this) . If not run the audio setup --setup audio
- test if the midi i/o devices from the conf exist, so test this. if not run the --setup midi
---
### **Group 6: Documentation**
*(Ensure users can understand and use the tool effectively.)*
#### **13. Update Documentation**
- **Requirements:**
- **CLI Reference:** Document all CLI arguments, their purpose, and examples.
- **YAML Configuration:** Provide a template and explain each field.
- **Use Cases:** Include examples for common workflows (e.g., sampling chords, drums, or using the aux bus).
- **Troubleshooting:** Add a section for common issues (e.g., MIDI device not detected, invalid key ranges).
- **FAQ:** Address frequently asked questions (e.g., "How do I randomize CC values?").
---
### **Suggested Implementation Order**
1. **Group 1: Core MIDI & Key Configuration**
*(Essential for defining the sampling range and MIDI behavior.)*
2. **Group 5: CLI & Configuration**
*(Users need a way to input their settings, and CLI must be tested thoroughly.)*
3. **Group 2: Sampling Modes**
*(Define what to sample: chords, drums, or notes.)*
4. **Group 3: User Assistance & Sync**
*(Help users sample accurately with feedback and synchronization.)*
5. **Group 4: Advanced Routing & Post-Processing**
*(Optional but powerful for advanced users.)*
6. **Group 6: Documentation**
*(Finalize user-facing documentation and examples.)*
---
### **Next Steps**
- **Implement CLI parsing** (e.g., using `argparse` in Python).
- **Write unit tests** for CLI argument parsing and `--help` functionality.
- **Draft documentation** for CLI, YAML, and use cases.