Player of the three recorded pieces one scratch button plays.
More...
#include <scratcher.h>
|
| class | ScratchNoteCB |
| | Receiver that shows each note a piece starts on the scratching player's track. More...
|
|
| | Scratcher (Muse *pFirst, Muse *pSecond, Muse *pThird, int nQuantumTicks, int nLengthTicks, int nChannel) |
| | Construct a scratcher over three recorded pieces.
|
| virtual | ~Scratcher () |
| | Stop scratching and release the pieces.
|
| virtual void | Start (int nPlayer, int nTickOffset) |
| | Start scratching for a player.
|
| virtual void | Stop () |
| | Stop scratching and bend the channel back.
|
| virtual int | IsScratching () |
| | Report whether the scratcher is scratching.
|
| virtual int | GetLoopLength () |
| | Report the ticks of one loop of the pieces.
|
| virtual void | SetPitch (float fPitch) |
| | Set the pitch.
|
| virtual void | SetPosition (float fPosition) |
| | Pick the piece from the horizontal position of the stick.
|
|
| static constexpr int | kNumPieces = 3 |
| | Number of pieces, one for each stick position.
|
Player of the three recorded pieces one scratch button plays.
The RTTI includes the class name and records no base, and the nested Scratcher::ScratchNoteCB. The vtable at 0x003ca460 has eight slots after the type function: the destructor, Start(), Stop(), IsScratching(), GetLoopLength(), SetPitch(), and SetPosition(). ScratchTrackBuilder builds one per button of each scratch set, and ScratchTrack drives the scratchers of the current set. The stick picks the piece that plays, and the pitch bends the channel.
◆ Scratcher()
| Scratcher::Scratcher |
( |
Muse * | pFirst, |
|
|
Muse * | pSecond, |
|
|
Muse * | pThird, |
|
|
int | nQuantumTicks, |
|
|
int | nLengthTicks, |
|
|
int | nChannel ) |
Construct a scratcher over three recorded pieces.
The scratcher loops each piece and keeps a copy of each.
- Parameters
-
| pFirst | The piece for the stick held left. |
| pSecond | The piece for the stick at rest. |
| pThird | The piece for the stick held right. |
| nQuantumTicks | The ticks of the beat a piece starts on. |
| nLengthTicks | The ticks of one loop of each piece. |
| nChannel | The MIDI channel of the pieces. |
- Ghidra address:
- NTSC-U/C: 0x00153e88
- Ghidra address:
- PAL: 0x001556f0
◆ ~Scratcher()
| virtual Scratcher::~Scratcher |
( |
| ) |
|
|
virtual |
Stop scratching and release the pieces.
- Ghidra address:
- NTSC-U/C: 0x00154210
- Ghidra address:
- PAL: 0x00155a78
◆ Start()
| virtual void Scratcher::Start |
( |
int | nPlayer, |
|
|
int | nTickOffset ) |
|
virtual |
Start scratching for a player.
A piece starts at once in the first half of a beat and at the next beat otherwise.
- Parameters
-
| nPlayer | The player index. |
| nTickOffset | The ticks the notes of the pieces are shown ahead of the current tick. |
- Ghidra address:
- NTSC-U/C: 0x00154360
- Ghidra address:
- PAL: 0x00155bc8
◆ Stop()
| virtual void Scratcher::Stop |
( |
| ) |
|
|
virtual |
Stop scratching and bend the channel back.
- Ghidra address:
- NTSC-U/C: 0x00154440
- Ghidra address:
- PAL: 0x00155ca8
◆ IsScratching()
| virtual int Scratcher::IsScratching |
( |
| ) |
|
|
virtual |
Report whether the scratcher is scratching.
- Returns
- Non-zero while scratching.
- Ghidra address:
- NTSC-U/C: 0x001544b0
- Ghidra address:
- PAL: 0x00155d18
◆ GetLoopLength()
| virtual int Scratcher::GetLoopLength |
( |
| ) |
|
|
virtual |
Report the ticks of one loop of the pieces.
- Returns
- The ticks.
- Ghidra address:
- NTSC-U/C: 0x00154340
- Ghidra address:
- PAL: 0x00155ba8
◆ SetPitch()
| virtual void Scratcher::SetPitch |
( |
float | fPitch | ) |
|
|
virtual |
Set the pitch.
A change of 0.02 or less is ignored.
- Parameters
-
| fPitch | The pitch, from -3 to 3 semitones. |
- Ghidra address:
- NTSC-U/C: 0x001544b8
- Ghidra address:
- PAL: 0x00155d20
◆ SetPosition()
| virtual void Scratcher::SetPosition |
( |
float | fPosition | ) |
|
|
virtual |
Pick the piece from the horizontal position of the stick.
- Parameters
-
| fPosition | The stick position, from -1 to 1. |
- Ghidra address:
- NTSC-U/C: 0x00154508
- Ghidra address:
- PAL: 0x00155d70
◆ kNumPieces
| int Scratcher::kNumPieces = 3 |
|
staticconstexpr |
Number of pieces, one for each stick position.
The documentation for this class was generated from the following file: