PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Synth_song.h Source File

Synth_song.h

Go to the documentation of this file.
00001 /**************************************************************************/
00002 /*!
00003     @file     Synth_song.h
00004     @author   Jonne Valola
00005 
00006     @section LICENSE
00007 
00008     Pokitto development stage library
00009     Software License Agreement
00010 
00011     Copyright (c) 2015, Jonne Valola ("Author")
00012     All rights reserved.
00013 
00014     This library is intended solely for the purpose of Pokitto development.
00015 
00016     Redistribution and use in source and binary forms, with or without
00017     modification requires written permission from Author.
00018 */
00019 /**************************************************************************/
00020 
00021 #ifndef SYNTH_SONG_H
00022 #define SYNTH_SONG_H
00023 
00024 #define CHUNKSIZE 8*3*2 // 48 bytes
00025 //extern uint8_t chunk1[], chunk2[];
00026 extern uint8_t chunk[2][CHUNKSIZE];
00027 extern uint8_t cc; // current chunk
00028 
00029 struct SONG {
00030     byte rb_version; // rbtracker version with which the song was created
00031     uint16_t song_bpm; // song beats per minute
00032     byte num_patches; // how many different instruments ie patches
00033     byte num_channels; // how many channels are used by this song (1-3)
00034     byte num_patterns; // how many different patterns are used
00035     byte song_end;  // at what position song ends
00036     int8_t song_loop; // where to loop at end of song. -1 means no loop
00037     byte block_sequence[3][10]; //the sequence of blocks for each track
00038     const uint8_t * instrument_stream[3]; //pointers to the instruments in the track streams
00039     const uint8_t * note_stream[3]; //pointers to the notes in the track streams
00040 };
00041 
00042 struct BLOCK {
00043     uint8_t notenumber[64]; // was 64
00044     uint8_t instrument[64]; // was 64
00045 };
00046 
00047 
00048 #endif // SYNTH_SONG_H
00049 
00050