Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: POKITTO_LIBS/Synth/Synth_osc.h
- Revision:
- 6:72f87b7c7400
- Parent:
- 0:e8b8f36b4505
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/POKITTO_LIBS/Synth/Synth_osc.h Wed Oct 11 20:35:52 2017 +0000
@@ -0,0 +1,67 @@
+/**************************************************************************/
+/*!
+ @file Synth_osc.h
+ @author Jonne Valola
+
+ @section LICENSE
+
+ Pokitto development stage library
+ Software License Agreement
+
+ Copyright (c) 2015, Jonne Valola ("Author")
+ All rights reserved.
+
+ This library is intended solely for the purpose of Pokitto development.
+
+ Redistribution and use in source and binary forms, with or without
+ modification requires written permission from Author.
+*/
+/**************************************************************************/
+
+#ifndef SYNTH_OSC_H
+#define SYNTH_OSC_H
+
+#include "Pokitto.h"
+
+typedef uint8_t byte;
+
+struct OSC {
+ byte on;
+ byte wave;
+ byte loop;
+ byte echo;
+ byte echodiv;
+ byte adsr;
+ byte tonic;
+
+ uint16_t count;
+
+ uint16_t vol;
+ uint16_t cinc; // how much to add per cycle
+ uint16_t output; // output is stored as 16 bit value and shifted before its put in OCR2B
+
+ uint8_t adsrphase;
+ uint16_t adsrvol;
+ uint16_t attack; // Attack change
+ uint16_t decay; // Attack change
+ uint16_t sustain; // Attack change
+ uint16_t release; // Attack change
+
+ int16_t pitchbend; // bends cycle counter (more is higher pitch)
+ int16_t maxbend; // maximum bend before stopping
+ int16_t bendrate; // how much to bend by every cycle
+
+ uint8_t vibrate;
+ uint8_t arpmode;
+ uint8_t arpspeed;
+ uint8_t arpstep;
+ uint8_t overdrive;
+ uint8_t kick;
+
+ uint32_t duration;
+};
+
+
+
+#endif // SYNTH_OSC_H
+