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

Committer:
spinal
Date:
Sun Nov 18 15:47:54 2018 +0000
Revision:
64:6e6c6c2b664e
Parent:
31:f4b9b85c7b62
added fix for directrectangle()

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Pokitto 31:f4b9b85c7b62 1 /**************************************************************************/
Pokitto 31:f4b9b85c7b62 2 /*!
Pokitto 31:f4b9b85c7b62 3 @file Synth_song.h
Pokitto 31:f4b9b85c7b62 4 @author Jonne Valola
Pokitto 31:f4b9b85c7b62 5
Pokitto 31:f4b9b85c7b62 6 @section LICENSE
Pokitto 31:f4b9b85c7b62 7
Pokitto 31:f4b9b85c7b62 8 Pokitto development stage library
Pokitto 31:f4b9b85c7b62 9 Software License Agreement
Pokitto 31:f4b9b85c7b62 10
Pokitto 31:f4b9b85c7b62 11 Copyright (c) 2015, Jonne Valola ("Author")
Pokitto 31:f4b9b85c7b62 12 All rights reserved.
Pokitto 31:f4b9b85c7b62 13
Pokitto 31:f4b9b85c7b62 14 This library is intended solely for the purpose of Pokitto development.
Pokitto 31:f4b9b85c7b62 15
Pokitto 31:f4b9b85c7b62 16 Redistribution and use in source and binary forms, with or without
Pokitto 31:f4b9b85c7b62 17 modification requires written permission from Author.
Pokitto 31:f4b9b85c7b62 18 */
Pokitto 31:f4b9b85c7b62 19 /**************************************************************************/
Pokitto 31:f4b9b85c7b62 20
Pokitto 31:f4b9b85c7b62 21 #ifndef SYNTH_SONG_H
Pokitto 31:f4b9b85c7b62 22 #define SYNTH_SONG_H
Pokitto 31:f4b9b85c7b62 23
Pokitto 31:f4b9b85c7b62 24 #define CHUNKSIZE 8*3*2 // 48 bytes
Pokitto 31:f4b9b85c7b62 25 //extern uint8_t chunk1[], chunk2[];
Pokitto 31:f4b9b85c7b62 26 extern uint8_t chunk[2][CHUNKSIZE];
Pokitto 31:f4b9b85c7b62 27 extern uint8_t cc; // current chunk
Pokitto 31:f4b9b85c7b62 28
Pokitto 31:f4b9b85c7b62 29 struct SONG {
Pokitto 31:f4b9b85c7b62 30 byte rb_version; // rbtracker version with which the song was created
Pokitto 31:f4b9b85c7b62 31 uint16_t song_bpm; // song beats per minute
Pokitto 31:f4b9b85c7b62 32 byte num_patches; // how many different instruments ie patches
Pokitto 31:f4b9b85c7b62 33 byte num_channels; // how many channels are used by this song (1-3)
Pokitto 31:f4b9b85c7b62 34 byte num_patterns; // how many different patterns are used
Pokitto 31:f4b9b85c7b62 35 byte song_end; // at what position song ends
Pokitto 31:f4b9b85c7b62 36 int8_t song_loop; // where to loop at end of song. -1 means no loop
Pokitto 31:f4b9b85c7b62 37 byte block_sequence[3][10]; //the sequence of blocks for each track
Pokitto 31:f4b9b85c7b62 38 const uint8_t * instrument_stream[3]; //pointers to the instruments in the track streams
Pokitto 31:f4b9b85c7b62 39 const uint8_t * note_stream[3]; //pointers to the notes in the track streams
Pokitto 31:f4b9b85c7b62 40 };
Pokitto 31:f4b9b85c7b62 41
Pokitto 31:f4b9b85c7b62 42 struct BLOCK {
Pokitto 31:f4b9b85c7b62 43 uint8_t notenumber[64]; // was 64
Pokitto 31:f4b9b85c7b62 44 uint8_t instrument[64]; // was 64
Pokitto 31:f4b9b85c7b62 45 };
Pokitto 31:f4b9b85c7b62 46
Pokitto 31:f4b9b85c7b62 47
Pokitto 31:f4b9b85c7b62 48 #endif // SYNTH_SONG_H
Pokitto 31:f4b9b85c7b62 49
Pokitto 31:f4b9b85c7b62 50