Reputation: 67
I'm working on a toy with multiple "touch areas" which serve as inputs to my synth.
Using an oscillatorBank I can start and stop notes easily.
In regular keyboards there's only 1 key for each Midi note, so "retriggering" a note requires the musician to lift their finger, even if only briefly allowing one to call .stop() and then .start() on the note.
The scenario I'm working on is when the note is held down, but is then triggered again on another "touch area". Could I somehow "retrigger" the "attack" sound for that note? Should I start and stop the player? Ideally I would call
oscillator.restart(noteNumber: )
but that doesn't exist that I know of.
Many thanks.
Upvotes: 2
Views: 95
Reputation: 4573
Seems like a simple wrapper for stop(noteNumber:) and start(noteNumber:) that you could set up in an extension.
Upvotes: 2