https://github.com/cemolcay/mothersdicegame
Random synth patch generator iOS app
https://github.com/cemolcay/mothersdicegame
eurorack moog patch synth
Last synced: about 2 months ago
JSON representation
Random synth patch generator iOS app
- Host: GitHub
- URL: https://github.com/cemolcay/mothersdicegame
- Owner: cemolcay
- License: mit
- Created: 2021-03-31T23:17:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-01T15:02:03.000Z (about 4 years ago)
- Last Synced: 2025-04-15T23:16:52.066Z (about 2 months ago)
- Topics: eurorack, moog, patch, synth
- Language: Swift
- Homepage:
- Size: 992 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mother's Dice Game
Random patch generator inspired by the [Moog Sound Studio](https://www.moogmusic.com/news/moog-music-introduces-complete-synthesizer-studio-experience) kit's dice game.
## PatchBayView
Includes DFAM, Mother-32 and Subharmonicon patch bays as custom `UIView` instances.
You can create as many `PatchBay` instances with `PatchBayView`s as you want and apply auto-layout on them or embed them in stack views.
``` swift
let dfam = PatchBayView(patchBay: DFAM())
let mother32 = PatchBayView(patchBay: Mother32())
let subharmonicon = PatchBayView(patchBay: Subharmonicon())
```## PatchBay
You can use this protocol and create other synths.
- Create a final class conforming `PatchBay`,
- Implement `PatchBay` protocol values.
- Create the patch points inside an enum conforming `PatchPoint`,
- Add the patch points as cases.
- Implement `PatchPoint` protocol values.``` swift
final class CustomSynth: PatchBay {
typealias PatchPoints = PB
var name: String = "My Custom Synth"
var colCount: Int = 2
var rowCount: Int = 1enum PB: Int, PatchPoint {
case vco
case vcoOut
var type: PatchType {
switch self {
case .vco: return .input
case .vcoOut: return .output
}
}
var name: String {
switch self {
case .vco: return "VCO CV"
case .vcoOut: return "VCO OUT"
}
}
var patchable: Bool {
switch self {
case .vco: return true
case .vcoOut: return true
}
}
}
}
```## Patch Generator
- Create an instance of `PatchGenerator`.
- Add rule set for allowed patch point connections.
- Call `generatePatch()` function on the patch generator.
- It returns a `Patch` struct which includes the input and output `PatchPoint`s in `Patchable` format.
- You can use the `highlight(patch: Patch)` function on `PatchBayView`s for highlighting the patch points.```swift
let generator = PatchGenerator()generator.addRule(fromPatchBay: dfam, toPatchBay: dfam)
generator.addRule(fromPatchBay: dfam, toPatchBay: mother32)
generator.addRule(fromPatchBay: mother32, toPatchBay: dfam)
generator.addRule(fromPatchBay: mother32, toPatchBay: mother32)let patch = generator.generatePatch()
dfam.highlight(patch: patch)
mother32.highlight(patch: patch)
```
## DFAM

## Mother-32

## Subharmonicon
