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

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!
Committer:
Pokitto
Date:
Wed Dec 25 23:59:52 2019 +0000
Revision:
71:531419862202
Parent:
31:f4b9b85c7b62
Changed Mode2 C++ refresh code (graphical errors)

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