Notes and Note Definitions
The Note Definition is a scriptable object which references a Note prefab. It is used on Rhythm Clips to know what the clip should look like in the Editor and what note should be spawned.
The Note Definition also has a way of limiting the clip duration to match the bpm or a fraction of it.
The Note Definition can be dragged and dropped in the timeline editor to place notes. It also has fields to customize the look of the clip within the Editor.
Notes are components which update with the timeline and sync to the DSP. By default our system comes with 4 different Note types:
- Tap Note
- Hold Note
- Swipe Note
- Counter Notes
All notes inherit from the same base class Note. The Note class deals with events that initialize it and updates over time, whether it is from the timeline or Monobehavior Update event.
Notes a Spawned by the Rhythm Processor and they are pooled. Pooling object means they are reused once deactivated, they are never destroyed completely, just hidden until they are needed again.
Therefore Notes have multiple states:
- Disabled : They are not used
- Pre-Active : The note is moving but is not yet interactable
- Active : The note can be interacted with
- Post-Active : The note used to be interactable but no longer is.
The movement of each Note is usually defined to start a the Track Object start point and be on the perfect timing at the end point. This is easily customizable by creating a custom note.
Tap Note
The tap note detects a single press input. The perfect timing is to press in center of the clip. Therefore it is recommended to combine it with a Note Definition that limits the clip size to a Crochet.
Hold Note
The hold note detects two input, press and release. Both need to match exactly the right timings. The perfect timing is to press in the clip half a crochet after the clip start and half a crochet before the clip end. Therefore it is recommended to combine it with a Note Definition that does not limit the clip size.
There are options to allow the hold note to be triggered automatically at the end without needing to release it manually at the perfect time.
Swipe Note
The Swipe Note detects a swipe input with a certain direction. The perfect timing is to press in center of the clip. Therefore it is recommended to combine it with a Note Definition that limits the clip size to a Crochet.
Counter Note
The counter Note needs to be The perfect timing is to press in the clip half a crochet after the clip start and half a crochet before the clip end. Therefore it is recommended to combine it with a Note Definition that does not limit the clip size.
The counter number can be customized per clip instead of per prefab. This allows for much easier iteration. Simply edit the Integer parameter of the Rhythm Clip
These values can be retrieved easily within the custom Note scripts via the Rhythm Clip Data property.