Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Burger::Sequencer::PatternData_t Struct Reference

A buffer describing a group of notes. More...

Collaboration diagram for Burger::Sequencer::PatternData_t:
Collaboration graph
[legend]

Public Member Functions

Command_tGetCommand (int iRow, int iChannel)
 Return the requested Command_t.
 
void SetName (const char *pName)
 Set the name of the pattern.
 

Static Public Member Functions

static PatternData_tNew (uint_t uRows, uint_t uChannels)
 Allocate memory for a pattern array.
 

Public Attributes

uint32_t m_uRowCount
 Number of rows in a pattern.
 
uint32_t m_uChannelCount
 Number of pattern channels.
 
char m_Name [32]
 Name of the sequence pattern.
 
Command_t m_Commands [1]
 Array of sequence patterns (m_uPatternSize*m_uChannelCount is the size)
 

Detailed Description

A buffer describing a group of notes.


This contains a 2 dimensional array of pattern notes organized by rows and channels.

See also
Command_t

Member Function Documentation

◆ GetCommand()

Burger::Sequencer::Command_t *BURGER_API Burger::Sequencer::PatternData_t::GetCommand ( int iRow,
int iChannel )

Return the requested Command_t.


Do a bounds check on the input values to ensure they do not exceed the boundaries of the Command_t array and return the pointer to the requested entry.

Parameters
iRowIndex into the row
iChannelIndex into the channel
Returns
Pointer to the entry in the data

◆ New()

Burger::Sequencer::PatternData_t *BURGER_API Burger::Sequencer::PatternData_t::New ( uint_t uRows,
uint_t uChannels )
static

Allocate memory for a pattern array.


Given the number of rows and channels, allocate memory in one block with space for the Channel_t array

The array is cleared

Parameters
uRowsNumber of commands per row
uChannelsNumber of channel row
Returns
NULL if out of memory, or valid pointer to data

◆ SetName()

void Burger::Sequencer::PatternData_t::SetName ( const char * pName)
inline

Set the name of the pattern.


Note
If the string exceeds the size of the buffer, it will be truncated.
Parameters
pNamePointer to a "C" string for the new name

Member Data Documentation

◆ m_Commands

Command_t Burger::Sequencer::PatternData_t::m_Commands[1]

Array of sequence patterns (m_uPatternSize*m_uChannelCount is the size)

◆ m_Name

char Burger::Sequencer::PatternData_t::m_Name[32]

Name of the sequence pattern.

◆ m_uChannelCount

uint32_t Burger::Sequencer::PatternData_t::m_uChannelCount

Number of pattern channels.

◆ m_uRowCount

uint32_t Burger::Sequencer::PatternData_t::m_uRowCount

Number of rows in a pattern.