annotate projects/heavy/hello-world/ControlBinop.h @ 160:5bcf04234f80 heavy-updated

- added -std=c99 to Makefile for user-supplied C files (required for heavy files) - changed heavy core render.cpp file to use latest API and removed all redundant functions (e.g. foleyDesigner/touchkey stuff) - use build_pd.sh to compile and run pd files (-h for usage instructions)
author chnrx <chris.heinrichs@gmail.com>
date Thu, 05 Nov 2015 18:58:26 +0000
parents
children
rev   line source
chris@160 1 /**
chris@160 2 * Copyright (c) 2014, 2015, Enzien Audio Ltd.
chris@160 3 *
chris@160 4 * Permission to use, copy, modify, and/or distribute this software for any
chris@160 5 * purpose with or without fee is hereby granted, provided that the above
chris@160 6 * copyright notice and this permission notice appear in all copies.
chris@160 7 *
chris@160 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
chris@160 9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
chris@160 10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
chris@160 11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
chris@160 12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
chris@160 13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
chris@160 14 * PERFORMANCE OF THIS SOFTWARE.
chris@160 15 */
chris@160 16
chris@160 17 #ifndef _HEAVY_CONTROL_BINOP_H_
chris@160 18 #define _HEAVY_CONTROL_BINOP_H_
chris@160 19
chris@160 20 #include "HvBase.h"
chris@160 21
chris@160 22 typedef enum BinopType {
chris@160 23 HV_BINOP_ADD,
chris@160 24 HV_BINOP_SUBTRACT,
chris@160 25 HV_BINOP_MULTIPLY,
chris@160 26 HV_BINOP_DIVIDE,
chris@160 27 HV_BINOP_INT_DIV,
chris@160 28 HV_BINOP_MOD_BIPOLAR,
chris@160 29 HV_BINOP_MOD_UNIPOLAR,
chris@160 30 HV_BINOP_BIT_LEFTSHIFT,
chris@160 31 HV_BINOP_BIT_RIGHTSHIFT,
chris@160 32 HV_BINOP_BIT_AND,
chris@160 33 HV_BINOP_BIT_XOR,
chris@160 34 HV_BINOP_BIT_OR,
chris@160 35 HV_BINOP_EQ,
chris@160 36 HV_BINOP_NEQ,
chris@160 37 HV_BINOP_LOGICAL_AND,
chris@160 38 HV_BINOP_LOGICAL_OR,
chris@160 39 HV_BINOP_LESS_THAN,
chris@160 40 HV_BINOP_LESS_THAN_EQL,
chris@160 41 HV_BINOP_GREATER_THAN,
chris@160 42 HV_BINOP_GREATER_THAN_EQL,
chris@160 43 HV_BINOP_MAX,
chris@160 44 HV_BINOP_MIN,
chris@160 45 HV_BINOP_POW,
chris@160 46 HV_BINOP_ATAN2
chris@160 47 } BinopType;
chris@160 48
chris@160 49 typedef struct ControlBinop {
chris@160 50 float k;
chris@160 51 } ControlBinop;
chris@160 52
chris@160 53 hv_size_t cBinop_init(ControlBinop *o, float k);
chris@160 54
chris@160 55 void cBinop_onMessage(HvBase *_c, ControlBinop *o, BinopType op, int letIn,
chris@160 56 const HvMessage *const m,
chris@160 57 void (*sendMessage)(HvBase *, int, const HvMessage *const));
chris@160 58
chris@160 59 void cBinop_k_onMessage(HvBase *_c, void *o, BinopType op, const float k,
chris@160 60 int letIn, const HvMessage *const m,
chris@160 61 void (*sendMessage)(HvBase *, int, const HvMessage *const));
chris@160 62
chris@160 63 #endif // _HEAVY_CONTROL_BINOP_H_